diff --git a/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/84bd10c9-362b-41d0-8f45-6775dca12a2f_content_list.json b/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/84bd10c9-362b-41d0-8f45-6775dca12a2f_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..c24485bc3fc5f7f60c0056951ecbab80606b2dd4 --- /dev/null +++ b/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/84bd10c9-362b-41d0-8f45-6775dca12a2f_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff4fe495727fa1622c3372c95b150662de0082c16e396e16135fab6a8ca6ac40 +size 94298 diff --git a/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/84bd10c9-362b-41d0-8f45-6775dca12a2f_model.json b/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/84bd10c9-362b-41d0-8f45-6775dca12a2f_model.json new file mode 100644 index 0000000000000000000000000000000000000000..52944d18ca1b0bbdb4309f79922747115687ec6a --- /dev/null +++ b/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/84bd10c9-362b-41d0-8f45-6775dca12a2f_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae72d4efa0e27d3a111a290498cf60983f27011e5e648748f76c74c1ddb9eb22 +size 119818 diff --git a/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/84bd10c9-362b-41d0-8f45-6775dca12a2f_origin.pdf b/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/84bd10c9-362b-41d0-8f45-6775dca12a2f_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fe67c3a8c028667cc09a3d92b57c36f5818bed9a --- /dev/null +++ b/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/84bd10c9-362b-41d0-8f45-6775dca12a2f_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7430bfc5a9453bd11b82ccef36217c4cb1533d0fb6929246a24ae54fac603013 +size 4450675 diff --git a/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/full.md b/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/full.md new file mode 100644 index 0000000000000000000000000000000000000000..3519eeacbd7240d3219ee14491fc47037248db68 --- /dev/null +++ b/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/full.md @@ -0,0 +1,447 @@ +# Deep Adversarial Decomposition: A Unified Framework for Separating Superimposed Images + +Zhengxia Zou1*, Sen Lei2, Tianyang Shi3, Zhenwei Shi2, Jieping Ye1,4 +1University of Michigan, Ann Arbor, 2Beihang University, 3NetEase Fuxi AI Lab, 4Didi Chuxing +{zzhengxi, jpye}@umich.edu, {senlei, shizhenwei}@buaa.edu.cn, shitianyang@corp.netease.com + +# Abstract + +Separating individual image layers from a single mixed image has long been an important but challenging task. We propose a unified framework named "deep adversarial decomposition" for single superimposed image separation. Our method deals with both linear and non-linear mixtures under an adversarial training paradigm. Considering the layer separating ambiguity that given a single mixed input, there could be an infinite number of possible solutions, we introduce a "Separation-Critic" - a discriminative network which is trained to identify whether the output layers are well-separated and thus further improves the layer separation. We also introduce a "crossroad $l_{1}$ " loss function, which computes the distance between the unordered outputs and their references in a crossover manner so that the training can be well-instructed with pixel-wise supervision. Experimental results suggest that our method significantly outperforms other popular image separation frameworks. Without specific tuning, our method achieves the state of the art results on multiple computer vision tasks, including the image deraining, photo reflection removal, and image shadow removal. + +# 1. Introduction + +In the computer vision field, many tasks can be considered as image layer mixture/separation problems. For example, when we take a picture on rainy days, the image obtained can be viewed as a mixture of two layers: a rain-streak layer and a clean background layer. When we look through a transparent glass, we see a mixture of the scene beyond the glass and the scene reflected by the glass. + +Separating superimposed images with a single observation has long been an important but challenging task. On one hand, it forms the foundation of a large group of real-world applications, including transparency separation, shadow removal, deraining, etc. On the other hand, it is naturally a massively ill-posed problem, where the difficulty + +lies not only in the absence of the mixture function but also in the lack of constraints on the output space. In recent literature, most of the above-mentioned tasks are investigated individually despite the strong correlation between them [8, 23, 48, 54, 59, 60]. In this paper, we propose a new framework for single superimposed image separation, as shown in Fig 1, which deals with all the above tasks under a unified framework. + +Learning a priori for image decomposition. Given a single superimposed image, as we have no extra constraint on the output space, there could be an infinite number of possible decomposition. Previous works often integrate hard-crafted priors to apply additional constraints to their separation outputs. For example, in recent literature [17, 67], researchers introduced the "gradient exclusiveness" [67] and the "internal self-similarity" [17], where the former one emphasizes the independence of the layers to be separated in their gradient domain, and the latter one assumes that the distribution of small patches within each separate layer should be "simpler" (more uniform) than in the original mixed one. However, these hand-crafted priors may introduce unexpected bias and thus fails in complex mixture conditions. In this paper, we investigate an interesting question: can a good prior be learned from data? To answer this question, we re-examine the prior under a totally different point of view by taking advantage of the recent success of generative adversarial networks [19, 28, 47]. We introduce a "Separation-Critic" - a discriminative network $D_{C}$ , which is trained to identify whether the output layers are well-separated. The layer separation thus can be gradually enforced by fooling the Critic under an adversarial training paradigm. + +Crossroad loss function. In addition to the Critic $D_C$ , we also introduce a layer separator $G$ and train it to minimize the distance between the separated outputs and the ground truth references. However, a standard $l_1$ or $l_2$ loss does not apply to our task since the $G$ may predict unordered outputs. We, therefore, introduce a "crossroad $l_1$ " loss which computes the distance between the outputs and their references in a crossover fashion. In this way, the train- + +![](images/a7e0cedbcc347421c283b05884f237b4fe8b4e39dd60e851d011412ae171ec4c.jpg) +Single Mixed Image Separation + +![](images/8279e519f201a6b380654a3d2b552187d9bcd62903d056913cea0c0266edcfc5.jpg) + +![](images/2b58a71cfdbfe2254d5baf20ee2f4fab7e595f2209dc80d18d97e5e39ac191bf.jpg) + +![](images/f7bbacad32956134194150070aee62ea9f03b6edcad81f03bd75e61112f37bc2.jpg) +Single Mixed Image Separation + +![](images/2e01862cb7f81b785a604b7116a99c2150c62446530224d10de24816549c2002.jpg) + +![](images/59e0605f1f2e36ef80b810b7700a6faf78647a807923b07d66c0a144de6f1bea.jpg) + +![](images/bc17dcb3ae10fcc9d6082b06db77f483eb2a729475add0902b3e60ae96595e9a.jpg) +Application: deraining +Input +Figure 1: We propose a unified framework for single mixed image separation under an adversarial training paradigm. Our method can be applied to a variety of real-world tasks, including image deraining, photo reflection removal, image shadow removal, etc. + +![](images/35a5a9f69ead0bbdc4d8a1d290ebaa12253e760f53b7c517c4e8fad2ffd5583f.jpg) +Output + +![](images/f067f573ae6c686c965aed8df8541e781dec56e6b1e485e7691b1ac590b99250.jpg) +Input + +![](images/946a96a51948c2f06e704b80f87b22873a852a4e5d0a1c1585ed5d8e086d2b7c.jpg) +Application: shadow removal +Input + +![](images/8bce01d92af1724b78d70e801b9845d4729bc31fcb474deca303e6ea54c3e3ea.jpg) +Output + +ing can be well-instructed by pixel-wise supervision. + +Confronting nonlinear mixture and degradation. In some real-world image separation tasks, the mixture of images is usually beyond linear. For example, the formation of a reflection image may depend not only on the relative position of the camera to the image plane but also on lighting conditions [59]. Besides, the degradation (e.g., overexposure and noise) may further increase the difficulty of the separation. In these conditions, one may need injecting "imagination" into the algorithm to recover the hidden structure of degraded data. Inspired by the recent image translation methods [28], we further introduce two Markovian discriminators (PatchGAN) to improve the perceptual quality of the outputs. + +Experimental results show that our method significantly outperforms other popular image separation frameworks [17, 35]. We apply our method to a variety of computer vision tasks. Without specifically tuning, we achieve the state of the art results on nine datasets of three different tasks, including image deraining, photo reflection removal, and image shadow removal. To our best knowledge, this is the first unified framework for solving these problems as most previous solutions on these tasks are separately investigated and designed. + +# 2. Related Work + +Superimposed image separation. In signal processing, a similar topic to our paper is Blind Source Separation (BSS) [5, 14-16, 27], which aims to separate source signals from a set of mixed ones. The research of this topic can be traced back to the 1990s [26], where the Independent Component Analysis (ICA) [27] was a representative + +of the methods at the time. The key to estimating the ICA model is the Central Limit Theorem, i.e., the distribution of a sum of two images tends toward a Gaussian distribution, under certain conditions. Some statistics-based criteria thus have been introduced to measure the independence and non-Gaussianity of the images, e.g., Kurtosis and negative entropy. The main difference between the BSS and our task is that the former one typically requires multiple mixed inputs [14-16, 27] or additional user interactions [35], while the latter one does not. We focus on the latter case since multiple mixed inputs or user interactions are not always available in practice. Recently, Gandelsman et al. proposed a deep learning-based method called Double-DIP [17] that can separate superimposed images with a single observation under certain conditions. However, their method can only handle the input with regular mixed patterns. + +Related applications. Many real-world tasks can be viewed as special cases of superimposed image separation: + +1) Single Image Deraining. A rainy image can be simply viewed as a superposition of a clean background image and rain streaks. Some early deraining methods were designed based on low-rank constraints [4, 41, 42, 71] and sparse coding methods [20, 29, 43, 57], where the rain-streaks are considered as high frequency noise. However, these methods usually lead to over-smoothed results. Recent deraining methods typically formulate the deraining as a deep learning based "image-to-image" translation process which is trained with pixel-wise regression loss [12, 13, 23, 39, 55, 62, 64]. +2) Reflection-removal. Early reflection removal methods often require additional input images [35] and hand-crafted priors on estimating the reflection layer. Such priors include + +![](images/d701f9f890f326b66c277228546f0a7eae14f38eb4427bda1c32c57379c4b591.jpg) +Figure 2: An overview of our method. Our method consists of a separator $G$ and several discriminators. The $G$ , which is trained under a "crossroad $l_{1}$ " loss, aims to decompose a single mixed input into two individual images. To identify whether the separation is good or not, we introduce a "Critic" $D_{C}$ , which is trained together with $G$ under an adversarial training paradigm. We further use two Markovian Discriminators $(D_{M1}, D_{M2})$ to improve the perceptual quality of the outputs. + +the smoothness prior [40, 51], gradient sparsity constraint [2, 36, 37], ghost cues [51], etc. In Recent methods, the priors are usually explored by data-driven methods [9, 44, 53, 60] and adversarial training/synthesis [59, 67], which better handle more complex reflections. + +3) Shadow-removal. To remove shadows, some early works designed physical models based on illumination invariant assumption [10, 11]. Later, more methods based on hand-crafted features were proposed [1, 21, 25, 32, 52, 66, 69]. Similar to deraining and reflection removal, recent researches on shadow removal also suggest using deep learning or adversarial training techniques, which brings additional improvements especially on complex lightening conditions [8, 24, 30, 33, 46, 50, 54, 68]. + +Generative Adversarial Networks (GAN). GAN has received a great deal of attention in recent years and has achieved impressive results in a variety of computer vision tasks, e.g., image generation [7, 47], image style transfer [28, 70], image super-resolution [34], etc. A typical GAN [19] consists of two neural networks: a generator $G$ and a discriminator $D$ . The key to the GAN's success is the idea of adversarial training where the $G$ and $D$ will contest with each other in a minimax two-player game and forces the generated data to be, in principle, indistinguishable from real ones. More recently, GAN has also been applied to some image separation tasks to improve perceptual quality of the recovered images, including image deraining [38, 65], image reflection removal [44, 59, 67] and image de-shadowing [8, 24, 33, 54]. + +# 3. Methodology + +We frame the training of our model as a pixel-wise regression process with the help of adversarial losses. Our method consists of an image separator $G$ , a Separation Critic $D_{C}$ and two Markovian discriminators $D_{M1}$ and $D_{M2}$ . Fig. 2 shows an overview of our method. + +# 3.1. Crossroad $l_{1}$ Loss Function + +Suppose $\hat{x}_1$ and $\hat{x}_2$ represent two individual images and $y = f(\hat{x}_1, \hat{x}_2)$ represents their mixture. We assume the operation $f(\cdot)$ is unknown and could be either a linear or a non-linear mixing function. Given a mixed input $y$ , our separator aims to predict two individual outputs $x_1$ and $x_2$ : + +$$ +x _ {1}, x _ {2} = G (y), \tag {1} +$$ + +that recover the two original images $\hat{x}_1$ and $\hat{x}_2$ . + +We train the separator $G$ to minimize the distance between its outputs $(x_{1}, x_{2})$ and their ground truth $(\hat{x}_{1}, \hat{x}_{2})$ . Note that since we can not specify the order of the two outputs for a typical image decomposition problem (especially when the $\hat{x}_{1}$ and $\hat{x}_{2}$ are from the same image domain), the standard pixel-wise $l_{1}$ or $l_{2}$ loss functions do not apply to our task. The solution to this problem is to introduce new loss functions that can deal with unordered outputs. We therefore propose a new loss function called "crossroad $l_{1}$ " loss for our task. The main idea behind is to crossly compute the distance by exchanging the order of the outputs and then take their minimum value as the final response: + +$$ +\begin{array}{l} l _ {c r o s s} \left(\left(x _ {1}, x _ {2}\right), \left(\hat {x} _ {1}, \hat {x} _ {2}\right)\right) \\ = \min \left\{d _ {1, 1} + d _ {2, 2}, d _ {1, 2} + d _ {2, 1} \right\} \tag {2} \\ \end{array} +$$ + +where $d_{i,j} = \| x_i - \hat{x}_j\| _1,i,j\in \{1,2\}$ . We use the standard $l_{1}$ function rather than $l_{2}$ in $d_{i,j}$ since it encourages less blurring effect. The $G$ can be therefore trained to minimize the loss $\mathcal{L}_{cross}$ on an entire dataset: + +$$ +\mathcal {L} _ {\text {c r o s s}} (G) = E _ {\hat {x} _ {i} \sim p _ {i} (\hat {x} _ {i})} \left\{l _ {\text {c r o s s}} \left(\left(x _ {1}, x _ {2}\right), \left(\hat {x} _ {1}, \hat {x} _ {2}\right)\right) \right\}, \tag {3} +$$ + +where $p_i(\hat{x}_i)$ represents the distribution of the image data, and $i \in \{1, 2\}$ . + +# 3.2. Separation Critic + +Considering the layer ambiguity, instead of applying any hand-crafted [67] or statistics-based constraints [27] to + +![](images/45b406c24b9b9c00ad0c1b54417ce70000486123f6d165110bae58578d3b65ef.jpg) +(a) Linear mixture + +![](images/b69cc2fec87a245b1b3832c68a8001351946d6838cc544a2dd94fd89ba850a83.jpg) +(b) Linear mixture + overexposure + +![](images/77741a38df285d10d4bd91935262385f7ce0acb6054b3c97927468145da30bc8.jpg) +(c) Linear mixture + random gamma +Figure 3: We compare different decomposition priors for image separation, including the "exclusion loss" [17, 67], "Kurtosis" [27], and the proposed "Separation-Critic". For either of the three metrics, a lower score indicates a heavier mixture. In sub-figure (a), we plot the response of the three metrics given a set of mixed inputs that are synthesized based on Eq. (5). Clearly, if a metric is good enough, the response should be monotonically decreasing as $\alpha$ increases. We also test on additional nonlinear corruptions, including (b) overexposure, (c) random gamma correction, and (d) random hue transform. The proposed Critic shows better robustness in all conditions. + +![](images/d99e1952bb42f7e0f40a78da1a47eea384d3860dcada9d64636380f496d0e01f.jpg) +(d) Linear mixture + random hue + +our output space, we learn a decomposition prior through an adversarial training process. We therefore introduce a "Separation-Critic" $D_C$ which is trained to distinguish between the outputs $(x_1,x_2)$ and a pair of clean images $(\hat{x}_1,\hat{x}_2)$ , and is independent on the order of the two inputs. We express its objective function as follows: + +$$ +\begin{array}{l} \mathcal {L} _ {\text {c r i t i c}} (G, D _ {C}) = E _ {\hat {x} _ {i} \sim p _ {i} (\hat {x} _ {i})} \left\{\log D _ {C} (\hat {x} _ {1}, \hat {x} _ {2}) \right\} \\ + E _ {x _ {i} \sim p _ {i} (x _ {i})} \left\{\log \left(1 - D _ {C} \left(x _ {1}, x _ {2}\right)\right) \right\} \tag {4} \\ + E _ {\hat {x} _ {i} \sim p _ {i} (\hat {x} _ {i})} \left\{\log \left(1 - D _ {C} \left(\operatorname {m i x} \left(\hat {x} _ {1}, \hat {x} _ {2}\right)\right)\right) \right\}. \\ \end{array} +$$ + +Note that when training the $D_C$ with fake samples, in addition to the decomposed output $(x_{1},x_{2})$ , we also synthesize a set of "fake" images by mixing two clean images $(x_1',x_2') = \mathrm{mix}(\hat{x}_1,\hat{x}_2)$ with a random linear weight $\alpha$ to + +enhance its discriminative ability on mixed images: + +$$ +x _ {1} ^ {\prime} = \alpha \hat {x} _ {1} + (1 - \alpha) \hat {x} _ {2}, \quad x _ {2} ^ {\prime} = (1 - \alpha) \hat {x} _ {1} + \alpha \hat {x} _ {2}. \tag {5} +$$ + +At the input end of the $D_C$ , we simply concatenate two images together in the channel dimension for modeling their joint probability distribution. The adversarial training of $G$ and $D_C$ is essentially a minimax optimization process, where $G$ tries to minimize this objective while $D_C$ tries to maximize it: $G^{\star} = \arg \min_{G}\max_{D_C}\mathcal{L}_{\text{critic}}(G,D_C)$ . + +In Fig. 3, we give four examples to illustrate the effectiveness of our Critic. We compare a well-trained $D_C$ with two popular metrics for image separation, 1) the exclusion loss [17, 67], and 2) the Kurtosis [27], where the former one enforces separation of two images on the image gradient domain, and the latter one is widely used in BSS for measuring the independence (non-Gaussianity) of the recovered signals: Kurtosis $(u) = E\{u^4\} - 3(E\{y^2\})^2$ . For either of the three metrics, a lower score indicates a higher degree of mixture1. We mix two images by using Eq. (5) with different $\alpha$ . Clearly, if a metric is good enough, the curve should be monotonically decreasing as $\alpha$ increases. Fig. 3 (a) shows the response the above three metrics. We further add some additional nonlinear corrections on the mixed images, including (b) random overexposure, (c) random gamma correction, and (d) random hue transform. We can see our Critic shows better robustness, especially for nonlinear degradation. + +# 3.3. Improving Perceptual Quality + +To improve the perceptual quality of the decomposed images, we further introduce another two conditional discriminators $D_{M1}$ and $D_{M2}$ to enhance high-frequency details. We follow Isola et al. [28] and build $D_{M1}$ and $D_{M2}$ as two local perception networks - that only penalize structure at the scale of patches (a.k.a the Markovian discriminator or "PatchGAN"). The $D_{M1}$ and $D_{M2}$ try to classify if each $N \times N$ patch in an image is a clean image (real) or a decomposed one (fake). This type of architecture can be equivalently implemented by building a fully convolutional network with $N \times N$ perceptive fields, which is more computationally efficient since the responses of all patches can be obtained by taking only one time of forward propagation. We express the objective of $D_{M1}$ and $D_{M2}$ as follows: + +$$ +\begin{array}{l} \mathcal {L} _ {M i} (G, D _ {M i}) = E _ {(\hat {x} _ {i}, y) \sim p _ {i} (\hat {x} _ {i}, y)} \left\{\log D _ {M i} (\hat {x} _ {i} | y) \right\} \tag {6} \\ + E _ {\left(x _ {i}, y\right) \sim p _ {i} \left(x _ {i}, y\right)} \left\{\log \left(1 - D _ {M i} \left(x _ {i} \mid y\right)\right) \right\}, \\ \end{array} +$$ + +where $i = 1,2$ . Our final objective function is defined as follows: + +$$ +\begin{array}{l} \mathcal {L} (G, D _ {C}, D _ {M i}) = \mathcal {L} _ {c r o s s} (G) + \beta_ {C} \mathcal {L} _ {c r i t i c} (G, D _ {C}) \\ + \beta_ {M} \sum_ {i = 1, 2} \mathcal {L} _ {M i} (G, D _ {M i}) \tag {7} \\ \end{array} +$$ + +![](images/87d211c1de9a41c48d775b05426994a617d32fda4d58c630b1578a51919e7b9a.jpg) +Input + +![](images/b06e42b53cf4c4164ffb4203a2c9132d784f51f40a8906fbe696d33be219e5d2.jpg) + +![](images/1ded3b540cfe61b864544d225c102c67cab9cf9c28657367a6b0d40fdf5445d1.jpg) + +![](images/ca166a0c47cb7ec6e3ca4c11c10f823009937de7e589fd02b6b004ff533d2562.jpg) + +![](images/18da24a8cf1fc4b0e89bdc857a1e3832265acc7b2f9889c76f78a856cf390a90.jpg) + +![](images/0cb287938f9a55c88f4d2793fc4446c67222335284a21ab469c9f2cf83e31bc9.jpg) + +![](images/156545ad15c4ef668ebbe828b17de1e9c773425d8d60ec7ac79e48a12e6609ab.jpg) + +![](images/8aba15cdc1f860f5a1f5ff957fee1ef54abf02a30d5a93ffd7eb446971c57279.jpg) +Input + +![](images/4c548e74999fa2601fd33cdcda0d963952ea950201ff784c25c52edbb1293574.jpg) + +![](images/487637e4a5595bd50bc71506e8f0bcc6b1b1df25a3e7fa3a336c6360ffaea4d9.jpg) +(a) Levin et al. + +![](images/11e675cf83de630c9d01e3f81cd47b034a05eafaa44edd07a24f7775f24a2241.jpg) + +![](images/e9fc38a974a3b6f51fa12d59c59ef8153631457f87a74d25019e5258b724af8e.jpg) +(b) Double-DIP + +![](images/d0b3e7eba33d16195e425db32a5301498ef9621d690ecbd4a4e9a576a8227da5.jpg) + +![](images/ecdc897f8fddc94a1c176a3357be44aacacc7a8ac5185e5b5e54a62bc1e9c0cb.jpg) +(c) Ours +Figure 4: A comparison between our method and two image separation methods: Double-DIP [17] and a user-assisted framework proposed by Levin et al. [35]. Check out our supplementary material for more separation results. + +where $\beta_{C} > 0$ and $\beta_{M} > 0$ control the balance between the different components of the objective. We aim to solve: + +$$ +G ^ {\star} = \arg \min _ {G} \max _ {D _ {C}, D _ {M i}} \mathcal {L} (G, D _ {C}, D _ {M i}), i = 1, 2. \tag {8} +$$ + +The networks $G$ , $D_{C}$ and $D_{Mi}$ thus can be alternatively updated in an end-to-end training process. + +# 3.4. Implementation Details + +We follow the configuration of the "UNet" [49] when designing the architecture of our separator $G$ . We build our $D_{C}$ , $D_{M1}$ and $D_{M2}$ as three standard FCNs with 4, 3, and 3 convolutional layers. The perceptive field of $D_{M1}$ and $D_{M1}$ is set to $N = 30$ . We resize the input of $D_{C}$ to a relatively small size, e.g., $64 \times 64$ , to capture the semantics of the whole image instead of adding more layers. We do not use batch-normalization in $G$ as it may introduce unexpected artifacts. As our default settings, we train our model for 200 epochs by using the Adam optimizer with batch_size = 2 and learning_rate = 0.0001. We set $\beta_{C} = \beta_{M} = 0$ for the first 10 epochs and set $\beta_{C} = \beta_{M} = 0.001$ for the rest epochs. For more implementation details, please refer to our supplementary material. + +# 4. Experimental Analysis + +We evaluate our methods on four tasks: 1) superimposed image separation, 2) image deraining, 3) image reflection removal, and 4) image shadow removal. + +
Dogs+Flwrs.LSUN
Double-DIP [17] (CVPR'19)14.70 / 0.66113.83 / 0.590
Levin et al. [35] (TPAMI'07)10.54 / 0.44410.46 / 0.366
Our method (tr. on ImageNet)23.32 / 0.80321.63 / 0.773
Our method (w/ default tr. set)25.51 / 0.84926.32 / 0.883
+ +Table 1: Comparisons (PSNR/SSIM) of different methods on mixed image separation: 1) Stanford-Dogs [31] + VGG-Flowers [45], 2) LSUN Classroom + LSUN Church [63]. To test on the cross-domain generalization ability of our method, we also train on ImageNet and test on the above datasets. Higher scores indicate better. + +# 4.1. Separating Superimposed Images + +We evaluate our method on two groups of well-known datasets: 1) Stanford-Dogs [31] + VGG-Flowers [45], 2) LSUN Classroom + LSUN Church [63]. During training phase, we randomly select two images $(\hat{x}_1, \hat{x}_2)$ from one group of the datasets and then linearly mix them as $y = \alpha \hat{x}_1 + (1 - \alpha) \hat{x}_2$ with a random linear mixing factor $\alpha$ from the range of [0.4, 0.6]. During testing, we set the mixing factor as a constant $\alpha = 0.5$ . All images are resized to 256x256 pixels. We follow the datasets' original train/test split when performing training and evaluation. For the LSUN dataset, due to its large number of images, we only train our method for 20 epochs. + +We compare our method with other two popular methods for single mixed image separation: the Double-DIP (CVPR'19) [17] and Levin's method (TPAMI'07) [35], where the former one is an unsupervised deep learning based method, and the latter one is designed based on image statistics and requires additional user-interactions. Fig. 4 shows two typical results of the above three methods. Table 1 shows their quantitative evaluations2. We use the Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity (SSIM) index [58] as two basic evaluation metrics. The accuracy is crossly computed between the outputs and their references. We record the best of the two scores as the final accuracy. Our method significantly outperforms the other two methods in terms of both visual quality and quantitative scores. As Double-DIP and Levin's methods do not require training data of specific domain, we also test on the cross-domain generalization ability of our method by training on ImageNet-1M ( $\sim$ 1.28M images, randomly mixed on 1K classes, with 6 training epochs) [6] and test on the above datasets. Note that this time we do not train specifically on their own training sets and our method again shows superiority over the other two methods. + +![](images/d92e7115dbd26013295eac77bfc4171f83317eab61ea927c9cf4b8e7dd976033.jpg) +(a) Input + +![](images/d430d60c059c75b0558308d36fd1d69f149d16e447b1b46bd3d30e414c78f4bf.jpg) +(b) with standard L1 loss + +![](images/e63b8331a5f22f8ac872c3a98d0ef652011662f2fc59fe1c22c63ab20948cff4.jpg) + +![](images/e31e68328ea4333e3423630badfd4e16f5f839ce50635ad27312a9efb5a0a28c.jpg) +(c) with crossroad L1 loss + +![](images/029c0ee20663f12ad51d878ea3242f27374322665bb95ad9f9a3ba2d4eb12ee2.jpg) + +![](images/0aa789d45d2eb0b664b08047d273195ed1139ed7ff5eaae82dcdb89c5e3a07e6.jpg) +(a) Input + +![](images/7cc74b416ecddbc92e40c90c7270021979551491c6c64924ad2bbb09f477bb98.jpg) +Figure 5: A comparison of image separation results with the standard $l_{1}$ loss and the proposed crossroad $l_{1}$ loss. + +![](images/e08832925f0f5e9f1401f09b695562a0f3d0353e987ca498bafa1306cac3297c.jpg) +(b) cross-L1 + Zhang-loss +Figure 6: A comparison of the results based on different image separation priors: Zhang's exclusion loss [67], Kurtosis [27], and the Separation Critic (ours). + +![](images/25635765ee5868334ed77c5dd538888331487822d59f5c277e4d90dddc285c44.jpg) + +![](images/dd07769bcc0dbc585a8ce2c07a291ff2c225f10aa46c7987c993420b7098531f.jpg) +(c) cross-L1 + Kurtosis + +![](images/43840e87074566ce2b406f177984a9ca47280495bc45668eea35a73fd3e374c3.jpg) + +![](images/d62ec00d7ed26212914d8830dc0da45649f18d378808e217b93277dabc03a6f4.jpg) +(d) cross-L1 + critic + +![](images/e24eeeba7de80ada0a36834d5118f7e83f1be2f0cbcd2c8a11b7ba5d37926265.jpg) + +![](images/9e31df130dec01352f4dbbf1a52391bf271cbc06a6aa0d2c6cd183af8b99a210.jpg) +(e) cross-L1 + critic + adv-pct + +
AblationPSNRSSIMPI
Ours (with standard l1 loss)16.260.676823.34
Ours (with cross-l1 loss)22.740.778221.92
+ +Table 2: A comparison of the image separation results with standard $l_{1}$ loss and the proposed crossroad $l_{1}$ loss on Stanford-Dogs dataset [31]. PSNR/SSIM: higher scores indicate better. PI: lower scores indicate better. + +
AblationPSNRSSIMPI
cross-l1 only17.340.669322.41
cross-l1 + Zhang's loss [67]17.770.684023.09
cross-l1 + kurtosis [27]18.020.714122.28
cross-l1 + Sep-Critic18.290.723122.16
cross-l1 + Sep-Critic + adv-pcpt.18.270.693821.97
+ +# 4.2. Controlled Experiments + +Analysis on the crossroad $l_{1}$ loss. To evaluate the importance of our crossroad $l_{1}$ loss, we replace it with a standard $l_{1}$ while keeping other settings unchanged. We train the above two models on the Stanford-Dogs [31]. Table 2 shows the evaluation results of the two models and Fig. 5 shows a group of visual comparisons. We can see our method clearly separates the two images while the standard $l_{1}$ fails to do that and encourages "averaged" outputs. + +Analysis on the adversarial losses. We compare our + +Table 3: Evaluation of decomposition results with different priors on Stanford-Dogs [31] + VGG-Flowers [45] datasets (with overexposure and noise). PSNR/SSIM: higher scores indicate better. PI: lower scores indicate better. + +
Rain100H [62]Rain800 [65]
LP [41] (CVPR'16) ‡15.05 / 0.42520.46 / 0.730
DDN [13] (CVPR'17) ‡22.26 / 0.69321.16 / 0.732
JORDER [62] (CVPR'17) ‡23.45 / 0.74922.29 / 0.792
RESCAN [39] (ECCV'18) ‡26.45 / 0.84624.09 / 0.841
DID [64] (CVPR'18) †25.00 / 0.754- / -
DAF-Net [23] (CVPR'19) †28.44 / 0.874- / -
PReNet [48] (CVPR'19) ‡29.46 / 0.899- / -
Our method30.85 / 0.93224.49 / 0.885
+ +Table 4: A comparison (PSNR / SSIM) of different deraining methods on two datasets: Rain100H [62] and Rain800 [65]. Results reported by: # [62], $\ddagger$ [39], $\dagger$ [23], $\mathbb{I}$ [48]. + +
DID [64]DDN1k [13]
LP [41] (CVPR'16) †22.75 / 0.83520.66 / 0.811
JORDER [62] (CVPR'17) †24.32 / 0.86222.26 / 0.841
DDN [13] (CVPR'17) †27.33 / 0.89825.63 / 0.885
JBO [71] (ICCV'17) †23.05 / 0.85222.45 / 0.836
DID [67] (CVPR'18) †27.95 / 0.90926.07 / 0.909
SPANet [55] (CVPR'19) #30.05 / 0.934- / -
Our method31.67 / 0.94227.91 / 0.893
+ +Table 5: A comparison (PSNR / SSIM) of different deraining methods. All methods are trained on the training set of DID [64] and then tested on the test sets of DID and DDN1k [13]. Results reported by: † [64], # [55]. + +method with different decomposition priors on Stanford-Dogs [31] + VGG-Flowers [45] datasets. In addition to the linear mixing inputs, we also apply overexposure and noises to increase the separation difficulties. To better evaluate the perceptual quality, we introduce another metric called Perception Index (PI) [3]. The PI was originally introduced as a no-reference image quality assessment method based on the low-level image statistics and is recently widely used for evaluating super-resolution results [3, 56]. In Fig. 6 and Table 3, we compare our adversarial losses with the exclusion loss [17, 67] and the Kurtosis [27]. As we can see, the integration of our adversarial losses yields noticeable improvements in the output quality. We found the exclusion loss encourages blurred output and it is hard to balance it with other losses. We also found the Kurtosis may introduce a slight color-shift on its outputs. + +# 4.3. Application: Deraining + +We conduct our deraining experiments on several datasets: Rain100H [62], Rain800 [65], and DID [64]. To better test the generalization ability of our method, we follow Zhang et al. [64] to train our method on DID [64], and then randomly sample 1,000 images from the dataset [13] as another testing set, denoted as DDN1k. Given a rainy input image, we use its clean background and the rain streak + +![](images/275af9ffc1ee088f705a2aa3a14732ac21e7dcc601f001547aca525fc3ea1bf1.jpg) + +![](images/3129dbd6cdd68722ab04f0c9bf7698b09dbafc90f10eceea6cad67ddd35bcddb.jpg) + +![](images/83c57ddb1be3040f326210b1bdbf66d6bd7d9f61502e80cd83d721a2b5c82c2c.jpg) + +![](images/b7a33e9b813edc4d5ba2c4c730d3af5922649f309658046cb60163a7c8ad3b06.jpg) + +![](images/b95496994085dc0b5decfefcceca0bf6498e6124dc7a7d1b8b526d56a5b7c6e3.jpg) + +![](images/1d06b9ab16fcf832c162e68395ab65f9100b49ca668e92d2e29b0ab0433dce84.jpg) +(a) Input + +![](images/798b9b0058888f2900a2965e5cac23d65e636639704567b8a8917ffa487b59be.jpg) +(b) Ground truth + +![](images/b66d0057c4ef4e89a983e3beb4972a6417264fd38360e12a2718e1f80fff6e0c.jpg) +(d) PReNet +Figure 7: Deraining results of PReNet [48] (CVPR'19) and our method on the Rain100H [62] dataset. Our method encourages fewer artifacts than PReNet. Also, the rain-streak map can be well-estimated by using our method. As a comparison, the PReNet ignores this part of the output. + +![](images/60a2fe0a7d62c84ed308136e8a5c029c76b0f1a49357d01d0731a25897a663a2.jpg) +(e) Ours (output 1) + +![](images/9228b7c415839989cc5d6ca0239b5f39cbe9ec3afe0386b36c8f522e228e20c8.jpg) +(f) Ours (output 2) + +
MethodReflection Removal Dataset [59]
Focused setDefocused setGhosting setMethodDataset [60]
CEILNet [9] (ICCV'17) †19.524 / 0.74220.122 / 0.73519.685 / 0.753Li & Brown [40] (CVPR'14) ¶16.46 / 0.745
Zhang et al. [67] (ICCV'18) †17.090 / 0.71218.108 / 0.75817.882 / 0.738SIRP [2] (CVPR'17) ¶19.18 / 0.760
BDN [60] (ECCV'18) †14.258 / 0.63214.053 / 0.63914.786 / 0.660CEILNet [9] (ICCV'17) ¶19.80 / 0.782
RmNet [59] (CVPR'19) †21.064 / 0.77022.896 / 0.84021.008 / 0.780BDN [60] (ECCV'18) ¶23.11 / 0.835
Our method22.809 / 0.87123.195 / 0.89123.266 / 0.881Our method23.18 / 0.877
+ +![](images/e135bf91ec1a5ee5d79d522826caff3c2f12be58fc81335bfd335286cd4a1a33.jpg) +Figure 8: Deraining results of our method on some real-world rain images [65]. 1st row: input. 2nd row: output. + +map as our ground truth references. Since Rain800 and DID do not provide rain streak maps, we simply set the ground truth of our second output as a "zero image" when training on these two datasets. In all our following experiments, we set $\beta_{C} = \beta_{M} = 0.0001$ , and set the input/output size of our separator $G$ to $512\times 512$ pixels. + +We compare with more than five sota deraining methods, including RESCAN (ECCV'18) [39], DID (CVPR'18) [64], DAF-Net (CVPR'19) [23], PReNet (CVPR'19) [48], SPANet (CVPR'19) [55], etc. Table 4 and Table 5 show the deraining results of these methods. Our method outperforms other sota methods in most entries. Fig. 7 shows + +Table 6: Reflection removal results (PSNR / SSIM) of different methods on two challenging datasets [59] and [60]. In dataset [59], the images are nonlinearly synthesized with three types of reflections: "focused", "defocused", and "ghosting". We achieve the best results in all experimental entries. Results reported by: † [59], ¶ [60]. + +
Dataset [67]
Li & Brown [40] (CVPR'14) *18.29 / 0.750
CEILNet [9] (ICCV'17) *19.04 / 0.762
Zhang et al. [67] (ICCV'18) *21.30 / 0.821
Our method22.36 / 0.846
+ +Table 7: Reflection removal results (PSNR / SSIM) of different methods on dataset [67]. * results reported by [67]. + +two examples from the dataset Rain100H with our method and PReNet (CVPR'19) [48]. Our method encourages less artifacts. Another advantage of our method is that the rain-streak map can be also estimated. As a comparison, the PReNet ignores this part of output. Fig. 8 shows a group of our deraining results on some real-world rain images. + +# 4.4. Application: Image Reflection Removal + +We test our method on two large scale datasets for reflection removal [59, 60]. The dataset [60] consists of over 50,000 images which are synthesized by mixing their transmission layers and reflection layers (linear mixture + Gaussian blur). The dataset [59] consists of 12,000 images with three types of reflections: "focused", "defocused", + +![](images/67da4c387f1c107cd894194642eb4aed6a4da01d6bc79ab54d9a557a3120b5cd.jpg) +(d) Input + +![](images/ebf42496b402b7681c03754d62064e138f8abd59f71d8a37af7c0d704d94d2b1.jpg) +(b) Ground truth + +![](images/5a797069b351d16a7f01da235c98aa2e7b8c0c68f2bf16b056be3f29f001fe07.jpg) +(d) BDN + +![](images/9e09dc1c13167a313b409639f8e31d7960c1219b2f4ec5a922dd08ef6672414a.jpg) +(e) RmNet + +![](images/8c4b1b45d988feb9d9df1a7dfc47951e832668e349e781f11a7d621e6330366f.jpg) +(f) Ours + +![](images/bdd0183f2387f739e860eaf4e5fc58584639736fbe1418af18595152fdfb51c8.jpg) +Figure 9: Results of different reflection removal methods: BDN [60] (ECCV'18), RmNet [59] (CVPR'19), and our method on a real-world reflection image from the dataset [67]. + +![](images/906b47a5a5118f6b8b580b538f159e60b44c3066f00b24ec6212f975057d9389.jpg) +Figure 10: Reflection removal results of our method on the BDN dataset [60]. 1st row: input. 2nd row: our output. +Figure 11: Results of our method and DSC [22] (TPAMI19) on two datasets: ISTD [54] (1st row), SRD [46] (2nd row). + +and “ghosting”, which are synthesized by using adversarial training. When we train our model, the transmission layers are used as the reference for our first output. We discard the synthesized reflection in our second output since it cannot capture ground truth reflections. We compare with several sota reflection removal methods, including the method of Zhang et al. (ICCV'18) [67], BDN (ECCV'18) [60], RmNet (CVPR'19) [59], etc. Table 6 shows the quantitative evaluations of these methods. Note that although RmNet [59] uses auxiliary images [53, 67] during training, we still achieve the best results in all experimental entries. We also test on a set of real-world reflection images [67]. We train our model on the synthetic training set [67] and then evaluate on its real-world testing set. Fig. 9 and Table 7 show some comparison results. + +# 4.5. Application: Shadow Removal + +In this experiment, we test our method on two shadow removal datasets: ISTD [54] and SRD [46]. The two datasets consist of 1,870 and 3,088 shadow/shadow-free image pairs + +
ISTD [54]SRD [46]
Yang et al. [61] (TIP'12) *†15.6322.57
Guo et al. [21] (TPAMI'12) *†9.30012.60
Gong et al. [18] (BMVC'14) *†8.5308.730
DeshadowNet [46] (CVPR'17) ¶†7.8306.640
DSC [22] (TPAMI19) ¶†7.1006.210
ST-CGAN [54] (CVPR'18) *7.470-
ARGAN [8] (CVPR'19) ¶6.680-
Our method6.5665.823
+ +Table 8: Shadow removal results of different methods on ISTD [54] dataset and SRD [46] dataset. We follow the evaluation metric introduced by Guo et al. (lower is better). Results reported by: * [54], † [22], ¶ [8]. + +that captured in real-world environments. We compare our methods with some sota shadow removal methods, including DSC (TPAMI19) [22], ST-CGAN (CVPR'18) [54], and ARGAN (CVPR'19) [8]. Table 8 shows the evaluation results of these methods. We do not compare ST-CGAN and ARGAN on SRD [46] because the authors did not report their accuracy on this dataset and the code has not been released yet. We follow the evaluation metric introduced by Guo et al. [21], where a lower score indicates a better result. Fig. 11 gives an comparison example of our method and DSC [22] on the above two datasets. + +# 5. Conclusion + +We propose a unified framework for single superimposed image separation - a group of challenging tasks in computer vision and signal processing field. Different from the previous methods that are either statistically or empirically designed, we shed light on the possibilities of the adversarial training for this task. Without specific tuning, our method achieves the state of the art results on multiple tasks, including image deraining, image reflection removal, and image shadow removal. In our future work, we will focus on some more general image separation tasks (e.g., on ImageNet) and also the possibility of speech signal separation by using our method. + +# References + +[1] Eli Arbel and Hagit Hel-Or. Shadow removal using intensity surfaces and texture anchor points. IEEE transactions on pattern analysis and machine intelligence, 33(6):1202-1216, 2010. +[2] Nikolaos Arvanitopoulos, Radhakrishna Achanta, and Sabine Susstrunk. Single image reflection suppression. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4498-4506, 2017. +[3] Yochai Blau, Roey Mechrez, Radu Timofte, Tomer Michaeli, and Lihi Zelnik-Manor. The 2018 pirm challenge on perceptual image super-resolution. In Proceedings of the European Conference on Computer Vision (ECCV), pages 0–0, 2018. +[4] Yi Chang, Luxin Yan, and Sheng Zhong. Transformed low-rank model for line pattern noise removal. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017. +[5] Andrzej Cichocki and Shun-ichi Amari. Adaptive blind signal and image processing: learning algorithms and applications, volume 1. John Wiley & Sons, 2002. +[6] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248-255. IEEE, 2009. +[7] Emily L Denton, Soumith Chintala, Rob Fergus, et al. Deep generative image models using a laplacian pyramid of adversarial networks. In Advances in neural information processing systems, pages 1486-1494, 2015. +[8] Bin Ding, Chengjiang Long, Ling Zhang, and Chunxia Xiao. Argan: Attentive recurrent generative adversarial network for shadow detection and removal. In The IEEE International Conference on Computer Vision (ICCV), October 2019. +[9] Qingnan Fan, Jiaolong Yang, Gang Hua, Baoquan Chen, and David Wipf. A generic deep architecture for single image reflection removal and image smoothing. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017. +[10] Graham D Finlayson, Mark S Drew, and Cheng Lu. Entropy minimization for shadow removal. International Journal of Computer Vision, 85(1):35-57, 2009. +[11] Graham D Finlayson, Steven D Hordley, Cheng Lu, and Mark S Drew. On the removal of shadows from images. IEEE transactions on pattern analysis and machine intelligence, 28(1):59-68, 2005. +[12] Xueyang Fu, Jiabin Huang, Xinghao Ding, Yinghao Liao, and John Paisley. Clearing the skies: A deep network architecture for single-image rain removal. IEEE Transactions on Image Processing, 26(6):2944-2956, 2017. +[13] Xueyang Fu, Jiabin Huang, Delu Zeng, Yue Huang, Xinghao Ding, and John Paisley. Removing rain from single images via a deep detail network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3855-3863, 2017. +[14] Kun Gai, Zhenwei Shi, and Changshui Zhang. Blindly separating mixtures of multiple layers with spatial shifts. In 2008 IEEE Conference on Computer Vision and Pattern Recognition, pages 1-8. IEEE, 2008. +[15] Kun Gai, Zhenwei Shi, and Changshui Zhang. Blind separation of superimposed images with unknown motions. In 2009 IEEE Conference on Computer Vision and Pattern Recogni + +tion, pages 1881-1888. IEEE, 2009. +[16] Kun Gai, Zhenwei Shi, and Changshui Zhang. Blind separation of superimposed moving images using image statistics. IEEE transactions on pattern analysis and machine intelligence, 34(1):19-32, 2011. +[17] Yosef Gandelsman, Assaf Shocher, and Michal Irani. "double-dip": Unsupervised image decomposition via coupled deep-image-priors. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[18] Han Gong and Darren Cosker. Interactive shadow removal and ground truth for variable scene categories. In BMVC, 2014. +[19] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014. +[20] Shuhang Gu, Deyu Meng, Wangmeng Zuo, and Lei Zhang. Joint convolutional analysis and synthesis sparse representation for single image layer separation. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017. +[21] Ruiqi Guo, Qieyun Dai, and Derek Hoiem. Paired regions for shadow detection and removal. IEEE transactions on pattern analysis and machine intelligence, 35(12):2956-2967, 2012. +[22] X Hu, CW Fu, L Zhu, J Qin, and PA Heng. Direction-aware spatial context features for shadow detection and removal. IEEE transactions on pattern analysis and machine intelligence, 2019. +[23] Xiaowei Hu, Chi-Wing Fu, Lei Zhu, and Pheng-Ann Heng. Depth-attentional features for single-image rain removal. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[24] Xiaowei Hu, Yitong Jiang, Chi-Wing Fu, and Pheng-Ann Heng. Mask-shadowgan: Learning to remove shadows from unpaired data. In The IEEE International Conference on Computer Vision (ICCV), October 2019. +[25] Xiang Huang, Gang Hua, Jack Tumblin, and Lance Williams. What characterizes a shadow boundary under the sun and sky? In 2011 International Conference on Computer Vision, pages 898-905. IEEE, 2011. +[26] Aapo Hyvarinen and Erkki Oja. A fast fixed-point algorithm for independent component analysis. Neural computation, 9(7):1483-1492, 1997. +[27] Aapo Hyvarinen and Erkki Oja. Independent component analysis: algorithms and applications. Neural networks, 13(4-5):411-430, 2000. +[28] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1125-1134, 2017. +[29] Li-Wei Kang, Chia-Wen Lin, and Yu-Hsiang Fu. Automatic single-image-based rain streaks removal via image decomposition. IEEE Transactions on Image Processing, 21(4):1742-1755, 2011. +[30] Salman H Khan, Mohammed Bennamoun, Ferdous Sohel, and Roberto Togneri. Automatic shadow detection and removal from a single image. IEEE transactions on pattern analysis and machine intelligence, 38(3):431-446, 2015. + +[31] Aditya Khosla, Nityananda Jayadevaprakash, Bangpeng Yao, and Fei-Fei Li. Novel dataset for fine-grained image categorization: Stanford dogs. In Proc. CVPR Workshop on Fine-Grained Visual Categorization (FGVC), volume 2, 2011. +[32] Jean-François Lalonge, Alexei A Efros, and Srinivasa G Narasimhan. Detecting ground shadows in outdoor consumer photographs. In European conference on computer vision, pages 322-335. Springer, 2010. +[33] Hieu Le and Dimitris Samaras. Shadow removal via shadow image decomposition. In The IEEE International Conference on Computer Vision (ICCV), October 2019. +[34] Christian Ledig, Lucas Theis, Ferenc Huszár, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, et al. Photorealistic single image super-resolution using a generative adversarial network. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4681-4690, 2017. +[35] Anat Levin and Yair Weiss. User assisted separation of reflections from a single image using a sparsity prior. IEEE Transactions on Pattern Analysis and Machine Intelligence, 29(9):1647-1654, 2007. +[36] Anat Levin, Assaf Zomet, and Yair Weiss. Learning to perceive transparency from the statistics of natural scenes. In Advances in Neural Information Processing Systems, pages 1271-1278, 2003. +[37] Anat Levin, Assaf Zomet, and Yair Weiss. Separating reflections from a single image using local features. In Proceedings of the 2004 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2004. CVPR 2004., volume 1, pages I-I. IEEE, 2004. +[38] Ruoteng Li, Loong-Fah Cheong, and Robby T. Tan. Heavy rain image restoration: Integrating physics model and conditional adversarial learning. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[39] Xia Li, Jianlong Wu, Zhouchen Lin, Hong Liu, and Hongbin Zha. Recurrent squeeze-and-excitation context aggregation net for single image deraining. In The European Conference on Computer Vision (ECCV), September 2018. +[40] Yu Li and Michael S. Brown. Single image layer separation using relative smoothness. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2014. +[41] Yu Li, Robby T Tan, Xiaojie Guo, Jiangbo Lu, and Michael S Brown. Rain streak removal using layer priors. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2736-2744, 2016. +[42] Guangcan Liu, Zhouchen Lin, Shuicheng Yan, Ju Sun, Yong Yu, and Yi Ma. Robust recovery of subspace structures by low-rank representation. IEEE transactions on pattern analysis and machine intelligence, 35(1):171-184, 2012. +[43] Yu Luo, Yong Xu, and Hui Ji. Removing rain from a single image via discriminative sparse coding. In Proceedings of the IEEE International Conference on Computer Vision, pages 3397-3405, 2015. +[44] Daiqian Ma, Renjie Wan, Boxin Shi, Alex C. Kot, and Ling-Yu Duan. Learning to jointly generate and separate reflections. In The IEEE International Conference on Computer Vision (ICCV), October 2019. + +[45] M-E Nilsback and Andrew Zisserman. A visual vocabulary for flower classification. In 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06), volume 2, pages 1447-1454. IEEE, 2006. +[46] Liangqiong Qu, Jiandong Tian, Shengfeng He, Yandong Tang, and Rynson W. H. Lau. Deshadownet: A multicontext embedding deep network for shadow removal. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. +[47] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. +[48] Dongwei Ren, Wangmeng Zuo, Qinghua Hu, Pengfei Zhu, and Deyu Meng. Progressive image deraining networks: A better and simpler baseline. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[49] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pages 234-241. Springer, 2015. +[50] Li Shen, Teck Wee Chua, and Karianto Leman. Shadow optimization from structured deep edge detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2067-2074, 2015. +[51] YiChang Shih, Dilip Krishnan, Fredo Durand, and William T Freeman. Reflection removal using ghosting cues. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3193-3201, 2015. +[52] Yago Vicente, F Tomas, Minh Hoai, and Dimitris Samaras. Leave-one-out kernel optimization for shadow detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 3388-3396, 2015. +[53] Renjie Wan, Boxin Shi, Ling-Yu Duan, Ah-Hwee Tan, and Alex C Kot. Benchmarking single-image reflection removal algorithms. In Proceedings of the IEEE International Conference on Computer Vision, pages 3922-3930, 2017. +[54] Jifeng Wang, Xiang Li, and Jian Yang. Stacked conditional generative adversarial networks for jointly learning shadow detection and shadow removal. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. +[55] Tianyu Wang, Xin Yang, Ke Xu, Shaozhe Chen, Qiang Zhang, and Rynson W.H. Lau. Spatial attentive single-image deraining with a high quality real rain dataset. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[56] Xintao Wang, Ke Yu, Shixiang Wu, Jinjin Gu, Yihao Liu, Chao Dong, Yu Qiao, and Chen Change Loy. Esrgan: Enhanced super-resolution generative adversarial networks. In Proceedings of the European Conference on Computer Vision (ECCV), pages 0-0, 2018. +[57] Yinglong Wang, Shuaicheng Liu, Chen Chen, and Bing Zeng. A hierarchical approach for rain or snow removing in a single color image. IEEE Transactions on Image Processing, 26(8):3936-3950, 2017. +[58] Zhou Wang, Alan C Bovik, Hamid R Sheikh, Eero P Simon + +celli, et al. Image quality assessment: from error visibility to structural similarity. IEEE transactions on image processing, 13(4):600-612, 2004. +[59] Qiang Wen, Yinjie Tan, Jing Qin, Wenxi Liu, Guoqiang Han, and Shengfeng He. Single image reflection removal beyond linearity. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[60] Jie Yang, Dong Gong, Lingqiao Liu, and Qinfeng Shi. Seeing deeply and bidirectionally: A deep learning approach for single image reflection removal. In The European Conference on Computer Vision (ECCV), September 2018. +[61] Qingxiong Yang, Kar-Han Tan, and Narendra Ahuja. Shadow removal using bilateral filtering. IEEE Transactions on Image processing, 21(10):4361-4368, 2012. +[62] Wenhan Yang, Robby T. Tan, Jiashi Feng, Jiaying Liu, Zongming Guo, and Shuicheng Yan. Deep joint rain detection and removal from a single image. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. +[63] Fisher Yu, Ari Seff, Yinda Zhang, Shuran Song, Thomas Funkhouser, and Jianxiong Xiao. Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop. arXiv preprint arXiv:1506.03365, 2015. +[64] He Zhang and Vishal M. Patel. Density-aware single image de-raining using a multi-stream dense network. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. +[65] He Zhang, Vishwanath Sindagi, and Vishal M Patel. Image de-raining using a conditional generative adversarial network. arXiv preprint arXiv:1701.05957, 2017. +[66] Ling Zhang, Qing Zhang, and Chunxia Xiao. Shadow remover: Image shadow removal based on illumination recovering optimization. IEEE Transactions on Image Processing, 24(11):4623-4636, 2015. +[67] Xuaner Zhang, Ren Ng, and Qifeng Chen. Single image reflection separation with perceptual losses. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. +[68] Quanlong Zheng, Xiaotian Qiao, Ying Cao, and Rynson W.H. Lau. Distraction-aware shadow detection. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[69] Jiejie Zhu, Kegan GG Samuel, Syed Z Masood, and Marshall F Tappen. Learning to recognize shadows in monochromatic natural images. In 2010 IEEE Computer Society conference on computer vision and pattern recognition, pages 223-230. IEEE, 2010. +[70] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 2223-2232, 2017. +[71] Lei Zhu, Chi-Wing Fu, Dani Lischinski, and Pheng-Ann Heng. Joint bi-layer optimization for single-image rain streak removal. In Proceedings of the IEEE international conference on computer vision, pages 2526–2534, 2017. \ No newline at end of file diff --git a/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/images.zip b/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6a582d0c664527af0dcd3544b7d0f8a065c075c4 --- /dev/null +++ b/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99e377b74a97fa33228a45fb3d77de3b00cf241479421ef031d6ab871cd37e79 +size 932623 diff --git a/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/layout.json b/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..071d40a8ceadf7f81c10af798a072dd7fe73af1e --- /dev/null +++ b/deepadversarialdecompositionaunifiedframeworkforseparatingsuperimposedimages/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:529635e5df60aa94c6f9fc4f90f5ef87f361041855831494968bc3f73feecea3 +size 566888 diff --git a/deepcapmonocularhumanperformancecaptureusingweaksupervision/1c7196bb-1ddf-4afe-84bc-4ecfd980478a_content_list.json b/deepcapmonocularhumanperformancecaptureusingweaksupervision/1c7196bb-1ddf-4afe-84bc-4ecfd980478a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..6b0e521e1466717062febb24db00b75e536c195f --- /dev/null +++ b/deepcapmonocularhumanperformancecaptureusingweaksupervision/1c7196bb-1ddf-4afe-84bc-4ecfd980478a_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a01a5594aad65dd089626f991c66c9fa6147b460ffada0fce567f34edeb28b43 +size 96952 diff --git a/deepcapmonocularhumanperformancecaptureusingweaksupervision/1c7196bb-1ddf-4afe-84bc-4ecfd980478a_model.json b/deepcapmonocularhumanperformancecaptureusingweaksupervision/1c7196bb-1ddf-4afe-84bc-4ecfd980478a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e372b8c3c39c2d93f044554adc3c17ffaba588ec --- /dev/null +++ b/deepcapmonocularhumanperformancecaptureusingweaksupervision/1c7196bb-1ddf-4afe-84bc-4ecfd980478a_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1cf9d21860f99b9900651836c90575d32076971cb705d9599f6be56075213f1 +size 126325 diff --git a/deepcapmonocularhumanperformancecaptureusingweaksupervision/1c7196bb-1ddf-4afe-84bc-4ecfd980478a_origin.pdf b/deepcapmonocularhumanperformancecaptureusingweaksupervision/1c7196bb-1ddf-4afe-84bc-4ecfd980478a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f635b3662c8b6b705261414c36f6d007ba54d840 --- /dev/null +++ b/deepcapmonocularhumanperformancecaptureusingweaksupervision/1c7196bb-1ddf-4afe-84bc-4ecfd980478a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aab2bbb034e331c0a11de389cd657d5d890d6d49926f30f48b30a1b7b3e6f22d +size 2500870 diff --git a/deepcapmonocularhumanperformancecaptureusingweaksupervision/full.md b/deepcapmonocularhumanperformancecaptureusingweaksupervision/full.md new file mode 100644 index 0000000000000000000000000000000000000000..1f75a28ab4d01b7d6932ec157e07904bb7c84db0 --- /dev/null +++ b/deepcapmonocularhumanperformancecaptureusingweaksupervision/full.md @@ -0,0 +1,422 @@ +# DeepCap: Monocular Human Performance Capture Using Weak Supervision + +Marc Habermann1,2 Weipeng Xu1,2 Michael Zollhoefer3 Gerard Pons-Moll1,2 Christian Theobalt1,2 + +$^{1}$ Max Planck Institute for Informatics, $^{2}$ Saarland Informatics Campus, $^{3}$ Stanford University + +# Abstract + +Human performance capture is a highly important computer vision problem with many applications in movie production and virtual/augmented reality. Many previous performance capture approaches either required expensive multi-view setups or did not recover dense space-time coherent geometry with frame-to-frame correspondences. We propose a novel deep learning approach for monocular dense human performance capture. Our method is trained in a weakly supervised manner based on multi-view supervision completely removing the need for training data with 3D ground truth annotations. The network architecture is based on two separate networks that disentangle the task into a pose estimation and a non-rigid surface deformation step. Extensive qualitative and quantitative evaluations show that our approach outperforms the state of the art in terms of quality and robustness. + +# 1. Introduction + +Human performance capture, i.e., the space-time coherent 4D capture of full pose and non-rigid surface deformation of people in general clothing, revolutionized the film and gaming industry in recent years. Apart from visual effects, it has many use cases in generating personalized dynamic virtual avatars for telepresence, virtual try-on, mixed reality, and many other areas. In particular for the latter applications, being able to performance capture humans from monocular video would be a game changer. The majority of established monocular methods only captures articulated motion (including hands or sparse facial expression at most). However, the monocular tracking of dense full-body deformations of skin and clothing, in addition to articulated pose, which play an important role in producing realistic virtual characters, is still at its infancy. + +In literature, multi-view marker-less methods [13, 14, 15, 17, 24, 29, 50, 55, 81, 82, 86, 64, 65] have shown compelling results. However, these approaches rely on well-controlled multi-camera studios (typically with green screen), which prohibits them from being used for location shootings of films and telepresence in living spaces. + +Recent monocular human modeling approaches have shown compelling reconstructions of humans, including clothing, hair and facial details [70, 99, 2, 3, 9, 60, 52]. + +![](images/15dbc9f42688fd1f05798b75fa4cbdbf25318e3e43ab9fbd4070e860eccce782.jpg) +Input Image +ay +Figure 1. We present the first learning-based approach for dense monocular human performance capture using weak multi-view supervision that not only predicts the pose but also the space-time coherent non-rigid deformations of the model surface. + +![](images/cdc82402ea5f3c07453334d6aadb1fece4426e6c7c55564364cfb39c8f350d99.jpg) + +![](images/0f3a38b70bcf3c779c7077961eb220bf1377465977dea801bb173ea5c9e9dc7c.jpg) +Input Image +Overlay + +Image + +![](images/0a4ae4e1f636e898ad4a7d160d9aad6cdcb573717361dbd7d00e9c3e7438d705.jpg) +3D Views + +Some directly regress voxels [28, 99] or the continuous occupancy of the surface [70]. Since predictions are pixel aligned, reconstructions have nice detail, but limbs are often missing, especially for difficult poses. Moreover, the recovered motion is not factorized into articulation and non-rigid deformation, which prevents the computer-graphics style control over the reconstructions that is required in many of the aforementioned applications. Importantly, surface vertices are not tracked over time, so no space-time coherent model is captured. Another line of work predicts deformations or displacements to an articulated template, which prevents missing limbs and allows more control [2, 9, 5, 67]. However, these works do not capture motion and the surface deformations. + +The state-of-the-art monocular human performance capture methods [89, 32] densely track the deformation of the surface. They leverage deep learning-based sparse keypoint detections and perform an expensive template fitting afterwards. In consequence, they can only non-rigidly fit to the input view and suffer from instability. By contrast, we present the first learning-based method that jointly infers the articulated and non-rigid 3D deformation parameters in a single feed-forward pass at much higher performance, accuracy and robustness. The core of our method is a CNN model which integrates a fully differentiable mesh template parameterized with pose and an embedded deformation graph. From a single image, our network predicts the skeletal pose, and the rotation and translation parameters for each node in the deformation graph. In stark contrast to implicit representations [70, 99, 22], our mesh-based + +method tracks the surface vertices over time, which is crucial for adding semantics, and for texturing and rendering in graphics. Further, by virtue of our parameterization, our model always produces a human surface without missing limbs, even during occlusions and out-of-plane motions. + +While previous methods [70, 99, 2, 9] rely on 3D ground truth for training, our method is weakly supervised from multi-view images. To this end, we propose a fully differentiable architecture which is trained in an analysis-by-synthesis fashion, without explicitly using any 3D ground truth annotation. Specifically, during training, our method only requires a personalized template mesh of the actor and a multi-view video sequence of the actor performing various motions. Then, our network learns to predict 3D pose and dense non-rigidly deformed surface shape by comparing its single image feed-forward predictions in a differentiable manner against the multi-view 2D observations. At test time, our method only requires a single-view image as input and produces a deformed template matching the actor's non-rigid motion in the image. In summary, the main technical contributions of our work are: + +- A learning-based 3D human performance capture approach that jointly tracks the skeletal pose and the non-rigid surface deformations from monocular images. +- A new differentiable representation of deforming human surfaces which enables training from multi-view video footage directly. + +Our new model achieves high quality dense human performance capture results on our new challenging dataset, demonstrating, qualitatively and quantitatively, the advantages of our approach over previous work. We experimentally show that our method produces reconstructions of higher accuracy and 3D stability, in particular in depth, than related work, also under difficult poses. + +# 2. Related Work + +In the following, we focus on related work in the field of dense 3D human performance capture and do not review work on sparse 2D pose estimation. + +Capture using Parametric Models. Monocular human performance capture is an ill-posed problem due to its high dimensionality and ambiguity. Low-dimensional parametric models can be employed as shape and deformation prior. First, model-based approaches leverage a set of simple geometric primitives [63, 74, 71, 54]. Recent methods employ detailed statistical models learned from thousands of high-quality 3D scans [6, 33, 59, 65, 51, 41, 45, 85, 35, 97, 10]. Deep learning is widely used to obtain 2D and/or 3D joint detections or 3D vertex positions that can be used to inform model fitting [37, 48, 53, 11, 46]. An alternative is to regress model parameters directly [42, 62, 43]. Beyond + +body shape and pose, recent models also include facial expressions and hand motion [61, 88, 40, 69] leading to very expressive reconstruction results. Since parametric body models do not represent garments, variation in clothing cannot be reconstructed, and therefore many methods recover the naked body shape under clothing [8, 7, 95, 90]. The full geometry of the actor can be reconstructed by non-rigidly deforming the base parametric model to better fit the observations [68, 3, 4]. But they can only model tight clothes such as T-shirts and pants, but not loose apparel which has a different topology than the body model, such as skirts. To overcome this problem, ClothCap [64] captures the body and clothing separately, but requires active multi-view setups. Physics based simulations have recently been leveraged to constrain tracking (SimulCap [78]), or to learn a model of clothing on top of SMPL (TailorNet [60]). Instead, our method is based on person-specific templates including clothes and employs deep learning to predict clothing deformation based on monocular video directly. + +Depth-based Template-free Capture. Most approaches based on parametric models ignore clothing. The other side of the spectrum are prior-free approaches based on one or multiple depth sensors. Capturing general non-rigidly deforming scenes [73, 31], even at real-time frame rates [57, 39, 31], is feasible, but only works reliably for small, controlled, and slow motions. Higher robustness can be achieved by using higher frame rate sensors [30, 47] or multi-view setups [91, 27, 58, 26, 96]. Techniques that are specifically tailored to humans increase robustness [93, 94, 92] by integrating a skeletal motion prior [93] or a parametric model [94, 84]. HybridFusion [98] additionally incorporates a sparse set of inertial measurement units. These fusion-style volumetric capture techniques [36, 1, 49, 23, 66] achieve impressive results, but do not establish a set of dense correspondences between all frames. In addition, such depth-based methods do not directly generalize to our monocular setting, have a high power consumption, and typically do not work well under sunlight. + +Monocular Template-free Capture. Quite recently, fueled by the progress in deep learning, many template-free monocular reconstruction approaches have been proposed. Due to their regular structure, many implicit reconstruction techniques [80, 99] make use of uniform voxel grids. DeepHuman [99] combines a coarse scale volumetric reconstruction with a refinement network to add high-frequency details. Multi-view CNNs can map 2D images to 3D volumetric fields enabling reconstruction of a clothed human body at arbitrary resolution [38]. SiCloPe [56] reconstructs a complete textured 3D model, including cloth, from a single image. PIFu [70] regresses an implicit surface representation that locally aligns pixels with the global context of the corresponding 3D object. Unlike voxel-based representations, this implicit per-pixel representation is more memory + +efficient. These approaches have not been demonstrated to generalize well to strong articulation. Furthermore, implicit approaches do not recover frame-to-frame correspondences which are of paramount importance for downstream applications, e.g., in augmented reality and video editing. In contrast, our method is based on a mesh representation and can explicitly obtain the per-vertex correspondences over time while being slightly less general. + +Template-based Capture. An interesting trade-off between being template-free and relying on parametric models are approaches that only employ a template mesh as prior. Historically, template-based human performance capture techniques exploit multi-view geometry to track the motion of a person [76]. Some systems also jointly reconstruct and obtain a foreground segmentation [13, 15, 50, 87]. Given a sufficient number of multi-view images as input, some approaches [21, 17, 24] align a personalized template model to the observations using non-rigid registration. All the aforementioned methods require expensive multi-view setups and are not practical for consumer use. Depth-based techniques enable template tracking from less cameras [100, 91] and reduced motion models [86, 29, 81, 50] increase tracking robustness. Recently, capturing 3D dense human body deformation just with a single RGB camera has been enabled [89] and real-time performance has been achieved [32]. However, their methods rely on expensive optimization leading either to very long per-frame computation times [89] or the need for two graphics cards [32]. Similar to them, our approach also employs a person-specific template mesh. But differently, our method directly learns to predict the skeletal pose and the non-rigid surface deformations. As shown by our experimental results, benefiting from our multi-view based self-supervision, our reconstruction accuracy significantly outperforms the existing methods. + +# 3. Method + +Given a single RGB video of a moving human in general clothing, our goal is to capture the dense deforming surface of the full body. This is achieved by training a neural network consisting of two components: As illustrated in Fig. 2, our pose network, PoseNet, estimates the skeletal pose of the actor in the form of joint angles from a monocular image (Sec. 3.2). Next, our deformation network, DefNet, regresses the non-rigid deformation of the dense surface, which cannot be modeled by the skeletal motion, in the embedded deformation graph representation (Sec. 3.3). To avoid generating dense 3D ground truth annotation, our network is trained in a weakly supervised manner. To this end, we propose a fully differentiable human deformation and rendering model, which allows us to compare the rendering of the human body model to the 2D image evidence and back-propagate the losses. For training, we first capture a video sequence in a calibrated multi-camera green screen + +studio (Sec. 3.1). Note that our multi-view video is only used during training. At test time we only require a single RGB video to perform dense non-rigid tracking. + +# 3.1. Template and Data Acquisition + +Character Model. Our method relies on a person-specific 3D template model. We first scan the actor with a 3D scanner [79] to obtain the textured mesh. Then, it is automatically rigged to a kinematic skeleton, which is parameterized with joint angles $\theta \in \mathbb{R}^{27}$ , the camera relative rotation $\alpha \in \mathbb{R}^3$ and translation $\mathbf{t} \in \mathbb{R}^3$ . To model the non-rigid surface deformation, we automatically build an embedded deformation graph $\mathcal{G}$ with $K$ nodes following [77]. The nodes are parameterized with Euler angles $\mathbf{A} \in \mathbb{R}^{K \times 3}$ and translations $\mathbf{T} \in \mathbb{R}^{K \times 3}$ . Similar to [32], we segment the mesh into different non-rigidity classes resulting in pervertex rigidity weights $s_i$ . This allows us to model varying deformation behaviors of different surface materials, e.g. skin deforms less than clothing (see Eq. 13). + +Training Data. To acquire the training data, we record a multi-view video of the actor doing various actions in a calibrated multi-camera studio with green screen. To provide weak supervision for the training, we first perform 2D pose detection on the sequences using OpenPose [19, 18, 72, 83] and apply temporal filtering. Then, we generate the foreground mask using color keying and compute the corresponding distance transform image $D_{f,c}$ [12], where $f \in [0,F]$ and $c \in [0,C]$ denote the frame index and camera index, respectively. During training, we randomly sample one camera view $c'$ and frame $f'$ for which we crop the recorded image with a bounding box, based on the 2D joint detections. The final training input image $I_{f',c'} \in \mathbb{R}^{256 \times 256 \times 3}$ is obtained by removing the background and augmenting the foreground with random brightness, hue, contrast and saturation changes. For simplicity, we describe the operation on frame $f'$ and omit the subscript $f'$ in following equations. + +# 3.2. Pose Network + +In our PoseNet, we use ResNet50 [34] pretrained on ImageNet [25] as backbone and modify the last fully connected layer to output a vector containing the joint angles $\theta$ and the camera relative root rotation $\alpha$ , given the input image $I_{c'}$ . Since generating the ground truth for $\theta$ and $\alpha$ is a nontrivial task, we propose weakly supervised training based on fitting the skeleton to multi-view 2D joint detections. + +Kinematics Layer. To this end, we introduce a kinematics layer as the differentiable function that takes the joint angles $\theta$ and the camera relative rotation $\alpha$ and computes the positions $\mathbf{P}_{c'} \in \mathbb{R}^{M \times 3}$ of the $M$ 3D landmarks attached to the skeleton (17 body joints and 4 face landmarks). Note that $\mathbf{P}_{c'}$ lives in a camera-root-relative coordinate system. In order to project the landmarks to other camera views, we + +![](images/b61b9b8f0b749573847086cdba6f245e78f91dc048b5f6a6671dd1f5be1f2db5.jpg) +Figure 2. Overview of our approach. Our method takes a single segmented image as input. First, our pose network, PoseNet, is trained to predict the joint angles and the camera relative rotation using sparse multi-view 2D joint detections as weak supervision. Second, the deformation network, DefNet, is trained to regress embedded graph rotation and translation parameters to account for non-rigid deformations. To train DefNet, multi-view 2D joint detections and silhouettes are used for supervision. + +need to transform $\mathbf{P}_{c'}$ to the world coordinate system: + +$$ +\mathbf {P} _ {m} = \mathbf {R} _ {c ^ {\prime}} ^ {T} \mathbf {P} _ {c ^ {\prime}, m} + \mathbf {t}, \tag {1} +$$ + +where $\mathbf{R}_{c'}$ is the rotation matrix of the input camera $c'$ and $\mathbf{t}$ is the global translation of the skeleton. + +Global Alignment Layer. To obtain the global translation $\mathbf{t}$ , we propose a global alignment layer that is attached to the kinematics layer. It localizes our skeleton model in the world space, such that the globally rotated landmarks $\mathbf{R}_{c'}^T\mathbf{P}_{c',m}$ project onto the corresponding detections in all camera views. This is done by minimizing the distance between the rotated landmarks $\mathbf{R}_{c'}^T\mathbf{P}_{c',m}$ and the corresponding rays cast from the camera origin $\mathbf{o}_c$ to the 2D joint detections: + +$$ +\sum_ {c} \sum_ {m} \sigma_ {c, m} \| \left(\mathbf {R} _ {c ^ {\prime}} ^ {T} \mathbf {P} _ {c ^ {\prime}, m} + \mathbf {t} - \mathbf {o} _ {c}\right) \times \mathbf {d} _ {c, m} \| ^ {2}, \tag {2} +$$ + +where $\mathbf{d}_{c,m}$ is the direction of a ray from camera $c$ to the 2D joint detection $\mathbf{p}_{c,m}$ corresponding to landmark $m$ : + +$$ +\mathbf {d} _ {c, m} = \frac {\left(\mathbf {E} _ {c} ^ {- 1} \tilde {\mathbf {p}} _ {c , m}\right) _ {x y z} - \mathbf {o} _ {c}}{\| \left(\mathbf {E} _ {c} ^ {- 1} \tilde {\mathbf {p}} _ {c , m}\right) _ {x y z} - \mathbf {o} _ {c} \|.} \tag {3} +$$ + +Here, $\mathbf{E}_c\in \mathbb{R}^{4\times 4}$ is the projection matrix of camera $c$ and $\tilde{\mathbf{p}}_{c,m} = (\mathbf{p}_{c,m},1,1)^T$ . Each point-to-line distance is weighted by the joint detection confidence $\sigma_{c,m}$ , which is set to zero if below 0.4. The minimization problem of Eq. 2 can be solved in closed form: + +$$ +\mathbf {t} = \mathbf {W} ^ {- 1} \sum_ {c, m} \mathbf {D} _ {c, m} \left(\mathbf {R} _ {c ^ {\prime}} ^ {T} \mathbf {P} _ {c ^ {\prime}, m} - \mathbf {o} _ {c}\right) + \mathbf {o} _ {c} - \mathbf {R} _ {c ^ {\prime}} ^ {T} \mathbf {P} _ {c ^ {\prime}, m}, \tag {4} +$$ + +where + +$$ +\mathbf {W} = \sum_ {c} \sum_ {m} \mathbf {I} - \mathbf {D} _ {c, m}. \tag {5} +$$ + +Here, $\mathbf{I}$ is the $3\times 3$ identity matrix and $\mathbf{D}_{c,m} = \mathbf{d}_{c,m}\mathbf{d}_{c,m}^{T}$ . Note that the operation in Eq. 4 is differentiable with respect to the landmark position $\mathbf{P}_{c'}$ . + +Sparse Keypoint Loss. Our 2D sparse keypoint loss for the PoseNet can be expressed as + +$$ +\mathcal {L} _ {\mathrm {k p}} (\mathbf {P}) = \sum_ {c} \sum_ {m} \lambda_ {m} \sigma_ {c, m} \| \pi_ {c} (\mathbf {P} _ {m}) - \mathbf {p} _ {c, m} \| ^ {2}, \tag {6} +$$ + +which ensures that each landmark projects onto the corresponding 2D joint detections $\mathbf{p}_{c,m}$ in all camera views. Here, $\pi_c$ is the projection function of camera $c$ and $\sigma_{c,m}$ is the same as in Eq. 2. $\lambda_{m}$ is a kinematic chain-based hierarchical weight which varies during training for better convergence (see the supplementary material for details). + +Pose Prior Loss. To avoid unnatural poses, we impose a pose prior loss on the joint angles + +$$ +\mathcal {L} _ {\text {l i m i t}} (\boldsymbol {\theta}) = \sum_ {i = 1} ^ {2 7} \Psi \left(\boldsymbol {\theta} _ {i}\right) \tag {7} +$$ + +$$ +\Psi (x) = \left\{ \begin{array}{l} {\left(x - \boldsymbol {\theta} _ {\max , i}\right) ^ {2}, \text {i f} x > \boldsymbol {\theta} _ {\max , i}} \\ {\left(\boldsymbol {\theta} _ {\min , i} - x\right) ^ {2}, \text {i f} x < \boldsymbol {\theta} _ {\min , i}} \\ {0, \text {o t h e r w i s e}} \end{array} \right., \tag {8} +$$ + +that encourages that each joint angle $\theta_{i}$ stays in a range $[\theta_{\min,i}, \theta_{\max,i}]$ depending on the anatomic constraints. + +# 3.3. Deformation Network + +With the skeletal pose from PoseNet alone, the non-rigid deformation of the skin and clothes cannot be fully explained. Therefore, we disentangle the non-rigid deformation and the articulated skeletal motion. DefNet takes the + +input image $I_{c'}$ and regresses the non-rigid deformation parameterized with rotation angles $\mathbf{A}$ and translation vectors $\mathbf{T}$ of the nodes of the embedded deformation graph. DefNet uses the same backbone architecture as PoseNet, while the last fully connected layer outputs a $6K$ -dimensional vector reshaped to match the dimensions of $\mathbf{A}$ and $\mathbf{T}$ . The weights of PoseNet are fixed while training DefNet. Again, we do not use direct supervision on $\mathbf{A}$ and $\mathbf{T}$ . Instead, we propose a deformation layer with differentiable rendering and use multi-view silhouette-based weak supervision. + +Deformation Layer. The deformation layer takes $\mathbf{A}$ and $\mathbf{T}$ from DefNet as input to non-rigidly deform the surface + +$$ +\mathbf {Y} _ {i} = \sum_ {k \in \mathcal {N} _ {\mathrm {v n}} (i)} w _ {i, k} \left(R \left(\mathbf {A} _ {k}\right) \left(\hat {\mathbf {V}} _ {i} - \mathbf {G} _ {k}\right) + \mathbf {G} _ {k} + \mathbf {T} _ {k}\right). \tag {9} +$$ + +Here, $\mathbf{Y},\hat{\mathbf{V}}\in \mathbb{R}^{N\times 3}$ are the vertex positions of the deformed and undeformed template mesh, respectively. $w_{i,k}$ are vertex-to-node weights, but in contrast to [77] we compute them based on geodesic distances. $\mathbf{G}\in \mathbb{R}^{K\times 3}$ are the node positions of the undeformed graph, $\mathcal{N}_{\mathrm{vn}}(i)$ is the set of nodes that influence vertex $i$ ,and $R(\cdot)$ is a function that converts the Euler angles to rotation matrices. We further apply the skeletal pose on the deformed mesh vertices to obtain the vertex positions in the input camera space + +$$ +\mathbf {V} _ {\mathrm {c} ^ {\prime}, i} = \sum_ {k \in \mathcal {N} _ {\mathrm {v n}} (i)} w _ {i, k} \left(R _ {\mathrm {s k}, k} (\boldsymbol {\theta}, \boldsymbol {\alpha}) \mathbf {Y} _ {i} + t _ {\mathrm {s k}, k} (\boldsymbol {\theta}, \boldsymbol {\alpha})\right), \tag {10} +$$ + +where the node rotation $R_{\mathrm{sk},k}$ and translation $t_{\mathrm{sk},k}$ are derived from the pose parameters using dual quaternion skinning [44]. Eq. 9 and Eq. 10 are differentiable with respect to pose and graph parameters. Thus, our layer can be integrated in the learning framework and gradients can be propagated to DefNet. So far, $\mathbf{V}_{c',i}$ is still rotated relative to the camera $c'$ and located around the origin. To bring them to global space, we apply the inverse camera rotation and the global translation, defined in Eq. 4, $\mathbf{V}_i = \mathbf{R}_{c'}^T\mathbf{V}_{c',i} + \mathbf{t}$ . + +Non-rigid Silhouette Loss. This loss encourages that the non-rigidly deformed mesh matches the multi-view silhouettes in all camera views. It can be formulated using the distance transform representation [12] + +$$ +\mathcal {L} _ {\mathrm {s i l}} (\mathbf {V}) = \sum_ {c} \sum_ {i \in \mathcal {B} _ {c}} \rho_ {c, i} \| D _ {c} \left(\pi_ {c} \left(\mathbf {V} _ {i}\right)\right) \| ^ {2}. \tag {11} +$$ + +Here, $\mathcal{B}_c$ is the set of vertices that lie on the boundary when the deformed 3D mesh is projected onto the distance transform image $D_{c}$ of camera $c$ , and $\rho_{c,i}$ is a directional weighting [32] that guides the gradient in $D_{c}$ . The silhouette loss ensures that the boundary vertices project onto the zero-set of the distance transform, i.e., the foreground silhouette. + +Sparse Keypoint Graph Loss. Only using the silhouette loss can lead to wrong mesh-to-image assignments, especially for highly articulated motions. To this end, we use + +a sparse keypoint loss to constrain the mesh deformation, which is similar to the keypoint loss for PoseNet in Eq. 6 + +$$ +\mathcal {L} _ {\mathrm {k p g}} (\mathbf {M}) = \sum_ {c} \sum_ {m} \sigma_ {c, m} \| \pi_ {c} (\mathbf {M} _ {m}) - \mathbf {p} _ {c, m} \| ^ {2}. \tag {12} +$$ + +Differently from Eq. 6, the deformed and posed landmarks $\mathbf{M}$ are derived from the embedded deformation graph. To this end, we can deform and pose the canonical landmark positions by attaching them to its closest graph node $g$ in canonical pose with weight $w_{m,g} = 1.0$ . Landmarks can then be deformed according to Eq. 9, 10, resulting in $\mathbf{M}_{c'}$ which is brought to global space via $\mathbf{M}_m = \mathbf{R}_{c'}^T\mathbf{M}_{c',m} + \mathbf{t}$ . As-rigid-as-possible Loss. To enforce local smoothness of the surface, we impose an as-rigid-as-possible loss [75] + +$$ +\mathcal {L} _ {\operatorname {a r a p}} (\mathbf {A}, \mathbf {T}) = \sum_ {k} \sum_ {l \in \mathcal {N} _ {\mathrm {n}} (k)} u _ {k, l} \| d _ {k, l} (\mathbf {A}, \mathbf {T}) \| _ {1}, \tag {13} +$$ + +where + +$$ +d _ {k, l} (\mathbf {A}, \mathbf {T}) = R (\mathbf {A} _ {k}) (\mathbf {G} _ {l} - \mathbf {G} _ {k}) + \mathbf {T} _ {k} + \mathbf {G} _ {k} - (\mathbf {G} _ {l} + \mathbf {T} _ {l}). +$$ + +$\mathcal{N}_{\mathrm{n}}(k)$ is the set of indices of the neighbors of node $k$ . In contrast to [75], we propose weighting factors $u_{k,l}$ that influence the rigidity of respective parts of the graph. We derive $u_{k,l}$ by averaging all per-vertex rigidity weights $s_i$ [32] for all vertices (see Sec. 3.1), which are connected to node $k$ or $l$ . Thus, the mesh can deform either less or more depending on the surface material. For example, graph nodes that are mostly connected to vertices on a skirt can deform more freely than nodes that are mainly connected to vertices on the skin. + +# 3.4. In-the-wild Domain Adaptation + +Since our training set is captured in a green screen studio and our test set is captured in the wild, there is a significant domain gap between them, due to different lighting conditions and camera response functions. To improve the performance of our method on in-the-wild images, we fine-tune our networks on the monocular test images for a small number of iterations using the same 2D keypoint and silhouette losses as before, but only on a single view. This drastically improves the performance at test time as shown in the supplemental material. + +# 4. Results + +All our experiments were performed on a machine with an NVIDIA Tesla V100 GPU. A forward pass of our method takes around 50ms, which breaks down to 25ms for PoseNet and 25ms for DefNet. During testing, we use the off-the-shelf video segmentation method of [16] to remove the background in the input image. Our method requires OpenPose's 2D joint detections [19, 18, 72, 83] as + +![](images/e4d8a58bdbf83b15414bc0deb24fab540a949cb19f24d6efe53c944433c88de9.jpg) + +![](images/cfc8405acf82c79e9354a8d8573d0ffdde032a58069036e4a84e4318433edce5.jpg) + +![](images/2c0f50716b8036c2f9ae727ae5153ded142549d2705e721657a478d761d5f8a7.jpg) + +![](images/e1d3000eac315cf663c52cdf54ec558ded682be786aabde67bed3cdf2dcfd21d.jpg) + +![](images/4157ab6bf11538c3d0e2a0144999787ceb331e4f9574765f1d61b7e9fd1f5f9d.jpg) + +![](images/36e6baad91cbf65c255fb600e5d523ee1035b0f3308e9e8ef89303899a368526.jpg) + +![](images/480d282e5fa11c7c3005f4a3157321d710dc9d7da1eeb110facf82309e49875d.jpg) + +![](images/84d357f58c4c4b9a37836b883dc2844911078ac6cb87b2c32954c8edc13a55c7.jpg) + +![](images/ac0d67295272bb06682b3e4354498c0bcc732a2f92925401d71baa503e9cf66d.jpg) + +![](images/e01a1045813b5f1dcc1ff119f11a108b37289a997106848fce7c0d820ef612fb.jpg) + +![](images/1c1f4826783db495abe289cb946b99ecc52bab08a80eeabcaa119400c0b2312d.jpg) + +![](images/2621ee2e38b037f6595eb101608efd46d6ddce7877da46d144bc3a35516c64f6.jpg) + +![](images/7697667ee96e1c4171ed741b3818b599b0f4338645aef91c6ef8c3b6fb426f47.jpg) + +![](images/fe5c044db92c2110180801206396099bfbde699cfadca8e19c73c909dd7a0403.jpg) + +![](images/94927e0ae32b5aeef93cfb9bc3bf88a8df43712c45e3935fdf93ecc3262d8519.jpg) + +![](images/aaa835b0fff7034973ccfa259d895ab3ec55ba30a6fecf59009380ff78ade916.jpg) +Input Image + +![](images/ac133aceaaea40a64a5c4abe70a71ba839f5c88f87160e029873e3f09c98be42.jpg) +Our Result (overlayed) + +![](images/6e89953b4e1bb59bb88c64c3a201bccc46f985dd5b519dfebcf76da6b67f6bed.jpg) +Input Image + +![](images/aaac6562c5f358deb3168c37999a1574439a65cb7b01bf3572d72898ffbf3b2a.jpg) +Our Result (overlayed) + +![](images/87fbab781b174576b92f9fd8ae14d94f6a0316410f0f8fc0a830fc7a91374b6b.jpg) +3D View + +input during testing to crop the frames and to obtain the 3D global translation with our global alignment layer. Finally, we temporally smooth the output mesh vertices with a Gaussian kernel of size 5 frames. + +Dataset. We evaluate our approach on 4 subjects (S1 to S4) with varying types of apparel. For qualitative evaluation, we recorded 13 in-the-wild sequences in different indoor and outdoor environments shown in Fig. 3. For quantitative evaluation, we captured 4 sequences in a calibrated multicamera green screen studio (see Fig. 4), for which we computed the ground truth 3D joint locations using the multiview motion capture software, The Captury [20], and we use a color keying algorithm for ground truth foreground segmentation. All sequences contain a large variety of motions, ranging from simple ones like walking up to more difficult ones like fast dancing or baseball pitching. We will release the dataset for future research. + +Qualitative Comparisons. Fig. 3 shows our qualitative + +![](images/e2224ec45655be3cae477e61df17c0d9a3705563c3f20857ba51d5054f4549e3.jpg) +Figure 3. Qualitative results. Each row shows results for a different person with varying types of apparel. We visualize input frames and our reconstruction overlayed to the corresponding frame. Note that our results precisely overlay to the input. Further, we show our reconstructions from a virtual 3D viewpoint. Note that they also look plausible in 3D. +Overlay on IV +Figure 4. Results on our evaluation sequences where input views (IV) and reference views (RV) are available. Note that our reconstruction also precisely overlays on RV even though they are not used for tracking. + +![](images/7f306736642483ebb46041b1eb59d4572f422e1057e6ab50b7708cd25175e036.jpg) +Overlay on RV + +![](images/bd8947eca46d486d48d153ff1e10316f1061f2917661048428fbe7cb3ca33985.jpg) +Overlay on IV + +![](images/17c98a32ccad98379b51dd17b95b4785f550f8aa2f1cd86be05f48dc8e4a8b50.jpg) +Overlay on RV + +![](images/370d3f524d117700bf99dfe4ba0a190cdf6f95c0eab2e7214d2d3e5d3bddd776.jpg) +Overlay on IV + +![](images/1039f06aae014671d9c3a84a224c4b3232bd0f58efb96d8b4e40a0f41a7b2468.jpg) +Overlay on RV + +results on in-the-wild test sequences with various clothing styles, poses and environments. Our reconstructions not only precisely overlay with the input images, but also look plausible from arbitrary 3D view points. In Fig. 5, we qualitatively compare our approach to the related human capture and reconstruction methods [42, 32, 70, 99]. In terms of the shape representation, our method is most + +![](images/6a2fad7e4846d1d5fec99aa65f4aa155d1108434eebd09461a1f38c0a9591643.jpg) +Figure 5. Qualitative comparison to other methods [42, 32, 70, 99]. Note that our results overlay more accurately to the input view and also look more plausible from a reference view that was not used for tracking. Ground truth global translation is used to match the reference view for the results of [42, 32]. Since PIFu [70] and DeepHuman [99] output meshes with varying topology in a canonical volume without an attached root, it is not possible to apply the ground truth translation and therefore we show the reference view without overlay. + +closely related to LiveCap [32] that also uses a person-specific template. Since they non-rigidly fit the template only to the monocular input view, their results do not faithfully depict the deformation in other view points. Further, their pose estimation severely suffers from the monocular ambiguities, whereas our pose results are more robust and accurate (see supplemental video). Comparing to the other three methods [42, 70, 99] that are trained for general subjects, our approach has the following advantages: First, our method recovers the non-rigid deformations of humans in general clothes whereas the parametric model-based approaches [42, 43] only recover naked body shape. Second, our method directly provides surface correspondences over time which is important for AR/VR applications (see supplemental video). In contrast, the results of implicit representation-based methods, PIFu [70] and DeepHuman [99], lack temporal surface correspondences and do not preserve the skeletal structure of the human body, i.e., they often exhibit missing arms and disconnected geometry. Furthermore, DeepHuman [99] only recovers a coarse shape in combination with a normal image of the input view, while our method can recover medium-level detailed geometry that looks plausible from all views. Last but not least, all these existing methods have problems when overlaying their reconstructions on the reference view, even though some of the methods show a very good overlay on the input view. In contrast, our approach reconstructs accurate 3D geometry, and therefore, our results can precisely overlay on the reference views (also see Fig. 4). + +Skeletal Pose Accuracy. We quantitatively compare our pose results (output of PoseNet) to existing pose estimation methods on $S1$ and $S4$ . To account for different types of apparel, we choose $S1$ wearing trousers and a T-shirt and $S4$ wearing a short dress. We rescale the bone length for + +
MPJPE/GLE (in mm) and 3DPCK/AUC (in %) on S1
MethodGLE↓3DPCK↑AUC↑MPJPE↓
VNect [53]-66.0628.0277.19
HMR [42]-82.3943.6172.61
HMMR [43]-87.4845.3372.40
LiveCap [32]317.0171.1337.9092.84
Ours91.0898.4358.7149.11
MVBL76.0399.1757.7945.44
+ +
MPJPE/GLE (in mm) and 3DPCK/AUC (in %) on S4
MethodGLE↓3DPCK↑AUC↑MPJPE↓
VNect [53]-82.0642.7372.62
HMR [42]-86.8843.9173.63
HMMR [43]-82.8041.1877.41
LiveCap [32]248.6775.1137.3583.48
Ours96.5696.7459.2545.40
MVBL75.8296.2057.2745.12
+ +Table 1. Skeletal pose accuracy. Note that we are consistently better than other monocular approaches. Moreover, we are even close to the multi-view baseline. + +all methods to the ground truth and evaluate the following metrics on the 14 commonly used joints [53] for every 10th frame: 1) We evaluate the root joint position error or global localization error (GLE) to measure how good the skeleton is placed in global 3D space. Note that GLE can only be evaluated for LiveCap [32] and ours, since other methods only produce up-to-scale depth. 2) To evaluate the accuracy of the pose estimation, we report the 3D percentage of correct keypoints (3DPCK) with a threshold of $150mm$ of the root aligned poses and the area under the 3DPCK curve (AUC). 3) To factor out the errors in the global rotation, we also report the mean per joint position error (MPJPE) after Procrustes alignment. We compare our approach against the state-of-the-art pose estimation approaches including VNect [53], HMR [42], HMMR [43], and LiveCap [32]. We also compare to a multi-view baseline approach (MVBL), where we use our differentiable skeleton model in an optimization framework to solve for the pose per frame using the proposed multi-view losses. We can see from Tab. 3 that our approach outperforms the related monocular methods in all metrics by a large margin and is even close to MVBL although our method only takes a single image as input. We further compare to VNect [53] fine-tuned on our training images for $S1$ . To this end, we compute the 3D joint position using The Captury [20] to provide ground truth supervision for VNect. On the evaluation sequence for $S1$ , the fine-tuned VNect achieved $95.66\%$ 3DPCK, $52.13\%$ AUC and $47.16mm$ MPJPE. This shows our weakly supervised approach yields comparable or better results than supervised methods in the person-specific setting. However, our approach does not require 3D ground truth annotation that is difficult to obtain, even for only sparse keypoints, let alone the dense surfaces. + +Surface Reconstruction Accuracy. To evaluate the accuracy of the regressed non-rigid deformations, we compute the intersection over union (IoU) between the ground truth foreground masks and the 2D projection of the estimated + +
AMVIoU, RVIoU, and SVIoU (in %) on S1 sequence
MethodAMVIoU↑RVIoU↑SVIoU↑
HMR [42]62.2561.768.85
HMMR [43]65.9865.5870.77
LiveCap [32]56.0254.2177.75
DeepHuman [99]--91.57
Ours87.287.0389.26
MVBL91.7491.7292.02
+ +
AMVIoU, RVIoU, and SVIoU (in %) on S4 sequence
MethodAMVIoU↑RVIoU↑SVIoU↑
HMR [42]65.164.6670.84
HMMR [43]63.7963.2970.23
LiveCap [32]59.9659.0272.16
DeepHuman [99]--84.15
Ours82.5382.2286.66
MVBL88.1488.0389.66
+ +shape on $S1$ and $S4$ for every 100th frame. We evaluate the IoU on all views, on all views expect the input view, and on the input view which we refer to as AMVIoU, RVIoU and SVIoU, respectively. To factor out the errors in global localization, we apply the ground truth translation to the reconstructed geometries. For DeepHuman [99] and PIFu [70], we cannot report the AMVIoU and RVIoU, since we cannot overlay their results on reference views as discussed before. Further, PIFu [70] by design achieves perfect overlay on the input view, since they regress the depth for each foreground pixel. However, their reconstruction does not reflect the true 3D geometry (see Fig. 5). Therefore, it is meaningless to report their SVIoU. Similarly, DeepHuman [99] achieves high SVIoU, due to their volumetric representation. But their results are often wrong, when looking from side views. In contrast, our method consistently outperforms all other approaches in terms of AMVIoU and RVIoU, which shows the high accuracy of our method in recovering the 3D geometry. Further, we are again close to the multi-view baseline. + +Ablation Study. To evaluate the importance of the number of cameras, the number of training images, and our DefNet, we performed an ablation study on S4 in Tab. 3. 1) In the first group of Tab. 3, we train our networks with supervision using 1 to 7 views. We can see that adding more views consistently improves the quality of the estimated poses and deformations. The most significant improvement is from one to two cameras. This is not surprising, since the single camera settings is inherently ambiguous. 2) In the second group of Tab. 3, we reduce the training data to $1/2$ and $1/4$ . We can see that the more frames with different poses and deformations are seen during training, the better the reconstruction quality is. This is expected since a larger number of frames may better sample the possible space of poses and deformations. 3) In the third group of Tab. 3, we evaluate the AMVIoU on the template mesh animated with the results of PoseNet, which we refer to as PoseNet-only. One can see that on average, the AMVIoU is improved by around $4\%$ . Since most non-rigid deformations rather happen locally, + +Table 2. Surface deformation accuracy. We outperform all other monocular methods and are even close to the multi-view baseline. + +
3DPCK and AMVIoU (in %) on S4 sequence
Method3DPCK↑AMVIoU↑
1 camera view62.1165.11
2 camera views93.5278.44
3 camera views94.7079.75
7 camera views95.9581.73
6500 frames85.1973.41
13000 frames92.2578.97
PoseNet-only96.7478.51
Ours(14 views, 26000 frames)96.7482.53
+ +Table 3. Ablation study. We evaluate the number of cameras and the number of frames used during training in terms of the 3DPCK and AMVIoU metrics. Adding more cameras and frames consistently improves the quality of reconstruction. Further, DefNet improves the AMVIoU compared to pure pose estimation. + +![](images/8a24a39d7f1ab725b4211484bd1a28a8bcf5a34e43ba090527bbde3f140caf0a.jpg) +Figure 6. PoseNet + DefNet vs. PoseNet-only. DefNet can deform the template to accurately match the input, especially for loose clothing. In addition, DefNet also corrects slight errors in the pose and typical skinning artifacts. + +the difference is visually even more significant as shown in Fig. 6. Especially, the skirt is correctly deformed according to the input image whereas the PoseNet-only result cannot fit the input due to the limitation of skinning. + +# 5. Conclusion + +We have presented a learning-based approach for monocular dense human performance capture using only weak multi-view supervision. In contrast to existing methods, our approach directly regresses poses and surface deformations from neural networks, produces temporal surface correspondences, preserves the skeletal structure of the human body, and can handle loose clothes. Our qualitative and quantitative results in different scenarios show that our method produces more accurate 3D reconstruction of pose and non-rigid deformation than existing methods. In the future, we plan to incorporate hands and the face to our mesh representation to enable joint tracking of body, facial expressions and hand gestures. We are also interested in physically more correct multi-layered representations to model the garments even more realistically. + +Acknowledgements. This work was funded by the ERC Consolidator Grant 4DRepLy (770784) and the Deutsche Forschungsgemeinschaft (Project Nr. 409792180, Emmy Noether Programme, project: Real Virtual Humans). + +# References + +[1] B. Allain, J.-S. Franco, and E. Boyer. An Efficient Volumetric Framework for Shape Tracking. In CVPR 2015 - IEEE International Conference on Computer Vision and Pattern Recognition, pages 268-276, Boston, United States, June 2015. IEEE. 2 +[2] T. Alldieck, M. Magnor, B. L. Bhatnagar, C. Theobalt, and G. Pons-Moll. Learning to reconstruct people in clothing from a single RGB camera. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 1175-1186, Jun 2019. 1, 2 +[3] T. Alldieck, M. Magnor, W. Xu, C. Theobalt, and G. Pons-Moll. Video based reconstruction of 3d people models. In IEEE Conference on Computer Vision and Pattern Recognition. CVPR Spotlight Paper. 1, 2 +[4] T. Alldieck, M. Magnor, W. Xu, C. Theobalt, and G. Pons-Moll. Detailed human avatars from monocular video. In International Conference on 3D Vision, pages 98-109, Sep 2018. 2 +[5] T. Alldieck, G. Pons-Moll, C. Theobalt, and M. Magnor. Tex2shape: Detailed full human body geometry from a single image. In IEEE International Conference on Computer Vision (ICCV). IEEE, oct 2019. 1 +[6] D. Anguelov, P. Srinivasan, D. Koller, S. Thrun, J. Rodgers, and J. Davis. SCAPE: Shape Completion and Animation of People. ACM Transactions on Graphics, 24(3):408-416, 2005. 2 +[7] A. O. Balan and M. J. Black. The naked truth: Estimating body shape under clothing. In European Conference on Computer Vision, pages 15-29. Springer, 2008. 2 +[8] A. O. Balan, L. Sigal, M. J. Black, J. E. Davis, and H. W. Haussecker. Detailed human shape and pose from images. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1-8, 2007. 2 +[9] B. L. Bhatnagar, G. Tiwari, C. Theobalt, and G. Pons-Moll. Multi-garment net: Learning to dress 3d people from images. In IEEE International Conference on Computer Vision (ICCV). IEEE, oct 2019. 1, 2 +[10] F. Bogo, M. J. Black, M. Loper, and J. Romero. Detailed full-body reconstructions of moving people from monocular RGB-D sequences. In International Conference on Computer Vision (ICCV), pages 2300-2308, Dec. 2015. 2 +[11] F. Bogo, A. Kanazawa, C. Lassner, P. Gehler, J. Romero, and M. J. Black. Keep it SMPL: Automatic estimation of 3D human pose and shape from a single image. In European Conference on Computer Vision (ECCV), 2016. 2 +[12] G. Borgefors. Distance transformations in digital images. Computer Vision, Graphics, and Image Processing, 34(3):344 - 371, 1986. 3, 5 +[13] M. Bray, P. Kohli, and P. H. Torr. Posecut: Simultaneous segmentation and 3d pose estimation of humans using dynamic graph-cuts. In European conference on computer vision, pages 642-655. Springer, 2006. 1, 3 +[14] T. Brox, B. Rosenhahn, D. Cremers, and H.-P. Seidel. High accuracy optical flow serves 3-d pose tracking: exploiting contour and flow based constraints. In European Confer + +ence on Computer Vision, pages 98-111. Springer, 2006. 1 +[15] T. Brox, B. Rosenhahn, J. Gall, and D. Cremers. Combined region and motion-based 3d tracking of rigid and articulated objects. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(3):402-415, 2010. 1, 3 +[16] S. Caelles, K.-K. Maninis, J. Pont-Tuset, L. Leal-Taixe, D. Cremers, and L. Van Gool. One-shot video object segmentation. In Computer Vision and Pattern Recognition (CVPR), 2017. 5 +[17] C. Cagniart, E. Boyer, and S. Ilic. Free-form mesh tracking: a patch-based approach. In Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on, pages 1339-1346. IEEE, 2010. 1, 3 +[18] Z. Cao, G. Hidalgo, T. Simon, S.-E. Wei, and Y. Sheikh. OpenPose: realtime multi-person 2D pose estimation using Part Affinity Fields. In arXiv preprint arXiv:1812.08008, 2018. 3, 5 +[19] Z. Cao, T. Simon, S.-E. Wei, and Y. Sheikh. Realtime multi-person 2d pose estimation using part affinity fields. In CVPR, 2017. 3, 5 +[20] The Captury. http://www.thecapture.com/.6,7 +[21] J. Carranza, C. Theobalt, M. A. Magnor, and H.-P. Seidel. Free-viewpoint video of human actors. ACM Trans. Graph., 22(3), July 2003. 3 +[22] J. Chibane, T. Alldieck, and G. Pons-Moll. Implicit functions in feature space for 3d shape reconstruction and completion. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, jun 2020. 1 +[23] A. Collet, M. Chuang, P. Sweeney, D. Gillett, D. Evseev, D. Calabrese, H. Hoppe, A. Kirk, and S. Sullivan. High-quality streamable free-viewpoint video. ACM Transactions on Graphics (TOG), 34(4):69, 2015. 2 +[24] E. De Aguiar, C. Stoll, C. Theobalt, N. Ahmed, H.-P. Seidel, and S. Thrun. Performance capture from sparse multiview video. In ACM Transactions on Graphics (TOG), volume 27, page 98. ACM, 2008. 1, 3 +[25] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR09, 2009. 3 +[26] M. Dou, P. Davidson, S. R. Fanello, S. Khamis, A. Kowdle, C. Rhemann, V. Tankovich, and S. Izadi. Motion2fusion: Real-time volumetric performance capture. ACM Trans. Graph., 36(6):246:1-246:16, Nov. 2017. 2 +[27] M. Dou, S. Khamis, Y. Degtyarev, P. Davidson, S. R. Fanello, A. Kowdle, S. O. Escolano, C. Rhemann, D. Kim, J. Taylor, et al. Fusion4d: Real-time performance capture of challenging scenes. ACM Transactions on Graphics (TOG), 35(4):114, 2016. 2 +[28] V. Gabeur, J.-S. Franco, X. Martin, C. Schmid, and G. Rogez. Moulding humans: Non-parametric 3d human shape estimation from single images. In Proceedings of the IEEE International Conference on Computer Vision, pages 2232-2241, 2019. 1 +[29] J. Gall, C. Stoll, E. De Aguiar, C. Theobalt, B. Rosenhahn, and H.-P. Seidel. Motion capture using joint skeleton tracking and surface estimation. In Computer Vision and Pat + +tern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 1746-1753. IEEE, 2009. 1, 3 +[30] K. Guo, J. Taylor, S. Fanello, A. Tagliasacchi, M. Dou, P. Davidson, A. Kowdle, and S. Izadi. Twinfusion: High framerate non-rigid fusion through fast correspondence tracking. 09 2018. 2 +[31] K. Guo, F. Xu, T. Yu, X. Liu, Q. Dai, and Y. Liu. Real-time geometry, albedo, and motion reconstruction using a single rgb-d camera. ACM Transactions on Graphics (TOG), 36(3):32, 2017. 2 +[32] M. Habermann, W. Xu, M. Zollhoefer, G. Pons-Moll, and C. Theobalt. Livecap: Real-time human performance capture from monocular video. ACM Trans. Graph., 2019. 1, 3, 5, 6, 7, 8 +[33] N. Hasler, H. Ackermann, B. Rosenhahn, T. Thormählen, and H.-P. Seidel. Multilinear pose and body shape estimation of dressed subjects from image sets. In Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on, pages 1823-1830. IEEE, 2010. 2 +[34] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 3 +[35] T. Helten, M. Muller, H.-P. Seidel, and C. Theobalt. Realtime body tracking with one depth camera and inertial sensors. In The IEEE International Conference on Computer Vision (ICCV), December 2013. 2 +[36] C.-H. Huang, B. Allain, J.-S. Franco, N. Navab, S. Ilic, and E. Boyer. Volumetric 3d tracking by detection. In Proc. CVPR, 2016. 2 +[37] Y. Huang, F. Bogo, C. Lassner, A. Kanazawa, P. V. Gehler, J. Romero, I. Akhter, and M. J. Black. Towards accurate marker-less human shape and pose estimation over time. In International Conference on 3D Vision (3DV), 2017. 2 +[38] Z. Huang, T. Li, W. Chen, Y. Zhao, J. Xing, C. LeGendre, L. Luo, C. Ma, and H. Li. Deep Volumetric Video From Very Sparse Multi-View Performance Capture. In Proceedings of the 15th European Conference on Computer Vision. Computer Vision Foundation, Sept. 2018. 2 +[39] M. Innmann, M. Zollhöfer, M. Nießner, C. Theobalt, and M. Stamminger. VolumeDeform: Real-time Volumetric Non-rigid Reconstruction. October 2016. 2 +[40] H. Joo, T. Simon, and Y. Sheikh. Total capture: A 3d deformation model for tracking faces, hands, and bodies. CoRR, abs/1801.01615, 2018. 2 +[41] P. Kadlecek, A.-E. Ichim, T. Liu, J. Krivanek, and L. Kavan. Reconstructing personalized anatomical models for physics-based body animation. ACM Trans. Graph., 35(6), 2016. 2 +[42] A. Kanazawa, M. J. Black, D. W. Jacobs, and J. Malik. End-to-end recovery of human shape and pose. CoRR, abs/1712.06584, 2017. 2, 6, 7, 8 +[43] A. Kanazawa, J. Y. Zhang, P. Felsen, and J. Malik. Learning 3d human dynamics from video. In Computer Vision and Pattern Recognition (CVPR), 2019. 2, 7, 8 +[44] L. Kavan, S. Collins, J. Žára, and C. O'Sullivan. Skinning with dual quaternions. In Proceedings of the 2007 Symposium on Interactive 3D Graphics and Games, I3D '07, 2007. 5 + +[45] M. Kim, G. Pons-Moll, S. Pujades, S. Bang, J. Kim, M. Black, and S.-H. Lee. Data-driven physics for human soft tissue animation. ACM Transactions on Graphics, (Proc. SIGGRAPH), 36(4), 2017. 2 +[46] N. Kolotouros, G. Pavlakos, and K. Daniilidis. Convolutional mesh regression for single-image human shape reconstruction. In CVPR, 2019. 2 +[47] A. Kowdle, C. Rhemann, S. Fanello, A. Tagliasacchi, J. Taylor, P. Davidson, M. Dou, K. Guo, C. Keskin, S. Khamis, D. Kim, D. Tang, V. Tankovich, J. Valentin, and S. Izadi. The need 4 speed in real-time dense visual tracking. In SIGGRAPH Asia 2018 Technical Papers, SIGGRAPH Asia '18, pages 220:1-220:14, New York, NY, USA, 2018. ACM. 2 +[48] C. Lassner, J. Romero, M. Kiefel, F. Bogo, M. J. Black, and P. V.Gehler. Unite the people: Closing the loop between 3d and 2d human representations. In Proc. CVPR, 2017. 2 +[49] V. Leroy, J.-S. Franco, and E. Boyer. Multi-View Dynamic Shape Refinement Using Local Temporal Integration. In IEEE, International Conference on Computer Vision 2017, Venice, Italy, Oct. 2017. 2 +[50] Y. Liu, C. Stoll, J. Gall, H.-P. Seidel, and C. Theobalt. Markerless motion capture of interacting characters using multi-view image segmentation. In Computer Vision and Pattern Recognition (CVPR), 2011 IEEE Conference on, pages 1249-1256. IEEE, 2011. 1, 3 +[51] M. Loper, N. Mahmood, J. Romero, G. Pons-Moll, and M. J. Black. SMPL: A skinned multi-person linear model. ACM Trans. Graphics (Proc. SIGGRAPH Asia), 34(6):248:1-248:16, Oct. 2015. 2 +[52] Q. Ma, J. Yang, A. Ranjan, S. Pujades, G. Pons-Moll, S. Tang, and M. Black. Learning to dress 3d people in generative clothing. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, jun 2020. 1 +[53] D. Mehta, S. Sridhar, O. Sotnychenko, H. Rhodin, M. Shafiei, H.-P. Seidel, W. Xu, D. Casas, and C. Theobalt. Vnect: Real-time 3d human pose estimation with a single rgb camera. volume 36, July 2017. 2, 7 +[54] D. Metaxas and D. Terzopoulos. Shape and nonrigid motion estimation through physics-based synthesis. IEEE Trans. PAMI, 15(6):580-591, 1993. 2 +[55] A. Mustafa, H. Kim, J.-Y. Guillemaut, and A. Hilton. General dynamic scene reconstruction from multiple view video. In ICCV, 2015. 1 +[56] R. Natsume, S. Saito, Z. Huang, W. Chen, C. Ma, H. Li, and S. Morishima. Siclope: Silhouette-based clothed people. arXiv preprint arXiv:1901.00049, 2018. 2 +[57] R. A. Newcombe, D. Fox, and S. M. Seitz. Dynamicfusion: Reconstruction and tracking of non-rigid scenes in real-time. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. 2 +[58] S. Orts-Escalano, C. Rhemann, S. Fanello, W. Chang, A. Kowdle, Y. Degtyarev, D. Kim, P. L. Davidson, S. Khamis, M. Dou, et al. Holoportation: Virtual 3d teleportation in real-time. In Proceedings of the 29th Annual Symposium on User Interface Software and Technology, pages 741-754. ACM, 2016. 2 + +[59] S. I. Park and J. K. Hodgins. Data-driven modeling of skin and muscle deformation. In ACM Transactions on Graphics (TOG), volume 27, page 96. ACM, 2008. 2 +[60] C. Patel, Z. Liao, and G. Pons-Moll. Tailornet: Predicting clothing in 3d as a function of human pose, shape and garment style. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, jun 2020. 1, 2 +[61] G. Pavlakos, V. Choutas, N. Ghorbani, T. Bolkart, A. A. A. Osman, D. Tzionas, and M. J. Black. Expressive body capture: 3d hands, face, and body from a single image. In Proceedings IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), June 2019. 2 +[62] G. Pavlakos, L. Zhu, X. Zhou, and K. Daniilidis. Learning to estimate 3D human pose and shape from a single color image. In CVPR, 2018. 2 +[63] R. Plänkers and P. Fua. Tracking and modeling people in video sequences. Computer Vision and Image Understanding, 81(3):285-302, 2001. 2 +[64] G. Pons-Moll, S. Pujades, S. Hu, and M. Black. ClothCap: Seamless 4D clothing capture and retargeting. ACM Transactions on Graphics, (Proc. SIGGRAPH), 36(4), 2017. 1, 2 +[65] G. Pons-Moll, J. Romero, N. Mahmood, and M. J. Black. Dyna: a model of dynamic human shape in motion. ACM Transactions on Graphics (TOG), 34(4):120, 2015. 1, 2 +[66] F. Prada, M. Kazhdan, M. Chuang, A. Collet, and H. Hoppe. Spatiotemporal atlas parameterization for evolving meshes. ACM Transactions on Graphics (TOG), 36(4):58, 2017. 2 +[67] A. Pumarola, J. Sanchez-Riera, G. P. T. Choi, A. Sanfeliu, and F. Moreno-Noguer. 3dpeople: Modeling the geometry of dressed humans. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 1 +[68] H. Rhodin, N. Robertini, D. Casas, C. Richardt, H.-P. Seidel, and C. Theobalt. General automatic human shape and motion capture using volumetric contour cues. In B. Leibe, J. Matas, N. Sebe, and M. Welling, editors, ECCV, pages 509-526, Cham, 2016. Springer International Publishing. 2 +[69] J. Romero, D. Tzionas, and M. J. Black. Embodied hands: Modeling and capturing hands and bodies together. ACM Transactions on Graphics, (Proc. SIGGRAPH Asia), 36(6):245:1-245:17, Nov. 2017. 2 +[70] S. Saito, Z. Huang, R. Natsume, S. Morishima, A. Kanazawa, and H. Li. Pifu: Pixel-aligned implicit function for high-resolution clothed human digitization. CoRR, abs/1905.05172, 2019. 1, 2, 6, 7, 8 +[71] L. Sigal, S. Bhatia, S. Roth, M. J. Black, and M. Isard. Tracking loose-limbed people. In Computer Vision and Pattern Recognition, 2004. CVPR 2004. Proceedings of the 2004 IEEE Computer Society Conference on, volume 1, pages I-421. IEEE, 2004. 2 +[72] T. Simon, H. Joo, I. Matthews, and Y. Sheikh. Hand keypoint detection in single images using multiview bootstrapping. In CVPR, 2017. 3, 5 +[73] M. Slavcheva, M. Baust, D. Cremers, and S. Ilic. Killing-fusion: Non-rigid 3d reconstruction without correspond + +dences. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), volume 3, page 7, 2017. 2 +[74] C. Sminchisescu and B. Triggs. Estimating articulated human motion with covariance scaled sampling. The International Journal of Robotics Research, 22(6):371-391, 2003. 2 +[75] O. Sorkine and M. Alexa. As-rigid-as-possible surface modeling. In Proceedings of the Fifth Eurographics Symposium on Geometry Processing, SGP '07. Eurographics Association, 2007. 5 +[76] J. Starck and A. Hilton. Surface capture for performance-based animation. IEEE Computer Graphics and Applications, 27(3):21-31, 2007. 3 +[77] R. W. Sumner, J. Schmid, and M. Pauly. Embedded deformation for shape manipulation. ACM Trans. Graph., 26(3), July 2007. 3, 5 +[78] Y. Tao, Z. Zheng, Y. Zhong, J. Zhao, D. Quionhai, G. Pons-Moll, and Y. Liu. Simulcap: Single-view human performance capture with cloth simulation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), jun 2019. 2 +[79] Treedys. https://www.treedys.com/.3 +[80] G. Varol, D. Ceylan, B. Russell, J. Yang, E. Yumer, I. Laptev, and C. Schmid. BodyNet: Volumetric inference of 3D human body shapes. In ECCV, 2018. 2 +[81] D. Vlasic, I. Baran, W. Matusik, and J. Popovic. Articulated mesh animation from multi-view silhouettes. In ACM Transactions on Graphics (TOG), volume 27, page 97. ACM, 2008. 1, 3 +[82] D. Vlasic, P. Peers, I. Baran, P. Debevec, J. Popovic, S. Rusinkiewicz, and W. Matusik. Dynamic shape capture using multi-view photometric stereo. ACM Transactions on Graphics (TOG), 28(5):174, 2009. 1 +[83] S.-E. Wei, V. Ramakrishna, T. Kanade, and Y. Sheikh. Convolutional Pose Machines. In Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 3, 5 +[84] X. Wei, P. Zhang, and J. Chai. Accurate realtime full-body motion capture using a single depth camera. ACM TOG (Proc. SIGGRAPH Asia), 31(6):188:1-188:12, 2012. 2 +[85] A. Weiss, D. Hirshberg, and M. J. Black. Home 3d body scans from noisy image and range data. In Proc. ICCV, pages 1951-1958. IEEE, 2011. 2 +[86] C. Wu, C. Stoll, L. Valgaerts, and C. Theobalt. On-set Performance Capture of Multiple Actors With A Stereo Camera. In ACM Transactions on Graphics (Proceedings of SIGGRAPH Asia 2013), volume 32, pages 161:1-161:11, November 2013. 1, 3 +[87] C. Wu, K. Varanasi, and C. Theobalt. Full body performance capture under uncontrolled and varying illumination: A shading-based approach. In ECCV, pages 757-770, 2012. 3 +[88] D. Xiang, H. Joo, and Y. Sheikh. Monocular total capture: Posing face, body, and hands in the wild. CoRR, abs/1812.01598, 2018. 2 +[89] W. Xu, A. Chatterjee, M. Zollhöfer, H. Rhodin, D. Mehta, H.-P. Seidel, and C. Theobalt. Monoperfcap: Human performance capture from monocular video. ACM Trans. Graph., 37(2):27:1-27:15, May 2018. 1, 3 + +[90] J. Yang, J.-S. Franco, F. Hétroy-Wheeler, and S. Wuhrer. Estimation of Human Body Shape in Motion with Wide Clothing. In European Conference on Computer Vision 2016, Amsterdam, Netherlands, Oct. 2016. 2 +[91] G. Ye, Y. Liu, N. Hasler, X. Ji, Q. Dai, and C. Theobalt. Performance capture of interacting characters with handheld kinetics. In ECCV, volume 7573 LNCS, pages 828-841, 2012. 2, 3 +[92] M. Ye and R. Yang. Real-time simultaneous pose and shape estimation for articulated objects using a single depth camera. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2345-2352, 2014. 2 +[93] T. Yu, K. Guo, F. Xu, Y. Dong, Z. Su, J. Zhao, J. Li, Q. Dai, and Y. Liu. Bodyfusion: Real-time capture of human motion and surface geometry using a single depth camera. In The IEEE International Conference on Computer Vision (ICCV). ACM, October 2017. 2 +[94] T. Yu, Z. Zheng, K. Guo, J. Zhao, Q. Dai, H. Li, G. Pons-Moll, and Y. Liu. Doublefusion: Real-time capture of human performances with inner body shapes from a single depth sensor. In The IEEE International Conference on Computer Vision and Pattern Recognition(CVPR). IEEE, June 2018. 2 +[95] C. Zhang, S. Pujades, M. Black, and G. Pons-Moll. Detailed, accurate, human shape estimation from clothed 3D scan sequences. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. Spotlight. 2 +[96] P. Zhang, K. Siu, J. Zhang, C. K. Liu, and J. Chai. Leveraging depth cameras and wearable pressure sensors for full-body kinematics and dynamics capture. ACM Transactions on Graphics (TOG), 33(6):14, 2014. 2 +[97] Q. Zhang, B. Fu, M. Ye, and R. Yang. Quality dynamic human body modeling using a single low-cost depth camera. In 2014 IEEE Conference on Computer Vision and Pattern Recognition, pages 676-683. IEEE, 2014. 2 +[98] Z. Zheng, T. Yu, H. Li, K. Guo, Q. Dai, L. Fang, and Y. Liu. HybridFusion: Real-Time Performance Capture Using a Single Depth Sensor and Sparse IMUs. In Proceedings of the 15th European Conference on Computer Vision, Munich, Germany, Sept. 2018. Computer Vision Foundation. 2 +[99] Z. Zheng, T. Yu, Y. Wei, Q. Dai, and Y. Liu. Deephuman: 3d human reconstruction from a single image. CoRR, abs/1903.06473, 2019. 1, 2, 6, 7, 8 +[100] M. Zollhöfer, M. Nießner, S. Izadi, C. Rhemann, C. Zach, M. Fisher, C. Wu, A. Fitzgibbon, C. Loop, C. Theobalt, and M. Stamminger. Real-time non-rigid reconstruction using an rgb-d camera. ACM Transactions on Graphics (TOG), 33(4), 2014. 3 \ No newline at end of file diff --git a/deepcapmonocularhumanperformancecaptureusingweaksupervision/images.zip b/deepcapmonocularhumanperformancecaptureusingweaksupervision/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..3d97ec38c2e4a5d44ec7509a8761f9c50a419326 --- /dev/null +++ b/deepcapmonocularhumanperformancecaptureusingweaksupervision/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:340d014ebb32f27e1e8e77dab2cd6d8300dea3de81e9e1489c49a1db5cacdb12 +size 660649 diff --git a/deepcapmonocularhumanperformancecaptureusingweaksupervision/layout.json b/deepcapmonocularhumanperformancecaptureusingweaksupervision/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..468e780536c2950e2ac2c3f6c9454f16efba8bff --- /dev/null +++ b/deepcapmonocularhumanperformancecaptureusingweaksupervision/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1709dfc463f37e85e6c8af9ab36a701842cc79d5f7164e142fa89c2846352298 +size 531100 diff --git a/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/795ef101-9894-4242-88ef-2deca9b991c7_content_list.json b/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/795ef101-9894-4242-88ef-2deca9b991c7_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..082557bdb7ff061bcc90e8ef71c511f451c3a071 --- /dev/null +++ b/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/795ef101-9894-4242-88ef-2deca9b991c7_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9882309229f7f4bd6ee1ea9b2f7df5ba6982115a85da4e122fac43f04948b05 +size 80627 diff --git a/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/795ef101-9894-4242-88ef-2deca9b991c7_model.json b/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/795ef101-9894-4242-88ef-2deca9b991c7_model.json new file mode 100644 index 0000000000000000000000000000000000000000..d919e6a8ffa4b5bf02e6a30d8995e647054b32a6 --- /dev/null +++ b/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/795ef101-9894-4242-88ef-2deca9b991c7_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83eb29a20134d6d89bddae60fccc89323df7b83d63b6cd22e9d6358c57ce1121 +size 99513 diff --git a/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/795ef101-9894-4242-88ef-2deca9b991c7_origin.pdf b/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/795ef101-9894-4242-88ef-2deca9b991c7_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fa5ff7c90d6984cd368602a0c91790422352de81 --- /dev/null +++ b/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/795ef101-9894-4242-88ef-2deca9b991c7_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e62c2cc6135d5d53678d78f6f5819d0725e4d03f51bf9cb06794b3329c6f90c2 +size 1488182 diff --git a/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/full.md b/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0fc3e54acfbf6dc57369e4a413ebc1f692772677 --- /dev/null +++ b/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/full.md @@ -0,0 +1,328 @@ +# DeepDeform: Learning Non-rigid RGB-D Reconstruction with Semi-supervised Data + +Aljaž Božić1 + +Michael Zollhöfer2 + +Christian Theobalt3 + +Matthias Nießner1 + +1Technical University of Munich + +$^{2}$ Stanford University + +3Max Planck Institute for Informatics + +![](images/e8b0731d3a36ebe1c0f563c67440a55b70550df01aa6e341ee2d57b940e685b7.jpg) +Figure 1: We propose a semi-supervised strategy combining self-supervision with sparse annotations to build a large-scale RGB-D dataset of non-rigidly deforming scenes (400 scenes, 390,000 frames, 5,533 densely aligned frame pairs). With this data, we propose a new method for non-rigid matching, which we integrate into a non-rigid reconstruction approach. + +![](images/799a33f05c67e9793074b4f1c2110b525ac3042747a9a14d012836c9422bdbc8.jpg) + +# Abstract + +Applying data-driven approaches to non-rigid 3D reconstruction has been difficult, which we believe can be attributed to the lack of a large-scale training corpus. Unfortunately, this method fails for important cases such as highly non-rigid deformations. We first address this problem of lack of data by introducing a novel semi-supervised strategy to obtain dense inter-frame correspondences from a sparse set of annotations. This way, we obtain a large dataset of 400 scenes, over 390,000 RGB-D frames, and 5,533 densely aligned frame pairs; in addition, we provide a test set along with several metrics for evaluation. Based on this corpus, we introduce a data-driven non-rigid feature matching approach, which we integrate into an optimization-based reconstruction pipeline. Here, we propose a new neural network that operates on RGB-D frames, while maintaining robustness under large non-rigid deformations and producing accurate predictions. Our approach significantly outperforms existing non-rigid reconstruction methods that do not use learned data terms, as well as learning-based approaches that only use self-supervision. + +# 1. Introduction + +Non-rigid 3D reconstruction, i.e., the dense, space-time coherent capture of non-rigidly deforming surfaces in full temporal correspondence, is key towards obtaining 3D abstractions of the moving real world. The wide availability of commodity RGB-D sensors, such as the Microsoft Kinect or Intel Realsense, has led to tremendous progress on static scene reconstruction methods. However, robust and high-quality reconstruction of non-rigidly moving scenes with one depth camera is still challenging. Applications for real-time non-rigid reconstruction range from augmented (AR) and virtual reality (VR) up to building realistic 3D holograms for fully immersive teleconferencing systems. The seminal DynamicFusion [28] approach was the first to show dynamic non-rigid reconstruction in real-time. Extensions primarily differ in the used energy formulation. Some methods use hand-crafted data terms based on dense geometry [28, 36, 37], dense color and geometry [14, 47], and sparse feature constraints [17]. Other approaches leverage multi-camera RGB-D setups [9, 8] for higher robustness. However, there are very few reconstruction methods that use learning-based data terms for general real-world scenes rather than specific scenarios [48], and that are trained to be robust under real-world appearance variation and diffi- + +cult motions. One reason for this is the lack of a large-scale training corpus. One recent approach [33] proposes self-supervision for ground truth generation, i.e., they employ DynamicFusion [28] for reconstruction and train a non-rigid correspondence descriptor on the computed interframe correspondences. However, we show that existing non-rigid reconstruction methods are not robust enough to handle realistic non-rigid sequences; therefore this tracking-based approach does not scale to training data generation for real world scenes. Unfortunately, this means that self-supervision exactly fails for many challenging scenarios such as highly non-rigid deformations and fast scene motion. By design, this approach trained with self-supervision cannot be better than the employed tracker. We propose to employ semi-supervised training data by combining self-supervision with sparse user annotations to obtain dense inter-frame correspondences. The annotated sparse point correspondences guide non-rigid reconstruction; this allows us to handle even challenging motions. The result is a large dataset of 400 scenes, over 390,000 RGB-D frames, and 5,533 densely aligned frame pairs. Based on this novel training corpus, we develop a new non-rigid correspondence matching approach (see Sec. 3) that finds accurate matches between RGB-D frames and is robust to difficult real world deformations. We further propose a re-weighting scheme that gives more weight to corner cases and challenging deformations during training. Given a keypoint in a source frame, our approach predicts a probability heatmap of the corresponding location in the target frame. Finally, we integrate our learned data term into a non-rigid reconstruction pipeline that combines learned heatmap matches with a dense RGB-D reconstruction objective. In addition, we introduce a new benchmark and metric for evaluating RGB-D based non-rigid 3D correspondence matching and reconstruction. We extensively compare our new data-driven approach to existing hand-crafted features. We also integrate the learned features into a non-rigid reconstruction framework, leading to significant improvement over state of the art. In sum, our contributions are: + +- A semi-supervised labeling approach for dense non-rigid correspondence learning, resulting in a dataset featuring 400 annotated dynamic RGB-D sequences and 5,533 densely aligned frame pairs. +- A novel data-driven non-rigid correspondence matching strategy that leads to more robust correspondence estimation compared to the state-of-the-art handcrafted and learned descriptors, especially in the case of extreme deformations. +- A non-rigid reconstruction approach for general scenes that combines learned and geometric data-terms and handles significantly faster and more complex motions than the state-of-the-art. + +![](images/ada4835c0d273a9fbe61222e08191a659f46fc242ae028251a121678a31ce40d.jpg) + +![](images/7eb87bcd7a4bc23a55c2c40e5ed368c402341aeeb7b21922650cd4d825bc5200.jpg) + +![](images/788d4b8446cefc0040c90bf0ec90a75fd32ce66940435150ccb0d747ea1ab412.jpg) + +![](images/4c8953c10a3ebdf12a107e5815b63c4b4d875845732afc141e97a36754c69baf.jpg) + +![](images/78ec6e24525b839efb97944643595e852ccfc5e367deb68580d51d61aec76ba6.jpg) + +![](images/337b202a17a9074440dd494da7a368a4df8d9e34bf03c55b16c77cce550f3d87.jpg) + +![](images/20040732fa19bd5d996d5390f5952cbb350f2b7c00cdcd48a54664da76d3d5e4.jpg) +Figure 2: Our large-scale dataset contains a large variety of dynamic sequences with segmentation masks and point correspondences between different RGB-D frames. + +![](images/dde0cdda057c9e88bbe8d7040ce382c730c6b6f55f679a51e24d6350d9e9c5f2.jpg) + +![](images/8c42c5df5834c3160da4056cdbbda308733a32562375aa0772fb1d04b70eef82.jpg) + +# 2. Related Work + +Our approach is related to several research areas, such as volumetric 3D scene reconstruction, non-rigid object tracking, and learned correspondence matching. We focus our discussion on the most related RGB-D based techniques. For a detailed discussion, we refer to the recent survey [59]. + +Volumetric Scene Reconstruction Reconstructing static environments with a single RGB-D sensor has had a long history in vision and graphics, including KinectFusion [27, 18], which employs a uniform voxel grid to represent the scene as a truncated signed distance function (TSDF) [4], as well as many extensions to large-scale scenes [49, 2, 40, 29]. These techniques track the 6-DoF camera motion by solving a geometric model-to-frame alignment problem using a fast data-parallel variant of the point-to-plane Iterative Closest Point (ICP) algorithm [30]. Globally consistent reconstruction based on Bundle Adjustment [57, 3] was for a long time only possible offline; data-parallel solvers now enable real-time frame rates [6]. An alternative to TSDFs are point-based scene representations [20, 23, 22]. Recent techniques also employ non-rigid registration to robustly handle loop closures [50, 58]. + +Non-Rigid Reconstruction The reconstruction of general non-rigidly deforming objects based on real-time scan data has a long tradition [44]. One class of methods uses pre-defined templates, e.g., human templates, to capture pose and time-varying shape of clothed humans from RGB-D [54] or stereo camera data [51]. First template-less approaches had slow offline runtimes and only worked for slow and simple motions. The approach of [10] solves a global optimization problem to reconstruct the canonical + +shape of a non-rigidly deforming object given an RGB-D video sequence as input, but does not recover the time-dependent non-rigid motion across the entire sequence. The first approach to demonstrate truly dynamic reconstruction of non-rigid deformation and rest shape in real-time was DynamicFusion [28]. Since this seminal work, many extensions have been proposed. VolumeDeform [17] improves tracking quality based on sparse feature alignment. In addition, they parameterize the deformation field based on a dense volumetric grid instead of a sparse deformation graph. The KillingFusion [36] and SobolevFusion [37] approaches allow for topology changes, but do not recover dense space-time correspondence along the complete input sequence. Other approaches jointly optimize for geometry, albedo, and motion [14] to obtain higher robustness and better quality. The approach of Wang et al. [47] employs global optimization to minimize surface tracking errors. In contrast to these methods using a single RGB-D camera, other techniques use multiple color [7, 43] or depth cameras [52, 45, 9, 8], which enables high-quality reconstruction at the cost of more complex hardware. We propose a new learning-based correspondence matching and reconstruction approach that outperforms existing techniques. + +Learning Rigid Correspondence Matching Historically, correspondence matching for the task of rigid registration has been based on hand-crafted geometry descriptors [19, 11, 42, 32, 31]. If color information is available in addition to depth, SIFT [24] or SURF [1] can be used to establish a sparse set of feature matches between RGB-D frames. More recently, 2D descriptors for feature matching in static scenes have been learned directly from large-scale training corpora [34, 35, 15, 53, 60]. The Matchnet [15] approach employs end-to-end training of a CNN to extract and match patch-based features in 2D image data. Descriptors for the rigid registration of static scenes can be learned and matched directly in 3D space with the 3DMatch [56] architecture. Visual descriptors for dense correspondence estimation can be learned in a self-supervised manner by employing a dense reconstruction approach to automatically label correspondences in RGB-D recordings [33]. Descriptor learning and matching for static scenes has been well-studied, but is lacking in the challenging non-rigid scenario. While class-specific dense matching of non-rigid scenes has been learned for specific object classes [48, 12], none of these techniques can handle arbitrary deforming non-rigid objects. We believe one reason for this is the lack of a large-scale training corpus. In this work, we propose such a corpus and demonstrate how non-rigid matching between depth images can be learned end-to-end. + +RGB-D Datasets While we have seen a plethora of RGB-D datasets for static scenes, such as NYU [26], SUN RGB- + +D [38], and ScanNet [5], the largest of which have thousands of scans, non-rigid RGB-D datasets remain in their infancy. While these datasets can be used to pretrain networks for the task of non-rigid correspondence matching, they do not capture the invariants that are useful for the much harder non-rigid setting, and thus lead to sub-par accuracy. Current non-rigid reconstruction datasets are far too small and often limited to specific scene types [7, 52], which is not sufficient to provide the required training data for supervised learning. The datasets that provide real-world depth recordings [13, 17] do not come with ground truth reconstructions, which makes objectively benchmarking different approaches challenging. Other datasets that are commonly used for evaluation do not provide real-world depth data, e.g., [7, 43]. In this work, we introduce the first large-scale dataset for non-rigid matching based on semi-supervised labeling and provide a benchmark enabling objective comparison of different approaches. + +# 3. Data-driven Non-Rigid Matching + +Our goal is to find matches between a source and a target RGB-D frame. To this end, we propose a network architecture for RGB-D matching based on a Siamese network [21] with two towers. Input to the network are two local patches of size $224 \times 224$ pixels each (with 3 color channels and 3-dimensional points in camera coordinate space). We assume that the source patch is centered at a feature point. + +Heatmap The goal is to predict a probability heatmap $\mathcal{H}$ in the target frame that gives the likelihood of the location of the source point. First, we compute a sigmoid-heatmap: + +$$ +\mathcal {H} _ {\mathrm {s g}} = \sigma_ {\mathrm {s g}} \left(\mathbf {H} \left(D _ {\text {o u t}}\right)\right). +$$ + +It is computed based on a sigmoid activation $\sigma_{\mathrm{sg}}$ to map responses to [0, 1]. Here, $D_{\mathrm{out}}$ is the output feature map of the last layer of the decoder and $\mathbf{H}$ is a convolutional layer converting feature space into heatmap values. This is equivalent to independent binary classification problems per pixel. Second, we also compute a softmax-heatmap: + +$$ +\mathcal {H} _ {\mathrm {s m}} = \sigma_ {\mathrm {s m}} \left(\mathbf {H} \left(D _ {\mathrm {o u t}}\right)\right). +$$ + +Here we use a softmax activation $\sigma_{\mathrm{sm}}$ to make the complete heatmap a probability distribution, i.e., it sums to one. As ground truth for the heatmap prediction we could take an image with zero values everywhere except at the ground truth pixel position that we set to one. To prevent the trained network from predicting only zero values, we apply a Gaussian kernel $G_{x_{gt}}$ around the ground truth pixel. It sets the ground truth pixel's value to one and decays the neighboring pixel values to zero with standard deviation of 7 pixels, resulting in the ground truth heatmap $\mathcal{H}_{\mathrm{gt}}$ . We also add larger weight to pixels close to the ground truth pixel, defining the + +![](images/069b04d12e9299155aa0167e9d6d257ca1d327267575aec48b7d0c3c0bdd8e8a.jpg) +Source RGB-D + +![](images/daeb7b0eda47f63251a046b72ce5fbc72ff9bd8045c7b270ae7e8228af5c8a47.jpg) +Target RGB-D + +![](images/71303e0e85a332bd7faa89abe4cf4893d75fe9a67ca44dc96c4d5edeb2c29fcd.jpg) +Figure 3: We devise an end-to-end architecture for RGB-D matching based on a Siamese network to find matches between a source and a target frame. Our network is based on two towers that share the encoder and have a decoder that predicts two probability heatmaps in the target frame that encode the likelihood of the location of the source point. Our network also predicts a depth value for the matched point and a visibility score that measures if the source point is visible in target frame. + +![](images/79ecbab03072137991562f5d9ebb0869984a035f28bf96df74bf41bc48344bdc.jpg) + +pixel weight as $w_{\mathcal{H}}(x) = 1 + 10 \cdot G_{x_{gt}}(x)$ . The heatmap loss is then computed as: + +$$ +\begin{array}{l} \mathcal {L} _ {\mathcal {H}} = \sum_ {i} \Phi_ {b c e} \left(w _ {\mathcal {H}} \left(\mathcal {H} _ {\mathrm {s g}} - \mathcal {H} _ {\mathrm {g t}}\right)\right) + \\ \lambda_ {\mathrm {n l l}} \sum_ {i} \Phi_ {n l l} \left(w _ {\mathcal {H}} \left(\mathcal {H} _ {\mathrm {s m}} - \mathcal {H} _ {\mathrm {g t}}\right)\right) . \\ \end{array} +$$ + +Here, $\Phi_{bce}(\bullet)$ denotes the binary cross entropy loss and $\Phi_{nll}(\bullet)$ the negative log-likelihood loss, and we empirically determined a weight $\lambda_{\mathrm{nl}} = 10$ . From these two probability heatmaps, a single one is computed as $\mathcal{H} = \mathcal{H}_{sg}\otimes \mathcal{H}_{sm}$ , where $\otimes$ is the Hadamard product. + +Depth In addition to heatmap prediction, our network also predicts the matched point's depth value in the target camera's coordinate system. Inspired by [25], we predict the depth densely, predicting the same depth value for every pixel in the output image: + +$$ +\mathcal {D} = \exp \left(\mathbf {D} (D _ {\mathrm {o u t}})\right) . +$$ + +Here, $\mathbf{D}$ is a convolutional layer converting feature space into depth values, and the exponential is applied to guarantee positive depth predictions. Ground truth for depth prediction $\mathcal{D}_{\mathrm{gt}}$ is the depth of the ground truth match, repeated for the whole image. Since we want to encourage depth prediction to focus on the matched pixel, we again use pixel weighting, this time in the form of $w_{\mathcal{D}}(x) = G_{x_{gt}}(x)$ , setting the center pixel's weight to 1 and decaying the weights to 0. Using the weighted version of mean squared error $\Phi_{mse}(\bullet)$ we employ the following loss for depth prediction: + +$$ +\mathcal {L} _ {\mathcal {D}} = \lambda_ {\mathrm {d}} \sum_ {i} \Phi_ {m s e} (w _ {\mathcal {D}} (\mathcal {D} - \mathcal {D} _ {\mathrm {g t}})). +$$ + +Visibility Furthermore, we also predict a visibility score $\in [0,1]$ that measures whether the source point is visible (high value) or occluded (low value) in the target frame: + +$$ +\mathcal {V} = \sigma_ {\mathrm {s g}} \left(\mathbf {V} \left(B _ {\mathrm {o u t}}\right)\right). +$$ + +Here, $B_{\mathrm{out}}$ is the output feature map of the bottleneck layer, $\mathbf{V}$ is a convolutional layer, and $\sigma_{\mathrm{sg}}$ a sigmoid activation. The visibility loss takes the following form: + +$$ +\mathcal {L} _ {\mathcal {V}} = \sum_ {i} \Phi_ {b c e} (\mathcal {V} - \mathcal {V} _ {\mathrm {g t}}) . +$$ + +In the end, we train the network using a weighted combination of all presented loss functions: + +$$ +\mathcal {L} = \mathcal {L} _ {\mathcal {H}} + \lambda_ {\mathcal {D}} \mathcal {L} _ {\mathcal {D}} + \lambda_ {\mathcal {V}} \mathcal {L} _ {\mathcal {V}}. +$$ + +In all experiments we use the constant and empirically determined weights $\lambda_{\mathcal{D}} = 100$ and $\lambda_{\mathcal{V}} = 1$ . An overview of the network architecture is given in Fig. 3. More network and training details can be found in the supplemental. + +# 4. Non-Rigid Reconstruction Pipeline + +We integrate the learned non-rigid matching algorithm into a non-rigid RGB-D reconstruction framework that efficiently tracks dense, space-time coherent, non-rigid deformations on the GPU and also provides an efficient volumetric fusion backend. A canonical model of the scene is reconstructed from data, in parallel to tracking the non-rigid deformations, and stored based on a truncated signed distance field (TSDF) represented by a uniform voxel grid. New observations are fused into the grid based on an exponentially moving average. The non-rigid scene motion is tracked based on the following tracking energy: + +$$ +E _ {\text {t o t a l}} (\mathcal {T}) = E _ {\text {d a t a}} (\mathcal {T}) + \lambda_ {\text {l e a n e d}} E _ {\text {l e a n e d}} (\mathcal {T}) + \lambda_ {\text {r e g}} E _ {\text {r e g}} (\mathcal {T}). +$$ + +The weights $\lambda_{\mathrm{learned}} = 1$ and $\lambda_{\mathrm{reg}} = 1$ are empirically determined and balance the different terms. + +# 4.1. Deformation Model + +To parameterize scene motion, similar to [41], we employ a coarse deformation graph $\mathcal{G}$ with $K$ deformation nodes $\mathbf{g}_i\in \mathbb{R}^3$ . The graph models the deformation of space based on the convex combination of local per-node transformations that are parameterized by rotation parameters $\theta_{i}\in \mathbb{R}^{3}$ in Lie algebra space and a translation vector $\mathbf{t}_i\in \mathbb{R}^3$ . In total, this leads to $2k$ free variables to describe scene motion that we jointly refer to as $\mathcal{T}$ . This enables us to decouple the number of free variables from the complexity of the reconstructed scene. The deformation nodes are connected based on proximity, for details we refer to the original embedded deformation paper [41]. + +# 4.2. Optimization Terms + +For data term $E_{\mathrm{data}}(\mathcal{T})$ , similar to [28, 17], we employ dense point-to-point and point-to-plane alignment constraints between the input depth map and the current reconstruction. For regularizer $E_{\mathrm{reg}}$ , we employ the as-rigid-as-possible (ARAP) constraint [39] to enforce locally rigid motion. In addition, we integrate a sparse feature alignment term based on our learned correspondences (see Sec. 3). For each node $\mathbf{g}_i$ of the current deformation graph, we predict a probability heatmap $\mathcal{H}_i$ that gives the likelihood of its 2D uv-position in the current input depth map, using the initial depth map as the reference frame. Furthermore, we also back-project the pixel with the maximum heatmap response into a 3D point $\mathbf{p}_i \in \mathbb{R}^3$ , using its depth. We aim to align the graph nodes with the maximum in the corresponding heatmap using the following alignment constraint: + +$$ +\begin{array}{l} E _ {\text {l e a r n e d}} (\mathcal {T}) = \sum_ {g _ {i} \in \mathcal {G}} \left(1 - \mathcal {H} _ {i} \left(\pi \left(\mathbf {g} _ {i} + \mathbf {t} _ {i}\right)\right)\right) ^ {2} + \\ \lambda_ {p o i n t} \sum_ {g _ {i} \in \mathcal {G}} \left(\mathbf {g} _ {i} + \mathbf {t} _ {i} - \mathbf {p} _ {i}\right) ^ {2}. \\ \end{array} +$$ + +Here, $\pi : \mathbb{R}^3 \to \mathbb{R}^2$ is the projection from 3D camera space to 2D screen space. The heatmap $\mathcal{H}_i$ is normalized to a maximum of 1. We empirically set $\lambda_{point} = 10$ . In order to handle outliers, especially in the case of occluded correspondences, we make use of the predicted visibility score and the predicted depth value of the match. We filter out all heatmap correspondences with visibility score $< 0.5$ . We compare the predicted depth with the queried depth from the target frame's depth map at the pixel with the maximum heatmap response and invalidate any correspondences with a depth difference $> 0.15$ meters. + +# 4.3. Energy Optimization + +We efficiently tackle the underlying optimization problem using a data-parallel Gauss-Newton solver to find the + +deformation graph $\mathcal{G}^*$ that best explains the data: + +$$ +\mathcal {G} ^ {*} = \operatorname {a r g m i n} E _ {\text {t o t a l}} (\mathcal {G}). +$$ + +In the Gauss-Newton solver, we solve the underlying sequence of linear problems using data-parallel preconditioned conjugate gradient (PCG). For implementation details, we refer to the supplemental document. + +# 5. Semi-supervised Data Acquisition + +In the following, we provide the details of our semi-supervised non-rigid data collection process that is used for training the non-rigid matching and for the evaluation of non-rigid reconstruction algorithms. The high-level overview of the data acquisition pipeline is shown in Fig. 1. + +# 5.1. Data Acquisition + +In order to obtain RGB-D scans of non-rigidly moving objects, we use a Structure Sensor mounted on an iPad. The depth stream is recorded at a resolution of $640 \times 480$ and 30 frames per second; the RGB stream is captured with the iPad camera at a resolution of $1296 \times 968$ pixels that is calibrated with respect to the range sensor. Regarding the scanning instructions, we follow the ScanNet [5] pipeline. However, in our case, we focus on scenes with one up to several non-rigidly moving objects in addition to a static background. In total, we recorded 400 scenes with over 390,000 RGB-D frames. + +# 5.2. Data Annotation + +We crowd sourced sparse ground truth correspondence annotations and segmentation masks for our novel data set. To this end, we employed a web-based annotation tool. The annotation was divided into two tasks. Firstly, we select up to 10 frames per sequence. All dynamic objects that are found in these frames are given unique instance ids (the same instance in the whole sequence) and their masks are annotated in each frame. To accelerate mask segmentation, we use a hierarchy of superpixels as candidate brush sizes. Secondly, among the annotated frames up to 10 frame pairs are selected, and the sparse correspondences between all dynamic objects are annotated. Expert annotators were instructed to annotate correspondences uniformly over the complete object, labeling about 20 point matches per frame pair. Furthermore, in parts of the source image that are occluded in the target image occlusion points were uniformly selected to collect data samples for visibility detection. The dynamic object segmentation task takes on average about 1 min per frame, while the correspondence labeling task takes on average about 2 min per frame. + +# 5.3. Dense Data Alignment + +Using the annotated object masks and the sparse matches, dense non-rigid alignment of the frame pairs is + +performed. We follow a similar approach as for non-rigid reconstruction (see Sec. 4), based on the sparse deformation graph of [41]. The deformation graph is defined on the source frame's depth map, covering only the dynamic object by using the source object mask. The final energy function that is optimized to align the source RGB-D frame to the target RGB-D frame is: + +$$ +\begin{array}{l} E _ {\text {t o t a l}} (\mathcal {T}) = E _ {\text {d a t a}} (\mathcal {T}) + \lambda_ {\text {p h o t o}} E _ {\text {p h o t o}} (\mathcal {T}) + \lambda_ {\text {s i l h}} E _ {\text {s i l h}} (\mathcal {T}) + \\ \lambda_ {\text {s p a r s e}} E _ {\text {s p a r s e}} (\mathcal {T}) + \lambda_ {\text {r e g}} E _ {\text {r e g}} (\mathcal {T}). \\ \end{array} +$$ + +Here, $E_{\mathrm{photo}}(\mathcal{T})$ encourages the color gradient values from the source frame to match the target frame, $E_{\mathrm{sih}}$ penalizes deformation of the object outside of the target frame's object mask, and $E_{\mathrm{sparse}}$ enforces annotated sparse matches to be satisfied. The weights $\lambda_{\mathrm{photo}} = 0.001$ , $\lambda_{\mathrm{sih}} = 0.0001$ , $\lambda_{\mathrm{sparse}} = 100.0$ and $\lambda_{\mathrm{reg}} = 10.0$ have been empirically determined. Details about the different optimization terms and a qualitative comparison of their effects can be found in the supplemental document. In order to cope with simple apparent topology changes that are very common while capturing natural non-rigid motion, such as the hand touching the body in one frame and moving away in another frame, we execute non-rigid alignment in both directions and compute the final non-rigid alignment using forward-backward motion interpolation, similar to [55]. At the end, a quick manual review step is performed, in which, if necessary, any incorrectly aligned mesh parts are removed. The review step takes about 30 seconds per frame. Examples of dense alignment results and the employed review interface can be found in the accompanying video. + +# 6. Experiments + +We provide a train-val-test split with 340 sequences in the training set, 30 in the test set, and 30 in the validation set. We made sure that there is no overlap between captured environments between training and validation/test scenes. + +# 6.1. Non-Rigid Matching Evaluation + +For a given set of pixels (and corresponding 3D points) in the source image, the task is to find the corresponding pixel (and 3D point) in the target image. We evaluate the average 2D pixel and 3D point error (in meters), and compute the matching accuracy (ratio of matches closer than 20 pixels or 0.05 meters from the ground truth correspondences). We compare our non-rigid matching approach to several handcrafted feature matching strategies, that are based on depth or color based descriptors, and to the learned 3Dmatch [56] descriptor, see Tab. 1. Specifically, we compare to the handcrafted geometry descriptors, such as Unique Signatures of Histograms (SHOT) [42] and the Fast Point Feature Histograms (FPFH) [31]. We also compare to color-based descriptors, e.g., SIFT [24] and SURF [1], that can be used to + +
Method2D-err3D-err2D-acc3D-acc
SIFT [24]138.400.55216.2014.08
SURF [1]125.720.47622.1319.82
SHOT [42]105.340.34213.4311.51
FPFH [31]109.490.39310.859.43
3Dmatch [56]68.980.27330.5025.33
GPC [46]65.040.23131.9328.16
FlowNet-2.0 [16]27.320.11868.6863.67
Ours-12.5%78.820.26827.1723.28
Ours-25.0%58.280.19740.3235.81
Ours-50.0%45.430.15650.7046.57
Ours-Rigid57.870.27040.9335.64
Ours-SelfSupervised33.340.12160.8755.70
Ours-Sparse31.420.10658.5352.24
Ours-NoWeighting23.720.08373.1368.46
Ours19.560.07377.6072.48
+ +Table 1: We outperform all baseline matching methods by a considerable margin. 2D/3D errors are average pixel/point errors, and 2D/3D accuracy is the percentage of pixels/points with distance of at most 20 pixels/0.05 meters. + +establish a sparse set of matches been RGB-D frames. Finally, we train a learned descriptor from [56], patch-based random forest matcher from [46] and optical flow prediction network from [16] on our training sequences. Our method consistently outperforms all the baselines. + +# 6.2. Non-Rigid Reconstruction Results + +We integrated our learned matching strategy into a non-rigid reconstruction pipeline. Our learned data term significantly improves reconstruction quality, both qualitatively and quantitatively. To be able to perform a quantitative comparison on our test sequences, we used our reimplementation of [28], and the code or results provided from the authors of [17, 36, 37, 14]. We also replaced our data-driven correspondence matching module with the descriptor learning network from [56], trained on our data, and used it in combination with 3D Harris keypoints. The quantitative evaluation is shown in Tab. 2. The evaluation metrics measure deformation error (a 3D distance between the annotated and computed correspondence positions) and geometry error (comparing depth values inside the object mask to the reconstructed geometry). Deformation error is the more important metric, since it also measures tangential drift within the surface. To be able to know which dynamic object to reconstruct if multiple are present, we always provide the initial ground truth segmentation mask of the selected object. All approaches in Tab. 2 were evaluated on all 30 test sequences to provide a comparison on different kinds of objects and deformable motions. [14] provided results on two challenging test sequences, their average deformation and geometry error are $21.05\mathrm{cm}$ and $14.87\mathrm{cm}$ respectively, while our approach achieves average errors of $3.63\mathrm{cm}$ and $0.48\mathrm{cm}$ . Our approach outperforms the state of the art by a large margin. The methods [36] and [37] do not + +
MethodDef. error (cm)Geo. error (cm)
DynamicFusion re-impl. [28]6.311.08
VolumeDeform [17]21.277.78
DynamicFusion + 3Dmatch6.641.59
Ours-Rigid12.212.30
Ours-Sparse8.240.77
Ours-SelfSupervised5.470.54
Ours-Base3.940.43
Ours-Occlusion3.700.42
Ours-Occlusion+Depth3.280.41
+ +Table 2: Comparison with state-of-the-art approaches. Our learned correspondences significantly improve both tracking and reconstruction quality. We also provide ablation studies on training data type and different network parts. + +compute explicit point correspondences from the canonical frame to other frames, so we could not evaluate these approaches quantitatively; we provide qualitative comparison on our sequences in the supplemental document. We also show qualitative comparisons with our re-implementation of DynamicFusion [28] in Fig. 4 and with the state-of-the-art approach of [14] in Fig. 5. Our learned correspondences enable us to handle faster object motion as well as challenging planar motion, where even photometric cues fail, for instance due to uniform object color. + +# 6.3. Ablation Study + +We evaluated different components of our network and their effect on the reconstruction quality, see Tab. 2. Since some sequences include motions in which large parts of the reconstructed object are occluded, as can be observed in Fig. 6, using visibility detection for correspondence pruning makes our method more robust. Furthermore, since depth measurements and heatmap predictions can both be sometimes noisy, adding correspondence filtering with depth prediction further improves the reconstruction results. + +# 6.4. Data Generation Evaluation + +To show the importance of our semi-supervised strategy for constructing the training corpus, we evaluate how different training corpora influence the performance of data-driven reconstruction methods. Aside from our training data, which has been generated using dense semi-supervised frame alignment, we used a publicly available rigid dataset of indoor scenes (from [5]), self-supervised alignment of our sequences (as in [33]), and only manually annotated sparse samples from our dataset. We provide comparison on both non-rigid matching in Tab. 1 and non-rigid reconstruction in Tab. 2. Using only rigid data does not generalize to non-rigid sequences. While sparse matches already improve network performance, there is not enough data for reliable correspondence prediction on every part of the observed object. In addition, annotated sparse matches are usually matches on image parts that are easy for hu + +![](images/976548362c67a7b43926529fba58f631e71d29af518415f5748cdcb0c30f22bc.jpg) +Figure 4: Qualitative comparison to DynamicFusion (reimplementation). + +mans to match, and there are much less accurate correspondences in areas with uniform color. In the self-supervised setting, the network gets dense correspondence information, which improves the method's reconstruction performance compared to using only sparse features. However, without semi-supervised densely aligned frame pairs, we can only generate matches for the simple deformations, where the DynamicFusion approach can successfully track the motion. Therefore, the performance of the network trained only on self-supervised data degrades considerably on more extreme deformations, as can be seen in Fig. 7. Dense alignment of too far away frames is needed for accurate network prediction also in the case of extreme deformations. Since the majority of the dense aligned matches is still moving rigidly, it turned out to be beneficial to sample more deformable samples during training. In order to estimate which parts of the scene are more deformable, we employed sparsely annotated matches and ran RANSAC in combination with a Procrustes algorithm to estimate the average rigid pose. The more the motion of each sampled match differs from the average rigid motion, the more often we sample it during network training using a multinomial distribution of the non-rigid displacement weights. This + +![](images/33b895bf8194a42bdde133fb555a18101090c88ab619de31bdaa9a0da6c260dd.jpg) +Figure 5: Qualitative comparison of reconstruction results of our method and MonoFVV [14]. Reconstruction results were kindly provided by the authors. + +![](images/ef18f05d2096ece50938936bad64e184483499ef7b65e912f2fd8f2989633ac2.jpg) +Figure 6: Visibility detection enables filtering of network correspondences that are occluded. The visibility score is in the range [0, 1], it is high for visible correspondences and low for occluded parts. We filter out all correspondences with visibility score less than 0.50. + +strategy improved the network performance, as is shown in Tab. 1, compared to training on non-weighted samples. Finally, we demonstrate how much data is needed to achieve robust correspondence prediction performance; i.e., using less training data considerably degrades matching accuracy, as summarized in Tab. 1, where we trained networks using only $12.5\%$ , $25.0\%$ , and $50.0\%$ of the training data. + +![](images/a43b9c935508934021dfa37d065faacb6048e295507dc00bddbb2706ee6c78cf.jpg) +Figure 7: Comparison of correspondence prediction for reference frame (left) using self-supervised training data (middle) and semi-supervised dense data (right). + +# 6.5. Limitations + +While learned correspondences make tracking of fast motion more robust, there is still room for improvement when reconstructing dynamic objects. One pressing issue is that background clutter might be accidentally fused with the object when the object is close to the background. In this case, the reconstructed shape would slowly grow and we might also start reconstructing the background. This can cause wrong deformation graph connectivity and lead to tracking failures. A potential future avenue is to subtract and ignore the background; e.g., we could use our annotated object masks to develop a data-driven method. + +# 7. Conclusion + +We have proposed a neural network architecture for matching correspondences in non-rigid sequences that operates on RGB-D frames and demonstrated that our learned descriptors outperform existing hand-crafted ones. In addition, we introduced the first large-scale dataset that is composed of 400 scenes, over 390,000 RGB-D frames, and 5,533 densely aligned frame pairs. The dataset is obtained with a semi-supervised strategy by combining self-supervision with sparse annotations to obtain dense interframe correspondences. We also provide a test set along with several metrics for evaluating non-rigid matching and non-rigid reconstruction. We believe that our dataset is a first step towards enabling learning-based non-rigid matching and our benchmark will help to quantitatively and objectively compare different approaches. + +# Acknowledgements + +We would like to thank the expert annotators Sathya Ashok, Omar Heyadayat, Haya Irfan, Azza Jenane, Soh Yee Lee, Suzana Spasova, and Weile Weng for their efforts in building the dataset. We further thank Edgar Tretschk for his help with data collection, Xiaochen Fan for his valuable contributions during his research visit, and Armen Avetisyan for numerous helpful discussions. This work was supported by the Max Planck Center for Visual Computing and Communications (MPC-VCC), a TUM-IAS Rudolf Moßbauer Fellowship, the ERC Starting Grant Scan2CAD (804724), the ERC Consolidator Grant 4DRepLy (770784), and the German Research Foundation (DFG) Grant Making Machine Learning on Static and Dynamic 3D Data Practical. + +# References + +[1] Herbert Bay, Andreas Ess, Tinne Tuytelaars, and Luc Van Gool. Speeded-up robust features (surf). Comput. Vis. Image Underst., 110(3):346-359, June 2008. 3, 6 +[2] Jiawen Chen, Dennis Bautembach, and Shahram Izadi. Scalable real-time volumetric surface reconstruction. ACM Trans. on Graphics (Proc. SIGGRAPH), 32(4):113:1-113:16, July 2013. 2 +[3] Sungjoon Choi, Qian-Yi Zhou, and Vladlen Koltun. Robust reconstruction of indoor scenes. In Proc. IEEE Conf. Computer Vision and Pattern Recognition, pages 5556-5565, 2015. 2 +[4] B. Curless and M. Levoy. A volumetric method for building complex models from range images. In Proc. Comp. Graph. & Interact. Techn., pages 303-312, 1996. 2 +[5] Angela Dai, Angel X. Chang, Manolis Savva, Maciej Halber, Thomas Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In Proc. Computer Vision and Pattern Recognition (CVPR), IEEE, 2017. 3, 5, 7 +[6] Angela Dai, Matthias Nießner, Michael Zollhöfer, Shahram Izadi, and Christian Theobalt. BundleFusion: real-time globally consistent 3D reconstruction using on-the-fly surface re-integration. ACM Trans. on Graphics, 36(3), 2017. 2 +[7] Edilson de Aguiar, Carsten Stoll, Christian Theobalt, Naveed Ahmed, Hans-Peter Seidel, and Sebastian Thrun. Performance capture from sparse multi-view video. ACM Trans. Graph., 27(3):98:1-98:10, Aug. 2008. 3 +[8] Mingsong Dou, Philip Davidson, Sean Ryan Fanello, Sameh Khamis, Adarsh Kowdle, Christoph Rhemann, Vladimir Tankovich, and Shahram Izadi. Motion2fusion: real-time volumetric performance capture. ACM Transactions on Graphics (TOG), 36(6):246, 2017. 1, 3 +[9] Mingsong Dou, Sameh Khamis, Yury Degtyarev, Philip Davidson, Sean Ryan Fanello, Adarsh Kowdle, Sergio Orts Escolano, Christoph Rhemann, David Kim, Jonathan Taylor, et al. Fusion4d: Real-time performance capture of challenging scenes. ACM Transactions on Graphics (TOG), 35(4):114, 2016. 1, 3 +[10] Mingsong Dou, Jonathan Taylor, Henry Fuchs, Andrew Fitzgibbon, and Shahram Izadi. 3d scanning deformable objects with a single rgbd sensor. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 493-501, 2015. 2 +[11] Andrea Frome, Daniel Huber, Ravi Kolluri, Thomas Bulow, and Jitendra Malik. Recognizing objects in range data using regional point descriptors. volume 3, pages 224-237, 05 2004. 3 +[12] Thibault Groueix, Matthew Fisher, Vladimir G. Kim, Bryan Russell, and Mathieu Aubry. 3d-coded : 3d correspondences by deep deformation. In ECCV, 2018. 3 +[13] Kaiwen Guo, Feng Xu, Yangang Wang, Yebin Liu, and Qionghai Dai. Robust non-rigid motion tracking and surface reconstruction using 10 regularization. IEEE Transaction on Visualization and Computer Graphics (TVCG), 2017. 3 +[14] Kaiwen Guo, Feng Xu, Tao Yu, Xiaoyang Liu, Qionghai Dai, and Yebin Liu. Real-time geometry, albedo, and motion re + +construction using a single rgb-d camera. ACM Transactions on Graphics (TOG), 36(3):32, 2017. 1, 3, 6, 7, 8 +[15] X. Han, T. Leung, Y. Jia, R. Sukthankar, and A. C. Berg. Matchnet: Unifying feature and metric learning for patch-based matching. In 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3279-3286, June 2015. 3 +[16] Eddy Ilg, Nikolaus Mayer, Tonmoy Saikia, Margret Keuper, Alexey Dosovitskiy, and Thomas Brox. Flownet 2.0: Evolution of optical flow estimation with deep networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2462-2470, 2017. 6 +[17] Matthias Innmann, Michael Zollhöfer, Matthias Nießner, Christian Theobalt, and Marc Stamminger. Volumedeform: Real-time volumetric non-rigid reconstruction. In European Conference on Computer Vision, pages 362-379. Springer, 2016. 1, 3, 5, 6, 7 +[18] S. Izadi, D. Kim, O. Hilliges, D. Molyneaux, R. Newcombe, P. Kohli, J. Shotton, S. Hodges, D. Freeman, A. Davison, and A. Fitzgibbon. KinectFusion: real-time 3D reconstruction and interaction using a moving depth camera. In Proc. ACM Symp. User Interface Softw. & Tech., pages 559-568, 2011. 2 +[19] Andrew E. Johnson and Martial Hebert. Using spin images for efficient object recognition in cluttered 3d scenes. IEEE Trans. Pattern Anal. Mach. Intell., 21(5):433-449, May 1999. 3 +[20] Maik Keller, Damien Lefloch, Martin Lambers, Shahram Izadi, Tim Weyrich, and Andreas Kolb. Real-time 3D reconstruction in dynamic scenes using point-based fusion. In Proc. Int. Conf. 3D Vision (3DV), pages 1-8, Washington, DC, USA, 2013. IEEE Computer Society. 2 +[21] B. G. Vijay Kumar, Gustavo Carneiro, and Ian D. Reid. Learning local image descriptors with deep siamese and triplet convolutional networks by minimising global loss functions. CoRR, abs/1512.09272, 2015. 3 +[22] D. Lefloch, M. Kluge, H. Sarbolandi, T. Weyrich, and A. Kolb. Comprehensive use of curvature for robust and accurate online surface reconstruction. IEEE Trans. Pattern Analysis and Machine Intelligence (PAMI), page 10.1109/TPAMI.2017.2648803, 2017. 2 +[23] Damien Lefloch, Tim Weyrich, and Andreas Kolb. Anisotropic point-based fusion. In Proc. Int. Conf. Information Fusion (FUSION), pages 1-9, July 2015. 2 +[24] David G. Lowe. Distinctive image features from scale-invariant keypoints. Int. J. Comput. Vision, 60(2):91-110, Nov. 2004. 3, 6 +[25] Dushyant Mehta, Srinath Sridhar, Oleksandr Sotnychenko, Helge Rhodin, Mohammad Shafiei, Hans-Peter Seidel, Weipeng Xu, Dan Casas, and Christian Theobalt. Vnect: Real-time 3d human pose estimation with a single rgb camera. ACM Transactions on Graphics (TOG), 36(4):44, 2017. 4 +[26] Pushmeet Kohli Nathan Silberman, Derek Hoiem and Rob Fergus. Indoor segmentation and support inference from rgbd images. In ECCV, 2012. 3 + +[27] Richard A Newcombe, Andrew J Davison, Shahram Izadi, Pushmeet Kohli, Otmar Hilliges, Jamie Shotton, David Molyneaux, Steve Hodges, David Kim, and Andrew Fitzgibbon. KinectFusion: real-time dense surface mapping and tracking. In Proc. IEEE Int. Symp. Mixed and Augmented Reality (ISMAR), pages 127-136, 2011. 2 +[28] Richard A Newcombe, Dieter Fox, and Steven M Seitz. Dynamicfusion: Reconstruction and tracking of non-rigid scenes in real-time. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 343-352, 2015. 1, 2, 3, 5, 6, 7 +[29] Matthias Nießner, Michael Zollhöfer, Shahram Izadi, and Marc Stamminger. Real-time 3D reconstruction at scale using voxel hashing. ACM Trans. on Graphics, 32(6):169, 2013. 2 +[30] Szymon Rusinkiewicz and Marc Levoy. Efficient variants of the ICP algorithm. In Int. Conf. 3D Digital Imaging and Modeling (3DIM), pages 145-152. IEEE, 2001. 2 +[31] Radu Bogdan Rusu, Nico Blodow, and Michael Beetz. Fast point feature histograms (fpfh) for 3d registration. In Proceedings of the 2009 IEEE International Conference on Robotics and Automation, ICRA'09, pages 1848-1853, Piscataway, NJ, USA, 2009. IEEE Press. 3, 6 +[32] R. B. Rusu, N. Blodow, Z. C. Marton, and M. Beetz. Aligning point cloud views using persistent feature histograms. In 2008 IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 3384-3391, Sep. 2008. 3 +[33] Tanner Schmidt, Richard A. Newcombe, and Dieter Fox. Self-supervised visual descriptor learning for dense correspondence. IEEE Robotics and Automation Letters, 2(2):420-427, 2017. 2, 3, 7 +[34] Edgar Simo-Serra, Eduard Trulls, Luis Ferraz, Iasonas Kokkinos, Pascal Fua, and Francesc Moreno-Noguer. Discriminative learning of deep convolutional feature point descriptors. In ICCV, pages 118-126. IEEE Computer Society, 2015. 3 +[35] K. Simonyan, A. Vedaldi, and A. Zisserman. Learning local feature descriptors using convex optimisation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 36(8):1573-1585, Aug 2014. 3 +[36] Miroslava Slavcheva, Maximilian Baust, Daniel Cremers, and Slobodan Ilic. Killingfusion: Non-rigid 3d reconstruction without correspondences. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), volume 3, page 7, 2017. 1, 3, 6 +[37] Miroslava Slavcheva, Maximilian Baust, and Slobodan Ilic. Sobolevfusion: 3d reconstruction of scenes undergoing free non-rigid motion. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2646-2655, 2018. 1, 3, 6 +[38] Shuran Song, Samuel P. Lichtenberg, and Jianxiong Xiao. Sun rgb-d: A rgb-d scene understanding benchmark suite. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. 3 +[39] Olga Sorkine and Marc Alexa. As-rigid-as-possible surface modeling. In Proceedings of the Fifth Eurographics Symposium on Geometry Processing, SGP '07, pages 109–116, + +Aire-la-Ville, Switzerland, Switzerland, 2007. Eurographics Association. 5 +[40] Frank Steinbrucker, Christian Kerl, and Daniel Cremers. Large-scale multi-resolution surface reconstruction from rgb-d sequences. In Proceedings of the IEEE International Conference on Computer Vision, pages 3264-3271, 2013. 2 +[41] Robert W. Sumner, Johannes Schmid, and Mark Pauly. Embedded deformation for shape manipulation. In ACM SIGGRAPH 2007 Papers, SIGGRAPH '07, New York, NY, USA, 2007. ACM. 5, 6 +[42] Federico Tombari, Samuele Salti, and Luigi Di Stefano. Unique signatures of histograms for local surface description. In Proceedings of the 11th European Conference on Computer Vision Conference on Computer Vision: Part III, ECCV'10, pages 356-369, Berlin, Heidelberg, 2010. Springer-Verlag. 3, 6 +[43] Daniel Vlasic, Ilya Baran, Wojciech Matusik, and Jovan Popovic. Articulated mesh animation from multi-view silhouettes. In ACM SIGGRAPH 2008 Papers, SIGGRAPH '08, pages 97:1-97:9, New York, NY, USA, 2008. ACM. 3 +[44] Michael Wand, Bart Adams, Maksim Ovsjanikov, Alexander Berner, Martin Bokeloh, Philipp Jenke, Leonidas Guibas, Efficient reconstruction of nonrigid shape and motion from real-time 3d scanner data. ACM Transactions on Graphics (TOG), 28(2):15, 2009. 2 +[45] Ruizhe Wang, Lingyu Wei, Etienne Vouga, Qi-Xing Huang, Duygu Ceylan, Gerard G. Medioni, and Hao Li. Capturing dynamic textured surfaces of moving targets. CoRR, abs/1604.02801, 2016. 3 +[46] Shenlong Wang, Sean Ryan Fanello, Christoph Rhemann, Shahram Izadi, and Pushmeet Kohli. The global patch collider. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 127-135, 2016. 6 +[47] Sen Wang, Xinxin Zuo, Chao Du, Runxiao Wang, Jiangbin Zheng, and Ruigang Yang. Dynamic non-rigid objects reconstruction with a single rgb-d sensor. Sensors, 18(3):886, 2018. 1, 3 +[48] Lingyu Wei, Qixing Huang, Duygu Ceylan, Etienne Vouga, and Hao Li. Dense human body correspondences using convolutional networks. In Computer Vision and Pattern Recognition (CVPR), 2016. 1, 3 +[49] Thomas Whelan, Michael Kaess, Maurice Fallon, Hordur Johannsson, John Leonard, and John McDonald. Kintinous: Spatially extended Kinectfusion. In Proc. RSS Workshop on RGB-D: Advanced Reasoning with Depth Cameras, 2012. 2 +[50] Thomas Whelan, Stefan Leutenegger, Renato F Salas-Moreno, Ben Glocker, and Andrew J Davison. Elasticfusion: Dense SLAM without a pose graph. In Proceedings of Robotics: Science and Systems, 2015. 2 +[51] Chenglei Wu, Carsten Stoll, Levi Valgaerts, and Christian Theobalt. On-set performance capture of multiple actors with a stereo camera. ACM Trans. Graph., 32(6):161:1-161:11, 2013. 2 +[52] Genzhi Ye, Yebin Liu, Nils Hasler, Xiangyang Ji, Qionghai Dai, and Christian Theobalt. Performance Capture of Interacting Characters with Handheld Kinects. In Proc. ECCV, pages 828-841. Springer, 2012. 3 + +[53] Kwang Moo Yi, Eduard Trulls, Vincent Lepetit, and Pascal Fua. Lift: Learned invariant feature transform. CoRR, abs/1603.09114, 2016. 3 +[54] Tao Yu, Zherong Zheng, Kaiwen Guo, Jianhui Zhao, Qionghai Dai, Hao Li, Gerard Pons-Moll, and Yebin Liu. DoubleFusion: Real-time Capture of Human Performances with Inner Body Shapes from a Single Depth Sensor. In 31st IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 2018. 2 +[55] Konstantinos Zampogiannis, Cornelia Fermuller, and Yiannis Aloimonos. Topology-aware non-rigid point cloud registration. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2019. 6 +[56] Andy Zeng, Shuran Song, Matthias Nießner, Matthew Fisher, Jianxiong Xiao, and Thomas Funkhouser. 3dmatch: Learning local geometric descriptors from rgb-d reconstructions. In CVPR, 2017. 3, 6 + +[57] Qian-Yi Zhou and Vladlen Koltun. Dense scene reconstruction with points of interest. ACM Trans. on Graphics, 32(4):112, 2013. 2 +[58] Qian-Yi Zhou, Stephen Miller, and Vladlen Koltun. Elastic fragments for dense scene reconstruction. In Proc. IEEE Conf. Computer Vision and Pattern Recognition, pages 473-480, 2013. 2 +[59] M. Zollhöfer, P. Stotko, A. Görlitz, C. Theobalt, M. Nießner, R. Klein, and A. Kolb. State of the Art on 3D Reconstruction with RGB-D Cameras. Computer Graphics Forum (Eurographics State of the Art Reports 2018), 37(2), 2018. 2 +[60] Jure Zbontar and Yann LeCun. Computing the stereo matching cost with a convolutional neural network. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2015, volume 07-12-June-2015, pages 1592-1599. IEEE Computer Society, 10 2015. 3 \ No newline at end of file diff --git a/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/images.zip b/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..282e51e68855b718dc22d9fb3ca375a3b99300bf --- /dev/null +++ b/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:884d9062f2bc42ef953b2206fa4841731f1c12f7d75026afd0aa4cc1b460f447 +size 530023 diff --git a/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/layout.json b/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..31cbb690f955485e2612d241e8c3643a1b6ad4c8 --- /dev/null +++ b/deepdeformlearningnonrigidrgbdreconstructionwithsemisuperviseddata/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07ef50e09ada701ff2a56ca048ac1d659cdb7dc16b4ff6ea337b48030fe2ad3a +size 371386 diff --git a/deepdegradationpriorforlowqualityimageclassification/4e3b541d-0422-41a2-b064-b3a09907dd40_content_list.json b/deepdegradationpriorforlowqualityimageclassification/4e3b541d-0422-41a2-b064-b3a09907dd40_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..7a8cf3718e70367f5e147e3f8acb8f0e88e54be1 --- /dev/null +++ b/deepdegradationpriorforlowqualityimageclassification/4e3b541d-0422-41a2-b064-b3a09907dd40_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ad46c88cb33d90785ab6396eabb1d832d9a0be1d3316b6a3a7788ff9cd37672 +size 81635 diff --git a/deepdegradationpriorforlowqualityimageclassification/4e3b541d-0422-41a2-b064-b3a09907dd40_model.json b/deepdegradationpriorforlowqualityimageclassification/4e3b541d-0422-41a2-b064-b3a09907dd40_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2aa08c7b1d8c4184d2a9138505f7f08623d47882 --- /dev/null +++ b/deepdegradationpriorforlowqualityimageclassification/4e3b541d-0422-41a2-b064-b3a09907dd40_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b773f8471a76bff8ff18403e53f189b4a706956e3b9e0896f59eb7d07f1d3b56 +size 105930 diff --git a/deepdegradationpriorforlowqualityimageclassification/4e3b541d-0422-41a2-b064-b3a09907dd40_origin.pdf b/deepdegradationpriorforlowqualityimageclassification/4e3b541d-0422-41a2-b064-b3a09907dd40_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f4dc0ec050de5a65d0b7a2376c041ab84efcc43e --- /dev/null +++ b/deepdegradationpriorforlowqualityimageclassification/4e3b541d-0422-41a2-b064-b3a09907dd40_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f51ce3da296ac3461cd3f20bdd375400e2eccb229af2c92ae3c854b175cf9adb +size 3170114 diff --git a/deepdegradationpriorforlowqualityimageclassification/full.md b/deepdegradationpriorforlowqualityimageclassification/full.md new file mode 100644 index 0000000000000000000000000000000000000000..54cb8e8e79da82f5089019f0d3615b719949337e --- /dev/null +++ b/deepdegradationpriorforlowqualityimageclassification/full.md @@ -0,0 +1,417 @@ +# Deep Degradation Prior for Low-quality Image Classification + +Yang Wang $^{1}$ , Yang Cao $^{1*}$ , Zheng-Jun Zha $^{1\dagger}$ , Jing Zhang $^{2}$ , Zhiwei Xiong $^{1}$ + +1University of Science and Technology of China, Hefei, China + +$^{2}$ UBTECH Sydney Artificial Intelligence Centre, The University of Sydney, Sydney, Australia + +ywang120@mail.ustc.edu.cn, forrest,zhazj,zwxiong@ustc.edu.cn, jing.zhang1@sydney.edu.au + +# Abstract + +State-of-the-art image classification algorithms building upon convolutional neural networks (CNNs) are commonly trained on large annotated datasets of high-quality images. When applied to low-quality images, they will suffer a significant degradation in performance, since the structural and statistical properties of pixels in the neighborhood are obstructed by image degradation. To address this problem, this paper proposes a novel deep degradation prior for low-quality image classification. It is based on statistical observations that, in the deep representation space, image patches with structural similarity have uniform distribution even if they come from different images, and the distributions of corresponding patches in low- and high-quality images have uniform margins under the same degradation condition. Therefore, we propose a feature de-drifting module (FDM) to learn the mapping relationship between deep representations of low- and high- quality images, and leverage it as a deep degradation prior (DDP) for low-quality image classification. Since the statistical properties are independent to image content, deep degradation prior can be learned on a training set of limited images without supervision of semantic labels and served in a form of "plugging-in" module of the existing classification networks to improve their performance on degraded images. Evaluations on the benchmark dataset ImageNet-C demonstrate that our proposed DDP can improve the accuracy of the pre-trained network model by more than $20\%$ under various degradation conditions. Even under the extreme setting that only 10 images from CUB-C dataset are used for the training of DDP, our method improves the accuracy of VGG16 on ImageNet-C from $37\%$ to $55\%$ . + +# 1. Introduction + +Recent years witness remarkable progresses of image classification task [46, 39], mainly with deep convolu + +tional neural network trained on large-scale datasets like ImageNet [8]. Since the collected images of the existing datasets are usually free of degradation, such as low visibility [41, 12, 34], color cast [42, 2], and overexposure, evaluation of standard neural network-based methods for image classification shows a significant drop in classification accuracy when applied to low-quality images [13]. + +In practice, one solution for this problem is to firstly improve the visibility of degraded images by image enhancement methods, and then to perform image classification, called two-stage methods in this paper [7, 17, 18]. However, the main reason why image degradation affects image classification is that the structural and statistical properties of pixels in the neighborhood are obstructed by image degradation. Since the existing image enhancement methods are devised to achieve pleasing visual effect, they cannot guarantee that the regions with similar structure in the image can be enhanced uniformly, leading to uncovered and incomplete feature representation for classification. A typical example is shown in Figure 1. As can be seen, there is still a margin between the feature distributions of enhanced image and clear image. + +Another feasible solution for low-quality image classification is to transform it into a domain adaptation problem and to match the degraded and clear images with adversarial learning or kernelized training. This method is based on the assumption that the marginal distributions of low- and high-quality images can be aligned in the learned feature space by a deep network. Therefore, after decreasing the divergence between the marginal distributions in the learned feature space, the classifier trained with high-quality images tends to perform well on the low-quality images. + +While promising, most existing domain adaptation approaches require either complex neural network architectures [3, 27, 14] or fine-tuning the target domain [31, 21, 26]. Different from these methods, this paper proposes to learn a transferrable mapping relationship between deep representations of low- and high- quality images, and leverage it as a deep degradation prior (DDP) for image classifier. This method is based on statistical observations that, i) + +![](images/e292edc1ee63ac69cd9e95de6c33fcbe7461f5c01b0a6b99e4aaa1990766885d.jpg) +(A) + +![](images/2ee12670e946a1c2c295121a93589501831b5cc33c582a3528478466706ead10.jpg) +(B) + +![](images/fdb72f836dffc8ee6941053470fdc039f9b2184fc08d4e8d85eae43b5a2a3836.jpg) +Figure 1. We choose four similar patches $a_1 \sim a_4$ from different clean images and visualize their features using VGG16 trained on ImageNet, as shown in (A). We visualize the feature distribution by using t-SNE [20]. As shown in (D), the clean patches have uniform distribution in feature space. The fog obstructs the statistical properties of pixels within local patches, resulting in feature drifting, as shown in (B) and (D). The visibility is well improved after dehazing [25]. However, the phenomenon of feature drift still exists, as in (C) and (D). + +![](images/3bb09d65011377cc3e637b24bca8328a3d8a33084638866c27b9b386befe9d29.jpg) + +image patches with structural similarity have uniform distribution in the deep representation space, even if they come from different images; ii) the distributions of the corresponding structure-similar patches in low- and high-quality images have uniform margins under the same degradation condition. Since the statistical properties are irrelevant to image content, our proposed deep degradation prior can be learned on a small number of images and do not need supervision of semantic labels. + +Specifically, we propose a feature de-drifting module (FDM) to learn the mapping relationship between deep representations of low- and high- quality images, and leverage it as a deep degradation prior (DDP) for low-quality image classification. The FDM is devised to compensate for the attenuation effect of image degradation on features, in which a four layers forward network is adopted to simulate the visual processing mechanism of non-classical receptive field model. After trained on an arbitrary degraded image dataset, the FDM can be easily plugged into the existing classification networks to improve their performance on degraded images. Evaluations on the benchmark dataset ImageNet-C [13] demonstrate the performance of our proposed method on low-quality image classification. The proposed DDP can be learned on only 10 images from CUB-C dataset, and achieve the accuracy improvement of VGG16 on ImageNet-C from $37\%$ to $55\%$ . The contributions of this paper are summarized as follows: + +(1) This paper finds that, in the deep representation + +space, the distributions of low- and high-quality image patches have uniform margins under the same degradation condition, and accordingly proposes a novel deep degradation prior for low-quality image classification. + +(2) This paper proposes a feature de-drifting module (FDM) to learn the mapping relationship between deep representations of low- and high- quality images. After trained on a small number of degraded image dataset, the FDM can be easily plugged into the existing classification networks to boost their performance on degraded images. +(3) Evaluations on the benchmark dataset ImageNet-C demonstrate the performance of our proposed method under various degradation conditions. Even under the extreme setting that only 10 images from CUB-C dataset are used for the training, our method still achieves the accuracy improvement of VGG16 from $37\%$ to $55\%$ . + +# 2. Related Work + +Differences in the representations of degraded images and clean images would shift the feature distribution, resulting in a performance drop when a pre-trained classification model is evaluated cross-domain [29]. Image enhancement algorithms can restore the degraded image to a clear version such that human vision can identify object and structure details. For example, B. Li et al. [17] uses the dehazing network to improve the object detection performance in the foggy environment. D. Da et al. [7] evaluates the influence of image super-resolution for high + +![](images/deb05c926200e376b27862db287ea3ffba6b96bae1296bc64f55d9f32b5a1399.jpg) +Figure 2. The distributions of corresponding structure-similar patches in the deep representation space. The high-quality images are from ImageNet dataset [8] and CUB dataset [33], and the low-quality images are generated by the method in [13]. + +level vision tasks. D. Liu et al. [18] employs the denoising algorithm to improve image segmentation performance. However, these enhancing methods can't always promise an improved performance for down-stream high-level vision tasks, especially when the degradation is heavy. Fine-tuning the network using degraded images is another popular strategy to improve performance. However, fine-tuning based methods need semantic labels to supervise network training. When the semantic labels are unavailable for degraded images, it will not be applicable. Domain adaption [22] transfers the models across different domains by solving the domain shift problem. Enormous of domain adaption methods [45, 31, 21, 26, 3, 27, 14] are proposed in recent years. However, these methods usually have complex neural network architectures. Besides, there is no work specifically tackling the classification problem on degraded images. By contrast, we propose a light-weight "plugging-in" feature de-drifting module, which significantly improves the generalizability of networks pre-trained on the ImageNet. + +The most related work with us are [30, 29], where W. Tan et al. proposes a feature super-resolution method to achieve the semantic-level alignment between high-resolution and + +low-resolution images, and Z. Sun et al. proposes a feature quantization method to map the distorted features into new space with less divergence. Different from them, our method is more general since: 1) it can be trained on a dataset while testing on another, i.e., CUB-C $\rightarrow$ ImageNet-C; 2) it can achieve fairly good performance even if it is only trained on a small scale dataset, e.g., 10 images from CUB-C; 3) it does not require the semantic labels of target domain, reducing the effort for collecting and annotating degraded images. + +# 3. Deep Degradation Prior + +Prior work on sparse coding evidence that local patches in natural images can be reconstructed based on a learned over-complete visual dictionary, where the representation coefficient is sparse, called sparse representation [35, 19, 24, 32]. The visual dictionary is learned from many arbitrary local patches sampled from natural images as long as they contain diverse local structures, e.g., smooth areas, edges, textures, etc. In other words, the visual dictionary learned from a dataset (e.g., CUB) can be used to represent + +images from another dataset (e.g., ImageNet). This property comes from the following fact that the local patches are statistically irrelevant to specific image content (e.g., semantics) and can be embedded into a low-dimensional manifold [35]. Besides, recent progress in deep convolutional neural network also witnesses a similar phenomenon that features learned in shallow layers are mainly low-level ones, such as edges, colors, textures, etc [9, 38]. Accordingly, the learned convolutional weights can be regarded as visual dictionaries to extract (represent) these low-level features (local patches). + +Motivated by the above work, we propose a novel deep degradation prior which is simple and effective for downstream high-level vision tasks, such as classification on degraded images. Specifically, we argue that: 1) the clear image patches from different dataset share a similar distribution in the feature embedding space, resulting in an indistinguishable cluster; 2) the degraded image patches have the similar property while they are separated from the clear ones due to their distinct local statistics; 3) if we can learn a mapping between the clear features and degraded features, it could be used for arbitrary natural images. + +To illustrate the above claims, we conducted a statistical experiment on the clear and foggy images, synthesized according to the hazy model [13] on the ImageNet [8] dataset and CUB [33] dataset. Some exemplar hazy images are shown in the right corners of Figure 2. First, for the ImageNet dataset, we sampled hundreds of clear patches and the corresponding foggy patches from the same positions, denoted $S_{I}$ and $S_{IF}$ , respectively. The same procedure was carried out on the CUB dataset, and the sampled patches are denoted $S_{C}$ and $S_{CF}$ , respectively. Referring to [35], the patch size was set $10*10$ in the experiment. To better visualize their distributions and avoid messy clusters, we filtered the patches to enable that they share the similar local structures. Mathematically, they were subjected to the following constraint: + +$$ +S S I M \left(p _ {i}, p _ {j}\right) > T, \forall p _ {i}, p _ {j} \in S _ {I} o r S _ {C}, \tag {1} +$$ + +where SSIM denotes the structural similarity measurement [4]. $T$ is a threshold and was set to 0.7. We kept 500 patches for both clear and foggy cases on each dataset, as shown in the up/bottom middle part of Figure 2. + +Then, to obtain their feature representations in the embedding space [40], we used the VGG16 network pretrained on the ImageNet dataset as the feature extractor. Specifically, the features of each patch were extracted from the "conv2_2" layer, since it's respective field is $9^{*}9$ , almost the same with the patch size. These features are shown in the red, blue, green, and yellow cubes in Figure 2. Finally, we leveraged t-SNE [20] to visualize them, as shown in the central part of Figure 2. + +It is clear that: 1) features from clear images are clus- + +tered together regardless which dataset they come from. It is the same for the foggy case; 2) there is a large gap between the clear features and foggy ones. Therefore, if we find a mapping between them, we can bridge them together. In this sense, restoring the degraded image patch to a clear one in the feature embedding space will certainly benefit the down-stream classification and detection tasks. In this paper, we call such a mapping as the deep degradation prior (DDP). In the next part, we will present an efficient solution to show how to learn an effective DDP. + +# 4. Learning DDP by Deep Neural Network + +# 4.1. Overview of the Network + +Given a clear dataset and its paired degraded dataset without semantic labels, our goal is to learn an effective DDP, which can be plugged in existing convolutional neural networks seamlessly to enhance their generalizability on degraded images. To this end, we propose an effective learning method by reconstructing the clear features from the degraded ones under the supervision of a simple Mean Square Error (MSE) loss. As shown in Figure 3 (a), during the training phase, we first use a pre-trained model to extract the low-level features of both degraded and clear images, for example, "conv2_2" in VGG16 [28], and the first layer in AlexNet [15], respectively. This part of network is fixed during the training phase and is called Shallow Pretrained Layers (SPL) in this paper. The degraded and clear features are denoted "DF" and "CF" in Figure 3 (a). + +Then, we propose a novel feature de-drifting module (FDM) to accomplish the feature reconstruction. Taking the hazy image as an example, it is concatenated with the DF from SPL together and fed into FDM. Leveraging the residual learning idea, the output feature from FDM is fused with the original DF by an element-wise sum. The resulting enhanced feature (EF) is compared with its paired CF to calculate the MSE loss and the error is back-propagated to FDM to update its parameters. + +During the testing phase, we insert the trained FDM into an existing classification network, i.e., between its SPL and subsequent deep pre-trained layers (DPL), as shown in Figure 3 (b). It is noteworthy that the learned weights in FDM serve as the learned DDP to map the degraded features to the clear ones (see Figure 2). + +# 4.2. Feature De-drifting Module + +The degradation changes the statistics of a local patch, which results in a biased feature response by SPL compared with the original clear one. In order to correct the drifted feature response, we propose a novel feature de-drifting module. It is inspired by the non-classical receptive field of human vision [6] as shown in Figure 3 (c). Non-classical receptive field is very useful to enhance the high frequencies + +![](images/206b32d7781da02d6185b11bdaf06a252126356e01cd2ddf0a7b4d60a1c373a1.jpg) +(a) + +![](images/55327b5c4903362bbd1c35af9cacb47eece987e95095bacfcecb32bd3a0b792d.jpg) +(b) + +![](images/dc0192e4a81e2c2deaeac472f85d41ab90fd4c2100145f33cd3f5bb98b735c93.jpg) +(c) + +![](images/da6f77e61a6d6399bb2294ee1cf695cd117530f4643e5b49cc9af02ced4d7a42.jpg) +(d) +Figure 3. (a)-(b) Diagram of the training/testing phase of the proposed method. (c) Illustration of the non-classical receptive field [6] for enhancing the high frequencies while maintaining the low frequencies. (d) The network structure of our feature de-drifting module (FDM). + +while maintaining low frequencies. Mathematically, given an input $I$ , a filter with a non-classical receptive field generates an output $f$ as follows: + +$$ +f = A _ {1} \left(I * G _ {1} \left(\sigma_ {1}\right)\right) + A _ {2} \left(I * G _ {2} \left(\sigma_ {2}\right)\right) + A _ {3} \left(I * G _ {3} \left(\sigma_ {3}\right)\right), \tag {2} +$$ + +where $G_{1} \sim G_{3}$ denote three Gaussian filters with different filter bandwidths, i.e., + +$$ +G (\sigma) = \frac {1}{\sqrt {2 \pi \sigma^ {2}}} \exp \left(- \frac {x ^ {2} + y ^ {2}}{2 \sigma}\right) \tag {3} +$$ + +$A_{1} \sim A_{3}$ represent the coefficient in the central, surrounded, and marginal frequency areas, respectively. * denotes the convolution operation. $\sigma_{1} \sim \sigma_{3}$ are the scale parameters determining the filter bandwidths accordingly. Eq. (2) can be reformulated as: + +$$ +\begin{array}{l} f = A _ {1} \left(I * G _ {1}\right) + A _ {2} \left(\left(I * G _ {1}\right) * G _ {2} ^ {\prime}\right) (4) \\ + A _ {3} \left(\left(I * G _ {1}\right) * G _ {2} ^ {\prime}\right) * G _ {3} ^ {\prime}, (4) \\ \end{array} +$$ + +where, $G_{2}^{\prime}$ and $G_{3}^{\prime}$ are also Gaussian filters with scale parameters $\sqrt{\sigma_2^2 - \sigma_1^2}$ and $\sqrt{\sigma_3^2 - \sigma_2^2}$ . In this way, the convolutional result in the first (second) term can be used as the input of the second (third) Gaussian filter $G_{2}^{\prime}(G_{3}^{\prime})$ . + +Inspired by the non-classical receptive field and Eq. (4), we design our FDM as shown in Figure 3 (d). The first three blocks filled in orange, yellow and blue, represent the convolution process in the central, surrounded, and marginal frequency areas, respectively. Each block consists of two convolutional layers. The output features from the three blocks are then concatenated together and fed into a final $1^{*}1$ convolutional layer simulate the linear weighting between the central, surrounded and marginal frequency parts, as shown in Eq. (2). Details of FDM are summarized in Table 1 and Table 2 for VGG16 and AlexNet, respectively. + +Table 1. The details of FDM with VGG16. + +
InputSizeNumFilterStridePad
G1_1131*112*112128311
G1_2128*112*112128311
G2_1128*112*11264311
G2_264*112*11264311
G3_164*112*11232311
G3_232*112*11232311
W224*112*112128110
+ +Table 2. The details of FDM with AlexNet. + +
InputSizeNumFilterStridePad
G1_167*27*27128311
G1_2128*27*27128311
G2_1128*27*2764311
G2_264*27*2764311
G3_164*27*2732311
G3_232*27*2732311
W224*27*2764110
+ +# 5. Experiments + +We evaluate the performance of our proposed deep degradation prior on ImageNet-C dataset [13], which is a rigorous benchmark with 50000 images in 1000 categories and widely used for robustness evaluation of image classifier. In this paper, we mainly focus on three kinds of degradation conditions, including fog, low contrast, and brightness. For each of the mentioned degradation conditions, we perform experiments on five levels of degradation. The examples of degraded images are shown in Figure 4. Besides, under each degradation condition, we test the influence of data size on deep degradation prior modeling. + +Following the degraded image generation methods in [13], we use the clean images of CUB (total 11788 images) + +![](images/f4e2cd0b384a4a34baf18fc3270f96cef5921eb3af00faa5842a4c25cbd1fe3e.jpg) +Figure 4. Some examples of degraded images from ImageNet-C. + +dataset to synthesize the degraded images, named CUB-C, for the training of FD-Module. We employ AlexNet [15] and VGG16 [28] pre-trained on clean images as base models. The FD-Module is trained for 5000 iterations using SGD with batch size of 32. The initial learning rate is 0.001. The learning rate decreases to 0.0001 after 2500 iterations. In FD-Module, the filter weights of each layer are initialized using the MSRA initialization method. + +# 5.1. Fog + +Fog is very common for the images captured in outdoor and will cause image degradation due to atmospheric absorption and scattering. The high-frequency components and color fidelity are degraded in fog images. Since the degradation is spatial-variant, it will change the structure of local regions inconsistently and significantly increase the difficulty of feature extraction. The goal of image dehazing methods is to enhance the contrast and restore the structure details, which make the images more visual pleasing, but cannot eliminate the structure inconsistency. In this paper, we select five state-of-the-art image dehazing methods as baseline: DehazeNet [4], AoD-Net [17], FPCNet [42], FAMED-Net [43], and GFN-Net [25]. All of the test foggy images are dehazed by the baseline methods and then send to pre-trained image classifiers (VGG16 and AlexNet). Our proposed FDM is firstly trained on foggy images and then plugged into the same pre-trained image classifiers (VGG16 and AlexNet). The evaluations are performed on five degradation levels respectively. + +As can be seen from Figure 5 (a), our proposed method significantly surpasses the two-stage methods in terms of classification accuracy, especially when the fog concentration is large. Moreover, with the increase of fog concentration, the performance of two-stage methods drops notably, while our method can also improve the accuracy of the pretrained network by more than $30\%$ . It demonstrates that FDM effectively boosts the fog-degraded features. + +# 5.2. Low Contrast + +The images captured under weak and colored illumination conditions often appear low contrast and color cast, which will degrade the recognition accuracy. The goal of contrast enhancement methods is to improve the dynamic range of images and remove color cast. In this paper, we select five contrast enhancement methods as baseline: HE [11], CVC [5], WAHE [1], LDR [16], OpenCE [36]. All of the low-contrast images are enhanced by the baseline methods and then send to pre-trained image classifiers (VGG16 and AlexNet). Our proposed FDM is firstly trained on low-contrast images and then plugged into the same pre-trained image classifiers (VGG16 and AlexNet). The evaluations are performed at five degradation levels. + +As shown in Figure 5 (b), the two-stage method cannot consistently improve the classification accuracy. When the degradation is small (e.g., Contrast-1 and Contrast-2), the performance is even worse than directly using the origin images. As a contrast, our proposed method can consistently improve the classification accuracy of all five degradation conditions, which demonstrates the robustness of our DDP. + +# 5.3. Brightness + +Low lighting condition and limited dynamic range of digital imaging devices in image capturing can significantly degrade the image quality from many aspects, such as low contrast and amplified noise, which results in a biased feature distribution compared with the clear one and downgrades the classification accuracy. One common solution is to use HDR algorithm to balance the dynamic range and suppress noises. In this experiment, we compared our method with four HDR methods: LIME [12], HQEC [44], SRIE [10], MRINP [34]. The results are shown in Figure 5 (c). It is clear that the accuracy of classifying HDR enhanced images is even slightly lower than classifying the degraded images. Although the HDR methods could improve the visibility of degraded images, it also produced some artifacts, which consequently results in extra feature drifting as well. By contrast, our method improves the accuracy by correcting the feature drifting and aligning them with the clear ones in the embedding space. It demonstrates the effectiveness of the learned DDP by the FDM. + +# 5.4. Performance Analysis + +We first explore the effect of training set volume on deep degradation prior modeling. We use different proportions of degraded images from CUB-C to train the FDM, e.g., Fog-3, Contrast-3, and Brightness-3. The results are plotted in Figure 6 (a)-(c), respectively. As can be seen, the performance of FDM is not sensitive to the training dataset volume. The classification accuracy only drops by $5\%$ when using only $1\%$ training data compared with using all the training data (total 11788 images). Besides, in the extreme + +![](images/12ad81f57a0bbdc992548879fae104147ad39d8f1f94abd44fae2c14cbcbfd74.jpg) + +![](images/97d0f1f38941f14519b57fce6c85eb21de108d471b2723ba7249e1300202febb.jpg) + +![](images/a649286a248dc5b7d2b046c48881cff97583344836c452d0f43e866768032a95.jpg) + +![](images/30d6dd87acba6109c3dafdb560b75abbcca1378b412dae822aa70e42ab428f7e.jpg) +(a) + +![](images/ee9f9d251ce92b32cfcb1caa8c37ed36ca14caf701e09c172975b467a611b56a.jpg) +(b) + +![](images/dab284324f51e54ac2b7f377faa9bcadc0188604cf6f132622d94535b845e57f.jpg) +(c) + +![](images/48cf96cd7b0c24eec02502d6d86abfa8fae47bebcec185623341db3bad63e1e6.jpg) +Figure 5. Comparison of DDP against the two-stage methods under different degradation conditions, (a) fog, (b) contrast and (c) brightness. + +![](images/c9fa9624c05d9bdae067cf33de72ccaca34bcd77e0f0736aaf46adba96614c47.jpg) +Figure 6. The influence of training dataset volume on DDP. The x-axis represents the proportion of images in CUB dataset used for training. + +![](images/257bd7adb4d85f5055063ac460e6718db764a7bde03f7418fa606f51ac55da99.jpg) + +condition that only 10 foggy images from CUB-C dataset are used for training, our method still boosts the accuracy of VGG16 on ImageNet-C from $37\%$ to $55\%$ . It is very useful when large scale degraded images are difficult to collect. + +Then, we present the feature visualization results to demonstrate the performance of feature de-drifting. Here we take the fog degradation as example. We visualize the feature maps of synthesized foggy images, clear images, dehazed images and the ones generated by our method in Figure 8. As can be seen, due to the influence of fog, the amplitude of feature response of object is attenuated inconsistently. The dehazing methods can recover some structural information of the image, but cannot consistently enhance the discriminative features for object. As a contrast, our method significantly boosts the feature responses on discriminative region while suppressing the interference. Furthermore, we also evaluate the performance of our method and two-stage method on real foggy images. The visualized feature maps are shown in Figure 7. We can see that, + +when the fog concentration is small, the two-stage method can also recover the structural features. However, with the increase of fog concentration, the discrimination of the features captured from the dehazed images drop significantly. As a contrast, the features extracted by our method can always reveal the structure of objects, even in the heavies fog condition. It demonstrates that our proposed method is robust and applicable to real foggy scenes. + +Apart from above three kinds of degradation, we also evaluate the performance of DDP on the degraded images with motion blur. DPP can improve the accuracy of the VGG16 from $24\%$ to $38\%$ by using only 10 images for training. In addition, we conduct experiments on real-world images with two types of degradations (under-exposure and noise) from UG2 [37]. We train two DDP modules (e.g., $\mathrm{DDP}_c$ for contrast enhancement and $\mathrm{DDP}_d$ for denoising), and incorporate them into the pre-trained networks (e.g., VGG16) to boost the degraded features as shown in Figure 9. We can see that the results are also positive. + +![](images/4e6a89ce828e71c69d90749bf45b15a13bde2b336700e46aa1ccac382036f70c.jpg) +Input + +![](images/47cd1d5c5c42176c9750539b63b7182069ffbb28ad5eba0df52a54be55b8ff2a.jpg) +Ours + +![](images/932453e7a5a0d8053044bf04047797285385b0bf767de058092428778e78f7cc.jpg) + +![](images/42673d0463873937f6dfbc14c0c2bde00d59a4bf980ffa2de14cd89c1cad84a5.jpg) + +![](images/8a590988fb0809ebc2b4635508f66d4bb307b6c0b7a87b0838ffb037eb46fdb7.jpg) +Degraded Feature + +![](images/b210d16e63f669abc58a0cf7e980ece7e121ea30c1cfa0c5ce61891079e94cf9.jpg) +FPC-Net + +![](images/867abb5742b4a6dc49c38bcb684096d5b8ad8252cba665cca7b9cd7879a3b1a0.jpg) +FAMED-Net + +![](images/0901930f46cd879640a13cc6c5588003c284c93451cbdb7ffbdcedd51b983fd7.jpg) +Dehaze-Net +GFN-Net + +![](images/1122e7b347b87ec8f8e87b06e67af66613f81f732793340f5385f100d070b09d.jpg) +AoD-Net +Input +Degraded Feature + +![](images/dda5623e057c37750f85a33cbb27ac125ab4b85c95ab5ab1a5f2755510872e07.jpg) + +![](images/84149b1e68f4fdfd710bb608ebbefd7ae3654af1aca1f7192ffc86d964fc55d3.jpg) +Ours + +![](images/88ee22715b54a350a868f118de82bcd598c4a0844f310e8dd8b1b142230abb55.jpg) +Dehaze-Net + +![](images/7d41b245aa7c409d0c79e8106eacc6b9cc1038a5c15603adf57f42a272aae7bb.jpg) +AoD-Net + +![](images/f35cdfaab4734b16ef0cfb4d25562255fe9b9d0413091b2806d21cc3776271f0.jpg) +FPC-Net + +![](images/be906fad25ba0ae74aaaa9a605b557d749593cad9451dca908cb00c653df4723.jpg) +FAMED-Net + +![](images/ffe4d4345979c74ce4933e508094b8f92628f1a3fd353057abe67319b4e2b86d.jpg) +GFN-Net + +![](images/c25fc56337608090d4544cc6c5ae39d2db87c7fc17fff4eb04a39be8060c22f5.jpg) + +![](images/8df3d4dbe9113f141c7e85460a8b20f06c80cd2246c10ad62bdff5e3eb7e159c.jpg) + +![](images/379610be3fb0ba6532c425eead50ed25d26c37d7e554fb1c7910fa814629ce55.jpg) + +![](images/d716eb1684b4fec8a4551ce8c9282f470e5e8366ef52218b937969fc3ebb6ca0.jpg) + +![](images/1300e5feec08cc06c9b1321261f712e30ced6e34b3352bc85b6b0fc09c7addd0.jpg) +Input +Degraded Feature +AoD-Net + +![](images/e3a1365350d3795f98d2e797e764a4f7a6e0f60c72be0273d8a7a2e0a041eb58.jpg) +FPC-Net + +![](images/4a91fb2f50daf9e57bcba080f38695e957b75419eb4302983e4adbcab5daaf26.jpg) +Ours +FAMED-Net + +![](images/92b990b0b79454cca624a4277fce0a53ed4a525f3bc679a0f46473acfc40cdc0.jpg) +Dehaze-Net +GFN-Net + +![](images/06e55f2b115e8cada617f479cba22643e0cc38ada3f893f63f4d5356b2d53d89.jpg) +Input +Degraded Feature + +![](images/842e0f38138e7c3cb04c4f52c8ce48e71751088cc62a92f5d1483961be5661c7.jpg) + +![](images/9c5872b81661f22d992b8402636bd82abbb60445e6bdafd76d390ca2f2cd0a81.jpg) +Ours + +![](images/8042fee9bc08b35b4bcdd2643e5e5a40a41de9eaac2d5358b967f4e5a637973b.jpg) +Dehaze-Net + +![](images/71776944bb6c2df3c9f0c07c70668346ad45345c27eac055af20162bd47a5b97.jpg) +AoD-Net + +![](images/9bb992d745ff23d22a42623db7b6d77d52ad4fb8afbe97f5351fe0744964a7d1.jpg) +FPC-Net + +![](images/20dd41b6ce8964fed5ec84a1656366745015db4993ed600e4a974d165fd9bdc1.jpg) +FAMED-Net + +![](images/a27c51051d09e54961745fdedd0dfebcc6973f4dbb87f540881b637aae6f42d5.jpg) +GFN-Net + +![](images/25470c25924e1508f08ede0799960d01408f08d970c7f40fbcd18e189150b9c0.jpg) +Figure 7. Visualization of the feature maps of real foggy images and de-foggy results. The foggy images are from Haze20 dataset [23]. The feature maps are extracted from the Conv2_2 layer of VGG16 pre-trained on ImageNet. With the increase of fog density, the discrimination of the features of dehazed images drop significantly, while the features extracted by our method can always reveal the structure of objects. +Input +Degraded Feature +Clear Feature +Ours +Dehaze-Net + +![](images/963f1b18545de15d75c49887e4b78e4e504af4df9267244de488440e0c3b5492.jpg) + +![](images/8b86184faa2c164f406a581dbb2ee145c4e78c2e202585fa2cf83058479d9494.jpg) + +![](images/e110983e01f88a08f49d644da38e303a372705c319005a687806e368cd1ca5ae.jpg) + +![](images/ab7eb39610c845f587833f96a512b845a6ae6ed9eb742dd1cab5726c767aaae0.jpg) + +![](images/ac752644afec7ddc88e242a6a08d289cbcef5260dff2fd77f36fbeeb19ee2ccb.jpg) +Input + +![](images/65a93d2ee3d562190cc9d9417a39a89ebbb0f222f9259be3d902eec7394668ba.jpg) +AoD-Net +Degraded Feature + +![](images/bf2024a6a5f90d2aa6b0cab30a21aa75554317b7ca7d3e1d87946e2b5eb33e65.jpg) +FPC-Net +Clear Feature + +![](images/dde99b5ecc1527cb974d5e668eb2cfb87c0e65b5607c0cae95530a425db2d081.jpg) +FAMED-Net +Ours + +![](images/38cb812c909f86ddb6dcb8a5316a5dd53d8fc58d1793878b3171833dee76bdc7.jpg) +GFN-Net +Dehaze-Net + +![](images/ddd276eb8172830a2069e1d35837328204c7f9a60fdbefbc113c5e4109fbd838.jpg) +AoD-Net + +![](images/8349760cac001bbe00dda0adb3fe2c1d94fa3046824d23936d04b8f640924062.jpg) +FPC-Net + +![](images/259e0f0656e559954867056013fae14a43400e2cbc3a52d0d89a7fe4b2e29315.jpg) +FAMED-Net + +![](images/5b909147d50c66e785abfa24262367b49fd1f3534f0652f7755b141f1272dd17.jpg) +GFN-Net + +![](images/2504d8999c344edb696ddea6dd864a0bc4f70021b9e60f3eca809c75adaf37b0.jpg) +Figure 8. The feature maps of synthesized foggy images, clear images, dehazed images and the ones generated by our method. All the features are output from the same Conv2_2 layer of VGG16 trained on ImageNet. +Input +Figure 9. The feature maps of real low-light image with two kinds of degradations (e.g., low-contrast and noise). + +![](images/8ef14063aa035bd0602ee2755346df3eae749174ed86961fac8449a8a7c78a06.jpg) +VGG16 + +![](images/ee0009c1a6a0cde4faf8038262019c205cea54527ef92d0c47bb741a91d32d2e.jpg) +VGG16+DDPc +VGG16+DDPc+DDPd + +![](images/1051834d714b4cac6c1b7330434d6662d28fc87dddacd889e62134356071a974.jpg) + +# 6. Conclusion + +In this paper, we introduce a novel deep degradation prior (DDP) for low-quality image classification, which can be used to reduce the feature mismatch between clear images and various degraded ones. We devise a simple and effective module named feature de-drifting module (FDM) to learn the DDP by adaptively enhancing features at different frequencies. FDM can be trained on a small scale dataset, e.g., only 10 images from CUB-C, but still remains robust and effective. Further, the learned DDP by FDM on a dataset can be generalized to another dataset with the same degradation, regardless the diverse image contents. Moreover, it is very easy to deploy FDM into existing classification networks as a "plugging-in" module. Extensive experiments on different types of degradation and two popular benchmark datasets, i.e., ImageNet-C and CUB-C, validate the effectiveness of the learned DDP by FDM in degraded image classification tasks. It boosts the classification accuracy by large margins under various degradation conditions. + +Acknowledgments: This work was supported by the National Key RD Program of China under Grant 2017YFB1300201, the National Natural Science Foundation of China (NSFC) under Grants 61872327, 61622211, 61806062, U19B2038 and 61620106009 as well as the Fundamental Research Funds for the Central Universities under Grant WK2380000001 and WK2100100030. + +# References + +[1] T Arici, S Dikbas, and Y Altunbasak. A histogram modification framework and its application for image contrast enhancement. IEEE transactions on image processing: a publication of the IEEE Signal Processing Society, 18(9):1921-1935, 2009. 6 +[2] Jonathan T Barron and Yun-Ta Tsai. Fast fourier color constancy. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 886-894, 2017. 1 +[3] Konstantinos Bousmalis, Nathan Silberman, David Dohan, Dumitru Erhan, and Dilip Krishnan. Unsupervised pixel-level domain adaptation with generative adversarial networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3722-3731, 2017. 1, 3 +[4] Bolun Cai, Xiangmin Xu, Kui Jia, Chunmei Qing, and Dacheng Tao. Dehazenet: An end-to-end system for single image haze removal. IEEE Transactions on Image Processing, 25(11):5187-5198, 2016. 4, 6 +[5] Turgay Celik and Tardi Tjahjadi. Contextual and variational contrast enhancement. IEEE Transactions on Image Processing, 20(12):3431-3441, 2011. 6 +[6] Li Chao-Yi, Pei Xing, Zhou Yi-Xiong, et al. Role of the extensive area outside the x-cell receptive field in brightness information transmission. Vision Research, 31(9):1529-1540, 1991. 4, 5 +[7] Dengxin Dai, Yujian Wang, Yuhua Chen, and Luc Van Gool. Is image super-resolution helpful for other vision tasks? In 2016 IEEE Winter Conference on Applications of Computer Vision (WACV), pages 1-9. IEEE, 2016. 1, 2 +[8] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248-255. IEEE, 2009. 1, 3, 4 +[9] Samuel Dodge and Lina Karam. Understanding how image quality affects deep neural networks. In 2016 eighth international conference on quality of multimedia experience (QoMEX), pages 1-6. IEEE, 2016. 4 +[10] Xueyang Fu, Delu Zeng, Yue Huang, Xiao-Ping Zhang, and Xinghao Ding. A weighted variational model for simultaneous reflectance and illumination estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2782-2790, 2016. 6 +[11] Rafael C Gonzales and Richard E Woods. Digital image processing, 2002. 6 +[12] Xiaojie Guo, Yu Li, and Haibin Ling. Lime: Low-light image enhancement via illumination map estimation. IEEE Transactions on image processing, 26(2):982-993, 2016. 1, 6 +[13] Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. arXiv preprint arXiv:1903.12261, 2019. 1, 2, 3, 4, 5 +[14] Judy Hoffman, Eric Tzeng, Taesung Park, Jun-Yan Zhu, Phillip Isola, Kate Saenko, Alexei A Efros, and Trevor Darrell. Cycada: Cycle-consistent adversarial domain adaptation. arXiv preprint arXiv:1711.03213, 2017. 1, 3 + +[15] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097-1105, 2012. 4, 6 +[16] Chulwoo Lee, Chul Lee, and Chang-Su Kim. Contrast enhancement based on layered difference representation of 2d histograms. IEEE transactions on image processing, 22(12):5372-5384, 2013. 6 +[17] Boyi Li, Xiulian Peng, Zhangyang Wang, Jizheng Xu, and Dan Feng. Aod-net: All-in-one dehazing network. In Proceedings of the IEEE International Conference on Computer Vision, pages 4770-4778, 2017. 1, 2, 6 +[18] Ding Liu, Bihan Wen, Xianming Liu, Zhangyang Wang, and Thomas S Huang. When image denoising meets high-level vision tasks: A deep learning approach. arXiv preprint arXiv:1706.04284, 2017. 1, 3 +[19] Guangcan Liu, Zhouchen Lin, Shuicheng Yan, Ju Sun, Yong Yu, and Yi Ma. Robust recovery of subspace structures by low-rank representation. IEEE transactions on pattern analysis and machine intelligence, 35(1):171-184, 2012. 3 +[20] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 9(Nov):2579-2605, 2008. 2, 4 +[21] Saeid Motiian, Marco Piccirilli, Donald A Adjeroh, and Gianfranco Doretto. Unified deep supervised domain adaptation and generalization. In Proceedings of the IEEE International Conference on Computer Vision, pages 5715-5725, 2017. 1, 3 +[22] Sinno Jialin Pan and Qiang Yang. A survey on transfer learning. IEEE Transactions on knowledge and data engineering, 22(10):1345-1359, 2009. 3 +[23] Yanting Pei, Yaping Huang, Qi Zou, Yuhang Lu, and Song Wang. Does haze removal help cnn-based image classification? In Proceedings of the European Conference on Computer Vision (ECCV), pages 682-697, 2018. 8 +[24] Yigang Peng, Arvind Ganesh, John Wright, Wenli Xu, and Yi Ma. Rasl: Robust alignment by sparse and low-rank decomposition for linearly correlated images. IEEE transactions on pattern analysis and machine intelligence, 34(11):2233-2246, 2012. 3 +[25] Wenqi Ren, Lin Ma, Jiawei Zhang, Jinshan Pan, Xiaochun Cao, Wei Liu, and Ming-Hsuan Yang. Gated fusion network for single image dehazing. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3253-3261, 2018. 2, 6 +[26] Paolo Russo, Fabio M Carlucci, Tatiana Tommasi, and Barbara Caputo. From source to target and back: symmetric bi-directional adaptive gan. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8099-8108, 2018. 1, 3 +[27] Swami Sankaranarayanan, Yogesh Balaji, Carlos D Castillo, and Rama Chellappa. Generate to adapt: Aligning domains using generative adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8503-8512, 2018. 1, 3 +[28] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 4, 6 + +[29] Zhun Sun, Mete Ozay, Yan Zhang, Xing Liu, and Takayuki Okatani. Feature quantization for defending against distortion of images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7957-7966, 2018. 2, 3 +[30] Weimin Tan, Bo Yan, and Bahetiyaer Bare. Feature superresolution: Make machine see more clearly. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3994-4002, 2018. 3 +[31] Eric Tzeng, Judy Hoffman, Trevor Darrell, and Kate Saenko. Simultaneous deep transfer across domains and tasks. In Proceedings of the IEEE International Conference on Computer Vision, pages 4068-4076, 2015. 1, 3 +[32] Andrew Wagner, John Wright, Arvind Ganesh, Zihan Zhou, Hossein Mobahi, and Yi Ma. Toward a practical face recognition system: Robust alignment and illumination by sparse representation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 34(2):372-386, 2011. 3 +[33] Catherine Wah, Steve Branson, Peter Welinder, Pietro Perona, and Serge Belongie. The caltech-ucsd birds-200-2011 dataset. 2011. 3, 4 +[34] Yang Wang, Yang Cao, Zheng-Jun Zha, Jing Zhang, Zhiwei Xiong, Wei Zhang, and Feng Wu. Progressive retina: Mutually reinforced illumination-noise perception network for low-light image enhancement. In Proceedings of the 27th ACM International Conference on Multimedia, pages 2015-2023. ACM, 2019. 1, 6 +[35] Jianchao Yang, John Wright, Thomas S Huang, and Yi Ma. Image super-resolution via sparse representation. IEEE transactions on image processing, 19(11):2861-2873, 2010. 3, 4 +[36] Zhenqiang Ying, Ge Li, Yurui Ren, Ronggang Wang, and Wenmin Wang. A new image contrast enhancement algorithm using exposure fusion framework. In International Conference on Computer Analysis of Images and Patterns, pages 36-46. Springer, 2017. 6 +[37] Ye Yuan, Wenhan Yang, Wenqi Ren, Jiaying Liu, Walter J. Scheirer, and Zhangyang Wang. 7 +[38] Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In European conference on computer vision, pages 818-833. Springer, 2014. 4 +[39] Zheng-Jun Zha, Xian-Sheng Hua, Tao Mei, Jingdong Wang, Guo-Jun Qi, and Zengfu Wang. Joint multi-label multi-instance learning for image classification. In 2008 IEEE conference on computer vision and pattern recognition, pages 1-8. IEEE, 2008. 1 +[40] Hanwang Zhang, Zheng-Jun Zha, Yang Yang, Shuicheng Yan, and Tat-Seng Chua. Robust (semi) nonnegative graph embedding. IEEE transactions on image processing, 23(7):2996-3012, 2014. 4 +[41] Jing Zhang, Yang Cao, Shuai Fang, Yu Kang, and Chang Wen Chen. Fast haze removal for nighttime image using maximum reflectance prior. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7418-7426, 2017. 1 +[42] Jing Zhang, Yang Cao, Yang Wang, Chenglin Wen, and Chang Wen Chen. Fully point-wise convolutional neural net + +work for modeling statistical regularities in natural images. arXiv preprint arXiv:1801.06302, 2018. 1, 6 +[43] Jing Zhang and Dacheng Tao. Famed-net: A fast and accurate multi-scale end-to-end dehazing network. arXiv preprint arXiv:1906.04334, 2019. 6 +[44] Qing Zhang, Ganzhao Yuan, Chunxia Xiao, Lei Zhu, and Wei-Shi Zheng. High-quality exposure correction of underexposed photos. In 2018 ACM Multimedia Conference on Multimedia Conference, pages 582-590. ACM, 2018. 6 +[45] Qiming Zhang, Jing Zhang, Wei Liu, and Dacheng Tao. Category anchor-guided unsupervised domain adaptation for semantic segmentation. In Advances in Neural Information Processing Systems, pages 433-443, 2019. 3 +[46] Wei Zhang, Shengnan Hu, Kan Liu, and Zhengjun Zha. Learning compact appearance representation for video-based person re-identification. IEEE Transactions on Circuits and Systems for Video Technology, 29(8):2442–2452, 2018. 1 \ No newline at end of file diff --git a/deepdegradationpriorforlowqualityimageclassification/images.zip b/deepdegradationpriorforlowqualityimageclassification/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f0f53bb113850a3a62d814931ec51f1a5ca9bf51 --- /dev/null +++ b/deepdegradationpriorforlowqualityimageclassification/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e395262872d4b7cf20b89ae864c0e4dbe4cdcde30114dfb3135fc91f4bfd541f +size 828556 diff --git a/deepdegradationpriorforlowqualityimageclassification/layout.json b/deepdegradationpriorforlowqualityimageclassification/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f9a28263fdf5fd64153f3bcf1078887e91e4108d --- /dev/null +++ b/deepdegradationpriorforlowqualityimageclassification/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f109ac4a24e529cf282c8bf528df988e7049b3727b8a02f67ea145358526d0a +size 475044 diff --git a/deepdistancetransformfortubularstructuresegmentationinctscans/f744bb37-5d0b-4865-b13d-d038df3c002a_content_list.json b/deepdistancetransformfortubularstructuresegmentationinctscans/f744bb37-5d0b-4865-b13d-d038df3c002a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f509dffd54ed8221ec08a8fad53ba019d6b7d1de --- /dev/null +++ b/deepdistancetransformfortubularstructuresegmentationinctscans/f744bb37-5d0b-4865-b13d-d038df3c002a_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b77303980026b0c2476a8dec5d23082b1e056c9c1866b54873f653cc4c5aabf8 +size 77830 diff --git a/deepdistancetransformfortubularstructuresegmentationinctscans/f744bb37-5d0b-4865-b13d-d038df3c002a_model.json b/deepdistancetransformfortubularstructuresegmentationinctscans/f744bb37-5d0b-4865-b13d-d038df3c002a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..d16348e9cae7acf476b89289c95534beb75a9a85 --- /dev/null +++ b/deepdistancetransformfortubularstructuresegmentationinctscans/f744bb37-5d0b-4865-b13d-d038df3c002a_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61de4a7c743a198cbbd55f8074c4ed88fb2a48ef885d5ae03dedd7ae277fe79b +size 97593 diff --git a/deepdistancetransformfortubularstructuresegmentationinctscans/f744bb37-5d0b-4865-b13d-d038df3c002a_origin.pdf b/deepdistancetransformfortubularstructuresegmentationinctscans/f744bb37-5d0b-4865-b13d-d038df3c002a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bf49e642e62047bdd9edea2ca1db215642dd174d --- /dev/null +++ b/deepdistancetransformfortubularstructuresegmentationinctscans/f744bb37-5d0b-4865-b13d-d038df3c002a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d821094ac4499af9216422f09cb594cac7a7440147ebd216105f83fb9ad8fdb8 +size 1763488 diff --git a/deepdistancetransformfortubularstructuresegmentationinctscans/full.md b/deepdistancetransformfortubularstructuresegmentationinctscans/full.md new file mode 100644 index 0000000000000000000000000000000000000000..257ea72c215c3975f246f0269856fc7c8f8ca1e1 --- /dev/null +++ b/deepdistancetransformfortubularstructuresegmentationinctscans/full.md @@ -0,0 +1,301 @@ +# Deep Distance Transform for Tubular Structure Segmentation in CT Scans + +Yan Wang $^{1\dagger}$ Xu Wei $^{2*}$ Fengze Liu $^{1}$ Jieneng Chen $^{3*}$ Yuyin Zhou $^{1}$ Wei Shen $^{1‡}$ Elliot K. Fishman $^{4}$ Alan L. Yuille $^{1}$ + +$^{1}$ Johns Hopkins University $^{2}$ University of California San Diego $^{3}$ Tongji University $^{4}$ The Johns Hopkins University School of Medicine + +# Abstract + +Tubular structure segmentation in medical images, e.g., segmenting vessels in CT scans, serves as a vital step in the use of computers to aid in screening early stages of related diseases. But automatic tubular structure segmentation in CT scans is a challenging problem, due to issues such as poor contrast, noise and complicated background. A tubular structure usually has a cylinder-like shape which can be well represented by its skeleton and cross-sectional radii (scales). Inspired by this, we propose a geometry-aware tubular structure segmentation method, Deep Distance Transform (DDT), which combines intuitions from the classical distance transform for skeletonization and modern deep segmentation networks. DDT first learns a multitask network to predict a segmentation mask for a tubular structure and a distance map. Each value in the map represents the distance from each tubular structure voxel to the tubular structure surface. Then the segmentation mask is refined by leveraging the shape prior reconstructed from the distance map. We apply our DDT on six medical image datasets. Results show that (1) DDT can boost tubular structure segmentation performance significantly (e.g., over $13\%$ DSC improvement for pancreatic duct segmentation), and (2) DDT additionally provides a geometrical measurement for a tubular structure, which is important for clinical diagnosis (e.g., the cross-sectional scale of a pancreatic duct can be an indicator for pancreatic cancer). + +# 1. Introduction + +Tubular structures are ubiquitous throughout the human body, with notable examples including blood vessels, pancreatic duct and urinary tract. They occur in specific environments at the boundary of liquids, solids or air and surrounding tissues, and play a prominent role in sustaining physiological functions of the human body. + +![](images/5f74ad352b377cd9511e2204c6570c027277de6c710a1ad5950e3ebafd724809.jpg) +Figure 1. A tubular shape is presented as the envelope of a family of spheres with continuously changing center points and radii [9]. + +In this paper, we investigate automatic tubular organ/tissue segmentation from CT scans, which is important for the characterization of various diseases [18]. For example, pancreatic duct dilatation or abrupt pancreatic duct caliber change signifies high risk for pancreatic ductal adenocarcinoma (PDAC), which is the third most common cause of cancer death in the US [11]. Another example is that obstructed vessels lead to coronary heart disease, which is the leading cause of death in the US [27]. + +Segmenting tubular organs/tissues from CT scans is a popular but challenging problem. Existing methods addressing this problem can be roughly categorized into two groups: (1) Geometry-based methods, which build deformable shape models to fit tubular structures by exploiting their geometrical properties [43, 45, 3, 25], e.g., a tubular structure can be well represented by its skeleton, aka symmetry axis or medial axis, and it has a cylindrical surface. But, due to the lack of powerful learning models, these methods cannot deal with poor contrast, noise and complicated background. (2) Learning-based methods, which learn a per-pixel classification model to detect tubular structures. The performance of this type of methods is largely boosted by deep learning, especially fully convolutional networks (FCN) [23, 49, 48]. FCN and its variants have become out-of-the-box models for tubular organ/tissue segmentation and achieve state-of-the-art results [24, 47]. But, these networks simply try to learn a class label per voxel, which inevitably ignores the geometric arrangement of the voxels in a tubular structure, and consequently can not guarantee that the obtained segmentation has the right shape. + +Since a tubular structure can be well represented by its skeleton and the cross-sectional radius of each skeleton + +point, as shown in Fig. 1, these intrinsic geometric characteristics should be taken into account to serve as a valuable prior. To this end, a straightforward strategy is to first train a model, e.g., a deep network, to directly predict whether each voxel is on the skeleton of the tubular structure or not as well as the cross-sectional radius of each skeleton point, and then reconstruct the segmentation of the tubular structure from its skeleton and radii [34]. However, such a strategy has severe limitations: (1) The ground-truth skeletons used for training are not easily obtained. Although they can be approximately computed from the ground-truth segmentation mask by 3D skeletonization methods, skeleton extraction from 3D mesh representation itself is a hard and unsolved problem [5]. Without reliable skeleton ground-truths, the performance of tubular structure segmentation cannot be guaranteed. (2) It is hard for the classifier to distinguish voxels on the skeleton itself from those immediately next to it, as they have similar features but different labels. + +To tackle the obstacles mentioned above, we propose to perform tubular structure segmentation by training a multitask deep network to predict not only a segmentation mask, but also a distance map, consisting of the distance transform value from each tubular structure voxel to the tubular structure surface, rather than a single skeleton/non-skeleton label. Distance transform [28] is a classical image processing operator to produce a distance map with the same size of the input image, each value in which is the distance from each foreground pixel/voxel to the foreground boundary. Distance transform is also known as the basis of one type of skeletonization algorithms [17], i.e., the ridge of the distance map is the skeleton. Thus, the predicted distance map encodes the geometric characteristics of the tubular structure. This motivated us to design a geometry-aware approach to refine the output segmentation mask by leveraging the shape prior reconstructed from the distance map. Essentially, our approach performs tubular structure segmentation by an implicit skeletonization-reconstruction procedure with no requirements for skeleton ground-truths. We stress that the distance transform brings two benefits for our approach: (1) Distance transform values are defined on each voxel inside a tubular structure, which eliminates the problem of the discontinuity between the skeleton and its surrounding voxels; (2) distance transform values on the skeleton (the ridge of the distance map) are exactly the cross-sectional radii (scales) of the tubular structure, which is an important geometrical measurement. To make the distance transform value prediction more precise, we additionally propose a distance loss term used for network training, which indicates a penalty when predicted distance transform value is far away from its ground-truth. + +We term our method Deep Distance Transform (DDT), as it naturally combines intuitions from the classical distance transform for skeletonization and modern deep seg- + +mentation networks. We emphasize that DDT has two advantages over vanilla segmentation networks: (1) It guides tubular structure segmentation by taking the geometric property of tubular structures into account. This reduces the difficulty to segment tubular structures from complex surrounding structures and ensures that the segmentation results have a proper shape prototype; (2) It predicts the cross-sectional scales of a tubular structure as by-products, which are important for the further study of the tubular structure, such as clinical diagnosis and virtual endoscopy [7]. + +We verify DDT on six datasets, including five datasets for segmentation task, and one dataset for clinical diagnosis. For segmentation task, the performance of our DDT exceeds all backbone networks by a large margin, with even over $13\%$ improvement in terms of Dice-Sørensen coefficient for pancreatic duct segmentation on the famous 3D-Unet [12]. The ablation study further shows the effectiveness of each proposed module in DDT. The experiment for clinical diagnosis leverages dilated pancreatic duct as cue for finding missing PDAC tumors by original deep networks, which verifies the potential of our DDT for early diagnosis of pancreatic cancer. + +# 2. Related Work + +# 2.1. Tubular Structure Segmentation + +# 2.1.1 Geometry-based Methods + +Various methods have been proposed to improve the performance of tubular structure segmentation by considering the geometric characteristics, and a non-exhaustive overview is given here. (1) Contour-based methods extracted the segmentation mask of a tubular structure by means of approximating its shape in the cross-sectional domain [1, 10]. (2) Minimal path approaches conducted tubular structure tracking and were usually interactive. They captured the global minimum curve (energy weighted by the image potential) between two points given by the user [9]. (3) Model-based tracking methods required to refine a tubular structure model, which most of the time adopted a 3D cylinder with elliptical or circular section. At each tracking step, they calculated the new model position by seeking for the optimal model match among all possible new model positions [8]. (4) Centerline based methods found the centerline and estimated the radius of linear structures. For example, multiscale centerline detection method proposed in [34] adopted the idea of distance transform, and reformulated centerline detection and radius estimation in terms of a regression problem in 2D. Our work fully leverages the geometric information of a tubular structure, proposing a distance transform algorithm to implicitly learn the skeleton and cross-sectional radius, and the final segmentation mask is reconstructed by adopting the shape prior of the tubular structure. + +![](images/755b2e4af7beaec078afc2f69df42ece08d7955ac867dc4152b5c11a1bcfb7ef.jpg) +Figure 2. The training and testing stage of DDT, illustrated on an example of veins segmentation. Our DDT has two head branches: the first one is targeting on the ground-truth label map, which performs per-voxel veins/non-veins classification, and the second head branch is targeting on the scale class map, which performs scale prediction for veins voxels. Then a geometry-aware refinement approach is proposed to leverage the shape prior obtained from the scale class map and the pseudo skeleton map to refine the segmentation mask. + +![](images/2ef8c523712ee3e38228c47dc216ee202f0b6ad968055f96d72a43f2c3d40c83.jpg) + +# 2.1.2 Learning-based Method + +Learning-based method for tubular structure segmentation infers a rule from labeled training pairs, one for each pixel. Traditional methods such as 2-D Gabor wavelet and classifier combination [35], ridge-based segmentation [36], and random decision forest based method [2] achieved considerable progress. In the past years, various 2D and 3D deep segmentation networks have become very popular. Some multi-organ segmentation methods [41, 29] were proposed to segment multiple organs simultaneously, including tubular organs. DeepVessel [16] put a four-stage HED-like CNN and conditional random field into an integrated deep network to segment retinal vessel. Kid-Net [37], inspired from 3D-Unet [12], was a two-phase 3D network for kidney vessels segmentation. ResDSN [50, 51] and 3D-Unet [12] were used in Hyper-pairing network [47] to segment tissues in pancreas including duct by combining information from dual-phase imaging. Besides, 3D-HED and its variant were applied for vascular boundary detection [24]. Other scenarios such as using synthetic data to improve endotracheal tube segmentation [15]. Cross-modality domain adaptation framework with adversarial learning which dealt with the domain shift in segmenting biomedical images including as + +cending aorta was also proposed [13]. + +# 2.2. Learning-based Skeleton Extraction + +Learning-based skeleton extraction from natural images has been widely studied in recent decades [38, 31, 34, 22, 21] and achieved promising progress with the help of deep learning [32, 20, 46, 40]. Shen et al. [32] showed that multitask learning, i.e., jointly learning skeleton pixel classification and skeleton scale regression, was important to obtain accurate predicted scales, and it was useful for skeleton-based object segmentation. One recent work for bronchus segmentation calculated the distance from each voxel to its nearest skeleton point [39]. + +However, these methods cannot be directly applied to our tasks, since they require the skeleton ground-truth, which is not easy to obtain from a tiny and highly distorted 3D mask due to the commonly existed annotation errors for medical images [42]. + +# 3. Methodology + +We first define a 3D volume $X$ of size $L \times W \times H$ as a function on the coordinate set $V = \{\mathbf{v} | \mathbf{v} \in N_L \times N_W \times N_H\}$ , i.e., $X: V \to R \subset \mathbb{R}$ where the value on position + +$\mathbf{v}$ is defined as $x_{\mathbf{v}} = X(\mathbf{v})$ . $N_L$ , $N_W$ , $N_H$ represent for the integer set ranging from 1 to $L$ , $W$ , $H$ respectively, so that the Cartesian product of them can form the coordinate set. Given a 3D CT scan $X$ , the goal of tubular structure segmentation is to predict the label $\hat{Y}$ of all voxels in the CT scan, where $\hat{y}_{\mathbf{v}} \in \{0,1\}$ denotes the predicted label for each voxel at position $\mathbf{v}$ , i.e., if the voxel at $\mathbf{v}$ is predicted as a tubular structure voxel, then $\hat{y}_{\mathbf{v}} = 1$ , otherwise $\hat{y}_{\mathbf{v}} = 0$ . We also use $\mathbf{v}$ to denote the voxel at position $\mathbf{v}$ in the remaining of the paper for convenience sake. Fig. 2 illustrates our tubular structure segmentation network, i.e., DDT. + +# 3.1. Distance Transform for Tubular Structure + +In this section, we discuss how to perform distance transform for tubular structure voxels. Given the ground-truth label map $Y$ of the CT scan $X$ in the training phase, let $C_V$ be the set of voxels on the tubular structure surface, which can be defined by + +$$ +C _ {V} = \left\{\mathbf {v} \mid y _ {\mathbf {v}} = 1, \exists \mathbf {u} \in \mathcal {N} (\mathbf {v}), y _ {\mathbf {u}} = 0 \right\}, \tag {1} +$$ + +where $\mathcal{N}(\mathbf{v})$ denotes the 6-neighbour voxels of $\mathbf{v}$ . Then, by performing distance transform on the CT scan $X$ , the distance map $D$ is computed by + +$$ +d _ {\mathbf {v}} = \left\{ \begin{array}{l l} \min _ {\mathbf {u} \in C _ {V}} \| \mathbf {v} - \mathbf {u} \| _ {2}, & \text {i f} y _ {\mathbf {v}} = 1 \\ 0, & \text {i f} y _ {\mathbf {v}} = 0 \end{array} . \right. \tag {2} +$$ + +Note that, for each tubular structure voxel $\mathbf{v}$ , the distance transform assigns it a distance transform value which is the nearest distance from $\mathbf{v}$ to the tubular structure surface $C_V$ . Here we use Euclidean distance, as skeletons from Euclidean distance maps are robust to rotations [4]. + +We further quantize each $d_{\mathbf{v}}$ into one of $K$ bins by rounding $d_{\mathbf{v}}$ to the nearest integer, which converts the continuous distance map $D$ to a discrete quantized distance map $Z$ , where $z_{\mathbf{v}} \in \{0, \dots, K\}$ . We do this quantization, because training a deep network directly for regression is relatively unstable, since outliers, i.e., the commonly existed annotation errors for medical images [42], cause a large error term, which makes it difficult for the network to converge and leads to unstable predictions [30]. Based on quantization, we rephrase the distance prediction problem as a classification problem, i.e., to determine the corresponding bin for each quantized distance. We term the $K$ bins of the quantized distances as $K$ scale classes. We use the term scale since the distance transform values at the skeleton voxels of a tubular structure are its cross-sectional scales. + +# 3.2. Network Training for Deep Distance Transform + +Given a 3D CT scan $X$ and its ground-truth label map $Y$ , we can compute its scale class map (quantized distance map) $Z$ according to the method given in Sec. 3.1. In this + +section, we describe how to train a deep network for tubular structure segmentation by targeting on both $Y$ and $Z$ . + +As shown in Fig. 2, our DDT model has two head branches. The first one is targeting on the ground-truth label map $Y$ , which performs per-voxel classification for semantic segmentation with a weighted cross-entropy loss function $\mathcal{L}_{\mathrm{cls}}$ : + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {c l s}} = - \sum_ {\mathbf {v} \in V} \left(\beta_ {p} y _ {\mathbf {v}} \log p _ {\mathbf {v}} (\mathbf {W}, \mathbf {w} _ {\mathrm {c l s}}) \right. \\ \left. + \beta_ {n} \left(1 - y _ {\mathbf {v}}\right) \log \left(1 - p _ {\mathbf {v}} \left(\mathbf {W}, \mathbf {w} _ {\mathrm {c l s}}\right)\right)\right), \tag {3} \\ \end{array} +$$ + +where $\mathbf{W}$ is the parameters of the network backbone, $\mathbf{w}_{\mathrm{cls}}$ is the parameters of this head branch and $p_{\mathbf{v}}(\mathbf{W},\mathbf{w}_{\mathrm{cls}})$ is the probability that $\mathbf{v}$ is a tubular structure voxel as predicted by this head branch. $\beta_{p} = \frac{0.5}{\sum_{\mathbf{v}}y_{\mathbf{v}}}$ and $\beta_{n} = \frac{0.5}{\sum_{\mathbf{v}}(1 - y_{\mathbf{v}})}$ are loss weights for tubular structure and background classes respectively. + +The second head branch is predicting on the scale class map $Z$ , which performs scale prediction for tubular structure voxels (i.e., $z_{\mathbf{v}} > 0$ ). We introduce a new distance loss function $\mathcal{L}_{\mathrm{dis}}$ to learn this head branch: + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {d i s}} = - \beta_ {p} \sum_ {\mathbf {v} \in V} \sum_ {k = 1} ^ {K} \left(\mathbf {1} \left(z _ {\mathbf {v}} = k\right) \left(\log g _ {\mathbf {v}} ^ {k} (\mathbf {W}, \mathbf {w} _ {\mathrm {d i s}}) \right. \right. \\ \left. \left. + \lambda \omega_ {\mathbf {v}} \log \left(1 - \max _ {l} g _ {\mathbf {v}} ^ {l} \left(\mathbf {W}, \mathbf {w} _ {\mathrm {d i s}}\right)\right)\right)\right), \tag {4} \\ \end{array} +$$ + +where $\mathbf{W}$ is the parameters of the network backbone, $\mathbf{w}_{\mathrm{dis}}$ is the parameters of the second head branch, $\mathbf{1}(\cdot)$ is an indication function, $\lambda$ is a trade-off parameter which balances the two loss terms (we simply set $\lambda = 1$ in our implementation), $g_{\mathbf{v}}^{k}(\mathbf{W},\mathbf{w}_{\mathrm{dis}})$ is the probability that the scale of $\mathbf{v}$ belongs to $k$ -th scale class and $\omega_{\mathbf{v}}$ is a normalized weight defined by $\omega_{\mathbf{v}} = \frac{\left|\arg\max_{l}g_{\mathbf{v}}^{l}(\mathbf{W},\mathbf{w}_{\mathrm{dis}}) - z_{\mathbf{v}}\right|}{K}$ . Note that, the first term of Eq. 4 is the standard softmax loss which penalizes the classification error for each scale class equally. The second term of Eq. 4 is termed as distance loss term, which penalizes the difference between each predicted scale class (i.e., $\max_{l}g_{\mathbf{v}}^{l}(\mathbf{W},\mathbf{w}_{\mathrm{dis}})$ ) and its ground-truth scale class $z_{\mathbf{v}}$ , where the penalty is controlled by $\omega_{\mathbf{v}}$ . Finally, the loss function for our segmentation network is $\mathcal{L} = \mathcal{L}_{\mathrm{cls}} + \mathcal{L}_{\mathrm{dis}}$ and the optimal network parameters are obtained by $(\mathbf{W}^{*},\mathbf{w}_{\mathrm{cls}}^{*},\mathbf{w}_{\mathrm{dis}}^{*}) = \arg \min_{\mathbf{W},\mathbf{w}_{\mathrm{cls}},\mathbf{w}_{\mathrm{dis}}} \mathcal{L}$ . + +# 3.3. Geometry-aware Refinement + +Shape reconstruction from skeletons is a simple and well-known operation, which often achieves better segmentation performance than pure segmentation methods [32]. Inspired by this, we propose a soft version of such reconstruction, termed as geometry-aware refinement (GAR), where skeletons are obtained by thinning probability maps + +and maximal balls centered at skeleton points are softened to Gaussian kernels. GAR ensures smoothness between similar voxels, and spatial and appearance consistency of the segmentation output, especially from clutter background. + +Given a 3D CT scan $X$ in the testing phase, for each voxel $\mathbf{v}$ , our tubular structure segmentation network, DDT, outputs two probabilities, $p_{\mathbf{v}}(\mathbf{W}^{*},\mathbf{w}_{\mathrm{cls}}^{*})$ , which is the probability that $\mathbf{v}$ is a tubular structure voxel and $g_{\mathbf{v}}^{k}(\mathbf{W}^{*},\mathbf{w}_{\mathrm{dis}}^{*})$ , which is the probability that the scale of $\mathbf{v}$ belongs to $k$ -th scale class. For notational simplicity, we use $p_{\mathbf{v}}$ and $g_{\mathbf{v}}^{k}$ to denote $p_{\mathbf{v}}(\mathbf{W}^{*},\mathbf{w}_{\mathrm{cls}}^{*})$ and $g_{\mathbf{v}}^{k}(\mathbf{W}^{*},\mathbf{w}_{\mathrm{dis}}^{*})$ , respectively, in the rest of the paper. $p_{\mathbf{v}}$ provides per-voxel tubular structure segmentation, and $g_{\mathbf{v}}^{k}$ encodes the geometric characteristics of the tubular structure. Our GAR obtains the final segmentation result by refining $p_{\mathbf{v}}$ according to $g_{\mathbf{v}}^{k}$ . This approach is shown in Fig. 2 and is processed as follows: + +a. Pseudo skeleton generation. The probability map $P$ is thinned by thresholding it to generate a binary pseudo skeleton map $S$ for the tubular structure. If $p_{\mathbf{v}} > T^{p}$ , $s_{\mathbf{v}} = 1$ ; otherwise, $s_{\mathbf{v}} = 0$ , and $T^{p}$ is the threshold. +b. Shape reconstruction. For each voxel $\mathbf{v}$ , its predicted scale $\hat{z}_{\mathbf{v}}$ is given by $\hat{z}_{\mathbf{v}} = \arg \max_{k} g_{\mathbf{v}}^{k}$ . We fit a Gaussian kernel to soften each ball and obtain a soft reconstructed shape $\tilde{Y}^{s}$ : + +$$ +\tilde {y} _ {\mathbf {v}} ^ {s} = \sum_ {\mathbf {u} \in \left\{\mathbf {u} ^ {\prime} \mid s _ {\mathbf {u} ^ {\prime}} > 0 \right\}} c _ {\mathbf {u}} \Phi (\mathbf {v}; \mathbf {u}, \boldsymbol {\Sigma} _ {\mathbf {u}}), \tag {5} +$$ + +where $\Phi (\cdot)$ denotes the density function of a multivariate normal distribution, $\mathbf{u}$ is the mean and $\Sigma_{\mathbf{u}}$ is the co-variance matrix. According to the 3-sigma rule, we set $\boldsymbol {\Sigma}_{\mathbf{u}} = (\frac{\hat{z}_{\mathbf{u}}}{3})^{2}\boldsymbol{I}$ , where $\pmb{I}$ is an identity matrix. We notice that the peak of $\Phi (\cdot ;\mathbf{u},\Sigma_{\mathbf{u}})$ becomes smaller if $\hat{z}_{\mathbf{u}}$ is larger. To normalize the peak of each normal distribution, we introduce a normalization factor $c_{\mathbf{u}} = \sqrt{(2\pi)^{3}\mathrm{det}(\Sigma_{\mathbf{u}})}$ + +c. Segmentation refinement. We use the soft reconstructed shape $\tilde{Y}^s$ to refine the segmentation probability $p_{\mathbf{u}}$ , which results in a refined segmentation map $\tilde{Y}^r$ : + +$$ +\tilde {y} _ {\mathbf {v}} ^ {r} = \sum_ {\mathbf {u} \in \left\{\mathbf {u} ^ {\prime} \mid s _ {\mathbf {u} ^ {\prime}} > 0 \right\}} p _ {\mathbf {u}} c _ {\mathbf {u}} \Phi (\mathbf {v}; \mathbf {u}, \boldsymbol {\Sigma} _ {\mathbf {u}}). \tag {6} +$$ + +The final segmentation mask $\hat{Y}$ is obtained by thresholding $\tilde{Y}^r$ , i.e., if $\tilde{y}_{\mathbf{v}}^r > T^r$ , $\hat{y}_{\mathbf{v}} = 1$ , otherwise, $\hat{y}_{\mathbf{v}} = 0$ where $\tilde{y}_{\mathbf{v}}^r$ and $\hat{y}_{\mathbf{v}}$ are the value of voxel at position $\mathbf{v}$ of $\tilde{Y}^r$ and $\hat{Y}$ , respectively. + +As mentioned in Sec. 1, the predicted scale $\hat{z}_{\mathbf{v}}$ is a geometrical measurement for a tubular structure, which is essential for clinical diagnosis. We will show one clinical application in Sec. 4.2. + +# 4. Experiments + +In this section, we conduct the following experiments: we first evaluate our approach on five segmentation datasets, including (1) the dataset used in [47], (2) three tubular structure datasets created by radiologists in our team, and (3) hepatic vessels dataset in Medical Segmentation Decathlon (MSD) challenge [33]. Then, as we mentioned in Sec. 1, our DDT predicts cross-sectional scales as by-products, which are important for applications such as clinical diagnosis. We show that the cross-sectional scale is an important measurement for predicting the dilation degree of a pancreatic duct, which can help find the PDAC tumors missed in [51], without increasing the false positives. + +# 4.1. Tubular Structure Segmentation + +# 4.1.1 Implementation Details and Evaluation Metric + +Our implementation is based on PyTorch. For data preprocessing, followed by [47], we truncate the raw intensity values within the range of $[-100, 240]$ HU and normalize each CT scan into zero mean and unit variance. Data augmentation (i.e., translation, rotation and flipping) is conducted in all the methods, leading to an augmentation factor of 24. During training, we randomly sample patches of a specified size (i.e., 64) due to memory issue. We use exponential learning rate decay with $\gamma = 0.99$ . During testing, we employ the sliding window strategy to obtain the final predictions. The groundtruth distance map for each tubular structure is computed by finding the euclidean distance of each foreground voxel to its nearest boundary voxels. The segmentation accuracy is measured by the well-known Dice-Sørensen coefficient (DSC) in the rest of the paper, unless otherwise specified. + +# 4.1.2 The PDAC Segmentation Dataset [47] + +We first study the PDAC segmentation dataset [47] which has 239 patients with pathologically proven PDAC. All CT scans are contrast enhanced images and our experiments are conducted on only portal venous phase. We follow the same setting and the same cross-validation as reported in [47]. DSCs for three structures were reported in [47]: abnormal pancreas, PDAC mass and pancreatic duct. We only show the average and standard deviation over all cases for pancreatic duct, which is a tubular structure. + +Results and Discussions. To evaluate the performance of the proposed DDT framework, we compare it with a pervoxel classification method [47], termed as SegBaseline in Table 1. It can be seen that our approach outperforms the baseline reported in [47] by a large margin. It is also worth mentioning that although our DDT is only tested on venous phase, the performance is comparable with the hyper- + +Table 1. Performance comparison (DSC, %) on pancreatic duct segmentation (mean ± standard deviation of all cases). SegBaseline stands for per-voxel classification. Multi-phase HPN is a hyper-paring network combining CT scans from both venous (V) and arterial (A) phases. Noted that only CT scans in venous phase are used for SegBaseline and DDT. Bold denotes the best results. + +
MethodsPhaseBackbone Networks
3D-UNetResDSN
SegBaseline [47]V40.25 ± 27.8949.81 ± 26.23
Multi-phase HPN [47]A+V44.93 ± 24.8856.77 ± 23.33
DDT (Ours)V58.20 ± 23.3955.97 ± 24.76
+ +paring network [47] (i.e., Multi-phase HPN), which integrates multi-phase information (i.e., arterial phase and venous phase). For 3D-UNet, our DDT even outperforms the multi-phase method by more than $13\%$ in terms of DSC. + +Ablation Study. We conduct ablation experiments on the PDAC segmentation dataset, using ResDSN as the backbone. These variants of our methods are considered: + +- SegfromSkel: This is the straightforward strategy mentioned in Sec. 1 for skeleton-based tubular structure segmentation, i.e., segmenting by reconstructing from the predicted skeleton. The ground-truth skeleton is obtained by the mesh contraction algorithm [5], and the scale of each skeleton point is defined as its shortest distance to the duct surface. We use the same method in Sec. 3 to instantiate this strategy, but the learning target is the skeleton instead of the duct mask. +- DDT $\lambda = 0$ , w/o GAR: DDT without distance loss term ( $\lambda = 0$ in Eq. 4), and without geometry-aware refinement. +- DDT $\lambda = 0$ , w/ GAR: DDT without distance loss term, and with geometry-aware refinement. +- DDT $\lambda = 1$ , w/o GAR: DDT with distance loss term, and without geometry-aware refinement. +- DDT $\lambda = 1$ , w/ GAR: DDT with distance loss term, and with geometry-aware refinement. + +The results of the ablation experiments are summarized in Table 2. We also show examples of the predicted duct for better understanding how each component (i.e., distance loss term and geometry-aware refinement) learns the geometry information in the supplementary material. Then, we aim at discussing parameters in the geometry-aware refinement component. In our implementation, we set $T^p = 0.98$ and $T^r = 0.5$ in Sec. 3.3. Now we vary each of them and fix the other one to the default value to see how the performance changes. As shown in Fig. 3(a), setting a larger $T^p$ leads to better performance. This phenomenon further verifies the advantage of leveraging scale class map to refine the per-voxel segmentation results, i.e., a thinner pseudo skeleton combined with a scale class map can better represent a + +Table 2. Ablation study of pancreatic duct segmentation using ResDSN as backbone network. GAR indicates the proposed geometry-aware refinement. + +
MethodAverage DSC (%)
SegBaseline [47]49.81
SegfromSkel51.88
DDT λ = 0, w/o GAR52.73
DDT λ = 0, w/ GAR54.70
DDT λ = 1, w/o GAR53.69
DDT λ = 1, w/ GAR55.97
+ +![](images/fc2d82aef4f2784857f37682ef86cc46c58c7ce2884d67ea06fc41bf3efb1508.jpg) +(a) + +![](images/373fc34adc2050717531070168ff878316b715e820dd48079d74670dba28cfda.jpg) +(b) +Figure 3. Performance changes by varying (a) pseudo skeleton generation parameter $T^p$ and (b) segmentation refinement parameter $T^r$ . + +tubular structure. Fig. 3(b) shows that the performance is not sensitive within the range of $T^r \in [0.1, 1]$ . + +# 4.1.3 Tubular Structure Datasets + +We then evaluate our algorithm on multiple tubular structures datasets. Radiologists in our team collected 229 abdominal CT scans of normal cases with aorta annotation, 204 normal cases with veins annotation, and 494 abdominal CT scans of biopsy-proven PDAC cases with pancreatic duct annotation. All these three datasets are under IRB approved protocol. + +We conduct experiments by comparing our DDT with SegBaseline on three backbone networks: 3D-HED [24], 3D-UNet [12] and ResDSN [50, 51]. The results in terms of DSC and mean surface distance (in mm) are reported in Table 3. SegBaseline methods on all backbone networks are significantly lower than our approach. In particular, for 3D-HED, DDT outperforms SegBaseline by $8\%$ , making its strong ability in segmenting small tubular structures like pancreatic duct in medical images. The results are obtained by cross-validation. We also illustrate segmentation results of aorta and veins in Fig. 4 for qualitative comparison. We can see that compared with SegBaseline, DDT captures geometry information, which is more robust to the noise and complicated background. + +# 4.1.4 Hepatic Vessels Dataset in MSD Challenge + +We also test our DDT on a public hepatic vessels dataset in MSD challenge [33]. There are two targets in hepatic vessels dataset: vessels and tumor. As our goal is to segment + +Table 3. Performance comparison (in average DSC, % and mean surface distance in mm) on three tubular structure datasets by using different backbones. “↑” and “↓” indicate the larger and the smaller the better, respectively. Bold denotes the best results for each tubular structure per measurement. + +
BackboneMethodsAortaVeinsPancreatic duct
Average DSC ↑Mean Surface Distance ↓Average DSC ↑Mean Surface Distance ↓Average DSC ↑Mean surface Distance ↓
3D-HED [24]SegBaseline90.851.1573.575.1346.437.06
DDT92.940.8276.203.7854.434.91
3D-UNet [12]SegBaseline92.010.9471.574.4656.633.64
DDT93.300.6175.594.0762.313.56
ResDSN [50]SegBaseline89.891.1271.106.2555.914.24
DDT92.571.1076.605.0359.294.19
+ +![](images/1f29b5d65626f831a999f878893e89dea1a4316b3b28e5873cd2290257978f90.jpg) +Figure 4. Illustration of aorta (upper row) and veins (lower row) segmentation results for selected example images. Numbers on the bottom right show segmentation DSCs. + +![](images/13a9768c6d298de03e72ef3255f4174706e96772b8ff6670e138875b398f114c.jpg) +Figure 5. Examples of PDAC cases. In most PDAC cases, the tumor blocks the duct and causes it to dilate. + +![](images/e4335ff5f3c158f2367075bc16a9e1e07e35278bb743b5f7f40bafdd4291ccdf.jpg) + +tubular structure, we aim at vessel segmentation. Although this challenge is over, it is still open for submissions. We train our DDT on 303 training cases, and submit vessel predictions of the testing cases to the challenge. + +We simply use ResDSN [51] as our backbone network, and follow the same data augmentation as introduced in Sec. 4.1.1. We summarize some leading quantitative results reported in the leaderboard in Table 4. This comparison shows the effectiveness of our DDT. + +# 4.2. Finding PDAC Tumor by Dilated Duct + +Background. PDAC is one of the most deadly disease, whose survival is dismal as when it comes to the time of diagnosis, there are more than half of patients have evidence of metastatic disease. As mentioned in Sec. 1, dilated duct is a vital cue for the presence of a PDAC tumor. The rea + +Table 4. Comparison to competing submissions of MSD challenge: http://medicaldecathlon.com + +
MethodsAverage DSC (%)
DDT (Ours)63.43
nnU-Net [19]63.00
UMCT [44]63.00
K.A.V.athlon62.00
LS Wang's Group55.00
MIMI60.00
MPUnet [26]59.00
+ +son lies in that in most cases, the tumor blocks the duct and causes it to dilate, as shown in Fig. 5. Experienced radiologists usually trace the duct from the pancreas tail onward to see if there exists a truncated duct. If they see the predicted duct pattern as illustrated in Fig. 5, they will be alarmed and treat it as a suspicious PDAC case. For computer-aided diagnosis, given a mixture of normal and abnormal CT scans (PDAC cases), if some voxels are segmented as a tumor by a state-of-the-art deep network, we can provide radiologists with tumor locations [51]. But, as reported [51], even a state-of-the-art deep network failed to detect 8 PDACs out of 136 abnormal cases. As emphasized in [51], for clinical purposes, we shall guarantee a high sensitivity with a reasonable specificity. Then how can we use dilated duct as a cue to help find the PDAC tumor in an abnormal case even if it does NOT have any PDAC tumor prediction by directly applying deep networks? + +Clinical Workflow. The flowchart of our strategy is illustrated in Fig. 6. We apply our DDT on the cases which do not have tumor prediction by [51]. Then the predictions of DDT are processed as follows: + +1. Find cases with predicted dilated duct. Let's assume a case has $N$ predicted duct voxels. If $N = 0$ , then we regard this case as negative. If $N > 0$ , let's denote the predicted associated scales (radii) are $\{\hat{z}_{\mathbf{v}_i}\}_{i=1}^N$ . If $\arg \max_i \hat{z}_{\mathbf{v}_i} > T^s$ , i.e., the largest cross-sectional scale is larger than $T^s$ , we regard this as a dilated duct, and a tumor may present on its head location. Otherwise, we + +![](images/a98b0c97c7e4f83a55ca7a5b3600ba99e811255584262b64f2f536764bfccbde.jpg) +Figure 6. Flowchart of finding missing PDAC tumor by dilated duct. + +treat this case as negative. We set $T^s = 3$ , since the radius of a dilated duct should be larger than $1.5 \, \mathrm{mm}$ [14], and the voxel spatial resolution of the dataset [51] is around $0.5 \, \mathrm{mm}^3$ . + +2. Extract candidate tumor regions by the location of dilated duct. We use geodesic distance to find the extreme points of the duct [6]. Then we crop a set of square regions of size $\Re^3$ centered on the extreme points not lying on the tail of the pancreas, since a tumor presenting on the tail of the pancreas will not block a duct. This set of square regions are candidate tumor regions. +3. Verify candidate tumor regions. As candidate tumor regions may come from both normal and abnormal cases. We should verify whether the candidate region is a real tumor region. From the training set, we randomly crop regions of size $\Re^3$ around PDAC tumor region as positive training data, and randomly crop regions of size $\Re^3$ from normal pancreas as negative training data. Then we train a ResDSN [51] to verify these candidate tumor regions. We follow the same criterion used in [51] to compute sensitivity and specificity. + +Experiment Settings. We follow the same data split as used in [51]. We only test our algorithm on the 8 PDAC cases and 197 normal cases which do not have tumor prediction by [51], aiming at finding missing tumor by dilated duct, while not introducing more false positives. $\Re = 48$ . + +Analysis. We compare our results with those of [51] in Table 5. In our experiment, 4 out of 8 abnormal cases and 3 out of 197 normal cases have predicted dilated duct by step 1. An example is shown in Fig. 7(a). The tubular structure residing inside the ground-truth pancreas, right behind the ground-truth tumor is our predicted dilated duct. This leads to overall 18 3D candidate tumor regions by step 2, shown as the yellow dashed box in Fig. 7(b) visualized in 2D. In step 3, we can successfully find all tumor regions in abnormal cases, and discard non-tumor regions in normal cases. As shown in Fig. 7(c), our algorithm can find the right tumor, which overlaps with the tumor annotation in Fig. 7(d). + +It should be emphasized that dilated duct helps us to narrow the searching space of the tumor, so that we are able to focus on a finer region. Though we train a same network used in [51], half of the missing tumors in [51] can be found. In this way, we are imitating how radiologists detect + +![](images/033d441a581bf8d7691c8cb50984f32b663ce3b010642524bdd52f50aa3c7be4.jpg) +Figure 7. Examples of finding missed tumor of [51] by dilated duct. (a) The ground-truth tumor is right behind one end of the predicted dilated duct. The ground-truth pancreas is shown as a reference. (b) A cropped CT slice with predicted duct (we choose green for better visualization). The yellow dashed box is a candidate tumor region, shown in 2D. (c) and (d) are the same zoomed in image region with predicted and ground-truth tumor, respectively. + +Table 5. Normal vs. abnormal classification results. Zhu et al. [51] + ours denotes applying our method to find the missing tumor of Zhu et al.. "↑" and "↓" indicate the larger and the smaller the better, respectively. + +
MethodsMisses ↓Sensitivity ↑Specificity ↑
Zhu et al. [51]8/13694.1%98.5%
Zhu et al. [51] + Ours4/13697.1%98.5%
+ +PDAC, i.e., they can find visible PDAC tumors easily, but for difficult ones, they will seek help from dilated ducts. + +# 5. Conclusions + +In this paper, we present Deep Distance Transform (DDT) for accurate tubular structure segmentation, which combines intuitions from the classical distance transform for skeletonization and modern deep segmentation networks. DDT guides segmentation by taking the geometric property of the tubular structure into account, which not only leads to a better segmentation result, but also provides the cross-sectional scales, i.e., a geometric measure for the thickness of tubular structures. We evaluated our approach on six datasets including four tubular structures. Experiment shows the superiority of the proposed DDT for tubular structure segmentation and clinical application. + +Acknowledgements. This work was supported by the Lustgarten Foundation for Pancreatic Cancer Research and also supported by NSFC No. 61672336. + +# References + +[1] Luis Álvarez, Agustín Trujillo-Pino, Carmelo Cuenca, Esther González, Julio Esclarín, Luis Gómez, Luis Mazorra, Miguel Aleman-Flores, Pablo G. Tahoces, and José M. Carreira-Villamor. Tracking the aortic lumen geometry by optimizing the 3d orientation of its cross-sections. In Proc. MICCAI, 2017. +[2] Roberto Annunziata, Ahmad Kheirkhah, Pedram Hamrah, and Emanuele Trucco. Scale and curvature invariant ridge detector for tortuous and fragmented structures. In Proc. MICCAI, pages 588-595, 2015. +[3] Luca Antiga, Bogdan Ene-Iordache, and Andrea Remuzzi. Computational geometry for patient-specific reconstruction and meshing of blood vessels from angiography. IEEE Trans. Med. Imaging, 22(5):674-684, 2003. +[4] Carlo Arcelli and Gabriella Sanniti di Baja. Ridge points in euclidean distance maps. Pattern Recognition Letters, 13(4):237-243, 1992. +[5] Oscar Kin-Chung Au, Chiew-Lan Tai, Hung-Kuo Chu, Daniel Cohen-Or, and Tong-Yee Lee. Skeleton extraction by mesh contraction. ACM Trans. Graph., 27(3):44:1-44:10, 2008. +[6] Andreas Baak, Meinard Müller, Gaurav Bharaj, Hans-Peter Seidel, and Christian Theobalt. A data-driven approach for real-time full body pose reconstruction from a depth camera. In Proc. ICCV, 2011. +[7] Christian Bauer and Horst Bischof. Extracting curve skeletons from gray value images for virtual endoscopy. In International Workshop on Medical Imaging and Virtual Reality, pages 393-402, 2008. +[8] Christian Bauer, Thomas Pock, Erich Sorantin, Horst Bischof, and Reinhard Beichel. Segmentation of interwoven 3d tubular tree structures utilizing shape priors and graph cuts. Medical Image Analysis, 14(2):172-184, 2010. +[9] Fethallah Benmansour and Laurent D. Cohen. Tubular structure segmentation based on minimal path method and anisotropic enhancement. International Journal of Computer Vision, 92(2):192-210, 2011. +[10] Vicent Caseles, Ron Kimmel, and Guillermo Sapiro. Geodesic active contours. International Journal of Computer Vision, 22(1):61-79, 1997. +[11] Linda C. Chu., Michael G. Goggins., and Elliot K. Fishman. Diagnosis and detection of pancreatic cancer. The Cancer Journal, 23(6):333-342, 2017. +[12] Özgün Çiçek, Ahmed Abdulkadir, Soeren S. Lienkamp, Thomas Brox, and Olaf Ronneberger. 3d u-net: Learning dense volumetric segmentation from sparse annotation. In Proc. MICCAI, 2016. +[13] Qi Dou, Cheng Ouyang, Cheng Chen, Hao Chen, and Pheng-Ann Heng. Unsupervised cross-modality domain adaptation of convnets for biomedical image segmentations with adversarial loss. In Proc. IJCAI, 2018. +[14] Mark D Edge, Maarouf Hoteit, Amir P Patel, Xiaoping Wang, Deborah A Baumgarten, and Qiang Cai. Clinical significance of main pancreatic duct dilation on computed tomography: Single and double duct dilation. World J Gastroenterol., 13(11):1701-1705, 2007. + +[15] Maayan Frid-Adar, Rula Amer, and Hayit Greenspan. Endotracheal tube detection and segmentation in chest radiographs using synthetic data. In Proc. MICCAI, pages 784–792, 2019. +[16] Huazhu Fu, Yanwu Xu, Stephen Lin, Damon Wing Kee Wong, and Jiang Liu. Deepvessel: Retinal vessel segmentation via deep learning and conditional random field. In Proc. MICCAI, pages 132-139, 2016. +[17] Yaorong Ge and J. Michael Fitzpatrick. On the generation of skeletons from discrete euclidean distance maps. IEEE Trans. Pattern Anal. Mach. Intell., 18(11):1055-1066, 1996. +[18] Florent Gréland, Fabien Baldacci, Anne Vialard, and Jean-Philippe Domenger. New methods for the geometrical analysis of tubular organs. Medical Image Analysis, 42:89–101, 2017. +[19] Fabian Isensee, Jens Petersen, Simon A. A. Kohl, Paul F. Jäger, and Klaus H. Maier-Hein. nnu-net: Breaking the spell on successful medical image segmentation. CoRR, abs/1904.08128, 2019. +[20] Wei Ke, Jie Chen, Jianbin Jiao, Guoying Zhao, and Qixiang Ye. SRN: side-output residual network for object symmetry detection in the wild. In Proc. CVPR, 2017. +[21] Tom Sie Ho Lee, Sanja Fidler, and Sven J. Dickinson. Detecting curved symmetric parts using a deformable disc model. In Proc. ICCV, 2013. +[22] Alex Levinshtein, Cristian Sminchisescu, and Sven J. Dickinson. Multiscale symmetric part detection and grouping. International Journal of Computer Vision, 104(2):117-134, 2013. +[23] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully Convolutional Networks for Semantic Segmentation. Proc. CVPR, 2015. +[24] J. Merkow, D. Kriegman, A. Marsden, and Z Tu. Dense volume-to-volume vascular boundary detection. In MICCAI, 2016. +[25] Delphine Nain, Anthony J. Yezzi, and Greg Turk. Vessel segmentation using a shape driven flow. In Proc. MICCAI, 2004. +[26] Mathias Perslev, Erik Björnager Dam, Akshay Pai, and Christian Igel. One network to segment them all: A general, lightweight system for accurate 3d medical image segmentation. In MICCAI, 2019. +[27] Wayne Rosamond, Katherine Flegal, Karen Furie, Alan Go, Kurt Greenlund, Nancy Haase, Susan M. Hailpern, Michael Ho, Virginia Howard, Brett Kissela, Steven Kittner, Donald Lloyd-Jones, Mary McDermott, James Meigs, Claudia Moy, Graham Nichol, Christopher O'Donnell, Veronique Roger, Paul Sorlie, Julia Steinberger, Thomas Thom, Matt Wilson, and Yuling Hong. Heart disease and stroke statistics-2008 update. Circulation, 117(4), 2008. +[28] Azriel Rosenfeld and John L. Pfaltz. Distance functions on digital pictures. Pattern Recognition, 1:33-61, 1968. +[29] Holger R. Roth, Hirohisa Oda, Yuichiro Hayashi, Masahiro Oda, Natsuki Shimizu, Michitaka Fujiwara, Kazunari Misawa, and Kensaku Mori. Hierarchical 3d fully convolutional networks for multi-organ segmentation. CoRR, abs/1704.06382, 2017. + +[30] Rasmus Rothe, Radu Timofte, and Luc Van Gool. Deep expectation of real and apparent age from a single image without facial landmarks. International Journal of Computer Vision, 126(2-4):144-157, 2018. +[31] Wei Shen, Xiang Bai, Zihao Hu, and Zhijiang Zhang. Multiple instance subspace learning via partial random projection tree for local reflection symmetry in natural images. Pattern Recognition, 52:306-316, 2016. +[32] Wei Shen, Kai Zhao, Yuan Jiang, Yan Wang, Xiang Bai, and Alan L. Yuille. Deepskeleton: Learning multi-task scale-associated deep side outputs for object skeleton extraction in natural images. IEEE Trans. Image Processing, 26(11):5298-5311, 2017. +[33] Amber L. Simpson, Michela Antonelli, Spyridon Bakas, Michel Bilello, Keyvan Farahani, Bram van Ginneken, Annette Kopp-Schneider, Bennett A. Landman, Geert J. S. Littjens, Bjoern H. Menze, Olaf Ronneberger, Ronald M. Summers, Patrick Bilic, Patrick Ferdinand Christ, Richard K. G. Do, Marc Gollub, Jennifer Golia-Pernicka, Stephan Heckers, William R. Jarnagin, Maureen McHugo, Sandy Napel, Eugene Vorontsov, Lena Maier-Hein, and M. Jorge Cardoso. A large annotated medical image dataset for the development and evaluation of segmentation algorithms. CoRR, abs/1902.09063, 2019. +[34] Amos Sironi, Vincent Lepetit, and Pascal Fua. Multiscale centerline detection by learning a scale-space distance transform. In CVPR, 2014. +[35] João V. B. Soares, Jorge J. G. Leandro, Roberto M. Cesar, Herbert F. Jelinek, and Michael J. Cree. Retinal vessel segmentation using the 2-d gabor wavelet and supervised classification. IEEE Trans. Med. Imaging, 25(9):1214-1222, 2006. +[36] Joes Staal, Michael D. Abramoff, Meindert Niemeijer, Max A. Viergever, and Bram van Ginneken. Ridge-based vessel segmentation in color images of the retina. IEEE Trans. Med. Imaging, 23(4):501-509, 2004. +[37] Ahmed Taha, Pechin Lo, Junning Li, and Tao Zhao. Kid-net: Convolution networks for kidney vessels segmentation from ct-volumes. In Proc. MICCAI, 2018. +[38] Stavros Tsogkas and Iasonas Kokkinos. Learning-based symmetry detection in natural images. In Proc. ECCV, pages 41-54, 2012. +[39] Chenglong Wang, Yuichiro Hayashi, Masahiro Oda, Hayato Itoh, Takayuki Kitasaka, Alejandro F. Frangi, and Kensaku Mori. Tubular structure segmentation using spatially connected network with radial distance loss for 3d medical images. In Proc. MICCAI, 2019. +[40] Yukang Wang, Yongchao Xu, Stavros Tsogkas, Xiang Bai, Sven J. Dickinson, and Kaleem Siddiqi. Deepflux for skeletons in the wild. In Proc. CVPR, 2019. +[41] Yan Wang, Yuyin Zhou, Wei Shen, Seyoun Park, Elliot K. Fishman, and Alan L. Yuille. Abdominal multi-organ segmentation with organ-attention networks and statistical fusion. Medical Image Analysis, 55:88–102, 2019. +[42] Yan Wang, Yuyin Zhou, Peng Tang, Wei Shen, Elliot K. Fishman, and Alan L. Yuille. Training multi-organ segmentation networks with sample selection by relaxed upper confident bound. In Proc. MICCAI, 2018. + +[43] Onno Wink, Hiro J. Niessen, and Max A. Viergever. Fast delineation and visualization of vessels in 3d angiographic images. IEEE Trans. Med. Imaging, 19(4):337-346, 2000. +[44] Yingda Xia, Fengze Liu, Dong Yang, Jinzheng Cai, Lequan Yu, Zhuotun Zhu, Daguang Xu, Alan L. Yuille, and Holger Roth. 3d semi-supervised learning with uncertainty-aware multi-view co-training. In WACV, 2019. +[45] Peter J. Yim, Juan R. Cebral, Rakesh Mullick, and Peter L. Choyke. Vessel surface reconstruction with a tubular deformable model. IEEE Trans. Med. Imaging, 20(12):1411-1421, 2001. +[46] Kai Zhao, Wei Shen, Shanghua Gao, Dandan Li, and Ming-Ming Cheng. Hi-fi: Hierarchical feature integration for skeleton detection. In Proc. IJCAI, 2018. +[47] Yuyin Zhou, Yingwei Li, Zhishuai Zhang, Yan Wang, Angtian Wang, Elliot K Fishman, Alan L Yuille, and Seyoun Park. Hyper-pairing network for multi-phase pancreatic ductal adenocarcinoma segmentation. In Proc.MICCAI, 2019. +[48] Yuyin Zhou, Zhe Li, Song Bai, Xinlei Chen, Mei Han, Chong Wang, Elliot K. Fishman, and Alan L. Yuille. Prior-aware neural network for partially-supervised multi-organ segmentation. In Proc. ICCV, 2019. +[49] Yuyin Zhou, Lingxi Xie, Wei Shen, Yan Wang, Elliot K. Fishman, and Alan L. Yuille. A fixed-point model for pancreas segmentation in abdominal CT scans. In Proc. MIC-CAI, 2017. +[50] Zhuotun Zhu, Yingda Xia, Wei Shen, Elliot K. Fishman, and Alan L. Yuille. A 3d coarse-to-fine framework for volumetric medical image segmentation. In Proc. 3DV, 2018. +[51] Zhuotun Zhu, Yingda Xia, Lingxi Xie, Elliot K. Fishman, and Alan L. Yuille. Multi-scale coarse-to-fine segmentation for screening pancreatic ductal adenocarcinoma. In Proc. MICCAI, 2019. \ No newline at end of file diff --git a/deepdistancetransformfortubularstructuresegmentationinctscans/images.zip b/deepdistancetransformfortubularstructuresegmentationinctscans/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..267dd7f784d7d0e1724565bf64e68883bdf56439 --- /dev/null +++ b/deepdistancetransformfortubularstructuresegmentationinctscans/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d1659e1a274fc4713d458e80129eb904306625c663914a1dde084fb80e776a8 +size 449870 diff --git a/deepdistancetransformfortubularstructuresegmentationinctscans/layout.json b/deepdistancetransformfortubularstructuresegmentationinctscans/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c8f6350b401d623f6ce82271ddc9e4b3384933d8 --- /dev/null +++ b/deepdistancetransformfortubularstructuresegmentationinctscans/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8520b08709fd50456f1cb8e1b94ad08422ef184f21dea11b320ba27febca684b +size 444649 diff --git a/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/abd5939a-ed49-455a-9151-ae411e3a5201_content_list.json b/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/abd5939a-ed49-455a-9151-ae411e3a5201_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..8868b502c17ac580ba5a76ce17c33675b79bef2a --- /dev/null +++ b/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/abd5939a-ed49-455a-9151-ae411e3a5201_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bcd0c9dc3affb3e18e0e7d44cd6a508f1d2ecbbc6d6b8a177546c30028ec8a33 +size 82162 diff --git a/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/abd5939a-ed49-455a-9151-ae411e3a5201_model.json b/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/abd5939a-ed49-455a-9151-ae411e3a5201_model.json new file mode 100644 index 0000000000000000000000000000000000000000..8cbba8919683e87ee0fcbe775a13956ef337eda5 --- /dev/null +++ b/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/abd5939a-ed49-455a-9151-ae411e3a5201_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bdb15d3eaa95aebbeadfcca6326c31d9d5b18ca295fb13009ee7afcd28999e29 +size 105903 diff --git a/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/abd5939a-ed49-455a-9151-ae411e3a5201_origin.pdf b/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/abd5939a-ed49-455a-9151-ae411e3a5201_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9720d28e154804a98a2eb119fff2fdf3796343c2 --- /dev/null +++ b/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/abd5939a-ed49-455a-9151-ae411e3a5201_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec8a195144ccab8af75d91af527d45bc80f5cffca5b93efeecdedc2e92952f54 +size 775751 diff --git a/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/full.md b/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/full.md new file mode 100644 index 0000000000000000000000000000000000000000..6a02ac1f4d15b418227b1f2fe30db73367070d38 --- /dev/null +++ b/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/full.md @@ -0,0 +1,343 @@ +# DeepEMD: Few-Shot Image Classification with Differentiable Earth Mover's Distance and Structured Classifiers + +Chi Zhang $^{1}$ , Yujun Cai $^{1}$ , Guosheng Lin $^{1*}$ , Chunhua Shen $^{2}$ + +1Nanyang Technological University, Singapore 2The University of Adelaide, Australia E-mail: chi007@e.ntu.edu.sg, gslin@ntu.edu.sg + +# Abstract + +In this paper, we address the few-shot classification task from a new perspective of optimal matching between image regions. We adopt the Earth Mover's Distance (EMD) as a metric to compute a structural distance between dense image representations to determine image relevance. The EMD generates the optimal matching flows between structural elements that have the minimum matching cost, which is used to represent the image distance for classification. To generate the important weights of elements in the EMD formulation, we design a cross-reference mechanism, which can effectively minimize the impact caused by the cluttered background and large intra-class appearance variations. To handle $k$ -shot classification, we propose to learn a structured fully connected layer that can directly classify dense image representations with the EMD. Based on the implicit function theorem, the EMD can be inserted as a layer into the network for end-to-end training. We conduct comprehensive experiments to validate our algorithm and we set new state-of-the-art performance on four popular few-shot classification benchmarks, namely miniImageNet, tieredImageNet, Fewshot-CIFAR100 (FC100) and Caltech-UCSD Birds-200-2011 (CUB). + +# 1. Introduction + +Deep neural networks have achieved breakthroughs in a wide range of visual understanding tasks in the past few years. However, its data-driven nature often makes it struggle when no sufficiently large labeled training data is available. Meta learning, on the other hand, is proposed to learn a model that can quickly generalize to new tasks with minor adaption steps. One of the most well-studied test-bed for meta-learning algorithms is few-shot image classification, which aims to perform classification on new image categories with only a small amount of labeled training data. + +To address this problem, a line of the previous litera + +![](images/33b978b1ad401db08150857e112d13aa7b54950b8236d48f7848f240c8e1c204.jpg) +Figure 1: Illustration of using Earth Mover's Distance for one-shot image classification. Our algorithm uses optimal matching cost between image regions to represent the image distance. + +ture adopts metric-based methods [30,43,63,66,67,73] that learn to represent image data in an appropriate feature space and use a distance function to predict image labels. Following the formulation of the standard image classification networks [16, 24, 62], metric-based methods often employ a convolution neural network to learn image feature representations, but replace the fully connected layer with a distance function, e.g., cosine distance and Euclidean distance. Such distance functions directly compute the distance between the embeddings of the test images and training images for classification, which bypasses the difficult optimization problem in learning a classifier for the few-shot setting. The network is trained by sampling from a distribution of tasks, in the hopes of acquiring generalization ability to unseen but similar tasks. + +Despite their promising results, we observe that the cluttered background and large intra-class appearance variations may drive the image-level embeddings from the same category far apart in a given metric space. Although the problem can be alleviated by the neural network under the fully supervised training, thanks to the activation functions and abundant training images, it is almost inevitably am + +plified in low-data regimes and thus negatively impacts the image classification. Moreover, a mixed global representation destroys image structures and loses local features. Local features can provide discriminative and transferable information across categories, which can be important for image classification in the few-shot scenario. Therefore, a desirable metric-based algorithm should have the ability to utilize the local discriminative representations for metric learning and minimize the impact caused by the irrelevant regions. + +A natural way to compare two complex structured representations is to compare their building blocks. The difficulty lies in that we do not have their correspondence supervision for training and not all building elements can always find their counterparts in the other structures. To solve the problems above, in this paper, we formalize the few-shot classification as an instance of optimal matching, and we propose to use the optimal matching cost between two structures to represent their similarity. Given the feature representations generated by two images, we adopt the Earth Mover's Distance (EMD) [50] to compute their structural similarity. EMD is the metric for computing distance between structural representations, which was originally proposed for image retrieval. Given the distance between all element pairs, EMD can acquire the optimal matching flows between two structures that have the minimum cost. It can also be interpreted as the minimum cost to reconstruct a structure representation with the other one. An illustration of our motivation is shown in Fig. 1. EMD has the formulation of the transportation problem [17] and the global minimum can be achieved by solving a Linear Programming problem. To embed the optimization problem into the model for end-to-end training, we can apply the implicit function theorem [3,8,22] to form the Jacobian matrix of the optimal optimization variable with respect to the problem parameters [3]. + +An important problem parameter in the EMD formulation is the weight of each element. Elements with large weights generate more matching flows and thus contribute more to the overall distance. Ideally, the algorithm should have the flexibility to assign less weight on irrelevant regions such that they contribute less to the overall distance no matter which elements they match with. To achieve this goal, we propose a cross-reference mechanism to determine the importance of the elements. In our cross-reference mechanism, each node is determined by comparing it with the global statistics of the other structure. This aims to give less weight to the high-variance background regions and the object parts that are not co-ocurrent in two images. + +In the $k$ -shot setting where multiple support images are presented, we propose to learn a structured fully connected (FC) layer as the classifier for classification to make use of the increasing number of training images. The struc + +tured FC layer includes a group of learnable vectors for each class. At inference time, we use the EMD to compute the distance between the image embeddings and the learnable vector set in each class for classification. The structured FC is an extension of the standard fully connected layer in that it replaces dot product operations between vectors with EMD function between vector sets such that the structured FC layer could directly classify feature maps. The structured FC layer can also be interpreted as learning a prototype embedding from a dummy image for each category such that the test images can be matched with them for classification. + +To validate our algorithm, we conduct extensive experiments on multiple datasets to demonstrate the effectiveness of our algorithm. Our main contributions are summarized as follows: + +- We propose to formalize the few-shot image classification as an optimal matching problem and adopt the Earth Mover's Distance as the distance metric between structured representations. The EMD layer can be embedded into the network for end-to-end training. +- We propose a cross-reference mechanism to generate the weights of elements in the EMD formulation, which can effectively reduce the noise introduced by the background regions in the images. +- We propose to learn a structured fully connected layer in the $k$ -shot settings, which could directly classify the structural representations of an image using the Earth Mover's Distance. +- Experiments on four popular few-shot classification benchmark datasets—miniImagenet, tieredImagenet, FC100 and CUB, show that our algorithm on both 1-shot and 5-shot tasks significantly outperforms the baseline methods and achieves new state-of-the-art performance on all of them. + +# 2. Related Work + +Few-Shot Learning. There are two main streams in the few-shot classification literature, metric-based approaches and optimization-based approaches. Optimization-based methods [2,5,9-11,18,26,31-33,36,38,40-42,44,46,47, 54, 55, 58, 64, 79] target at effectively adapting model parameters to new tasks in the low-shot regime. Our method is more related to the metric-based methods [30, 43, 63, 66, 67, 73], which aim to represent samples in an appropriate feature space where data from different categories can be distinguished with distance metrics. + +Apart from the two popular branches, many other promising methods are also proposed to handle the few-shot classification problem, such as works based on graph theories [13, 15, 21], reinforcement learning [6], differentiable + +SVM [25], temporal convolutions [39], etc. [4, 12, 14, 20, 27, 28, 37, 45, 49, 57, 60, 61, 65, 69-71, 76, 77]. + +Other related topics. Besides image classification, few-shot learning is also investigated in image segmentation [34, 74, 75] and object detection tasks [72]. There are also some previous works related to the techniques adopted in this paper. For example, Schulter et al. [56] solve the multi-object tracking problem with a network flow formulation. Zhao et al. [78] propose to use the differential EMD to handle visual tracking problem based on the sensitivity analysis of the simplex method. Li [29] uses a tensor-SIFT based EMD to tackle the contour tracking problem. + +# 3. Method + +In this section, we first present a brief review of the Earth Mover's Distance and describe how we formulate the one-shot classification as an optimal matching problem that can be trained end-to-end. Then, we describe our cross-reference mechanism to generate the weight of each node, which is an important parameter in the EMD formulation. Finally, we demonstrate how to use the EMD distance function to handle $k$ -shot learning with our proposed structured fully connected layer. The overview of our framework for one-shot classification is shown in Fig. 2. + +# 3.1. Revisiting Earth Mover's Distance + +The Earth Mover's Distance is a distance measure between two sets of weighted objects or distributions, which is built upon the basic distance between individual objects. It has the form of the well-studied transportation problem (TP) from Linear Programming. Specially, suppose that a set of sources or suppliers $S = \{s_i|i = 1,2,\dots m\}$ are required to transport goods to a set of destinations or demanders $\mathcal{D} = \{d_j|j = 1,2,\dots k\}$ , where $s_i$ denotes the supply units of supplier $i$ and $d_{j}$ represents the demand of $j$ -th demander. The cost per unit transported from supplier $i$ to demander $j$ is denoted by $c_{ij}$ , and the number of units transported is denoted by $x_{ij}$ . The goal of the transportation problem is then to find a least-expensive flow of goods $\tilde{\mathcal{X}} = \{\tilde{x}_{ij}|i = 1,\dots m,j = 1,\dots k\}$ from the suppliers to the demanders: + +$$ +\underset {x _ {i j}} {\text {m i n i m i z e}} \quad \sum_ {i = 1} ^ {m} \sum_ {j = 1} ^ {k} c _ {i j} x _ {i j} +$$ + +subject to $x_{ij}\geqslant 0,i = 1,\ldots ,m,j = 1,\ldots ,k$ (1) + +$$ +\sum_ {j = 1} ^ {k} x _ {i j} = s _ {i}, i = 1, \dots m \tag {1} +$$ + +$$ +\sum_ {i = 1} ^ {m} x _ {i j} = d _ {j}, j = 1, \dots k +$$ + +Note that roles of suppliers and demanders can be switched without affecting the total transportation cost. $s_i$ and $d_j$ are also called the weights of the nodes, which controls the total matching flows generated by each node. EMD seeks an + +optimal matching $\tilde{\mathcal{X}}$ between suppliers and demanders such that overall matching cost can be minimized. The global optimal matching flows $\tilde{\mathcal{X}}$ be achieved by solving the Linear Programming problem. + +# 3.2. EMD for Few-Shot Classification + +In the few-shot classification task, metric-based methods aim to find a good distance metric and data representations to compute the similarity between images, which are used for classification. Different from the previous methods that perform distance computation between the image-level embeddings, our approach advocates the use of discriminative local information. We decompose an image into a set of local representations and use the optimal matching cost between two images to represent their similarity. Concretely, we first deploy a fully convolutional network (FCN) [59] to generate the image embedding $\mathbf{U} \in \mathbb{R}^{H \times W \times C}$ , where $H$ and $W$ denote the spatial size of the feature map and $C$ is the feature dimension. Each image representation contains a collection of local feature vectors $[\mathbf{u}_1, \mathbf{u}_2, \dots, \mathbf{u}_{HW}]$ , and each vector $\mathbf{u}_i$ can be seen as a node in the set. Thus, the similarity of two images can be represented as the optimal matching cost between two sets of vectors. Following the original EMD formulation in Equation 1, the cost per unit is obtained by computing the pairwise distance between embedding nodes $\mathbf{u}_i$ , $\mathbf{v}_j$ from two image features: + +$$ +c _ {i j} = 1 - \frac {\mathbf {u} _ {i} ^ {T} \mathbf {v} _ {j}}{\| \mathbf {u} _ {i} \| \| \mathbf {v} _ {j} \|}, \tag {2} +$$ + +where nodes with similar representations tend to generate fewer matching cost between each other. As to the generation of weights $s_i$ and $d_j$ , we leave the detailed elaborations in Section 3.4. Once acquiring the optimal matching flows $\tilde{\mathcal{X}}$ , we can compute the similarity score $s$ between image representations with: + +$$ +s (\mathbf {U}, \mathbf {V}) = \sum_ {i = 1} ^ {H W} \sum_ {j = 1} ^ {H W} (1 - c _ {i j}) \tilde {x} _ {i j}. \tag {3} +$$ + +# 3.3. End-to-End Training + +In order to embed the optimal matching problem into a neural network for end-to-end training, it is helpful to make the solution of the optimal matching $\tilde{\mathcal{X}}$ be differentiable with respect to the problem parameters $\theta$ . As is indicated by [3], we can apply implicit function theorem [3, 8, 22] on the optimality (KKT) conditions to obtain the Jacobian. For the sake of completeness, we start with Equation 1 which is assigned compactly in matrix form: + +$$ +\underset {x} {\text {m i n i m i z e}} \quad c (\theta) ^ {T} x +$$ + +subject to $G(\theta)x\leqslant h(\theta)$ (4) + +$$ +A (\theta) x = b (\theta). +$$ + +![](images/54a0f4de9597b094abcf376b687043a8c8cf47cf22dc3159339fcf8186e9afa3.jpg) +Figure 2: Our framework for 1-shot image classification. Given a pair of images, we first use a Fully Convolutional Network to generate dense representations of them, which contain two sets of feature vectors. The model generates the weights of all vectors with our proposed cross-reference mechanism (not indicated in the figure). Then we use the Earth Mover's Distance to generate the optimal matching flows between two sets that have the minimum overall matching cost. Finally, based on the optimal matching flows and matching costs, we can compute the distance between two images, which are used for classification. + +Here $x \in \mathbb{R}^n$ is our optimization variable, with $n = HW \times HW$ representing the total number of matching flows in $\mathcal{X}$ . $\theta$ is the problem parameter that relates to the earlier layers in a differentiable way. $Ax = b$ represents the equality constraints and $Gx \leqslant h$ denotes the inequality constraint in Equation 1. Accordingly, the Lagrangian of the LP problem in equation 4 is given by: + +$$ +L (\theta , x, \nu , \lambda) = c ^ {T} x + \lambda^ {T} (G x - h) + \nu^ {T} (A x - b), \quad (5) +$$ + +where $\nu$ are the dual variables on the equality constraints and $\lambda \geqslant 0$ are the dual variables on the inequality constraints. + +Following the KKT conditions with notational convenience, we can obtain the optimum $(\tilde{x},\tilde{\nu},\tilde{\lambda})$ of the objective function by solving $g(\theta ,\tilde{x},\tilde{\nu},\tilde{\lambda}) = 0$ with primal-dual interior point methods, where + +$$ +g (\theta , x, \nu , \lambda) = \left[ \begin{array}{c} \nabla_ {\theta} L (\theta , x, \nu , \lambda) \\ \mathbf {d i a g} (\lambda) (G (\theta) x - h (\theta)) \\ A (\theta) x - b (\theta) \end{array} \right]. \tag {6} +$$ + +Then, the following theorem holds to help us derive the gradients of the LP parameters. + +Theorem 1 (From Barratt [3]) Suppose $g(\theta, \tilde{\lambda}, \tilde{\nu}, \tilde{x}) = 0$ . Then, when all derivatives exist, the partial Jacobian of $x$ with respect to $\theta$ at the optimal solution $(\tilde{\lambda}, \tilde{\nu}, \tilde{x})$ , namely $J_{\theta} \tilde{x}$ , can be obtained by satisfying: + +$$ +J _ {\theta} \tilde {x} = - J _ {x} g (\theta , \tilde {\lambda}, \tilde {\nu}, \tilde {x}) ^ {- 1} J _ {\theta} g (\theta , \tilde {x}, \tilde {\nu}, \tilde {\lambda}). \tag {7} +$$ + +Here the formula for the Jacobian of the solution mapping is obtained by applying the implicit function theorem to the KKT conditions. For instance, the (partial) Jacobian with + +respect to $\theta$ can be defined as + +$$ +J _ {\theta} g (\theta , \tilde {\lambda}, \tilde {\nu}, \tilde {x}) = \left[ \begin{array}{c} J _ {\theta} \nabla_ {x} L (\theta , \tilde {x}, \tilde {\nu}, \tilde {\lambda}) \\ \mathbf {d i a g} (\tilde {\lambda}) J _ {\theta} (G (\theta) x - h (\theta)) \\ J _ {\theta} (A (\theta) \tilde {x} - b (\theta)) \end{array} \right]. \tag {8} +$$ + +Therefore, once getting the optimal solution $\tilde{x}$ for the LP problem, we can obtain a closed-form expression for the gradient of $\tilde{x}$ with respect to the input LP parameters $\theta$ . This helps us achieve an efficient backpropagation through the entire optimization process without perturbation of the initialization and optimization trajectory. + +# 3.4. Weight Generation + +As can be observed in the EMD formulation, an important problem parameter is the weight of each node, $e.g., s_i$ , which controls the total matching flows $\sum_{j=1}^{n} x_{ij}$ from it. Intuitively, the node with a larger weight plays a more important role in the comparison of two sets, while a node with a very small weight can hardly influence the overall distance no matter which nodes it matches with. In the pioneering work that adopts EMD for color-based image retrieval [50], they use the histogram as the elementary feature and perform feature clustering over all pixels to generate the nodes. The weight of each node is set as the size of the corresponding cluster. It makes sense because for color-based image retrieval, large weight should be given to the dominant colors with more pixels, such that the retrieved images can be visually close to the query images. + +However, for few-shot image classification tasks where features for classification often have high-level semantic meanings, the number of pixels does not necessarily reflect the importance. It is common to find image data with + +![](images/64d1dcf9852df022ae8a4c053d7bced49fcca014a5fd32887915e337ddb431b7.jpg) + +![](images/c3dc87a199c6d7d409177e0005479f7270bbe383f4cab8c2c7aa96e1f24f1b71.jpg) +Figure 3: Comparison of standard fully connected layer (a) and our proposed structured fully connected layer (SFC) (b). The SFC learns a group of vectors as the prototype for each class such that we can use the EMD to generate category scores. + +greater background regions than the target objects in classification datasets, e.g., ImageNet. Thus, the importance of a local feature representation can hardly be determined only by inspecting individual images alone. Instead, we argue that for the few-shot classification task, the weights of node features should be generated by comparing the nodes on both sides. To achieve this goal, we propose a cross-reference mechanism that uses dot product between a node feature and the average node feature in the other structure to generate a relevance score as the weight value: + +$$ +s _ {i} = \max \left\{\mathbf {u} _ {i} ^ {T} \cdot \frac {\sum_ {j = 1} ^ {H W} \mathbf {v} _ {j}}{H W}, 0 \right\}, \tag {9} +$$ + +where $\mathbf{u}_i$ and $\mathbf{v}_j$ denotes the vectors from two feature maps, and function $max(\cdot)$ ensures the weights are always nonnegative. For clarity, here we simply take $s_i$ as an example and $d_i$ can be obtained in the same manner. The cross-reference mechanism aims to give less weight to the high-variance background regions and more to the co-occurrent object regions in two images. This can also put less weight on the object parts that do not occur in two images and thus allows partial matching to some extent. Finally, we normalize all the weights in the structure to make both sides have the same total weights for matching: + +$$ +\hat {s} _ {i} = s _ {i} \frac {H W}{\sum_ {j = 1} ^ {H W} s _ {j}}. \tag {10} +$$ + +
ModelEmbeddingMetric5-way10-way
ProtoNet [63]globalEuclidean60.3744.34
MatchingNet [67]globalcosine63.0847.09
FC [5]globaldot59.4144.08
FC [5]globalcosine55.4340.42
KNN [30]localcosine62.5247.08
Prediction Fusion [33]localcosine62.3847.04
DeepEMD (our)localEMD65.9149.66
+ +Table 1: Comparison of different metric-based methods for 1-shot classification. Our model with EMD as the distance metric significantly outperforms baseline models based on image-level representations and local representations. + +# 3.5. Structured Fully Connected Layer + +Thus far we have discussed using the Earth Mover's Distance as the metric to generate the distance value between paired images. A question is then raised—how do we handle the $k$ -shot setting where multiple support images are available? Before presenting our design in detail, let us have a review of how the standard fully layer classify an image embedding extracted by CNNs. A FC layer, parameterized by $[\Phi_1,\dots,\Phi_N]\in \mathbb{R}^{C\times N}$ contains a set of learnable vectors $\Phi_i\in \mathbb{R}^C$ corresponding to each category. At inference time, given an image embedding $\mathbf{u}\in \mathbb{R}^C$ generated by the convolutional layer, the FC layer generates the score of a class $i$ by computing the dot product between the image vector $\mathbf{u}$ and the parameter vector $\Phi_{i}$ , and this process is applied to all the categories in parallel by matrix multiplication. There are also some previous works replacing the dot product operation in the FC layer with the cosine function for computing the category scores [5, 53]. The learning of the FC layer can be seen as finding a prototype vector for each class such that we can use distance metrics to classify an image. An illustration of the standard FC layer is shown in Fig. 3 (a). + +With the same formulation, we can learn a structured fully connected layer that adopts EMD as the distance function to directly classify a structured feature representation. The learnable embedding for each class becomes a group of vectors, rather than one vector, such that we can use the structured distance function EMD to undertake image classification. This can also be interpreted as learning a prototype feature map generated by a dummy image for each class. The comparison of the structured FC and the standard FC can be found in Fig. 3. At inference time, we fix the trained 1-shot FCN model as the feature extractor and use SGD to learn the parameters in the structured fully connected layer by sampling data from the support set. + +# 4. Experiments + +To evaluate the performance of our proposed algorithm for few-shot classification, we conduct extensive experiments on multiple datasets. In this section, we first present + +![](images/0a07745a811c68561a893fee251808eac3509b465479197ed74315fdb71d556b.jpg) +Figure 4: Experiment on 5-way $k$ -shot classification. The proposed structured FC layer significantly outperforms previous $k$ -shot solutions. + +
MethodOperation5-way10-way
Full ConnectionsAverage55.1640.88
Full ConnectionsCR55.4141.60
EMDEqual56.9542.89
EMDK-means [19]56.2541.85
EMDmean-shift [7]53.5639.70
EMDCR61.1346.92
+ +Table 2: Different methods for setting the weights in the EMD. We report the 1-shot performance with only the feature pre-training step. EMD with our cross-reference (CR) mechanism yields the best result. The model variant that is solely based on the cross-reference mechanism as attention and removes the EMD can cause a significant performance drop. The combination of the EMD and the cross-reference generates the best result. + +dataset information and some important implementation details in our network design. Then, we conduct various ablative experiments to validate each component in our network. Finally, we compare our model with the state-of-the-art methods on popular benchmark datasets. + +# 4.1. Implementation Details + +For a fair comparison with previous works, we employ a 10-layer ResNet (ResNet10) as our model backbone, which is widely used in the few-shot classification literature. We transform it into a fully convolutional manner by removing the classifier at the end. Given an image of size $84 \times 84$ , the model generates a feature map of size $5 \times 5 \times 512$ , i.e. 25 512-dimensional vectors. We adopt the GPU accelerated Convex solver QPTH [1] to solve the Linear Programming problem in our network and compute gradients for backpropagation. As is commonly implemented in the state-of-the-art literature, we adopt a feature pre-training step followed by the episodic meta-training [67] to learn our network. During the network pre-training, we find that a two-layer FC layer is better than a single layer classifier. For the $k$ -shot classification task, we initialize the structured FC + +layer with the average feature map of all support data in each class, and sample a batch of 5 images from the support set to finetune the structured FC layer for 100 iterations. + +# 4.2. Dataset Description + +We conduct few-shot classification experiments on four popular benchmark datasets: miniImageNet [67], tieredImageNet [49], Fewshot-CIFAR100 (FC100) [43] and Caltech-UCSD Birds-200-2011 (CUB) [68]. + +miniImageNet. miniImageNet was first proposed in [67], and becomes the most popular benchmark in the few-shot classification literature. It contains 100 classes with 600 images in each class, which are built upon the ImageNet dataset [51]. The 100 classes are divided into 64, 16, 20 for meta-training, meta-validation and meta-testing, respectively. + +tieredImageNet. tieredImageNet is also a subset of ImageNet, which includes 608 classes from 34 superclasses. Compared with miniImageNet, the splits of metatraining(20), meta-validation(6) and meta-testing(8) are set according to the super-classes to enlarge the domain difference between training and testing phase. The dataset also include more images for training and evaluation (779,165 images in total). + +Fewshot-CIFAR100. FC100 is a few-shot classification dataset build on CIFAR100 [23]. We follow the split division proposed in [43], where 36 super-classes were divided into 12 (including 60 classes), 4 (including 20 classes), 4 (including 20 classes), for meta-training, meta-validation and meta-testing, respectively, and each class contains 100 images. + +Caltech-UCSD Birds-200-2011. CUB was originally proposed for fine-grained bird classification, which contains 11,788 images from 200 classes. We follow the splits in [73] that 200 classes are divided into 100, 50 and 50 for meta-training, meta-validation and meta-testing, respectively. The challenge in this dataset is the minor difference between classes. + +# 4.3. Ablative Analysis + +In our ablation study, we implement various experiments to evaluate the effectiveness of our algorithm. All experiments are conducted on the miniImageNet dataset. + +Comparison with methods based on image-level representations. In the beginning, we first compare our method with a set of metric based methods that utilize image-level vector representations on the 1-shot task. These methods adopt global average pooling to generate vector representations for images and use various distance metrics for classification. We select the representative metric-based methods in the literature for comparison: 1) Prototypical Network [63] with Euclidean distance. 2) Matching Network [67] with cosine distance. 3) Finetuning a FC clas + +
MethodBackboneminiImagenettieredImagenet
1-shot5-shot1-shot5-shot
cosine classifier [5]ResNet1255.43 ± 0.8177.18 ± 0.6161.49 ± 0.9182.37. ± 0.67
TADAM [43]ResNet1258.50 ± 0.3076.70 ± 0.30--
ECM [48]ResNet1259.00 ± -77.46 ± -63.99 ± -81.97 ± -
TPN [35]ResNet1259.46 ± -75.65 ± -59.91 ± 0.9473.30 ± 0.75
PPA [46]WRN-28-10†59.60 ± 0.4173.74 ± 0.1965.65 ± 0.9283.40. ± 0.65
ProtoNet [63]ResNet1260.37 ± 0.8378.02 ± 0.5765.65 ± 0.9283.40. ± 0.65
wDAE-GNN [15]WRN-28-10†61.07 ± 0.1576.75 ± 0.1168.18 ± 0.1683.09 ± 0.12
MTL [64]ResNet1261.20 ± 1.8075.50 ± 0.80--
LEO [52]WRN-28-10†61.76 ± 0.0877.59 ± 0.1266.33 ± 0.0581.44 ± 0.09
DC [33]ResNet1262.53 ± 0.1979.77 ± 0.19--
MetaOptNet [25]ResNet1262.64 ± 0.8278.63 ± 0.4665.99 ± 0.7281.56 ± 0.53
FEAT [73]ResNet24†62.96 ± 0.2078.49 ± 0.15--
MatchNet [67]ResNet1263.08 ± 0.8075.99 ± 0.6068.50 ± 0.9280.60 ± 0.71
CTM [28]ResNet18†64.12 ± 0.8280.51 ± 0.1368.41 ± 0.3984.28 ± 1.73
DeepEMD (our)ResNet1265.91 ± 0.8282.41 ± 0.5671.16 ± 0.8786.03 ± 0.58
+ +(a) Results on miniImageNet and tieredImageNet datasets + +
MethodBackbone1-shot5-shot
cosine classifier [5]ResNet1238.47 ± 0.7057.67 ± 0.77
TADAM [43]ResNet1240.10 ± 0.4056.10 ± 0.40
MetaOptNet [25]ResNet1241.10± 0.6055.5 ± 0.60
ProtoNet [63]ResNet1241.54 ± 0.7657.08 ± 0.76
DC [33]ResNet1242.04 ± 0.1757.05 ± 0.16
MatchNet [67]ResNet1243.88 ± 0.7557.05 ± 0.71
MTL [64]ResNet1245.10± 1.857.6 ± 0.9
DeepEMD (our)ResNet1246.47 ± 0.7863.22 ± 0.71
+ +(b) Results on Fewshot-CIFAR100 dataset. + +
MethodBackbone1-shot5-shot
ProtoNet [63]ResNet1266.09 ± 0.9282.50 ± 0.58
RelationNet [5,66]ResNet34†66.20 ± 0.9982.30 ± 0.58
DEML [79]ResNet50†66.95 ± 1.0677.11 ± 0.78
MAML [5,9]ResNet34†67.28 ± 1.0883.47 ± 0.59
cosine classifier [5]ResNet1267.30 ± 0.8684.75 ± 0.60
MatchNet [67]ResNet1271.87 ± 0.8585.08 ± 0.57
DeepEMD (our)ResNet1275.65 ± 0.8388.69 ± 0.50
+ +(c) Results on Caltech-UCSD Birds-200-2011 dataset. + +Table 3: Comparison with the state-of-art 1-shot 5-way and 5-shot 5-way performance (%) with $95\%$ confidence intervals on miniImageNet (a), tieredImageNet (a), Fewshot-CIFAR100 (b) and Caltech-UCSD Birds-200-2011 (c) datasets. Our model achieves new state-of-the-art performance on all datasets, and even outperforms methods with deeper backbones†. + +sifier. In [5], Chen et al. propose to fix the pretrained feature extractor and finetune the FC layer with the support images. For fair comparisons, we adopt the same backbones and training schemes for all these baseline methods and report the experiment results in Table. 1. As we can see, our algorithm significantly outperforms baseline methods that relies on image-level vector representations under both 1-shot 5-way and 1-shot 10-way settings, which indicates the effectiveness of the optimal matching based method that relies on local features. + +Comparison with methods based on local representations. There are also a few methods in the literature focusing on local representations to solve few-shot classification. They all remove the global average pooling in the CNN to achieve dense representations of images. In [30], Li et al. use the top $k$ nearest vectors (KNN) between two feature maps to represent image-level distance. Lifchitz et al. [33] propose to make predictions with each local representation and average their output probabilities. We replace our EMD head with their methods for comparison. The result is shown in Table. 1. Our optimal matching based algorithm outperforms all other model variants. The possible reason is that although the basic ground distance in the EMD is based on local features, our algorithm compares the two structures in a global way. Solely based on nearest local features in two images may not extract sufficient information to differentiate images. For example, eyes can be the nearest feature between animal images, but such feature can hardly be used to differentiate animal species. + +Weights in the EMD. We next investigate the weights in the EMD formulations. In the earlier work using the EMD for image retrieval, they use the pixel color as the feature and cluster pixels to generate nodes. The weight of the node is set as the portion of pixels in this cluster. We + +experiment two clustering algorithms to generate weights as the baseline models: K-means [19] and mean-shift [7]. As the clustering process of the mentioned algorithms are non-differentiable, for a fair comparison, we use the features after pre-training to evaluate all methods. We also incorporate a baseline model with equal weights into comparison. To test whether our performance is solely brought by the cross-reference mechanism, we also compare our network with a model variant that is solely based on the cross-reference mechanism without EMD. We compute the cosine distance between all vector pairs, and compute a weighted sum of these distances with the node weights generated by the cross-reference mechanism. As we can see from the results in Table. 2, our cross-reference mechanism can bring an improvement of $4.2\%$ over the baseline with equal weights, while clustering-based methods do not help improve the performance, which demonstrates that the number of pixels dose not necessarily indicate the importance in the few-shot scenario. For the model variant solely based on the cross-reference mechanism as an attention, it can only slightly improve the result of simple average operation, while a combination of both the cross-reference mechanism and the EMD can yield a significant performance improvement, which again validates the advantages of using the EMD as the metric and the effectiveness of the cross-reference mechanism. + +Comparison with other $k$ -shot methods. As the EMD distance metric is a paired function for two structures, the first baseline model for $k$ -shot experiment is the nearest neighbour (NN) method that classifies the query images as the category of the nearest support sample. We also test making prediction with each support sample and fuse their logits. We then compare our network with a few $k$ -shot solutions in previous works: 1) Prototype Learning. In [63], + +![](images/74207221c065bcab71c07a050c496ba56527f25928364c94576c7344dc083d28.jpg) +Figure 5: Visualization of the optimal matching flows. Given two images (left and right), we plot the best matched patch of each local region in the left image (middle). The weight controls the brightness of the corresponding region. The middle image can also be seen as the reconstruction of the left image using patches from the right one. Our algorithm can effectively establish semantic correspondence between local regions and gives less weights to the background regions. + +they average the feature embeddings of support images in each class as the prototype and apply the nearest neighbour method for classification. 2) Finetuning a cosine classifier [5]. We test the model performance on the $k$ -shot 5-way tasks under multiple $k$ values, and the results are shown in Fig. 4. Our structured FC layer consistently outperforms baseline models and with the number of support sets increasing, our network shows even more advantages. + +Visualization of matching flows and weights. It is interesting to visualize the optimal matching flows and node weights in the network inference process. In Fig. 5, we provide some visualization examples. The middle image plots the best matched patch of each local region in the left image, and the weight controls the brightness of the corresponding region. The middle image can also be seen as a reconstructed version of the left image, using the local patches from the right image. As we can see, our algorithm can establish semantic correspondence between local regions, and the background regions in the left image are given small weight, thus contributing less to the overall distance. The visualization of full matching flows and more examples can be found in our supplementary material. + +# 4.4. Time Complexity. + +Compared with the baseline models, the training and inference of DeepEMD come with more computation cost, as an LP problem must be solved for each forward process. As is discussed in [1], the main computation lies in the factorization of the KKT matrix as well as back-substitution when using the interior point method to solve the LP problem, which have cubic and quadratic time complexity, respectively. We also tried the OpenCV library for solving the LP problem via a modified simplex algorithm, which is much faster than the QPTH [1] solver which uses the interior point method. Therefore, we can use QPTH for training + +the network and use OpenCV for validation and the final test. + +# 4.5. Comparison with the State-of-the-Art + +Finally, we compare our algorithm with the state-of-the-art methods. We report 1-shot 5way and 5-shot 5-way performance on 4 popular benchmarks: miniImageNet, tieredImageNet, FC100 and CUB. We reproduce the models in some earlier works [5,63,67] with our network backbone and training strategy, and report the highest performance between our results and their reported ones. The results are shown in Table 3. Our algorithm achieves new state-of-the-art performance on all datasets. In particular, our results outperform the state-of-the-art performance by a significant margin on multiple tasks, e.g., 1-shot (%3.78) and 5-shot (3.61%) on the CUB dataset; 5-shot (5.55) on the FC100 dataset. + +# 5. Conclusion + +We have proposed a few-shot classification framework that employs the Earth Mover's Distance as the distance metric. The implicit theorem allows our network end-to-end trainable. Our proposed cross-reference mechanism for setting the weights of nodes turns out crucial in the EMD formulation and can effectively minimize the negative impact caused by irrelevant regions. The learnable structured fully connected layer can directly classify dense representations of images in the $k$ -shot settings. Our algorithm achieves new state-of-the-art performance on multiple dataset. + +# Acknowledgements + +This research is supported by the National Research Foundation Singapore under its AI Singapore Programme (Award Number: AISG-RP-2018-003) and the MOE Tier-1 research grants: RG126/17 (S) and RG28/18 (S). + +# References + +[1] Brandon Amos and J. Zico Kolter. OptNet: Differentiable optimization as a layer in neural networks. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 136-145. PMLR, 2017. 6, 8 +[2] Antreas Antoniou, Harrison Edwards, and Amos Storkey. How to train your maml. In ICLR, 2019. 2 +[3] Shane Barratt. On the differentiability of the solution to convex optimization problems. arXiv preprint arXiv:1804.05098, 2018. 2, 3, 4 +[4] Sergey Bartunov and Dmitry P. Vetrov. Few-shot generative modelling with generative matching networks. In AISTATS, 2018. 3 +[5] Wei-Yu Chen, Yen-Cheng Liu, Zsolt Kira, Yu-Chiang Wang, and Jia-Bin Huang. A closer look at few-shot classification. In ICLR, 2019. 2, 5, 7, 8 +[6] Wen-Hsuan Chu, Yu-Jhe Li, Jing-Cheng Chang, and Yu-Chiang Frank Wang. Spot and learn: A maximum-entropy patch sampler for few-shot image classification. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2 +[7] Dorin Comaniciu and Peter Meer. Mean shift: A robust approach toward feature space analysis. IEEE Trans. Pattern Anal. Mach. Intell., 24(5):603-619, May 2002. 6, 7 +[8] Asen L Dontchev and R Tyrrell Rockafellar. Implicit functions and solution mappings. Springer Monographs in Mathematics. Springer, 208, 2009. 2, 3 +[9] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In ICML, 2017. 2, 7 +[10] Sebastian Flennerhag, Andrei A Rusu, Razvan Pascanu, Hujun Yin, and Raia Hadsell. Meta-learning with warped gradient descent. arXiv preprint arXiv:1909.00025, 2019. 2 +[11] Luca Franceschi, Paolo Frasconi, Saverio Salzo, Riccardo Grazzi, and Massimilano Pontil. Bilevel programming for hyperparameter optimization and meta-learning. arXiv preprint arXiv:1806.04910, 2018. 2 +[12] Luca Franceschi, Paolo Frasconi, Saverio Salzo, Riccardo Grazzi, and Massimiliano Pontil. Bilevel programming for hyperparameter optimization and meta-learning. In ICML, 2018. 3 +[13] Victor Garcia and Joan Bruna. Few-shot learning with graph neural networks. arXiv preprint arXiv:1711.04043, 2017. 2 +[14] Spyros Gidaris and Nikos Komodakis. Dynamic few-shot visual learning without forgetting. In CVPR, 2018. 3 +[15] Spyros Gidaris and Nikos Komodakis. Generating classification weights with gnn denoising autoencoders for few-shot learning. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2, 7 +[16] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 1 +[17] Frank L Hitchcock. The distribution of a product from several sources to numerous localities. Journal of mathematics and physics, 20(1-4):224-230, 1941. 2 + +[18] Muhammad Abdullah Jamal and Guo-Jun Qi. Task agnostic meta-learning for few-shot learning. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2 +[19] Xin Jin and Jiawei Han. K-Means Clustering, pages 563-564. Springer US, Boston, MA, 2010. 6, 7 +[20] Rohit Keshari, Mayank Vatsa, Richa Singh, and Afzel Noore. Learning structure and strength of CNN filters for small sample size training. In CVPR, 2018. 3 +[21] Jongmin Kim, Taesup Kim, Sungwooong Kim, and Chang D. Yoo. Edge-labeling graph neural network for few-shot learning. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2 +[22] Steven G Krantz and Harold R Parks. The implicit function theorem: history, theory, and applications. Springer Science & Business Media, 2012. 2, 3 +[23] Alex Krizhevsky. Learning multiple layers of features from tiny images. University of Toronto, 2009. 6 +[24] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1097-1105, 2012. 1 +[25] Kwonjoon Lee, Subhransu Maji, Avinash Ravichandran, and Stefano Soatto. Meta-learning with differentiable convex optimization. In CVPR, 2019. 3, 7 +[26] Yoonho Lee and Seungjin Choi. Gradient-based meta-learning with learned layerwise metric and subspace. In ICML, 2018. 2 +[27] Fei-Fei Li, Robert Fergus, and Pietro Perona. One-shot learning of object categories. IEEE Trans. Pattern Anal. Mach. Intell., 28(4):594-611, 2006. 3 +[28] Hongyang Li, David Eigen, Samuel Dodge, Matthew Zeiler, and Xiaogang Wang. Finding task-relevant features for few-shot learning by category traversal. In CVPR, 2019. 3, 7 +[29] Peihua Li. Tensor-sift based earth mover's distance for contour tracking. Journal of mathematical imaging and vision, 46(1):44-65, 2013. 3 +[30] Wenbin Li, Lei Wang, Jinglin Xu, Jing Huo, Yang Gao, and Jiebo Luo. Revisiting local descriptor based image-to-class measure for few-shot learning. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 1, 2, 5, 7 +[31] Xinzhe Li, Qianru Sun, Yaoyao Liu, Qin Zhou, Shibao Zheng, Tat-Seng Chua, and Bernt Schiele. Learning to selftrain for semi-supervised few-shot classification. In Advances in Neural Information Processing Systems, pages 10276-10286, 2019. 2 +[32] Zhenguo Li, Fengwei Zhou, Fei Chen, and Hang Li. Metasgd: Learning to learn quickly for few shot learning. In ICML, 2018. 2 +[33] Yann Lifchitz, Yannis Avrithis, Sylvaine Picard, and Andrei Bursuc. Dense classification and implanting for few-shot learning. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2, 5, 7 +[34] Weide Liu, Chi Zhang, Guosheng Lin, and Fayao Liu. Crnet: Cross-reference networks for few-shot segmentation, 2020. 3 + +[35] Yanbin Liu, Juho Lee, Minseop Park, Saehoon Kim, Eunho Yang, Sung Ju Hwang, and Yi Yang. Learning to propagate labels: Transductive propagation network for few-shot learning. arXiv preprint arXiv:1805.10002, 2018. 7 +[36] Jelena Luketina, Tapani Raiko, Mathias Berglund, and Klaus Greff. Scalable gradient-based tuning of continuous regularization hyperparameters. In ICML, 2016. 2 +[37] Akshay Mehrotra and Ambedkar Dukkipati. Generative adversarial residual pairwise networks for one shot learning. arXiv, 1703.08033, 2017. 3 +[38] Luke Metz, Niru Maheswaranathan, Brian Cheung, and Jascha Sohl-Dickstein. Meta-learning update rules for unsupervised representation learning. In ICLR, 2019. 2 +[39] Nikhil Mishra, Mostafa Rohaninejad, Xi Chen, and Pieter Abbeel. Snail: A simple neural attentive meta-learner. In ICLR, 2018. 3 +[40] Tsendsuren Munkhdalai and Hong Yu. Meta networks. In ICML, 2017. 2 +[41] Tsendsumen Munkhdalai, Xingdi Yuan, Soroush Mehri, and Adam Trischler. Rapid adaptation with conditionally shifted neurons. In ICML, 2018. 2 +[42] Devang K Naik and RJ Mammone. Meta-neural networks that learn by learning. In IJCNN, 1992. 2 +[43] Boris N. Oreshkin, Pau Rodríguez, and Alexandre Lacoste. TADAM: task dependent adaptive metric for improved few-shot learning. In NeurIPS, 2018. 1, 2, 6, 7 +[44] Eunbyung Park and Junier B Oliva. Meta-curvature. In Advances in Neural Information Processing Systems, pages 3309-3319, 2019. 2 +[45] Hang Qi, Matthew Brown, and David G Lowe. Low-shot learning with imprinted weights. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5822-5830, 2018. 3 +[46] Siyuan Qiao, Chenxi Liu, Wei Shen, and Alan L. Yuille. Few-shot image recognition by predicting parameters from activations. In CVPR, 2018. 2, 7 +[47] Aravind Rajeswaran, Chelsea Finn, Sham M Kakade, and Sergey Levine. Meta-learning with implicit gradients. In Advances in Neural Information Processing Systems, pages 113–124, 2019. 2 +[48] Avinash Ravichandran, Rahul Bhotika, and Stefano Soatto. Few-shot learning with embedded class models and shot-free meta training. arXiv preprint arXiv:1905.04398, 2019. 7 +[49] Mengye Ren, Eleni Triantafillou, Sachin Ravi, Jake Snell, Kevin Swersky, Joshua B. Tenenbaum, Hugo Larochelle, and Richard S. Zemel. Meta-learning for semi-supervised few-shot classification. In ICLR, 2018. 3, 6 +[50] Yossi Rubner, Carlo Tomasi, and Leonidas J Guibas. The earth mover's distance as a metric for image retrieval. International journal of computer vision, 40(2):99-121, 2000. 2, 4 +[51] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael S. Bernstein, Alexander C. Berg, and Fei-Fei Li. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015. 6 + +[52] Andrei A. Rusu, Dushyant Rao, Jakub Sygnowski, Oriol Vinyals, Razvan Pascanu, Simon Osindero, and Raia Hadsell. Meta-learning with latent embedding optimization. In ICLR, 2019. 7 +[53] Tim Salimans and Durk P Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. In Advances in Neural Information Processing Systems, pages 901-909, 2016. 5 +[54] Adam Santoro, Sergey Bartunov, Matthew Botvinick, Daan Wierstra, and Timothy P. Lillicrap. Meta-learning with memory-augmented neural networks. In ICML, 2016. 2 +[55] Edgar Schonfeld, Sayna Ebrahimi, Samarth Sinha, Trevor Darrell, and Zeynep Akata. Generalized zero- and few-shot learning via aligned variational autoencoders. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2 +[56] Samuel Schulter, Paul Vernaza, Wongun Choi, and Manmohan Chandraker. Deep network flow for multi-object tracking. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6951-6960, 2017. 3 +[57] Eli Schwartz, Leonid Karlinsky, Joseph Shtok, Sivan Harary, Mattias Marder, Rogério Schmidt Feris, Abhishek Kumar, Raja Giryes, and Alexander M. Bronstein. Delta-encoder: an effective sample synthesis method for few-shot object recognition. In NeurIPS, 2018. 3 +[58] Tyler R. Scott, Karl Ridgeway, and Michael C. Mozer. Adapted deep embeddings: A synthesis of methods for k-shot inductive transfer learning. In NeurIPS, 2018. 2 +[59] Evan Shelhamer, Jonathan Long, and Trevor Darrell. Fully convolutional networks for semantic segmentation. IEEE Trans. Pattern Anal. Mach. Intell., 39(4):640-651, 2017. 3 +[60] Wei Shen, Ziqiang Shi, and Jun Sun. Learning from adversarial features for few-shot classification. arXiv preprint arXiv:1903.10225, 2019. 3 +[61] Pranav Shyam, Shubham Gupta, and Ambedkar Dukkipati. Attentive recurrent comparators. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 3173-3181. JMLR.org, 2017. 3 +[62] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 1 +[63] Jake Snell, Kevin Swersky, and Richard S. Zemel. Prototypical networks for few-shot learning. In NIPS, 2017. 1, 2, 5, 6, 7, 8 +[64] Qianru Sun, Yaoyao Liu, Tat-Seng Chua, and Bernt Schiele. Meta-transfer learning for few-shot learning. In CVPR, 2019. 2, 7 +[65] Xin Sun, Zhenning Yang, Chi Zhang, Guohao Peng, and Keck-Voon Ling. Conditional gaussian distribution learning for open set recognition. arXiv preprint arXiv:2003.08823, 2020. 3 +[66] Flood Sung, Yongxin Yang, Li Zhang, Tao Xiang, Philip H. S. Torr, and Timothy M. Hospedales. Learning to compare: Relation network for few-shot learning. In CVPR, 2018. 1, 2, 7 +[67] Oriol Vinyals, Charles Blundell, Tim Lillicrap, Koray Kavukcuoglu, and Daan Wierstra. Matching networks for one shot learning. In NIPS, 2016. 1, 2, 5, 6, 7, 8 + +[68] Catherine Wah, Steve Branson, Peter Welinder, Pietro Perona, and Serge Belongie. The caltech-ucsd birds-200-2011 dataset. 2011. 6 +[69] Yu-Xiong Wang, Ross B. Girshick, Martial Hebert, and Bharath Hariharan. Low-shot learning from imaginary data. In CVPR, 2018. 3 +[70] Davis Wertheimer and Bharath Hariharan. Few-shot learning with localization in realistic settings. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 3 +[71] Shipeng Yan, Songyang Zhang, and Xuming He. A dual attention network with semantic embedding for few-shot learning. In AAAI, 2019. 3 +[72] Ze Yang, Yali Wang, Xianyu Chen, Jianzhuang Liu, and Yu Qiao. Context-transformer: Tackling object confusion for few-shot detection, 2020. 3 +[73] Han-Jia Ye, Hexiang Hu, De-Chuan Zhan, and Fei Sha. Learning embedding adaptation for few-shot learning. arXiv, 1812.03664, 2018. 1, 2, 6, 7 +[74] Chi Zhang, Guosheng Lin, Fayao Liu, Jiushuang Guo, Qingyao Wu, and Rui Yao. Pyramid graph networks with connection attentions for region-based one-shot semantic segmentation. In Proceedings of the IEEE International Conference on Computer Vision, pages 9587-9595, 2019. 3 +[75] Chi Zhang, Guosheng Lin, Fayao Liu, Rui Yao, and Chunhua Shen. Canet: Class-agnostic segmentation networks with iterative refinement and attentive few-shot learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5217–5226, 2019. 3 +[76] Hongguang Zhang, Jing Zhang, and Piotr Koniusz. Few-shot learning via saliency-guided hallucination of samples. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 3 +[77] Ruixiang Zhang, Tong Che, Zoubin Grahamramani, Yoshua Bengio, and Yangqiu Song. Metagan: An adversarial approach to few-shot learning. In NeurIPS, 2018. 3 +[78] Qi Zhao, Zhi Yang, and Hai Tao. Differential earth mover's distance with its applications to visual tracking. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(2):274-287, 2008. 3 +[79] Fengwei Zhou, Bin Wu, and Zhenguo Li. Deep meta-learning: Learning to learn in the concept space. arXiv, 1802.03596, 2018.2, 7 \ No newline at end of file diff --git a/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/images.zip b/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f41832848b7ab4c6e0ab2cf88312b33b82e84701 --- /dev/null +++ b/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa3b70b450a5a4ab39db57a0d17e6ea1d35a653fe725b6a9b9d55d6589f77d6d +size 553386 diff --git a/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/layout.json b/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..99d8a7df2f5a6e85e817391db96793017fb5959d --- /dev/null +++ b/deepemdfewshotimageclassificationwithdifferentiableearthmoversdistanceandstructuredclassifiers/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3778de537c5ffc73a1c4e04c96ea9db4ed5a3709d7be843cea55e19271255a2a +size 410723 diff --git a/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/33e379f1-c85b-4b39-9167-2e6e5cff38c5_content_list.json b/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/33e379f1-c85b-4b39-9167-2e6e5cff38c5_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d5f64ee6fe932da5b5406ee4e438b58bcb412d9b --- /dev/null +++ b/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/33e379f1-c85b-4b39-9167-2e6e5cff38c5_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed29618f1ad5a8afcc35d39333bfe796a76668df0a43f018492c0ec808f47fd1 +size 78839 diff --git a/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/33e379f1-c85b-4b39-9167-2e6e5cff38c5_model.json b/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/33e379f1-c85b-4b39-9167-2e6e5cff38c5_model.json new file mode 100644 index 0000000000000000000000000000000000000000..03ed9f40ae04d97684bb5b47f348b9557b07fabf --- /dev/null +++ b/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/33e379f1-c85b-4b39-9167-2e6e5cff38c5_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:871aac6e514480d97efead7cb833cc1a8c4f00e9ebc1c3233872b5ba7f94d7ba +size 96381 diff --git a/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/33e379f1-c85b-4b39-9167-2e6e5cff38c5_origin.pdf b/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/33e379f1-c85b-4b39-9167-2e6e5cff38c5_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7f350b48149ccad18134a39e31a211eedf9990e6 --- /dev/null +++ b/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/33e379f1-c85b-4b39-9167-2e6e5cff38c5_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12344d6ca64e884634f9f49f4ba73f0da99f55d81766ec2aadcd84cda5b960c5 +size 1085175 diff --git a/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/full.md b/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..1b49ce7d355a66ef0e4f0da6a8e96e6da08fa4c0 --- /dev/null +++ b/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/full.md @@ -0,0 +1,311 @@ +# DeeperForensics-1.0: A Large-Scale Dataset for Real-World Face Forgery Detection + +Liming Jiang $^{1}$ Ren Li $^{2}$ Wayne Wu $^{1,2}$ Chen Qian $^{2}$ Chen Change Loy $^{1\dagger}$ $^{1}$ Nanyang Technological University $^{2}$ SenseTime Research + +liming002@ntu.edu.sg tomo.blade.lee@hotmail.com + +wuwenyan@sensetime.com qianchen@sensetime.com ccloy@ntu.edu.sg + +# Abstract + +We present our on-going effort of constructing a large-scale benchmark for face forgery detection. The first version of this benchmark, DeeperForensics-1.0, represents the largest face forgery detection dataset by far, with 60,000 videos constituted by a total of 17.6 million frames, 10 times larger than existing datasets of the same kind. Extensive real-world perturbations are applied to obtain a more challenging benchmark of larger scale and higher diversity. All source videos in DeeperForensics-1.0 are carefully collected, and fake videos are generated by a newly proposed end-to-end face swapping framework. The quality of generated videos outperforms those in existing datasets, validated by user studies. The benchmark features a hidden test set, which contains manipulated videos achieving high deceptive scores in human evaluations. We further contribute a comprehensive study that evaluates five representative detection baselines and make a thorough analysis of different settings. $^{1,2}$ + +# 1. Introduction + +Face swapping has become an emerging topic in computer vision and graphics. Indeed, many works [1, 2, 4] on automatic face swapping have been proposed in recent years. These efforts have circumvented the cumbersome and tedious manual face editing processes, hence expediting the advancement in face editing. At the same time, such enabling technology has sparked legitimate concerns, particularly on its potential for being misused and abused. The popularization of "Deepfakes" on the internet has further set off alarm bells among the general public and authorities, in view of the conceivable perilous implications. Accordingly, there is a dire need for countermeasures to be in place promptly, particularly innovations that can effectively detect videos that have been manipulated. + +Working towards forgery detection, various groups have + +![](images/c1b6ba5fd4a4a152b677b7ed1795891a013f645db501d72e26acf319af4d619b.jpg) +Collection +Figure 1: DeeperForensics-1.0 dataset is a new large-scale dataset for real-world face forgery detection. + +![](images/e55aca8e619ed2e5eb4e2aafb415d5b458349afbcf017249529f3651518a9451.jpg) +Manipulation + +![](images/9e1e08864661d552d8d04372222ecc05db6b789bf326e86acbfa392a08c30c66.jpg) +Perturbation + +contributed datasets (e.g., FaceForensics++ [33], Deep Fake Detection [9] and DFDC [14]) comprising manipulated video footages. The availability of these datasets has undoubtedly provided essential avenues for research into forgery detection. Nonetheless, the aforementioned datasets suffer several drawbacks. Videos in these datasets are either of a small number, of low quality, or overly artificial. Understandably, these datasets are inadequate to train a good model for effective forgery detection in real-world scenarios. This is particularly true when current advances in human face editing are able to produce extremely realistic videos, rendering forgery detection a highly challenging task. On another note, we observe high similarity between training and test videos, in terms of their distribution, in certain works [26, 33]. Their actual efficacy in detecting real-world face forgery cases, which are much more variable and unpredictable, remains to be further elucidated. + +We believe that forgery detection models can only be enhanced when trained with a dataset that is exhaustive enough to encompass as many potential real-world variations as possible. To this end, we propose a large-scale dataset named DeeperForensics-1.0 consisting of 60,000 videos with a total of 17.6 million frames for real-world face forgery detection. The main steps of our dataset construction are shown in Figure 1. We set forth three yardsticks when constructing this dataset: 1) Quality. The dataset shall contain videos more realistic and much closer to the distribution of real-world detection scenarios. (Section 3.1 and 3.2) 2) Scale. The dataset shall be made up of a large-scale video sets. (Section 3.3) 3) Diversity. There shall be sufficient variations in the video footages (e.g., compression, blurry, transmission errors) to match those that may be en + +Table 1: The most relevant datasets compared to our dataset. DeeperForensics-1.0 is an order of magnitude larger in scale than existing datasets w.r.t. both real and fake parts. We build a professional indoor environment to better control the important attributes of the collected data. 100 paid actors give consents to the use and manipulation of their faces by signing a formal agreement. We employ seven types of perturbations at five intensity levels, leading to 35 perturbations in total. The video may be subjected to a mixture of more than one perturbation. In contrast to prior works, we also introduce a new end-to-end high-fidelity face swapping method. + +
DatasetTotal VideosRatio (real : fake)Controlled CaptureConsented ActorsPerturbations (total number)Perturbations (mixture)New Method
UADFV [41]981 : 1×--××
DeepFake-TIMIT [23]620only fake×--××
Celeb-DF [26]12031 : 1.95×--××
FaceForensics++ [33]50001 : 4×-2××
Deep Fake Detection [9] (joins FaceForensics++)34311 : 8.5×28-××
DFDC Preview Dataset [14]52141 : 3.6×663××
DeeperForensics-1.0 (Ours)600005 : 1✓10035✓✓
+ +countered in the real world (Section 3.3). + +The primary challenge in the preparation of this dataset is the lack of good-quality video footages. Specifically, most publicly available videos are shot under an unconstrained environment resulting in large variations, including but not limited to suboptimal illumination, large occlusion of the target faces, and extreme head poses. Importantly, the lack of official informed consents from the video subjects precludes the use of these videos, even for non-commercial purposes. On the other hand, while some videos of manipulated faces are deceptively real, a larger number remains easily distinguishable by human eyes. The latter is often caused by model negligence towards appearance variations or temporal differences, leading to preposterous and incongruous results. + +We approach the aforementioned challenge from two perspectives. 1) Collecting fresh face data from 100 individuals with informed consents (Section 3.1). 2) Devising a novel method, DeepFake Variational Auto-Encoder (DFVAE), to enhance existing videos (Section 3.2). In addition, we introduce diversity into the video footages through deliberate addition of distortions and perturbations, simulating real-world scenarios. We collate the newly collected data and the DF-VAE-modified videos into the DeeperForensics-1.0 dataset, with the aim of further expanding it gradually over time. We benchmark five representative open-source forgery detection methods using our dataset as well as a hidden test set containing manipulated videos that achieve high deceptive ranking in user studies. + +We summarize our contributions as follows: 1) We propose a new dataset, DeeperForensics-1.0 that is larger in scale than existing ones, of high quality and rich diversity. To improve its quality, we introduce a carefully designed data collection and a novel framework, DF-VAE, that effectively mitigate obvious fabricated effects of existing manipulated videos. 2) We benchmark results of existing representative forgery detection methods on our dataset, offering insights into the current status and future strategy in face forgery detection. + +# 2. Related Work + +Face forgery detection datasets. Building a dataset for forgery detection requires a huge amount of effort on data collection and manipulation. Early forgery detection datasets comprise images captured under highly restrictive conditions, e.g., MICC_F2000 [7], Wild Web dataset [42], Realistic Tampering dataset [24]. + +Owing to the urgency in video-based face forgery detection, some prominent groups have devoted their efforts to create face forensics video datasets (see Table 1). UADFV [41] contains 98 videos, i.e., 49 real videos from YouTube and 49 fake ones generated by FakeAPP [5]. DeepFake-TIMIT [23] manually selects 16 similar looking pairs of people from VidTIMIT [34] database. For each of the 32 subjects, they generate about 10 videos using low-quality and high-quality versions of faceswap-GAN [4], resulting in a total of 620 fake videos. Celeb-DF [26] includes 408 YouTube videos, mostly of celebrities, from which 795 fake videos are synthesized. FaceForensics++ [33] is the first large-scale face forensic dataset that consists of 4,000 fake videos manipulated by four methods (i.e., DeepFakes [2], Face2Face [36], FaceSwap [3], NeuralTextures [35]), and 1,000 real videos from YouTube. Afterwards, Google joins FaceForensics++ and contributes Deep Fake Detection [9] dataset with 3,431 real and fake videos from 28 actors. Recently, Facebook invites 66 individuals and builds the DFDC preview dataset [14], which includes 5,214 original and tampered videos with three types of augmentations. + +In comparison, we invite 100 paid actors and collect high-resolution $(1920\times 1080)$ source data with various poses, expressions, and illuminations. 3DMM blendshapes [10] are taken as reference to supplement some exaggerated expressions. We get consents from all the actors for using and manipulating their faces. In contrast to prior works, we also propose a new end-to-end face swapping method (i.e., DF-VAE) and systematically apply seven types of perturbations to the fake videos at five intensity levels. The mixture of distortions to a single video makes our dataset better imitate real-world scenarios. Ultimately, we construct + +DeeperForensics-1.0 dataset, which contains 60,000 videos with 17.6 million frames in total, including 50,000 original collected videos and 10,000 manipulated videos. + +Face forgery detection benchmarks. A new prominent benchmark, FaceForensics Benchmark [33], for facial manipulation detection has been proposed recently. The benchmark includes six image-level face forgery detection baselines [6, 8, 12, 13, 15, 32]. Although FaceForensics Benchmark adds distortions to the videos by converting them into different compression rates, a deeper exploration of more perturbation types and their mixture is missing. Celeb-DF [26] also provides a face forgery detection benchmark including seven methods [6, 12, 25, 28, 30, 41, 43] trained and tested on different datasets. In aforementioned benchmarks, the test set usually shares a similar distribution with the training set. Such an assumption inherently introduces biases and renders these methods impractical for face forgery detection in real-world settings with much more diverse and unknown fake videos. + +In our benchmark, we introduce a challenging hidden test set with manipulated videos achieving high deceptive scores in user studies, to better simulate real-world distribution. Various perturbations are analyzed to make our benchmark more comprehensive. In addition, we mainly exploit video-level forgery detection baselines [11, 16, 17, 37, 38]. Temporal information – a significant cue for video forgery detection besides single-frame quality – has been considered. We will elaborate our benchmark in Section 4. + +# 3. A New Large-Scale Face Forensics Dataset + +The main contribution of this paper is a new large-scale dataset for real-world face forgery detection, DeeperForensics-1.0, which provides an alternative to existing databases. To construct a dataset more suitable for real-world face forgery detection, we design this dataset with careful consideration of quality, scale, and diversity. In Section 3.1 and 3.2, we will discuss the details of data collection and methodology (i.e., DF-VAE) to improve quality. In Section 3.3, we will show how to ensure large scale and high diversity of DeeperForensics-1.0. + +# 3.1. Data Collection + +Source data is the first factor that highly affects quality. Taking results in Figure 2 as an example, the source data collection increases the robustness of our face swapping method to extreme poses, since videos on the internet usually have limited head pose variations. + +We refer to the identity in the driving video as the "target" face and the identity of the face that is swapped onto the driving video as the "source" face. Different from previous works, we find that the source faces play a much more critical role than the target faces in building a high-quality dataset. Specifically, the expressions, poses, and lighting conditions of source faces should be much richer in order to + +![](images/e290ffa1684d9a39066b67f456aa21efcd5c4265d229f1dd67bcc3b9a5866e3a.jpg) +YouTube Source + +![](images/634042179353008c63eeb8bf163f71e030d3404ece6ea85d2df1390f15429662.jpg) +Target + +![](images/13dce9841bf31b4cf2d793cc1badd5fc7b4001f690b06b88e1743e924b1e4208.jpg) + +![](images/c85d1c2943bc3d7f81227a20a673d12f018fb80d97f2d98159842aab9d3e8547.jpg) +Swapped + +![](images/15dbf7233e9255d8ae52479fe0227d2da8877c49e737b0876c70e2ae0a79f165.jpg) +Collected Source + +![](images/0c445688725171adba7d98d7f57ec42769717a797e42dc8ac9398f6d650dfd7d.jpg) +Target + +![](images/e2a19e4d17ab525da6b66592a04ed28ccd1e55b9fba0e243b31e3de0bb815f27.jpg) + +![](images/6de001ad60b3de6e54ead90479698bfc36493ca066735644de409ee356fdebc8.jpg) +Swapped + +![](images/2cc51dace0059d063a40a57b8983dded2adeebd37cae6fdf70a979380cb9029e.jpg) +Figure 2: Comparison of using only YouTube video and the collected video as source data, with the same method and setting. + +![](images/37f52753d042196194f82a5b52216d0ecc936cf02392be73d2a63d1d3ca3f544.jpg) + +![](images/a41d87c916e081d39d768b2488dc6d85019de1c90f1e1f5e6d7ca505c4ccc33d.jpg) + +![](images/aa2f6bd2694270e464a40b4e91ed1a5f30d4c29146cd833ff2d35deb317def08.jpg) +Figure 3: Diversity in identities, poses, expressions, and illuminations in our collected source data. + +perform robust face swapping. Hence, our data collection mainly focuses on source face videos. Figure 3 shows the diversity in different attributes of our data collection. + +We invite 100 paid actors to record the source videos. Similar to [9, 14], we obtain consents from all the actors for using and manipulating their faces to avoid the portrait right issues. The participants are carefully selected to ensure variability in genders, ages, skin colors, and nationalities. We maintain a roughly equal proportion w.r.t. each of the attributes above. In particular, we invite 53 males and 47 females from 26 countries. Their ages range from 20 to 45 years old to match the most common age group appearing on real-world videos. The actors have four typical skin tones: white, black, yellow, brown, with ratio 1:1:1:1. All faces are clean without glasses or decorations. + +Different from previous data collection in the wild (see Table 1), we build a professional indoor environment for a more controllable data collection. We only use the facial + +![](images/33cee480d8f12e51a15faa84bfdeae87b4aa5e8509123d0276ed6abd7ca304da.jpg) +Figure 4: Examples of 3DMM blendshapes in our data collection. + +![](images/5211f5d99a10f153e3b16b7c705a54b416023e20d32bcc0a384b27ae9eba9747.jpg) +Figure 5: Examples of style mismatch problems in prominent face forensics datasets. + +regions (detected and cropped by LAB [40]) of the source data, so we can neglect the background. We set seven HD cameras from different angles: front, left, left-front, right, right-front, oblique-above, oblique-below. The resolution of our recorded videos is high $(1920 \times 1080)$ . We train the actors in advance to keep the collection process smooth. We request the actors to turn their heads and speak naturally with eight expressions: neutral, angry, happy, sad, surprise, contempt, disgust, fear. The head poses range from $-90^{\circ}$ to $+90^{\circ}$ . Furthermore, the actors are asked to perform 53 expressions defined in 3DMM blendshapes [10] (see Figure 4) to supplement some extremely exaggerated expressions. When performing 3DMM blendshapes, the actors also speak naturally to avoid excessive frames that show a closed mouth. In addition to expressions and poses, we systematically set nine lighting conditions from various directions: uniform, left, top-left, bottom-left, right, top-right, bottom-right, top, bottom. The actors are only asked to turn their heads under uniform illumination, so the lighting remains unchanged on specific facial regions to avoid many duplicated data samples recorded by the cameras set at different angles. In the end, our collected data contain over 50,000 videos with a total of 12.6 million frames - an order of magnitude more than existing datasets. + +# 3.2. DeepFake Variational Auto-Encoder + +To tackle low visual quality problems of previous works, we consider three key requirements in formulating a high-fidelity face swapping method: 1) It should be general and scalable for us to generate large number of videos with high quality. 2) The problem of face style mismatch caused by appearance variations need to be addressed. Some failure + +cases of existing methods are shown in Figure 5. 3) Temporal continuity of generated videos should be considered. + +Based on the aforementioned requirements, we propose DeepFake Variational Auto-Encoder (DF-VAE), a novel learning-based face swapping framework. DF-VAE consists of three main parts, namely a structure extraction module, a disentangled module, and a fusion module. We will give a brief and intuitive introduction of the DF-VAE framework below. Please refer to the supplementary material for detailed derivations and results. + +Disentanglement of structure and appearance. The first step of our method is face reenactment - animating the source face with similar expression as the target face, without any paired data. Face swapping is considered as a subsequent step of face reenactment that performs blending between the reenacted face and the target background. For robust and scalable face reenactment, we should cleanly disentangle structure (i.e., expression and pose) and appearance representation (i.e., texture, skin color, etc.) of a face. This disentanglement is rather difficult because structure and appearance representation are far from being independent. + +The blue arrows in Figure 6 show the reconstruction procedure of the source face $x_{t}$ . Instead of feeding a single source face $x_{t}$ , we sample another source face $x^{\prime}$ to construct unpaired data in the source domain. To make the structure representation more evident, we use the stacked hourglass networks [29] to extract landmarks of $x_{t}$ in the structure extraction module and get the heatmap $\hat{x}_t$ . Then we feed the heatmap $\hat{x}_t$ to the Structure Encoder $E_{\alpha}$ , and $x^{\prime}$ to the Appearance Encoder $E_{\beta}$ . We concatenate the latent representations (small cubes in red and green) and feed it to the Decoder $D_{\gamma}$ . Finally, we get the reconstructed face $\tilde{x}_{t}$ , i.e., marginal log-likelihood of $x_{t}$ . In the target face domain, the reconstruction procedure is the same, as shown by orange arrows. + +During training, the network learns structure and appearance information in both the source and the target domains. Exploiting the reparameterization trick [22], the non-differentiable operation of sampling can be made differentiable by an auxiliary variable with independent marginal. The approximate posterior is estimated by the separated encoders $E_{\alpha}$ and $E_{\beta}$ in an end-to-end training process by standard gradient descent. It is noteworthy that even if both $y_{t}$ and $x'$ belong to arbitrary identities, our effective disentangled module is capable of learning meaningful structure and appearance information of each identity. + +During inference, we concatenate the appearance prior of $x'$ and the structure prior of $y_t$ (small cubes in red and orange) in the latent space. The reconstructed face $d_t$ shares the same structure with $y_t$ and keeps the appearance of $x'$ . Our framework allows concatenations of structure and appearance latent codes extracted from arbitrary identities in inference and permits many-to-many face reenactment. + +![](images/728dcb610f2a2981d32ede2754a5ba5d74849c89eae292c22e6e032f0c81d125.jpg) +Figure 6: The main framework of DeepFake Variational Auto-Encoder. In training, we reconstruct the source and target faces in blue and orange arrows, respectively, by extracting landmarks and constructing an unpaired sample as the condition. Optical flow differences are minimized after reconstruction to improve temporal continuity. In inference, we swap the latent codes and get the reenacted face in green arrows. Subsequent MAdaIN module fuses the reenacted face and the original background resulting in the swapped face. + +In summary, DF-VAE is a new conditional variational auto-encoder [21] with high robustness and scalability. It conditions on two posteriors in different domains. In the disentangled module, the separated design of two encoders $E_{\alpha}$ and $E_{\beta}$ , the explicit structure heatmap, and the unpaired data construction jointly force $E_{\alpha}$ to learn structure information and $E_{\beta}$ to learn appearance information. + +Style matching and fusion. To fix the obvious style mismatch problems as shown in Figure 5, we introduce a masked adaptive instance normalization (MAdaIN) module. We place a typical AdaIN [18] network after the reenacted face $d_{t}$ . In the face swapping scenario, we only need to adjust the style of the face area and use the original background. Therefore, we use a mask $m_{t}$ to guide AdaIN [18] network to focus on style matching of the face area. To avoid boundary artifacts, we apply Gaussian Blur to $m_{t}$ and get the blurred mask $m_{t}^{b}$ . + +In our face swapping context, $d_{t}$ is the content input of MAdaIN, $y_{t}$ is the style input. MAdaIN adaptively computes the affine parameters from face area of the style input: + +$$ +\mathrm {M A d a I N} (\mathrm {c}, \mathrm {s}) = \sigma (\mathrm {s}) \left(\frac {\mathrm {c} - \mu (\mathrm {c})}{\sigma (\mathrm {c})}\right) + \mu (\mathrm {s}), \tag {1} +$$ + +where $c = m_t^b \cdot d_t$ , $s = m_t^b \cdot y_t$ . With the very low-cost MAdaIN module, we reconstruct $d_t$ again by Decoder $D_{\delta}$ . The blurred mask $m_t^b$ is used again to fuse the reconstructed image with the background of $y_t$ . At last, we get the swapped face $\overline{d}_t$ . Figure 7 shows the effectiveness of MAdaIN module for style matching and fusion. + +The MAdaIN module is jointly trained with the disentangled module in an end-to-end manner. Thus, by a single + +![](images/376392d9cedc1a72cf62b39c306abf1935130b017c0a978d6503d7837d85b954.jpg) +Raw Video + +![](images/c92de67189df13d8d6bef0d290245e32e1ce514289f860af7d6aa152f73a1fac.jpg) +w/o MAdalN + +![](images/ce82d92dd4ebe875e80bb9bb5cab8994359efbf9224380e024dd58f2d89ecb34.jpg) +w/ MAdain +Figure 7: Comparison of the swapped face styles without or with MAdaIN module. + +model, DF-VAE can perform many-to-many face swapping with obvious reduction of style mismatch and facial boundary artifacts (see supplementary material). Even if there are multiple identities in both the source domain and the target domain, the quality of face swapping does not degrade. + +Temporal consistency constraint. Temporal discontinuity of fake videos leads to obvious flickering of the face area, making them very easy to be spotted by forgery detection methods and human eyes. To improve temporal continuity, we let the disentangled module to learn temporal information of both the source face and the target face. + +For simplification, we make a Markov assumption that the generation of the frame at time $t$ sequentially depends on its previous $P$ frames $\mathbf{x}_{(t - p):(t - 1)}$ . We set $P = 1$ to balance quality improvement and training time. + +To build the relationship between the current frame and previous ones, we further make an assumption that the optical flows should remain unchanged after reconstruction. We use FlowNet 2.0 [19] to estimate the optical flow $\tilde{x}_f$ w.r.t. $\tilde{x}_t$ and $x_{t - 1}$ $x_{f}$ w.r.t. $x_{t}$ and $x_{t - 1}$ . Since face swapping is sensitive to minor facial details that can be greatly affected + +Table 2: Seven types of distortions in DeeperForensics-1.0. + +
No.Distortion Type
1Change of color saturation
2Local block-wise distortion
3Change of color contrast
4Gaussian blur
5White Gaussian noise in color components
6JPEG compression
7Change of video constant rate factor
+ +by flow estimation, we do not warp $x_{t-1}$ by the estimated flow like [39]. Instead, we minimize the difference between $\tilde{x}_f$ and $x_f$ to improve temporal continuity while keeping facial detail generation stable. To this end, we propose a new temporal consistency constraint, which can be written as: + +$$ +L _ {\text {t e m p o r a l}} = \frac {1}{C H W} \| \tilde {x} _ {f} - x _ {f} \| _ {1}, \tag {2} +$$ + +where $C = 2$ for a common form of optical flow. + +We only discuss the temporal continuity w.r.t. the source face because the case of the target face is the same. If multiple identities exist in one domain, temporal information of all these identities can be learned in an end-to-end manner. + +# 3.3. Scale and Diversity + +Our extensive data collection and the proposed DF-VAE method are designed to improve the quality of manipulated videos in DeeperForensics-1.0 dataset. In this section, we will mainly discuss the scale and diversity aspects. We provide 10,000 manipulated videos with 5 million frames. It is an order of magnitude more than the previous datasets. We take 1,000 refined YouTube videos collected by FaceForensics++ [33] as the target videos. Each face of our collected 100 identities is swapped onto 10 target videos, thus 1,000 raw manipulated videos are generated directly by DF-VAE in an end-to-end process. Thanks to the scalability and multimodality of DF-VAE, the time overhead of model training and data generation is reduced to $1/5$ compared to the common Deepfakes methods, with no degradation in quality. Thus, a larger-scale dataset construction is possible. + +To ensure diversity, we apply various perturbations to better simulate videos in real scenes. Specifically, as shown in Table 2, seven types of distortions defined in Image Quality Assessment (IQA) [27, 31] are included. Each of these distortions is divided into five intensity levels. We apply random-type distortions to the 1,000 raw manipulated videos at five different intensity levels, producing a total of 5,000 manipulated videos. Besides, an additional of 1,000 robust manipulated videos are generated by adding random-type, random-level distortions to the 1,000 raw manipulated videos. Moreover, in contrast to all the previous datasets, each sample of another 3,000 manipulated videos in DeeperForensics-1.0 is subjected to a mixture of more than one distortion. The variability of perturbations improves the diversity of DeeperForensics-1.0 to better imitate + +Table 3: The percentage of user study ratings for UADFV, DeepFake-TIMIT, Celeb-DF, FaceForensics++, Deep Fake Detection, DFDC, and DeeperForensics-1.0 dataset. A higher score means the users think the videos are more realistic. + +
Dataset12345“real”
UADFV [41]29.236.020.78.95.214.1%
DeepFake-TIMIT [23]31.431.424.89.62.712.3%
Celeb-DF [26]5.614.818.624.236.961.0%
FaceForensics++ [33]46.831.413.44.44.08.4%
Deep Fake Detection [9]26.028.024.111.510.321.9%
DFDC [14]25.429.722.011.911.123.0%
DeeperForensics-1.0 (Ours)4.38.922.629.834.364.1%
+ +the data distribution of real-world scenarios. The 10,000 manipulated videos, together with the 50,000 high-quality source videos, form the proposed DeeperForensics-1.0. + +# 3.4. User Study + +To examine the quality of DeeperForensics-1.0 dataset, we engage 100 professional participants, most of whom specialize in computer vision research. We believe these participants are qualified and well-trained in assessing realness of tempered videos. The user study is conducted on DeeperForensics-1.0 and six former datasets, i.e., UADFV [41], DeepFake-TIMIT [23], Celeb-DF [26], FaceForensics++ [33], Deep Fake Detection [9], DFDC [14]. We randomly select 30 video clips from each of these datasets and prepare a platform for the participants to evaluate their realness. Similar to the user study of [20], the participants are asked to provide their feedbacks to the statement "The video clip looks real." and give scores at five levels (1-clearly disagree, 2-weakly disagree, 3-borderline, 4-weakly agree, 5-clearly agree. We assume that users who give a score of 4 or 5 think the video is "real"). The user study results are presented in Table 3. The quality of our dataset is appreciated by most of the participants. Compared to the previous datasets, DeeperForensics-1.0 achieves the highest realism rating. Although Celeb-DF [26] also gets very high realness scores, the scale of our dataset is much larger. + +# 4. Video Forgery Detection Benchmark + +Dataset split. We exploit 1,000 raw manipulated videos in Section 3.3 and 1,000 YouTube videos from FaceForensics++ [33] as our standard set. The videos are split into training, validation, and test set with a ratio of $7:1:2$ . The identities of the swapped faces may be duplicated because faces of 100 invited actors are swapped onto 1,000 driving videos. To avoid data leak, we randomly choose unrepeated 70, 10, and 20 identities, and group all the videos according to the identities. Similar to [33], the test and training sets share a close distribution in our standard set. Other experiments in our benchmark are conducted on different variants of the standard set. These variants share the same 1,000 driving videos with the standard set. We will detail them in Section 4.2. For a fair comparison, all the experiments are conducted in the same split setting. + +Hidden test set. For real-world scenarios, some experiments in prior works [26, 33] may not perform a convincing evaluation due to the huge biases caused by a close distribution between the training and test sets. The aforementioned standard set has the same setting. As a result, strong detection baselines obtain very high accuracy on the standard test set as demonstrated in Section 4.2. However, the ultimate goal of face forensics datasets is to help detect forgeries in real scenes. Despite the high accuracy on the standard test set, the models may easily fail in real-world scenarios. + +We argue that the test set of real-world face forgery detection should not share a close distribution with the training set. We need a test set that better simulates real-world settings. We call it "hidden" test set. The hidden test set should satisfy three factors: 1) Multiple sources. Fake videos in-the-wild should be manipulated by different unknown methods. 2) High quality. Threatening fake videos should have high quality to fool human eyes. 3) Diverse distortions. Different perturbations should be taken into consideration. + +Thus, in our initial benchmark, we introduce a challenging hidden test set with 400 carefully selected videos. First, we collect fake videos generated by several unknown face swapping methods to ensure multiple sources. Then, we obscure all selected videos multiple times with diverse hidden distortions that are commonly seen in real scenes. Finally, we only select videos that can fool at least 50 out of 100 human observers in a user study. The ground truth labels are hidden and are used on our host server to evaluate the accuracy of detection models. Besides, the hidden test set will be enlarged constantly to get future versions along with development of Deepfakes technology. Fake videos manipulated by future face swapping methods will be included as long as they can pass the human test supported by us. + +# 4.1. Baselines + +Existing studies [26, 33] primarily provide image-level face forgery detection benchmark. However, fake videos in-the-wild are much more menacing than manipulated images. We propose to conduct evaluation mainly based on video classification methods for two reasons. First, image-level face forgery detection methods do not consider any temporal information - an important cue for video-based tasks. Second, image-level methods have been widely studied. We only choose one image-level method, XceptionNet [12], which achieves the best performance in [33], as one part of our benchmark for reference. The other four video-based baselines are C3D [37], TSN [38], I3D [11], and ResNet+LSTM [16, 17], all of which have achieved promising results in video classification tasks. Details of all the baselines can be found in our supplementary material. + +# 4.2. Results and Analysis + +Owing to the goal of detecting fakes in real-world scenarios, we mainly explore how real-world distortions affect + +Table 4: The binary detection accuracy of the baselines on the hidden test set when trained on four manipulated methods in FaceForensics++ (FF++): DeepFakes (DF), Face2Face (F2F), FaceSwap (FS), NeuralTextures (NT), and on DeeperForensics-1.0 standard training set without distortions. + +
Train Test (acc)FF++ DF hiddenFF++ F2F hiddenFF++ FS hiddenFF++ NT hiddenDeeperForensics-1.0 hidden
C3D [37]57.5057.7552.1358.2574.75
TSN [38]57.6357.2553.5057.3877.00
I3D [11]56.6358.3854.6363.6379.25
ResNet+LSTM [16, 17]57.3856.1354.8859.5078.25
XceptionNet [12]57.3858.7554.7557.3877.00
+ +the model performance. Accuracies of face forgery detection on the standard test set and the introduced hidden test set are evaluated under various settings. + +Evaluation of effectiveness of DeeperForensics-1.0. For a fair comparison, we evaluate DeeperForensics-1.0 and the state-of-the-art FaceForensics++ [33] dataset because they use the same driving videos. In this setting, we use 1,000 raw manipulated videos without distortions in the standard set of DeeperForensics-1.0. For FaceForensics++, the same split is applied to its four subsets. All the models are tested on the hidden test set (see Table 4). + +The baselines trained on the standard training set of DeeperForensics-1.0 achieve much better performance on the hidden test set than all the four subsets of FaceForensics++. This proves the higher quality of DeeperForensics-1.0 over prior works, making it more useful for real-world face forgery detection. In Table 4, I3D [11] obtains the best performance on the hidden test set when trained on the standard training set. We conjecture that the temporal discontinuity of fake videos leads to higher accuracy by this video-level forgery detection method. + +Evaluation of dataset perturbations. We study the effect of perturbations towards the forgery detection model performance. In contrast to prior work [33], we try to evaluate the baseline accuracies when applying different distortions to the training and the test sets, in order to explore the function of perturbations in face forensics dataset. + +In this setting, we conduct all the experiments on DeeperForensics-1.0 dataset with high diversity of perturbations. We use 1,000 manipulated videos in the standard set (std), 1,000 manipulated videos with single-level (level-5), random-type distortions (std/sing), 1,000 manipulated videos with random-level, random-type distortions (std/rand). The data split is the same as that of the standard set with a ratio of $7:1:2$ . + +In Column 2 of Table 5, we find the accuracy is nearly $100\%$ when the models are trained and tested on the standard set. This is reasonable because the strong baselines perform very well in a clean dataset with the same distribution. In Columns 3 and 4, the accuracy decreases compared to Column 2, when we choose std/sing and std/rand as the test set. Most of the video-level methods except C3D [37] are more robust to perturbations on test set than XceptionNet [12]. This setting is very common because different distributions of the training and the test sets lead to decrease + +Table 5: The binary detection accuracy of the baselines when trained and tested on DeeperForensics-1.0 dataset with different distortion perturbations. We analyze different training and testing settings on the standard set without distortions (std), the standard set with single-level distortions (std/sing), and the standard set with random-level distortions (std/rand). + +
Train Test (acc)std stdstd std/singstd std/randstd/sing std/singstd/rand std/randstd/sing std/randstd/rand std/sing
C3D [37]98.5087.6392.3895.3896.6396.7594.00
TSN [38]99.2591.5095.0098.2598.8898.1299.12
I3D [11]100.0090.7596.8899.5099.6399.6398.00
ResNet+LSTM [16, 17]100.0090.6397.13100.0098.63100.0097.25
XceptionNet [12]100.0088.3894.7599.6399.6399.7599.00
+ +in model accuracies. Hence, the lack of perturbations in the face forensics dataset cutbacks the model performance for real-world face forgery detection with even more complex data distribution. + +When we apply corresponding distortions to the training and test sets, the accuracy will increase (Column 5 and 6 in Table 5) compared to Column 3 and 4. However, this setting is impractical because the distributions of the training and test sets are still the same. We should augment the test set to better simulate the real-world distribution. Thus, some evaluation settings in previous works [26, 33] are unreasonable. If we swap the training set and the test set of std/sing and std/rand to further randomize the condition, results shown in Column 7 and 8 indicate that the accuracy remains high. This evaluation setting shows the possibility that with the same generation method, exerting appropriate distortions to the training set can make face forgery detection models more robust to real-world perturbations. + +Evaluation of variants of training set for real-world face forgery detection. We have conducted several experiments for evaluations of possible perturbations. Nevertheless, the case is more complex in real scenes because no information about the fake videos is available. The video may be subjected to more than one type and diverse levels of distortions. In addition to distortions, the method manipulating the faces is unknown. + +From the evaluation of perturbations, we find the possibility of augmenting the training set to improve detection model performance. Thus, we further evaluate baseline performance on the hidden test set by devising some variants of the training set. We perform experiments on DeeperForensics-1.0. In this setting, other than std, std/sing, and std/rand, we use additional 1,000 manipulated videos, each of which is subjected to a mixture of three random-level, random-type distortions (std/mix). We combine std with std/sing, std/rand, and std/mix, respectively, yielding three new training sets (with the same data split as the former settings). + +Column 2 in Table 6 shows the low accuracy when the models trained on std and tested on the hidden test set (same as Column 6 in Table 4). Columns 3 and 4 indicate that the accuracy of all the baseline models increase when trained on std+std/sing and std+std/random. The accuracy of I3D [11] and ResNet+LSTM [16, 17], are over $80\%$ in some cases. + +Table 6: The binary detection accuracy of the baselines on the hidden test set when trained on DeeperForensics-1.0 dataset with the standard set without distortions (std), combination of std and the standard set with single-level distortions (std+std/sing), combination of std and the standard set with random-level distortions (std+std/rand), combination of std and the standard set with the mixed distortions(std+std/mix). + +
Train +Test (acc)std +hiddenstd+std/sing +hiddenstd+std/random +hiddenstd+std/mix +hidden
C3D [37]74.7578.2578.1378.88
TSN [38]77.0078.7579.5079.50
I3D [11]79.2580.1380.1380.13
ResNet+LSTM [16, 17]78.2580.2579.5080.25
XceptionNet [12]77.0079.7579.7579.88
+ +In a more complex setting, when the models are trained on std+std/mix, Column 5 shows the accuracy of all the detection baselines further increase. + +The results suggest that designing suitable training set variants has the potential to help increase face forgery detection accuracy, and applying various distortions to ensure the diversity of DeeperForensics-1.0 is necessary. In addition, compared to image-level method, video-level face forgery detection methods have more potential capabilities to crack real-world fake videos as shown in Table 6. Although the accuracy on the challenging hidden test set is still not very high, we provide two initial directions for future real-world face forgery detection research: 1) Improving the source data collection and generation method to ensure the quality of the training set; 2) Augmenting the training set by various distortions to ensure its diversity. We welcome researchers to make our benchmark more comprehensive. + +# 5. Discussion + +In this work, we propose a new large-scale dataset named DeeperForensics-1.0 to facilitate the research of face forgery detection towards real-world scenarios. We make several efforts to ensure good quality, large scale, and high diversity of this dataset. Based on the dataset, we further benchmark existing representative forgery detection methods, offering insights into the current status and future strategy in face forgery detection. Several topics can be considered as future works. 1) We will continue to collect more source and target videos to further expand DeeperForensics. 2) We plan to invite interested researchers for contributing their video falsification methods to enlarge our hidden test set, as long as the fakes can pass the human test supported by us. 3) A better evaluation metric for face forgery detection methods is also an interesting research topic. + +Acknowledgments. This work is supported by the SenseTime-NTU Collaboration Project, Singapore MOE AcRF Tier 1 (2018-T1-002-056), NTU SUG, and NTU NAP. We gratefully acknowledge the exceptional help from Hao Zhu and Keqiang Sun for their contribution on source data collection and coordination. + +# References + +[1] Deepfacelab. https://github.com/iperov/DeepFaceLab/. Accessed: 2019-08-20. 1 +[2] Deepfakes. https://github.com/deepfakes/faceswap/. Accessed: 2019-08-16. 1, 2 +[3] Faceswap. https://github.com/MarekKowalski/FaceSwap/. Accessed: 2019-08-18. 2 +[4] faceswap-gan. https://github.com/shaoanlu/faceswap-GAN/. Accessed: 2019-08-16. 1, 2 +[5] Fakeapp. https://www fakeapp.com/. Accessed: 2019-07-25. 2 +[6] Darius Afchar, Vincent Nozick, Junichi Yamagishi, and Isao Echizen. Mesonet: a compact facial video forgery detection network. In WIFS, 2018. 3 +[7] Irene Amerini, Lamberto Ballan, Roberto Caldelli, Alberto Del Bimbo, and Giuseppe Serra. A sift-based forensic method for copy-move attack detection and transformation recovery. TIFS, 6:1099-1110, 2011. 2 +[8] Belhassen Bayar and Matthew C Stamm. A deep learning approach to universal image manipulation detection using a new convolutional layer. In IH & MMSEC, 2016. 3 +[9] Google AI Blog. Contributing data to deepfake detection research. https://ai.googleblog.com/2019/09/contributing-data-to-deepfake-detection.html. Accessed: 2019-09-25. 1, 2, 3, 6 +[10] Chen Cao, Yanlin Weng, Shun Zhou, Yiying Tong, and Kun Zhou. Facewarehouse: A 3d facial expression database for visual computing. TVCG, 20:413-425, 2013. 2, 4 +[11] Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In CVPR, 2017. 3, 7, 8 +[12] François Chollet. Xception: Deep learning with depthwise separable convolutions. In CVPR, 2017. 3, 7, 8 +[13] Davide Cozzolino, Giovanni Poggi, and Luisa Verdoliva. Recasting residual-based local descriptors as convolutional neural networks: an application to image forgery detection. In IH & MMSEC, 2017. 3 +[14] Brian Dolhansky, Russ Howes, Ben Pflaum, Nicole Baram, and Cristian Canton Ferrer. The deepfake detection challenge (dfdc) preview dataset. arXiv preprint, arXiv:1910.08854, 2019. 1, 2, 3, 6 +[15] Jessica Fridrich and Jan Kodovsky. Rich models for steganalysis of digital images. TIFS, 7:868-882, 2012. 3 +[16] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 3, 7, 8 +[17] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9:1735-1780, 1997. 3, 7, 8 +[18] Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In ICCV, 2017. 5 +[19] Eddy Ilg, Nikolaus Mayer, Tonmoy Saikia, Margret Keuper, Alexey Dosovitskiy, and Thomas Brox. Flownet 2.0: Evolution of optical flow estimation with deep networks. In CVPR, 2017. 5 +[20] Hyeongwoo Kim, Pablo Carrido, Ayush Tewari, Weipeng Xu, Justus Thies, Matthias Niessner, Patrick Pérez, Christian + +Richardt, Michael Zollhöfer, and Christian Theobalt. Deep video portraits. ACM TOG, 37:163, 2018. 6 +[21] Durk P Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semi-supervised learning with deep generative models. In NeurIPS, 2014. 5 +[22] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint, arXiv:1312.6114, 2013. 4 +[23] Pavel Korshunov and Sébastien Marcel. Deepfakes: a new threat to face recognition? assessment and detection. arXiv preprint, arXiv:1812.08685, 2018. 2, 6 +[24] Paweł Korus and Jiwu Huang. Multi-scale analysis strategies in prnu-based tampering localization. TIFS, 12:809-824, 2016. 2 +[25] Yuezun Li and Siwei Lyu. Exposing deepfake videos by detecting face warping artifacts. arXiv preprint, arXiv:1811.00656, 2018.3 +[26] Yuezun Li, Xin Yang, Pu Sun, Honggang Qi, and Siwei Lyu. Celeb-df: A new dataset for deepfake forensics. arXiv preprint, 2019. 1, 2, 3, 6, 7, 8 +[27] Kwan-Yee Lin and Guangxiang Wang. Hallucinated-iaq: No-reference image quality assessment via adversarial learning. In CVPR, 2018. 6 +[28] Falko Matern, Christian Riess, and Marc Stamminger. Exploiting visual artifacts to expose deepfakes and face manipulations. In WACVW, 2019. 3 +[29] Alejandro Newell, Kaiyu Yang, and Jia Deng. Stacked hourglass networks for human pose estimation. In ECCV, 2016. 4 +[30] Huy H Nguyen, Fuming Fang, Junichi Yamagishi, and Isao Echizen. Multi-task learning for detecting and segmenting manipulated facial images and videos. arXiv preprint, arXiv:1906.06876, 2019. 3 +[31] Nikolay Ponomarenko, Lina Jin, Oleg Ieremeiev, Vladimir Lukin, Karen Egiazarian, Jaakko Astola, Benoit Vozel, Kacem Chehdi, Marco Carli, Federica Battisti, et al. Image database tid2013: Peculiarities, results and perspectives. Signal Processing: Image Communication, 30:57-77, 2015. 6 +[32] Nicolas Rahmouni, Vincent Nozick, Junichi Yamagishi, and Isao Echizen. Distinguishing computer graphics from natural images using convolution neural networks. In WIFS, 2017. 3 +[33] Andreas Rössler, Davide Cozzolino, Luisa Verdoliva, Christian Riess, Justus Thies, and Matthias Nießner. Faceforensics++: Learning to detect manipulated facial images. arXiv preprint, arXiv:1901.08971, 2019. 1, 2, 3, 6, 7, 8 +[34] Conrad Sanderson. The veditimit database. Technical report, IDIAP, 2002. 2 +[35] Justus Thies, Michael Zollhöfer, and Matthias Nießner. Deferred neural rendering: Image synthesis using neural textures. arXiv preprint, arXiv:1904.12356, 2019. 2 +[36] Justus Thies, Michael Zollhofer, Marc Stamminger, Christian Theobalt, and Matthias Nießner. Face2face: Real-time face capture and reenactment of rgb videos. In CVPR, 2016. 2 +[37] Du Tran, Lubomir Bourdev, Rob Fergus, Lorenzo Torresani, and Manohar Paluri. Learning spatiotemporal features with 3d convolutional networks. In ICCV, 2015. 3, 7, 8 + +[38] Limin Wang, Yuanjun Xiong, Zhe Wang, Yu Qiao, Dahua Lin, Xiaou Tang, and Luc Van Gool. Temporal segment networks: Towards good practices for deep action recognition. In ECCV, 2016. 3, 7, 8 +[39] Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, Guilin Liu, Andrew Tao, Jan Kautz, and Bryan Catanzaro. Video-to-video synthesis. arXiv preprint, arXiv:1808.06601, 2018. 6 +[40] Wayne Wu, Chen Qian, Shuo Yang, Quan Wang, Yici Cai, and Qiang Zhou. Look at boundary: A boundary-aware face alignment algorithm. In CVPR, 2018. 4 + +[41] Xin Yang, Yuezun Li, and Siwei Lyu. Exposing deep fakes using inconsistent head poses. In ICASSP, pages 8261-8265, 2019. 2, 3, 6 +[42] Markos Zampoglou, Symeon Papadopoulos, and Yiannis Kompatsiaris. Detecting image splicing in the wild (web). In ICMEW, 2015. 2 +[43] Peng Zhou, Xintong Han, Vlad I Morariu, and Larry S Davis. Two-stream neural networks for tampered face detection. In CVPRW, 2017. 3 \ No newline at end of file diff --git a/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/images.zip b/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..49a910ff178c4509377a911941b535ff1ba38775 --- /dev/null +++ b/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80624c1775256fd0d72c581a9e86377358b87cf0a5af55780be32305736d12fe +size 471878 diff --git a/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/layout.json b/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d52924a12eb18de22214a423c4d2585204d4f2bf --- /dev/null +++ b/deeperforensics10alargescaledatasetforrealworldfaceforgerydetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f706ce3dff57d9ae0cb1fd980112ccee1076152eb4456b3b1781c139da7d2ffb +size 371150 diff --git a/deepfaceflowinthewilddense3dfacialmotionestimation/5de7671c-2c82-4daa-b2e2-e0a71d4784a4_content_list.json b/deepfaceflowinthewilddense3dfacialmotionestimation/5de7671c-2c82-4daa-b2e2-e0a71d4784a4_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..5537f4160cdb9561cf9c9fd5e11d9370cbed10c5 --- /dev/null +++ b/deepfaceflowinthewilddense3dfacialmotionestimation/5de7671c-2c82-4daa-b2e2-e0a71d4784a4_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2d992dfd4e10a3e179f511cbff5be7cfee37e51401553d8158e22e805d9805e +size 72255 diff --git a/deepfaceflowinthewilddense3dfacialmotionestimation/5de7671c-2c82-4daa-b2e2-e0a71d4784a4_model.json b/deepfaceflowinthewilddense3dfacialmotionestimation/5de7671c-2c82-4daa-b2e2-e0a71d4784a4_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c61ed6e909e7b136ef45f4217aeee9533dbdc53e --- /dev/null +++ b/deepfaceflowinthewilddense3dfacialmotionestimation/5de7671c-2c82-4daa-b2e2-e0a71d4784a4_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a150e3a3fe69b2ed7d9b9846eb1485ed04d6ec6e69b494eb327bf3aa42fc48d6 +size 87318 diff --git a/deepfaceflowinthewilddense3dfacialmotionestimation/5de7671c-2c82-4daa-b2e2-e0a71d4784a4_origin.pdf b/deepfaceflowinthewilddense3dfacialmotionestimation/5de7671c-2c82-4daa-b2e2-e0a71d4784a4_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..db9ef7d33e8c6762520b997c416cee0c73f1c50b --- /dev/null +++ b/deepfaceflowinthewilddense3dfacialmotionestimation/5de7671c-2c82-4daa-b2e2-e0a71d4784a4_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0502888516d8dadab1824659534d72b2c0e94900872859f688835a909f300a2 +size 1562019 diff --git a/deepfaceflowinthewilddense3dfacialmotionestimation/full.md b/deepfaceflowinthewilddense3dfacialmotionestimation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e2f514cb6ddc89c199c58927926c0832c71078f7 --- /dev/null +++ b/deepfaceflowinthewilddense3dfacialmotionestimation/full.md @@ -0,0 +1,249 @@ +# DeepFaceFlow: In-the-wild Dense 3D Facial Motion Estimation + +Mohammad Rami Koujan $^{1,4}$ , Anastasios Roussos $^{1,3,4}$ , Stefanos Zafeiriou $^{2,4}$ + +1College of Engineering, Mathematics and Physical Sciences, University of Exeter, UK + +$^{2}$ Department of Computing, Imperial College London, UK + +3Institute of Computer Science, Foundation for Research and Technology-Hellas (FORTH-ICS), Greece +4FaceSoft.io, London, UK + +# Abstract + +Dense 3D facial motion capture from only monocular in-the-wild pairs of RGB images is a highly challenging problem with numerous applications, ranging from facial expression recognition to facial reenactment. In this work, we propose DeepFaceFlow, a robust, fast, and highly-accurate framework for the dense estimation of 3D non-rigid facial flow between pairs of monocular images. Our DeepFaceFlow framework was trained and tested on two very large-scale facial video datasets, one of them of our own collection and annotation, with the aid of occlusion-aware and 3D-based loss function. We conduct comprehensive experiments probing different aspects of our approach and demonstrating its improved performance against state-of-the-art flow and 3D reconstruction methods. Furthermore, we incorporate our framework in a full-head state-of-the-art facial video synthesis method and demonstrate the ability of our method in better representing and capturing the facial dynamics, resulting in a highly-realistic facial video synthesis. Given registered pairs of images, our framework generates 3D flow maps at $\sim 60$ fps. + +# 1. Introduction + +Optical flow estimation is a challenging computer vision task that has been targeted substantially since the seminal work of Horn and Schunck [16]. The amount of effort dedicated for tackling such a problem is largely justified by the potential applications in the field, e.g. 3D facial reconstruction [11, 23, 36], autonomous driving [19], action and expression recognition [30, 21], human motion and head pose estimation [1, 41], and video-to-video translation [37, 22]. While optical flow tracks pixels between consecutive images in the 2D image plane, scene flow, its 3D counterpart, aims at estimating the 3D motion field of scene points at different time steps in the 3 dimensional space. Therefore, scene flow combines two challenges: 1) 3D shape reconstruction, and 2) dense motion estimation. Scene flow esti + +![](images/08b2b7fb6cea06532e2c7652615c7cb869d6d7a8175b980585f2acf8f35177d8.jpg) + +![](images/e9293a79424116654f281aa821693acbc9d0942706cc39bd0451f3eeeed2f9a5.jpg) + +![](images/8c836ab7846908dd0ec42ca79ab869832ae30a27e2e527ab3f84cc6b6e1e9be6.jpg) +Figure 1. We propose a framework for the high-fidelity 3D flow estimation between a pair of monocular facial images. Left-to-right: 1 and 2) input pair of RGB images, 3) estimated 3D facial shape of first image rendered with 3D motion vectors from first to second image, 4) warped 3D shape of (1) based on estimated 3D flow in (3), 5) color-coded 3D flow map of each pixel in (1). For the color coding, see the Supplementary Material. + +![](images/341df42e59291895df1883043e9f921b6501e5b8bdb3450b9aa7fd9f32bbcb66.jpg) + +![](images/ad9ac4c5f01dba49db689929778dcc2710193e20bb80ed7ac18dcd5403476c9c.jpg) + +mation, which can be traced back to the work of vedula et al. [34], is a highly ill-posed problem due to the depth ambiguity and the aperture problem, as well as occlusions and variations of illumination and pose, etc. which are very typical of in-the-wild images. To address all these challenges, the majority of methods in the literature use stereo or RGB-D images and enforce priors on either the smoothness of the reconstructed surfaces and estimated motion fields [2, 27, 39, 33] or the rigidity of the motion [35]. + +In this work, we seek to estimate the 3D motion field of human faces from in-the-wild pairs of monocular images, see Fig. 1. The output in our method is the same as in scene flow methods, but the fundamental difference is that we use simple RGB images instead of stereo pairs or RGB-D images as input. Furthermore, our method is tailored for human faces instead of arbitrary scenes. For the problem that we are solving, we use the term "3D face flow estimation". Our designed framework delivers accurate flow estimation in the 3D world rather than the 2D image space. We focus on the human face and the modelling of its dynamics due to its centrality in myriad of applications, e.g. facial expression recognition, head motion and pose estimation, 3D dense facial reconstruction, full head reenactment, etc. Human facial motion emerges from two main sources: 1) rigid motion due to the head pose variation, and 2) non-rigid motion caused by elicited facial expressions and mouth motions during speech. The reliance + +on only monocular and in-the-wild images to capture the 3D motion of general objects makes the problem considerably more challenging. Alleviating such obstacles can be made by injecting our prior knowledge about this object, as well as constructing and utilising a large-scale annotated dataset. Our contributions in this work can be summarised as follows: + +- To the best of our knowledge, there does not exist any method that estimates 3D scene flow of deformable scenes using a pair of simple RGB images as input. The proposed approach is the first to solve this problem and this is made possible by focusing on scenes with human faces. +- Collection and annotation of a large-scale dataset of human facial videos (more than 12000), which we call Face3DVID. With the help of our proposed model-based formulation, each video was annotated with the per-frame: 1) 68 facial landmarks, 2) dense 3D facial shape mesh, 3) camera parameters, 4) dense 3D flow maps. This dataset will be made publicly available (project's page: https://github.com/mrkoujan/DeepFaceFlow). +- A robust, fast, deep learning-based and end-to-end framework for the dense high-quality estimation of 3D face flow from only a pair of monocular in-the-wild RGB images. +- We demonstrate both quantitatively and qualitatively the usefulness of our estimated 3D flow in a full-head reenactment experiment, as well as 4D face reconstruction (see supplementary materials). + +The approach we follow starts from the collection and annotation of a large-scale dataset of facial videos, see section 3 for details. We employ such a rich dynamic dataset in the training process of our entire framework and initialise the learning procedure with this dataset of in-the-wild videos. Different from other scene flow methods, our framework requires only a pair of monocular RGB images and can be decomposed into two main parts: 1) a shape-initialization network (3DMeshReg) aiming at densely regressing the 3D geometry of the face in the first frame, and 2) a fully convolutional network, termed as DeepFaceFlowNet (DFFNet), that accepts a pair of RGB frames along with the projected 3D facial shape initialization of the first (reference) frame, provided by 3DMeshReg, and produces a dense 3D flow map at the output. + +# 2. Related Work + +The most closely-related works in the literature solve the problems of optical flow and scene flow estimation. Traditionally, one of the most popular approaches to tackle these problems had been through variational frameworks. The work of Horn and Schunck [16] pioneered the variational work on optical flow, where they formulated an energy equation with brightness constancy and spatial smoothness + +terms. Later, a large number of variational approaches with various improvements were put forward [7, 26, 38, 3, 31]. All of these methods involve dealing with a complex optimisation, rendering them computationally very intensive. One of the very first attempts for an end-to-end and CNN-based trainable framework capable of estimating the optical flow was made by Dosovitskiy et al. [10]. Even though their reported results still fall behind state-of-the-art classical methods, their work shows the bright promises of CNNs in this task and that further investigation is worthwhile. Another attempt with similar results to [10] was made by the authors of [28]. Their framework, called SpyNet, combine a classical spatial-pyramid formulation with deep learning for large motions estimation in a coarse-to-fine approach. As a follow-up method, Ilg et al. [18] later used the two structures proposed in [10] in a stacked pipeline, FlowNet2, for estimating coarse and fine scale details of optical flow, with very competitive performance on the Sintel benchmark. Recently, the authors of [32] put forward a compact and fast CNN model, termed as PwC-Net, that capitalises on pyramidal processing, warping, and cost volumes. They reported the top results on more than one benchmark, namely: MPI Sintel final pass and KITTI 2015. Most of the deep learning-based methods rely on synthetic datasets to train their networks in a supervised fashion, leaving a challenging gap when tested on real in-the-wild images. + +Quite different from optical flow, scene flow methods basically aim at estimating the three dimensional motion vectors of scene points from stereo or RGB-D images. The first attempt to extend optical flow to 3D was made by Vdedula et al. [34]. Their work assumed both the structure and the correspondences of the scene are known. Most of the early attempts on scene flow estimation relied on a sequence of stereo images to solve the problem. With the more popularity of depth cameras, more pipelines were utilising RGB-D data as an alternative to stereo images. All these methods follow the classical way of scene flow estimation without using any deep learning techniques or big datasets. The authors of [24] led the first effort to use deep learning features to estimate optical flow, disparity, and scene flow from a big dataset. The method of Golyanik et al. [13] estimates the 3D flow from a sequence of monocular images, with sufficient diversity in non-rigid deformation and 3D pose, as the method relies heavily on NRSfM. The lack of such diversity, which is common for the type of in-the-wild videos we deal with, could result in degenerate solutions. On the contrary, our method requires only a pair of monocular images as input. Using only monocular images, Brickwedde et al. [6] target dynamic street scenes but impose a strong rigidity assumption on scene objects, making it unsuitable for facial videos. As opposed to other state-of-the-art approaches, we rely on minimal information to solve the highly ill-posed 3D facial scene flow problem. Given only a pair of monoc + +ular RGB images, our novel framework is capable of accurately estimating the 3D flow between them robustly and quickly at a rate of $\sim 60$ fps. + +# 3. Dataset Collection and Annotation + +Given the highly ill-posed nature of the non-rigid 3D facial motion estimation from a pair of monocular images, the size and variability of the training dataset is very crucial [18, 10]. For this reason, we are based on a large-scale training dataset (Face3DVID), which we construct by collecting tens of thousands of facial videos, performing dense 3D face reconstruction on them and then estimating effective pseudo-ground truth of 3D flow maps. + +# 3.1. 3D Face Reconstruction From Videos + +First of all, we model the 3D face geometry using 3DMMs and an additive combination of identity and expression variation. This is similar to several recent methods, e.g. [40, 9, 23, 12]. In more detail, let $\mathbf{x} = [x_{1},y_{1},z_{1},\dots,x_{N},y_{N},z_{N}]^{T}\in \mathbb{R}^{3N}$ be the vectorized form of any 3D facial shape consisting of $N$ 3D vertices. We consider that $\mathbf{x}$ can be represented as: + +$$ +\mathbf {x} (\mathbf {i}, \mathbf {e}) = \bar {\mathbf {x}} + \mathbf {U} _ {i d} \mathbf {i} + \mathbf {U} _ {e x p} \mathbf {e} \tag {1} +$$ + +where $\overline{\mathbf{x}}$ is the overall mean shape vector, $\mathbf{U}_{id} \in \mathbb{R}^{3N \times n_i}$ is the identity basis with $n_i = 157$ principal components ( $n_i \ll 3N$ ), $\mathbf{U}_{exp} \in \mathbb{R}^{3N \times n_e}$ is the expression basis with $n_e = 28$ principal components ( $n_e \ll 3N$ ), and $\mathbf{i} \in \mathbb{R}^{n_i}$ , $\mathbf{e} \in \mathbb{R}^{n_e}$ are the identity and expression parameters respectively. The identity part of the model originates from the Large Scale Face Model (LSFM) [4] and the expression part originates from the work of Zafeiriou et al. [40]. + +To create effective pseudo-ground truth on tens of thousands of videos, we need to perform 3D face reconstruction that is both efficient and accurate. For this reason, we choose to fit the adopted 3DMM model on the sequence of facial landmarks over each video. Since this process is done only during training, we are not constrained by the need of online performance. Therefore, similarly to [9], we adopt a batch approach that takes into account the information from all video frames simultaneously and exploits the rich dynamic information usually contained in facial videos. It is an energy minimization to fit the combined identity and expression 3DMM model on facial landmarks from all frames of the input video simultaneously. More details are given in the Supplementary Material. + +# 3.2. Application on a Large-scale Videos Dataset + +To create our large scale training dataset, we start from a collection of 12,000 RGB videos with 19 million frames in total and 2,500 unique identities. We apply the 3D face reconstruction method outlined in Sec. 3.1, together with + +some video pruning steps to omit cases where the automatic estimations had failed. Our final training set consists of videos of our collection that survived the steps of video pruning: 9750 videos (81.25% of the initial dataset) with 1600 different identities and around 12.5M frames. For more details and exemplar visualisations, please refer to the Supplementary Material. + +# 3.3. Creation of 3D Flow Annotations + +Given a pair of images $\mathcal{I}_1$ and $\mathcal{I}_2$ , coming from a video in our dataset, and their corresponding 3D shapes $\mathbf{S}_1, \mathbf{S}_2$ and pose parameters $\mathbf{R}_1, \mathbf{t3d}_1, \mathbf{R}_2, \mathbf{t3d}_2$ , the 3D flow map of this pair is created as follows: + +$$ +\begin{array}{l} F (x, y) = f _ {c 2} \cdot \left(\mathbf {R} _ {2} \left[ \mathbf {S} _ {2} \left(t _ {1} ^ {j}\right), \mathbf {S} _ {2} \left(t _ {2} ^ {j}\right), \mathbf {S} _ {2} \left(t _ {3} ^ {j}\right) \right] \mathbf {b} + \mathbf {t} _ {3 d 2}\right) \\ (x, y) \in M \quad t ^ {j} \in \{T | t ^ {j} \text {i s v i s i b l e f r o m p i x i e l (x , y) i n} \mathcal {I} _ {1} \} \tag {2} \\ - f _ {c 1} \cdot \left(\mathbf {R} _ {1} \left[ \mathbf {S} _ {1} \left(t _ {1} ^ {j}\right), \mathbf {S} _ {1} \left(t _ {2} ^ {j}\right), \mathbf {S} _ {1} \left(t _ {3} ^ {j}\right) \right] \mathbf {b} + \mathbf {t} _ {3 d 1}\right), \\ t ^ {j} \in \left\{T \mid t ^ {j} \text {i s v i s i b l e f r o m p i x i l e (x , y) i n} \mathcal {I} _ {1} \right\} \\ \end{array} +$$ + +where $M$ is the set of foreground pixels in $\mathcal{I}_1$ , $\mathbf{S} \in \mathbb{R}^{3 \times N}$ is the matrix storing the column-wise x-y-z coordinates of the $N$ -vertices 3D shape of $\mathcal{I}_1$ , $\mathbf{R} \in \mathbb{R}^{3 \times 3}$ is the rotation matrix, $\mathbf{t}_{3d} \in \mathbb{R}^3$ is the 3D translation, $f_{c1}$ and $f_{c2}$ are the scales of the orthographic camera for the first and second image, respectively, $t^j = [t_1^j, t_2^j, t_3^j] (t_i^j \in \{1,..,N\})$ is the visible triangle from pixel $(x,y)$ in image $\mathcal{I}_1$ detected by our hardware-based renderer, $T$ is the set of all triangles composing the mesh of $\mathbf{S}$ , and $\mathbf{b} \in \mathbb{R}^3$ is the barycentric coordinates of pixel $(x,y)$ lying inside the projected triangle $t^j$ on image $\mathcal{I}_1$ . All background pixels in equation 2 are set to zero and ignored during training with the help of a masked loss. It is evident from equation 2 that we do not care about the visible vertices in the second frame and only track in 3D those were visible in image $\mathcal{I}_1$ to produce the 3D flow vectors. Additionally, with this flow representation, the x-y coordinates alone of the 3D flow map $(F(x,y))$ designate the 2D optical flow components in the image space directly. + +# 4. Proposed Framework + +Our overall designed framework is demonstrated in figure 2. We expect as input two RGB images $\mathcal{I}_1, \mathcal{I}_2 \in \mathbb{R}^{W \times H \times 3}$ and produce at the output an image $F \in \mathbb{R}^{W \times H \times 3}$ encoding the per-pixel 3D optical flow from $\mathcal{I}_1$ to $\mathcal{I}_2$ . The designed framework is marked by two main stages: 1) 3DMeshReg: 3D shape initialisation and encoding of the reference frame $\mathcal{I}_1$ , 2) DeepFaceFlowNet (DFFNet): 3D face flow prediction. The entire framework was trained in a supervised manner, utilising the collected and annotated dataset, see section 3.2, and fine-tuned on the 4DFAB dataset [8], after registering the sequence of scans coming from each video in this dataset to our 3D template. Input frames were registered to a 2D template of size $224 \times 224$ with the help of the 68 mark-up extracted using [14] and fed to our framework. + +![](images/0eaafb72ded487069fb36bec5ff6aae2ee8c2f6d466d628d071e13acb9f9fd26.jpg) +Figure 2. Proposed DeepFaceFlow pipeline for the 3D facial flow estimation. First stage (left): 3DMeshReg works as an initialisation for the 3D facial shape in the first frame. This estimation is rasterized in the next step and encoded in an RGB image, termed as Projected Normalised Coordinates Code (PNCC) storing the x-y-z coordinates of each corresponding visible 3D point. Given the pair of images as well as the PNCC, the second stage (right) estimates the 3D flow using a deep fully-convolutional network (DeepFaceFlowNet). + +# 4.1. 3D Shape Initialisation and Encoding + +To robustly estimate the per-pixel 3D flow between a pair of images, we provide the DFFNet network, section 4.2, not only with $\mathcal{I}_1\& \mathcal{I}_2$ , but also with another image that stores a Projected Normalised coordinates Code (PNCC) of the estimated 3D shape of the reference frame $\mathcal{I}1$ , i.e. PNCC $\in \mathbb{R}^{W\times H\times 3}$ . The PNCC codes that we consider are essentially images encoding the normalised x,y, and z coordinates of facial vertices visible from each corresponding pixel in $\mathcal{I}_1$ based on the camera's view angle. The inclusion of such images allows the CNN to better associate each RGB value in $\mathcal{I}_1$ with the corresponding point in the 3D space, providing the network with a better initialisation in the problem space and establishing a reference 3D mesh that facilitates the warping in the 3D space during the course of training. Equation 3 shows how to compute the PNCC image of the reference frame $\mathcal{I}_1$ . + +$$ +\underset {(x, y) \in M} {\mathcal {P N C C}} (x, y) = \mathcal {V} (\mathbf {S}, \mathbf {c}) = \underset {t ^ {j} \in \{T \mid t ^ {j} \text {i s v i s i b l e f r o m} (x, y) \}} {\mathbf {P}} (\mathbf {R} [ \mathbf {S} (t _ {1} ^ {j}), \mathbf {S} (t _ {2} ^ {j}), \mathbf {S} (t _ {3} ^ {j}) ] \mathbf {b} + \mathbf {t} _ {3 d}), +$$ + +where $\mathcal{V}(:,.)$ is the function rendering the normalised version of $\mathbf{S}$ , $\mathbf{c} \in \mathbb{R}^7$ is the camera parameters, i.e. rotation angles, translation and scale $(\mathbf{R}, t_{3d}, f_c)$ , and $\mathbf{P}$ is a $3 \times 3$ diagonal matrix with main diagonal elements $\left(\frac{f_c}{W}, \frac{f_c}{H}, \frac{f_c}{D}\right)$ . The multiplication with $\mathbf{P}$ scales the posed 3D face with $f_c$ to be first in the image space coordinates and then normalises it with the width and height of the rendered image size and the maximum z value D computed from the entire dataset of our annotated 3D shapes. This results in an image with RGB channels storing the normalised ([0, 1]) x-y-z coordinates of the corresponding rendered 3D shape. The rest of the parameters in equation 3 are detailed in section 3.3 and utilised in equation 2. + +3DMeshReg. The PNCC image generation discussed in equation 3 still lacks the estimation of the 3D facial shape S of $\mathcal{I}_1$ . We deal with this problem by training a deep CNN, termed as 3DMeshReg, that aims at regressing a dense 3D + +mesh S through per-vertex 3D coordinates estimations. We use our collected dataset (Face3DVID) and the 4DFAB [8] 3D scans to train this network in a supervised manner. We formulate a loss function composed of two terms: + +$$ +\mathcal {L} (\Phi) = \frac {1}{N} \sum_ {i = 1} ^ {N} \left\| \mathbf {s} _ {i} ^ {G T} - \mathbf {s} _ {i} \right\| ^ {2} + \frac {1}{O} \sum_ {j = 1} ^ {O} \left\| \mathbf {e} _ {j} ^ {G T} - \mathbf {e} _ {j} \right\| ^ {2}. \tag {4} +$$ + +The first term in the above equation penalises the deviation of each vertex 3D coordinates from the corresponding ground-truth vertex $(\mathbf{s}_i = [x,y,z]^T)$ , while the second term ensures similar edge lengths between vertices in the estimated and ground-truth mesh, given that $\mathbf{e}_j$ is the $\ell_2$ distance between vertices $\mathbf{v}_j^1$ and $\mathbf{v}_j^2$ defining edge $j$ in the original ground-truth 3D template. Instead of estimating the camera parameters $\mathbf{c}$ separately, which are needed at the very input of the renderer, we assume a Scaled Orthographic Projection (SOP) as the camera model and train the network to regress directly the scaled 3D mesh by multiplying the x-y-z coordinates of each vertex of frame $i$ with $f_c^i$ . + +# 4.2. Face Flow Prediction + +Given $\mathcal{I}_1, \mathcal{I}_2$ and $\mathcal{PNNCC}$ images, the 3D flow estimation problem is a mapping $\mathcal{F} : \{\mathcal{I}_1, \mathcal{I}_2, \mathcal{PNNCC}\} \in \mathbb{R}^{W \times H \times 9} \to F^{W \times H \times 3}$ . Using both the annotated Face3Dvld detailed in section 3 and 4DFAB [8] datasets, we train a fully convolutional encoder-decoder CNN structure $(\mathcal{F})$ , called DeepFaceFlowNet (DFFNet), that takes three images, namely: $\mathcal{I}_1, \mathcal{I}_2$ and $\mathcal{PNNCC}$ , and produces the 3D flow estimate from each foreground pixel in $\mathcal{I}_1$ to $\mathcal{I}_2$ as a $W \times H \times 3$ image. The designed network follows the generic U-Net architecture with skip connections [29] and was inspired particularly by FlowNetC [10], see figure 3. Distinguished from FlowNetC, we extend the network to account for the $\mathcal{PNNCC}$ image at the input and modify the structure to account for the 3D flow estimation task, rather than 2D optical flow. We propose the following two-term loss function: + +$$ +\mathcal {L} (\Psi) = \sum_ {i = 1} ^ {L} w _ {i} | | F _ {i} ^ {G T} - F _ {i} (\Psi) | | _ {\mathbf {F}} + \alpha | | \mathcal {I} _ {1} - \mathcal {W} (F, \mathcal {P N C C}; \mathcal {I} _ {2}) | | _ {\mathbf {F}} ^ {2} \tag {5} +$$ + +![](images/79149e975890ee395c13e5996ab3efd7b4c81d0b9a6233a56cf5d8555134bc1b.jpg) +Figure 3. Architecture of our designed DFFNet for the purpose of estimating the 3D flow between a pair of RGB images. + +The first term in Eq. (5) is the endpoint error, which corresponds to a 3D extension of the standard error measure for optical flow methods. It computes the Frobenius norm $(\left|\left.\cdot \right|\right|_{\mathbf{F}})$ error between the estimated 3D flow $F(\Psi)$ and the ground truth $F^{GT}$ , with $\Psi$ representing the network learnable weights. Practically, since at the decoder part of our DFFNet each fractionally-strided convolution operation, aka. deconvolution, produces an estimation of the flow at different resolutions, we compare this multi-resolution 3D flow with the downsampled versions of the $F_{GT}$ , up until the full resolution at stage $L$ , and use the weighted sum of the Frobenius norm error as a penalisation term. The second term in Eq. (5) is the photo-consistency error, which assumes that the colour of each point does not change from $\mathcal{I}_1$ to $\mathcal{I}_2$ . The warping operation was done with the help of the warping function $\mathcal{W}(.,\cdot)$ . This function warps the 3D shape of $\mathcal{I}_1$ encoded inside the PNCC image using the estimated flow $F$ and samples $\mathcal{I}_2$ at the vertices of the resultant projected 3D shape. The warping function in equation 5 was implemented by a differentiable layer detecting the occlusions by the virtue of our 3D flow, and sampling the second image (backward warping) in a differentiable manner at the output stage of our DFFNet. The scale $\alpha$ is used for the sake of terms balancing while training. + +# 5. Experiments + +In this section, we compare our framework with state-of-the-art methods in optical flow and 3D face reconstruction. We ran all the experiments on an NVIDIA DGX1 machine. + +# 5.1. Datasets + +Although the collected Face3DVID dataset has a wide variety of facial dynamics and identities captured under plenitude of set-ups and viewpoints depicting the in-the + +wild scenarios of videos capture, the dataset was annotated with pseudo ground-truth 3D shapes, not real 3D scans. Relying only on this dataset, therefore, for training our framework could result in mimicking the performance of the 3DMM-based estimation, which we want ideally to initialise with and then depart from. Thus, we fine-tune our framework on the 4DFAB dataset [8]. The 4DFAB dataset is a large-scale database of dynamic high-resolution 3D faces with subjects displaying both spontaneous and posed facial expressions with the corresponding per-frame 3D scans. We leave a temporal gap between consecutive frames sampled from each video if the average 3D flow per pixel is $<=1$ between each pair. In total, around 3M image pairs (1600 subjects) form the Face3DVID dataset and 500K from the 4DFAB (175 subjects) were used for training/testing purposes. We split the Face3DVID into training/validation vs test (80% vs 20%) in the first phase of the training. Likewise, 4DFAB dataset was split into training/validation vs test (80% vs 20%) during the fine-tuning. + +# 5.2. Architectures and Training Details + +Our pipeline consists of two networks (see Fig. 2): a) 3DMeshReg: The aim of this network is to accept an input image $(\mathcal{I}_1 \in \mathbb{R}^{224 \times 224 \times 3})$ and regress the per-vertex $(x, y, z)$ coordinates describing the subject's facial geometry. ResNet50 [15] network architecture was selected and trained for this purpose after replacing the output fully-connected (fc) layer with a convolutional one $(3 \times 3, 512)$ and then a linear fc layer with $\sim 1.5k \times 3$ neurons. This network was trained initially and separately from the rest of the framework on the Face3DVID dataset and then fine-tuned on the 4DFAB dataset [8]. Adam optimizer was used [20] during the training with learning rate of 0.0001, $\beta_1 = 0.9$ , $\beta_2 = 0.999$ , and batch size 32. + +![](images/aa893f315a7f7ad281c08f6e2925ae7850d130c747db06a40dd8db82a9d2ed10.jpg) +Figure 4. Training schedule for the learning rate used while training our network and other state-of-the-art approaches for 3D flow estimation. The first 20 epochs for all methods were ran on Face3DVID dataset and the next 20 on 4DFAB. Each training epoch on Face3DVID and 4DFAB is composed of $18.75 \cdot 10^{4}$ and $3.13 \cdot 10^{4}$ iterations, respectively, each with batch size of 16. + +b) DFFNet: Figure 3 shows the structure of this network. Inspired by FlowNetC [10], this network has similarly nine convolutional layers. The first three layers use kernels of size $5 \times 5$ and the rest have kernels of size $3 \times 3$ . Where occurs, downsampling is carried out with strides of 2 and non-linearity is implemented with ReLU layers. We extend this architecture at the input stage by a branch dedicated for processing the PNCC image. The feature map generated at the end of the PNCC branch is concatenated with the correlation result between the feature maps of $\mathcal{I}_1$ and $\mathcal{I}_2$ . For the correlation layer, we follow the implementation suggested by [10] and we keep the same parameters for this layer (neighborhood search size is $2*(21)+1$ pixels). At the decoder section, the flow is estimated from the finest level up until the full resolution. While training, we use a batch size of 16 and the Adam optimization algorithm [20] with the default parameters recommended in [20] ( $\beta_1 = 0.9$ and $\beta_2 = 0.999$ ). Figure 4 demonstrates our scheduled learning rates over epochs for training and fine-tuning. We also set $w_i = 1$ and $\alpha = 10$ in equation 5 and normalise input images to the range [0, 1]. While testing, our entire framework takes only around 17ms (6ms (3DMehsReg) + 6ms (rasterization &PNCC generation) + 5ms (DFFNet)) to generate the 3D dense flow map, given a registered pair of images. + +# 5.3. Evaluation of 3D Flow Estimation + +In this section, we quantitatively evaluate the ability of our approach in estimating the 3D flow. As there exist no other methods for 3D scene flow from simple RGB images, we adapt existing methods that solve closely-related problems so that they produce 3D flow estimation. In more detail, we use two 3D reconstruction methods (ITWMM [5] and DNSfM-3DMM [23]), as well as four optical flow methods after retraining them all specifically for the task of 3D flow estimation. The four optical flow methods include the best performing methods in table 2 on our datasets (LiteNet&FlowNet2) as well as two additional baselines + +# (FlowNetS&FlowNetC). + +To estimate the 3D flow by ITWMM and DNSfM-3DMM, we first generate the per-frame dense 3D mesh of each test video by passing a single frame at a time to the ITWMM method and the entire video for the DNSfM-3DMM (as it is a video-based approach). Then, following our annotation procedure discussed in 3.3, the 3D flow values for each pair of test images were obtained. + +Since the deep learning-based methods we compare against in this section were proposed as 2D flow estimators, we modify the sizes of some filters in their original architectures so that their output flow is a 3-channel image storing the x-y-z coordinates of the flow and train them on our 3D-facial-flow datasets with the learning rate schedules reported in figure 4. FlowNet2 is a very deep architecture (around 160M parameters) composed of stacked networks. As suggested in [18], we did not train this network in one go, but instead sequentially. More specifically, we fused the separately trained individual networks (FlowNetS, FlowNetC, and FlowNetSD [18]) on our datasets together and fine-tuned the entire stacked architecture, see 4 for the learning rate schedule. Please consult the supplementary material for more information on what we modified exactly in each flow network we compare against here. + +Table 1 shows the generated facial AEPE results by each method on the Face3DVID and 4DFAB datasets. Our proposed architecture and its variant ('ours_depth') report the lowest (best) AEPE numbers on both datasets. Figure 5 visualises some color-coded 3D flow results produced by the methods presented in table 1. To color-code the 3D flow, we convert the x-y-z estimated flow coordinates from Cartesian to spherical coordinates and normalise them so that they represent the coordinates of an HSV coloring system, more details on that are available in the supplementary material. It is noteworthy that the 3D facial reconstruction methods we compare against fail to produce as accurate tracking of the 3D flow as our approach. Their result is not smooth and consistent in the model space, resulting in a higher intensity motion in the space. This can be attributed to the fact that such methods pay attention to the fidelity of the reconstruction from the camera's view angle more than the 3D temporal flow. On the other hand, the other deep architectures we train in this section are unable to capture the full facial motion with same precision, with more fading flow around cheeks and forehand. + +# 5.4. Evaluation of 2D Flow Estimation + +The aim of this experiment is to probe the performance of our framework in estimating the 2D optical facial flow between a pair of facial images by keeping only the displacements produced at the output in the x and y directions while ignoring those in the z direction. We separate the comparisons in this section into two parts. Firstly, we eval + +![](images/6286e28c9d22aec4833ddd834883bec5259a847705e3f4637f973405563597ae.jpg) +Figure 5. Color-coded 3D flow estimations of random test pairs from the Face3Dvld and 4DFAB datasets. Left-to-right: pair of input RGB images, Ground Truth, ours, ours_depth, compared methods. For the color coding, see the Supp. Material. + +![](images/b1d0d0a1bad96a68484e40aa1365e41b77f37607113a0dc69c01e456be657289.jpg) +Figure 6. Color-coded 2D flow estimations. Rows are random samples from the test split of the Face3DVID and 4DFAB datasets and their 2D flow estimations. The first two columns of each row show the input pair of RGB images. For the color coding, see the Supp. Material. + +Table 1. Comparison between our obtained 3D face flow results against state-of-the-art methods on the test splits of the 4DFAB and Face3DVID datasets. Comparison metric is the standard Average End Point Error (AEPE) + +
Method4DFAB(↓)Face3DVID(↓)
ITWMM [5]3.434.1
DNSfM-3DMM [23]2.83.9
FlowNetS [10]2.253.7
FlowNetC [10]1.952.425
FlowNet2 [18]1.892.4
LiteNet [17]1.52.2
ours_depth1.61.971
ours1.31.77
+ +uate our method against generic 2D flow approaches using their best performing trained models provided by the original authors of each. Secondly, we train the same architectures from scratch on the same datasets we train our framework on, namely the training splits of Face3DVID and 4DFAB, using a learning rate of 1e-4 that drops 5 times each 10 epochs. We keep the same network design as provided by each paper's authors and only train the network + +to minimise a masked loss composed of photo-consistency and data terms. The masked loss is computed with the help of a foreground (facial) mask for each reference image provided with our utilised datasets. Table 2 presents the obtained facial Average End Point Error (AEPE) metric values by our proposed approach against other state-of-the-art optical flow prediction methods on the test splits of Face3DVID and 4DFAB datasets. As can be noted from table 2, our proposed method always achieves the smallest (best) AEPE values on both employed datasets. As expected, the AEPE values decrease when training the other methods on our dataset for the specific task of facial 2D flow estimation. However, our method still produces lower errors and outperforms the compared against methods on this task. The 'ours_depth' variant of our network comes as the second best performing method on both datasets. This variant was trained in a very similar manner to our original framework but with feeding the DFFNet with $\mathcal{I}_1$ , $\mathcal{I}_2$ and only the $z$ coordinates (last channel) of the PNCC image while ignoring the $x$ and $y$ (first two channels). Figure 6 demonstrates some qualitative results generated by the methods reported + +Table 2. Comparison between our obtained 2D flow results against state-of-the-art methods on the test splits of the 4DFAB and Face3DVID datasets. Comparison metric is the standard Average End Point Error (AEPE). 'original models' refers to trained models provided by the authros of each, and 'trained from scratch' indicates that the same architectures were trained on the training sets of both Face3DVID and 4DFAB to estimate the 2D facial flow. + +
Methodoriginal modelstrained from scratch
4DFABFace3DVID4DFABFace3DVID
FlowNetS [10]1.8325.14251.9562.6
SpyNet [28]1.3131.0421.5
FlowNetC [10]1.2122.61.0611.498
UnFlow [25]1.1632.65531.0551.45
LiteNet [17]1.162.61.0181.268
PWC-Net[32]1.1592.6251.0351.371
FlowNet2 [18]1.152.61871.0631.352
ours_depth0.991.1760.991.176
ours0.9411.0960.9411.096
+ +in table 2, as well as ours. Please refer to the supplementary material for more information on the color-coding followed for encoding the flow values. + +# 5.5. Video-to-Video Synthesis With 3D Flow + +We further investigate the functionality of our proposed framework in capturing the human facial 3D motion and successfully employing it in a full-head reenactment application. Towards that aim, we use the recently proposed method of [37], which is in essence a general video-to-video synthesis approach mapping a source (conditioning) video to a photo-realistic output one. The authors of [37] train their framework in an adversarial manner and learn the temporal dynamics of a target video during the training time with the help of the 2D flow estimated by FlowNet2 [18]. In this experiment, we replace the FlowNet2 employed in [37] by our proposed approach and aid the generator and video discriminator to learn the temporal facial dynamics represented by our 3D facial flow. We firstly conduct a self-reenactment test as done in [37], where we divide each video into a train/test splits (first 2 third vs last third) and report the average per-pixel RGB error between fake and real test frames. Table 3 reveals the average pixel distance obtained for 4 different videos we trained a separate model for each. The only difference between the second and third row of table 3 is the flow estimation method, everything else (structure, loss functions, conditioning, etc.) is the same. As can be noted from table 3, our 3D flow better reveals the facial temporal dynamics of the training subject and assists the video synthesis generator in capturing these temporal characteristics, resulting in a lower error. In the second experiment, we make a full-head reenactment test to fully transfer the head pose and expression from the source person to a target one. Figure 7 manifests the synthesised frames using our 3D flow and the 2D flow of FlowNet2. + +![](images/dddfd075d3d8ac5dff1e364327127e02697805c4bdb2c67205f68f45ba3958d4.jpg) +Figure 7. Full-head reenactment using [37] combined with either FlowNet2 (second row) or our 3D flow approach (last row). + +Looking closely at figure 7, our 3D flow results in a more photo-realistic video synthesis with highly accurate head pose, facial expression, as well as temporal dynamics, while the manipulated frames generated with FlowNet2 fail to demonstrate the same fidelity. More details regarding this experiment are in the supplementary material. + +Table 3. Average RGB distance obtained under a self-reenactment setup on 4 videos (each with 1K test frames) using either FlowNet2 [18] or our facial 3D flow with the method of Wang et al. [37] + +
Video1234
[37]+FlowNet2 (↓)7.59.58.79.2
[37]+Ours (3D flow) (↓)6.37.97.57.7
+ +# 6. Conclusion and Future Work + +In this work, we put forward a novel and fast framework for densely estimating the 3D flow of human faces from only a pair of monocular RGB images. The framework was trained on a very large-scale dataset of in-the-wild facial videos (Face3DVID) and fine-tuned on a 4D facial expression database (4DFAB [8]) with ground-truth 3D scans. We conduct extensive experimental evaluations that show that the proposed approach: a) yields highly-accurate estimations of 2D and 3D facial flow from monocular pair of images and successfully captures complex non-rigid motions of the face and b) outperforms many state-of-the-art approaches in estimating both the 2D and 3D facial flow, even when training other approaches under the same setup and data. We additionally reveal the promising potential of our work in a full-head facial manipulation application that capitalises on our facial flow to produce highly loyal and photo-realistic fake facial dynamics indistinguishable from real ones. + +# Acknowledgement + +Stefanos Zafeiriou acknowledges support from EPSRC Fellowship DEFORM (EP/S010203/1) + +# References + +[1] Thiemo Alldieck, Marc Kassubeck, Bastian Wandt, Bodo Rosenhahn, and Marcus Magnor. Optical flow-based 3d human motion estimation from monocular video. In German Conference on Pattern Recognition, pages 347-360. Springer, 2017. 1 +[2] Tali Basha, Yael Moses, and Nahum Kiryati. Multi-view scene flow estimation: A view centered variational approach. International journal of computer vision, 101(1):6-21, 2013. 1 +[3] Michael J Black and Paul Anandan. The robust estimation of multiple motions: Parametric and piecewise-smooth flow fields. Computer vision and image understanding, 63(1):75-104, 1996. 2 +[4] James Booth, Anastasios Roussos, Allan Ponniah, David Dunaway, and Stefanos Zafeiriou. Large scale 3d morphable models. International Journal of Computer Vision, 126(2-4):233-254, 2018. 3 +[5] James Booth, Anastasios Roussos, Evangelos Ververas, Epameinondas Antonakos, Stylianos Ploumpis, Yannis Panagakis, and Stefanos Zafeiriou. 3d reconstruction of "inthe-wild" faces in images and videos. IEEE transactions on pattern analysis and machine intelligence, 40(11):2638-2652, 2018. 6, 7 +[6] Fabian Brickwedde, Steffen Abraham, and Rudolf Mester. Mono-sf: Multi-view geometry meets single-view depth for monocular scene flow estimation of dynamic traffic scenes. In Proceedings of the IEEE International Conference on Computer Vision, pages 2780-2790, 2019. 2 +[7] Thomas Brox, Andrés Bruhn, Nils Papenberg, and Joachim Weickert. High accuracy optical flow estimation based on a theory for warping. In European conference on computer vision, pages 25-36. Springer, 2004. 2 +[8] Shiyang Cheng, Irene Kotsia, Maja Pantic, and Stefanos Zafeiriou. 4dfab: A large scale 4d database for facial expression analysis and biometric applications. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5117-5126, 2018. 3, 4, 5, 8 +[9] Jiankang Deng, Anastasios Roussos, Grigorios Chrysos, Evangelos Ververas, Irene Kotsia, Jie Shen, and Stefanos Zafeiriou. The menpo benchmark for multi-pose 2d and 3d facial landmark localisation and tracking. International Journal of Computer Vision, pages 1-26, 2018. 3 +[10] Alexey Dosovitskiy, Philipp Fischer, Eddy Ilg, Philip Hausser, Caner Hazirbas, Vladimir Golkov, Patrick Van Der Smagt, Daniel Cremers, and Thomas Brox. Flownet: Learning optical flow with convolutional networks. In Proceedings of the IEEE international conference on computer vision, pages 2758-2766, 2015. 2, 3, 4, 6, 7, 8 +[11] Ravi Garg, Anastasios Roussos, and Lourdes Agapito. Dense variational reconstruction of non-rigid surfaces from monocular video. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1272-1279, 2013. 1 +[12] Baris Gecer, Stylianos Ploumpis, Irene Kotsia, and Stefanos Zafeiriou. Ganfit: Generative adversarial network fit + +ting for high fidelity 3d face reconstruction. arXiv preprint arXiv:1902.05978, 2019. 3 +[13] Vladislav Golyanik, Aman S Mathur, and Didier Stricker. Nrsfm-flow: Recovering non-rigid scene flow from monocular image sequences. In BMVC, 2016. 2 +[14] Jia Guo, Jiankang Deng, Niannan Xue, and Stefanos Zafeiriou. Stacked dense u-nets with dual transformers for robust face alignment. In Proceedings of the British Machine Vision Conference (BMVC), pages 87.1-87.12. BMVA Press, September 2019. 3 +[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 5 +[16] Berthold KP Horn and Brian G Schunck. Determining optical flow. Artificial intelligence, 17(1-3):185-203, 1981. 1, 2 +[17] Tak-Wai Hui, Xiaou Tang, and Chen Change Loy. Liteflownet: A lightweight convolutional neural network for optical flow estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8981-8989, 2018. 7, 8 +[18] Eddy Ilg, Nikolaus Mayer, Tonmoy Saikia, Margret Keuper, Alexey Dosovitskiy, and Thomas Brox. Flownet 2.0: Evolution of optical flow estimation with deep networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2462-2470, 2017. 2, 3, 6, 7, 8 +[19] Joel Janai, Fatma Güney, Aseem Behl, and Andreas Geiger. Computer vision for autonomous vehicles: Problems, datasets and state-of-the-art. arXiv preprint arXiv:1704.05519, 2017. 1 +[20] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 5, 6 +[21] Mohammad Rami Koujan, Luma Alharbawee, Giorgos Giannakakis, Nicolas Pugeault, and Anastasios Roussos. Realtime facial expression recognition "in the wild" by disentangling 3d expression from identity. In 2020 15th IEEE International Conference on Automatic Face & Gesture Recognition (FG 2020). IEEE, 2020. 1 +[22] Mohammad Rami Koujan, Michail Doukas, Anastasios Roussos, and Stefanos Zafeiriou. Head2head: Video-based neural head synthesis. In 2020 15th IEEE International Conference on Automatic Face & Gesture Recognition (FG 2020). IEEE, 2020. 1 +[23] Mohammad Rami Koujan and Anastasios Roussos. Combining dense nonrigid structure from motion and 3d morphable models for monocular 4d face reconstruction. In Proceedings of the 15th ACM SIGGRAPH European Conference on Visual Media Production, CVMP '18, pages 2:1-2:9, New York, NY, USA, 2018. ACM. 1, 3, 6, 7 +[24] Nikolaus Mayer, Eddy Ilg, Philip Hausser, Philipp Fischer, Daniel Cremers, Alexey Dosovitskiy, and Thomas Brox. A large dataset to train convolutional networks for disparity, optical flow, and scene flow estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4040-4048, 2016. 2 + +[25] Simon Meister, Junhwa Hur, and Stefan Roth. Unflow: Unsupervised learning of optical flow with a bidirectional census loss. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. 8 +[26] Etienne Mémin and Patrick Pérez. Dense estimation and object-based segmentation of the optical flow with robust techniques. IEEE Transactions on Image Processing, 7(5):703-719, 1998. 2 +[27] Jean-Philippe Pons, Renaud Keriven, and Olivier Faugeras. Multi-view stereo reconstruction and scene flow estimation with a global image-based matching score. International Journal of Computer Vision, 72(2):179–193, 2007. 1 +[28] Anurag Ranjan and Michael J Black. Optical flow estimation using a spatial pyramid network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4161-4170, 2017. 2, 8 +[29] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pages 234-241. Springer, 2015. 4 +[30] Karen Simonyan and Andrew Zisserman. Two-stream convolutional networks for action recognition in videos. In Advances in neural information processing systems, pages 568-576, 2014. 1 +[31] Deqing Sun, Stefan Roth, and Michael J Black. A quantitative analysis of current practices in optical flow estimation and the principles behind them. International Journal of Computer Vision, 106(2):115-137, 2014. 2 +[32] Deqing Sun, Xiaodong Yang, Ming-Yu Liu, and Jan Kautz. Pwc-net: Cnns for optical flow using pyramid, warping, and cost volume. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8934-8943, 2018. 2, 8 +[33] Ravi Kumar Thakur and Snehasis Mukherjee. Sceneednet: A deep learning approach for scene flow estimation. In 2018 15th International Conference on Control, Automation, Robotics and Vision (ICARCV), pages 394-399. IEEE, 2018. 1 +[34] Sundar Vedula, Simon Baker, Peter Rander, Robert Collins, and Takeo Kanade. Three-dimensional scene flow. In Proceedings of the Seventh IEEE International Conference on Computer Vision, volume 2, pages 722-729. IEEE, 1999. 1, 2 +[35] Christoph Vogel, Konrad Schindler, and Stefan Roth. 3d scene flow estimation with a rigid motion prior. In 2011 International Conference on Computer Vision, pages 1291-1298. IEEE, 2011. 1 +[36] Shan Wang, Xukun Shen, and Jiaqing Liu. Dense optical flow variation based 3d face reconstruction from monocular video. In 2018 25th IEEE International Conference on Image Processing (ICIP), pages 2665-2669. IEEE, 2018. 1 +[37] Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, Guilin Liu, Andrew Tao, Jan Kautz, and Bryan Catanzaro. Video-to-video synthesis. arXiv preprint arXiv:1808.06601, 2018. 1, 8 +[38] Andreas Wedel, Daniel Cremers, Thomas Pock, and Horst Bischof. Structure-and motion-adaptive regularization for + +high accuracy optic flow. In 2009 IEEE 12th International Conference on Computer Vision, pages 1663-1668. IEEE, 2009. 2 +[39] Andreas Wedel, Clemens Rabe, Tobi Vaudrey, Thomas Brox, Uwe Franke, and Daniel Cremers. Efficient dense scene flow from sparse or dense stereo data. In European conference on computer vision, pages 739-751. Springer, 2008. 1 +[40] Stefanos Zafeiriou, Grigorios G Chrysos, Anastasios Roussos, Evangelos Ververas, Jiankang Deng, and George Trigeorgis. The 3d menpo facial landmark tracking challenge. In Proceedings of the IEEE International Conference on Computer Vision, pages 2503-2511, 2017. 3 +[41] Youding Zhu and Kikuo Fujimura. 3d head pose estimation with optical flow and depth constraints. In Fourth International Conference on 3-D Digital Imaging and Modeling, 2003. 3DIM 2003. Proceedings., pages 211-216. IEEE, 2003. 1 \ No newline at end of file diff --git a/deepfaceflowinthewilddense3dfacialmotionestimation/images.zip b/deepfaceflowinthewilddense3dfacialmotionestimation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..4beb40228232617621b947b17a96a5eb07142481 --- /dev/null +++ b/deepfaceflowinthewilddense3dfacialmotionestimation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0fff0589f23cf4576492fe12eadf5b44844f5cf1c3e7429b8c70b22edbe47b1 +size 454798 diff --git a/deepfaceflowinthewilddense3dfacialmotionestimation/layout.json b/deepfaceflowinthewilddense3dfacialmotionestimation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8370d44154b4c95ffa0d689cc0ade0b4202da425 --- /dev/null +++ b/deepfaceflowinthewilddense3dfacialmotionestimation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c285e8bb5863ba31ab4d1300e68e65036095be7b50b5c947926240d48406687 +size 359587 diff --git a/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/7bdfd744-7981-467c-a1fa-cbbbdf8edc59_content_list.json b/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/7bdfd744-7981-467c-a1fa-cbbbdf8edc59_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..0c2291b9742e78cb629a49c38128d1d613bdc5c5 --- /dev/null +++ b/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/7bdfd744-7981-467c-a1fa-cbbbdf8edc59_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a8a969891c7f91af039b28055fb54092a66c853dbcdd6b0b62860f253962583 +size 73461 diff --git a/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/7bdfd744-7981-467c-a1fa-cbbbdf8edc59_model.json b/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/7bdfd744-7981-467c-a1fa-cbbbdf8edc59_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e95ce4e8d17051026753bfd716e09ff37b5fa4c2 --- /dev/null +++ b/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/7bdfd744-7981-467c-a1fa-cbbbdf8edc59_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ee6472e8eab816cbef430b779c0d7b14b739182eb950a4c3ceac9010d252f81 +size 96319 diff --git a/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/7bdfd744-7981-467c-a1fa-cbbbdf8edc59_origin.pdf b/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/7bdfd744-7981-467c-a1fa-cbbbdf8edc59_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..06397439fe706235bac07c352d34ed3b8eb15785 --- /dev/null +++ b/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/7bdfd744-7981-467c-a1fa-cbbbdf8edc59_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f8dcde5054991fe8e04ba1817bb65a5858c4931dae26331a6f2355bea9096de +size 517579 diff --git a/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/full.md b/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a9f74388e2f61c9e49ae9dd81a30999fcee5aa94 --- /dev/null +++ b/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/full.md @@ -0,0 +1,361 @@ +# Deep Face Super-Resolution with Iterative Collaboration between Attentive Recovery and Landmark Estimation + +Cheng Ma $^{1,2,3}$ , Zhenyu Jiang $^{1}$ , Yongming Rao $^{1,2,3}$ , Jiwen Lu $^{1,2,3*}$ , Jie Zhou $^{1,2,3,4}$ $^{1}$ Department of Automation, Tsinghua University, China + $^{2}$ State Key Lab of Intelligent Technologies and Systems, China + $^{3}$ Beijing National Research Center for Information Science and Technology, China + $^{4}$ Tsinghua Shenzhen International Graduate School, Tsinghua University, China + +macheng17@mails.tsinghua.edu.cn; jiangzhe16@mails.tsinghua.edu.cn raoyongming95@gmail.com; lujiwen@tsinghua.edu.cn; jzhou@tsinghua.edu.cn + +# Abstract + +Recent works based on deep learning and facial priors have succeeded in super-resolving severely degraded facial images. However, the prior knowledge is not fully exploited in existing methods, since facial priors such as landmark and component maps are always estimated by low-resolution or coarsely super-resolved images, which may be inaccurate and thus affect the recovery performance. In this paper, we propose a deep face super-resolution (FSR) method with iterative collaboration between two recurrent networks which focus on facial image recovery and landmark estimation respectively. In each recurrent step, the recovery branch utilizes the prior knowledge of landmarks to yield higher-quality images which facilitate more accurate landmark estimation in turn. Therefore, the iterative information interaction between two processes boosts the performance of each other progressively. Moreover, a new attentive fusion module is designed to strengthen the guidance of landmark maps, where facial components are generated individually and aggregated attentively for better restoration. Quantitative and qualitative experimental results show the proposed method significantly outperforms state-of-the-art FSR methods in recovering high-quality face images. + +# 1. Introduction + +In recent years, face super-resolution (FSR), also known as face hallucination, has attracted much attention of the computer vision community. FSR aims to restore high-resolution (HR) face images from the low-resolution (LR) counterparts, which plays an important role in many appli + +![](images/95f55bbe78ce9651895bfaf6563478b98daf161ac41d29c6d22406a4e3329810.jpg) +Step 1 +Figure 1. Data flow of the proposed method. FSR outputs in different steps are shown in the top row while the detected facial landmarks are displayed on HR images accordingly in the bottom row. The pink arrows denote the face alignment process while the blue ones denote the face recovery process with the attentive fusion of landmarks. The black arrows represent the recurrent schemes in two branches. Through our framework, the quality of SR images becomes better progressively and the estimated landmarks (red) also get closer to the ground-truth (green). + +![](images/6b3a706e632b280baf5649b654b9a805e5367030e2c41512d73fdc58520919b7.jpg) +Step 2 + +![](images/eff40dba1264ff512af6cdcbe340b832cfa41c62a4566780033a72347e421b29.jpg) +Step 3 + +cations such as video surveillance and face enhancement. Moreover, facial analysis techniques including face recognition and face alignment can also benefit a lot from the quality improvement brought by FSR. + +FSR is a special case of the task of single image superresolution (SISR) [28, 29, 34, 35, 44], which is a challenging problem since it is highly ill-posed due to the ambiguity of the super-resolved pixels. Compared to SISR, FSR only considers facial images instead of arbitrary scenes. Therefore, the specific facial configuration can be strong prior knowledge for the generation, so that global struc + +tures and local details can be recovered accordingly. Hence FSR methods perform better than SISR on higher upscaling factors (e.g., $8 \times$ ). A number of methods for face superresolution [4, 9, 11, 12, 14, 22, 24, 33, 38] have been proposed recently. Furthermore, the advent of deep learning techniques has greatly boosted the performance of face hallucination because of the powerful generative ability of deep convolutional neural networks (DCNNs). + +Facial priors have been utilized in existing FSR methods. Dense correspondence field is used in [46] to capture the information of face spatial configuration. Facial component heatmaps are predicted in [39] to provide localizations of facial components for improving the SR quality. An end-to-end trained network [5] introduces facial landmark heatmaps and parsing maps simultaneously to boost the recovery performance. However, there are some limitations with such methods. On the one hand, they have difficulty in estimating accurate prior information for the reason that the localization and alignment processes are applied on LR input images or coarse SR images which are of low quality and far from final results. Hence given inexact priors, the guidance for SR may be erroneous. On the other hand, most methods just optimize the recovery and prior prediction as a problem of multi-task learning and incorporate the prior information by a simple concatenation operation. However, such guidance is not direct and clear enough since the structural variations of different components may not be fully captured and exploited. Therefore, more powerful schemes to utilize facial priors should be explored. + +In this paper, we propose a deep iterative collaboration method for face super-resolution to mitigate the above issues. Firstly, we design a new framework including two branches, one for face recovery and the other for landmark estimation. Different from previous methods, we let the face SR and alignment processes facilitate each other progressively. The idea is inspired by the fact that the SR branch can generate high-fidelity face images with the guidance of accurate landmark maps and the alignment branch also benefits a lot from high-quality input images. To achieve this goal, we build a recurrent architecture instead of very deep generative models for SR while designing a recurrent hourglass network for face alignment, rather than conventional stacked hourglass networks [25]. In each recurrent step, previous outputs of each branch are fed into the other branch in the following step, so that both branches collaborate with each other for better performance. Moreover, the feedback schemes implemented in two branches both increase the efficiency of the whole framework. Secondly, we propose a new attentive fusion module to integrate the landmark information instead of the concatenation operation. Specifically, we utilize the estimated landmark maps to generate multiple attention maps, each of which reveals the geometric configuration of one facial key com + +ponent. Benefiting from the component-specific attention mechanism, features for each component can be extracted individually, which can be easily accomplished by group convolutions. Experimental results on two popular benchmark datasets, CelebA [23] and Helen [19], demonstrate the superiority of our method in super-resolving high-quality face images over state-of-the-art FSR methods. + +# 2. Related Work + +Face Super-Resolution: Recently, deep learning based methods have achieved remarkable progress in various computer vision tasks including face super-resolution. Yu et al. [41] introduce a deep discriminative generative network that can super-resolve very low face images. Huang et al. [10] turn to wavelet domain and propose a network that predicts wavelet coefficients of HR images. Besides, Yu et al. [40] embed attributes in the process of face superresolution. Zhang et al. [43] introduce a super-identity loss to measure the identity difference. Some face SR methods also divide the solution into global and local parts. Tuzel et al. [32] design a network that contains two sub-networks: the first one reconstructs face images based on global constraints while the second one enhances local details. Cao et al. [3] propose to use reinforcement learning to specify attended regions and use a local enhancement network for recovery sequentially. + +Since face hallucination is a domain-specific task, facial priors are utilized in some FSR methods. Yu et al. [39] concatenate facial component heatmaps with features in the middle of the network. Chen et al. [5] concatenate facial landmark heatmaps and parsing maps with features. Kim et al. [15] design a facial attention loss based on facial landmark heatmaps and use it to train a progressive generator. Zhu et al. [46] propose a deep bi-network which conducts face hallucination and face correspondence alternatively to refine both processes progressively. However, the architecture of the cascaded framework is redundant and inflexible, restricting the efficiency of the model. Moreover, the lack of ability to estimate accurate dense corresponding fields may also lead to severe distortions. + +Single Image Super-Resolution As a pioneer of using deep networks in single image super-resolution (SISR), Dong et al. [6] propose SRCNN to learn a mapping from bicubic-interpolated images to HR images. Kim et al. [16] propose VDSR by using a 20-layer VGG-net [30] to learn the residual of LR and HR images. Methods mentioned above mainly focus on PSNR and SSIM. Their results are mostly blurry. Recently, perceptual quality of SR images is drawing more and more attention. SRGAN et al. [20] is the first to generate photo-realistic images with the adversarial loss and the perceptual loss [13]. Rad et al. [27] extend the perceptual loss with a targeted perceptual loss. + +Recently, recurrent networks have also been utilized for + +![](images/008b91169d45307c707f773a877a0ceb6643d2dc13c07720cdaf624874eeb93e.jpg) +Figure 2. Overall framework of the proposed deep iterative collaboration method. The architecture is comprised of two branches, a recurrent SR branch and a recurrent alignment branch. Two branches collaborate with each other and obtain better SR images and more accurate landmarks step by step. “ $\odot$ ” and “ $\oplus$ ” denote concatenation and addition respectively. + +SISR. Kim et al. [17] propose DRCN, a deep recursive CNN, and obtain outstanding performance compared to previous work. Tai et al. [31] use residual units to build deep and concise networks with recursive blocks. Zhang et al. [45] follow the idea of DenseNet [8] and design a residual dense block to fuse hierarchical features. Han et al. [7] design a dual-state recurrent network that exploits LR and HR signals jointly. Li et al. [21] introduce a new feedback block where features are iteratively upsampled and downsampled. While recursive networks promote the development of SISR, few methods have employed their generative power in face super-resolution. Hence it remains an attractive direction to exploit the potential ability of recurrent mechanisms for FSR. + +# 3. Approach + +In face super-resolution, we aim to recover the facial details of input LR face images $I^{LR}$ and get the SR results $I^{SR}$ . We design a deep iterative collaboration network which estimates high-quality SR images and landmark maps iteratively and progressively with the input LR images. In order to enhance the collaboration between the SR and alignment processes, we design a novel attentive fusion module that integrates two sources of information effectively. Finally, we apply an adversarial loss to supervise the training of the framework and produce enhanced SR faces with high-fidelity details. + +# 3.1. Deep Iterative Collaboration + +Given an LR face image $I^{LR}$ , facial landmarks are important for the recovery procedure. However, prior estima + +tion via LR faces is unreliable since a lot of details are missing. Such information may provide inaccurate guidance to SR effects. Therefore, our method alleviates this issue by an iterative collaborative scheme as shown in Figure 2. In this framework, face recovery and landmark localization are performed simultaneously and recursively. We can get better SR images by accurate landmark maps as landmarks are estimated more correctly if the input faces have higher quality. Both processes can enhance each other and achieve better performance progressively. Finally, we can get accurate SR results and landmark heatmaps with enough steps. + +The recurrent SR branch $G$ consists of a low-resolution feature extractor $G_{1}$ , a recursive block $G_{R}$ and high-resolution generation layers $G_{2}$ . $G_{R}$ includes an attentive fusion module and a recurrent SR module. Similar to the SR branch, the recurrent alignment branch includes a pre-processing block $A_{1}$ , a recursive hourglass block $A_{R}$ and a post-processing block $A_{2}$ . For the nth step where $n = 1, \dots, N$ , the SR branch recovers SR images $I_{n}^{SR}$ by using the alignment results and the feedback information from the previous step $n - 1$ , denoted as $L_{n - 1}$ and $f_{n - 1}^{GR}$ , respectively. Besides, LR inputs are also important in each step. Hence LR features extracted by $G_{1}$ are also fed into the recursive block. Therefore, the face SR process can be formulated by: + +$$ +f _ {n} ^ {G _ {R}} = G _ {R} \left(G _ {1} \left(I ^ {L R}\right), f _ {n - 1} ^ {G _ {R}}, L _ {n - 1}\right), \tag {1} +$$ + +$$ +I _ {n} ^ {S R} = G _ {2} \left(f _ {n} ^ {G _ {R}}\right) + U \left(I ^ {L R}\right), \tag {2} +$$ + +where $U$ denotes an upsampling operation. Similarly, the face alignment branch utilizes the recurrent features from the previous step $f_{n - 1}^{A_R}$ and the SR features extracted by + +![](images/2b005e79ba4524ea0061e255968a3934e0f667a996baade3a7b0ff550e3935c8.jpg) +Figure 3. The left part illustrates the method to extract attention maps from landmark maps. The right part shows the flowchart of the attentive fusion module. The input feature is expanded by a convolutional layer. Then component-specific features are extracted by a series of group convolutional layers under the guidance of attention maps. We multiply $(\mathbf{\nabla}^{\prime}\otimes)$ the features with the attention maps which are broadcast through the channel dimension. Finally, weighted features are added together to form the output. + +$A_{1}$ from the SR images $I_{n}^{SR}$ as the guidance for estimating landmarks more accurately, as follows: + +$$ +f _ {n} ^ {A _ {R}} = A _ {R} \left(A _ {1} \left(I _ {n} ^ {S R}\right), f _ {n - 1} ^ {A _ {R}}\right), \tag {3} +$$ + +$$ +L _ {n} = A _ {2} \left(f _ {n} ^ {A _ {R}}\right). \tag {4} +$$ + +After $N$ steps, we get $\{I_n^{SR}\}_{n=1}^N$ and $\{L_n\}_{n=1}^N$ where outputs become more satisfactory as $n$ increases. In the beginning, there is no recurrent feature and landmark map from the previous step. Therefore, we use an extra similar SR module which takes only the LR features as input before the first step to get $f_0^{G_R}$ as an initialization for the following steps. Meanwhile, we make $f_0^{A_R} = A_1(I_1^{SR})$ to initialize the face alignment branch. + +For the purpose of achieving more powerful optimization, we impose loss functions to each output of $N$ steps. By this means, the SR and alignment are strengthened in every step and the inaccurate factors are corrected gradually by mutual supervision. Here, the pixel-wise loss functions are defined as follows: + +$$ +\mathcal {L} ^ {\text {P i x e l}} = \mathbb {E} \left[ \frac {1}{N} \sum_ {n = 1} ^ {N} \| I ^ {H R} - I _ {n} ^ {S R} \| _ {2} ^ {2} \right], \tag {5} +$$ + +$$ +\mathcal {L} ^ {\text {A l i g n}} = \mathbb {E} \left[ \frac {1}{N} \sum_ {n = 1} ^ {N} \| L ^ {H R} - L _ {n} \| _ {2} ^ {2} \right], \tag {6} +$$ + +where $\mathcal{L}^{Pixel}$ and $\mathcal{L}^{Align}$ are the loss functions for the face SR and landmark estimation, respectively. $I^{HR}$ and $L^{HR}$ are the ground-truth HR images and landmark heatmaps. We use SR images in the last step as the final outputs, which can be formulated as $I^{SR} = G(I^{LR})$ . + +# 3.2. Attentive Fusion Module + +In existing methods, straight-forward ways of utilizing facial prior knowledge are to concatenate facial priors with + +SR features and treat the whole optimization procedure as a problem of multi-task learning. However, facial structures may not be fully exploited since features of different facial parts are usually extracted by a shared network. Hence the specific structural configuration priors existing in different facial components may be neglected by the networks. Therefore, different facial parts should be recovered separately for better performance. [3] has exploited the global interdependency of facial parts by reinforcement learning. However, the sequential patch reconstruction cannot utilize facial priors explicitly and efficiently, which also limits the specialized generation for different facial components. + +Differently, we achieve the above goals by a new structure-aware attentive fusion module so as to make full use of the guidance of landmarks $L$ . We assume each landmark heatmap has $K$ channels indicating the locations of $K$ landmarks. The landmarks can be grouped into $P$ subsets, belonging to facial components including left eye, right eye, nose, mouth and jawline. Channels in each group are added together to form the heatmap for the corresponding facial component, denoted as $\{C_p\}_{p=1}^P$ and shown in Figure 3. The reason to do so rather than directly fuse the learned landmarks is in two aspects: (1) We explicitly highlight the local structure of each facial parts to perform differential recovery; (2) The number of channels is largely reduced by the grouping process so as to improve the efficiency of the framework. Then we can compute $P$ corresponding attention maps by the softmax function along the channel dimension of these heatmaps, as below: + +$$ +M _ {p} (x, y) = \frac {e ^ {C _ {p} (x , y)}}{\sum_ {j = 1} ^ {P} e ^ {C _ {j} (x , y)}}, \tag {7} +$$ + +where $(x,y)$ represent the spatial coordinates of attention map $M_{p}$ . Instead of using multiple models for different fa + +cial components, we apply group convolutions to generate individual features $f_{p}$ . The flow chart is depicted as Figure 3. In order to make each group of convolutions concentrate on the corresponding parts, we define an attentive fusion as: + +$$ +f _ {F u s i o n} = \sum_ {p = 1} ^ {P} M _ {p} \cdot f _ {p}, \tag {8} +$$ + +where $f_{Fusion}$ denotes the output features of the proposed attentive fusion module. Note that the attentive fusion module is a part of the recurrent SR branch, so that the gradients can be back-propagated to both the SR and alignment branches in a recursive manner. Moreover, the landmark estimation can be supervised by not only the loss imposed on the recurrent alignment branch, but also by the revision of FSR results through the attentive fusion module. + +# 3.3. Objective Functions + +Adversarial Loss: Recently GAN [5, 20, 35] has been successful in generative tasks, and is proven effective in recovering high-fidelity images. Hence we introduce the adversarial loss [20] to generate photo-realistic face images. We build a discriminator $D$ to differentiate the ground-truth and the super-resolved counterparts by minimizing + +$$ +\mathcal {L} ^ {D i s} = - \mathbb {E} [ \log (D (I ^ {H R})) ] - \mathbb {E} [ \log (1 - D (G (I ^ {L R}))) ]. \tag {9} +$$ + +Meanwhile, the generator tries to fool the discriminator and minimizes + +$$ +\mathcal {L} ^ {A d v} = - \mathbb {E} [ \log (D (G (I ^ {L R}))) ]. \tag {10} +$$ + +Perceptual Loss: We also apply a perceptual loss to enhance the perceptual quality of SR images, similar to [5, 20]. We employ a pretrained face recognition model, LightCNN [37] to extract features for images. The loss improves the perceptual similarity by reducing the euclidean distances between the features of SR and HR images, $\phi(I^{SR})$ and $\phi(I^{HR})$ . Hence we define the perceptual loss as: + +$$ +\mathcal {L} ^ {P e r c} = \mathbb {E} \| \phi (I ^ {S R}) - \phi (I ^ {H R}) \| _ {1}. \tag {11} +$$ + +Overall Objective: The generator is optimized by minimizing the following overall objective function: + +$$ +\begin{array}{l} \mathcal {L} ^ {G} = \mathcal {L} ^ {\text {P i x e l}} + \lambda^ {A d v} \cdot \mathcal {L} ^ {A d v} \tag {12} \\ + \lambda^ {P e r c} \cdot \mathcal {L} ^ {P e r c} + \beta^ {A l i g n} \cdot \mathcal {L} ^ {A l i g n}, \\ \end{array} +$$ + +where $\lambda^{Adv}$ and $\lambda^{Perc}$ denote the trade-off parameters for the adversarial loss and the perceptual loss, respectively. Since the recurrent alignment module is optimized as a part of the whole framework, the overall objective also includes this term of loss weighted by $\beta^{Align}$ . For the training of our PSNR-oriented model DIC, we set $\lambda^{Adv} = \lambda^{Perc} = 0$ . Then complete losses are used to obtain the perceptual-pleasing model DICGAN. + +Table 1. Comparison of PSNR and SSIM performance with state-of-the-art FSR methods. The best and second best performance is highlighted in red and blue, respectively. + +
MethodCelebAHelen
PSNRSSIMPSNRSSIM
Bicubic23.580.628523.890.6751
SRResNet [20]25.820.736925.300.7297
URDGN [41]24.630.685124.220.6909
RDN [45]26.130.741225.340.7249
PFSR [15]24.430.699124.730.7323
FSRNet [5]26.480.771825.900.7759
FSRGAN [5]25.060.731124.990.7424
DIC27.370.796226.690.7933
DICGAN26.340.756225.960.7624
+ +# 4. Experiments + +# 4.1. Datasets and Metrics + +We conduct experiments on two widely used face datasets: CelebA [23] and Helen [19]. For both datasets we use OpenFace [1, 2, 42] to detect 68 landmarks as groundtruth. Based on the estimated landmarks, we crop square regions in each image to remove the background and resize them to $128 \times 128$ pixels without any pre-alignment. Then we downsample these HR images into $16 \times 16$ LR inputs with bicubic degradation. For CelebA dataset, we use 168854 images for training and 1000 images for testing. For Helen dataset, we use 2005 images for training and 50 images for testing. + +SR results are evaluated with PSNR and SSIM [36]. They are computed on the Y channel of transformed YCbCr space. We also use face alignment as a metric to measure the accuracy of face recovery. We use a pretrained HourGlass network to detect the face landmarks and use Normalized Root Mean Squared Error (NRMSE) to evaluate landmark estimation results. In our experiment, NRMSE is normalized by the width of the face. + +# 4.2. Implementation Details + +Training Setting The architecture of the recurrent SR module follows the feedback block in [21]. We set the number of groups to 6, the number of steps to 4 and the number of feature channels to 48. For Helen, data augmentation is performed on training images, which are randomly rotated by $90^{\circ}$ , $180^{\circ}$ , $270^{\circ}$ and flipped horizontally. We train the PSNR-oriented model with the pixel loss and the alignment loss weighted by $\beta^{Align} = 0.1$ . For GAN training, we use the pretrained PSNR-oriented parameters as initialization and train the model with $\lambda^{Adv} = 0.005$ and $\lambda^{Perc} = 0.1$ . The model is trained by ADAM optimizer [18] with $\beta_{1} = 0.9$ , $\beta_{2} = 0.999$ and $\epsilon = 10^{-8}$ . The initial learning rate is $1\times 10^{-4}$ and is halved at $1\times 10^{4}$ , $2\times 10^{4}$ , $4\times 10^{4}$ it + +![](images/43a771cdab3c85283a1d89fc863ac72e29c0a0c33b0d015e6b47176f268eb7a3.jpg) +Figure 4. Visual comparison with state-of-the-art FSR methods. Other FSR methods may either produce structural distortions on key facial parts or present undesirable artifacts. Our proposed DIC and DICGAN methods have a significant advantage in handling large pose and rotation variations. The qualitative comparison indicates the proposed method outperforms other FSR methods. Best viewed on screen. + +erations. Our experiments are implemented on Pytorch [26] with NVIDIA RTX 2080Ti GPUs. + +# 4.3. Results and Analysis + +Comparison with the State-of-the-Arts: We compare our proposed DIC method with state-of-the-art FSR methods. Table 1 tabulates the quantitative results on CelebA and Helen. It can be observed that our DIC method achieves the best PSNR and SSIM performance on both datasets. It is noteworthy that DIC outperforms FSRNet by a large margin. Therefore, our method obtains better inference by the progressive collaboration between the SR and alignment processes. Moreover, DICGAN gets comparable performance with FSRNet which is a PSNR-oriented method. This indicates that our DICGAN method is able to preserve pixel-wise accuracy while increasing perceptual quality of + +the super-resolved images. + +We visualize some SR results of different methods as shown in Figure 4. We see that DIC recovers correct details while other methods fail in giving pleasant results. This indicates that our method is able to produce more stable SR results than other methods. Note that our method has a significant advantage in handling large pose and rotation variations. The reason is that the iterative alignment block can predict progressively more accurate landmarks to guide the reconstruction in each step. Therefore our method performs better in preserving facial structures and generating better details even though faces have large pose and rotation. Furthermore, DICGAN produces more realistic textures of images while other methods yield severe artifacts and distortions. Therefore, the qualitative comparison with state-of-the-art face SR methods demonstrates the powerful + +![](images/634c2a07e7d665069c58d7e469f3f89fc1b77e75d3577386413cbe691967096f.jpg) +Bicubic + +![](images/375bde7375ffccfed97628eb726ae34c14d9d26a6faf4aafde49ecc9d6ded261.jpg) +Step 1 + +![](images/f19e6ec470dbeb9f2745aab05dfa1e84ea449e31cfc1c23999522bdd281717b6.jpg) +Step 2 + +![](images/68b92625102d6589b00588a82d2645d9535b7931dc5accd12807aa6188d0dd6b.jpg) +PSNR/SSIM NRMSE +HR +PSNR/SSIM NRMSE + +![](images/9e49604dda30b2e7fc65896ed969a6d36ddaad30a7d6fa597618cca1aa9768ed.jpg) +24.73/0.7605 0.0265 +Step 3 +28.32/0.8782 0.0204 + +![](images/7ed998f1e53f2e3402b57fbd55de9b5f828417886b65339bac74a2bbbcdbe26a.jpg) +27.94/0.8667 0.0211 +Step 4 +28.32/0.8791 0.0194 + +![](images/ca20c8f60d4c069395cd774253222c9c8f0c16cffab1c467a3cc69976c553012.jpg) +Bicubic + +![](images/d7c9e823b44037914c4f92255f516f8664c3780bba6bc58e37478e7278db6d21.jpg) +Step 1 + +![](images/cb6b1fe3660f0c1c538d14950d43fea1937559d71ef334d21fb3c05f7575fcef.jpg) +Step 2 + +![](images/9148aa48f469be851f3b809648ca764ac17937ed00faa871658b6a788f55924b.jpg) +PSNR/SSIM NRMSE +HR +PSNR/SSIM +NRMSE +Figure 5. Visual comparison of different steps. With the iterative collaboration, visual quality and quantitative measurement both get better progressively. + +![](images/21264824a54604eee6fa8cae2b753a19262f0d9fb2d4ac3daa5ceb47cb97f2c4.jpg) +26.35/0.7690 +0.0293 +Step 3 +27.90/0.8316 +0.0260 + +![](images/7021cf90c6c21be2b44d4851516029dfcf5cd93231927f282e6e992f71fcdcbb.jpg) +27.38/0.8212 +0.0266 +Step 4 +28.07/0.8350 +0.0249 + +generative ability of our methods. + +Similar to [5], we conduct face alignment as a measurement to evaluate the quality of the super-resolved images. We adopt a pretrained face alignment model with four stacked hourglass modules [25]. The alignment accuracy is reflected by a widely used metric NRMSE. Lower NRMSE values reveal better alignment accuracy and higher quality of SR images. Table 2 shows the NRMSE values of our methods and other compared SR methods. We can see our DICGAN method outperforms other methods on both datasets. While other SR methods also use facial priors such as landmarks and component maps, the prior information is estimated from the input LR face images or coarsely recovered ones where facial structures are severely unclear and degraded. Hence such facial priors can provide limited guidance to the reconstruction procedure. Consequently, recovered images may also contain corresponding structural incorrectness. Differently, our method revises the landmark estimation in every step for providing more accurate auxil- + +Table 2. Comparison of NRMSE performance with state-of-the-art FSR methods. The best and second best performance is highlighted in red and blue, respectively + +
MethodCelebAHelen
Bicubic0.33850.4577
RDN [45]0.14150.4437
PFSR [15]0.19170.3498
FSRNet [5]0.14300.3723
FSRGAN [5]0.14630.3408
DIC0.13200.3674
DICGAN0.13190.3336
+ +Table 3. Quantitative comparison of different steps on CelebA. The best results are highlighted. + +
MetricStep 1Step 2Step 3Step 4
PSNR24.4125.7126.3026.34
SSIM0.66880.71800.75210.7561
NRMSE0.03220.03060.02850.0273
+ +Table 4. Quantitative comparison of different steps on Helen. The best results are highlighted. + +
MetricStep 1Step 2Step 3Step 4
PSNR24.8825.4525.9625.96
SSIM0.70940.73320.75870.7624
NRMSE0.10570.08540.08370.0520
+ +iary information to the SR branch. Meanwhile, the attentive fusion module can integrate the prior guidance effectively to boost the final performance. + +User Study: We also conduct a user study as a subjective assessment to further evaluate our SR quality compared to previous face SR methods. Details are described in the supplementary material. + +Study of Iterative Learning: To better show the merits of the proposed scheme of iterative collaboration, we also evaluate the quality of the SR outputs. As mentioned above, we use PSNR, SSIM and NRMSE as measurement metrics. Differently, in this experiment, NRMSE is computed by the landmarks estimated by the alignment branch in the corresponding steps. The performance on CelebA and Helen is presented in Table 3 and Table 4, respectively. We can see from step 1 to step 4, the performance gets better progressively. It is noteworthy that the NRMSE values in Table 3 and Table 4 are much lower than those in Table 2. In fact, in our alignment branch, the parameters are much fewer than the stacked hourglass model which is used to estimate landmarks in Table 2. The reason why our model gets more accurate alignment results with fewer parameters is that our model can learn to capture face structures in different-level super-resolved images. Due to this ability, our model can provide relatively accurate landmarks in each step for better collaboration. Therefore, the comparison proves that our + +method is able to achieve progressively better SR quality and landmark estimation simultaneously. + +Furthermore, visual comparison of different steps are shown in Figure 5. The results show the generation of facial components are improved step by step. In the last step, our model obtains geometric-pleasing and high-fidelity SR images. From the PSNR, SSIM and NRMSE values in each step, we can also see the consistent improvement of our scheme of iterative collaboration. Moreover, from Table 3, Table 4 and Figure 5, three steps may be a suitable choice for good enough recovery and efficient computation. + +Effects of Attentive Fusion: We implement another experiment to better investigate the effectiveness of our proposed attentive fusion module. Since we use group convolution layers to extract specialized representations for different facial parts, we only remain the representation of one part and visualize the SR results as shown in Figure 6. For a certain component, we remove features of the other components by setting the corresponding attention maps to 0. By this means, the final outputs only contain accurate information for one facial component. From Figure 6, we can indeed see different parts can be recovered separately by the representations. The results demonstrate the advantages of the proposed attentive fusion module, which can explicitly guide the component-specialized generation in an efficient and flexible way. + +Ablation Study: We further implement an ablation study to measure the effectiveness of the iterative collaboration framework and the attentive fusion module. On the one hand, in order to validate the effects of facial priors, we remove the alignment branch and the attentive fusion module. This model is called DIC-NL, which is equivalent to a recurrent network for single image super-resolution without the prior information of landmark maps. On the other hand, we remove the attentive fusion module and concatenate landmarks (CL) to evaluate the effects of the proposed fusion module quantitatively. This model is denoted as DIC-CL. PSNR and SSIM performance on the dataset of CelebA is presented in Table 5. From the table we can see when the SR network loses the guidance provided by face landmarks, SR quality is degraded severely since its ability to capture facial structural configuration is weakened. Moreover, DIC-CL has an advantage over DIC-NL since it incorporates the prior information by concatenation. A large enhancement can also be observed due to the integration. However, the SR performance of DIC-CL is still far from that of the DIC method. The reason is that concatenating landmark maps is an implicit knowledge to face SR and is limited in providing adequate guidance. Differently, our DIC method not only integrates the structural knowledge, but also explicitly induces the component-specialized feature extraction for more photo-realistic SR images. Hence the results prove the superiority of the proposed method. + +![](images/67850272a795741056fcb30f2e2bad8793295312d00f5a269002954a00f5c4b8.jpg) + +![](images/a48439e23b8c511efb837cde07bd01e9108f16a5a6812d7a9aa6ed500a5e0e18.jpg) + +![](images/22d02f8df23e36ffd0aecce498876ef64a051220c4b03e722b76f2f95235d99d.jpg) + +![](images/58bc56033342156236683f852de22ef47a2fa61b1db99919fdaa8d29f9ce73fe.jpg) + +![](images/1799589fddda558cb978d93217492db1deeb492c64e38f8db23ba9269bdd7741.jpg) + +![](images/b586ec872be0c040e39f01cff05c7ade4c55051dc3951cced7d843fbc58f9d6f.jpg) +left eye attention +left eye image +Figure 6. Visual effects of the proposed attentive fusion module. The first row displays the attention maps and the ground-truth image. The second row presents the SR outputs recovered by the features of the corresponding facial components. The component-specialized generation demonstrates the effectiveness of the proposed attentive fusion module. + +![](images/3d720075e71f33e27a7188a8165dbced9f8f6e30dbdfa5520fb105a9d1a3c1ca.jpg) +right eye attention +right eye image + +![](images/26f1eae96bcba8cdd5fa433abf2271d5c28afe9e0a14503d5a40c27dd12aed85.jpg) +nose attention +nose image + +![](images/32087ff17dbba37fd14f873f6504a4f343aee2d0e784d9a99235cb7750f8a532.jpg) +mouth attention +mouth image + +![](images/b0681e20391659f280d8c3cd58c49cff9eed10ff13d59b48cdd4ff0540dfa7e5.jpg) +HR +SR + +Table 5. Quantitative comparison of different models. The best results are highlighted. (NL: no landmarks, CL: concatenated landmarks.) + +
MethodPSNRSSIM
DIC-NL26.310.7526
DIC-CL26.930.7811
DIC27.370.7962
+ +# 5. Conclusion + +In this paper, we have proposed a deep iterative collaboration network for face super-resolution. Specifically, a recurrent SR branch collaborates with a recurrent alignment branch to recover high-quality face SR images iteratively and progressively. In each step, the SR process utilizes the estimated landmarks from the alignment branch to produce better face images which are important for the alignment branch to estimate more accurate landmarks. Furthermore, we have proposed a new attentive fusion module to exploit attention maps and extract individual features for each facial component according to the estimated landmarks. Quantitative and qualitative results of face SR on two widely-used benchmark datasets have demonstrated the effectiveness of the proposed method. + +# Acknowledgement + +This work was supported in part by the National Key Research and Development Program of China under Grant 2017YFA0700802, in part by the National Natural Science Foundation of China under Grant 61822603, Grant U1813218, Grant U1713214, and Grant 61672306, in part by the Shenzhen Fundamental Research Fund (Subject Arrangement) under Grant JCYJ20170412170602564, and in part by Tsinghua University Initiative Scientific Research Program. + +# References + +[1] Tadas Baltrusaitis, Peter Robinson, and Louis-Philippe Morency. Constrained local neural fields for robust facial landmark detection in the wild. In ICCVW, pages 354–361, 2013. 5 +[2] Tadas Baltrusaitis, Amir Zadeh, Yao Chong Lim, and Louis-Philippe Morency. Openface 2.0: Facial behavior analysis toolkit. In FG, pages 59–66. IEEE, 2018. 5 +[3] Qingxing Cao, Liang Lin, Yukai Shi, Xiaodan Liang, and Guanbin Li. Attention-aware face hallucination via deep reinforcement learning. In CVPR, pages 690-698, 2017. 2, 4 +[4] Ayan Chakrabarti, AN Rajagopalan, and Rama Chellappa. Super-resolution of face images using kernel pca-based prior. TMM, 9(4):888-892, 2007. 2 +[5] Yu Chen, Ying Tai, Xiaoming Liu, Chunhua Shen, and Jian Yang. Fsrnet: End-to-end learning face super-resolution with facial priors. In CVPR, pages 2492-2501, 2018. 2, 5, 6, 7 +[6] Chao Dong, Chen Change Loy, Kaiming He, and Xiaou Tang. Learning a deep convolutional network for image super-resolution. In ECCV, pages 184-199. Springer, 2014. 2 +[7] Wei Han, Shiyu Chang, Ding Liu, Mo Yu, Michael Witbrock, and Thomas S Huang. Image super-resolution via dual-state recurrent networks. In CVPR, pages 1654-1663, 2018. 3 +[8] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, pages 4700-4708, 2017. 3 +[9] Hua Huang, Huiting He, Xin Fan, and Junping Zhang. Super-resolution of human face image using canonical correlation analysis. PR, 43(7):2532-2543, 2010. 2 +[10] Huaibo Huang, Ran He, Zhenan Sun, and Tieniu Tan. Wavelet-srnet: A wavelet-based cnn for multi-scale face super resolution. In ICCV, pages 1689-1697, 2017. 2 +[11] Kui Jia and Shaogang Gong. Generalized face superresolution. TIP, 17(6):873-886, 2008. 2 +[12] Junjun Jiang, Ruimin Hu, Zhongyuan Wang, and Zhen Han. Face super-resolution via multilayer locality-constrained iterative neighbor embedding and intermediate dictionary learning. TIP, 23(10):4220-4231, 2014. 2 +[13] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In ECCV, pages 694–711. Springer, 2016. 2 +[14] Cheolkon Jung, Licheng Jiao, Bing Liu, and Maoguo Gong. Position-patch based face hallucination using convex optimization. SPL, 18(6):367-370, 2011. 2 +[15] Deokyun Kim, Minseon Kim, Gihyun Kwon, and Dae-Shik Kim. Progressive face super-resolution via attention to facial landmark. arXiv preprint arXiv:1908.08239, 2019. 2, 5, 6, 7 +[16] Jiwon Kim, Jung Kwon Lee, and Kyoung Mu Lee. Accurate image super-resolution using very deep convolutional networks. In CVPR, pages 1646-1654, 2016. 2 +[17] Jiwon Kim, Jung Kwon Lee, and Kyoung Mu Lee. Deeply recursive convolutional network for image super-resolution. In CVPR, pages 1637-1645, 2016. 3 +[18] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.5 +[19] Vuong Le, Jonathan Brandt, Zhe Lin, Lubomir Bourdev, and + +Thomas S Huang. Interactive facial feature localization. In ECCV, pages 679-692. Springer, 2012. 2, 5 +[20] Christian Ledig, Lucas Theis, Ferenc Huszár, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, et al. Photorealistic single image super-resolution using a generative adversarial network. In CVPR, pages 4681-4690, 2017. 2, 5 +[21] Zhen Li, Jinglei Yang, Zheng Liu, Xiaomin Yang, Gwanggil Jeon, and Wei Wu. Feedback network for image superresolution. In CVPR, pages 3867-3876, 2019. 3, 5 +[22] Ce Liu, Heung-Yeung Shum, and William T Freeman. Face hallucination: Theory and practice. *IJCV*, 75(1):115–134, 2007. 2 +[23] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep learning face attributes in the wild. In ICCV, pages 3730-3738, 2015. 2, 5 +[24] Xiang Ma, Junping Zhang, and Chun Qi. Hallucinating face by position-patch. PR, 43(6):2224-2236, 2010. 2 +[25] Alejandro Newell, Kaiyu Yang, and Jia Deng. Stacked hourglass networks for human pose estimation. In ECCV, pages 483-499. Springer, 2016. 2, 7 +[26] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017. 6 +[27] Mohammad Saeed Rad, Behzad Bozorgtabar, Urs-Viktor Marti, Max Basler, Hazim Kemal Ekenel, and Jean-Philippe Thiran. Srobb: Targeted perceptual loss for single image super-resolution. In ICCV, pages 2710–2719, 2019. 2 +[28] Mehdi SM, Sajjadi, Bernhard Scholkopf, and Michael Hirsch. Enhancenet: Single image super-resolution through automated texture synthesis. In ICCV, pages 4491-4500, 2017. 1 +[29] Wenzhe Shi, Jose Caballero, Ferenc Huszár, Johannes Totz, Andrew P Aitken, Rob Bishop, Daniel Rueckert, and Zehan Wang. Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network. In CVPR, pages 1874-1883, 2016. 1 +[30] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 2 +[31] Ying Tai, Jian Yang, and Xiaoming Liu. Image superresolution via deep recursive residual network. In CVPR, pages 3147-3155, 2017. 3 +[32] Oncel Tuzel, Yuichi Taguchi, and John R Hershey. Global-local face upsampling network. arXiv preprint arXiv:1603.07235, 2016. 2 +[33] Nannan Wang, Dacheng Tao, Xinbo Gao, Xuelong Li, and Jie Li. A comprehensive survey to face hallucination. IJCV, 106(1):9-30, 2014. 2 +[34] Xintao Wang, Ke Yu, Chao Dong, and Chen Change Loy. Recovering realistic texture in image super-resolution by deep spatial feature transform. In CVPR, pages 606-615, 2018. 1 +[35] Xintao Wang, Ke Yu, Shixiang Wu, Jinjin Gu, Yihao Liu, Chao Dong, Yu Qiao, and Chen Change Loy. Esrgan: Enhanced super-resolution generative adversarial networks. In ECCV, pages 63-79. Springer, 2018. 1, 5 +[36] Zhou Wang, Alan C Bovik, Hamid R Sheikh, Eero P Simon + +celli, et al. Image quality assessment: from error visibility to structural similarity. TIP, 13(4):600-612, 2004. 5 +[37] Xiang Wu, Ran He, Zhenan Sun, and Tieniu Tan. A light cnn for deep face representation with noisy labels. TIFS, 13(11):2884-2896, 2018. 5 +[38] Chih-Yuan Yang, Sifei Liu, and Ming-Hsuan Yang. Structured face hallucination. In CVPR, pages 1099-1106, 2013. 2 +[39] Xin Yu, Basura Fernando, Bernard Ghanem, Fatih Porikli, and Richard Hartley. Face super-resolution guided by facial component heatmaps. In ECCV, pages 217-233, 2018. 2 +[40] Xin Yu, Basura Fernando, Richard Hartley, and Fatih Porikli. Super-resolving very low-resolution face images with supplementary attributes. In CVPR, pages 908-917, 2018. 2 +[41] Xin Yu and Fatih Porikli. Ultra-resolving face images by discriminative generative networks. In ECCV, pages 318-333. Springer, 2016. 2, 5 +[42] Amir Zadeh, Yao Chong Lim, Tadas Baltrusaitis, and Louis-Philippe Morency. Convolutional experts constrained local model for 3d facial landmark detection. In ICCV, pages 2519–2528, 2017. 5 +[43] Kaipeng Zhang, Zhanpeng Zhang, Chia-Wen Cheng, Winston H Hsu, Yu Qiao, Wei Liu, and Tong Zhang. Superidentity convolutional neural network for face hallucination. In ECCV, pages 183-198, 2018. 2 +[44] Yulun Zhang, Kunpeng Li, Kai Li, Lichen Wang, Bineng Zhong, and Yun Fu. Image super-resolution using very deep residual channel attention networks. In ECCV, pages 286-301, 2018. 1 +[45] Yulun Zhang, Yapeng Tian, Yu Kong, Bineng Zhong, and Yun Fu. Residual dense network for image super-resolution. In CVPR, pages 2472-2481, 2018. 3, 5, 6, 7 +[46] Shizhan Zhu, Sifei Liu, Chen Change Loy, and Xiaou Tang. Deep cascaded bi-network for face hallucination. In ECCV, pages 614-630. Springer, 2016. 2 \ No newline at end of file diff --git a/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/images.zip b/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..262bc4a1e8a2a3f5ab7fc896f09b1e97ba07397e --- /dev/null +++ b/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0436084ac46e3291d4d5832822fcf7732bdecbd160188bcdc7459a48badcaefd +size 663113 diff --git a/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/layout.json b/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6e139ed11d7b0f1ca9926e1d6f6d336ea5a41ab0 --- /dev/null +++ b/deepfacesuperresolutionwithiterativecollaborationbetweenattentiverecoveryandlandmarkestimation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45ea0fb67b74d381277c677c32e073419de585a255d5015447c98844fc5addbc +size 420485 diff --git a/deepfacialnonrigidmultiviewstereo/0b92c918-72b3-4cf4-b8d5-c38f1d4bc597_content_list.json b/deepfacialnonrigidmultiviewstereo/0b92c918-72b3-4cf4-b8d5-c38f1d4bc597_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..58b0e7bb1d41560f3bdc37fc0185126bb50f2307 --- /dev/null +++ b/deepfacialnonrigidmultiviewstereo/0b92c918-72b3-4cf4-b8d5-c38f1d4bc597_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eaabd37aaf6b72fb4145413fae7e1a9106b73a55c43396b4d434a3e5f4e42d30 +size 84610 diff --git a/deepfacialnonrigidmultiviewstereo/0b92c918-72b3-4cf4-b8d5-c38f1d4bc597_model.json b/deepfacialnonrigidmultiviewstereo/0b92c918-72b3-4cf4-b8d5-c38f1d4bc597_model.json new file mode 100644 index 0000000000000000000000000000000000000000..f44df69b79ab25d8fdb44f551dc8e07de9268c5f --- /dev/null +++ b/deepfacialnonrigidmultiviewstereo/0b92c918-72b3-4cf4-b8d5-c38f1d4bc597_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41113c9056b6d60119b95a2fb275ced70d97c3860277f9e3cb972732ed7595c2 +size 105126 diff --git a/deepfacialnonrigidmultiviewstereo/0b92c918-72b3-4cf4-b8d5-c38f1d4bc597_origin.pdf b/deepfacialnonrigidmultiviewstereo/0b92c918-72b3-4cf4-b8d5-c38f1d4bc597_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ccb1fdaa241dd63c6818b203df4b8ee7ca3788ec --- /dev/null +++ b/deepfacialnonrigidmultiviewstereo/0b92c918-72b3-4cf4-b8d5-c38f1d4bc597_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7cc197165debc8b23a263cb62043f5ae88552b7cbc39509d10ad2374c309bb3d +size 3000839 diff --git a/deepfacialnonrigidmultiviewstereo/full.md b/deepfacialnonrigidmultiviewstereo/full.md new file mode 100644 index 0000000000000000000000000000000000000000..003ef65bd09e4dc24a1a619c15c83c8c0e11e0f1 --- /dev/null +++ b/deepfacialnonrigidmultiviewstereo/full.md @@ -0,0 +1,381 @@ +# Deep Facial Non-Rigid Multi-View Stereo + +Ziqian Bai1 Zhaopeng Cui2 Jamal Ahmed Rahim1 Xiaoming Liu3 Ping Tan1 +1 Simon Fraser University ETH Zürich Michigan State University + +{ziqianb, jrahim, pingtan}@sfu.ca, zhpcui@gmail.com, liuxm@cse.msu.edu + +# Abstract + +We present a method for 3D face reconstruction from multi-view images with different expressions. We formulate this problem from the perspective of non-rigid multi-view stereo (NRMVS). Unlike previous learning-based methods, which often regress the face shape directly, our method optimizes the 3D face shape by explicitly enforcing multi-view appearance consistency, which is known to be effective in recovering shape details according to conventional multi-view stereo methods. Furthermore, by estimating face shape through optimization based on multi-view consistency, our method can potentially have better generalization to unseen data. However, this optimization is challenging since each input image has a different expression. We facilitate it with a CNN network that learns to regularize the non-rigid 3D face according to the input image and preliminary optimization results. Extensive experiments show that our method achieves the state-of-the-art performance on various datasets and generalizes well to in-the-wild data. + +# 1. Introduction + +3D face reconstruction from images has been extensively studied in computer vision and graphics due to its wide range of applications in face recognition, entertainment, and medical analysis. Multi-view approaches have been one of the typical choices for high-end products of face reconstruction. With the images captured under well calibrated multi-view systems like camera arrays, faithful 3D geometry can be recovered with algorithms leveraging multi-view geometric constraints [5, 10]. However, this class of methods heavily relies on synchronized multi-view data which could be expensive, or sometimes even impossible, to acquire due to either the bulky equipment setup or the static face assumption. This drawback severely limits the possible application realms, especially in daily entertainment and communication. To handle this limitation, non-rigid multi-view approaches, i.e., Non-Rigid Structure-from-Motion (NRSfM), are proposed to leverage multiview geometry constraints for reconstructing deformable + +![](images/df4fcc034dcbb25475b6ee3d29da08bf80c8597334a5e8a2863c0c8a27e5bd91.jpg) + +![](images/53626fe2ff6936c8a3eb78445a27e565797bcac636ab5d03d54beb92af89e674.jpg) + +![](images/5ff4691e6426ac5ee7edce8aab4c854901e4fdc8be267233dd019a09d17acbad.jpg) + +![](images/10c0a33d459432297f088d9600b30e6afe6281d03a95f47327066b0c3070bd3e.jpg) +Inputs +Optimization +Figure 1: We present Deep Facial Non-Rigid Multi-View Stereo (DFNRMVS) to recover high-quality 3D models from multiple images of dynamic faces through multi-view optimization. From left to right are input images, initial 3D models, and 3D models after three-level optimization. Our DFNRMVS can gradually improves 3D models. + +subjects, e.g., faces with expression changes. However, the majority of works in this category only deal with sparse feature points [15, 31, 65]. Recently, dense approaches have been proposed [22, 33, 34], but usually contain complex modeling of geometry and rarely utilize data-driven priors. + +With recent progress on deep learning, many face reconstruction methods are proposed to directly learn the image-to-parameter or image-to-geometry mapping purely from training data (i.e. regression), which makes their models data hungry. As a result, they normally resort to synthetic data [42], pre-computed 3DMM fitting [56, 64], or self-supervised learning [25, 49], which harms either the generalization or the reconstruction accuracy. + +In this paper, we introduce the Deep Facial Non-Rigid Multi-View Stereo (DFNRMVS), which is the first end-to-end trainable network learning non-rigid multi-view stereo reconstruction for faces. This is achieved by first for + +mulating the dynamic face reconstruction task as a Non-Rigid Multi-View Stereo (NRMVS) optimization, which optimizes the 3D face shape by explicitly enforcing multiview appearance consistency. Then, deep learning components are injected into this optimization pipeline to alleviate the problem difficulty with data-driven priors. Different from all previous NRSfM as well as learning-based face reconstruction methods, our model learns the process of parameter optimization explicitly in the network. It not only reduces the burden of the network and leads to better reconstructions, but also increases the generalization ability of our model, since the optimization brings in the domain knowledge of multi-view geometry. As a result, our model can be trained on limited but informative 3D scans to boost the performance while generalizing well to different 3D scan datasets and even to in-the-wild images. + +To better regularize the ill-posed non-rigid setup as well as deal with the limited representation power of 3DMM, we also propose to learn an adaptive face model, which generates additive shape bases according to input images and preliminary optimization results. Comparing to generic face model, this additional information helps to customize the solution space case-by-case, making it more suitable for the optimization to produce better reconstructions. Our DFN-RMVS achieves the state-of-the-art performance on various datasets with good generalization to the data in the wild. The code is available at https://github.com/zqbaijeremy/DFNRMVS. + +# 2. Related Work + +Geometry-based methods. Geometry-based methods reconstruct the 3D face model based on multi-view stereo (MVS) [20] and photometric stereo [59]. Beeler et al. [5] proposed a stereo system to capture the 3D face geometry using seven cameras under standard light sources. Bradley et al. [10] presented a facial capture approach using a camera array which was able to reconstruct high resolution time-varying face meshes at 30 frames per second. These pure passive methods normally have poor reconstruction quality in the textureless regions as the stereo methods heavily rely on the feature matching. Many methods [26,30,44] also use the photometric stereo [59] for face reconstruction. Given the images captured under different illuminations, the surface normal is estimated first and then the 3D mesh is recovered through normal integration. These methods normally suffer from the convex/concave ambiguity. Approaches [21, 27] have been proposed to utilize the best of both worlds, where MVS recovers the base shape and photometric stereo recovers fine details. One major drawback of all mentioned methods is that they require either the images are synchronized or the subject is static during data capturing, which limits the applicable scenarios. + +To address this problem, Non-Rigid Structure-from- + +Motion (NRSfM) has proposed to reconstruct objects with non-rigid deformations, such as face with different expressions. Bregler et al. [11] proposed to use linear subspace of low rank to represent the non-rigid 3D shape. Dai et al. [15] proved that the ill-posedness of NRSfM can be solved by only the low rank assumption, which was extended to temporal domain [3, 19]. More recently, progresses have also been made for methods based on union-of-subspace [2,65], sparse prior [31], and deep learning [32]. However, this set of methods mainly focus on sparse points. Very recently, dense NRSfM becomes possible with variational approach [22], and Grassmann manifold [33, 34]. However, these methods rarely utilize the strong capability of data-driven priors captured by deep learning. + +Different from all previous dense non-rigid methods, our method injects deep learning techniques into the reconstruction pipeline to alleviate the difficulty of the problem via priors learned from informative ground truth. + +Learning-based methods. The data-driven prior of facial geometry is also exploited for face reconstruction from images. 3D Morphable Model (3DMM) [7] is a classic example, which is widely used to parameterize the shapes of human faces. Given input images, the optimal 3DMM parameters that fit the input are usually estimated by analysis-by-synthesis optimization [6, 43, 52]. As the optimization depends on the initialization, these methods are not quite robust in practice. Moreover, these methods are limited by the representation power of 3DMM. So extensive facial databases have been published recently to deal with complex expressions [8, 28, 35, 58, 62]. More recent works take a step further to also recover medium- and fine-scale details via corrective basis [9, 24] and Shape-from-Shading [23]. However, their models are usually computationally expensive due to the large amount of parameters to be optimized. + +With the recent advances of deep learning, many methods are proposed for monocular face reconstruction. Various networks are designed to regress parameters of face models or 3D geometry with supervision from synthetic data [25, 42, 47], pre-computed 3DMM fitting [17, 56], RGB images [16, 50, 51, 54, 55], and identity labels [45]. To handle complex face geometry more flexibly, methods [13, 53, 57] regress the geometric residuals to recover fine-scale details. However, these methods mainly focus on single-view reconstruction. Only very recently, multiple images based methods are proposed [49, 60]. + +Different from prior learning-based multi-view methods, where reconstruction is generally formulated as regression, our method explicitly incorporates multi-view geometric constraints inside the learning framework via end-to-end trainable optimization. Thus, our model is a novel fusion of geometry- and learning-aspects leveraging the best of both worlds: the quality and generalization of geometry-based methods and the robustness of learning-based methods. + +![](images/415a4602cdbf94fd398990f429f2182a617a4dc0dc8bcb948dfda27c26284b76.jpg) +Figure 2: An overall of our method including (1) Non-Rigid Multi-View Stereo (NRMVS) optimization (Sec. 3.1, Sec. 3.2); (2) Adaptive Face Model (Sec. 3.3); (3) Multi-level reconstruction scheme (Sec. 3.4); and (4) Training losses (Sec. 3.5). + +# 3. Proposed Method + +Given multiple facial images, we aim to design a deep neural network to generate detailed 3D face models by exploiting the multi-view appearance consistency explicitly in the network. As shown in Fig. 2, our framework mainly consists of three modules: feature extraction, adaptive face model generation, and non-rigid multi-view stereo optimization. We will first present the non-rigid multi-view stereo optimization (Sec. 3.1) and explain how this optimization is integrated with deep learning through a learnable objective and solver (Sec. 3.2). Then we will introduce the adaptive face model generation (Sec. 3.3). Finally, we present our multi-level reconstruction scheme (Sec. 3.4) and training losses (Sec. 3.5). + +# 3.1. Non-Rigid Multi-View Stereo + +Given a set of $M$ facial images $\{\mathbf{I}_i\}_{i=1}^M$ capturing the same person but under different expressions and views, the estimation of 3D facial geometry $\mathbf{V}_i$ and 6 DoF rigid head pose $\mathbf{p}_i$ for each image can be formulated as a Non-Rigid Multi-View Stereo (NRMVS) optimization by minimizing the appearance-consistency error and landmark fitting error. + +Parameterization. For head pose $\mathbf{p}$ , we parameterize it with $\mathbf{p} = (s, \mathbf{R}, t)$ under the weak perspective camera model assumption, where $s$ is a scale factor, $\mathbf{R} \in SO(3)$ is the rotation matrix, and $\mathbf{t} \in \mathbb{R}^2$ is the 2D translation on the image plane. Thus, the projection $\Pi: \mathbb{R}^3 \to \mathbb{R}^2$ map + +ping a 3D point $\mathbf{v} \in \mathbb{R}^3$ to the image plane is, + +$$ +\boldsymbol {\Pi} (\mathbf {v}) = \left[ \begin{array}{l l l} s & 0 & 0 \\ 0 & s & 0 \end{array} \right] \mathbf {R} \mathbf {v} + \mathbf {t}. \tag {1} +$$ + +Similar to linear 3DMM [7], we parameterize the face shape as $\mathbf{V} = f(\mathbf{x})$ , where the generator function $f(\mathbf{x})$ maps the low-dimensional parameter vector $\mathbf{x} \in \mathbb{R}^K$ to the vector comprising 3D coordinates of all $N$ vertices, $\mathbf{V} \in \mathbb{R}^{3N}$ . Therefore, the parameters of the non-rigid multi-view stereo optimization can be represented as $\mathbf{X} = (s, \mathbf{R}, t, \mathbf{x})$ . + +Objective Function. The objective function of our non-rigid multi-view stereo optimization is as the following, + +$$ +\mathbf {E} = \lambda_ {a} \mathbf {E} _ {a} + \lambda_ {l} \mathbf {E} _ {l}, \tag {2} +$$ + +where $\mathbf{E}_a$ is the appearance consistency error across views, and $\mathbf{E}_l$ is the facial landmarks alignment error. $\lambda_{a}$ and $\lambda_l$ balance the importance of two objectives. + +For appearance consistency $\mathbf{E}_a$ , a naive option is to use image intensity difference as the consistency metric. For each view $i$ , we project the current reconstruction $(\mathbf{V}_i, \mathbf{p}_i)$ onto the image $\mathbf{I}_i$ by Eq. (1), and sample the intensity via bilinear interpolation. As a result, each vertex will have an intensity value $I(\mathbf{v}_i)$ . Then, for each pair of views $(i,j)$ where $i \neq j$ , we compute the intensity difference of corresponding vertices and average across all vertices and views. To sum up, we have + +$$ +\mathbf {E} _ {a} = \frac {2}{M (M - 1)} \sum_ {i \neq j} \frac {1}{N} \sum_ {k = 1} ^ {N} \| I \left(\mathbf {v} _ {i} ^ {k}\right) - I \left(\mathbf {v} _ {j} ^ {k}\right) \| _ {2} ^ {2}, \tag {3} +$$ + +![](images/50b63001039b08ff89dbbde2c194d2bca8903b0c4e50edd8eeba074ad01d5ae4.jpg) +Figure 3: Overview of one iteration of the NRMVS optimization described in Sec. 3.1 and Sec. 3.2. + +where $\mathbf{v}_i^k (\mathbf{v}_j^k)$ denotes the $k$ -th vertex of view $i$ (view $j$ ). We also take vertex visibility into account and approximate it by backface culling as in [50]. + +In terms of landmark alignment $\mathbf{E}_l$ , we adopt a similar objective as Tewari et al. [49, 50], which takes sliding landmarks on the face contour into account. Given the 68 detected landmarks $\{\mathbf{u}_i^k\}_{k=1}^{68}$ on each image $\mathbf{I}_i$ via an off-the-shell method [12], the objective reads as: + +$$ +\mathbf {E} _ {l} = \frac {1}{M} \sum_ {i = 1} ^ {M} \frac {1}{6 8} \sum_ {k = 1} ^ {6 8} \left\| \mathbf {u} _ {i} ^ {k} - \boldsymbol {\Pi} \left(\mathbf {v} _ {i} ^ {\mathbf {u} ^ {k}}\right) \right\| _ {2} ^ {2}, \tag {4} +$$ + +where $\mathbf{v}_i^{\mathbf{u}^k}$ denotes the mesh vertex corresponding to $k$ -th landmark for view (or image) $i$ . + +Optimization Solver. Due to the differentiability, the objective $\mathbf{E}$ can be minimized by gradient based solvers. For simplicity, we choose the first order optimization solver (i.e., gradient descent). The reconstruction parameters can be updated iteratively by + +$$ +\mathbf {X} \leftarrow \mathbf {X} + \alpha \nabla_ {\mathbf {X}} \mathbf {E} (\mathbf {X}), \tag {5} +$$ + +where $\alpha$ is the step size. + +# 3.2. Learnable Objective and Solver + +Directly solving the proposed NRMVS optimization (Sec. 3.1) could be extremely difficult due to the highly nonconvex intensity space. Inspired by recent works on rigid 3D reconstruction [48, 61] and motion estimation [38], we inject deep learning from two aspects to alleviate the difficulty: (1) more robust objective; (2) more flexible solver. + +Feature-metric Appearance Objective. We replace the raw images $\{\mathbf{I}_i\}_{i=1}^M$ with feature maps $\{\mathbf{F}_i\}_{i=1}^M$ extracted by a Feature Pyramid Network (FPN) [36] $\mathcal{F}_{fpn}$ shown in Fig. 2 when computing the appearance consistency $\mathbf{E}_a$ . Thus, the objective (3) becomes: + +$$ +\mathbf {E} _ {a} = \frac {2}{M (M - 1)} \sum_ {i \neq j} \frac {1}{N} \sum_ {k = 1} ^ {N} \| F (\mathbf {v} _ {i} ^ {k}) - F (\mathbf {v} _ {j} ^ {k}) \| _ {2} ^ {2}, \quad (6) +$$ + +where $F(\mathbf{v}_i)$ is the per-vertex feature vector sampled from the feature map $\mathbf{F}_i$ , replacing the per-vertex image intensity $I(\mathbf{v}_i)$ sampled from raw image $\mathbf{I}_i$ . + +Step Size Prediction. Traditionally, the step size $\alpha$ for gradient descent is heavily tuned to ensure good performance. Instead, we use an MLP $\mathcal{F}_{mlp}$ shown in Fig. 3 that learns to predict $\alpha$ given the absolute residuals of the objectives averaged across vertices and views. + +End-to-end learnable. The parameters of both networks $\mathcal{F}_{fpn}$ (in Fig. 2) and $\mathcal{F}_{mlp}$ (in Fig. 3) can be updated during end-to-end training. In principle, $\mathcal{F}_{fpn}$ learns to extract feature maps that are suitable for the optimization (i.e., more smooth and convex), while $\mathcal{F}_{mlp}$ learns to predict better step sizes that expedite the convergence (i.e., larger step size with larger magnitudes of objectives), reducing the difficulty of the optimization. + +# 3.3. Adaptive Face Model + +To better leverage existing 3DMM while not limited by its representation power, we propose an Adaptive Face Model that contains two linear subspaces $\mathbf{x} = (\mathbf{x}_{bfm},\mathbf{x}_{adap})$ . The final facial shape $\mathbf{V}$ is represented as, + +$$ +\mathbf {V} = f (\mathbf {x}) = \overline {{\mathbf {V}}} + \mathbf {B} _ {b f m} \mathbf {x} _ {b f m} + \mathbf {B} _ {a d a p} \mathbf {x} _ {a d a p}, \tag {7} +$$ + +where $\overline{\mathbf{V}}\in \mathbb{R}^{3N}$ is the mean shape, $\mathbf{B}_{bfm}\in \mathbb{R}^{3N\times K_{bfm}}$ is the PCA basis from Basel Face Model (BFM) [40] that is common to all faces, and $\mathbf{B}_{adap}\in \mathbb{R}^{3N\times K_{adap}}$ is the adaptive basis that is built from the input images and preliminary reconstructions. The coefficient $\mathbf{x}_{bfm}\in \mathbb{R}^{K_{bfm}}$ , termed as the BFM parameter, is constant across different views, while $\mathbf{x}_{adap}\in \mathbb{R}^{K_{adap}}$ , termed as the adaptive parameter, varies across views. + +Since the adaptive basis $\mathbf{B}_{\text{adap}}$ is built according to the initial (or intermediate) pose $\{\hat{\mathbf{p}}_i\}_{i=1}^M$ and geometry $\{\hat{\mathbf{V}}_i\}_{i=1}^M$ , it can hopefully capture the aspects where preliminary reconstructions fail to explain the input. To achieve this goal, it needs to be built right before the NRMVS optimization, as shown in Fig. 2. + +For each view $i$ , a feature map $\mathbf{F}_i^{\prime}$ is firstly extracted from the image $\mathbf{I}_i$ via a separate FPN [36] $\mathcal{F}_{fpn}^{\prime}$ shown in Fig. 2 as the following, + +$$ +\mathbf {F} _ {i} ^ {\prime} = \mathcal {F} _ {f p n} ^ {\prime} \left(\mathbf {I} _ {i}\right). \tag {8} +$$ + +In total, we have $M$ feature maps $\{\mathbf{F}_i^{\prime}\}_{i = 1}^{M}$ , i.e., the left most column in Fig. 4. Then, we can obtain the adaptive basis $\mathbf{B}_{\text{adap}}$ by feeding these feature maps and the preliminary reconstructions $(\{\hat{\mathbf{V}}_i\}, \{\hat{\mathbf{p}}_i\})_{i = 1}^{M}$ into the basis network $\mathcal{F}_{\text{basis}}$ shown in Fig. 4, + +$$ +\mathbf {B} _ {a d a p} = \mathcal {F} _ {b a s i s} \left(\left\{\mathbf {F} _ {i} ^ {\prime} \right\} _ {i = 1} ^ {M}, \left(\left\{\hat {\mathbf {V}} _ {i} \right\}, \left\{\hat {\mathbf {p}} _ {i} \right\}\right) _ {i = 1} ^ {M}\right). \tag {9} +$$ + +More specifically, we map these feature maps $\{\mathbf{F}_i^{\prime}\}_{i = 1}^{M}$ into the UV texture space according to the preliminary 3D + +![](images/4a04e5441331bb1ea7d75253c3cbe23d73a583aa1a318fdb2cfb867201cf2a25.jpg) +Figure 4: Pipeline of adaptive basis generation (Sec. 3.3). + +face shape. We also convert each preliminary reconstruction to the UV space as Position Map [17] (i.e., a 2D image recording 3D positions of all vertices in the UV space), and concatenate it with the corresponding unwrapped feature map along the channel dimension. The resulting $M$ feature maps go through $M$ Siamese branches separately, then are max pooled along the view dimension, and decoded to the UV texture representation of the adaptive basis. The final adaptive basis $\mathbf{B}_{\text{adap}}$ can be generated through standard texture mapping. Please refer to our supplementary for more details about the basis network $\mathcal{F}_{\text{basis}}$ for adaptive face model generation. + +# 3.4. Multi-level Reconstruction + +In order to better recover the details of 3D face shapes, we adopt a multi-level scheme. Specifically, we split the reconstruction process into 3 sequential levels $l = 1,2,3$ , each of which solves a NRMVS optimization and outputs the reconstructions for all views $(\{\mathbf{V}_i^l\}, \{\mathbf{p}_i^l\})_{i=1}^M$ . + +At each level, the face model is updated as + +$$ +\mathbf {V} ^ {l} = f ^ {l} \left(\mathbf {x} ^ {l}\right) = \overline {{\mathbf {V}}} + \mathbf {B} _ {b f m} \mathbf {x} _ {b f m} + \sum_ {j = 1} ^ {l} \mathbf {B} _ {a d a p} ^ {j} \mathbf {x} _ {a d a p} ^ {j}, \tag {10} +$$ + +where the shape basis $\mathbf{B}_{bfm}$ is fixed for all levels, and the adaptive basis $\mathbf{B}_{adap}^{l}$ is updated from level to level. During NRMVS optimization at each level $l$ , only head poses $\{\mathbf{p}_i\}_{i=1}^M$ , BFM parameter $\mathbf{x}_{bfm}$ , and the current level adaptive parameter $\{\mathbf{x}_{adap,i}^{l}\}_{i=1}^M$ will be optimized. Positions and BFM parameter are initialized with outputs from the previous level, and the adaptive parameter is initialized to zero at the beginning. At the very beginning (i.e., level 0), the initial head pose is regressed by a pre-trained neural network (please refer to the supplementary material for details). The + +initial BFM parameter is set to zero. The initial preliminary reconstruction for each view is the mean face from BFM [40] transformed by the regressed pose. For later levels, the preliminary reconstructions are the output of the previous level. + +# 3.5. Training Losses + +Given ground truth meshes with the corresponding vertices of the reconstructed meshes, our network, i.e., 2 FPNs $\mathcal{F}_{fpn}$ and $\mathcal{F}_{fpn}^{\prime}$ , the MLP $\mathcal{F}_{mlp}$ for step size prediction, and the basis network $\mathcal{F}_{basis}$ , is trained in a supervised manner with standard losses. For each vertex, we compute the point-to-point $L_{2}$ distance between ground truth and reconstructed meshes (with poses) of all iterations, all views, and all levels after depth alignment and dense alignment separately (i.e., 2 losses per vertex). For depth alignment, we compute the mean depth difference between predictions and ground truth, and add this difference to ground truth before computing the loss. For dense alignment, we use the correspondence of face mesh vertices to rigidly (with scale) align predictions to ground truth. These 2 vertex losses read as + +$$ +L _ {v \_ d e p} = \sum \| \mathbf {V} ^ {g t} - \mathbf {V} \| _ {2} ^ {2}, \tag {11} +$$ + +$$ +L _ {v \_ d e n} = \sum \left\| \mathbf {V} ^ {g t} - \mathbf {V} _ {d e n} \right\| _ {2} ^ {2}. \tag {12} +$$ + +Intuitively speaking, the dense aligned loss $L_{v\_den}$ only measures the geometry error while the depth aligned loss $L_{v\_dep}$ also accounts for poses. + +We also consider the supervision on per-vertex normal by measuring cosine similarity loss, + +$$ +L _ {n o r m} = \sum \left(1 - \cos \left(\mathbf {n} ^ {g t}, \mathbf {n} _ {\text {a l i g n}}\right)\right). \tag {13} +$$ + +Following Liu et al. [37], an edge loss is also added, + +$$ +L _ {e d g e} = \frac {1}{\# E} \sum_ {(i, j) \in E} \left| \frac {\left\| \mathbf {V} _ {i} - \mathbf {V} _ {j} \right\|}{\left\| \mathbf {V} _ {i} ^ {g t} - \mathbf {V} _ {j} ^ {g t} \right\|} - 1 \right|, \tag {14} +$$ + +where $E$ is the pre-defined edge graph of the template. The motivation of using $L_{norm}$ and $L_{edge}$ is to improve surface smoothness while preserve high-frequency details [37]. Finally, a landmark loss $L_{land}$ similar to Eq. (4) is included. To sum, the total training loss is as the following, + +$$ +L = \lambda_ {1} L _ {v \_ d e p} + \lambda_ {2} L _ {v \_ d e n} + \lambda_ {3} L _ {\text {n o r m}} + \lambda_ {4} L _ {\text {e d g e}} + \lambda_ {5} L _ {\text {l a n d}}, \tag {15} +$$ + +where $\lambda_{1,2,3,4,5}$ are hyperparameters that adjust the weights of different losses. + +# 3.6. Optimization and Training + +Here we further clarify the relationship between the NRMVS optimization and the training procedure. The NRMVS optimization belongs to the forward pass of our model. It can be analogized to a differentiable module, which takes in old reconstruction parameters and computes the updates to output new reconstructions iteratively. Then, the training losses are computed on the outputs of each iteration, whose gradient will be backwarded through the whole NRMVS optimization to update learnable weights (i.e., the weights of $\mathcal{F}_{fpn}$ and $\mathcal{F}_{fpn}^{\prime}$ in Fig. 2, $\mathcal{F}_{mlp}$ in Fig. 3, and $\mathcal{F}_{basis}$ in Fig. 4). + +# 4. Experiments + +# 4.1. Experimental Setup + +Training data. We adopt the Stirling/ESRC 3D face database [1] to train our model. The dataset contains high quality 3D scans of more than 100 subjects. The majority of subjects have 3D scans for 8 different expressions. For each scan, 2 RGB images taken from $\pm 45$ yaw angles are used as textures. We use the textured 3D scans to render images for training. More specifically, we select 85, 20, 35 non-overlapping subjects as training, validation, testing splits. To generate a training sample, two random expressions of the same subject are firstly selected. Then, we render one image for each expression with different poses and same global illumination using Spherical Harmonics (SH) [41]. As a result, around 8K training samples are generated. + +To obtain the ground truth dense correspondences, we run Non-Rigid ICP [4] to register the mean shape from BFM [40] to each 3D scan, and use the results as the ground truth dense correspondences. Note that even trained on this limited number of samples, our model can still generalize to other 3D scan datasets as well as in-the-wild images. + +Implementation. Our model is implemented with Pytorch [39]. For the optimization, the objective weights are $\lambda_{a} = 0.25$ , and $\lambda_{l} = 0.025$ . We use 3 levels of optimization with the feature map resolution of $32 \times 32$ , $64 \times 64$ , and $128 \times 128$ respectively. In each level, 3 iterations of parameter updates are computed. During training, the losses are weighted as $\lambda_{1} = 1$ , $\lambda_{2} = 1$ , $\lambda_{3} = 100$ , $\lambda_{4} = 0.01$ , and + +![](images/bb4db741a80f3232248a5c7a7ec381b01e574afc127e17378aaa96389a149756.jpg) +Figure 5: Qualitative comparison with Feng et al. [17], Chen et al. [13], and Tewari et al. [49]. For two-view methods, images of two consecutive rows are input together. Readers may zoom in and pay attention to details such as (1) face contour alignment $(2^{nd} \& 4^{th}$ row), (2) inputs with large expression change $(5^{th} \& 6^{th}$ row), and (3) medium-scale details such as large wrinkles $(2^{nd}$ row), smiling line $(6^{th}$ row), half-opened eyes $(4^{th}$ row), and geometry around eyes $(1^{st} \& 3^{rd} \& 7^{th}$ row). + +$\lambda_{5} = 0.1$ . The Adam [29] optimizer is applied for training with learning rate of $2.0 \times 10^{-5}$ . The batch size is set to 2. + +Baseline Methods. We choose the following methods as baselines in the qualitative and quantitative evaluations. Tewari et al. [49] is a regression-based method that also tackles non-rigid multi-view face reconstruction, which is the most related one to ours. Thus, we treat it as an important baseline in both qualitative and quantitative evaluations. Several single-view reconstruction methods are also compared. Feng et al. [17] directly regress the face geometry in the form of Position Maps. Tewari et al. [50] learn a corrective basis on top of 3DMM and regress the basis parameters. These two baselines represent single-view methods that are not restricted by the 3DMM subspace. Deng et al. [16] act as the baseline for state-of-the-art 3DMM fitting method. We also include Chen et al. [13] in the comparison as it presents an interesting combination of optimization- + +Table 1: Geometric errors on BU3DFE [62] dataset. [Key: Two input images with the same (S), or different expressions (D)] + +
Two ViewsSingle View
Ours (S)Ours (D)Ours NoAdap (S)Tewari et al. [49] (S)Deng et al. [16]Tewari et al. [50]
Mean (mm)1.111.141.121.741.381.78
STD (mm)0.290.290.330.450.370.49
+ +Table 2: Geometric errors on Bosphorus database [46]. Inputs are 2-view image pairs with different expressions. + +
OursDeng et al. [16]
Mean (mm)1.441.47
STD (mm)0.380.40
+ +based landmark fitting and emotion priors captured by deep learning while can also synthesis facial details. + +# 4.2. Qualitative Evaluation + +We perform qualitative comparison on VoxCeleb2 [14], an in-the-wild facial video dataset collected from YouTube. We use the same set of images as Tewari et al. [49] uploaded in their website. For Tewari et al. [49], we directly use their uploaded results for comparison. For other baselines, we use their public implementations to generate the results. The visualizations are shown in Fig. 5. + +Comparison with Tewari et al. [49]. Our results are better aligned to the faces due to the explicit optimization on the multi-view appearance consistency. Note that [49] is trained on a large amount of in-the-wild data, which should generalize better to the tested in-the-wild faces. However, even though we use limited 3D scans with rendered images during training, our model still achieves comparable or even better generalization on these in-the-wild faces. In addition, since our model is trained on high-quality 3D scans, it is able to capture medium-level details while [49] only gives coarse reconstructions. + +Comparison with single-view methods. We also compared with single-view reconstructions [17] and [13]. Our method gives better results than [17] with the help of multiview geometry. Our method also performs better than the emotion-driven proxy estimation in [13]. Although the additional detail synthesis in [13] can produce locally appealing results (e.g., wrinkles on the forehead), it cannot correct the unfaithful geometry from proxy estimation. + +# 4.3.Quantitative Evaluation + +The BU3DFE [62] and the Bosphorus [46] datasets are used to quantitatively evaluate our method. The authors of [49] and [50] kindly provided their reconstructed meshes. For other baselines, the reconstructions are obtained with their public implementations. Then, we compute the geometric errors on all reconstructions in a consistent manner. + +Evaluation on BU3DFE [62]. The BU3DFE dataset [62] includes 3D scans of 100 subjects with neutral face and 24 expressions. Each scan in BU3DFE is associated with 2 RGB images taken from $\pm 45^{\circ}$ yaw angles. We use the + +![](images/f13bae81cb94220ebbef8c31447e5143b742c69b5fe9de5344d7d9321feb7b5c.jpg) + +![](images/1fa616f776b2d1666d264873b39e4aacb902a928919dfb07f8d4e62acfba6a8c.jpg) + +![](images/4adceab33594629d63dbda4c56f35d96471e7bf7c9649138c422a25dee3cea39.jpg) + +![](images/ae216d31adffd9b4f9a6b00bb7f886c29daf7cae3176c20910d987e212c1724f.jpg) +Figure 6: Visualization of our reconstructions on BU3DFE [62] (first 2 rows) and Bosphorus [46] (last 2 rows). Our method can capture different expression changes. + +![](images/c89eac2bb39afeb7b69925b23502dffad02fe5f7a6acbb7864d305393bfb7699.jpg) + +![](images/0235074afe7e51a56a5b8a8d5ed5d461358233cc5ea636b10f59b63da77e1eda.jpg) + +![](images/0a592fdf85802081d9574b9afddcf975466db6335a3833ee19299d6d4a85cb5c.jpg) + +![](images/329b398b52afafd2502f7f6df46929b4440195698604d8b44147918d4bfb92a7.jpg) + +testing split provided by Tewari et al. [49] to evaluate our method with 2-view images of the same subject, either under the same expression or different ones. + +To compute the geometric errors, we first align the reconstructions with ground truth using 8 landmarks given by BU3DFE [62]. Then, ICP [63] is performed to further align the reconstructions to ground truth. Finally, we crop the ground truth based on landmarks with a similar strategy as [18] and compute the point-to-plane distance from ground truth to reconstruction. Our results are shown in Table 1 and compared to the state-of-the-art approaches. We also show qualitative examples of our results in Fig. 6. + +Our learning-based optimization outperforms the regression-based approach [49]. Note that their model is trained in a self-supervised manner with in-the-wild videos for the sake of better generalization, which may affect the geometry accuracy. It is unclear whether their method can be trained with limited 3D scans without harming generalization. In contrast, our model can leverage 3D scans for better geometry accuracy without affecting generalization. Our method also outperforms state-of-the-art single-view approaches [16, 50] as we leverage the additional multi-view cue via learning-based optimization. + +Evaluation on Bosphorus [46]. The Bosphorus database contains 105 subjects, each with expressive face images under frontal-view and neutral face images under various poses. For each subject, we select all images with emotion labels (only frontal-view provided), including expressions + +Table 3: Geometric errors on rendered images using ESRC face database [1] for multi-view evaluation. + +
2 Views3 Views4 Views
Mean (mm)1.041.031.02
STD (mm)0.330.300.29
+ +of happy, surprise, fear, sadness, anger and disgust; then we select the neutral face image under $-30^{\circ}$ yaw angle to form 2-view image pairs. Note that for some subjects, only a subset of the mentioned expressions are available. In total, we collect 453 samples of 2-view images. + +We use the mentioned protocol to compute the geometric errors, however, with a different set of 5 landmarks given by the database for alignment. The errors of neutral faces are down weighted accordingly as they are measured for multiple times. Results are shown in Table 2. + +Our method achieves slightly better performance than Deng et al. [16] in both mean and standard deviation of errors. Note that the content difference between Bosphorus [46] and BU3DFE [62] leads to a non-trivial domain gap, which could affect the performance gain of our method comparing to Ours $(D)$ in Table 1. + +# 4.4. Ablation Study + +More than Two Views. We evaluate how the number of views affects our method. For this evaluation, we use our test split of ESRC face database [1] with 35 subjects to render test images. To generate a test sample, we randomly select 4 expressions from a subject and render 4 images with an arbitrary global illumination and different poses. Here we order the images with increasing yaw angles for better illustration. When testing 2-view cases, the 1st and 4th images are used. For 3-view cases, (1st, 2nd, 4th) and (1st, 3rd, 4th) images are used separately. For 4-view cases, all images are used. We only measure the errors of the 1st and 4th images for fair comparison. Before testing with more than 2 views, we further finetune our model accordingly on the training split to better fit different number of views. + +As shown in Table 3, by introducing more views during training and testing, our method achieves better performance in terms of both mean and standard deviation of geometric errors, which demonstrates the effectiveness of multi-view information. + +Adaptive vs. Generic Basis. To demonstrate the benefit of adaptive basis, we design a baseline where we replace the adaptive basis with a generic one, which is common to different subjects and fixed during the optimization. Basically, we remove the basis network $\mathcal{F}_{basis}$ in Fig. 4 and set the UV texture representation of the basis (also shown in Fig. 4) as network parameters, which derives the generic basis via the same texture mapping. The quantitative result is shown in Table 1 as Ours NoAdap (S). Although the mean error of generic basis is comparable to the one of adaptive basis, its standard deviation (STD) of error is larger, indicating that + +![](images/40f1bf6fde0333d292a6b6a3f4127485375b6f5100995dbe03ce3e1e94b08113.jpg) +Figure 7: Qualitative comparison between Adaptive Basis (AdapB) and Generic Basis (GeneB). + +![](images/ebc47bb88c6e5d74ec3465660e150514f3f4b552b750f540da1bb16a35ab5981.jpg) + +![](images/62fb3d17c02986e9f82dc06f25bb23026d352ffe00753d18ecc77d48a5cd6a45.jpg) + +Table 4: Geometric errors and running time on BU3DFE [62] dataset for multi-level scheme evaluation. Tested with RTX2080Ti. + +
Level 1Level 2Level 3
Mean (mm)1.291.181.11
STD (mm)0.320.300.29
Time (s)0.120.220.31
+ +the results of generic basis are less stable. The qualitative comparison in Fig. 7 shows that generic basis tends to give more noisy reconstructions. Note that an additional smooth loss is applied when training the generic basis model, which has reduced the STD of geometric errors and alleviated the noisy pattern on outputs to some extent. The adaptive basis is able to derive the relationships among vertices from the spatial information of the images and the preliminary reconstructions, while generic basis treats each vertex independently. This property enables the adaptive basis to produce robust and smooth results. + +Multi-level Scheme. We also investigate the effectiveness of the multi-level scheme. Table 4 shows the quantitative results on BU3DFE [62]. The geometric error and its standard deviation (STD) consistently decrease as more levels of optimization are performed. Note that even our level 1 reconstructions outperform all baselines in Table 1. The last three columns in Fig. 1 are typical qualitative examples, showing that higher levels can better capture personalized details, i.e., wrinkles between eyebrows. + +# 5. Conclusions + +We solve 3D face reconstruction from multi-view images with different expressions by a novel Non-Rigid Multi-View Stereo (NRMVS) optimization framework. Our method introduces the traditional multi-view geometry (in terms of photo/feature-consistency) to the popular CNN-based face reconstruction. Solving 3D reconstruction by enforcing multi-view geometry constraints is effective in capturing shape details, and also improves the generalization to unseen data. Experiments demonstrate that our method achieves state-of-the-art performance and generalizes well to in-the-wild images, which proves the effectiveness of conventional multi-view geometry based optimization combined with modern CNNs. Although our NRMVS is still specific to faces, it is the first formulation of dense multiview stereo with non-rigid motions, and hence, can be potentially applied to other non-rigid reconstruction problems. + +# References + +[1] Stirling/ESRC 3D face database. 6, 8 +[2] Antonio Agudo and Francesc Moreno-Noguer. Dust: Dual union of spatio-temporal subspaces for monocular multiple object 3d reconstruction. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 6262-6270, 2017. 2 +[3] Ijaz Akhter, Yaser Sheikh, and Sohaib Khan. In defense of orthonormality constraints for nonrigid structure from motion. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 1534-1541. IEEE, 2009. 2 +[4] Brian Amberg, Sami Romdhani, and Thomas Vetter. Optimal step nonrigid icp algorithms for surface registration. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 1-8. IEEE, 2007. 6 +[5] Thabo Beeler, Bernd Bickel, Paul Beardsley, Bob Sumner, and Markus Gross. High-quality single-shot capture of facial geometry. In ACM Trans. on Graphics (TOG), volume 29, page 40. ACM, 2010. 1, 2 +[6] Volker Blanz and Thomas Vetter. Face recognition based on fitting a 3d morphable model. IEEE Trans. on Pattern Analysis and Machine Intelligence (PAMI), 25(9):1063-1074, 2003. 2 +[7] Volker Blanz, Thomas Vetter, et al. A morphable model for the synthesis of 3d faces. In Proc. of ACM SIGGRAPH, volume 99, pages 187-194, 1999. 2, 3 +[8] James Booth, Anastasios Roussos, Allan Ponniah, David Dunaway, and Stefanos Zafeiriou. Large scale 3d morphable models. International Journal of Computer Vision (IJCV), 126(2-4):233-254, 2018. 2 +[9] Sofien Bouaziz, Yangang Wang, and Mark Pauly. Online modeling for realtime facial animation. ACM Trans. on Graphics (TOG), 32(4):40, 2013. 2 +[10] Derek Bradley, Wolfgang Heidrich, Tiberiu Popa, and Alla Sheffer. High resolution passive facial performance capture. In ACM Trans. on Graphics (TOG), volume 29, page 41. ACM, 2010. 1, 2 +[11] C Bregler, A Hertzmann, and H Biermann. Recovering non-rigid 3d shape from image streams. In Proc. of Computer Vision and Pattern Recognition (CVPR), volume 2, pages 690-696. IEEE, 2000. 2 +[12] Adrian Bulat and Georgios Tzimiropoulos. How far are we from solving the 2d & 3d face alignment problem? (and a dataset of 230,000 3d facial landmarks). In Proc. of International Conference on Computer Vision (ICCV), pages 1021-1030, 2017. 4 +[13] Anpei Chen, Zhang Chen, Guli Zhang, Kenny Mitchell, and Jingyi Yu. Photo-realistic facial details synthesis from single image. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 2, 6, 7 +[14] Joon Son Chung, Arsha Nagrani, and Andrew Zisserman. Voxceleb2: Deep speaker recognition. Proc. Interspeech 2018, pages 1086-1090, 2018. 7 +[15] Yuchao Dai, Hongdong Li, and Mingyi He. A simple prior-free method for non-rigid structure-from-motion factorization. International Journal of Computer Vision (IJCV), 107(2):101-122, 2014. 1, 2 + +[16] Yu Deng, Jiaolong Yang, Sicheng Xu, Dong Chen, Yunde Jia, and Xin Tong. Accurate 3d face reconstruction with weakly-supervised learning: From single image to image set. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 0–0, 2019. 2, 6, 7, 8 +[17] Yao Feng, Fan Wu, Xiaohu Shao, Yanfeng Wang, and Xi Zhou. Joint 3d face reconstruction and dense alignment with position map regression network. In Proc. of European Conference on Computer Vision (ECCV), pages 534-551, 2018. 2, 5, 6, 7 +[18] Zhen-Hua Feng, Patrik Huber, Josef Kittler, Peter Hancock, Xiao-Jun Wu, Qijun Zhao, Paul Koppen, and Matthias Ratsch. Evaluation of dense 3d reconstruction from 2d face images in the wild. In 2018 13th IEEE International Conference on Automatic Face & Gesture Recognition (FG 2018), pages 780-786. IEEE, 2018. 7 +[19] Katerina Fragkiadaki, Marta Salas, Pablo Arbelaez, and Jitendra Malik. Grouping-based low-rank trajectory completion and 3d reconstruction. In Proc. of Advances in Neural Information Processing Systems (NeurIPS), pages 55–63, 2014. 2 +[20] Yasutaka Furukawa and Jean Ponce. Accurate, dense, and robust multiview stereopsis. IEEE Trans. on Pattern Analysis and Machine Intelligence (PAMI), 32(8):1362-1376, 2009. 2 +[21] Graham Fyffe, Paul Graham, Borom Tunwattanapong, Abhijeet Ghosh, and Paul Debevec. Near-instant capture of high-resolution facial geometry and reflectance. In Computer Graphics Forum, volume 35, pages 353-363. Wiley Online Library, 2016. 2 +[22] Ravi Garg, Anastasios Roussos, and Lourdes Agapito. Dense variational reconstruction of non-rigid surfaces from monocular video. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 1272-1279, 2013. 1, 2 +[23] Pablo Garrido, Levi Valgaerts, Chenglei Wu, and Christian Theobalt. Reconstructing detailed dynamic face geometry from monocular video. Proc. of ACM SIGGRAPH, 32(6):158-1, 2013. 2 +[24] Pablo Garrido, Michael Zollhöfer, Dan Casas, Levi Valgaerts, Kiran Varanasi, Patrick Pérez, and Christian Theobalt. Reconstruction of personalized 3d face rigs from monocular video. ACM Trans. on Graphics (TOG), 35(3):28, 2016. 2 +[25] Kyle Genova, Forrester Cole, Aaron Maschinot, Aaron Sarna, Daniel Vlasic, and William T Freeman. Unsupervised training for 3d morphable model regression. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 8377-8386, 2018. 1, 2 +[26] Athinodoros S Georgiades. Recovering 3-d shape and reflectance from a small number of photographs. In Proceedings of the 14th Eurographics workshop on Rendering, pages 230-240. Eurographics Association, 2003. 2 +[27] Abhijeet Ghosh, Graham Fyffe, Borom Tunwattanapong, Jay Busch, Xueming Yu, and Paul Debevec. Multiview face capture using polarized spherical gradient illumination. In ACM Trans. on Graphics (TOG), volume 30, page 129. ACM, 2011. 2 + +[28] Patrik Huber, Guosheng Hu, Rafael Tena, Pouria Mortazavian, P Koppen, William J Christmas, Matthias Ratsch, and Josef Kittler. A multiresolution 3d morphable face model and fitting framework. In Proceedings of the 11th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications, 2016. 2 +[29] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 6 +[30] Martin Klaudiny and Adrian Hilton. High-detail 3d capture and non-sequential alignment of facial performance. In 2012 Second International Conference on 3D Imaging, Modeling, Processing, Visualization & Transmission, pages 17–24. IEEE, 2012. 2 +[31] Chen Kong and Simon Lucey. Prior-less compressible structure from motion. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 4123-4131, 2016. 1, 2 +[32] Chen Kong and Simon Lucey. Deep non-rigid structure from motion. In Proc. of International Conference on Computer Vision (ICCV), pages 1558-1567, 2019. 2 +[33] Suryansh Kumar. Jumping manifolds: Geometry aware dense non-rigid structure from motion. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 5346-5355, 2019. 1, 2 +[34] Suryansh Kumar, Anoop Cherian, Yuchao Dai, and Hongdong Li. Scalable dense non-rigid structure-from-motion: A grassmannian perspective. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 254-263, 2018. 1, 2 +[35] Tianye Li, Timo Bolkart, Michael J Black, Hao Li, and Javier Romero. Learning a model of facial shape and expression from 4d scans. ACM Trans. on Graphics (TOG), 36(6):194, 2017. 2 +[36] Tsung-Yi Lin, Piotr Dólar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 2117-2125, 2017. 4 +[37] Feng Liu, Luan Tran, and Xiaoming Liu. 3d face modeling from diverse raw scan data. In Proc. of International Conference on Computer Vision (ICCV), Seoul, South Korea, October 2019. 5, 6 +[38] Zhaoyang Lv, Frank Dellaert, James M Rehg, and Andreas Geiger. Taking a deeper look at the inverse compositional algorithm. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 4581-4590, 2019. 4 +[39] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NIPS-W, 2017. 6 +[40] Pascal Paysan, Reinhard Knothe, Brian Amberg, Sami Romdhani, and Thomas Vetter. A 3d face model for pose and illumination invariant face recognition. In 2009 Sixth IEEE International Conference on Advanced Video and Signal Based Surveillance, pages 296-301. IEEE, 2009. 4, 5, 6 +[41] Ravi Ramamoorthi and Pat Hanrahan. A signal-processing framework for inverse rendering. In Proceedings of the 28th annual conference on Computer graphics and interactive techniques, pages 117-128. ACM, 2001. 6 + +[42] Elad Richardson, Matan Sela, and Ron Kimmel. 3d face reconstruction by learning from synthetic data. In 2016 Fourth International Conference on 3D Vision (3DV), pages 460-469. IEEE, 2016. 1, 2 +[43] Sami Romdhani and Thomas Vetter. Estimating 3d shape and texture using pixel intensity, edges, specular highlights, texture constraints and a prior. In Proc. of Computer Vision and Pattern Recognition (CVPR), volume 2, pages 986-993. IEEE, 2005. 2 +[44] Joseph Roth, Yiying Tong, and Xiaoming Liu. Adaptive 3d face reconstruction from unconstrained photo collections. IEEE Trans. on Pattern Analysis and Machine Intelligence (PAMI), 39(11):2127-2141, December 2016. 2 +[45] Soubhik Sanyal, Timo Bolkart, Haiwen Feng, and Michael J Black. Learning to regress 3d face shape and expression from an image without 3d supervision. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 7763-7772, 2019. 2 +[46] Arman Savran, Neşé Alyüz, Hamdi Dibeklioglu, Oya Çeliktutan, Berk Gökberk, Bulent Sankur, and Lale Akarun. Bosphorus database for 3d face analysis. In European Workshop on Biometrics and Identity Management, pages 47-56. Springer, 2008. 7, 8 +[47] Matan Sela, Elad Richardson, and Ron Kimmel. Unrestricted facial geometry reconstruction using image-to-image translation. In Proc. of International Conference on Computer Vision (ICCV), pages 1576-1585, 2017. 2 +[48] Chengzhou Tang and Ping Tan. Ba-net: Dense bundle adjustment network. Intl. Conf. on Learning Representations (ICLR), 2019. 4 +[49] Ayush Tewari, Florian Bernard, Pablo Garrido, Gaurav Bharaj, Mohamed Elgharib, Hans-Peter Seidel, Patrick Pérez, Michael Zollhofer, and Christian Theobalt. Fml: face model learning from videos. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 10812-10822, 2019. 1, 2, 4, 6, 7 +[50] Ayush Tewari, Michael Zollhöfer, Pablo Garrido, Florian Bernard, Hyeongwoo Kim, Patrick Pérez, and Christian Theobalt. Self-supervised multi-level face model learning for monocular reconstruction at over 250 hz. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 2549-2559, 2018. 2, 4, 6, 7 +[51] Ayush Tewari, Michael Zollhofer, Hyeongwoo Kim, Pablo Garrido, Florian Bernard, Patrick Perez, and Christian Theobalt. Mofa: Model-based deep convolutional face autoencoder for unsupervised monocular reconstruction. In Proc. of International Conference on Computer Vision (ICCV), pages 1274-1283, 2017. 2 +[52] Justus Thies, Michael Zollhofer, Marc Stamminger, Christian Theobalt, and Matthias Nießner. Face2face: Real-time face capture and reenactment of rgb videos. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 2387-2395, 2016. 2 +[53] Luan Tran, Feng Liu, and Xiaoming Liu. Towards high-fidelity nonlinear 3D face morphable model. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2019. 2 + +[54] Luan Tran and Xiaoming Liu. Nonlinear 3D face morphable model. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[55] Luan Tran and Xiaoming Liu. On learning 3D face morphable model from in-the-wild images. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2019. doi: 10.1109/TPAMI.2019.2927975.2 +[56] Anh Tuan Tran, Tal Hassner, Iacopo Masi, and Gerard Medioni. Regressing robust and discriminative 3d morphable models with a very deep neural network. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 5163-5172, 2017. 1, 2 +[57] Anh Tuan Tran, Tal Hassner, Iacopo Masi, Eran Paz, Yuval Nirkin, and Gérard Medioni. Extreme 3d face reconstruction: Seeing through occlusions. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 3935-3944, 2018. 2 +[58] Daniel Vlasic, Matthew Brand, Hanspeter Pfister, and Jovan Popovic. Face transfer with multilinear models. In ACM Trans. on Graphics (TOG), volume 24, pages 426-433. ACM, 2005. 2 +[59] Robert J Woodham. Photometric stereo: A reflectance map technique for determining surface orientation from image intensity. In Image Understanding Systems and Industrial Applications I, volume 155, pages 136-143. International Society for Optics and Photonics, 1979. 2 +[60] Fanzi Wu, Linchao Bao, Yajing Chen, Yonggen Ling, Yibing Song, Songnan Li, King Ngi Ngan, and Wei Liu. Mvf-net: Multi-view 3d face morphable model regression. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 959-968, 2019. 2 +[61] Yao Yao, Zixin Luo, Shiwei Li, Tian Fang, and Long Quan. Mvsnet: Depth inference for unstructured multi-view stereo. In Proc. of European Conference on Computer Vision (ECCV), pages 767-783, 2018. 4 +[62] Lijun Yin, Xiaozhou Wei, Yi Sun, Jun Wang, and Matthew J Rosato. A 3d facial expression database for facial behavior research. In 7th international conference on automatic face and gesture recognition (FGR06), pages 211-216. IEEE, 2006. 2, 7, 8 +[63] Qian-Yi Zhou, Jaesik Park, and Vladlen Koltun. Open3D: A modern library for 3D data processing. arXiv:1801.09847, 2018. 7 +[64] Xiangyu Zhu, Zhen Lei, Xiaoming Liu, Hailin Shi, and Stan Z Li. Face alignment across large poses: A 3d solution. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 146-155, 2016. 1 +[65] Yingying Zhu, Dong Huang, Fernando De La Torre, and Simon Lucey. Complex non-rigid motion 3d reconstruction by union of subspaces. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 1542-1549, 2014. 1, 2 \ No newline at end of file diff --git a/deepfacialnonrigidmultiviewstereo/images.zip b/deepfacialnonrigidmultiviewstereo/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ac3725e34fb30c0ddbf44b4f6c463a85d56542c5 --- /dev/null +++ b/deepfacialnonrigidmultiviewstereo/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e632cf7159871f5ff9652f7a26ff4e6f9887af39b47514ce081620055591dd0 +size 597667 diff --git a/deepfacialnonrigidmultiviewstereo/layout.json b/deepfacialnonrigidmultiviewstereo/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..52600814c95e25713d96abeda4a1e4c4ac5b44a1 --- /dev/null +++ b/deepfacialnonrigidmultiviewstereo/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36f0fa818ad5407ae0592e88808fc9bd30b9da25b73903c3d0e9e73a9c53b758 +size 457244 diff --git a/deepfairclusteringforvisuallearning/3da0162a-da6c-4c09-882f-6f6baaa63eb6_content_list.json b/deepfairclusteringforvisuallearning/3da0162a-da6c-4c09-882f-6f6baaa63eb6_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..551b9e51b8003337735ca47f396b13188e43b6ad --- /dev/null +++ b/deepfairclusteringforvisuallearning/3da0162a-da6c-4c09-882f-6f6baaa63eb6_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:971e8cec3b0df7e264c3ed8b226c32d24ffadade27a27660139294025e857641 +size 81372 diff --git a/deepfairclusteringforvisuallearning/3da0162a-da6c-4c09-882f-6f6baaa63eb6_model.json b/deepfairclusteringforvisuallearning/3da0162a-da6c-4c09-882f-6f6baaa63eb6_model.json new file mode 100644 index 0000000000000000000000000000000000000000..fca11871462f4d6bb84f29c1709eb55f2b6a4be3 --- /dev/null +++ b/deepfairclusteringforvisuallearning/3da0162a-da6c-4c09-882f-6f6baaa63eb6_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0df4146f585f5c515bda1567d62cec21510c270bf11d594fcc3d288dfe9c88e1 +size 97779 diff --git a/deepfairclusteringforvisuallearning/3da0162a-da6c-4c09-882f-6f6baaa63eb6_origin.pdf b/deepfairclusteringforvisuallearning/3da0162a-da6c-4c09-882f-6f6baaa63eb6_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..41d0889ca65ea6db2af63e1c83d0516cd77b9274 --- /dev/null +++ b/deepfairclusteringforvisuallearning/3da0162a-da6c-4c09-882f-6f6baaa63eb6_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f744cc7a12f4f279393f1093b0553dfeccadb1b67ecc7ba4c2a93df0d3720598 +size 646331 diff --git a/deepfairclusteringforvisuallearning/full.md b/deepfairclusteringforvisuallearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..9b9a9a3a4bdce39f184c4a064b5456db3754f238 --- /dev/null +++ b/deepfairclusteringforvisuallearning/full.md @@ -0,0 +1,308 @@ +# Deep Fair Clustering for Visual Learning + +Peizhao Li + +Brandeis University + +peizhaoli@brandeis.edu + +Han Zhao + +Carnegie Mellon University + +han.zhao@cs.cmu.edu + +Hongfu Liu + +Brandeis University + +hongfuliu@brandeis.edu + +# Abstract + +Fair clustering aims to hide sensitive attributes during data partition by balancing the distribution of protected subgroups in each cluster. Existing work attempts to address this problem by reducing it to a classical balanced clustering with a constraint on the proportion of protected subgroups of the input space. However, the input space may limit the clustering performance, and so far only low-dimensional datasets have been considered. In light of these limitations, in this paper, we propose Deep Fair Clustering (DFC) to learn fair and clustering-favorable representations for clustering simultaneously. Our approach could effectively filter out sensitive attributes from representations, and also lead to representations that are amenable for the following cluster analysis. Theoretically, we show that our fairness constraint in DFC will not incur much loss in terms of several clustering metrics. Empirically, we provide extensive experimental demonstrations on four visual datasets to corroborate the superior performance of the proposed approach over existing fair clustering and deep clustering methods on both cluster validity and fairness criterion. + +# 1. Introduction + +With the prevalence of machine learning based decision support systems in high-stakes domains, including college admission, loan approval, bail/parole judgments, and hiring processes, it has already become an imperative object of study to guarantee that individuals are treated equally in such automated decision processes [9, 8, 15]. The area of algorithmic fairness is precisely devoted to the study of algorithms and learning systems to ensure fairness in the execution of these processes while at the same time preserving utility as much as possible. Consider race as a sensitive attribute in visual applications such as facial recognition. In this case, a learning system may have a high recognition accuracy for one group of race, but a considerably lower accuracy for another group, due to the potential imbalance distributions between these two protected subgroups [4]. In order to mitigate such biases in recognition performance, + +![](images/ed6d725b6a72f71e0e212b9e3b6ea0ef44f8ebf982c94fb6748e18c689de2a55.jpg) +Figure 1. Comparison of existing fair clustering methods and ours. Existing methods seek to ensure that the proportion of samples with different sensitive attributes are approximately equal in each cluster. As a comparison, deep fair clustering learns fair representations that are amenable for cluster analysis under the constraint that they are statistically independent of sensitive attributes. + +fair and accurate recognition systems are nowadays particularly desirable to serve for many real-world scenarios. + +Cluster analysis is a classic and widely used technique in unsupervised learning to discover the underlying structure of data. In the context of algorithmic fairness, fair clustering aims to hide sensitive attributes during data partition by balancing the distribution of protected subgroups in each cluster. Chierichettiss et al. [7] propose a pioneering fairlet by employing a pre-processing technique to partition original data into chunks, followed by a $k$ -center based algorithm, which encourages clusters with balanced demographic groups. In light of the expensive computation involved in fairlet, Backurs et al. [2] provide a scalable fair clustering algorithm with approximate fairlet decomposition that runs in nearly linear time. Wang and Davidason [31] extend the single sensitive attribute setting to the one with multi-state protected variable. Additionally, Suman et al. [3] propose to transform any given clustering solution to a fair one with multiple protected subgroups. Many other work also exist that are based on the classical clustering algorithm with fair constraints [39, 27, 18, 22]. + +Despite the abundant existing literature on fair clustering, most of them cast it as a classical balanced clustering problem [25] with equal proportions of protected subgroups in each cluster as a constraint. Furthermore, existing work mostly focuses on empirical validations with low-dimensional input data, and their performance on large-scale and high-dimensional visual data has not been fully + +understood, especially in the settings where sensitive attributes are deeply embodied in images that act as a background or entity style. Often the case for visual data, the original input space does not contain high-level and abstract representations that can be used to discover the intrinsic and underlying clustering structure for cluster analysis. + +Motivated by the aforementioned limitations of existing fair clustering methods, in this paper, we propose Deep Fair Clustering (DFC) to learn both fair and effective representations that are also amenable for cluster analysis. We summarize main contributions in this paper as follows. + +- We consider fair clustering in the context of deep representation learning for large-scale and high-dimensional visual learning. To the best of our knowledge, this important setting has not been studied so far. Towards the cluster validity and fairness in clustering results, our approach seeks to find feature mappings that are amenable for structure discovery and can simultaneously filter out the sensitive attributes. +- We propose a minimax optimization formulation to encourage cluster analysis to be independent of sensitive attributes. Furthermore, we provide a theoretical analysis showing that the fairness constraint in DFC does not cause much utility loss according to cluster validity, which is a desirable property to have. +- We evaluate DFC on four real-world visual datasets. Extensive experimental results demonstrate the superior performance of the proposed method over several competitors in terms of both cluster validity and fairness measurement. Additionally, we present in-depth explorations, including representation visualization, fairness evaluation, and parameter analysis, to help better understand our fair clustering method. + +# 2. Related Work + +We discuss related work on fair machine learning and recent clustering methods, and specifically on fair clustering and deep clustering, which are most relevant to our work. + +As argued by a series of related work [9, 8, 15], many existing learning systems suffer from unfair issues in terms of sensitive attributes (e.g., sex, race, gender), due to the bias in data and models, and it is hence urgent to mitigate the inadvertently encoded bias and unfairness in these systems. Recently, fairness in machine learning has been widely discussed under different problem settings [10]. Seeking fair representations and eliminating the effect caused by sensitive attributes are requisite tasks to achieve fairness in learning systems. Of course, fairness is often at odds with utility maximization [38], so the goal here is to find a good balance between these two. One line of work to achieve this goal is through learning fair representations using adversarial training techniques [24, 33, 37], where the representa + +tions are learned to filter out information related to sensitive attributes. This line of work mostly focuses on the supervised learning setting where the utility is often characterized by the accuracy of target tasks. In unsupervised learning, in particular in cluster analysis, Chierichetti et al. [7] pioneer this novel concept by embedding fairness constraints and encouraging clusters to have balanced sensitive demographic subgroups. They propose fairlet by employing a pre-processing technique to first partition the original data into chunks, followed by a $k$ -center algorithm to achieve fairness. Schmidt et al. [29] extend fairlet for the object of $k$ -means clustering. However, the fairlet procedure used in these algorithms requires at least quadratic running time and cannot scale to large datasets. To this end, Backurs et al. [2] propose a tree metric based near-linear time algorithm for fairlet decomposition. Beyond fairlet, Bera et al. [3] solve the vanilla clustering problem first and then make a fair assignment, which transforms a wide range of clustering objectives to their fair solutions. Ziko et al. [39] derive a KL-based fairness penalty and impose it on any desired demographic proportions within each cluster. Subsequently, fair $k$ -center algorithm for multiple groups is proposed [27], and Kleindessner et al. [18] also introduce fair constraints into spectral clustering. More recently, Wang and Davidaason [31] extend to multiple protected subgroups and incorporate neural network to learn a discriminative but fair assignment function. Although existing work are pioneering, they sacrifice clustering quality in pursuit of fairness. Moreover, clustering on large-scale high-dimensional visual data under the fairness constraint remains unexplored, and our work makes a step forward in this direction. + +Deep clustering aims to learn clustering-favorable representations for complex intrinsic structure discovery. Towards clustering objective functions, deep clustering brings significant performance improvements via learnable feature transformation. Xie et al. [32] train an encoder with the KL-divergence term to make assignments confidently and prevent large clusters and feature collapse. Similarly, Yang et al. [34] learn a subspace through deep learning and clustering simultaneously. One step further, Caron et al. [5] extend the pipeline to an end-to-end training on large scale visual datasets and group features with a standard clustering algorithm. Other interesting work continually bring novel insights to this line of research, including pair-wise similarity deep clustering [6], deep learning with spectral clustering [20], minimizing relative entropy [11], deep transfer clustering [13], and deep clustering with generative model [26], adversarial learning [30], and Gaussian mixture model [35]. However, fairness in deep clustering has not been well addressed so far. In order to get a desirable and fair partition, it is essential to design applicable fair constraints for deep clustering training so as to hide sensitive attributes for clustering assignments. + +# 3. Problem Definition and Motivations + +In this paper, we focus on partitional cluster analysis that aims to separate a set of data points $X$ with categorical sensitive attribute $G$ into $K$ disjoint subgroups, where all the data points are sampled i.i.d. from an underlying distribution $\mathcal{D}$ , and $G = G(X)$ takes value in $[M]^{1}$ . Formally, let $C = C(X)$ be the clustering assignment given by a (randomized) clustering algorithm $C$ applied to data $X$ . As a motivating example, in social network analysis where each data point corresponds to a vectorial description of a user, the sensitive attribute $G$ could be the race or gender of an user. In this context, the goal of fair clustering is to partition data points into $K$ disjoint clusters while simultaneously ensures that sensitive attribute has no influence on the partitioning result, i.e., $C(X)$ is statistically independent of $G$ . In other words, the sensitive attribute $G$ has no influence on the clustering result given by the algorithm $C$ . + +Note that our definition of fairness in the context of cluster analysis is stronger than that of the existing work on this topic [3, 39, 31], where the goal is usually to ensure that the proportion of the protected subgroup membership $G$ is approximately equal in all the clusters. To see this, note that when $G$ is a categorical variable, under the condition that $C(X)$ is independent of $G$ , we have: + +$$ +\mathbb {E} _ {X \sim \mathcal {D}} [ G \mid C (X) = c ] = \mathbb {E} _ {X \sim \mathcal {D}} [ G ], \forall c \in [ K ], \tag {1} +$$ + +which shows our fairness criterion implies the one used in several of the existing fair clustering work. + +On the other hand, the quality of clustering is often sensitive to the metric space in which the analysis is conducted. Specifically, for high-dimensional visual data, it is often not desirable to directly conduct cluster analysis based on the pixel-level distance between input images. Recent advances in representation learning [21, 19, 14, 16] have demonstrated that deep neural networks are capable of extracting hierarchical features that can often facilitate large-scale classification, segmentation and detection tasks. Motivated by these observations, in this work we propose a clustering algorithm that can leverage the rich representations given by deep neural nets for clustering and simultaneously being fair w.r.t. a given sensitive attribute in a strong sense. + +# 4. Deep Fair Clustering + +In this section we propose deep fair clustering, where the fair and clustering-favorable representations can be obtained by a unified framework. The goal is to learn feature representations that are not only free of sensitive attributes, but also are favorable for the following cluster analysis. + +![](images/09e22a00d04fa5c1b7f0af0c1816208a4ad3c79ff10897338229296f5d82d752.jpg) +Figure 2. Overview of Deep Fair Clustering. The proposed method incorporates adversarial fairness to achieve group invariant cluster assignment and structural preservation to deliver partition with guaranteed cluster validity. + +# 4.1. Framework Overview + +Figure 2 shows the overall framework of the proposed Deep Fair Clustering (DFC) for fair and clustering-favorable representation learning. To generate fair representations, DFC uses the min-max game strategy with the encoder producing the expected representation and the discriminator predicting protected subgroup membership. Fair representations are achieved when the discriminator cannot distinguish between representations from different protected subgroups. However, this is not enough to guarantee the representation is effective for data partition. Due to the unsupervised nature of cluster analysis, we propose a self-supervised structural preservation objective to guide representation learning. We assume that if a pair of data points in one protected subgroup is similar to each other, then they should be assigned the same cluster label in fair clustering as well. To achieve this, we separately conduct the clustering algorithm on each protected subgroup and obtain the pseudo soft assignments to guide deep fair clustering. + +# 4.2. Objective Function + +Let $\mathcal{D}$ , $\mathcal{F}$ , and $\mathcal{A}$ represent the functions of discriminator, encoder, and cluster assignment, respectively. We have the hidden representation $Z = \mathcal{F}(X)$ . The assignment $\mathcal{A}:\mathcal{Z}\to \mathbb{R}^{N\times K}$ is a kernel function, and the soft assignment is obtained by $P = \mathcal{A}(Z)$ . $\mathcal{D}:P\to \mathbb{R}^{N\times M}$ is the protected subgroup membership discriminator. The objective function of the proposed Deep Fair Clustering consists of three parts, fairness-adversarial loss, structural preservation loss, and clustering regularizer. In what follows, we provide details on these three separate terms and the clustering label assignment strategy for the proposed model. + +Fairness-Adversarial Loss. When the sensitive attribute $G$ is a categorical variable, we aim to achieve our fairness definition by encouraging the partition to be statistically independent of each sensitive attribute. To achieve this goal, we expect the distribution of soft assignments for samples belonging to different protected subgroups to + +be close, i.e., to minimize the distribution divergence on cluster assignments between different subgroups. By reducing the divergence, the partitioning across all subgroups approach to the same, so that DFC enables each cluster to hold equivalent fractions of samples from different protected subgroups and executes cluster analysis unrelated to sensitive attributes. We implement a method based on the adversarial training technique as it delivers favorable performance in both learning and approaching a given distribution [12]. The fairness-adversarial loss can be written as: + +$$ +\mathcal {L} _ {f} := \mathcal {L} (\mathcal {D} \circ \mathcal {A} \circ \mathcal {F} (X), G), \tag {2} +$$ + +where $\mathcal{L}$ is the cross-entropy loss function, and $\circ$ denotes the function composition. Here we maximize $\mathcal{D}$ with the probability of assigning the correct membership label for each sample, and expect assignments obtained by $\mathcal{F}$ and $\mathcal{A}$ to confuse $\mathcal{D}$ simultaneously. $\mathcal{F},\mathcal{A}$ and $\mathcal{D}$ conduct the minimax game for fairness-adversarial loss that ensures partition distributions over all the subgroups similar to each other. + +Structural Preservation Loss. The above fairness-adversarial term encourages invariant soft assignments w.r.t. different protected subgroups and leads to a model that is invariant to sensitive attributes. However, there is a degenerate solution where the representation function $\mathcal{F}$ reduces to a constant function if we solely optimize $\mathcal{L}_f$ . Such constant mapping will destroy the existing structure for cluster analysis in the original data. To this end, in order to capture clustering-favorable representation under the constraint of fairness and unsupervised nature, we move a step further towards the goal of preserving the clustering structure inside each subgroup. Specifically, we expect the subsets of deep fair clustering for each protected subgroup hold similar cluster structures with the partition individually on each protected subgroup. From this point of view, we propose a structural preservation loss $\mathcal{L}_s$ as follows: + +$$ +\mathcal {L} _ {s} := \sum_ {g \in [ M ]} \left\| \hat {P} _ {g} \hat {P} _ {g} ^ {\top} - P _ {g} P _ {g} ^ {\top} \right\| ^ {2}, \tag {3} +$$ + +where $\hat{P}_g$ and $P_{g}$ are the soft assignment on $g$ -th protected subgroup in the individual partition and deep fair clustering. + +Clustering Regularizer. Inspired by other deep clustering [5, 6], we employ a clustering regularizer to strengthen the predicted confidence and prevent large clusters. Different from [32], we carry out the clustering regularizer on each protected subgroup to avoid that one cluster is dominated by instances with the same sensitive attribute. The auxiliary target distribution $Q$ is firstly calculated by: + +$$ +q _ {k} = \frac {\left(p _ {k}\right) ^ {2} / \sum_ {x \in X _ {g}} p _ {k}}{\sum_ {k ^ {\prime} \in [ K ]} \left(\left(p _ {k ^ {\prime}}\right) ^ {2} / \sum_ {x \in X _ {g}} p _ {k ^ {\prime}}\right)}, \tag {4} +$$ + +where $p_k$ is the probability of sample $x$ assign to $k$ -th cluster, and $X_g$ is the subgroup that the instance belong to. The + +clustering constrained loss is KL divergence between soft assignment and auxiliary target distribution: + +$$ +\mathcal {L} _ {c} := K L (P \mid | Q) = \sum_ {g \in [ M ]} \sum_ {x \in X _ {g}} \sum_ {k \in [ K ]} p _ {k} \log \frac {p _ {k}}{q _ {k}}. \tag {5} +$$ + +Clustering Assignment. We follow [32] to use Student t-distribution for assignment, which can be calculated as: + +$$ +p _ {k} = \frac {\left(1 + \| z - c _ {k} \| ^ {2} / \alpha\right) ^ {- \frac {\alpha + 1}{2}}}{\sum_ {k ^ {\prime} \in [ K ]} \left(1 + \| z - c _ {k ^ {\prime}} \| ^ {2} / \alpha\right) ^ {- \frac {\alpha + 1}{2}}} \tag {6} +$$ + +where $\alpha$ is the degree of freedom of Student's t-distribution. $p_k$ represents the assigned confidence between representation $z$ and cluster $c_k$ . To sum up, the overall objective function for the proposed deep fair clustering can be written as the following minimax saddle point problem: + +$$ +\max _ {\mathcal {F}, \mathcal {A}} \alpha_ {f} \mathcal {L} _ {f} - \alpha_ {s} \mathcal {L} _ {s} - \mathcal {L} _ {c}, \tag {7} +$$ + +$$ +\min _ {\mathcal {D}} \alpha_ {f} \mathcal {L} _ {f}, \tag {8} +$$ + +where $\alpha_{f}$ and $\alpha_{s}$ are trade-off hyper-parameters. + +# 4.3. Theoretical Analysis + +In the above, we use the adversarial fairness term as a regularizer to find clusters that are invariant w.r.t. the sensitive attribute. In this subsection, we provide formal analysis on the impact of fairness constraint on the clustering quality. In the limit of perfectly fair clustering, the quality of clustering results on the whole population is almost as good as that on each protected subgroup. In a nutshell, this result implies that in a sense our algorithm does not incur extra quality loss under our fairness constraint. + +Assume that each data point $x$ has a corresponding external label $y \in \mathcal{V}$ . For example, in the case of digit clustering, the external label $y$ corresponds to the digit label of the input image. To this end, we use variable $Y$ to denote the external label of $X$ . Given a clustering assignment $C(X)$ , this defines a joint distribution over $Y$ and $C(X)$ from which we use the mutual information $I(Y; C(X))$ as a measure of the quality of clustering algorithm. It is easy to verify that $I(Y; C(X))$ is invariant under label shuffling, which makes it a particularly suited measure in cluster analysis. Intuitively, the higher the mutual information $I(Y; C(X))$ , the more aligned the clustering result is with the structure given by the external label. Based on these notations, we have the main theorem of deep fair clustering written as follows: + +Theorem 4.1. Let $X \sim \mathcal{D}$ be the input random variable of the clustering algorithm $C$ . If the clustering assignment $C(X)$ is independent of the sensitive attribute $G$ , then + +$$ +I (Y; C (X)) \leq \sum_ {g \in [ M ]} \Pr (G = g) \cdot I \left(Y _ {g}; C \left(X _ {g}\right)\right), \tag {9} +$$ + +Table 1. Characteristics of four datasets used in experiments. Due to the discrepancy in the ratio of the number of instances in different protected subgroups and the number of classes, the maximum value of Balance and Entropy are different across four datasets. + +
DatasetType# Instances# Classes# Dim.Sensitive AttributeMax of Bal.Max of Ent.
MNIST-USPSdigital67,291101,024source of digital0.1202.303
Color Reserve MNISTdigital120,000101,024original or reversed1.0002.303
MTFLface2,000250,176with or w/o glasses1.0000.693
Office-31(A&W)object3,6123150,176domain source0.2733.434
+ +![](images/e4d6cda5fab32379d619b7ff2a95b94975119ad6950baeb437676763d78cdaa4.jpg) +Figure 3. Visual examples in four datasets. From left to right column, three columns represent one dataset: MNIST-USPS, MTFL, MNIST, and Office-31. The upper and lower row present images with different protected attributes: from MNIST or from USPS; with glasses or without glasses; reversed one or the original one; select from Amazon or select from Webcam. + +![](images/12134ae9d76ad59fb953535fa77981f8628ae14118e661ac3c1c2282f8723441.jpg) + +![](images/6657a951d9b387bc1798b8acda240360e6944d06e6b6faabf9483e4259c25c61.jpg) + +![](images/7f95cd6f939ba99d4a8104e7069012ae5612a421503aed47ca8e5e44b5633e2f.jpg) + +where $X_{g}$ is the input random variable in the $g$ -th protected subgroup and $Y_{g}$ is the corresponding external label of $X_{g}$ . + +Realize that without any assumption, the mutual information is neither convex nor concave in terms of the joint distribution over $C(X)$ and $Y$ . As a comparison, under our fairness constraint, i.e., clustering assignment $C(X)$ is independent of the sensitive attribute $G$ , then Theorem 4.1 claims that the mutual information $I(C(X);Y)$ becomes convex, which implies that the overall clustering quality can be bounded by a convex combination of the individual clustering quality when applying the same algorithm $C(\cdot)$ to each protected subgroup. Similarly, if the entropy of cluster assignment is chosen to measure the balance of clustering (as one of the measurements we conduct in experiments), we have a nicer proposition as follows: + +Proposition 4.1. Let $X \sim \mathcal{D}$ be the input random variable of the clustering algorithm $C$ . If the clustering assignment $C(X)$ is independent of the sensitive attribute $G$ , then + +$$ +H (C (X)) = \sum_ {g \in [ M ]} \Pr (G = g) \cdot H (C (X _ {g})). \tag {10} +$$ + +In words, Proposition 4.1 shows that under the fairness constraint, if the clusters are well-balanced in size when we apply the same algorithm $C(\cdot)$ individually on each demographic subgroup, the clusters will also be balanced if instead we use all the data for clustering. + +# 5. Experimental Analysis + +In this section, we provide extensive experimental results on four datasets. Recent methods of deep clustering and fair clustering are used for comparison to demonstrate the superior of deep fair clustering in terms of cluster validity and fairness measurement, respectively. Finally, we provide in-depth explorations for our method in four aspects. + +# 5.1. Setup for Experiments + +Dataset. Four public datasets are simulated to evaluate deep fair clustering. Some characteristics and visual examples of these four datasets are shown in Table 1 and Figure 3. (1) MNIST-USPS. We construct MNIST-USPS dataset using all the training digital samples from MNIST $^3$ and $\mathrm{USPS^4}$ dataset, and set the sample source as the protected attribute (MNIST or USPS). (2) Color Reverse MNIST. We reverse images from MNIST via pixel=255-pixel and concatenate original images to build this dataset. Here the sample source from reversed or original one is set as the protected attribute. (3) MTFL. Multi-task Facial Landmark (MTFL) dataset [36] consists of 12,995 images used for facial recognition and landmarks detection. It also labels every image with gender, smiling, with or w/o glasses, and the degree of the pose. We set the glasses-wearing as the protected attribute and measure the clustering validity toward gender. We randomly sample 1,000 images with and without glasses to build the balanced dataset for fair clustering. (4) Office-31. This dataset [28] is originally used for domain adaptation. It consists of images with 31 different categories collected from three distinct domains: Amazon, Webcam, and DSLR. Each domain contains all the categories but with different shooting angles, lighting conditions, or the form of presentation, etc. We select Amazon and Webcam for our experiments because these two has the largest domain divergence, and set the domain source as the protected attribute. + +Implementation. We employ convolutional variational autoencoder for MNIST-USPS and Color Reverse MNIST datasets. We pretrain the autoencoder with sample self-construction and use the encoder for fair feature learning. The encoder consists of four convolutional layers followed with batch normalization and non-linear activation. The + +Table 2. Quantitative results on MNIST-USPS and Color Reverse MNIST datasets in terms of cluster validity and fairness. + +
MNIST-USPS
MethodAccNMIBalanceEntropy
AE [17]0.6240.5040.0172.294 / 2.053
DEC [32]0.5860.6860.0002.082 / 1.735
DAC [6]0.7570.7030.0002.188 / 0.000
CIGAN [26]0.3430.2120.0002.096 / 1.912
ScFC [2]0.1760.0530.1202.219 / 2.219
SpFC [18]0.1620.0480.0002.196 / 1.902
FCC [39]0.5600.4610.0322.288 / 2.193
FAlg [3]0.6210.4960.0932.295 / 2.227
Ours0.8250.7890.0672.301 / 2.265
+ +
Color Reverse MNIST
MethodAccNMIBalanceEntropy
AE [17]0.3570.3520.0051.850 / 1.645
DEC [32]0.4010.4800.0001.774 / 1.384
DAC [6]0.3090.1930.6232.291 / 2.289
CIGAN [26]0.1660.0340.0000.669 / 1.995
ScFC [2]0.2680.1051.0002.277 / 2.277
SpFC [18]0.1370.0200.0001.767 / 2.035
FCC [39]0.3490.2950.0211.904 / 1.638
FAlg [3]0.2950.2060.6672.253 / 2.287
Ours0.5770.6790.7632.294 / 2.301
+ +decoder is the same but reversed architecture. For $MTFL$ and $Office-31$ , considering their complex and high resolution images, we use ImageNet-pretrained ResNet50 [14] as the feature extractor. We resize images to $32 \times 32$ and set batch size as $b = 512$ for two digital datasets, and $224 \times 224$ with batch size $b = 128$ for the latter two. We set trade-off hyper-parameters in overall objective function default to 1. For $Office-31$ , to ensure the model convergence, we calculate $\alpha_{s} = (512 / 128)^{2} \cdot (31 / 10)$ with respect to the number of clusters and batch size in MNIST-USPS. We set initial learning rate $lr_{init} = 1e - 4$ for Adam optimizer, then gradually adjust learning rate by $lr = lr_{init}(1 + 10t)^{-0.75}$ , where $t$ is the training process changed from 0 to 1 linearly, and train till its convergence. The learning rate for the discriminative classifier is 10 times the learning rate for encoder and centroids. $\alpha$ in Student's t-distribution is set to 1. + +Competitive Methods. Except feature extraction conjunct with K-means [1], we include three deep clustering methods, Deep Embedding Clustering [32], Deep Adaptive Clustering [6], and ClusterGAN [26], and four fair clustering algorithms, Scalable Fair Clustering [2], Spectral Fair Clustering [18], Fairness Constraints Clustering [39], and Fair Algorithm for Clustering [3] for comparison, thanks to their open-source codes. Notably, we use the same encoder architecture for all comparable methods for feature extraction to achieve fair comparison. For Spectral Fair Clustering, we construct adjacency weight graph by Gaussian kernel, and randomly select 5,000 samples from MNIST-USPS and Color Reverse MNIST datasets for the experiment, respectively, because the original size of adjacency matrix is exceeded 32GB the maximum of experimental memory. + +Table 3. Quantitative results on MTFL and Office-31 dataset in terms of cluster validity and fairness. + +
MTFL
MethodAccNMIBalanceEntropy
ResNet50 [14]0.6480.1760.4060.693 / 0.509
DEC [32]0.5200.0300.7110.660 / 0.576
DAC [6]0.5630.0020.9500.665 / 0.673
CIGAN [26]0.7270.1610.4900.600 / 0.675
ScFC [2]0.6270.0301.0000.666 / 0.576
SpFC [18]0.5650.0400.8360.683 / 0.652
FCC [39]0.6580.1740.5310.693 / 0.578
FAlg [3]0.6600.1810.6660.689 / 0.613
Ours0.7190.1900.9860.693 / 0.693
+ +
Office-31
MethodAccNMIBalanceEntropy
ResNet50 [14]0.6410.6910.0003.299 / 2.775
DEC [32]0.5460.6040.0003.063 / 2.937
DAC [6]0.0630.0410.0541.199 / 0.918
CIGAN [26]0.5160.5360.0003.341 / 3.079
ScFC [2]0.0900.0560.2733.248 / 3.248
SpFC [18]0.0960.1090.0003.260 / 3.055
FCC [39]0.6520.6930.1733.401 / 3.400
FAlg [3]0.6890.7130.1963.343 / 3.337
Ours0.6920.7180.1173.422 / 3.403
+ +Metrics. We conduct four measurements in experiments, where Accuracy and Normalized Mutual Information (NMI) evaluate the cluster validity by comparing the obtained partition and external ground true labels. Balance and Entropy measure the balancing degree of discovered clusters towards the protected attribute in each dataset. These four measurements are calculated as follows: + +$$ +\begin{array}{l} A c c u r a c y = \frac {\sum_ {i = 1} ^ {n} \mathbb {1} _ {y _ {i} = \operatorname {m a p} (\hat {y} _ {i})}}{n}, \\ N M I = \frac {\sum_ {i , j} n _ {i j} \log \frac {n \cdot n _ {i j}}{n _ {i +} \cdot n _ {+ j}}}{\sqrt {\left(\sum_ {i} n _ {i +} \log \frac {n _ {i +}}{n}\right) \left(\sum_ {j} n _ {j +} \log \frac {n _ {+ j}}{n}\right)}}, \\ \text {B a l a n c e} = \min _ {i} \frac {\operatorname* {m i n} _ {g} | \mathcal {C} _ {i} \cap X _ {g} |}{n _ {i +}}, \\ E n t r o p y = - \sum_ {i} \frac {| \mathcal {C} _ {i} \cap X _ {g} |}{n _ {i +}} \log \frac {| \mathcal {C} _ {i} \cap X _ {g} |}{n _ {i +}}, \\ \end{array} +$$ + +where $\mathbb{1}$ is the indicator function, and $\mathrm{map}(\hat{y}_i)$ is permutation mapping function that maps each cluster label $\hat{y}_i$ to the ground truth label $y_{i},\mathcal{C}_{i}$ and $X_{g}$ denote the $i$ -th cluster and the $g$ -th protected subgroup, $n_{ij},n_{i + }$ and $n_{+j}$ represent the co-occurrence number and cluster size of $i$ -th and $j$ -th clusters in the obtained partition and ground truth, respectively, and $n$ is the total data instance number. + +Accuracy and NMI are two positive metrics to evaluate the cluster quality in terms of classification and information theory, where a larger value indicates better performance. Balance measures the minimum ratio of numbers of samples from different protected subgroups across all the clusters, and the upper bound for Balance is determined by the + +![](images/4a27015b44fa93b33ca2cd6102c226fe71efbe8f8a36a517d2f0d39d36308e6d.jpg) +(a) $\operatorname{Iter} = 0$ + +![](images/fd0bea71db4fbba9a67bed0b5863dd8877096cd14ec2f6e1c67684e2c01dc4e2.jpg) +(b) $\operatorname{Iter} = 300$ +Figure 4. Feature space visualization on Color Reverse MNIST. Samples from different protected subgroups are colored in either red or blue. Green inverted triangles represent centroids. With the training goes on, features perform clustering structures, and each cluster contains features with different colors. The final feature space is fair to protected attributes and becomes clustering-favorable as well. + +![](images/4cbf54f1cbdde134d8af0b51a6e39b6ce16119ba16b909afcfb809c118988b13.jpg) +(c) $\operatorname{Iter} = 2000$ + +![](images/8785859afe3370b1a481a16b8fb57762dae4e3aeee8dd3aa9dc16b344b93fae6.jpg) +(d) $\operatorname{Iter} = 7000$ + +![](images/67a0df11c4dc7bb7f0b0c24f36121ca526ce73b60f4f6eb792a57d77043067d9.jpg) +(e) $\operatorname{Iter} = 15000$ + +given data distribution. During clustering, one protected subgroup might get empty in one cluster and Balance goes to zero, which makes this metric too harsh for fair clustering evaluation. Here we add Entropy as a compliment that reflects the distribution of predictions as well as how unfairness the clusters are suffering from. Low entropy reveals that one subgroup of samples only assigns to a few clusters, while other clusters are with great unfairness. + +# 5.2. Quantitative Evaluation + +We provide quantitative evaluation in Table 2 and Table 3, where red indicates the highest result, and blue indicates the second highest one. As shown in tables, deep clustering methods achieve better clustering results compared to fair clustering on Accuracy and NMI. However, these methods are not primarily designed for fair clustering, they perform poorly in terms of Balance and Entropy. When there exist feature distribution divergences across different protected subgroups, deep clustering methods that only rely on unsupervised trained unfair representations easily partition given data on the basis of protected attributes and lead to unfairness. For fair clustering methods, these methods add fair constraints on original features before or after some clustering algorithm. Although these methods work well on low-dimensional datasets, they fail on high-dimensional large-scale visual data where protected attributes are inserted deeply in images which act as a background or entity style instead of a clear attribute indicator. As pointed out, current fair clustering methods sacrifice the clustering quality to achieve fairness. Note that although the fairlet based method Scalable Fair Clustering always achieves the best and maximum balance value, it performs weakly on clustering validity, and this is meaningless if we only consider fairness and no matter how the quality of partition is. The ultimate aim for fair clustering should be the object that finds an informative as well as a fair partition. It is much difficult to valid on clustering quality if only focus on clustering constraints on representation space without any learnable and clustering information preserved feature transformation. Moreover, these methods only re-assign data points with fair constraint and assume initial centroids are well applicable for fair partition. However, in our ex + +Table 4. Classification accuracy on protected subgroup prediction with unfair and fair representations. The lower, the better. + +
Unfair RepresentationsFair Representations
MNIST-USPS0.9950.712
Color Reverse MNIST1.0000.521
MTFL0.9820.919
Office-310.9970.841
+ +periments, the maintain of centroids requires extensive reassignment to achieve clustering validity. Differently, in deep fair clustering, the moving of centroids along the training process can better preserve clustering structures under fair constraints. In general, deep fair clustering consistently achieves promising results across all four real-world datasets in terms of both clustering quality and fairness. + +# 5.3. In-depth Exploration + +In this subsection, we present exploration inside the deep fair clustering model with regard to four different aspects. We firstly visualize feature transformations during the training process, and show that learned features are clustering favorable and balanced in both. Next, by using an additional classifier, we demonstrate that the trained encoder successfully filter information owned to sensitive attributes within outputted features. Subsequently, guiding by the clustering structure in each protected subgroups, we reveal the worst and best class alignment across protected subgroup and compare them to deep fair clustering. Finally, we conduct experiments with various settings for hyper parameters and hereby verify the effect of each proposed component. + +Feature Visualization. We use Color Reverse MNIST dataset for visualization due to the balanced sensitive attribute in each cluster via t-SNE [23] along the training process. As shown in Figure 4, the encoder at the very beginning, separates features according to their protected attribute as denotes by the color red and blue. That is because the protected attributes play a dominate role in feature representations initially. Also, the site for centroids leads the partition at that time only reflect protected attribute distribution. As the training goes on with the aim of the proposed objective function, the clustering structure starts to emerge and features with different protected attributes begin to merge. In the end, every cluster contains features that + +![](images/e9da0528d15ff83511d35aa1f438ed966191648984f7fab0776d1bf70556ad47.jpg) +Figure 5. Clustering accuracy comparison on fair clustering with the best & the worst class matching. Deep fair clustering continually outperforms worst matching by a large margin and approach closely to best matching on some datasets. + +come from different protected attributes and achieve fairness within each cluster. At the same time, the clustering structures for features are well performed, and centroids are learned to be at the center of each cluster of features, both of which lead features to be clustering-favorable. + +Fair Representations. Here we showcase our fair representations is effective not only evaluated by external sensitive attributes, but also validated by the well-trained classifier. Taking original images as input, we firstly train a classifier conjunct an encoder (same architecture with previous experiments for each dataset) jointly from scratch using the membership of different protected subgroups as labels. We report training accuracy in Table 4 on two different representations with the same type of classifier. Results show that membership for each protected subgroup can be well recognized by the classifier with unfair representations as the input. The classifier achieves accuracy close to $100\%$ on four datasets, which means protected attributes can be easily detected by label-oriented representations, and these representations can be seen as an unfair one. Next, to show the fairness in our proposed method, we use representations outputted by the fair encoder obtained by deep fair clustering to serve as input for the classifier, then train the classifier using memberships as labels the same to the previous experiment. With the same procedure the classifier performance on our learned representation drops. The gap demonstrates that representations in deep fair clustering correlate slightly with protected attributes, where even the well-trained classifier is hard to detect different memberships. + +Label Matching. Fair clustering problem can also be viewed as a cluster label matching problem, where the complete dataset is split into several protected subgroups by the sensitive attributes. Followed by the partition on each sub-datasets, we obtain the final clustering achieved by matching the cluster labels among several partitions. However, we cannot guarantee the cluster across different partition match correctly since there is no guidance in the matching process. When $K$ is large, the matching suffers from a considerable high risk of cluster misalignment. Here we approximate the clustering accuracy of the best and worst matching by the + +![](images/030b0aa2386943e259626e1e8c1bec9b21b6ad466e047ae9e7b94bcd353e8b1b.jpg) +(a) $\alpha_{f}$ . Y-axis denotes Balance. + +![](images/29c6667db4ea85a540b6a39eacc8534dc42e398da5d9a390f5bb962a57c934fd.jpg) +(b) $\alpha_{s}$ . Y-axis denotes NMI. +Figure 6. Parameter analysis on $\alpha_{f}$ and $\alpha_{s}$ . (a) $\alpha_{s}$ is set as 0 with varied $\alpha_{f}$ to show how adversarial fairness contributes to balance. (b) $\alpha_{f}$ is set as 1 with varied $\alpha_{s}$ to show the enhancement on clustering quality brought by structural preservation. + +above procedure, where the calculation is illustrated in the supplementary material. Figure 5 shows the clustering accuracy comparison on fair clustering the best and the worst matching performance. For ScPC and SpFC, they, unfortunately, perform even worse than the worst matching with unfair deep representation. This verifies one of our motivations for fair and clustering-favorable representation learning. On the contrary, deep fair clustering consistently surpasses the worst matching and is approximate to the accuracy of best matching on MNIST-USPS, MTFL and Office-31. It demonstrates that deep fair clustering is capable of capturing the similarity between samples across different protected subgroups, and the delivered partition is effective according to both clustering quality and fairness. + +Parameter Analysis. It is straightforward to see that adversarial fairness and structural preservation contribute to clustering balance and quality, which are controlled by the hyper-parameter $\alpha_{f}$ and $\alpha_{s}$ , respectively. We conduct experiments on several choices of parameters in our objective function and report the corresponding performance in Figure 6. When $\alpha_{s} = 0$ , our model removes the structural preservation term and $\alpha_{f}$ controls the fair representation learning. A large value of $\alpha_{f}$ leads to a more balanced partition. On the contrary, $\alpha_{s}$ plays a crucial role in making the learned representations favorable to partition, where a large value of $\alpha_{s}$ indicates a high-quality data partition. + +# 6. Conclusion + +In this paper, we considered fairness in deep clustering for large-scale high-dimensional visual learning, and proposed a deep fair clustering method to learn a fair and clustering-favorable representation for clustering and simultaneously to hide sensitive attributes. Moreover, we theoretically analyzed the performance guarantee of clustering quality with fairness constraint. Extensive experimental results on four visual datasets demonstrated the superior performance of our proposed methods over the recent fair clustering and deep clustering methods in terms of both the performance of cluster validity and fairness measurement. + +# References + +[1] David Arthur and Sergei Vassilvitskii. k-means++: The advantages of careful seeding. In Proceedings of the Eighteenth Annual ACM-SIAM Symposium on Discrete Algorithms, 2007. 6 +[2] Arturs Backurs, Piotr Indyk, Krzysztof Onak, Baruch Schieber, Ali Vakilian, and Tal Wagner. Scalable fair clustering. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of The 36th International Conference on Machine Learning, 2019. 1, 2, 6 +[3] Suman K Bera, Deeparnab Chakrabarty, and Maryam Negahbani. Fair algorithms for clustering. arXiv preprint arXiv:1901.02393, 2019. 1, 2, 3, 6 +[4] Joy Buolamwini and Timnit Gebru. Gender shades: Intersectional accuracy disparities in commercial gender classification. In Conference on fairness, accountability and transparency, pages 77-91, 2018. 1 +[5] Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze. Deep clustering for unsupervised learning of visual features. In Proceedings of The European Conference on Computer Vision, 2018. 2, 4 +[6] Jianlong Chang, Lingfeng Wang, Gaofeng Meng, Shiming Xiang, and Chunhong Pan. Deep adaptive image clustering. In Proceedings of The IEEE International Conference on Computer Vision, 2017. 2, 4, 6 +[7] Flavio Chierichetti, Ravi Kumar, Silvio Lattanzi, and Sergei Vassilvitskii. Fair clustering through fairlets. In Advances in Neural Information Processing Systems, 2017. 1, 2 +[8] Alexandra Chouldechova and Aaron Roth. The frontiers of fairness in machine learning. arXiv preprint arXiv:1810.08810, 2018. 1, 2 +[9] Michele Donini, Luca Oneto, Shai Ben-David, John Shawe-Taylor, and Massimiliano Pontil. Empirical risk minimization under fairness constraints. In Advances in Neural Information Processing Systems, 2018. 1, 2 +[10] Cynthia Dwork, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Richard Zemel. Fairness through awareness. In Proceedings of the 3rd Innovations in Theoretical Computer Science Conference, 2012. 2 +[11] Kamran Ghasedi Dizaji, Amirhossein Herandi, Cheng Deng, Weidong Cai, and Heng Huang. Deep clustering via joint convolutional autoencoder embedding and relative entropy minimization. In Proceedings of The IEEE International Conference on Computer Vision, 2017. 2 +[12] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems. 2014. 4 +[13] Kai Han, Andrea Vedaldi, and Andrew Zisserman. Learning to discover novel visual categories via deep transfer clustering. In Proceedings of The IEEE International Conference on Computer Vision, 2019. 2 +[14] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of The IEEE Conference on Computer Vision and Pattern Recognition, 2016. 3, 6 + +[15] Ben Hutchinson and Margaret Mitchell. 50 years of test (un)fairness. Proceedings of the Conference on Fairness, Accountability, and Transparency - FAT* '19, 2019. 1, 2 +[16] Forrest Iandola, Matt Moskewicz, Sergey Karayev, Ross Girshick, Trevor Darrell, and Kurt Keutzer. Densenet: Implementing efficient convnet descriptor pyramids. arXiv preprint arXiv:1404.1869, 2014. 3 +[17] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. 6 +[18] Matthäus Kleindessner, Samira Samadi, Pranjal Awasthi, and Jamie Morgenstern. Guarantees for spectral clustering with fairness constraints. In Proceedings of The 36th International Conference on Machine Learning, 2019. 1, 2, 6 +[19] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, 2012. 3 +[20] Marc T. Law, Raquel Urtasun, and Richard S. Zemel. Deep spectral clustering learning. In Proceedings of The 34th International Conference on Machine Learning, 2017. 2 +[21] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of The IEEE, 1998. 3 +[22] Tongliang Liu, Dacheng Tao, and Dong Xu. Dimensionality-dependent generalization bounds for k-dimensional coding schemes. Neural Computation, 28(10):2213-2249, 2016. PMID: 27391679. 1 +[23] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 2008. 7 +[24] David Madras, Elliot Creager, Toniann Pitassi, and Richard Zemel. Learning adversarially fair and transferable representations. In Proceedings of the 35th International Conference on Machine Learning, 2018. 2 +[25] Mikko I Malinen and Pasi Fränti. Balanced k-means for clustering. In Joint IAPR International Workshops on Statistical Techniques in Pattern Recognition and Structural and Syntactic Pattern Recognition, 2014. 1 +[26] Sudipto Mukherjee, Himanshu Asnani, Eugene Lin, and Sreeram Kannan. Clustergan: Latent space clustering in generative adversarial networks. In Proceedings of The AAAI Conference on Artificial Intelligence, 2019. 2, 6 +[27] Clemens Rösner and Melanie Schmidt. Privacy Preserving Clustering with Constraints. In Proceedings of The 45th International Colloquium on Automata, Languages, and Programming, 2018. 1, 2 +[28] Kate Saenko, Brian Kulis, Mario Fritz, and Trevor Darrell. Adapting visual category models to new domains. In Proceedings of The European Conference on Computer Vision, 2010. 5 +[29] Melanie Schmidt, Chris Schwiegelshohn, and Christian Sohler. Fair coresets and streaming algorithms for fair k-means clustering. arXiv preprint arXiv:1812.10854, 2018. 2 +[30] Zhiqiang Tao, Hongfu Liu, Jun Li, Zhaowen Wang, and Yun Fu. Adversarial graph embedding for ensemble clustering. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, 2019. 2 + +[31] Bokun Wang and Ian Davidson. Towards fair deep clustering with multi-state protected variables. arXiv preprint arXiv:1901.10053, 2019. 1, 2, 3 +[32] Junyuan Xie, Ross Girshick, and Ali Farhadi. Unsupervised deep embedding for clustering analysis. In Proceedings of International Conference on Machine Learning, 2016. 2, 4, 6 +[33] Depeng Xu, Shuhan Yuan, Lu Zhang, and Xintao Wu. Fairgan: Fairness-aware generative adversarial networks. In Proceedings of The IEEE International Conference on Big Data, 2018. 2 +[34] Bo Yang, Xiao Fu, Nicholas D. Sidiropoulos, and Mingyi Hong. Towards k-means-friendly spaces: Simultaneous deep learning and clustering. In Proceedings of The 34th International Conference on Machine Learning, 2017. 2 +[35] Linxiao Yang, Ngai-Man Cheung, Jiaying Li, and Jun Fang. Deep clustering by gaussian mixture variational autoencoders with graph embedding. In Proceedings of The IEEE International Conference on Computer Vision, 2019. 2 +[36] Zhanpeng Zhang, Ping Luo, Chen Change Loy, and Xiaou Tang. Facial landmark detection by deep multi-task learning. In Proceedings of The European Conference on Computer Vision, 2014. 5 +[37] Han Zhao, Amanda Coston, Tameem Adel, and Geoffrey J Gordon. Conditional learning of fair representations. arXiv preprint arXiv:1910.07162, 2019. 2 +[38] Han Zhao and Geoffrey J Gordon. Inherent trade-offs in learning fair representations. arXiv preprint arXiv:1906.08386, 2019. 2 +[39] Imtiaz Masud Ziko, Eric Granger, Jing Yuan, and Ismail Ben Ayed. Clustering with fairness constraints: A flexible and scalable approach. arXiv preprint arXiv:1906.08207, 2019. 1, 2, 3, 6 \ No newline at end of file diff --git a/deepfairclusteringforvisuallearning/images.zip b/deepfairclusteringforvisuallearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..0e5b9673fbe6b81e5e6ec587d5c64830d37c5a9c --- /dev/null +++ b/deepfairclusteringforvisuallearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b83a7fe8e00f9aa5b1edf3395052d2ea3cc4262e86b42a6ee181384206098c25 +size 540812 diff --git a/deepfairclusteringforvisuallearning/layout.json b/deepfairclusteringforvisuallearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f8c0ffc0cddd21f48a520e9f0a6e1caa8fbcffea --- /dev/null +++ b/deepfairclusteringforvisuallearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7507fbeebb9b1c172afd20244d4d80b468ae08093d2aed6ff2266f7f50c8e193 +size 417850 diff --git a/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/46267811-4a51-43e7-8e47-432bf123dc3a_content_list.json b/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/46267811-4a51-43e7-8e47-432bf123dc3a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..6f7e89421c59b557727f29821ea56458d6d96df3 --- /dev/null +++ b/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/46267811-4a51-43e7-8e47-432bf123dc3a_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ef1e6bbd4d2f921293f7b4be9f18c32f639149975b1d4bb56876966be21bfca +size 57311 diff --git a/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/46267811-4a51-43e7-8e47-432bf123dc3a_model.json b/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/46267811-4a51-43e7-8e47-432bf123dc3a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c33bbd2fe40f40191dfddb33cdafc9e3967eea57 --- /dev/null +++ b/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/46267811-4a51-43e7-8e47-432bf123dc3a_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb7d01c86ae8eef694441f573373a8f7a7d27233663457c155c88b159607180a +size 70039 diff --git a/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/46267811-4a51-43e7-8e47-432bf123dc3a_origin.pdf b/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/46267811-4a51-43e7-8e47-432bf123dc3a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..daa9ecb6eb03528308fe359e2a9511e3af426fdb --- /dev/null +++ b/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/46267811-4a51-43e7-8e47-432bf123dc3a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c207e32c7ee6c5b1ef3ea4efd33c68858c4e5fab263f947e4e8a21bce0c0df3 +size 5716952 diff --git a/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/full.md b/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/full.md new file mode 100644 index 0000000000000000000000000000000000000000..79457ac43444e003a101c20fa5a21b71f0c2e3eb --- /dev/null +++ b/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/full.md @@ -0,0 +1,237 @@ +# DeepFLASH: An Efficient Network for Learning-based Medical Image Registration + +Jian Wang +University of Virginia +jw4hv@virginia.edu + +Miaomiao Zhang University of Virginia mz8rr@virginia.edu + +# Abstract + +This paper presents DeepFLASH, a novel network with efficient training and inference for learning-based medical image registration. In contrast to existing approaches that learn spatial transformations from training data in the high dimensional imaging space, we develop a new registration network entirely in a low dimensional bandlimited space. This dramatically reduces the computational cost and memory footprint of an expensive training and inference. To achieve this goal, we first introduce complex-valued operations and representations of neural architectures that provide key components for learning-based registration models. We then construct an explicit loss function of transformation fields fully characterized in a bandlimited space with much fewer parameterizations. Experimental results show that our method is significantly faster than the state-of-the-art deep learning based image registration methods, while producing equally accurate alignment. We demonstrate our algorithm in two different applications of image registration: 2D synthetic data and 3D real brain magnetic resonance (MR) images. Our code is available at https://github.com/jw4hv/deepflash. + +# 1. Introduction + +Image registration has been widely used in medical image analysis, for instance, atlas-based image segmentation [2, 16], anatomical shape analysis [20, 33], and motion correction in dynamic imaging [18]. The problem of deformable image registration is typically formulated as an optimization, seeking for a nonlinear and dense (voxelwise) spatial transformation between images. In many applications, it is desirable that such transformations be diffeomorphisms, i.e., differentiable, bijective mappings with differentiable inverses. In this paper, we focus on diffeomorphic image registration highlighting with a set of critical features: (i) it captures large deformations that often occur in brain shape variations, lung motions, or fetal movements; + +(ii) the topology of objects in the image remains intact; and (iii) no non-differentiable artifacts, such as creases or sharp corners, are introduced. However, achieving an optimal solution of diffeomorphic image registration, especially for large-scale or high-resolution images (e.g., a 3D brain MRI scan with the size of $256^{3}$ ), is computationally intensive and time-consuming. + +Attempts at speeding up diffeomorphic image registration have been made in recent works by improving numerical approximation schemes. For example, Ashburner and Friston [3] employ a Gauss-Newton method to accelerate the convergence of large deformation diffeomorphic metric mapping (LDDMM) algorithm [8]. Zhang et al. propose a low dimensional approximation of diffeomorphic transformations, resulting in fast computation of the gradients for iterative optimization [32, 27]. While these methods have led to substantial reductions in running time, such gradient-based optimization still takes minutes to finish. Instead of minimizing a complex registration energy function [8, 31], an alternative approach has leveraged deep learning techniques to improve registration speed by building prediction models of transformation parameters. Such algorithms typically adopt convolutional neural networks (CNNs) to learn a mapping between pairwise images and associated spatial transformations in training dataset [28, 21, 7, 10, 9]. Registration of new testing images is then achieved rapidly by evaluating the learned mapping on given volumes. While the aforementioned deep learning approaches are able to fast predict the deformation parameters in testing, the training process is extremely slow and memory intensive due to the high dimensionality of deformation parameters in imaging space. In addition, enforcing the smoothness constraints of transformations when large deformation occurs is challenging in neural networks. + +To address this issue, we propose a novel learning-based registration framework DeepFLASH in a low dimensional bandlimited space, where the diffeomorphic transformations are fully characterized with much fewer dimensions. Our work is inspired by a recent registration algorithm FLASH (Fourier-approximated Lie Algebras for Shoot + +ing) [31] with the novelty of (i) developing a learning-based predictive model that further speeds up the current registration algorithms; (ii) defining a set of complex-valued operations (e.g., complex convolution, complex-valued rectifier, etc.) and complex-valued loss function of transformations entirely in a bandlimited space; and (iii) proving that our model can be easily implemented by a dual-network in the space of real-valued functions with a careful design of the network architecture. To the best of our knowledge, we are the first to introduce the low dimensional Fourier representations of diffeomorphic transformations to learning-based registration algorithms. In contrast to traditional methods that learn spatial transformations in a high dimensional imaging space, our method dramatically reduces the computational complexity of the training process where iterative computation of gradient terms are required. This greatly alleviates the problem of time-consuming and expensive training for deep learning based registration networks. Another major benefit of DeepFLASH is that the smoothness of diffeomorphic transformations is naturally preserved in the bandlimited space with low frequency components. Note that while we implement DeepFLASH in the context of convolutional neural network (CNN), it can be easily adapted to a variety of other neural networks, such as fully connected network (FCN), or recurrent neural network (RNN). We demonstrate the effectiveness of our model in both 2D synthetic and 3D real brain MRI data. + +# 2. Background: Deformable Image Registration + +In this section, we briefly review the fundamentals of deformable image registration in the setting of LDDMM algorithm with geodesic shooting [26, 29]. While this paper focuses on LDDMM, the theoretical tool developed in our model is widely applicable to various registration frameworks, for example, stationary velocity fields. + +Consider a source image $S$ and a target image $T$ as square-integrable functions defined on a torus domain $\Omega = \mathbb{R}^d / \mathbb{Z}^d$ ( $S(x), T(x) : \Omega \to \mathbb{R}$ ). The problem of diffeomorphic image registration is to find the shortest path (also known as geodesic) of diffeomorphic transformations $\phi_t \in \mathrm{Diff}(\Omega) : \Omega \to \Omega, t \in [0,1]$ , such that the deformed image $S \circ \psi_1$ at time point $t = 1$ is similar to $T$ . An explicit energy function of LDDMM with geodesic shooting is formulated as an image matching term plus a regularization term that guarantees the smoothness of the transformation fields + +$$ +E (v _ {0}) = \frac {\gamma}{2} \operatorname {D i s t} (S \circ \psi_ {1}, T) + \frac {1}{2} (L v _ {0}, v _ {0}), s. t., +$$ + +$$ +\frac {d \psi_ {t}}{d t} = - \mathcal {D} \psi_ {t} \cdot v _ {t}, \tag {1} +$$ + +where $\gamma$ is a positive weight parameter, $\mathcal{D}$ denotes a Ja + +cobian matrix, and $\mathrm{Dist}(\cdot ,\cdot)$ is a distance function that measures the similarity between images. Commonly used distance metrics include sum-of-squared difference (L2-norm) of image intensities [8], normalized cross correlation (NCC) [4], and mutual information (MI) [17]. The deformation $\phi$ is defined as an integral flow of the time-varying Eulerian velocity field $v_{t}$ that lies in the tangent space of diffeomorphisms $V = T\mathrm{Diff}(\Omega)$ . Here $L:V\to V^{*}$ is a symmetric, positive-definite differential operator that maps a tangent vector $v\in V$ into the dual space $m\in V^*$ , with its inverse $K:V^{*}\rightarrow V$ . The $(\cdot ,\cdot)$ denotes a paring of a momentum vector $m\in V^{*}$ with a tangent vector $v\in V$ . + +The geodesic at the minimum of (1) is uniquely determined by integrating the geodesic constraint, a.k.a. Euler-Poincaré differential equation (EPDiff) [1, 19], which is computationally expensive in high dimensional image spaces. A recent model FLASH demonstrated that the entire optimization of LDDMM with geodesic shooting can be efficiently carried in a low dimensional bandlimited space with dramatic speed improvement [31]. This is based on the fact that the velocity fields do not develop high frequencies in the Fourier domain (as shown in Fig. 1). We briefly review the basic concepts below. + +![](images/63536d1d5ab07c17098261757cce6788a1d4b6ef5a6adce57772bdbfb6ee3987.jpg) +Figure 1. An example of velocity field in spatial domain vs. Fourier domain. + +Let $\widetilde{\mathrm{Diff}} (\Omega)$ and $\tilde{V}$ denote the space of Fourier representations of diffeomorphisms and velocity fields respectively. Given time-dependent velocity field $\tilde{v}_t\in \tilde{V}$ , the diffeomorphism $\tilde{\psi}_t\in \widetilde{\mathrm{Diff}} (\Omega)$ in the finite-dimensional Fourier domain can be computed as + +$$ +\tilde {\psi} _ {t} = \tilde {e} + \tilde {u} _ {t}, \quad \frac {d \tilde {u} _ {t}}{d t} = - \tilde {v} _ {t} - \hat {\mathcal {D}} \tilde {u} _ {t} * \tilde {v} _ {t}, \tag {2} +$$ + +where $\tilde{e}$ is the frequency of an identity element, $\tilde{\mathcal{D}}\tilde{u}_t$ is a tensor product $\tilde{\mathcal{D}}\otimes \tilde{u}_t$ , representing the Fourier frequencies of a Jacobian matrix $\tilde{\mathcal{D}}$ with central difference approximation, and $*$ is a circular convolution with zero padding to avoid aliasing1. + +The Fourier representation of the geodesic constraint (EPDiff) is defined as + +$$ +\frac {\partial \tilde {v} _ {t}}{\partial t} = - \tilde {K} \left[ (\tilde {\mathcal {D}} \tilde {v} _ {t}) ^ {T} \star \tilde {m} _ {t} + \tilde {\nabla} \cdot (\tilde {m} _ {t} \otimes \tilde {v} _ {t}) \right], \tag {3} +$$ + +where $\star$ is the truncated matrix-vector field autocorrelation. The operator $\tilde{\nabla}\cdot$ is the discrete divergence of a vector field. Here $\tilde{K}$ is a smoothing operator with its inverse $\tilde{L}$ , which is the Fourier transform of a commonly used Laplacian operator $(- \alpha \Delta + I)^c$ , with a positive weight parameter $\alpha$ and a smoothness parameter $c$ . The Fourier coefficients of $\tilde{L}$ is, i.e., $\tilde{L}(\xi_1, \ldots, \xi_d) = (-2\alpha \sum_{j=1}^{d} (\cos(2\pi \xi_j) - 1) + 1)^c$ , where $(\xi_1, \ldots, \xi_d)$ is a d-dimensional frequency vector. + +# 3. Our Method: DeepFLASH + +We introduce a learning-based registration network DeepFLASH in a low dimensional bandlimited space $\tilde{V}$ , with newly defined operators and functions in a complex vector space $\mathbb{C}^n$ . Since the spatial transformations can be uniquely determined by an initial velocity $\tilde{v}_0$ (as introduced in Eq. (3)), we naturally integrate this new parameterization in the architecture of DeepFLASH. To simplify the notation, we drop the time index of $\tilde{v}_0$ in remaining sections. + +Analogous to [28], we use optimal registration results, denoted as $\tilde{v}^{opt}$ , estimated by numerical optimization of the LDDMM algorithm as part of the training data. Our goal is then to predict an initial velocity $\tilde{v}^{pre}$ from image patches of the moving and target images. Before introducing DeepFLASH, we first define a set of complex-valued operations and functions that provide key components of the neural architecture. + +Consider a $Q$ -dimensional complex-valued vector of input signal $\tilde{X}$ and a real-valued kernel $H$ , we have a complex-valued convolution as + +$$ +H * \tilde {X} = H * \mathscr {R} (\tilde {X}) + i H * \mathscr {I} (\tilde {X}), \tag {4} +$$ + +where $\mathcal{R}(\cdot)$ denotes the real part of a complex-valued vector, and $\mathcal{I}(\cdot)$ denotes an imaginary part. + +Following a recent work on complex networks [25], we define a complex-valued activation function based on Rectified Linear Unit (ReLU). We apply real-valued ReLU separately on both of the real and imaginary part of a neuron $\tilde{Y}$ in the output layer, i.e., + +$$ +\mathrm {C R e L U} (\tilde {Y}) = \operatorname {R e L U} \left(\mathcal {R} (\tilde {Y})\right) + i \operatorname {R e L U} \left(\mathcal {I} (\tilde {Y})\right). \tag {5} +$$ + +# 3.1. Loss function + +Let a labeled training dataset including pairwise images and their associated optimal initial velocity fields be $\{S_n,T_n,\tilde{v}_n^{opt}\}_{n = 1}^N$ , where $N$ is the number of pairwise images. We model a prediction function $f(S_{n},T_{n};W)$ by using a convolutional neural network (CNN), with $W$ being a + +real-valued weight matrix for convolutional layers. We then define a loss function $\ell$ as + +$$ +\ell (W) = \sum_ {n = 0} ^ {N} \| \tilde {v} _ {n} ^ {\text {o p t}} - f \left(S _ {n}, T _ {n}; W\right) \| _ {L _ {2}} ^ {2} + \lambda \cdot \operatorname {R e g} (W), \tag {6} +$$ + +where $\lambda$ is a positive parameter balancing between function $f$ and a regularity term $\operatorname{Reg}(\cdot)$ on the weight matrix $W$ . While we use $L_{2}$ norm as regularity in this paper, it is generic to other commonly used operators such as $L_{1}$ , or $L_{0}$ norm. + +The optimization problem of Eq. (6) is typically solved by using gradient-based methods. The weight matrix $W$ is updated by moving in the direction of the loss functions steepest descent, found by its gradient $\nabla_W\ell$ . + +# 3.2. Network Architecture: Decoupled Complex-valued Network + +While we are ready to design a complex-valued registration network based on CNN, the implementation of such network is not straightforward. Trabelsi et al. developed deep complex networks to specifically handle complex-valued inputs at the cost of computational efficiency [25]. In this section, we present an efficient way to decouple the proposed complex-valued registration network into a combination of regular real-valued networks. More specifically, we construct a dual-net that separates the real and imaginary part of complex-valued network in an equivalent manner. + +Given the fact that the computation of real and imaginary parts in the convolution (Eq. (4)) and the activation function (Eq. (5)) are separable, we next show that the loss defined in Eq. (6) can be equivalently constructed by the real and imaginary part individually. To simplify the notation, we define the predicted initial velocity $\tilde{v}_n^{pre} \triangleq f(S_n, T_n; W)$ and rewrite Eq. (6) as + +$$ +\ell (W) = \sum_ {n = 0} ^ {N} \| \tilde {v} _ {n} ^ {\text {o p t}} - \tilde {v} _ {n} ^ {\text {p r e}} \| _ {L _ {2}} ^ {2} + \lambda \cdot \operatorname {R e g} (W). \tag {7} +$$ + +Let $\tilde{v}_n^{opt} = \beta_n + i\mu_n$ and $\tilde{v}_n^{pre} = \delta_n + i\eta_n$ in Eq. (7), we then obtain + +$$ +\begin{array}{l} \ell (W) = \sum_ {n = 0} ^ {N} \| (\beta_ {n} + i \mu_ {n}) - (\delta_ {n} + i \eta_ {n}) \| _ {L _ {2}} ^ {2} + \lambda \cdot \operatorname {R e g} (W), \\ = \sum_ {n = 0} ^ {N} \| (\beta_ {n} - \delta_ {n}) + i (\mu_ {n} - \eta_ {n}) \| _ {L _ {2}} ^ {2} + \lambda \cdot \operatorname {R e g} (W), \\ = \sum_ {n = 0} ^ {N} \| \beta_ {n} - \delta_ {n} \| _ {L _ {2}} ^ {2} + \| \mu_ {n} - \delta_ {n} \| _ {L _ {2}} ^ {2} + \lambda \cdot \operatorname {R e g} (W), \\ = \sum_ {n = 0} ^ {N} \| \mathcal {R} (\tilde {v} _ {n} ^ {o p t}) - \mathcal {R} (\tilde {v} _ {n} ^ {p r e}) \| _ {L _ {2}} ^ {2} \\ + \left\| \mathcal {I} \left(\tilde {v} _ {n} ^ {o p t}\right) - \mathcal {I} \left(\tilde {v} _ {n} ^ {p r e}\right) \right\| _ {L _ {2}} ^ {2} + \lambda \cdot \operatorname {R e g} (W). \qquad (8) \\ \end{array} +$$ + +![](images/903a9c5df1224c775e8182ca6a8d7906bdf0eea5f5de901eae6bdf8bc4c65a9b.jpg) +Figure 2. Architecture of DeepFLASH with dual net: S and T denote the source and target image from high dimensional spatial domain. $\mathcal{R}(\tilde{S})$ and $\mathcal{I}(\tilde{S})$ are the real and imaginary frequency spectrum convert from S. $\mathcal{R}(\tilde{T})$ and $\mathcal{I}(\tilde{T})$ are the real and imaginary frequency convert from T. $\tilde{v}^{pre}$ is the low dimensional prediction optimized from our model. $v_0^{pre}$ and $\phi$ are the velocity and transformation field we recovered from our low dimensional prediction. + +Fig. 2 visualizes the architecture of our proposed model DeepFLASH. The input source and target images are defined in the Fourier space with the real part of frequencies as $\mathcal{R}(\tilde{S})$ and $\mathcal{R}(\tilde{T})$ vs. the imaginary parts as $\mathcal{I}(\tilde{S})$ and $\mathcal{I}(\tilde{T})$ . We train real and imaginary parts in two individual neural networks $\mathrm{R}_{net}$ and $\mathrm{I}_{net}$ . The optimization stays in a low dimensional bandlimited space without converting the coefficients $(\mathcal{R}(\tilde{v}^{pre}), \mathcal{I}(\tilde{v}^{pre}))$ to high dimensional imaging domain back and forth. It is worthy to mention that our decoupled network is not constrained by any specific architecture. The CNN network in Fig. 2 can be easily replaced by a variety of the state-of-the-art models, e.g., U-net [22], or fully connected neural network. + +# 3.3. Computational complexity + +It has been previously shown that the time complexity of convolutional layers [14] is $O\left(\sum_{p=1}^{P} b_{p-1} \cdot h_p^2 \cdot b_p \cdot Z_p^2\right)$ , where $p$ is the index of a convolutional layer and $P$ denotes the number of convolutional layers. The $b_{p-1}, b_p, h_p$ are defined as the number of input channels, output channels and the kernel size of the $p$ -th layer respectively. Here $Z_p$ is the output dimension of the $p$ -th layer, i.e., $Z_p = 128^3$ when the last layer predicts transformation fields for 3D images with the dimension of $128^3$ . + +Current learning approaches for image registration have + +been performed in the original high dimensional image space [7, 28]. In contrast, our proposed model DeepFLASH significantly reduces the dimension of $Z_{p}$ into a low dimensional bandlimited space $z_{p}$ (where $z_{p} \ll Z_{p}$ ). This makes the training of traditional registration networks much more efficient in terms of both time and memory consumption. + +# 4. Experimental Evaluation + +We demonstrate the effectiveness of our model by training and testing on both 2D synthetic data and 3D real brain MRI scans. + +# 4.1.Data + +2D synthetic data. We first simulate 3000 "bull-eye" synthetic data (as shown in Fig 3) by manipulating the width $a$ and height $b$ of an ellipse equation, formulated as $\frac{(x - 50)^2}{a^2} + \frac{(y - 50)^2}{b^2} = 1$ . We draw the parameter $a, b$ randomly from a Gaussian distribution $\mathcal{N}(4, 2^2)$ for inner ellipse, and $a, b \sim \mathcal{N}(13, 4^2)$ for outer ellipse. + +3D brain MRI. We include 3200 public T1-weighted 3D brain MRI scans from Alzheimers Disease Neuroimaging Initiative (ADNI) [15], Open Access Series of Imaging Studies (OASIS) [13], Autism Brain Imaging Data Ex + +change (ABIDE) [11], and LONI Probabilistic Brain Atlas Individual Subject Data (LPBA40) [23] with 1000 subjects. Due to the difficulty of preserving the diffeomorphic property across individual subjects particularly with large age variations, we carefully evaluate images from subjects aged from 60 to 90. All MRIs were all pre-processed as $128 \times 128 \times 128$ , $1.25mm^3$ isotropic voxels, and underwent skull-stripped, intensity normalized, bias field corrected and pre-aligned with affine transformation. + +To further validate our model accuracy through segmentation labels, we use manually delineated anatomical structures in LPBA40 dataset. We randomly select 100 pairs of MR images with segmentation labels from LPBA40. We then carefully down-sampled all images and labels from the dimension of $181 \times 217 \times 181$ to $128 \times 128 \times 128$ . + +# 4.2. Experiments + +To validate the registration performance of DeepFLASH on both 2D and 3D data, we run a recent state-of-the-art image registration algorithm FLASH [30, 32] on 1000 2D synthetic data and 2000 pairs of 3D MR images to optimal solutions, which are used as ground truth. We then randomly choose 500 pairs of 2D data and 1000 pairs of 3D MRIs from the rest of the data as testing cases. We set registration parameter $\alpha = 3$ , $c = 6$ for the operator $\tilde{\ell}$ , the number of time steps for Euler integration in geodesic shooting as 10. We adopt the band-limited dimension of the initial velocity field $\tilde{v}^{opt}$ as 16, which has been shown to produce comparable registration accuracy [30]. We set the batch size as 64 with learning rate $\eta = 1e - 4$ for network training, then run 2000 epochs for 2D synthetic training and 5000 epochs for 3D brain training. + +Next, we compare our 2D prediction with registration performed in full-spatial domain. For 3D testing, we compare our method with three baseline algorithms, including FLASH [31] (a fast optimization-based image registration method), Voxelmorph [6] (an unsupervised registration in image space) and Quicksilver [28] (a supervised method that predicts transformations in a momentum space). We also compare the registration time of DeepFLASH with traditional optimization-based methods, such as vector momenta LDDMM (VM-LDDMM) [24], and symmetric diffeomorphic image registration with cross-correlation (SyN) from ANTs [5]. For fair comparison, we train all baseline algorithms on the same dataset and report their best performance from published source codes (e.g., https://github.com/rkwitt/quicksilver, https://github.com/balakg/voxelmorph). + +To better validate the transformations generated by DeepFLASH, we perform registration-based segmentation and examine the resulting segmentation accuracy over eight brain structures, including Putamen (Puta), Cerebellum (Cer), Caudate (Caud), Hippocampus (Hipp), Insular cor + +tex (Cor), Cuneus (Cune), brain stem (Stem) and superior frontal gyrus (Gyrus). We evaluate a volume-overlapping similarity measurement, also known as Sorensen-Dice coefficient, between the propagated segmentation and the manual segmentation [12]. + +We demonstrate the efficiency of our model by comparing quantitative time and GPU memory consumption across all methods. All optimal solutions for training data are generated on an i7, 9700K CPU with 32 GB internal memory. The training and prediction procedure of all learning-based methods are performed on Nvidia GTX 1080Ti GPUs. + +# 4.3. Results + +Fig.3 visualizes the deformed images, transformation fields, and the determinant of Jacobian (DetJac) of transformations estimated by DeepFLASH and a registration method that performed in full-spatial image domain. Note that the value of DetJac indicates how volume changes, for instance, there is no volume change when $\mathrm{DetJac} = 1$ , while volume shrinks when $\mathrm{DetJac} < 1$ and expands when $\mathrm{DetJac} > 1$ . The value of DetJac smaller than zero indicates an artifact or singularity in the transformation field, i.e., a failure to preserve the diffeomorphic property when the effect of folding occurs. Both methods show similar patterns of volume changes over transformation fields. Our predicted results are fairly close to the estimates from registration algorithms in full spatial domain. + +Fig.4 visualizes the deformed images and the determinant of Jacobian with pairwise registration on 3D brain MRIs for all methods. It demonstrates that our method DeepFLASH is able to produce comparable registration results with little to no loss of the accuracy. In addition, our method gracefully guarantees the smoothness of transformation fields without artifacts and singularities. + +The left panel of Fig.5 displays an example of the comparison between the manually labeled segmentation and propagated segmentation deformed by transformation field estimated from our algorithm. It clearly shows that our generated segmentations align fairly well with the manual delineations. The right panel of Fig.5 compares quantitative results of the average dice for all methods, with the observations that our method slightly outperforms the baseline algorithms. + +Fig. 6 reports the statistics of dice scores (mean and variance) of all methods over eight brain structures from 100 registration pairs. Our method DeepFLASH produces comparable dice scores with significantly fast training of the neural networks. + +Table.1 reports the time consumption of optimization-based registration methods, as well as the training and testing time of learning-based registration algorithms. Our method can predict the transformation fields between images approximately 100 times faster than optimization- + +![](images/15939d97f6ab1a2192d72adc51304e9af74a25ed4cf51c91f5b1ab0a9aba51f6.jpg) +Figure 3. Example of 2D registration results. Left to right: 2D synthetic source, target image, deformed image computed in the full-spatial domain, transformation grids overlaid with source image, and determinant of Jacobian (DetJac) of transformations. + +![](images/1b9cd1330d2affece1041c208bda3d1a1f43b1bd34f032ae004259ded6ccc7ba.jpg) +Figure 4. Example of 3D image registration on OASIS dataset. Left panel: axial, coronal, and sagittal view of source and target images. Right panel: deformed images and determinant of Jacobian of the transformations by FLASH, Quicksilver, Voxelmorph, and DeepFLASH. + +based registration methods. In addition, DeepFLASH outperforms learning-based registration approaches in testing, while with significantly reduced computational time in training. + +Fig.7 provides the average training and testing GPU memory usage across all methods. It has been shown that our proposed method dramatically lowers the GPU footprint compared to other learning-based methods in both training + +![](images/25fbf720f13e4eabbaa3b71ae8c5fbe0e0215e14f5f5786ceb5494e1219d2ae1.jpg) +Figure 5. Left: source and target segmentations with manually annotated eight anatomical structures (on LPBA40 dataset), propagated segmentation label deformed by our method. Right: quantitative result of average dice for all methods. + +
MethodsAverage Dice
VM-LDDMM0.760
ANTs (SyN)0.770
FLASH0.788
QuickSilver0.762
VoxelMorph0.774
DeepFLASH0.780
+ +![](images/cb4656446007afa83a223658cfce53313a7d1feeda428b82ddd60981243b85de.jpg) +Figure 6. Dice score evaluation by propagating the deformation field to the segmentation labels for four methods on eight brain structures (Putamen(Puta), Cerebellum (Cer), Caudate (Caud), Hippocampus (Hipp), Insular cortex (Cor), Cuneus (Cune), brain stem (Stem), and superior frontal gyrus (Gyrus)). + +and testing. + +# 5. Conclusion + +In this paper, we present a novel diffeomorphic image registration network with efficient training process and inference. In contrast to traditional learning-based registration methods that are defined in the high dimensional imaging space, our model is fully developed in a low dimensional bandlimited space with the diffeomorphic property of transformation fields well preserved. Based on the fact that current networks are majorly designed in real-valued spaces, we are the first to develop a decoupled-network to + +solve the complex-valued optimization with the support of rigorous math foundations. Our model substantially lowers the computational complexity of the neural network and significantly reduces the time consumption on both training and testing, while preserving a comparable registration accuracy. The theoretical tools developed in our work is flexible/generic to a wide variety of the state-of-the-art networks, e.g., FCN, or RNN. To the best of our knowledge, we are the first to characterize the diffeomorphic deformations in Fourier space via network learning. This work also paves a way for further speeding up unsupervised learning for registration models. + +![](images/c461e222b9b49f91554ee3793626771bca4231ba3b5e6cb417b8ce039286db58.jpg) +Figure 7. Comparison of average GPU memory usage on our method and learning-based baselines for both training and testing processes. + +Table 1. Top: quantitative results of time consumption on both CPU and GPU for optimization-based registration methods (there is no GPU-version of ANTs). Bottom: computational time of training and prediction for our method DeepFLASH and current deep learning registration approaches. + +
MethodsTraining Time (GPU hours)Registration time (sec)
CPUGPU
VM-LDDMM-1210262
ANTs(SyN)-6840-
FLASH-28653.4
Quicksilver31.41220.760
Voxelmorph29.7520.571
DeepFLASH14.1410.273
+ +# References + +[1] Vladimir Arnold. Sur la géométrie différentielle des groupes de lie de dimension infinie et ses applications à l'hydrodynamique des fluides parfaits. In Annales de l'institut Fourier, volume 16, pages 319-361, 1966. +[2] John Ashburner and Karl. J. Friston. Unified segmentation. Neuroimage, 26(3):839-851, 2005. +[3] John Ashburner and Karl J Friston. Diffeomorphic registration using geodesic shooting and gauss-neutron optimisation. NeuroImage, 55(3):954-967, 2011. +[4] Brian B Avants, Charles L Epstein, Murray Grossman, and James C Gee. Symmetric diffeomorphic image registration with cross-correlation: evaluating automated labeling of elderly and neurodegenerative brain. Medical image analysis, 12(1):26-41, 2008. +[5] Brian B Avants, Nicholas J Tustison, Gang Song, Philip A Cook, Arno Klein, and James C Gee. A reproducible eval + +uation of ants similarity metric performance in brain image registration. Neuroimage, 54(3):2033-2044, 2011. +[6] Guha Balakrishnan, Amy Zhao, Mert R Sabuncu, John Guttag, and Adrian V Dalca. An unsupervised learning model for deformable medical image registration. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 9252-9260, 2018. +[7] Guha Balakrishnan, Amy Zhao, Mert R Sabuncu, John Guttag, and Adrian V Dalca. Voxelmorph: a learning framework for deformable medical image registration. IEEE transactions on medical imaging, 2019. +[8] Mirza Faisal Beg, Michael I Miller, Alain Trouve, and Laurent Younes. Computing large deformation metric mappings via geodesic flows of diffeomorphisms. International journal of computer vision, 61(2):139-157, 2005. +[9] Tian Cao, Nikhil Singh, Vladimir Jojic, and Marc Niethammer. Semi-coupled dictionary learning for deformation prediction. In 2015 IEEE 12th International Symposium on Biomedical Imaging (ISBI), pages 691-694. IEEE, 2015. +[10] Chen-Rui Chou, Brandon Frederick, Gig Mageras, Sha Chang, and Stephen Pizer. 2d/3d image registration using regression learning. Computer Vision and Image Understanding, 117(9):1095-1106, 2013. +[11] Adriana Di Martino, Chao-Gan Yan, Qingyang Li, Erin Denio, Francisco X Castellanos, Kaat Alaerts, Jeffrey S Anderson, Michal Assaf, Susan Y Bookheimer, Mirella Dapretto, et al. The autism brain imaging data exchange: towards a large-scale evaluation of the intrinsic brain architecture in autism. Molecular psychiatry, 19(6):659, 2014. +[12] Lee R Dice. Measures of the amount of ecologic association between species. Ecology, 26(3):297-302, 1945. +[13] Anthony F Fotenos, AZ Snyder, LE Girton, JC Morris, and RL Buckner. Normative estimates of cross-sectional and longitudinal brain volume decline in aging and ad. Neurology, 64(6):1032-1039, 2005. +[14] Kaiming He and Jian Sun. Convolutional neural networks at constrained time cost. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5353-5360, 2015. +[15] Clifford R Jack Jr, Matt A Bernstein, Nick C Fox, Paul Thompson, Gene Alexander, Danielle Harvey, Bret Borowski, Paula J Britson, Jennifer L. Whitwell, Chadwick Ward, et al. The alzheimer's disease neuroimaging initiative (adni): Mri methods. Journal of Magnetic Resonance Imaging: An Official Journal of the International Society for Magnetic Resonance in Medicine, 27(4):685-691, 2008. +[16] Sarang Joshi, Brad Davis, Matthieu Jomier, and Guido Gerg. Unbiased diffeomorphic atlas construction for computational anatomy. NeuroImage, 23, Supplement1:151-160, 2004. +[17] Michael Leventon, William M Wells III, and Eric Grimson. Multiple view 2d-3d mutual information registration. In Image Understanding Workshop, volume 20, page 21. CiteSeer, 1997. +[18] Ruizhi Liao, Esra A Turk, Miaomiao Zhang, Jie Luo, P Ellen Grant, Elfar Adalsteinsson, and Polina Golland. Temporal registration in in-utero volumetric mri time series. + +In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 54-62. Springer, 2016. +[19] Michael I Miller, Alain Trouve, and Laurent Younes. Geodesic shooting for computational anatomy. Journal of Mathematical Imaging and Vision, 24(2):209-228, 2006. +[20] Marc Niethammer, Yang Huang, and François X Vialard. Geodesic regression for image time-series. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 655-662. Springer, 2011. +[21] Marc-Michel Rohé, Manasi Datar, Tobias Heimann, Maxime Sermesant, and Xavier Pennec. Svf-net: Learning deformable image registration using shape matching. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 266-274. Springer, 2017. +[22] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pages 234-241. Springer, 2015. +[23] David W Shattuck, Mubeena Mirza, Vitria Adisetiyo, Cornelius Hojatkashani, Georges Salamon, Katherine L Narr, Russell A Poldrack, Robert M Bilder, and Arthur W Toga. Construction of a 3d probabilistic atlas of human cortical structures. Neuroimage, 39(3):1064-1080, 2008. +[24] Nikhil Singh, Jacob Hinkle, Sarang Joshi, and P Thomas Fletcher. A vector momenta formulation of diffeomorphisms for improved geodesic regression and atlas construction. In 2013 IEEE 10th International Symposium on Biomedical Imaging, pages 1219-1222. IEEE, 2013. +[25] Chiheb Trabelsi, Olexa Bilaniuk, Ying Zhang, Dmitriy Serdyuk, Sandeep Subramanian, João Felipe Santos, Soroush Mehri, Negar Rostamzadeh, Yoshua Bengio, and Christopher J Pal. Deep complex networks. arXiv preprint arXiv:1705.09792, 2017. +[26] François X Vialard, Laurent Risser, Daniel Ruekert, and Colin J Cotter. Diffeomorphic 3d image registration via geodesic shooting using an efficient adjoint calculation. International Journal of Computer Vision, 97(2):229-241, 2012. +[27] Jian Wang, Wei Xing, Robert M Kirby, and Miaomiao Zhang. Data-driven model order reduction for diffeomorphic image registration. In International Conference on Information Processing in Medical Imaging, pages 694-705. Springer, 2019. +[28] Xiao Yang, Roland Kwitt, Martin Styner, and Marc Niethammer. Quicksilver: Fast predictive image registration-a deep learning approach. NeuroImage, 158:378-396, 2017. +[29] Laurent Younes, Felipe Arrate, and Michael I Miller. Evolutions equations in computational anatomy. NeuroImage, 45(1):S40-S50, 2009. +[30] Miaomiao Zhang and P Thomas Fletcher. Finite-dimensional lie algebras for fast diffeomorphic image registration. In International Conference on Information Processing in Medical Imaging, pages 249-260. Springer, 2015. + +[31] Miaomiao Zhang and P Thomas Fletcher. Fast diffeomorphic image registration via fourier-approximated lie algebras. International Journal of Computer Vision, 127(1):61-73, 2019. +[32] Miaomiao Zhang, Ruizhi Liao, Adrian V Dalca, Esra A Turk, Jie Luo, P Ellen Grant, and Polina Golland. Frequency diffeomorphisms for efficient image registration. In International Conference on Information Processing in Medical Imaging, pages 559-570. Springer, 2017. +[33] Miaomiao Zhang, William M Wells, and Polina Golland. Low-dimensional statistics of anatomical variability via compact representation of image deformations. In International conference on medical image computing and computer-assisted intervention, pages 166-173. Springer, 2016. \ No newline at end of file diff --git a/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/images.zip b/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..798b1eada9bb96d18ea698adedd12a655bfc0081 --- /dev/null +++ b/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80ab186e2b8ce7eee79602f755ace61f3b1b2657d87aa3b934a07439cc81c540 +size 524063 diff --git a/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/layout.json b/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..51e92b4ba83aa7715c35fe1cedc8f10ec92a773f --- /dev/null +++ b/deepflashanefficientnetworkforlearningbasedmedicalimageregistration/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97469ed21c7fa80620d0c1fa3626fd7d57e21358463123305e2e50eb73d9edce +size 318160 diff --git a/deepgenerativemodelforrobustimbalanceclassification/a7163978-fa49-4e73-b65f-4466952a0e34_content_list.json b/deepgenerativemodelforrobustimbalanceclassification/a7163978-fa49-4e73-b65f-4466952a0e34_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..36319d872d0a6099d3d4eba0a039d490e335be7a --- /dev/null +++ b/deepgenerativemodelforrobustimbalanceclassification/a7163978-fa49-4e73-b65f-4466952a0e34_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e830d2043f770481a356b44b7be7505023a0eca36bd8af37e1076e6674f2876 +size 81175 diff --git a/deepgenerativemodelforrobustimbalanceclassification/a7163978-fa49-4e73-b65f-4466952a0e34_model.json b/deepgenerativemodelforrobustimbalanceclassification/a7163978-fa49-4e73-b65f-4466952a0e34_model.json new file mode 100644 index 0000000000000000000000000000000000000000..588c8a9f20fc7a1efd9d808a1baaa9217a677332 --- /dev/null +++ b/deepgenerativemodelforrobustimbalanceclassification/a7163978-fa49-4e73-b65f-4466952a0e34_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c3c939208a52fbf878c741c1f6c00945cf437c2954e8e39a9098fa5972d8607 +size 99750 diff --git a/deepgenerativemodelforrobustimbalanceclassification/a7163978-fa49-4e73-b65f-4466952a0e34_origin.pdf b/deepgenerativemodelforrobustimbalanceclassification/a7163978-fa49-4e73-b65f-4466952a0e34_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..07ab3fd32ce6c4da8270987b0f1b7ea9acd2e73d --- /dev/null +++ b/deepgenerativemodelforrobustimbalanceclassification/a7163978-fa49-4e73-b65f-4466952a0e34_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8e577074a5062cad9858f1abe16a2ae085497c7b056b669345f7afe435d7bd2 +size 8113687 diff --git a/deepgenerativemodelforrobustimbalanceclassification/full.md b/deepgenerativemodelforrobustimbalanceclassification/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a09c8fd145f6090941055ccb623c5a8d0ad18618 --- /dev/null +++ b/deepgenerativemodelforrobustimbalanceclassification/full.md @@ -0,0 +1,336 @@ +# Deep Generative Model for Robust Imbalance Classification + +Xinyue Wang, Yilin Lyu, Liping Jing +Beijing Key Lab of Traffic Data Analysis and Mining +Beijing Jiaotong University, Beijing, China +{xinyuewang, yilinlv, lpjing}@bjtu.edu.cn + +# Abstract + +Discovering hidden pattern from imbalanced data is a critical issue in various real-world applications including computer vision. The existing classification methods usually suffer from the limitation of data especially the minority classes, and result in unstable prediction and low performance. In this paper, a deep generative classifier is proposed to mitigate this issue via both data perturbation and model perturbation. Specially, the proposed generative classifier is modeled by a deep latent variable model where the latent variable aims to capture the direct cause of target label. Meanwhile, the latent variable is represented by a probability distribution over possible values rather than a single fixed value, which is able to enforce uncertainty of model and lead to stable prediction. Furthermore, this latent variable, as a confounder, affects the process of data (feature/label) generation, so that we can arrive at well-justified sampling variability considerations in statistics, and implement data perturbation. Extensive experiments have been conducted on widely-used real imbalanced image datasets. By comparing with the state-of-the-art methods, experimental results demonstrate the superiority of our proposed model on imbalance classification task. + +# 1. Introduction + +The imbalanced data is inevitable in real-world applications especially in computer vision. For example, the background samples extremely outnumber the foreground samples in object detection [21]; the amount of healthy persons dominates that of the patients with lung cancer in medical image processing [13]. The size ratio between frequent event (majority classes) and rare event (minority classes) may be 10:1 or even 1000:1, which makes rare event detection much more difficult [9, 39]. However, misclassifying rare events can result in heavy costs, e.g., in disease diagnosis, failing to identify a patient would cause the loss of life. + +The scarce occurrences of rare events impair the detec + +tion task to imbalance classification problem. It aims to predict the unknown variables (e.g., event) based on their observed features using a model estimated on a training dataset, which is a common statistical problem and has attracted much interest from various communities. Many methods have been proposed and perform successfully when training and testing data have similar joint distribution of features. Unfortunately, imbalanced data cannot always guarantee this because of two main reasons. Firstly, the observed features usually fall into two categories, one containing "direct causes" of the target variable, where the conditional distribution of the target given these features will not change when adding any other features, and the other having "noisy features" which do not affect the expected outcomes of the target [18]. Secondly, it is hard to directly determine the "direct causes" from insufficient training data especially for the minority classes. In this case, the learning model often obtains a good coverage of the majority samples whereas the minority samples are distorted. + +From a probability theory perspective, it is difficult to build a stable model for invariant prediction from limited observed samples [42]. To date, many methods have been proposed to guarantee the stability as much as possible, which can be roughly divided into two categories: data perturbation and model perturbation. The former kind aims to characterize the underlying data distribution by approximating the data generation process. This mechanism, in imbalance classification, is adopted to augment the minority classes and then help the subsequent classifier determine the proper class boundaries [1, 25]. Even though they obtain promising performance, in such two-stage learning framework, data augmentation and classifier construction are implemented separately, which limits their applications. The later one tries to sufficiently assess the uncertainty of data by introducing uncertainty into learning model (e.g., learning a probability distribution on the weights of neural network [4, 33] or constructing the loss function in an ambiguity set of the empirical distribution [31]). This strategy has ability to express uncertainty with few data and make reasonable predictions, however, it results in much more com + +plicated learning model and higher computational cost. + +Thus, in this paper, we focus on robust imbalance classification to determine the essential factors of the target label so that the expected label value conditional on them is stable. Our idea is motivated by the literatures on causal inference and probabilistically generative model. To capture the cause-effect structure relationship, we propose a deep generative classifier (DGC) with the aid of deep latent variable model. It simultaneously learns the latent variable from the process of training data generation (including input features and labels) and approximates the Bayes' rule using importance sampling on the latent variable. Data generation process is formulated by minimizing the worst-case expectation of optimal transport cost between real and generative data distributions. DGC produces predictions by comparing the likelihood of labels on the learned latent variables for a given input. From this view, the proposed model can be taken as a joint generative model to approximate the joint distribution of input features, labels and latent variables, where the latent variables can characterize the essential structure hidden in the original data and can be used as the direct cause of labels. Therefore, it is expected to obtain stable prediction for new coming data. In summary, our contributions include: + +- A deep generative classifier for imbalanced data is proposed by a deep latent variable model, where the latent variable is expressed via a probability distribution over possible values rather than a fixed value. Thus, it can be taken as a latent confounder affecting the whole learning process. +- The proposed method has ability to simultaneously implement data perturbation (via feature/label generation process) and model perturbation (via enforcing uncertainty on latent variables and minimizing the worst-case expectation), which can reduce the variability of label estimation and lead to stable prediction. +- We theoretically analyze the generalization error bounds of the proposed model, and efficiently optimize it by stochastic variational inference. +- A series of experiments are conducted to demonstrate its advantage over the state-of-the-art imbalance classification methods. Especially, it can produce good performance on the minority class, while maintaining a reasonable overall accuracy. + +The remaining of this paper is organized as follows. The related work will be reviewed in Section 2. Then, the proposed method will be given in detail. In Section 4, we will describe and discuss the experiments. At last, conclusions and future work are briefly provided. + +# 2. Related work + +The class imbalance has been a frequent but challenging issue and attracts a significant amount of interest from the community of computer vision and machine learning. Most traditional classifiers have ability to optimize the overall prediction accuracy, however, they typically favor the majority classes and fail to classify the minority classes [15, 34]. Over the years, researchers have devised many methods for tackling class imbalance problem. Two basic strategies are resampling (oversampling or undersampling) and cost-sensitive learning [5, 13]. However, those methods are usually designed for low dimensional feature space and hard to cope with high dimensional data, like images, audio signals, etc. The emerging research surge of deep learning gave us the inspirations for an alternative strategy to deal with more complicated imbalanced data. Recent works mainly focus on two facets: data perturbation by extending resampling strategy to deep learning model and model perturbation by introducing uncertainty in model parameters or loss function, as shown in Figure 1. + +![](images/99224ae6baabf21572e4354b319079df753fae083a675a9fe90118bb1657a82d.jpg) +Figure 1. Two strategies for deep imbalanced learning. + +To compensate the skewed distribution (caused by imbalanced data), deep generative models such as Variational autoencoder (VAE) [16] and Generative Adversarial Network (GAN) [11] are introduced to generate synthetic samples in the original feature space for imbalance classification. A simple way is to directly apply VAE on the given imbalanced data to capture the dimensional dependencies via latent variable, and then generate new samples from the learned latent variable [38, 43]. This strategy suffers from the drawback of VAE, which assumes that the data follow a single Gaussian distribution. When samples have mixture distributions, VAE cannot generate artificial data with sharp edges or fine details. To handle this case, Guo et al. [12] model latent representation via two Gaussian distributions with opposite means. Unfortunately, this idea is only useful for binary classification and cannot directly deal with multiclass imbalanced data. + +An alternative generation strategy is GAN, which provides an effective way to learn mapping from the latent encoding space to original data space. To consider the difference between different classes, conditional GAN + +(cGAN) [10] is introduced to generate class-specific minority samples [7]. GAN-based generation methods are usually fed with a random noise, which may result in a highly entangled process and disrupt the orientation-related features [6]. To solve this problem, researchers proposed BAGAN [25] by integrating AE and cGAN via a two-step framework. It learns the latent codes via AE and feeds them to cGAN instead of the random noise. However, attempting to oversample the minority class using GAN may lead to boundary distortion [29]. To make the latent features much more discriminative, a discriminative feature-based sampling (DFBS) method is proposed in [22]. DFBS adopts a supervised autoencoder with triplet loss to extract the latent features, then generates synthetic samples in the latent space by a random combination method. This generation strategy has the ability to bring samples within the same class closer together and push those from different classes further apart. The generated samples, in these methods, are likely close to the mode of the minority class, while new samples around the boundaries are required for reliable classifier [5, 35]. + +The previous methods can be roughly called as two-stage strategy, one for generating synthetic data, and the other for training classifier on the augmented data. Even though they sufficiently exploit data perturbation for imbalance classification performance, there may be a gap between data generation and classifier training. Recently, a generative adversarial minority oversampling (GAMO) method [27] is proposed to seamlessly integrate them by a three-player adversarial game between a convex generator, a multi-class classifier network, and a real/fake discriminator. GAMO generates new samples within the convex hull of the real minority-class samples. However, the convex hull of a minority class would be far from the true data distribution, which may generate less informative or even overlapped samples. + +Besides data perturbation, model perturbation is also a good way to improve the stability of learning process, which is useful for limited data [42]. Among them, Bayesian network is widely used to offer uncertainty estimation via its parameters in form of probability distributions [4]. Recently, this strategy is extended to convolutional neural network [33]. By using a prior distribution to integrate out the parameters, they are estimated across many models during training, which has ability to prevent overfitting and obtain robust prediction. However, the learning process is time-consuming due to that much more parameters have to be estimated for characterizing the distributions of original network weights. To overcome the limitation of observed data, researchers proposed distributionally robust learning models with ambiguity set containing all (continuous or discrete) distributions that can be converted to the (discrete) empirical distribution at bounded cost [32]. Although this + +kind of model perturbation strategy prefers to robust prediction, it leads to more complicated model and higher computational complexity. + +Motivated by the above problems, in this paper, we propose a new imbalance classification method via deep generative model to sufficiently exploit both data perturbation and model perturbation. + +# 3. Proposed method + +Inspired by the dual roles of generative model, summarizing past data (including prior knowledge) and generating synthetic observations, in this section, we design a deep generative classifier for imbalanced data. + +# 3.1. Preliminaries and notations + +Let calligraphic letter (i.e., $\mathcal{X}$ ) indicate sets, capital letter (i.e., $X$ ) for matrix, and lower case letter (i.e., $\mathbf{x}$ ) for vector. Given a joint distribution over $\mathcal{X} \times \mathcal{Y}$ , the training set is with $N$ points from $C$ classes, which are independent and identically distributed. The $i$ -th training point $(\mathbf{x}_i, \mathbf{y}_i)$ contains feature information $\mathbf{x}_i \in \mathbb{R}^D$ and label information $\mathbf{y}_i \in \mathbb{R}^C$ , where $\mathbf{y}_i$ is a C-dimensional one-hot vector. Denote $N = \sum_{c=1}^{C} n_c$ , where $n_c$ is the size of the $c$ -th class. For an imbalance classification setting, there may be a big variance among $\{n_1, \ldots, n_c, \ldots, n_C\}$ . Usually, the size of the largest class may be ten or even hundred times larger than that of the smallest class. In this paper, our goal is to learn a predictive model, which can make a robust prediction for new coming data point $\mathbf{x}^* \in \mathbb{R}^D$ . In such an imbalanced situation, it is hard to guarantee the training data used to build the classification model follows the same distribution with the testing data, especially for minority classes [5]. + +# 3.2. Deep generative classifier (DGC) + +To effectively handle imbalanced data, we design a deep generative model to simultaneously mine the direct cause of target label and build a stable generative imbalanced classifier. + +![](images/93c0fae64bba438cbec5dce7435194c2ff6eb4b11887431ddc2b2c27de366f90.jpg) +(a) + +![](images/ed113d9caa35ebb61ef4e2528cff31ea11538e61a62251a55cff0d8177926fb5.jpg) +(b) +Figure 2. The architecture of graphical models for a) the traditional generative classifier and b) the proposed DGC. c) is the parameterized version of b). The nodes denote observed or latent variables. The solid lines and dash lines represent generative and recognition model respectively. + +![](images/683bf562de7cb480bc9a331ec1336ceab1fe525e9b62c1d0cce88a9409090307.jpg) +(c) + +Giving the training dataset, generative classifier aims to build a model of "how data for a class looks like". Mathematically, it will learn the joint probability distribution + +$p(\mathbf{x},\mathbf{y})$ by estimating the parameters of $p(\mathbf{x}|\mathbf{y})$ and $p(\mathbf{y})$ (as shown in Figure 2(a)). In prediction phase, the label $y^{*}$ of a new coming sample $x^{*}$ can be assigned via the Bayes rule. The well-known generative classifier, Naive Bayes classifier, has obtained promising performance if the features are independent to each other, i.e., the conditional distribution can be factorized along all features via $p(\mathbf{x}|\mathbf{y}) = \prod_{d = 1}^{D}p(x_{d}|\mathbf{y})$ . Unfortunately, this assumption is not appropriate for the complicated case, e.g., image data, since all "natural" images always show a lot of spatial regularity, but this kind of factorized distribution cannot present discontinuities across hypersurfaces. + +Inspired by deep learning, we propose a deep generative classifier with the aid of deep latent variable model. Our goal is to mine the direct cause and implement stable prediction on the target label, even for imbalanced data. Let $\mathbf{z}$ denote the direct cause of target label, in this case, any noisy feature $\mathbf{v}$ will not affect the prediction result, i.e., $p(\mathbf{y}|\mathbf{z},\mathbf{v}) = p(\mathbf{y}|\mathbf{z})$ always holds. Meanwhile, $\mathbf{z}$ is expected to capture the essential structure of the original data, i.e., both $\mathbf{x}$ and $\mathbf{y}$ can be most likely generated from $\mathbf{z}$ . To achieve these two goals, our generative model is designed as shown in Figure 2(b). In this model, the joint probability distribution $p(\mathbf{x},\mathbf{z},\mathbf{y})$ can be factorized as $p(\mathbf{z})p(\mathbf{x}|\mathbf{z})p(\mathbf{y}|\mathbf{z})$ . This model has a good by-product that the conditional distribution $p(\mathbf{x}|\mathbf{y})$ can be written by + +$$ +p (\mathbf {x} | \mathbf {y}) = \frac {p (\mathbf {x} , \mathbf {y})}{p (\mathbf {y})} = \frac {\int p (\mathbf {x} , \mathbf {z} , \mathbf {y}) d \mathbf {z}}{\int p (\mathbf {x} , \mathbf {z} , \mathbf {y}) d \mathbf {z} d \mathbf {x}}. (1) +$$ + +which is not factorized along the original features, thus, it is expected to be more powerful on real-world complicated applications. + +To build the graphical model from training data, we introduce its parameterized version in Figure 2(c). Mathematically, the input feature $\mathbf{x} \in \mathbb{R}^D$ and corresponding label $\mathbf{y} \in \mathbb{R}^C$ are generated by the latent vector $\mathbf{z} \in \mathbb{R}^k$ and parameter $\theta = \{\theta_1, \theta_2\}$ as follows. + +$$ +p (\mathbf {x}, \mathbf {z}, \mathbf {y}) = p (\mathbf {z}) p _ {\theta_ {1}} (\mathbf {x} | \mathbf {z}) p _ {\theta_ {2}} (\mathbf {y} | \mathbf {z}). \tag {2} +$$ + +For convenient computing, $\mathbf{z}$ is assumed to be sampled from a standard Gaussian prior, i.e., $\mathbf{z} \sim \mathcal{N}(0, \mathbf{I}^{\mathbf{k}})$ . During training process, the proper $\mathbf{z}$ will be recognized with the aid of parameter $\phi$ , i.e., $\mathbf{z} = \phi(\mathbf{x}, \mathbf{y})$ . + +# 3.3. Inference learning for DGC model + +One way to infer deep generative model is to postulate that they are trying to minimize certain divergence between the true data distribution $P$ of $\mathcal{D} = (X, Y)$ , and the generative distribution $P_G$ of the generated data $\hat{\mathcal{D}} = (\hat{X}, \hat{Y})$ from the observed training data. + +As mentioned above, imbalanced data cannot provide sufficient information for training classifier, which will + +be easy to result in overfitting problem and might further constitute poor predictors beyond the training dataset. This is the main reason that the good performance cannot be obtained on minority classes. Thus, we infer the proposed deep generative model by utilizing Wasserstein distance [2, 36]. Comparing with KL-divergence or JS-divergence, Wasserstein distance has the ability to measure the similarity between the distributions well and preserve the transitivity in latent space due to the much weaker topology. + +From the optimal transport (OT) point of view, we aim at minimizing OT cost between real data distribution $P$ and generative distribution $P_{G}$ , + +$$ +W _ {c} (P, P _ {G}) = \inf _ {\Gamma \in \mathcal {P} _ {\Gamma}} \mathbb {E} _ {\left((X, Y), (\hat {X}, \hat {Y})\right) \sim \Gamma} [ c ((X, Y), (\hat {X}, \hat {Y})) ] \tag {3} +$$ + +here $\mathcal{P}_{\Gamma} = \big((X,Y)\sim P,(\hat{X},\hat{Y})\sim P_G\big)$ . Minimizing (3) is equal to precisely minimize the worst-case expectation, which has ability to provide an upper confidence bound on the out-of-sample error. Thus, it is expected to produce good solution on limited data. + +For our case, given the latent variable $Z$ , $X$ and $Y$ are independent to each other as shown in Figure 2(c), i.e., $X \perp Y|Z$ , thus we have + +$$ +P _ {G} (\mathbf {x}, \mathbf {y}) = \int_ {\mathcal {Z}} P _ {G} (\mathbf {x} | \mathbf {z}) P _ {G} (\mathbf {y} | \mathbf {z}) P _ {z} (\mathbf {z}) d \mathbf {z} \quad \forall (\mathbf {x}, \mathbf {y}) \in \mathcal {D}. \tag {4} +$$ + +Among it, $P_{G}(\mathbf{x}|\mathbf{z})$ deterministically maps $\mathbf{z}$ to $\mathbf{x}$ , similarly, $P_{G}(Y|Z)$ for mapping $\mathbf{z}$ to $\mathbf{y}$ with two functions $G_{X}: \mathcal{Z} \to \mathcal{X}$ and $G_{Y}: \mathcal{Z} \to \mathcal{Y}$ , respectively. + +According to [36], instead of finding a coupling $\Gamma$ between $(X, \hat{X})$ and $(Y, \hat{Y})$ , it is sufficient to find a conditional distribution $Q(Z|X,Y)$ such that its $Z$ marginal distribution $(Q_Z)$ is identical to the prior distribution $P_Z$ , here $Q_Z$ can be computed by + +$$ +Q _ {Z} := \mathbb {E} _ {(X, Y) \sim P} [ Q (Z | X, Y) ] = \mathbb {E} _ {X \sim P _ {X}, Y \sim P _ {Y}} [ Q (Z | X, Y) ] \tag {5} +$$ + +In this situation, the OT cost can be re-written as + +$$ +\inf _ {\mathcal {Q}: \mathcal {Q} _ {Z} = P _ {Z}} \mathbb {E} _ {P _ {X}} \mathbb {E} _ {P _ {Y}} \mathbb {E} _ {\mathcal {Q} _ {(Z | X, Y)}} \left[ c _ {1} (X, G _ {X} (Z)) + c _ {2} (Y, G _ {Y} (Z)) \right] \tag {6} +$$ + +where $c_{1}(\mathbf{x},\hat{\mathbf{x}})$ and $c_{2}(\mathbf{y},\hat{\mathbf{y}})$ are measurable cost functions with non-negative value. + +In order to implement a numerical solution, the above constrained problem can be relaxed by adding a penalty, i.e., + +$$ +\begin{array}{l} W _ {c} (P, P _ {G}) = \inf _ {Q (Z | X, Y) \in \mathcal {Q}} \mathbb {E} _ {P _ {X}} \mathbb {E} _ {P _ {Y}} \mathbb {E} _ {Q (Z | X, Y)} \left[ c _ {1} (X, G _ {X} (Z)) \right. \\ \left. + c _ {2} \left(Y, G _ {Y} (Z)\right) \right] + \lambda \cdot D _ {Z} \left(Q _ {Z}, P _ {Z}\right). \tag {7} \\ \end{array} +$$ + +where $\mathcal{Q}$ is any nonparametric set of recognition model. $D_{\mathbf{z}}$ is an arbitrary divergence between $Q_{Z}$ and $P_Z$ . In this work, the maximum mean discrepancy (MMD) is adopted since it shares the properties of divergence functions and has the + +ability to form an unbiased U-estimator [8]. The other reason is that MMD is conjuncted with the subsequent stochastic gradient descent (SGD) methods. $\lambda > 0$ is the hyperparameter to trade-off the corresponding terms. + +![](images/badf8c011ef7ea7bbc876b192e3a5cb43b0bd562ececa1ff26edcf73efb92790.jpg) +Figure 3. Neural network version of the proposed DGC. + +To efficiently handle the objective function, we adopt stochastic optimization technique. Then, the objective function can be calculated along each training sample as follows. + +$$ +\begin{array}{l} \mathcal {L} \left(\mathbf {x} _ {i}; \mathbf {y} _ {i}; \theta , \phi\right) \\ = \inf _ {q _ {\phi} (\mathbf {z} _ {\mathbf {i}} | \mathbf {x} _ {i}, \mathbf {y} _ {i}) \in \mathcal {Q}} \mathbb {E} _ {p _ {\mathbf {x} _ {i}}} \mathbb {E} _ {p _ {\mathbf {y} _ {i}}} \mathbb {E} _ {q _ {\phi} \left(\mathbf {z} _ {\mathbf {i}} \mid \mathbf {x} _ {i}, \mathbf {y} _ {i}\right)} \left[ c _ {1} \left(\mathbf {x} _ {i}, g _ {\theta_ {1}} \left(\mathbf {x} _ {i} \mid \mathbf {z} _ {i}\right)\right) \right. \tag {8} \\ \left. + c _ {2} \left(\mathbf {y} _ {i}, g _ {\theta_ {2}} \left(\mathbf {y} _ {i} \mid \mathbf {z} _ {i}\right)\right) \right] + \lambda \cdot D _ {\mathbf {z}} \left(q _ {\phi} \left(\mathbf {z} _ {i} \mid \mathbf {x} _ {i}, \mathbf {y} _ {i}\right), p (\mathbf {z} _ {i})\right). \\ \end{array} +$$ + +Among it, $c_{1}$ measures the distance between the given data $\mathbf{x}_i$ and the generated data $\hat{\mathbf{x}}_i = g_{\theta_1}(\mathbf{x}_i|\mathbf{z}_i)$ on feature space via $c_{1}(\mathbf{x}_{i},\hat{\mathbf{x}}_{i}) = ||\mathbf{x}_{i} - \hat{\mathbf{x}}_{i}||_{2}^{2}$ . $c_{2}$ evaluates the difference between the ground truth label information $\mathbf{y}_i$ and the generated label information $\hat{\mathbf{y}}_i = g_{\theta_2}(\mathbf{y}_i|\mathbf{z}_i)$ . Specially, we adopt the cross-entropy loss function, i.e., $c_{2}(\mathbf{y}_{i},\hat{\mathbf{y}}_{i}) = \mathbf{y}_{i}\log \hat{\mathbf{y}}_{i} + (1 - \mathbf{y}_{i})\log (1 - \hat{\mathbf{y}}_{i})$ to measure the difference on label space. Note the parameters need to be optimized include $\theta = \{\theta_1,\theta_2\}$ and $\phi = \{\phi_1,\phi_2\}$ , as shown in Figure 3. + +To obtain an unbiased estimate of $\mathcal{L}(\mathbf{x}_i,\mathbf{y}_i;\theta ,\phi)$ we can sample $\mathbf{z}_i$ via $\mathbf{z}_i\sim q_\phi (\mathbf{z}_i|\mathbf{x}_i,\mathbf{y}_i)$ . More specifically, by taking advantage of reparameterization trick for Gaussian distribution, we sample $\epsilon \sim \mathcal{N}(0,\mathbf{I}^{\mathbf{k}})$ and reparametrize $\mathbf{z}_i = \mu_{\phi}(\mathbf{x}_i,\mathbf{y}_i) + \epsilon \odot \sigma_{\phi}(\mathbf{x}_i,\mathbf{y}_i)$ . For imbalanced data, there are only few samples in minority classes. To make up for the limitation of input data, a set of latent codes $\{\mathbf{z}_i^{(j)}\}_{j = 1}^{s^c}$ is sampled if the corresponding input point $\mathbf{x}_i$ belongs to the minority classes and $\mathbf{y}_i = c$ , where $s^c$ is the number of oversampling latent codes for each instance of the $c$ -th class. The oversampling codes will be used to generate synthetic data in the original feature space via decoder $(\mathbf{z}_i^{(j)}$ for $\mathbf{x}_i^{(j)})$ and infer more robust classifier $p(\mathbf{y}|\mathbf{z})$ . + +The model parameters $\{\theta, \phi\}$ can be iteratively updated by minimizing (8) with the aid of stochastic variational inference [17]. Once having the optimal model, a generative classifier will be built, where the conditional distribution $p(\mathbf{y}_{\mathbf{c}}|\mathbf{x})$ for the $c$ -th class has its support as a low-dimensional manifold. Then, the proper label vector $y^{*} \in \mathbb{R}^{C}$ of any new coming point $x^{*} \in \mathbb{R}^{D}$ can be obtained by an approximation to Bayes' rule with importance + +sampling $\mathbf{z}_c^s\sim q(\mathbf{z}|\mathbf{x}^*,\mathbf{y}_c)$ + +$$ +p \left(y ^ {*} \mid x ^ {*}\right) \approx \operatorname {s o f t m a x} _ {c = 1} ^ {C} \left\{\log \frac {1}{S} \sum_ {s = 1} ^ {S} \mathcal {L} \left(\mathbf {x} ^ {*}, \mathbf {y} _ {c}, \mathbf {z} _ {c} ^ {s}; \theta , \phi\right) \right\} \tag {9} +$$ + +$S$ is the sampling size. In experiment, it is set to be 10 for prediction. + +# 3.4. Error bound analysis + +In this subsection, we will theoretically analyze the generalization error bounds of the proposed model. Motivated by [3], we can define the generalization of input feature and label generation process by measuring the difference between the population real data distribution $(\mathcal{P}_{real})$ and generated data distribution $(\mathcal{P}_G)$ . The generalization error will be acceptable if the population distance between $\mathcal{P}_{real}$ and $\mathcal{P}_G$ is close to the empirical distance between the observed real data distribution $(\tilde{\mathcal{P}}_{real})$ and its generated distribution $(\tilde{\mathcal{P}}_G)$ . In the proposed deep latent variable model, given latent code $Z$ , the input feature information $X$ is independent to input label $Y$ , i.e., $(X \perp Y|Z)$ . In this case, the data distribution $(X,Y) \sim \mathcal{P}_{real}$ can be factorized into two parts $X \sim \mathcal{X}_{real}$ and $Y \sim \mathcal{Y}_{real}$ , similar to $\mathcal{P}_G$ , $\tilde{\mathcal{P}}_{real}$ and $\tilde{\mathcal{P}}_G$ . + +Definition 1 For the empirical real distribution $(\tilde{\mathcal{X}}_{real},\tilde{\mathcal{Y}}_{real})$ with $N$ training examples, a generated distribution $(\tilde{\mathcal{X}}_G,\tilde{\mathcal{Y}}_G)$ generalizes under the distribution distance $d(\cdot ,\cdot)$ with generalization error $\delta_1,\delta_2 > 0$ if the following holds with high probability, + +$$ +\left| E (X) - E (\tilde {X}) \right| \leq \delta_ {1} \tag {10} +$$ + +$$ +\left| E (Y) - E (\hat {Y}) \right| \leq \delta_ {2} \tag {11} +$$ + +where $E(X)$ and $E(Y)$ indicate the population distance between the real and generated distributions on feature and label information respectively. $E(\hat{X})$ and $E(\hat{Y})$ are the corresponding empirical distances. + +(10) and (11) can be proved by the following two theorems and the detailed proof is given in Supplementary. + +Theorem 1 For any $X\in \mathbb{R}^{D\times N}$ $(N,D > 0)$ + +$$ +E (X) \leq E (\tilde {X}) + \sqrt {\frac {\log \delta_ {1}}{- 2 N} \left(\max _ {i} d _ {i}\right) ^ {2}} +$$ + +holds with probability at least $1 - \delta_{1}(\delta_{1} > 0)$ over uniformly choosing an empirical version $(\tilde{X})$ of $X$ . Here, $d_{i} = d(\tilde{\mathbf{x}}_{i}^{(real)},\tilde{\mathbf{x}}_{i}^{(G)}) = ||\tilde{\mathbf{x}}_{i}^{(real)} - \tilde{\mathbf{x}}_{i}^{(G)}||_{2}^{2}$ . + +Theorem 2 Given prior label probabilities $\{p_1,\dots ,p_c,\dots ,p_C\}$ (where $p_c = P(y = c)$ and $\sum_{c = 1}^{C}p_{c} = 1$ ) and the conditional latent variable densities $\{f_1,f_2,\dots ,f_C\}$ (where $f_{c} = f(\mathbf{z}|y = c))$ , following [30], the error rate of generative classifier can be formulated and bounded: + +$$ +\left| E (Y) - E (\tilde {Y}) \right| = 1 - \int \max \left\{p _ {1} f _ {1} (\mathbf {z}), \dots , p _ {C} f _ {C} (\mathbf {z}) \right\} d \mathbf {z} \leq \delta_ {2}. +$$ + +Table 1. Summarization of the experimental datasets. + +
DatasetShapeClassesIRTraining SetTesting Set
MNIST28 × 28 × 1101004000, 2000, 1000, 750, 500, 350, 200, 100, 60, 40980, 1135, 1032, 1010, 982, 892, 985, 1028, 974, 1009
Fashion-MNIST28 × 28 × 1101004000, 2000, 1000, 750, 500, 350, 200, 100, 60, 401000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 100
SVHN32 × 32 × 31056.254500, 2000, 1000, 800, 600, 500, 400, 250, 150, 801744, 5099, 4149, 2882, 2523, 2384, 1977, 2019, 1660, 1595
CelebA64 × 64 × 3510015000, 1500, 750, 300, 1502660, 5422, 423, 3587, 636
+ +DGC aims to build a robust imbalance classifier by modeling generation processes of input feature and label. The theoretical analysis is to derive generalization error bounds of these two generation processes. Theorem 1 shows that the bound on feature generation will be tight when generated instances are realistic (small $\max_i d_i$ ), which is empirically proven in Fig.6. Theorem 2 indicates the bound on label generation will be tight when the ground-truth label has a higher probability while other labels have much lower probabilities, which is empirically proven by the classification accuracy. + +# 4. Experiments + +In this section, a series of experiments are conducted to evaluate the proposed method. The code is available at https://github.com/lvyilin/DGC. + +# 4.1. Datasets + +The experimental data includes two single-channel image sets (MNIST [19] and Fashion-MNIST [41]) and two three-channel image sets (SVHN [28] and CelebA [23]). These datasets are not significantly imbalanced in nature. Following GAMO [27], we created imbalanced datasets by randomly selecting instances with different sizes from different classes in order of their indices. For CelebA, only five non-overlapping classes (blonde, black, bald, brown, and gray) are kept. Details of these datasets are shown in Table 1. Obviously, there is a large imbalance ratio (IR: ratio of the number of instances from the largest class to that of the smallest class) from 56.25 to 100. Note that datasets with imbalance ratio over 10 can be regarded as highly imbalanced [9, 39]. Larger ratio will make the learning problem more difficult. For each dataset, the classification performance is evaluated on the public testing set. All the methods run on five imbalanced subsets with same size (for each dataset) to mitigate any bias generated due to randomization. The average results and corresponding statistics are recorded. + +# 4.2. Methodology + +In order to validate the imbalance classification performance, five well-known and widely used metrics [14, 26, 37] are adopted: recall of minority class $(R_{MI})$ , precision of majority class $(P_{MA})$ , average class specific accuracy (ACSA), macro-averaged geometric mean $(G_{macro})$ and macro-averaged F-measure $(F_{macro})$ . Larger value indicates better performance. + +We choose two kinds of methods as baselines, one for robust learning with data perturbation and the other with model perturbation. The first kind contains BAGAN [25], DFBS [22], and GAMO [27]. Among them, BAGAN and DFBS firstly augment imbalanced data and then adopt the existing methods to train classifier. GAMO is one-stage and outperforms the recently proposed deep oversampling method [1]. The second type includes mmDGMs [20] and BayesCNN [33]. mmDGMs adopts a latent variable to affect the generation process on feature information, and the discriminative model for label prediction. BayesCNN implements robust prediction by introducing uncertainty on the parameters of convolutional neural which is a good architecture for images. + +The parameters of all algorithms we compared with are adopted from their original papers or determined by experiments. For our DGC model, the size of latent space $(k)$ is set to 64 for the first three datasets and 128 for the fourth dataset to capture more information. $\lambda \in \{1,10\}$ is tuned by 5-fold cross-validation technique. + +# 4.3. Results and discussion + +The experimental results are listed and analyzed from two facets: comparing the proposed DGC with baselines and investigating its stability. + +# Comparing classification performance + +To make a fair comparison, the trained models are evaluated by the same public testing set for each dataset. The overall classification performance (average value and the standard variance in terms of ACSA, $G_{macro}$ and $F_{macro}$ ) on four benchmark datasets are listed in Table 2. The best + +Table 2. Comparing overall classification performance on experimental datasets. + +
MNISTFashion-MNIST
MethodACSAF_macroG_macroACSAF_macroG_macro
BAGAN0.8848 ± 0.020.8785 ± 0.020.9295 ± 0.010.7814 ± 0.010.7610 ± 0.010.8546 ± 0.01
DFBS0.7812 ± 0.040.7838 ± 0.040.8683 ± 0.020.5135 ± 0.170.4620 ± 0.270.6382 ± 0.21
GAMO0.8826 ± 0.010.8794 ± 0.010.9308 ± 0.000.7929 ± 0.010.7880 ± 0.010.8740 ± 0.00
BayesCNN0.9158 ± 0.010.9141 ± 0.010.9512 ± 0.010.7934 ± 0.010.7835 ± 0.010.8701 ± 0.01
mmDGMs0.9066 ± 0.020.9039 ± 0.020.9449 ± 0.010.8091 ± 0.000.7984 ± 0.010.8796 ± 0.00
DGC0.9480 ± 0.000.9474 ± 0.000.9704 ± 0.000.8364 ± 0.000.8314 ± 0.000.9010 ± 0.00
SVHNCelebA
MethodACSAF_macroG_macroACSAF_macroG_macro
BAGAN0.6785 ± 0.010.6719 ± 0.010.7876 ± 0.010.5972 ± 0.000.5152 ± 0.020.6554 ± 0.01
DFBS0.4788 ± 0.030.4745 ± 0.030.6539 ± 0.020.2109 ± 0.000.1335 ± 0.010.2664 ± 0.01
GAMO0.6474 ± 0.010.6457 ± 0.010.7784 ± 0.010.6409 ± 0.020.5903 ± 0.030.7472 ± 0.02
BayesCNN0.5511 ± 0.030.5392 ± 0.030.6998 ± 0.020.5517 ± 0.040.4936 ± 0.040.6534 ± 0.04
mmDGMs0.7220 ± 0.010.7291 ± 0.010.8291 ± 0.010.3760 ± 0.030.0618 ± 0.140.3754 ± 0.04
DGC0.7493 ± 0.010.7535 ± 0.010.8501 ± 0.000.6755 ± 0.030.6454 ± 0.020.7779 ± 0.03
+ +Table 3. Comparing prediction performance on the smallest class $\left( {R}_{MI}\right)$ and largest class $\left( {P}_{MA}\right)$ . + +
MNISTFashion-MNISTSVHNCelebA
Method\( R_{MI} \)\( P_{MA} \)\( R_{MI} \)\( P_{MA} \)\( R_{MI} \)\( P_{MA} \)\( R_{MI} \)\( P_{MA} \)
BAGAN0.53540.85410.73060.57090.16300.42220.01920.5064
DFBS0.59460.51180.44120.33950.19460.21730.05220.2174
GAMO0.63940.88120.79280.61650.28130.40470.23020.6687
BayesCNN0.75780.88960.84740.60220.12630.32760.10630.5225
mmDGMs0.65250.84590.81600.59420.37400.43010.00060.4110
DGC0.82760.92700.88640.69000.48820.53480.29870.7603
+ +results are highlighted in bold. As expected, the proposed DGC obtained the best performance in all cases. + +From this result, we can get following observations. DFBS, as a two-stage method, performs worse than other methods, because it cannot guarantee generated instances are useful to create margins among classes. GAMO, as a one-stage method, performs better than DFBS, however it is hard to trade off the discriminator and classifier, so that the generated images look real but cannot demonstrate the intrinsic structure of classes. BAGAN is superior to DFBS because it adopts AE to determine class distribution on latent space. Unfortunately, the initialization strategy of subsequent GAN may push BAGAN to fall into the mode collapse problem. BayesCNN cannot obtain satisfying results even though it adopts model perturbation strategy, because imbalanced data contains too few instances to sufficiently train the complicated model. mmDGMs takes advantage of generative model and perturbation on latent code. However, it adopts the discriminative classifier to determine class boundaries, which limits its performance on highly imbalanced data. This result confirms that DGC can construct effective imbalanced classifier by integrating data and model perturbation in a unified deep generative model. + +In real-world applications, the minority class is of more interest. Thus, it is expected that the classifier can return a + +higher recall on minority class and maintain higher precision on majority class. Table 3 lists the recall of the smallest class (i.e., the percentage of minority instances correctly predicted) and the precision of the largest class (i.e., the percentage of correct predictions in majority class). It can be seen that, for Fashion-MNIST, five baselines increase the performance on minority class but their performances on majority class are not significantly improved. For CelebA, baselines definitely output worse results on minority class. This result indicates that existing methods cannot determine the clear boundaries among classes. Fortunately, for both the minority class and majority class, DGC consistently obtains the best and high-quality classification results. Pairwise t-test is conducted along each evaluation metric at $95\%$ confidence level. Fortunately, the p-value between DGC and any baseline is below 0.01, which demonstrates DGC has ability to significantly improve classification performance. + +# - Investigating stability of DGC + +To investigate the learning process of DGC, we display the convergence of latent code on its mean $(\mu)$ and standard deviation $(\sigma)$ over epochs. It is hard to show all latent codes since there are $k$ latent features and each input data has a latent code. Therefore, we randomly select two + +![](images/bd48d91cb6eb62d6d9dcc5ab1d1b5522fcdd4737dd247fb32506e670811d3535.jpg) +(a) + +![](images/327454a30fbcac65495dca65fdc9ddf2362dbbefcc9994d4c5ce0b6c970ac861.jpg) +(b) +Figure 4. Convergence of (a) $\sigma$ values and (b) $\mu$ values (only the first latent feature is demonstrated for two instances A and B which are randomly selected from two classes. + +![](images/e1cec467beb82a2a2e2ab69fbd1c2fc9d2b37ed5ffe2a4f6af5f3d7aa01e4c11.jpg) +(a) Input Data $(X)$ +Figure 5. tSNE analysis of (a) input data $(X)$ and (b) latent codes $(Z)$ obtained by DGC on Fashion-MNIST dataset. + +![](images/ca5f7b78e9edcec207f7d03b00021ef42aee85bad473da30a51088ee73546614.jpg) +(b) DGC (Z) + +![](images/0ddc7d624e637f2572807ed52b885a2522e7f962a10ac68e0825af356752159d.jpg) +(a) The largest class +Figure 6. Generated Fashion-MNIST images by DGC for (a) the largest class and (b) the smallest class. + +![](images/293792236cb1a4b5df7b3f7ea0a0e01a1d3e249c01eefc36b29697dcfbb2273d.jpg) +(b) The smallest class + +training instances ( $A$ and $B$ belonging to class $C_1$ and $C_2$ ) from Fashion-MNIST, and demonstrate the convergence of the first latent feature $(\mu_1, \sigma_1)$ . As aforementioned, the variational posterior distribution $q_{\phi}(\mathbf{z}|\mathbf{x}, \mathbf{y})$ are approximated as Gaussian distributions which become more confident over epochs, decreasing standard deviation as shown in Figure 4(a). An interesting thing is that two means ( $\mu$ for $A$ and $B$ ) are separated and converge over epochs in Figure 4(b). + +Meanwhile, we adopt tSNE analysis [24] to visually present the discriminative ability of DGC. Taking Fashion-MNIST dataset as an example, tSNE is firstly applied on the training data, i.e., projecting the original feature space to a 2-dimension space. When visualizing the instances, different classes are marked in different colors. The results on the original input feature space and the learned latent feature space are demonstrated in Figure 5(a) and 5(b). Obviously, it is not easy to directly separate classes in the original feature space. To be exciting, the class boundaries are clear in the latent space, which further confirms that the latent code $\mathbf{z}$ has the discriminative ability. This result further confirms that DGC is good at identifying the direct cause of target + +![](images/cb60d45d5877bc07e746bfa04fcbd36bdb873ea9ed4cc26d2c33e674d09d5b1d.jpg) +Figure 7. Effect of sampling rate $(r)$ on DGC. + +label. Figure 6 gives the generated images with $\mathbf{z}$ . As expected, DGC indeed generates realistic and diverse images. + +In experiments, the latent code is sampled from the learned Gaussian distribution. The number of latent codes $(s^c)$ for each instance in the $c$ -th class is set to be $\max \{1, r \times \frac{n_{max}}{n_c}\}$ , where $n_c$ is the size of $c$ -th class, $n_{max} = \max \{n_c|_{c=1}^C\}$ is the size of the largest class, and $r$ is the sampling rate. We test DGC under varying sampling rate $r$ , as shown in Figure 7. DGC slightly benefits from large rate $r$ , while its performance decreases when $r$ is too large. It is reasonable because more oversampled similar codes may result in overfitting. This result demonstrates that sampling few latent codes is good enough to construct imbalanced classifier, which makes the training process more efficient. + +# 5. Conclusions and future work + +In this paper, we proposed a deep generative model for imbalance classification. It takes advantage of data perturbation and model perturbation to improve the prediction accuracy and learning stability on imbalanced data. DGC is inferred by utilizing Wasserstein distance. As a generative model, it can be improved by adopting improved architectures for future investigation, such as Self-Attention [44] or sliced-Wasserstein generative model [40], which can achieve good performance by considering more detailed features or efficient projection along random directions. + +# 6. Acknowledgment + +Liping Jing is the corresponding author. This work was supported in part by the National Natural Science Foundation of China under Grant 61822601, 61773050, and 61632004; the Beijing Natural Science Foundation under Grant Z180006; National Key Research and Development Program (2017YFC1703506); The Fundamental Research Funds for the Central Universities (2019JBZ110); Science and technology innovation planning foundation of colleges and Universities under the guidance of the Ministry of Education. + +# References + +[1] Shin Ando and Chun Yuan Huang. Deep over-sampling framework for classifying imbalanced data. 2017. +[2] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein generative adversarial networks. In International Conference on Machine Learning, pages 214-223, 2017. +[3] Sanjeev Arora, Rong Ge, Yingyu Liang, Tengyu Ma, and Yi Zhang. Generalization and equilibrium in generative adversarial nets (gans). In Proceedings of the 34th International Conference on Machine Learning, pages 224-232. JMLR.org, 2017. +[4] Charles Blundell, Julien Cornebise, Koray Kavukcuoglu, and Daan Wierstra. Weight uncertainty in neural networks. In Proceedings of the 32nd International Conference on Machine Learning, 2015. +[5] Paula Branco, Luís Torgo, and Rita P Ribeiro. A survey of predictive modeling on imbalanced domains. ACM Computing Surveys, 49:1-56, 2016. +[6] Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: interpretable representation learning by information maximizing generative adversarial nets. In Advances in Neural Information Processing Systems, pages 2172-2180, 2016. +[7] Georgios Douzas and Fernando Bacao. Effective data generation for imbalanced learning using conditional generative adversarial networks. Expert Systems with Applications, 91:464-471, 2018. +[8] Gintare Karolina Dziugaite, Daniel M. Roy, and Zoubin Ghahramani. Training generative neural networks via maximum mean discrepancy optimization. In Proceedings of the Uncertainty in Artificial Intelligence, pages 258-267. AUAI, 2015. +[9] Alberto Fernández, Salvador García, María José del Jesus, and Francisco Herrera. A study of the behaviour of linguistic fuzzy rule based classification systems in the framework of imbalanced data sets. Fuzzy Sets and Systems, 159(18):2378-2398, 2008. +[10] Jon Gauthier. Conditional generative adversarial nets for convolutional face generation. Technical Report, 2015. +[11] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems, pages 2672–2680, 2014. +[12] Ting Guo, Xingquan Zhu, Yang Wang, and Fang Chen. Discriminative sample generation for deep imbalanced learning. In Proceedings of the 28th International Joint Conference on Artificial Intelligence, pages 2406-2412. AAAI Press, 2019. +[13] Guo Haixiang, Li Yijing, Jennifer Shang, Gu Mingyun, Huang Yuanyue, and Gong Bing. Learning from class-imbalanced data: review of methods and applications. Expert Systems with Applications, 73:220-239, 2017. +[14] Haibo He and Edwardo A Garcia. Learning from imbalanced data. IEEE Transactions on Knowledge and Data Engineering, 21(9):1263-1284, 2009. + +[15] Nathalie Japkowicz and Shaju Stephen. The class imbalance problem: a systematic study. Intelligent Data Analysis, 6(5):429-449, 2002. +[16] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. +[17] Rahul G Krishnan, Dawen Liang, and Matthew Hoffman. On the challenges of learning with inference networks on sparse, high-dimensional data. arXiv preprint arXiv:1710.06085, 2017. +[18] Kun Kuang, Peng Cui, Susan Athey, Ruoxuan Xiong, and Bo Li. Stable prediction across unknown environments. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 1617-1626. ACM, 2018. +[19] Yann LeCun, Corinna Cortes, and Christopher JC Burges. The mnist database of handwritten digits, 1998. URL http://yann.lecun.com/exdb/mnist, 10:34, 1998. +[20] Chongxuan Li, Jun Zhu, and Bo Zhang. Max-margin deep generative models for (semi-) supervised learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40(11):2762-2775, 2017. +[21] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólár. Focal loss for dense object detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 2980-2988, 2017. +[22] Yi-Hsun Liu, Chien-Liang Liu, and Shin-Mu Tseng. Deep discriminative features learning and sampling for imbalanced data problem. In 2018 IEEE International Conference on Data Mining (ICDM), pages 1146-1151. IEEE, 2018. +[23] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep learning face attributes in the wild. In Proceedings of International Conference on Computer Vision (ICCV), December 2015. +[24] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(Nov):2579-2605, 2008. +[25] Giovanni Mariani, Florian Scheidegger, Roxana Istrate, Costas Bekas, and Cristiano Malossi. Bagan: data augmentation with balancing gan. Computer Vision and Pattern Recognition, 2018. +[26] Ajinkya More. Survey of resampling techniques for improving classification performance in unbalanced datasets. arXiv preprint arXiv:1608.06048, 2016. +[27] Sankha Subhra Mullick, Shounak Datta, and Swagatam Das. Generative adversarial minority oversampling. In Proceedings of the IEEE International Conference on Computer Vision, pages 1695-1704, 2019. +[28] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. 2011. +[29] Shibani Santurkar, Ludwig Schmidt, and Aleksander Mkadry. A classification-based study of covariate shift in gan distributions. In International Conference on Machine Learning, pages 4487-4496, 2018. +[30] Salimeh Yasaei Sekeh, Brandon Oselio, and Alfred O Hero. Learning to bound the multi-class bayes error. arXiv preprint arXiv:1811.06419, 2018. + +[31] Soroosh Shafieezadeh-Abadeh, Daniel Kuhn, and Peyman Mohajerin Esfahani. Regularization via mass transportation. Journal of Machine Learning Research, 20(103):1-68, 2019. +[32] Soroosh Shafieezadeh-Abadeh, Daniel Kuhn, and Peyman Mohajerin Esfahani. Regularization via mass transportation. Journal of Machine Learning Research, 20(103):1-68, 2019. +[33] Kumar Shridhar, Felix Laumann, and Marcus Liwicki. A comprehensive guide to bayesian convolutional neural network with variational inference. https://arxiv.org/pdf/1901.02731.pdf, 2019. +[34] Paolo Soda. A multi-objective optimisation approach for class imbalance learning. Pattern Recognition, 44(8):1801-1810, 2011. +[35] Akash Srivastava, Lazar Valkov, Chris Russell, Michael U Gutmann, and Charles Sutton. Veegan: reducing mode collapse in gans using implicit variational learning. In *In Advances in Neural Information Processing Systems*, pages 3308-3318, 2017. +[36] Ilya Tolstikhin, Olivier Bousquet, Sylvain Gelly, and Bernhard Schoelkopf. Wasserstein auto-encoders. In Proceedings of International Conference on Learning Representations, 2018. +[37] Vincent Van Asch. Macro- and micro-averaged evaluation measures [[basic draft]]. 2013. +[38] Zhiqiang Wan, Yazhou Zhang, and Haibo He. Variational autoencoder based synthetic data generation for imbalanced learning. In 2017 IEEE Symposium Series on Computational Intelligence (SSCI), pages 1-7. IEEE, 2017. +[39] Fei Wu, Xiao-Yuan Jing, Shiguang Shan, Wangmeng Zuo, and Jing-Yu Yang. Multiset feature learning for highly imbalanced data classification. In Thirty-First AAAI Conference on Artificial Intelligence, 2017. +[40] Jiqing Wu, Zhiwu Huang, Dinesh Acharya, Wen Li, Janine Thoma, Danda Pani Paudel, and Luc Van Gool. Sliced wasserstein generative models. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3713-3722, 2019. +[41] Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017. +[42] Bin Yu and Karl Kumbier. Three principles of data science: predictability, computability, and stability (pcs). arXiv preprint arXiv:1901.08152, 2019. +[43] Chunkai Zhang, Ying Zhou, Yingyang Chen, Yepeng Deng, Xuan Wang, Lifeng Dong, and Haoyu Wei. Over-sampling algorithm based on vae in imbalanced classification. In International Conference on Cloud Computing, pages 334-344. Springer, 2018. +[44] Han Zhang, Ian Goodfellow, Dimitris Metaxas, and Augustus Odena. Self-attention generative adversarial networks. arXiv preprint arXiv:1805.08318, 2018. \ No newline at end of file diff --git a/deepgenerativemodelforrobustimbalanceclassification/images.zip b/deepgenerativemodelforrobustimbalanceclassification/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..da5d85a8535669a120eeb70a06d3eadf66758a75 --- /dev/null +++ b/deepgenerativemodelforrobustimbalanceclassification/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba7223b0c73d8b4f106633d78745b11aa6d7444e228adfec321ee756f978d58a +size 478089 diff --git a/deepgenerativemodelforrobustimbalanceclassification/layout.json b/deepgenerativemodelforrobustimbalanceclassification/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..425969c733e855e895dddc788011cd6ed7723b01 --- /dev/null +++ b/deepgenerativemodelforrobustimbalanceclassification/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7e25ba68c873d06ba7bfd5f5d50668a20c51a2ee977f701772b5487469e7da3 +size 467401 diff --git a/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/572e5b6b-7130-4b06-b2c6-860126408b46_content_list.json b/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/572e5b6b-7130-4b06-b2c6-860126408b46_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d39682f12c8ee293ec926179c3bf1038b104dc0f --- /dev/null +++ b/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/572e5b6b-7130-4b06-b2c6-860126408b46_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9672d9d616c2f6d663c07c33dcd130eafd144ec9d815d839228aeb28b77128cf +size 78117 diff --git a/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/572e5b6b-7130-4b06-b2c6-860126408b46_model.json b/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/572e5b6b-7130-4b06-b2c6-860126408b46_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e1d54474e2d763385314823cac480f53647200a7 --- /dev/null +++ b/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/572e5b6b-7130-4b06-b2c6-860126408b46_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61593dbebbc3960f4402d23d0814354e8900965935c6f42661dfac7bb5032c55 +size 96324 diff --git a/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/572e5b6b-7130-4b06-b2c6-860126408b46_origin.pdf b/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/572e5b6b-7130-4b06-b2c6-860126408b46_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ac8dbb5a58506845a06cf5d5b3baccb0423eae2d --- /dev/null +++ b/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/572e5b6b-7130-4b06-b2c6-860126408b46_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0cb4b61dd3e19d62dbe6e47bc09f145aaa6e220ee2502044677b7f4cc44a362 +size 988311 diff --git a/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/full.md b/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/full.md new file mode 100644 index 0000000000000000000000000000000000000000..d05750ee1fe352c78c7fe7628bb33866bed3c01f --- /dev/null +++ b/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/full.md @@ -0,0 +1,335 @@ +# Deep Geometric Functional Maps: Robust Feature Learning for Shape Correspondence + +Nicolas Donati +LIX, École Polytechnique + +nicolas.donati@polytechnique.edu + +Abhishek Sharma +LIX, École Polytechnique +kein.iitian@gmail.com + +Maks Ovsjanikov +LIX, École Polytechnique +maks@lix.polytechnique.fr + +# Abstract + +We present a novel learning-based approach for computing correspondences between non-rigid 3D shapes. Unlike previous methods that either require extensive training data or operate on handcrafted input descriptors and thus generalize poorly across diverse datasets, our approach is both accurate and robust to changes in shape structure. Key to our method is a feature-extraction network that learns directly from raw shape geometry, combined with a novel regularized map extraction layer and loss, based on the functional map representation. We demonstrate through extensive experiments in challenging shape matching scenarios that our method can learn from less training data than existing supervised approaches and generalizes significantly better than current descriptor-based learning methods. Our source code is available at: https://github.com/LIX-shape-analysis/GeomFmaps. + +# 1. Introduction + +Shape correspondence is a key problem in computer vision, computer graphics and related fields with a broad range of applications, including texture or deformation transfer and statistical shape analysis [7], among many others. While classical correspondence methods have been based on handcrafted features or deformation models [49], more recent approaches have focused on learning an optimal model from the data either in supervised [11, 53, 25, 16] or even unsupervised settings [19, 43, 17]. + +Despite significant progress in recent years, however, learning-based approaches for shape correspondence typically require large amounts of training data in order to learn a model that generalizes well to diverse shape classes [53, 16]. Several existing methods address this challenge by learning a derived representation, through a nonlinear transformation of pre-computed feature descriptors [11, 25, 19, 43], rather than on the geometry of the shapes themselves. Unfortunately, as we demonstrate below, this + +![](images/78407cdabaa9640b29f9bd752a0ae4075b31b5ddbacb876d7a7415bca934711c.jpg) + +![](images/daea5957430956d0a40ca99584532b7e3b84960cb4da0a34e97955320a03dd60.jpg) +Point Cloud Descriptors + +![](images/37fbba3e486f6d2f8cf2376b7c92f624ea048415ed8bdf695ceea7d8745b022b.jpg) +Point-to-Point Map +Figure 1. Given a pair of shapes, our approach builds consistent descriptors directly from the underlying point clouds (left), and automatically computes an accurate pointwise correspondence (right). + +reliance on a priori hand-crafted descriptors makes the resulting learned models both less robust and less accurate leading to a significant drop in generalization power to new shape classes or instances. + +In this work, we propose an approach that combines the power of learning directly from the 3D shapes with strong regularization based on a novel spectral correspondence extraction layer. Our method is inspired by recent learning techniques employing the functional map representation [25, 43]; however, we extend them to learn the features from 3D geometry rather than from some pre-computed de + +scriptors. Furthermore, we introduce a regularizer into the functional map computation layer that greatly improves the speed and robustness of training. Finally, we demonstrate how the spectral loss based on the functional map representation in the reduced basis significantly reduces overfitting, while still leading to accurate correspondences coupled with recent post-processing techniques. As a result, our overall pipeline is both more robust and has greater generalization power than existing methods, while still being able to learn from limited training data. + +# 2. Related Work + +Computing point-to-point maps between two 3D discrete surfaces is a very well-studied area of computer vision. Below, we review those closest to our method, or with the best known results to serve as baselines, and refer to recent surveys [49, 6, 44] for an in-depth discussion. + +Our method is built upon the functional map representation, which was originally introduced in [32] as a tool for non-rigid shape matching, and then extended in follow-up works [33]. The key property of this representation is being able to express maps as small matrices, encoded in a reduced basis, which greatly simplifies the associated optimization problems. + +The original work used only a basic set of constraints on functional maps, which have been extended significantly in, e.g., [24, 2, 20, 14, 9, 41, 31, 21, 40] among many other works. These approaches both extend the generality and improve the robustness of the functional map estimation pipeline, by using regularizers, robust penalties and powerful post-processing of the computed maps. + +A key challenge in all of functional map estimation techniques, however, is the strong reliance on given input descriptors used for computing the maps. Several approaches have suggested to use robust norms [24, 23], improved pointwise map recovery [42, 15] or more principled regularizers [39] which can help alleviate noise in the input descriptors to a certain extent but do not resolve strong inconsistencies in challenging cases. + +More recent techniques have advocated learning optimal descriptors for functional map estimation directly from the data [11, 25]. These methods compute a transformation of given input descriptors so that the estimated functional maps are close to ground truth maps given during training. This idea was very recently extended to the unsupervised setting [19, 43] where the supervised loss was replaced with structural penalties on the computed maps. + +Despite significant progress, however, in all of these cases, the descriptors are optimized through a transformation of hand-crafted input features, such as SHOT [48], Heat [45] or Wave kernel signatures [5]. This has two severe consequences: first, any information not present in the input features will be absent from the optimized descriptors, and + +second, such approaches generalize poorly across datasets as the input features can change significantly. This is particularly true of the commonly-used SHOT descriptors [48], which are sensitive to the triangle mesh structure and, as we show below, can vary drastically across different datasets. + +A number of other techniques have also been proposed for shape correspondence learning without using the functional map representation. These include approaches that exploit novel convolutional layers on triangle meshes [27, 8, 30, 36] and more general methods that use learning from depth-maps [53] or in some feature space [46, 10] among many others. Remarkably, relatively few methods aim to learn directly from the raw 3D shape geometry for shape correspondence, with the notable exceptions of [16, 12]. In large part this is due to the complexity of the correspondence problem, where unlike, e.g., shape segmentation, the number of labels can be unbounded. As a result, existing techniques address this either by learning from precomputed features, or relying on template-based matching and large training sets [16, 12], that might even require manual curation. Although PointNet [37] and its variants [38, 4, 47] achieve impressive results from raw point clouds for classification tasks, they are not yet competitive for shape correspondence task. + +# Contribution + +In this paper we show that feature learning for shape matching can be done directly from the raw 3D geometry even in the presence of relatively little training data, and without relying on a template or an a priori parametric (e.g., human body) model. Our main contribution is a end-to-end learnable pipeline that computes features from the 3D shapes and uses them for accurate dense point-to-point correspondence. We achieve this by introducing a novel map extraction layer using the functional map representation in a reduced basis, which provides a very strong regularization. Finally, we demonstrate that recent refinement techniques adapted to small functional maps [29], combined with our efficient learning pipeline jointly result in accurate dense maps at the fraction of the cost of existing methods. + +# 3. Shape Matching and Functional Maps + +One of the building blocks in our pipeline work is based on the functional map framework and representation. For completeness, we briefly review the basic notions for estimating functional maps, and refer the interested reader to a recent course [33] for a more in-depth discussion. + +Basic Pipeline Given a pair of 3D shapes, $\mathcal{M},\mathcal{N}$ represented in a discrete setting as triangle meshes, and containing respectively $m$ and $n$ vertices, this pipeline aims at computing a map between them. + +It consists in four main steps. First, the first few eigen- + +functions of the discrete Laplace-Beltrami operator are computed on each shape, namely $k_{\mathcal{M}}$ and $k_{\mathcal{N}}$ functions respectively. + +Second, a set of descriptor functions on each shape that are expected to be approximately preserved by the unknown map. For instance, a descriptor function can correspond to a particular dimension of the Heat or Wave Kernel Signatures [45, 5] computed at each point. Their coefficients are stored in the respective basis as columns in matrices A, B. + +Third, the optimal functional map $\mathbf{C}$ is then computed by solving the following optimization problem: + +$$ +\mathbf {C} _ {\text {o p t}} = \underset {\mathbf {C}} {\arg \min } E _ {\text {d e s c}} (\mathbf {C}) + \alpha E _ {\text {r e g}} (\mathbf {C}), \tag {1} +$$ + +where the first term aims at preserving the descriptors: $E_{\mathrm{desc}}(\mathbf{C}) = \left\| \mathbf{CA} - \mathbf{B}\right\| ^2$ , whereas the second term regularizes the map by promoting the correctness of its overall structural properties. It is common to use Frobenius norm to compute the distance between these matrices. This Eq. (1) leads to a simple least-squares problem with $k_{\mathcal{M}} \times k_{\mathcal{N}}$ unknowns, independent of the number of points on the shapes. + +As a last step, the estimated functional map $\mathbf{C}$ , which maps across the spectral domains and converted to a point-to-point map. As a post processing step, called refinement, a number of advanced techniques are available [42, 15, 40, 29]. Most of them iteratively take the map from spectral to spatial domain, until it reaches a local optimum. + +# 3.1. Deep Functional Maps + +Despite its simplicity and efficiency, being a sequential framework, the functional map estimation pipeline described above is fundamentally error prone, due to the initial choice of descriptor functions. To alleviate this dependence, several approaches have been proposed to learn an optimal transformation of initial descriptors from data [11, 25, 43]. These works aim at transforming a given set of descriptors so that the optimal computed map satisfies some desired criteria during training. This transformation can be learned with a supervised loss, as in [11, 25], as well as with an unsupervised loss as in the more recent works of [19, 43]. + +More specifically, the FMNet approach proposed in [25] assumes to have as input, a set of shape pairs for which ground truth point-wise maps are known, and aims to solve the following problem: + +$$ +\min _ {T} \sum_ {\left(S _ {1}, S _ {2}\right) \in \text {T r a i n}} l _ {F} \left(\operatorname {S o f t} \left(\mathbf {C} _ {\text {o p t}}\right), G T _ {\left(S _ {1}, S _ {2}\right)}\right), \text {w h e r e} \tag {2} +$$ + +$$ +\mathbf {C} _ {\text {o p t}} = \underset {\mathbf {C}} {\arg \min } \| \mathbf {C} \mathbf {A} _ {T \left(D _ {1}\right)} - \mathbf {A} _ {T \left(D _ {2}\right)} \|. \tag {3} +$$ + +Here, adopting the notation from [43] $T$ is a non-linear transformation, in the form of a neural network, to be applied to some input descriptor functions $D$ , Train is the set of training pairs for which ground truth correspondence + +$GT_{(S_1,S_2)}$ is known, $l_{F}$ is the soft error loss, which penalizes the deviation of the computed functional map $\mathbf{C}_{\mathrm{opt}}$ , after converting it to a soft map $Soft(\mathbf{C}_{\mathrm{opt}})$ from the ground truth correspondence, and $\mathbf{A}_{T(D_1)}$ denotes the transformed descriptors $D_{1}$ written in the basis of shape 1. Thus, the FMNet framework [25] learns a transformation $T$ of descriptors $T(D_{1})$ , $T(D_{2})$ based on a supervised loss that minimizes the discrepancy between the resulting soft map and the known ground truth correspondence. + +A related recent approach, SURFMNet [43] follows a similar strategy but replaces $l_{F}$ with an unsupervised loss that enforces the desired structural properties on the resulting map, such as its bijectivity, orthonormality and commutativity with the Laplacian. + +3D-CODED In contrast to the methods described above that primarily operate in the spectral domain, there are also some approaches that never leave the spatial domain. With the recent works on point clouds neural networks, pioneered by PointNet [37], and significantly extended by [4, 47], to name a few, it is now possible to learn 3D features directly from point clouds. 3D-CODED [16, 12] is based on this approach, as it is a method built on a variational auto-encoder with a PointNet architecture for the encoder. Their method relies on a template that is supposed to be deformable in a non-rigid but isometric way to any of the shape of the datasets. It is a supervised method, and requires the knowledge of all ground-truth correspondences between any shape of the dataset and the deformable template. 3D-CODED is trained on 230K shapes, introduced in SURREAL [50], and generated with SMPL [26]. + +Motivation The two main classes of existing approaches have their associated benefits and drawbacks. On the one hand, spectral methods are able to use small matrices instead of all the points of the shape, and operate on intrinsic properties of the 3D surfaces, making them resilient to a change in pose, and allowing them to train on really small datasets. However, due to their use of input descriptors (typically SHOT [48]), they tend to overfit to the connectivity of the training set, which can lead to catastrophic results even in apparently simple cases. On the other hand, 3D-CODED shows extreme efficiency when trained on enough data, regardless of the connectivity, but with a small dataset, it is prone to overfitting and fails to generalize the training poses to predict the different poses of the test set. + +Our method is a mix of the two approaches, and, as we show below, can obtain accurate results with little training data leading to state-of-the-art accuracy on a challenging recent benchmark of human shapes in different poses and with different connectivity [28]. + +# 4. Method + +# 4.1. Overview + +In this paper, we introduce a novel approach to learning descriptors on shapes in order to get correspondences through the functional map framework. Our method is composed of two main parts, labeled as $Feat$ and $FMReg$ in Figure 2. The first aims at optimizing point cloud convolutional filters [4, 47] to extract features from the raw geometry of the shapes. These filters are learned using a Siamese network on the source and a target shapes by using shared learnable parameters $\Theta$ , in a similar way as in [25]. However, unlike that approach and follow-up works [19, 43] we learn the features directly from the geometry of the shapes rather than computing a transformation of some pre-defined existing descriptors. These learned descriptors are projected in the spectral bases of the shapes and fed to the second block of the method, which uses them in a novel regularized functional map estimation layer. Finally, we use a spectral loss, based on the difference between the computed and the ground truth functional maps. This makes our approach very efficient as it operates purely in the spectral domain, avoiding expensive geodesic distance matrix computations as in [25, 19] and moreover allows us to handle functional or soft ground truth input maps without requiring the training shapes to have the same number of points or fixed mesh connectivity. + +We stress again that the two components: learning features directly from the shapes and using the functional map representation both play a crucial role in our setup. The former allows us to learn robust and informative features independently from the mesh structure, while the latter allows us to strongly regularize correspondence learning, resulting in a method that generalizes even in the presence of a relatively small training set. + +# 4.2. Architecture + +The novelty of our architecture lies in its hybrid character. The first part, which we will refer to as the feature extractor in the following, aims at computing point-wise features on the input shapes. It corresponds to the Feat block in Figure 2, and takes as input only the point clouds making it robust towards changes in connectivity. + +The purpose of the second part is to recover robust functional maps using these learned features. This block is built according to the pipeline of [32], first taking the features to the spectral domain over the two shapes (which corresponds to the dot products blocks after the Feat blocks in Figure 2), and then computing the map by minimizing an energy. However, since our method is based on a neural network, this operation should be differentiable with respect to the features over the shapes for the back-propagation algorithm to work. We extend the previously proposed functional map + +![](images/815b3f4fd6f8bcb60f940605b9e6e4d1c0c792ded126535c3d367e9e2f2b423b.jpg) +Figure 2. Overview of our approach: given a pair of shapes, we optimize for a point cloud convolutional model to get point-wise features for each shape, that we convert to a functional map using our FMReg block. The loss that we put forward penalizes maps according to their distance to the ground-truth map between the two shapes. + +layers [25] to also incorporate a differentiable regularizer, which results in the very robust map extraction, represented as FMReg in Figure 2. + +# 4.3. The feature extractor + +The goal of this block is to learn functional characterizations of point clouds that will later be used to compute spectral descriptors and then functional maps. To this end, this network must be applied with the same weights to the source and target shapes, as represented in Figure 2, and must result in informative descriptors, extracted from the point clouds of the two shapes. + +For this part, we chose the state of the art point cloud learning method KPConv [47], by extending the segmentation network proposed in that work. Our feature extractor is thus a Siamese version of the segmentation network described in KPConv, which we review for completeness in the supplementary materials. + +# 4.4. The regularized FMap layer + +This block provides a novel fully differentiable way to compute a robust functional map from potentially low dimensional spectral descriptors. + +The main goal is, as in Section 3, to recover the ground-truth bijection between $\mathcal{M}$ and $\mathcal{N}$ , on which we have the computed raw-data features $\mathbf{F}$ and $\mathbf{G}$ . + +For this we first express the computed feature functions in the respective spectral basis, which we denote by $\Phi^{\mathcal{M}}$ and $\Phi^{\mathcal{N}}$ . This leads to the spectral descriptors $\mathbf{A} = (\Phi^{\mathcal{M}})^{\dagger}\mathbf{F}$ and $\mathbf{B} = (\Phi^{\mathcal{M}})^{\dagger}\mathbf{G}$ , with $\Phi^{\dagger}$ the Moore pseudo-inverse of $\Phi$ . We stress again that this step is where we shift focus from the spatial to the spectral domain, and corresponds to the dot product blocks in Figure 2. + +In the pipeline first introduced in [32] and then widely used in the follow-up works [34], the standard strategy is to compute the functional map $\mathbf{C}$ that optimizes the following energy: + +$$ +\min _ {\mathbf {C}} \left\| \mathbf {C} \mathbf {A} - \mathbf {B} \right\| ^ {2} + \lambda \left\| \mathbf {C} \Delta_ {\mathcal {M}} - \Delta_ {\mathcal {N}} \mathbf {C} \right\| ^ {2}, \tag {4} +$$ + +where $\lambda$ is a scalar regularization parameter. + +Remark that the optimization problem in Eq. (4.4) is quadratic in terms of $\mathbf{C}$ and can be solved e.g. via standard convex optimization techniques. However, in the learning context, we need to differentiate the solution with respect to the spectral features $\mathbf{A},\mathbf{B}$ , which is challenging when $\mathbf{C}$ is computed via an iterative solver. Alternatively, the problem in Eq. can be written directly in terms of a large least squares system, by vectorizing the matrix $\mathbf{C}$ as was suggested in [32]. However, for a $k\times k$ functional map, this leads to a system of size $k^2\times k^2$ which becomes prohibitive even for moderate values of $k$ . To avoid these issues, previous learning-based approaches based on functional maps [25, 19, 43] have only optimized for $\mathbf{C}$ using the first part of the energy in Eq. (4.4): $\left\| \mathbf{CA} - \mathbf{B}\right\| ^2$ . This results in a simple linear system for which the derivatives can be computed in closed form. This has two major limitations, however: first the linear system is only invertible if there are at least $k$ linearly independent feature functions. This condition can easily be violated in practice, especially in the early stages of learning, potentially resulting in a fatal error. Furthermore, the lack of regularization makes the solved-for functional map very sensitive to inconsistencies in the computed descriptors, which leads to an overall loss of robustness. + +In our work we address this problem by using the full energy in Eq. (4.4) in a fully differentiable way. In particular, we use the fact that the operators $\Delta_{\mathcal{M}}$ and $\Delta_{\mathcal{N}}$ are diagonal when expressed in their own eigen-basis. + +Indeed we remark that the gradient of the energy in Eq. (4.4) vanishes whenever $\mathbf{C}\mathbf{A}\mathbf{A}^T +\lambda \pmb {\Delta}\cdot \mathbf{C} = \mathbf{B}\mathbf{A}^T$ , where the operation $\cdot$ represents the element-wise multiplication, and $\pmb{\Delta}_{ij} = (\mu_j^{\mathcal{M}} - \mu_i^{\mathcal{N}})^2$ , where $\mu_l^{\mathcal{M}}$ and $\mu_l^{\mathcal{N}}$ respectively correspond to the eigenvalues of $\Delta_{\mathcal{M}}$ and $\Delta_{\mathcal{N}}$ . It is then easy to see that this amounts to a separate linear system for every row $c_{i}$ of $\mathbf{C}$ .. + +$$ +\left(\mathbf {A} \mathbf {A} ^ {T} + \lambda \operatorname {d i a g} \left(\left(\mu_ {j} ^ {1} - \mu_ {i} ^ {2}\right) ^ {2}\right)\right) c _ {i} = \mathbf {A} b _ {i} \tag {5} +$$ + +where $b_{i}$ stands for $i^{th}$ row of $B$ . + +In total, if $k$ is the number of eigenvectors used for representing the functional map, this operation amounts to inverting $k$ different $k \times k$ matrices. Since inverting a linear system is a differentiable operation, which is already implemented e.g. in TensorFlow, this allows us to estimate the functional map in a robust way, while preserving differentiability. + +# 4.5. The supervised spectral loss + +Our method also uses a loss with respect to the ground truth functional map in the spectral domain. This is similar to the energy used in [11], but is different from the loss of + +the original FMNet work [25], which converted a functional map to a soft correspondence matrix and imposed a loss with respect to the ground truth point-wise map, relying on expensive geodesic distance matrix computation. + +Specifically, calling $\mathbf{C}$ the functional map obtained by the FMap block, and $\mathbf{C}^{gt}$ the ground truth spectral map, our loss is defined as: + +$$ +l _ {\mathrm {s p e c}} = \left\| \mathbf {C} - \mathbf {C} ^ {g t} \right\| ^ {2} +$$ + +As mentioned above, we use a Frobenius norm to compute the distance between matrices. + +It is important to note that whenever a pointwise ground truth map is given it is trivial to convert it to the functional map representation. Conversely, the ground truth spectral map is more general than the point-wise ground truth correspondence. Indeed, with just a few precise landmarks one can recover a functional map accurate enough to make this loss efficient, for instance through the original pipeline of [32], but also with more recent follow-up works, such as [40] or [29], which we will further describe as baselines to our method in Section 5. + +This is useful, e.g., in the case of re-meshed datasets. Indeed, complete ground truth correspondences between two shapes of these datasets are not fully known. One can only have access to the (often partial and not bijective) ground truth pointwise map from a template mesh $\mathcal{T}$ to each remeshed shape $S_{i}$ . Ecah such map can be converted to a functional map $\mathbf{C}_i$ and a very good approximation of the spectral ground truth $C_{i\rightarrow j}^{gt}$ between $S_{i}$ and $S_{j}$ can be expressed as $\mathbf{C}_j^\dagger \mathbf{C}_i$ . + +# 4.6. Postprocessing + +Once our model is trained, we can then test it on a pair of shapes and get a functional map between these shapes. This map can either directly be converted to a point to point map, or refined further. We use a very recent and efficient refining algorithm, called ZoomOut [29] based on navigating between spatial and spectral domains while progressively increasing the number of spectral basis functions. This efficient postprocessing technique allows us to get state-of-the-art results, as described in Section 5. + +# 4.7. Implementation + +We implemented our method in TensorFlow [1] by adapting the open-source implementation of SURFMNet [43] and KPCov [47]. + +Our feature extraction network is based on a residual convolutional architecture of [47], consisting of 4 convolutional blocks with leaky linear units, with successive poolings and dimension augmentation from 128 to 2048, followed by a 4 up-sampling blocks with shortcuts from corresponding pooling layers, and dimension reduction from + +2048 back to 128. Please see the Supplementary materials, part A, in [47] for more details. Following the pipeline of KPCov, we start with a sub-sampled version of our point clouds with a grid subsampling of step 0.03. The pooling layers are therefore obtained with grid samplings of parameters 0.06, 0.12, 0.24 and 0.48. + +Similarly to FMNet [25] and SURFMNet [43], our network is applied in a Siamese way on the two shapes, using the same learned weights for the feature extractor. + +In the case of fully automatic spectral methods such as BCICP [40] and ZoomOut [29], or the deep learning based FMNet [25, 19] (supervised or unsupervised) and SURFM-net [43], all results are invariant by any rigid transformation of the input shapes. However, in the case of methods using the 3D coordinates of the points to generate information about the input shape, this does not remain true. Consequently, both 3D-CODED [16] and our method avoid this dependency through data augmentation to be as close as possible to the generality of fully spectral methods. To that end, assuming the shapes are all aligned on one axis (e.g. on human the natural up axis), both 3D-CODED and our method perform data augmentation by randomly rotating the input shapes along that axis. Our implementation is publicly available at https://github.com/LIX-shape-analysis/GeomFmaps. + +# 4.8. Parameters + +In addition to the architecture above, our method has two key hyper-parameters: the size of the functional basis and the regularizer $\lambda$ in Equation 5. For the size of the basis, we discovered if this number is too high, for instance, with 120 eigenvectors as in FMNet and SURFMNet, it can easily lead to overfitting. However, by reducing this number to 30, the results of SURFMNet on FAUST re-meshed (here reported in Table 1) go from 0.15 to 4.5. As a consequence, we choose the number of eigenvectors to be 30 in all of our experiments on our method. Regarding the weight $\lambda$ in Equation (5), we observed that setting it to $\lambda = 10^{-3}$ helps getting good results while drastically reducing the number of training steps, as pointed out in the ablation study. We use this value throughout all experiments. + +We train our network with a batch size of 4 shape pairs for a number of epochs depending on the number of shapes in the dataset. We use a learning rate of .001 and gradually decreasing it to 0.0001 with ADAM optimizer [13]. + +# 5. Results + +# Datasets + +We test our method on a wide spectrum of human datasets: first, the re-meshed versions of FAUST dataset [7] containing 100 human shapes in 1-1 correspondence, and of SCAPE [3], made publicly available by Ren et al. [40]. + +
Method\DatasetFSF on SS on F
BCICP15.16.**
ZoomOut6.17.5**
SURFMNet15.12.32.32.
SURFMNet+icp7.46.119.23.
Unsup FMNet10.16.29.22.
Unsup FMNet+pmf5.710.12.9.3
FMNet11.17.30.33.
FMNet+pmf5.96.311.14.
3D-CODED2.531.31.33.
Ours3.14.411.6.0
Ours+zo1.93.09.24.3
+ +Table 1. Comparative results $(\times 100)$ of the different methods on Experiment 1. + +These re-meshed datasets offer significantly more variability in terms of shape structures and connectivity, including for instance point sampling density, making them harder to match for existing algorithms. We also highlight that the SCAPE dataset is slightly more challenging since the shapes are less regular, and two shapes never share the same pose. This is not true for FAUST, wherein all the poses present in the test set also exist in the training set, with the variation coming from body type only, making the pose recovery easier at test time. + +We also use the re-meshed version of the more recent SHREC'19 dataset [28], which, in theory, is the most challenging of the test sets, because of stronger distortions in the poses, the presence of an incomplete shape, and the number of test pairs (430 in total, so two times the number of test pairs of FAUST or SCAPE). At last, we also use the generic training dataset of 3D-CODED [16], originally consisting in 230K synthetic shapes generated using Surreal [50], with the parametric model SMPL introduced in [26]. We use it only for training purposes in our second experiment, to show that our method can generalize well to changes in connectivity, being able to train on a synthetic, very smooth, identical triangulation for the whole training set, and still produce results of excellent quality on re-meshed datasets. + +# Ablation study + +Our method is built with a number of building blocks, all of which we consider essential to achieve optimal performance. To illustrate this, in the supplementary materials we provide an extensive ablation study of all the key components of our algorithm. + +# Baselines + +We compare our method to several state of the art methods: the first category includes fully automatic methods without any learning component [40, 29]. These methods are simply evaluated on the test sets without any training. The second category includes FMNet [25] and its unsu + +![](images/c4200d72b15d464d89c3304f04d5d234b4e09e01ccbc48c8cf75840662015c27.jpg) +Figure 3. Comparison with 3D-CODED while varying training size of SURREAL dataset and simultaneously testing on other datasets. + +![](images/eb08dd64b6bcce68d766814b58e45e0cffbdd892d4b0b01aa26cc1ca60fa1e12.jpg) + +![](images/9f7078c892b2030ab9c74b1857ad80a748ce26a34a1640c5ecbfd20030de208a.jpg) + +pervised versions, referred to as Unsup FMNet [19] and SURFMNet [43], with and without post-processing (PMF [52] for FMNet, and standard functional map refinement [32], referred to as ICP, for SURFMNet). All these variants of FMNet give similar results, but SURFMNet is the only one to train within a few hours, without requiring too much space. This is due to the fact SURFMNet only operates in the spectral domain, in contrast to other methods. Lastly, we compare to the supervised 3D-CODED [16], described earlier in more details in Section 3. For conciseness, we refer to our method as Ours in the following text. We show our results with and without ZoomOut [29] refinement, referred to as ZO, in order to prove that our method stands out even without post processing. We compare these different methods in two main settings named Experiment 1 and Experiment 2 below. + +Experiment 1 consists of evaluating the different methods in the following setting: we split FAUST re-meshed and SCAPE re-meshed into training and test sets containing 80 and 20 shapes for FAUST, and 51 and 20 shapes for SCAPE. We obtain results for training and testing on the same dataset, but also by testing on a different dataset. For instance, by training on SCAPE re-meshed train set and testing on FAUST re-meshed test set. This experiment aims at testing the generalization power of all methods to small re-meshed datasets, as well as its ability to adapt to a different dataset at test time. + +Experiment 2 consists of sampling 100, 500, 2000, and 5000 shapes from the SURREAL dataset to be used for training. We then test the trained models on the test sets of FAUST re-meshed, SCAPE re-meshed, and SHREC19 remeshed. This experiment aims at testing the robustness and generalization power of the different methods in the presence of varying amounts of training data, as well as adaptability to train on a perfect synthetic triangulations and still get results on challenging re-meshed shapes. + +# Quantitative results + +To evaluate the results, we use the protocol introduced in [22], where the per-point-average geodesic distance between the ground truth map and the computed map is reported. All results are multiplied by 100 for the sake of readability. + +As we can see in Table 1, our method performs the best overall on Experiment 1. Fully automatic methods do not provide competitive results compared to the learning methods (except on crossed settings because they did not train on anything and are thus not influenced by the training shapes). As reported in the Section 3.1, this highlights that handcrafted features can easily fail. It is noticeable that spectral methods (FMNet variations, and Ours as a hybrid method) get reasonable, or even good results in our case, with these small datasets. In comparison, 3D-CODED seems to fail in almost all cases. It is remarkable that it can learn on such a small dataset as the training set of FAUST re-meshed. One explanation for that is that FAUST contains the same set of poses in the test set as in the train set. + +Contrary to other baselines, our method gives good results on all settings, even without refinement, showing good resilience to a really low number of shapes, even with remeshed geometry. We would like to stress that no other method is able to achieve such a generalization with this low number of shapes. + +For a fair comparison with 3D-CODED, we complete our study with a second experiment, in which the training set is now made of the same shapes 3D-CODED uses for training in their paper, namely SURREAL dataset. The aim of this experiment is to further showcase the generalization power of our method when compared to 3D-CODED. First, by training on a very smooth synthetic dataset, on which previous fully spectral methods tend to easily overfit due to the obvious mismatch in triangulation in training and test set. Our second goal is to observe the dependence of different methods on size of the training set. + +We report the results (multiplied by 100) of 3D-CODED and Our method in Figure 3, as they are the only two competitive algorithms in Experiment 2. These results once + +![](images/a062bbb55ec73fb2792d5e0126e1b7fc334e130779d506c08aad6a8c5b6458a3.jpg) +Figure 4. Qualitative results obtained with texture transfers for the different methods on Experiment 2, training on two different numbers of shapes in the SURREAL dataset, and testing on SHREC re-meshed shapes. + +again demonstrate that our method can achieve impressive results even with a low number of training shapes. On SHREC re-meshed, we achieve state of the art results with an average error of 0.048 with only 500 training shapes. We provide additional quantitative comparisons in the supplementary materials. + +It can be observed in Figure 3 that our results are consistent and unaltered even with the drop in number of training shapes. 3D-CODED, on the other hand, always suffers from a reduced training set. + +# Qualitative results + +In Figure 4 we show the results of our method (with and without ZoomOut refinement [29]), 3D-CODED [16], FM-Net [25] (with and without PMF refinement [51]), trained on respectively 2000 and 100 shapes, as presented in Experiment 2, via texture transfer. + +With 2000 training shapes, both our method and 3D-CODED lead to good or even excellent texture transfers, while fully spectral methods fail due to the change of connectivity from training to test set. However, with only 100 training shapes, 3D-CODED fails to get a good reconstruction in many cases, leading to bad texture transfer as in Figure 4. This highlights the fact that our method performs better than any other existing method when only a few training + +shapes are provided. + +# 6. Conclusion, Limitations & Future Work + +We presented a method for improving the robustness and reducing overfitting in learning shape correspondences. Key to our approach is a hybrid network structure, made of a raw-data feature extractor that learns descriptors on a pair of shapes, and a novel robust functional map layer. Our network can thus operate in both the spectral and the spatial domain, thus taking advantages of both representations. + +Our approach has several limitations: first, as a supervised method it requires at least partial correspondences (as discussed in Section 4.5) between the training shapes. Also, it requires data augmentation to be able to predict non-aligned shapes, which can be costly and unstable. + +In the future, we plan to work towards an unsupervised spectral loss, similar in spirit to SURFMNet [43], while avoiding the symmetry ambiguity problem. We also plan to try other, invariant feature extractors such as [18], or [35] to avoid data augmentation. + +Acknowledgements This work was supported by KAUST OSR Award No. CRG-2017-3426, a gift from Nvidia and the ERC Starting Grant No. 758800 (EXPROTEA). + +# References + +[1] Martín Abadi, Ashish Agarwal, and Paul Barham et al. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. Software available from tensorflow.org. 5 +[2] Yonathan Aflalo, Anastasia Dubrovina, and Ron Kimmel. Spectral generalized multi-dimensional scaling. International Journal of Computer Vision, 118(3):380-392, 2016. 2 +[3] Dragomir Anguelov, Praveen Srinivasan, Daphne Koller, Sebastian Thrun, Jim Rodgers, and James Davis. SCAPE: Shape Completion and Animation of People. In ACM Transactions on Graphics (TOG), volume 24, pages 408-416. ACM, 2005. 6 +[4] Matan Atzmon, Haggai Maron, and Yaron Lipman. Point convolutional neural networks by extension operators. ACM Transactions on Graphics, 37, 03 2018. 2, 3, 4 +[5] Mathieu Aubry, Ulrich Schlickewei, and Daniel Cremers. The Wave Kernel Signature: A Quantum Mechanical Approach to Shape Analysis. In Proc. ICCV Workshops, pages 1626-1633. IEEE, 2011. 2, 3 +[6] Silvia Biasotti, Andrea Cerri, A Bronstein, and M Bronstein. Recent trends, applications, and perspectives in 3d shape similarity assessment. In Computer Graphics Forum, volume 35, pages 87-119, 2016. 2 +[7] Federica Bogo, Javier Romero, Matthew Loper, and Michael J. Black. FAUST: Dataset and evaluation for 3D mesh registration. In Proceedings IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), Piscataway, NJ, USA, June 2014. IEEE. 1, 6 +[8] Davide Boscaini, Jonathan Masci, Emanuele Rodola, and Michael M. Bronstein. Learning shape correspondence with anisotropic convolutional neural networks. In Proc. NIPS, pages 3189-3197, 2016. 2 +[9] Oliver Burghard, Alexander Dieckmann, and Reinhard Klein. Embedding shapes with Green's functions for global shape matching. Computers & Graphics, 68:1-10, 2017. 2 +[10] Mingjia Chen, Changbo Wang, and Hong Qin. Jointly learning shape descriptors and their correspondence via deep triplet cnns. Computer Aided Geometric Design, 62:192-205, 2018. 2 +[11] Etienne Corman, Maks Ovsjanikov, and Antonin Chambolle. Supervised descriptor learning for non-rigid shape matching. In Proc. ECCV Workshops (NORDIA), 2014. 1, 2, 3, 5 +[12] Theo Deprelle, Thibault Groueix, Matthew Fisher, Vladimir G Kim, Bryan C Russell, and Mathieu Aubry. Learning elementary structures for 3d shape generation and matching. arXiv preprint arXiv:1908.04725, 2019. 2, 3 +[13] J. Ba D.P. Kingma. Adam: A method for stochastic optimization. In ICLR, 2015. 6 +[14] Davide Eynard, Emanuele Rodola, Klaus Glashoff, and Michael M Bronstein. Coupled functional maps. In 3D Vision (3DV), pages 399-407. IEEE, 2016. 2 +[15] Danielle Ezuz and Mirela Ben-Chen. Deblurring and denoising of maps between shapes. In Computer Graphics Forum, volume 36, pages 165-174. Wiley Online Library, 2017. 2, 3 + +[16] Thibault Groueix, Matthew Fisher, Vladimir G Kim, Bryan C Russell, and Mathieu Aubry. 3d-coded: 3d correspondences by deep deformation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 230-246, 2018. 1, 2, 3, 6, 7, 8 +[17] Thibault Groueix, Matthew Fisher, Vladimir G Kim, Bryan C Russell, and Mathieu Aubry. Unsupervised cycle-consistent deformation for shape matching. In Computer Graphics Forum, volume 38, pages 123-133. Wiley Online Library, 2019. 1 +[18] Paul Guerrero, Yanir Kleiman, Maks Ovsjanikov, and Niloy J. Mitra. PCPNet: Learning local shape properties from raw point clouds. Computer Graphics Forum, 37(2):75-85, 2018. 8 +[19] Oshri Halimi, Or Litany, Emanuele Rodol'a, Alex Bronstein, and Ron Kimmel. Unsupervised learning of dense shape correspondence. In CVPR, 2019. 1, 2, 3, 4, 5, 6, 7 +[20] Qixing Huang, Fan Wang, and Leonidas Guibas. Functional map networks for analyzing and exploring large shape collections. ACM Transactions on Graphics (TOG), 33(4):36, 2014. 2 +[21] Ruqi Huang and Maks Ovsjanikov. Adjoint map representation for shape analysis and matching. In Computer Graphics Forum, volume 36, pages 151-163. Wiley Online Library, 2017. 2 +[22] Vladimir G Kim, Yaron Lipman, and Thomas Funkhouser. Blended intrinsic maps. In ACM Transactions on Graphics (TOG), volume 30, page 79. ACM, 2011. 7 +[23] Artiom Kovnatsky, Michael M Bronstein, Xavier Bresson, and Pierre Vandergheynst. Functional correspondence by matrix completion. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 905–914, 2015. 2 +[24] Artiom Kovnatsky, Michael M Bronstein, Alexander M Bronstein, Klaus Glashoff, and Ron Kimmel. Coupled quasiharmonic bases. In Computer Graphics Forum, volume 32, pages 439-448, 2013. 2 +[25] Or Litany, Tal Remez, Emanuele Rodolà, Alexander M. Bronstein, and Michael M. Bronstein. Deep functional maps: Structured prediction for dense shape correspondence. 2017 IEEE International Conference on Computer Vision (ICCV), pages 5660-5668, 2017. 1, 2, 3, 4, 5, 6, 8 +[26] Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J. Black. Smpl: A skinned multiperson linear model. ACM Trans. Graph., 34(6):248:1-248:16, Oct. 2015. 3, 6 +[27] Jonathan Masci, Davide Boscaini, Michael Bronstein, and Pierre Vandergheynst. Geodesic convolutional neural networks on riemannian manifolds. In Proceedings of the IEEE international conference on computer vision workshops, pages 37-45, 2015. 2 +[28] S. Melzi, R. Marin, E. Rodolà, U. Castellani, J. Ren, A. Poulenard, P. Wonka, and M. Ovsjanikov. Matching Humans with Different Connectivity. In Silvia Biasotti, Guillaume Lavoué, and Remco Veltkamp, editors, Eurographics Workshop on 3D Object Retrieval. The Eurographics Association, 2019. 3, 6 + +[29] Simone Melzi, Jing Ren, Emanuele Rodola, Maks Ovsjanikov, and Peter Wonka. Zoomout: Spectral upsampling for efficient shape correspondence. ACM Transactions on Graphics (Proc. SIGGRAPH Asia), 2019. 2, 3, 5, 6, 7, 8 +[30] Federico Monti, Davide Boscaini, Jonathan Masci, Emanuele Rodola, Jan Svoboda, and Michael M. Bronstein. Geometric deep learning on graphs and manifolds using mixture model cnns. In CVPR, pages 5425-5434. IEEE Computer Society, 2017. 2 +[31] Dorian Nogneng and Maks Ovsjanikov. Informative descriptor preservation via commutativity for shape matching. Computer Graphics Forum, 36(2):259-267, 2017. 2 +[32] Maks Ovsjanikov, Mirela Ben-Chen, Justin Solomon, Adrian Butscher, and Leonidas Guibas. Functional Maps: A Flexible Representation of Maps Between Shapes. ACM Transactions on Graphics (TOG), 31(4):30, 2012. 2, 4, 5, 7 +[33] Maks Ovsjanikov, Etienne Corman, Michael Bronstein, Emanuele Rodola, Mirela Ben-Chen, Leonidas Guibas, Frederic Chazal, and Alex Bronstein. Computing and processing correspondences with functional maps. In ACM SIGGRAPH 2017 Courses, SIGGRAPH '17, pages 5:1-5:62, 2017. 2 +[34] Maks Ovsjanikov, Etienne Corman, Michael Bronstein, Emanuele Rodola, Mirela Ben-Chen, Leonidas Guibas, Frederic Chazal, and Alex Bronstein. Computing and processing correspondences with functional maps. In ACM SIGGRAPH 2017 Courses, pages 5:1-5:62, 2017. 4 +[35] Adrien Poulenard, Marie-Julie Rakotosaona, Yann Ponty, and Maks Ovsjanikov. Effective rotation-invariant point cnn with spherical harmonics kernels. arXiv preprint arXiv:1906.11555, 2019. 8 +[36] Adrien Poulenard, Primoz Skraba, and Maks Ovsjanikov. Topological function optimization for continuous shape matching. In Computer Graphics Forum, volume 37, pages 13-25. Wiley Online Library, 2018. 2 +[37] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In Proc. CVPR, pages 652-660, 2017. 2, 3 +[38] Charles R. Qi, Li Yi, Hao Su, and Leonidas J. Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In Proceedings of the 31st International Conference on Neural Information Processing Systems, NIPS'17, pages 5105-5114, USA, 2017. Curran Associates Inc. 2 +[39] Jing Ren, Mikhail Panine, Peter Wonka, and Maks Ovsjanikov. Structured regularization of functional map computations. In Computer Graphics Forum, volume 38, pages 39-53. Wiley Online Library, 2019. 2 +[40] Jing Ren, Adrien Poulenard, Peter Wonka, and Maks Ovsjanikov. Continuous and orientation-preserving correspondences via functional maps. ACM Transactions on Graphics (TOG), 37(6), 2018. 2, 3, 5, 6 +[41] Emanuele Rodolà, Luca Cosmo, Michael M Bronstein, Andrea Torsello, and Daniel Cremers. Partial functional correspondence. In Computer Graphics Forum, volume 36, pages 222–236. Wiley Online Library, 2017. 2 + +[42] Emanuele Rodolà, M Moeller, and Daniel Cremers. Pointwise map recovery and refinement from functional correspondence. In Proc. Vision, Modeling and Visualization (VMV), 2015. 2, 3 +[43] Jean-Michel Roufosse, Abhishek Sharma, and Maks Ovsjanikov. Unsupervised deep learning for structured shape matching. In Proceedings of the IEEE International Conference on Computer Vision, pages 1617-1627, 2019. 1, 2, 3, 4, 5, 6, 7, 8 +[44] Yusuf Sahillioglu. Recent advances in shape correspondence. The Visual Computer, pages 1-17, 2019. 2 +[45] Jian Sun, Maks Ovsjanikov, and Leonidas Guibas. A Concise and Provably Informative Multi-Scale Signature Based on Heat Diffusion. In Computer graphics forum, volume 28, pages 1383-1392, 2009. 2, 3 +[46] Zhiyu Sun, Yusen He, Andrey Gritsenko, Amaury Lendasse, and Stephen Baek. Deep spectral descriptors: Learning the point-wise correspondence metric via siamese deep neural networks. arXiv preprint arXiv:1710.06368, 2017. 2 +[47] Hugues Thomas, Charles R. Qi, Jean-Emmanuel Deschaud, Beatrix Marcotegui, François Goulette, and Leonidas J. Guibas. Kpconv: Flexible and deformable convolution for point clouds. Proceedings of the IEEE International Conference on Computer Vision, 2019. 2, 3, 4, 5, 6 +[48] Federico Tombari, Samuele Salti, and Luigi Di Stefano. Unique signatures of histograms for local surface description. In International Conference on Computer Vision (ICCV), pages 356-369, 2010. 2, 3 +[49] Oliver Van Kaick, Hao Zhang, Ghassan Hamarneh, and Daniel Cohen-Or. A survey on shape correspondence. In Computer Graphics Forum, volume 30, pages 1681–1707, 2011. 1, 2 +[50] Gül Varol, Javier Romero, Xavier Martin, Naureen Mahmood, Michael J. Black, Ivan Laptev, and Cordelia Schmid. Learning from synthetic humans. In CVPR, 2017. 3, 6 +[51] Matthias Vestner, Zorah Lähner, Amit Boyarski, Or Litany, Ron Slossberg, Tal Remez, Emanuele Rodola, Alex Bronstein, Michael Bronstein, Ron Kimmel, and Daniel Cremers. Efficient deformable shape correspondence via kernel matching. In Proc. 3DV, 2017. 8 +[52] M. Vestner, R. Litman, E. Rodola, A. Bronstein, and D. Cremers. Product manifold filter: Non-rigid shape correspondence via kernel density estimation in the product space. In Proc. CVPR, pages 6681-6690, 2017. 7 +[53] Lingyu Wei, Qixing Huang, Duygu Ceylan, Etienne Vouga, and Hao Li. Dense human body correspondences using convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1544-1553, 2016. 1, 2 \ No newline at end of file diff --git a/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/images.zip b/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..c46f8cec841913fa31d0a636146e2a6a4e1f114e --- /dev/null +++ b/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc5696180812f6635370d8405a9b7db1e646673f950b45cf85e890e202951547 +size 262615 diff --git a/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/layout.json b/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4e1905b4a22f052a5b819825a4fe00ed99d4f02e --- /dev/null +++ b/deepgeometricfunctionalmapsrobustfeaturelearningforshapecorrespondence/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5888f794b822c66ab97fb81a7370d4fdc227e2f956bb913730f6701daf90d85a +size 366908 diff --git a/deepglobalregistration/d3b95a93-c29b-4f1d-9035-fb500f13deae_content_list.json b/deepglobalregistration/d3b95a93-c29b-4f1d-9035-fb500f13deae_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..8ce00d3e273caf4700208bff713cfff65ac239a3 --- /dev/null +++ b/deepglobalregistration/d3b95a93-c29b-4f1d-9035-fb500f13deae_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e06d40d7d7a11452c9a76a9e830ec782022defb7530f2f5d0298ca38243efbfa +size 72487 diff --git a/deepglobalregistration/d3b95a93-c29b-4f1d-9035-fb500f13deae_model.json b/deepglobalregistration/d3b95a93-c29b-4f1d-9035-fb500f13deae_model.json new file mode 100644 index 0000000000000000000000000000000000000000..0aca05e3675222391e46a86b4870c7d255892ec8 --- /dev/null +++ b/deepglobalregistration/d3b95a93-c29b-4f1d-9035-fb500f13deae_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e297e2f2e6dd15ccb0b9c39f0798c7dd3d3d48ef82e4fdf21eeabd46b90e14ef +size 91151 diff --git a/deepglobalregistration/d3b95a93-c29b-4f1d-9035-fb500f13deae_origin.pdf b/deepglobalregistration/d3b95a93-c29b-4f1d-9035-fb500f13deae_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..15f7cae7ef2a032c31bf97ea6cd832dedb678eee --- /dev/null +++ b/deepglobalregistration/d3b95a93-c29b-4f1d-9035-fb500f13deae_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33ac8872a45ecccb34a2ba8550f7a0621eba6292d10acbc9cac24f2a7b15994f +size 7841451 diff --git a/deepglobalregistration/full.md b/deepglobalregistration/full.md new file mode 100644 index 0000000000000000000000000000000000000000..37c6f6e4b2e7da177dc5c1fd9d6420c55df8f90f --- /dev/null +++ b/deepglobalregistration/full.md @@ -0,0 +1,344 @@ +# Deep Global Registration + +Christopher Choy* +Stanford University + +Wei Dong* Carnegie Mellon University + +Vladlen Koltun +Intel Labs + +# Abstract + +We present Deep Global Registration, a differentiable framework for pairwise registration of real-world 3D scans. Deep global registration is based on three modules: a 6-dimensional convolutional network for correspondence confidence prediction, a differentiable Weighted Procrustes algorithm for closed-form pose estimation, and a robust gradient-based SE(3) optimizer for pose refinement. Experiments demonstrate that our approach outperforms state-of-the-art methods, both learning-based and classical, on real-world data. + +# 1. Introduction + +A variety of applications, including 3D reconstruction, tracking, pose estimation, and object detection, invoke 3D registration as part of their operation [34, 5, 32]. To maximize the accuracy and speed of 3D registration, researchers have developed geometric feature descriptors [21, 11, 40, 9], pose optimization algorithms [37, 44, 23, 49], and end-to-end feature learning and registration pipelines [40, 2]. + +In particular, recent end-to-end registration networks have proven to be effective in relation to classical pipelines. However, these end-to-end approaches have some drawbacks that limit their accuracy and applicability. For example, PointNetLK [2] uses globally pooled features to encode the entire geometry of a point cloud, which decreases spatial acuity and registration accuracy. Deep closest point [40] makes strong assumptions on the distribution of points and correspondences, which do not hold for partially overlapping 3D scans. + +In this work, we propose three modules for robust and accurate registration that resolve these drawbacks: a 6-dimensional convolutional network for correspondence confidence estimation, a differentiable Weighted Procrustes method for scalable registration, and a robust SE(3) optimizer for fine-tuning the final alignment. + +The first component is a 6-dimensional convolutional network that analyzes the geometry of 3D correspondences and estimates their accuracy. Our approach is inspired + +![](images/849c2da47e9ac490b511cff051fb46cd012c28d526e35a33709a9e332d32c7ff.jpg) + +![](images/95d329c588f9e4a04dbb3dc639300d07ec7d40292e51299562aa2b1f4587790d.jpg) + +![](images/0e58e8559319eb1858a2a1be8d0fbde70874578554fd7b62a17029921d9692ac.jpg) + +![](images/31834208e641c424ddf4d2fff72e1b4a082c4986dab2ae7131b86de1bf4fe280.jpg) +(a) RANSAC [34] + +![](images/679c412f51fe2c2bf9ffde2891d9533d512f119d9d233eef9150c920980374a0.jpg) +(b) FGR [49] + +![](images/7faf5986d18c9e9c6fac7869479fc950a66e471ae4b120f932484e3f75502f67.jpg) + +![](images/7b991477a1cfeefe6d076ddc3e62c08af5266c9eed8ef9f692b9e53e88fb9232.jpg) +(c) DCP [40] + +![](images/115cc5c03de8edf40a0b93a0cb406205c87664fb8452b239c7d1a378e703239f.jpg) +(d) Ours +Figure 1: Pairwise registration results on the 3DMatch dataset [46]. Our method successfully aligns a challenging 3D pair (left), while RANSAC [34], FGR [49], and DCP [40] fail. On an easier pair (right), our method achieves finer alignment. + +by a number of learning-based methods for estimating the validity of correspondences in 2D [45, 33] and 3D [30]. These methods stack coordinates of correspondence pairs, forming a vector $[\mathbf{x};\mathbf{y}]\in \mathbb{R}^{2\times D}$ for each correspondence + +$\mathbf{x}, \mathbf{y} \in \mathbb{R}^D$ . Prior methods treat these $2 \times D$ -dimensional vectors as a set, and apply global set processing models for analysis. Such models largely disregard local geometric structure. Yet the correspondences are embedded in a metric space $(\mathbb{R}^{2 \times D})$ that induces distances and neighborhood relationships. In particular, 3D correspondences form a geometric structure in 6-dimensional space [8] and we use a high-dimensional convolutional network to analyze the 6D structure formed by correspondences and estimate the likelihood that a given correspondence is correct (i.e., an inlier). + +The second component we develop is a differentiable Weighted Procrustes solver. The Procrustes method [14] provides a closed-form solution for rigid registration in SE(3). A differentiable version of the Procrustes method by Wang et al. [40] has been used for end-to-end registration. However, the differentiable Procrustes method passes gradients through coordinates, which requires $O(N^2)$ time and memory for $N$ keypoints, limiting the number of keypoints that can be processed by the network. We use the inlier probabilities predicted by our first module (the 6D convolutional network) to guide the Procrustes method, thus forming a differentiable Weighted Procrustes method. This method passes gradients through the weights associated with correspondences rather than correspondence coordinates. The computational complexity of the Weighted Procrustes method is linear in the number of correspondences, allowing the registration pipeline to use dense correspondence sets rather than sparse keypoints. This substantially increases registration accuracy. + +Our third component is a robust optimization module that fine-tunes the alignment produced by the Weighted Procrustes solver. This optimization module minimizes a differentiable loss via gradient descent on the continuous SE(3) representation space [51]. The optimization is fast since it does not require neighbor search in the inner loop [47]. + +Experimentally, we validate the presented modules on a real-world pairwise registration benchmark [46] and large-scale scene reconstruction datasets [17, 6, 31]. We show that our modules are robust, accurate, and fast in comparison to both classical global registration algorithms [49, 34, 44] and recent end-to-end approaches [30, 40, 2]. All training and experiment scripts are available at https://github.com/chrischoy/DeepGlobalRegistration. + +# 2. Related Work + +We divide the related work into three categories following the stages of standard registration pipelines that deal with real-world 3D scans: feature-based correspondence matching, outlier filtering, and pose optimization. + +Feature-based correspondence matching. The first step in many 3D registration pipelines is feature extraction. Lo- + +cal and global geometric structure in 3D is analyzed to produce high-dimensional feature descriptors, which can then be used to establish correspondences. + +Traditional hand-crafted features commonly summarize pairwise or higher-order relationships in histograms [19, 36, 39, 35, 34]. Recent work has shifted to learning features via deep networks [46, 21]. A number of recent methods are based on global pooling models [12, 11, 48], while others use convolutional networks [13, 9]. + +Our work is agnostic to the feature extraction mechanism. Our modules primarily address subsequent stages of the registration pipeline and are compatible with a wide variety of feature descriptors. + +Outlier filtering. Correspondences produced by matching features are commonly heavily contaminated by outliers. These outliers need to be filtered out for robust alignment. A widely used family of techniques for robust model fitting is based on RANdom SAmple Consensus (RANSAC) [37, 1, 34, 28, 18], which iteratively samples small sets of correspondences in the hope of sampling a subset that is free from outliers. Other algorithms are based on branch-and-bound [44], semi-definite programming [27, 24], and maximal clique selection [43]. These methods are accurate, but commonly require longer iterative sampling or more expensive computation as the signal-to-noise ratio decreases. One exception is TEASER [43], which remains effective even with high outlier rates. Other methods use robust loss functions to reject outliers during optimization [49, 4]. + +Our work uses a convolutional network to identify inliers and outliers. The network needs only one feed-forward pass at test time and does not require iterative optimization. + +Pose optimization. Pose optimization is the final stage that minimizes an alignment objective on filtered correspondences. Iterative Closest Points (ICP) [3] and Fast Global Registration (FGR) [49] use second-order optimization to optimize poses. Makadia et al. [25] propose an iterative procedure to minimize correlation scores. Maken et al. [26] propose to accelerate this process by stochastic gradient descent. + +Recent end-to-end frameworks combine feature learning and pose optimization. Aoki et al. [2] combine Point-Net global features with an iterative pose optimization method [23]. Wang et al. [40, 41] train graph neural network features by backpropagating through pose optimization. + +We further advance this line of work. In particular, our Weighted Procrustes method reduces the complexity of optimization from quadratic to linear and enables the use of dense correspondences for highly accurate registration of real-world scans. + +# 3. Deep Global Registration + +3D reconstruction systems typically take a sequence of partial 3D scans as input and recover a complete 3D model of the scene. These partial scans are scene fragments, as shown in Fig. 1. In order to reconstruct the scene, reconstruction systems often begin by aligning pairs of fragments [6]. This stage is known as pairwise registration. The accuracy and robustness of pairwise registration are critical and often determine the accuracy of the final reconstruction. + +Our pairwise registration pipeline begins by extracting pointwise features. These are matched to form a set of putative correspondences. We then use a high-dimensional convolutional network (ConvNet) to estimate the veracity of each correspondence. Lastly, we use a Weighted Procrustes method to align 3D scans given correspondences with associated likelihood weights, and refine the result by optimizing a robust objective. + +The following notation will be used throughout the paper. We consider two point clouds, $X = [\mathbf{x}_1,\dots,\mathbf{x}_{N_x}]\in \mathbb{R}^{3\times N_x}$ and $Y = [\mathbf{y}_1,\dots,\mathbf{y}_{N_y}]\in \mathbb{R}^{3\times N_y}$ , with $N_{x}$ and $N_{y}$ points respectively, where $\mathbf{x}_i,\mathbf{y}_j\in \mathbb{R}^3$ . A correspondence between $\mathbf{x}_i$ and $\mathbf{y}_j$ is denoted as $\mathbf{x}_i\leftrightarrow \mathbf{y}_j$ or $(i,j)$ . + +# 3.1. Feature Extraction + +To prepare for registration, we extract pointwise features that summarize geometric context in the form of vectors in metric feature space. Our pipeline is compatible with many feature descriptors. We use Fully Convolutional Geometric Features (FCGF) [9], which have recently been shown to be both discriminative and fast. FCGF are also compact, with dimensionality as low as 16 to 32, which supports rapid neighbor search in feature space. + +# 3.2. Correspondence Confidence Prediction + +Given the features $\mathcal{F}_x = \{\mathbf{f}_{\mathbf{x}_1},\dots,\mathbf{f}_{\mathbf{x}_{N_x}}\}$ and $\mathcal{F}_y = \{\mathbf{f}_{\mathbf{y}_1},\dots,\mathbf{f}_{\mathbf{y}_{N_x}}\}$ of two 3D scans, we use the nearest neighbor in the feature space to generate a set of putative correspondences or matches $\mathcal{M} = \{(i,\mathrm{argmin}_j\| \mathbf{f}_{\mathbf{x}_i} - \mathbf{f}_{\mathbf{y}_j}\|)|i\in [1,\dots,N_x]\}$ . This procedure is deterministic and can be hand-crafted to filter out noisy correspondences with ratio or reciprocity tests [49]. However, we propose to learn this heuristic filtering process through a convolutional network that learns to analyze the underlying geometric structure of the correspondence set. + +We first provide a 1-dimensional analogy to explain the geometry of correspondences. Let $A$ be a set of 1-dimensional points $A = \{0,1,2,3,4\}$ and $B$ be another such set $B = \{10,11,12,13,14\}$ . Here $B$ is a translation of $A$ : $B = \{a_{i} + 10|a_{i} \in A\}$ . If an algorithm returns a set of possible correspondences $\{(0,10), (1,11), (2,12), (3,13), (4,14), (0,14), (4,10)\}$ , then the set of correct correspondences (inliers) will form a + +![](images/8055f8a01fb3bac4fe576cf388be9e56e6a1321fac388f3107d9c034c92dd8b4.jpg) +Figure 2: 6-dimensional convolutional network architecture for inlier likelihood prediction (Sec. 3.2). The network has a U-net structure with residual blocks between strided convolutions. Best viewed on the screen. + +line (first 5 pairs), whereas incorrect correspondences (outliers) will form random noise outside the line (last 2 pairs). If we extend this to 3D scans and pointclouds, we can also represent a 3D correspondence $\mathbf{x}_i\leftrightarrow \mathbf{y}_j$ as a point in 6-dimensional space $[\mathbf{x}_i^T,\mathbf{y}_j^T ]^T\in \mathbb{R}^6$ . The inlier correspondences will be distributed on a lower-dimensional surface in this 6D space, determined by the geometry of the 3D input. We denote $\mathcal{P} = \{(i,j)\mid \| T^{*}(\mathbf{x}_{i}) - \mathbf{y}_{j}\| < \tau ,(i,j)\in \mathcal{M}\}$ as a set of inliers or a set of correspondences $(i,j)$ that align accurately up to the threshold $\tau$ under the ground truth transformation $T^{*}$ . Meanwhile, the outliers $\mathcal{N} = \mathcal{P}^C\cap \mathcal{M}$ will be scattered outside the surface $\mathcal{P}$ . To identify the inliers, we use a convolutional network. Such networks have been proven effective in related dense prediction tasks, such as 3D point cloud segmentation [15, 7]. The convolutional network in our setting is in 6-dimensional space [8]. The network predicts a likelihood for each correspondence, which is a point in 6D space $[\mathbf{x}_i^T,\mathbf{y}_j^T ]^T$ . The prediction is interpreted as the likelihood that the correspondence is true: an inlier. + +Note that the convolution operator is translation invariant, thus our 6D ConvNet will generate the same output regardless of the absolute position of inputs in 3D. We use a similar network architecture to Choy et al. [9] to create a 6D convolutional network with skip connections within the spatial resolution across the network. The architecture of the 6D ConvNet is shown in Fig. 2. During training, we use the binary cross-entropy loss between the likelihood prediction that a correspondence $(i,j)$ is an inlier, $p_{(i,j)}\in [0,1]$ , and the ground-truth correspondences $\mathcal{P}$ to optimize the network parameters: + +$$ +L _ {\mathrm {b c e}} \left(\mathcal {M}, T ^ {*}\right) = \frac {1}{| \mathcal {M} |} \left(\sum_ {(i, j) \in \mathcal {P}} \log p _ {(i, j)} + \sum_ {(i, j) \in \mathcal {N}} \log p _ {(i, j)} ^ {C}\right), \tag {1} +$$ + +where $p^C = 1 - p$ and $|\mathcal{M}|$ is the cardinality of the set of putative correspondences. + +# 3.3. Weighted Procrustes for SE(3) + +The inlier likelihood estimated by the 6D ConvNet provides a weight for each correspondence. The original + +Procrustes method [14] minimizes the mean squared error between corresponding points $\frac{1}{N}\sum_{(i,j)\in \mathcal{M}}\| \mathbf{x}_i - \mathbf{y}_j\|^2$ and thus gives equal weight to all correspondences. In contrast, we minimize a weighted mean squared error $\sum_{(i,j)\in \mathcal{M}}w_{(i,j)}\| \mathbf{x}_i - \mathbf{y}_j\|^2$ . This change allows us to pass gradients through the weights, rather than through the position [40], and enables the optimization to scale to dense correspondence sets. + +Formally, Weighted Procrustes analysis minimizes: + +$$ +\begin{array}{l} e ^ {2} = e ^ {2} (R, \mathbf {t}; \mathbf {w}, X, Y) (2) \\ = \sum_ {(i, j) \in \mathcal {M}} \tilde {w} _ {(i, j)} \left(\mathbf {y} _ {j} - \left(R \mathbf {x} _ {i} + \mathbf {t}\right)\right) ^ {2} (3) \\ = \operatorname {T r} \left(\left(Y - R X - \mathbf {t l} ^ {T}\right) W \left(Y - R X - \mathbf {t l} ^ {T}\right) ^ {T}\right), (4) \\ \end{array} +$$ + +where $\mathbf{1} = (1,\dots,1)^T$ , $X = [\mathbf{x}_1,\dots,\mathbf{x}_{|\mathcal{M}|}]$ , and $Y = [\mathbf{y}_{J_1},\dots,\mathbf{y}_{J_{|\mathcal{M}|}}]$ . $J$ is a list of indices that defines the correspondences $\mathbf{x}_i \leftrightarrow \mathbf{y}_{J_i}$ . $\mathbf{w} = [w_1,\dots,w_{|\mathcal{M}|}]$ is the weight vector and $\tilde{\mathbf{w}} = [\tilde{w}_1,\dots,\tilde{w}_{|\mathcal{M}|}] \triangleq \frac{\phi(\mathbf{w})}{||\phi(\mathbf{w})||_1}$ denotes the normalized weight after a nonlinear transformation $\phi$ that applies heuristic prefiltering. $W = \mathrm{diag}(\tilde{\mathbf{w}})$ forms the diagonal weight matrix. + +Theorem 1: The $R$ and $\pmb{t}$ that minimize the squared error $e^2 (R,\pmb {t}) = \sum_{(i,j)}w_{(i,j)}(\pmb {y}_j - R\pmb {x}_i - \pmb {t})^2$ are $\hat{\pmb{t}} = (Y-$ $RX)W1$ and $\hat{R} = USV^{T}$ where $U\Sigma V^{T} = SVD(\Sigma_{xy})$ $\Sigma_{xy} = YKWKXT,K = I - \sqrt{\tilde{\mathbf{w}}}\sqrt{\tilde{\mathbf{w}}}^{T},$ and $S =$ diag $(1,\dots ,1,\det (U)\det (V))$ + +Sketch of proof. First, we differentiate $e^2$ w.r.t. $\mathbf{t}$ and equate the partial derivative to 0. This gives us $\hat{\mathbf{t}} = (Y - RX)W\mathbf{1}$ . Next, we substitute $X = KX + X\sqrt{\bar{\mathbf{w}}}\sqrt{\bar{\mathbf{w}}}^T$ on Eq. 4 and do the same for $Y$ . Then, we substitute $\mathbf{t} = \hat{\mathbf{t}}$ into the squares. This yields $e^2 = \mathrm{Tr}\left((Y - RX)KWK^T(Y - RX)^T\right)$ and expanding the term results in two squares plus $-2\mathrm{Tr}(YKWK^TX^TR^T)$ . We maximize the last negative term whose maximum is the sum of all singular values, which leads to $\hat{R}$ . The full derivation is in the supplement. + +We can easily extend the above theorem to incorporate a scaling factor $c \in \mathbb{R}^+$ , or anisotropic scaling for tasks such as scan-to-CAD registration, but in this paper we assume that partial scans of the same scene have the same scale. + +The Weighted Procrustes method generates rotation $\hat{R}$ and translation $\hat{\mathbf{t}}$ as outputs that depend on the weight vector $\mathbf{w}$ . In our current implementation, $\hat{R}$ and $\hat{\mathbf{t}}$ are directly sent to the robust registration module in Section 4 as an initial pose. However, we briefly demonstrate that they can also be embedded in an end-to-end registration pipeline, since Weighted Procrustes is differentiable. From a top-level loss function $L$ of $\hat{R}$ and $\hat{\mathbf{t}}$ , we can pass the gradient through the + +closed-form solver, and update parameters in downstream modules: + +$$ +\frac {\partial}{\partial \mathbf {w}} L (\hat {R}, \hat {\mathbf {t}}) = \frac {\partial L (\hat {R} , \hat {\mathbf {t}})}{\partial \hat {R}} \frac {\partial \hat {R}}{\partial \hat {\mathbf {w}}} + \frac {\partial L (\hat {R} , \hat {\mathbf {t}})}{\partial \hat {\mathbf {t}}} \frac {\partial \hat {\mathbf {t}} (\hat {R} , \hat {\mathbf {w}})}{\partial \hat {\mathbf {w}}}, \tag {5} +$$ + +where $L(\hat{R}, \hat{\mathbf{t}})$ can be defined as the combination of differentiable rotation error (RE) and translation error (TE) between predictions $\hat{R}, \hat{\mathbf{t}}$ and ground-truth $R^{*}$ , $\mathbf{t}^{*}$ : + +$$ +L _ {\mathrm {r o t}} (\hat {R}) = \arccos \frac {\operatorname {T r} \left(\hat {R} ^ {T} R ^ {*}\right) - 1}{2}, \tag {6} +$$ + +$$ +L _ {\text {t r a n s}} (\hat {\mathbf {t}}) = \left\| \hat {\mathbf {t}} - \mathbf {t} ^ {*} \right\| _ {2} ^ {2}, \tag {7} +$$ + +or the Forbenius norm of relative transformation matrices defined in [2, 40]. The final loss is the weighted sum of $L_{\mathrm{rot}}$ , $L_{\mathrm{trans}}$ , and $L_{\mathrm{bce}}$ . + +# 4. Robust Registration + +In this section, we propose a registration fine-tuning module that minimizes a robust loss function of choice to improve the registration accuracy. We use a gradient-based method, but unlike Maken et al. [26], which finds the nearest neighbor for every point at each gradient step, we rely on the correspondence likelihoods from the 6D ConvNet to define the loss and do not find nearest neighbors every step. We use a continuous representation [51] for rotations to remove discontinuities to make the optimization space smooth. Lastly, we initialize the pose with the final prediction from the Weighted Procrustes method. + +# 4.1. SE(3) Representation and Initialization + +We use the 6D representation of 3D rotation proposed by Zhou et al. [51], rather than Euler angles or quaternions. The new representation uses 6 parameters $\mathbf{a}_1, \mathbf{a}_2 \in \mathbb{R}^3$ and can be transformed into a $3 \times 3$ orthogonal matrix by + +$$ +f \left(\left[ \begin{array}{l l} | & | \\ \mathbf {a} _ {1} & \mathbf {a} _ {2} \\ | & | \end{array} \right]\right) = \left[ \begin{array}{c c c} | & | & | \\ \mathbf {b} _ {1} & \mathbf {b} _ {2} & \mathbf {b} _ {3} \\ | & | & | \end{array} \right], \tag {8} +$$ + +where $\mathbf{b}_1, \mathbf{b}_2, \mathbf{b}_3 \in \mathbb{R}^3$ are $\mathbf{b}_1 = N(\mathbf{a}_1)$ , $\mathbf{b}_2 = N(\mathbf{a}_2 - (\mathbf{b}_1 \cdot \mathbf{a}_2) \mathbf{b}_1)$ , and $\mathbf{b}_3 = \mathbf{b}_1 \times \mathbf{b}_2$ , and $N(\cdot)$ denotes L2 normalization. Thus, the final representation that we use is $\mathbf{a}_1, \mathbf{a}_2, \mathbf{t}$ which are equivalent to $R, \mathbf{t}$ using Eq. 8. + +To initialize $\mathbf{a}_1, \mathbf{a}_2$ , we simply use the first two columns of the rotation matrix $R$ , i.e., $\mathbf{b}_1, \mathbf{b}_2$ . For convenience, we define $f^{-1}$ as $f^{-1}(f(R)) = R$ though this inverse function is not unique as there are infinitely many choices of $\mathbf{a}_1, \mathbf{a}_2$ that map to the same $R$ . + +# 4.2. Energy Minimization + +We use a robust loss function to fine-tune the registration between predicted inlier correspondences. The general + +Algorithm 1: Deep Global Registration +Input: $X\in \mathbb{R}^{n\times 3},Y\in \mathbb{R}^{m\times 3}$ +Output: $R\in \mathbb{R}^{3\times 3},t\in \mathbb{R}^{3\times 1}$ +1 $\mathcal{F}_x\gets$ Feature(X) // § 3.1 +2 $\mathcal{F}_y\gets$ Feature(Y) +3 $J_{x\rightarrow y}\gets$ NearestNeighbor $(\mathcal{F}_x,\mathcal{F}_y)$ // § 3.2 +4 $\mathcal{M}\leftarrow \{(i,J_{x\rightarrow y,i})\mid i\in [1,\dots,n]\}$ +5 w $\leftarrow$ InlierProbability(M) +6 $\hat{R},\hat{\mathbf{t}}\gets$ argmin $R,\mathbf{t}e^{2}(R,\mathbf{t};\mathbf{w},X,Y)$ // § 3.3 +7 a $\leftarrow$ $f^{-1}(\hat{R}),\mathbf{t}\leftarrow \hat{\mathbf{t}}$ // § 4 +8 while not converging do +9 $\begin{array}{r}\ell \leftarrow \sum_{(i,j)\in \mathcal{M}}\phi (w_{(i,j)})L(Y_j,f(\mathbf{a})X_i + \mathbf{t})\\ \mathbf{a}\leftarrow \mathrm{Update}(\mathbf{a},\frac{\partial}{\partial\mathbf{a}}\ell (\mathbf{a},\mathbf{t}))\\ \mathbf{t}\leftarrow \mathrm{Update}(\mathbf{t},\frac{\partial}{\partial\mathbf{t}}\ell (\mathbf{a},\mathbf{t}))\\ \end{array}$ +10 +11 +12 return f(a), t + +form of the energy function is + +$$ +E (R, \mathbf {t}) = \sum_ {i = 1} ^ {n} \phi \left(w _ {\left(i, J _ {i}\right)}\right) L \left(\mathbf {y} _ {J _ {i}}, R \mathbf {x} _ {i} + \mathbf {t}\right), \tag {9} +$$ + +where $\tilde{w}_i$ and $J_{i}$ are defined as in Eq. 3 and $\phi (\cdot)$ is a prefiltering function. In the experiments, we use $\phi (w) = I[w > \tau ]w$ , which clips weights below $\tau$ elementwise as neural network outputs bounded logit scores. $L(\mathbf{x},\mathbf{y})$ is a pointwise loss function between $\mathbf{x}$ and $\mathbf{y}$ ; we use the Huber loss in our implementation. The energy function is parameterized by $R$ and $\mathbf{t}$ which in turn are represented as $\mathbf{a}_1,\mathbf{a}_2,\mathbf{t}$ . We can apply first-order optimization algorithms such as SGD, Adam, etc. to minimize the energy function, but higher-order optimizers are also applicable since the number of parameters is small. The complete algorithm is described in Alg. 1. + +# 5. Experiments + +We analyze the proposed model in two registration scenarios: pairwise registration where we estimate an SE(3) transformation between two 3D scans or fragments, and multi-way registration which generates a final reconstruction and camera poses for all fragments that are globally consistent. Here, pairwise registration serves as a critical module in multi-way registration. + +For pairwise registration, we use the 3DMatch benchmark [46] which consists of 3D point cloud pairs from various real-world scenes with ground truth transformations estimated from RGB-D reconstruction pipelines [16, 10]. We follow the train/test split and the standard procedure to generate pairs with at least $30\%$ overlap for training and testing [12, 11, 9]. For multi-way registration, we use the simulated Augmented ICL-NUIM dataset [6, 17] for quantitative + +trajectory results, and Indoor LiDAR RGB-D dataset [31] and Stanford RGB-D dataset [6] for qualitative registration visualizations. Note in this experiment we use networks trained on the 3DMatch training set and do not fine-tune on the other datasets. This illustrates the generalization abilities of our models. + +For all experiments, we use 5cm voxel downsampling [34, 50], which randomly subsamples a single point within each 5cm voxel to generate point clouds with uniform density. We train learning-based state-of-the-art models and our network on the training split of the 3DMatch benchmark. During training, we augment data by applying random rotations varying from $-180$ to 180 degrees around a random axis. Ground-truth pointwise correspondences are found using nearest neighbor search in 3D space. We train the 6-dimensional ConvNet on a single Titan XP with batch size 4. SGD is used with an initial learning rate $10^{-1}$ and an exponential learning rate decay factor 0.99. + +# 5.1. Pairwise Registration + +In this section, we report the registration results on the test set of the 3DMatch benchmark [46], which contains 8 different scenes as depicted in Fig. 3. We measure translation error (TE) defined in Eq. 6, rotation error (RE) defined in Eq. 7, and recall. Recall is the ratio of successful pairwise registrations and we define a registration to be successful if its rotation error and translation error are smaller than predefined thresholds. Average TE and RE are computed only on these successfully registered pairs since failed registrations return poses that can be drastically different from the ground truth, making the error metrics unreliable. + +We compare our methods with various classical methods [49, 34, 44] and state-of-the-art learning based methods [40, 41, 2, 30]. All the experiments are evaluated on an Intel i7-7700 CPU and a GTX 1080Ti graphics card except for Go-ICP [44] tested on an Intel i7-5820K CPU. In Table 1, we measure recall with the TE threshold $30\mathrm{cm}$ which is typical for indoor scene relocalization [29], and RE threshold 15 degrees which is practical for partially overlapping scans from our experiments. In Fig. 4, we plot the sensitivity of recall on both thresholds by changing one threshold and setting the other to infinity. Fig. 5 includes detailed statistics on separate test scenes. Our system outperforms all the baselines on recall by a large margin and achieves the lowest translation and rotation error consistently on most scenes. + +Classical methods. To compare with classical methods, we evaluate point-to-point ICP, Point-to-plane ICP, RANSAC [34], and FGR [49], all implemented in Open3D [50]. In addition, we test the open-source Python bindings of Go-ICP [44] and Super4PCS [28]. For RANSAC and FGR, we extract FPFH from voxel-downsampled point clouds. The results are shown in Ta + +![](images/30eaff0c486ccd8221df7df5a701a3dbfac0d4f6ee2beff6b31bb51d0773e540.jpg) +Figure 3: Global registration results of our method on all 8 different test scenes in 3DMatch [46]. Best viewed in color. + +![](images/5128378ed9011fe00cf3602614f29be7307b5bde6f4cac1d0ebafe53436d91bb.jpg) +Figure 4: Overall pairwise registration recall (y-axis) on the 3DMatch benchmark with varying rotation (left image) and translation (right image) error thresholds (x-axis). Our approach outperforms baseline methods for all thresholds while being $6.5 \times$ faster than the most accurate baseline. + +Table 1: Row 1-5: registration results of our method and classical global registration methods on point clouds voxelized with $5\mathrm{cm}$ voxel size. Our method outperforms RANSAC and FGR while being as fast as FGR. Row 6-9: results of ICP variants. Row 10 and 11: results of learning-based methods. The learning-based methods generally fail on real-world scans. Time includes feature extraction. + +
RecallTE (cm)RE (deg)Time (s)
Ours85.2%7.732.580.70
FGR [49]42.7%10.64.080.31
RANSAC-2M [34]66.1%8.853.001.39
RANSAC-4M70.7%9.162.952.32
RANSAC-8M74.9%8.962.924.55
Go-ICP [44]22.9%14.75.38771.0
Super4PCS [28]21.6%14.15.254.55
ICP (P2Point) [50]6.04%18.18.250.25
ICP (P2Plane) [50]6.59%15.26.610.27
DCP [40]3.22%21.48.420.07
PointNetLK [2]1.61%21.38.040.12
+ +ble 1. + +ICP variants mostly fail as the dataset contains challenging 3D scan sequences with small overlap and large camera viewpoint change. Super4PCS, a sampling-based algorithm, performs similarly to Go-ICP, an ICP variant with branch-and-bound search. + +Feature-based methods, FGR and RANSAC, perform better. When aligning 5cm-voxel-downsampled point clouds, RANSAC achieves recall as high as $70\%$ , while FGR reaches $40\%$ . Table 1 also shows that increasing the number of RANSAC iterations by a factor of 2 only improves performance marginally. Note that our method is about twice as fast as RANSAC with 2M iterations while achieving higher recall and registration accuracy. + +Learning-based methods. We use 3DRegNet [30], Deep Closest Point (DCP) [40], PRNet [41], and PointNetLK [2] as our baselines. We train all the baselines on 3DMatch with the same setup and data augmentation as ours for all experiments. + +For 3DRegNet, we follow the setup outlined in [30], ex + +![](images/a65f333f70aba799bfb810fb7fa94968f02731c726fe35f563f431876d81ac11.jpg) + +![](images/3ceccf7c38426ccfe0152aad8b1cca2c83c0ccce739def924ac61769e078b4b7.jpg) + +![](images/50f457436f9002b3cfa4675559282d6b83f32df06d8ac2011f04b0051214a137.jpg) +Figure 5: Analysis of 3DMatch registration results per scene. Row 1: recall rate (higher is better). Row 2-3: TE and RE measured on successfully registered pairs (lower is better). Our method is consistently better on all scenes, which were not seen during training. Note: a missing bar corresponds to zero successful alignments in a scene. + +Table 2: ATE (cm) error on the Augmented ICL-NUIM dataset with simulated depth noise. For InfiniTAM, the loop closure module is disabled since it fails in all scenes. For BAD-SLAM, the loop closure module only succeeds in 'Living room 2'. + +
ElasticFusion [42]InfiniTAM [20]BAD-SLAM [38]Multi-way + FGR [49]Multi-way + RANSAC [50]Multi-way + Ours
Living room 166.6146.07fail78.97110.921.06
Living room 224.3373.6440.4124.9119.3321.88
Office 113.04113.818.5314.9614.4215.76
Office 235.02105.226.3421.0517.3111.56
Avg. Rank3553.52.52
+ +cept that we do not manually filter outliers with ground truth, and train and test with the standard realistic setup. We find that the registration loss of 3DRegNet does not converge during training and the rotation and translation errors are consistently above 30 degrees and $1\mathrm{m}$ during test. + +We train Deep Closest Point (DCP) with 1024 randomly sampled points for each point cloud for 150 epochs [40]. We initialize the network with the pretrained weights provided by the authors. Although the training loss converges, DCP fails to achieve reasonable performance for point clouds with partial overlap. DCP uses a singly stochastic matrix to find correspondences, but this formulation assumes that all points in point cloud $X$ have at least one corresponding point in the convex hull of point cloud $Y$ . + +This assumption fails when some points in $X$ have no corresponding points in $Y$ , as is the case for partially overlapping fragments. We also tried to train PRNet [41] on our setup, but failed to get reasonable results due to random crashes and high-variance training losses. + +Lastly, we fine-tune PointNetLK [2] on 3DMatch for 400 epochs, starting from the pretrained weights provided by the authors. PointNetLK uses a single feature that is globally pooled for each point cloud and regresses the relative pose between objects, and we suspect that a globally pooled feature fails to capture complex scenes such as 3DMatch. + +In conclusion, while working well on object-centric synthetic datasets, current end-to-end registration approaches fail on real-world data. Unlike synthetic data, real 3D point + +![](images/d881c377324fdf927f928ae22e7623f1d9d5e1b6f3c07f76e806e80fb2f7825b.jpg) +(a) Real-world: Apartment + +![](images/bc4b1ae7c0c0c3db22d77f6223d9b5c708a048a717615b6da2312797896636ac.jpg) +(b) Real-world: Boardroom + +![](images/23cb3271e1648bfac08c6a43e1bc27e9e8fbc59cdd72a5a752dce5f65943877f.jpg) +(c) Synthetic: Office + +![](images/75f83729628fe140d369e739dda5ca4b88947d07f35b5fae3fedcbf84e072270.jpg) +(d) Real-world: Copyroom + +![](images/a42b7ea16961c68fb7d4a8934c773272751e5e1ec65cfaeb19cdf5d8a74c38e8.jpg) +(e) Real-world: Loft + +![](images/cab19d6668f954492c6060ec82f93f0fdee8ace7f73bec986df95dd1ed7d1d1f.jpg) +(f) Synthetic: Livingroom +Figure 6: Fragment registrations on [6, 31]. From left to right: FGR [49], RANSAC [34], Ours. Row 1-3: our method succeeds on scenes with small overlaps or ambiguous geometry structures while other methods fail. Row 4-6: by combining Weighted Procrustes and gradient-based refinement, our method outputs more accurate registrations in one pass, leading to better aligned details. + +cloud pairs contain multiple objects, partial scans, self-occlusion, substantial noise, and may have only a small degree of overlap between scans. + +# 5.2. Multi-way Registration + +Multi-way registration for RGB-D scans proceeds via multiple stages. First, the pipeline estimates the camera + +pose via off-the-shelf odometry and integrates multiple 3D scans to reduce noise and generate accurate 3D fragments of a scene. Next, a pairwise registration algorithm roughly aligns all fragments, followed by multi-way registration [6] which optimizes fragment poses with robust pose graph optimization [22]. + +We use a popular open-source implementation of this registration pipeline [50] and replace the pairwise registration stage in the pipeline with our proposed modules. Note that we use the networks trained on the 3DMatch training set and test on the multi-way registration datasets [17, 31, 6]; this demonstrates cross-dataset generalization. + +We test the modified pipeline on the Augmented ICL-NUIM dataset [6, 17] for quantitative trajectory results, and Indoor LiDAR RGB-D dataset [31] and Stanford RGB-D dataset [6] for qualitative registration visualizations. We measure the absolute trajectory error (ATE) on the Augmented ICL-NUIM dataset with simulated depth noise. As shown in Table 2, compared to state-of-the-art online SLAM [42, 20, 38] and offline reconstruction methods [49], our approach yields consistently low error across scenes. + +For qualitative results, we compare pairwise fragment registration on these scenes against FGR and RANSAC in Fig. 6. Full scene reconstruction results are shown in the supplement. + +# 6. Conclusion + +We presented Deep Global Registration, a learning-based framework that robustly and accurately aligns real-world 3D scans. To achieve this, we used a 6D convolutional network for inlier detection, a differentiable Weighted Procrustes algorithm for scalable registration, and a gradient-based optimizer for pose refinement. Experiments show that our approach outperforms both classical and learning-based registration methods, and can serve as a ready-to-use plugin to replace alternative registration methods in off-the-shelf scene reconstruction pipelines. + +# References + +[1] Dror Aiger, Niloy J Mitra, and Daniel Cohen-Or. 4-points congruent sets for robust pairwise surface registration. ACM Transactions on Graphics, 2008. 2 +[2] Yasuhiro Aoki, Hunter Goforth, Rangaprasad Arun Srivatsan, and Simon Lucey. PointNetLK: Robust & efficient point cloud registration using PointNet. In CVPR, 2019. 1, 2, 4, 5, 6, 7 +[3] Paul J Bes, Neil D McKay, et al. A method for registration of 3-d shapes. IEEE Transactions on Pattern Analysis and Machine Intelligence, 1992. 2 +[4] Sofien Bouaziz, Andrea Tagliasacchi, and Mark Pauly. Sparse iterative closest point. In Eurographics, 2013. 2 +[5] Qin Cai, David Gallup, Cha Zhang, and Zhengyou Zhang. 3D deformable face tracking with a commodity depth camera. In ECCV, 2010. 1 + +[6] Sungjoon Choi, Qian-Yi Zhou, and Vladlen Koltun. Robust reconstruction of indoor scenes. In CVPR, 2015. 2, 3, 5, 8 +[7] Christopher Choy, JunYoung Gwak, and Silvio Savarese. 4D spatio-temporal ConvNets: Minkowski convolutional neural networks. In CVPR, 2019. 3 +[8] Christopher Choy, Junha Lee, René Ranftl, Jaesik Park, and Vladlen Koltun. High-dimensional convolutional networks for geometric pattern recognition. In CVPR, 2020. 2, 3 +[9] Christopher Choy, Jaesik Park, and Vladlen Koltun. Fully convolutional geometric features. In ICCV, 2019. 1, 2, 3, 5 +[10] Angela Dai, Matthias Nießner, Michael Zolloffer, Shahram Izadi, and Christian Theobalt. BundleFusion: Real-time globally consistent 3D reconstruction using on-the-fly surface re-integration. ACM Transactions on Graphics, 2017. 5 +[11] Haowen Deng, Tolga Birdal, and Slobodan Ilic. PPF-FoldNet: Unsupervised learning of rotation invariant 3D local descriptors. In ECCV, 2018. 1, 2, 5 +[12] Haowen Deng, Tolga Birdal, and Slobodan Ilic. PPFNet: Global context aware local features for robust 3D point matching. In CVPR, 2018. 2, 5 +[13] Zan Gojcic, Caifa Zhou, Jan Dirk Wegner, and Andreas Wieser. The perfect match: 3D point cloud matching with smoothed densities. In CVPR, 2019. 2 +[14] John C Gower. Generalized procrustes analysis. Psychometrika, 1975. 2, 4 +[15] Benjamin Graham, Martin Engelcke, and Laurens van der Maaten. 3D semantic segmentation with submanifold sparse convolutional networks. In CVPR, 2018. 3 +[16] Maciej Halber and Thomas Funkhouser. Fine-to-coarse global registration of RGB-D scans. In CVPR, 2017. 5 +[17] Ankur Handa, Thomas Whelan, John McDonald, and Andrew J. Davison. A benchmark for RGB-D visual odometry, 3D reconstruction and SLAM. In ICRA, 2014. 2, 5, 8 +[18] Dirk Holz, Alexandru E Ichim, Federico Tombari, Radu B Rusu, and Sven Behnke. Registration with the point cloud library: A modular framework for aligning in 3-D. RA-L, 2015. 2 +[19] Andrew E. Johnson and Martial Hebert. Using spin images for efficient object recognition in cluttered 3D scenes. Pattern Analysis and Machine Intelligence, 1999. 2 +[20] Olaf Kähler, V. A. Prisacariu, and David W. Murray. Real-time large-scale dense 3D reconstruction with loop closure. In ECCV, 2016. 7, 8 +[21] Marc Khoury, Qian-Yi Zhou, and Vladlen Koltun. Learning compact geometric features. In ICCV, 2017. 1, 2 +[22] Rainer Kummerle, Giorgio Grisetti, Hauke Strasdat, Kurt Konolige, and Wolfram Burgard. g2o: A general framework for graph optimization. In ICRA, 2011. 8 +[23] Bruce D Lucas and Takeo Kanade. An iterative image registration technique with an application to stereo vision. In DARPA Image Understanding Workshop, 1981. 1, 2 +[24] João Maciel and Joao Paulo Costeira. A global solution to sparse correspondence problems. Pattern Analysis and Machine Intelligence, 2003. 2 +[25] Ameesh Makadia, Alexander Patterson, and Kostas Dani-ilidis. Fully automatic registration of 3D point clouds. In CVPR, 2006. 2 + +[26] Fahira Afzal Maken, Fabio Ramos, and Lionel Ott. Speeding up iterative closest point using stochastic gradient descent. In ICRA, 2019. 2, 4 +[27] Haggai Maron, Nadav Dym, Itay Kezurer, Shahar Kovalsky, and Yaron Lipman. Point registration via efficient convex relaxation. ACM Transactions on Graphics, 2016. 2 +[28] Nicolas Mellado, Dror Aiger, and Niloy J Mitra. Super 4PCS fast global pointcloud registration via smart indexing. Computer Graphics Forum, 2014. 2, 5, 6 +[29] Montiel J. M. M. Mur-Artal, Raul and Juan D. Tardos. ORBSLAM: A versatile and accurate monocular SLAM system. IEEE Transactions on Robotics, 2015. 5 +[30] G. Dias Pais, Pedro Miraldo, Srikumar Ramalingam, Jacinto C. Nascimento, Venu Madhav Govindu, and Rama Chellappa. 3DRegNet: A deep neural network for 3D point registration. arXiv, 2019. 1, 2, 5, 6 +[31] Jaesik Park, Qian-Yi Zhou, and Vladlen Koltun. Colored point cloud registration revisited. In ICCV, 2017. 2, 5, 8 +[32] Chen Qian, Xiao Sun, Yichen Wei, Xiaou Tang, and Jian Sun. Realtime and robust hand tracking from depth. In CVPR, 2014. 1 +[33] René Ranftl and Vladlen Koltun. Deep fundamental matrix estimation. In ECCV, 2018. 1 +[34] R. B. Rusu, N. Blodow, and M. Beetz. Fast point feature histograms (FPFH) for 3D registration. In ICRA, 2009. 1, 2, 5, 6, 8 +[35] R. B. Rusu, N. Blodow, Z. C. Marton, and M. Beetz. Aligning point cloud views using persistent feature histograms. In IROS, 2008. 2 +[36] S. Salti, F. Tombari, and L. di Stefano. SHOT: Unique signatures of histograms for surface and texture description. CVIU, 2014. 2 +[37] Ruwen Schnabel, Roland Wahl, and Reinhard Klein. Efficient RANSAC for point-cloud shape detection. Computer Graphics Forum, 2007. 1, 2 +[38] Thomas Schops, Torsten Sattler, and Marc Pollefeys. BAD SLAM: Bundle adjusted direct RGB-D SLAM. In CVPR, 2019. 7, 8 +[39] F. Tombari, S. Salti, and L. Di Stefano. Unique shape context for 3D data description. In ACM Workshop on 3D Object Retrieval, 2010. 2 +[40] Yue Wang and Justin M. Solomon. Deep closest point: Learning representations for point cloud registration. In ICCV, 2019. 1, 2, 4, 5, 6, 7 +[41] Yue Wang and Justin M. Solomon. PRNet: Self-supervised learning for partial-to-partial registration. In NeurIPS, 2019. 2, 5, 6, 7 +[42] Thomas Whelan, Stefan Leutenegger, Renato F. Salas-Moreno, Ben Glocker, and Andrew J. Davison. ElasticFusion: Dense SLAM without a pose graph. In Robotics: Science and Systems, 2015. 7, 8 +[43] Heng Yang and Luca Carlone. A polynomial-time solution for robust registration with extreme outlier rates. In Robotics: Science and Systems, 2019. 2 +[44] Jiaolong Yang, Hongdong Li, Dylan Campbell, and Yunde Jia. Go-ICP: A globally optimal solution to 3D ICP point-set registration. Pattern Analysis and Machine Intelligence, 2015. 1, 2, 5, 6 + +[45] Kwang Moo Yi, Eduard Trulls, Yuki Ono, Vincent Lepetit, Mathieu Salzmann, and Pascal Fua. Learning to find good correspondences. In CVPR, 2018. 1 +[46] Andy Zeng, Shuran Song, Matthias Nießner, Matthew Fisher, Jianxiong Xiao, and Thomas Funkhouser. 3DMatch: Learning local geometric descriptors from RGB-D reconstructions. In CVPR, 2017. 1, 2, 5, 6 +[47] Zhengyou Zhang. Iterative point matching for registration of free-form curves and surfaces. IJCV, 1994. 2 +[48] Chen Zhao, Zhiguo Cao, Chi Li, Xin Li, and Jiaqi Yang. NM-Net: Mining reliable neighbors for robust feature correspondences. In CVPR, 2019. 2 +[49] Qian-Yi Zhou, Jaesik Park, and Vladlen Koltun. Fast global registration. In ECCV, 2016. 1, 2, 3, 5, 6, 7, 8 +[50] Qian-Yi Zhou, Jaesik Park, and Vladlen Koltun. Open3D: A modern library for 3D data processing. arXiv, 2018. 5, 6, 7, 8 +[51] Yi Zhou, Connelly Barnes, Jingwan Lu, Jimei Yang, and Hao Li. On the continuity of rotation representations in neural networks. In CVPR, 2019. 2, 4 \ No newline at end of file diff --git a/deepglobalregistration/images.zip b/deepglobalregistration/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..61bebb04415e22b431409758295cbef485ab5cb0 --- /dev/null +++ b/deepglobalregistration/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:baec96a14d9376e4b03667072c4c7e298d9a89e78652d79342b438b0f533598b +size 636212 diff --git a/deepglobalregistration/layout.json b/deepglobalregistration/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0133fd164fc2092744b7742fe408576d113e15ff --- /dev/null +++ b/deepglobalregistration/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43ad18ec533c199eaf3018b5862202c4b1b55de23c1f894a615ad840bcd385a9 +size 433276 diff --git a/deepgroupingmodelforunifiedperceptualparsing/00da3a6b-f4c4-45ea-b448-0684d1f9929d_content_list.json b/deepgroupingmodelforunifiedperceptualparsing/00da3a6b-f4c4-45ea-b448-0684d1f9929d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..134d303548532cc4d6a04ae14cfe230c497d6858 --- /dev/null +++ b/deepgroupingmodelforunifiedperceptualparsing/00da3a6b-f4c4-45ea-b448-0684d1f9929d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96a0b0ae2afac5735d43c550a66deca3b25d91036bb7b1f2c2f6553b204b3723 +size 83896 diff --git a/deepgroupingmodelforunifiedperceptualparsing/00da3a6b-f4c4-45ea-b448-0684d1f9929d_model.json b/deepgroupingmodelforunifiedperceptualparsing/00da3a6b-f4c4-45ea-b448-0684d1f9929d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..72bc8147d65fa22f3cca049b6b9c64abb11eaa3b --- /dev/null +++ b/deepgroupingmodelforunifiedperceptualparsing/00da3a6b-f4c4-45ea-b448-0684d1f9929d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3b85fb221e3443083c33bc8098e6d3134fbe49dc5678ff35f96782fc8e88d7e +size 104814 diff --git a/deepgroupingmodelforunifiedperceptualparsing/00da3a6b-f4c4-45ea-b448-0684d1f9929d_origin.pdf b/deepgroupingmodelforunifiedperceptualparsing/00da3a6b-f4c4-45ea-b448-0684d1f9929d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1cfcd78c99ac33459f844ecfba8b064e5cc91381 --- /dev/null +++ b/deepgroupingmodelforunifiedperceptualparsing/00da3a6b-f4c4-45ea-b448-0684d1f9929d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:516884ca299c1f8a0cedfeda308feb0c67e299b16d03f10de8de7c5b03c0eb97 +size 2949391 diff --git a/deepgroupingmodelforunifiedperceptualparsing/full.md b/deepgroupingmodelforunifiedperceptualparsing/full.md new file mode 100644 index 0000000000000000000000000000000000000000..523fa7324209f356d0467c2c886822e77f16bcad --- /dev/null +++ b/deepgroupingmodelforunifiedperceptualparsing/full.md @@ -0,0 +1,343 @@ +# Deep Grouping Model for Unified Perceptual Parsing + +Zhiheng Li $^{1}$ Wenxuan Bao $^{2*}$ Jiayang Zheng $^{1}$ Chenliang Xu $^{1}$ + +1University of Rochester 2Tsinghua University + +{zhiheng.li,jiayang.zheng,chenliang.xu}@rochester.edu bwx16@mails.tsinghua.edu.cn + +# Abstract + +The perceptual-based grouping process produces a hierarchical and compositional image representation that helps both human and machine vision systems recognize heterogeneous visual concepts. Examples can be found in the classical hierarchical superpixel segmentation or image parsing works. However, the grouping process is largely overlooked in modern CNN-based image segmentation networks due to many challenges, including the inherent incompatibility between the grid-shaped CNN feature map and the irregular-shaped perceptual grouping hierarchy. Overcoming these challenges, we propose a deep grouping model (DGM) that tightly marries the two types of representations and defines a bottom-up and a top-down process for feature exchanging. When evaluating the model on the recent Broden+ dataset for the unified perceptual parsing task, it achieves state-of-the-art results while having a small computational overhead compared to other contextual-based segmentation models. Furthermore, the DGM has better interpretability compared with modern CNN methods. + +# 1. Introduction + +Deep CNN methods have achieved substantial performance improvement compared with non-CNN methods in the field of semantic segmentation [29, 5]. Many of them can achieve even better performance by incorporating good practices that have long been discovered in non-CNN methods, e.g., multiscale features [59, 48, 44] and contextual information [57, 55, 19, 16, 58]. However, recent works still have some key limitations. First, many CNN-based methods are solely driven by the cross-entropy loss computed against ground-truth pixel labels, lacking an explicit modeling of the perceptual grouping process, which is an integral part in the human visual system [4]. Second, most modelings are still focusing on regular-shaped feature maps, which creates not only significant overhead in a multi-scale representation when considering feature-to-feature attention but also is sub + +![](images/e1a637e7e05b86d1571ad737c7e755dc165ed9ec19f28e7898c6c40f3853a6b9.jpg) +Unified Perceptual Parsing Task: + +![](images/09a4e9dd69ad94e6b3ccc5c4b05e1fc3f34ffd9b3f2ca5a270a5893da862f7e4.jpg) +Figure 1: Perceptual grouping process. From fine to coarse: neighboring pixels form a part; parts group into an object; and objects combine into a contextual region. The DGM aims to marry a CNN with the grouping hierarchy for unified perceptual parsing of images. The grouping hierarchy is dynamically computed based on the CNN features, and the CNN features are enhanced by the grouping cues from the graph hierarchy. The model is applied to unified perceptual parsing task to show superiority of DGM. + +optimal for modeling irregular-shaped semantic regions on the image. + +To overcome these limitations, we revisit the classical perceptual grouping methods, e.g., superpixel segmentation [37, 13, 31, 35] and image parsing [41, 38, 53], which were extensively studied before the predominance of CNNs in segmentation. The seminal work by Tu et al. [41] represents an image as a hierarchical graph, a.k.a. parsing graph. In their depicted example, an image of a football match scene is first decomposed into three elements: person, sports field, and spectator, then these elements are further decomposed, e.g., the person consists of face and body texture. Such a graph is both compositional (e.g., lower-level semantics induce grouping cues for higher-level semantics) + +and decompositional (e.g., higher-level semantics provide feature support for lower-level semantics), and it varies upon the input image. In this work, we explore whether it is beneficial to inject such a perceptual grouping process explicitly in modern CNN frameworks for a unified image parsing of the scene (see Fig. 1 for an example). + +Three challenges arise when incorporating the perceptual grouping process as a hierarchical graph in a deep CNN. First, there is feature incompatibility between the grid-shaped CNN feature maps and irregular-shaped graph nodes, not to mention how to benefit one from the other. Second, it is unclear how to dynamically grow the grouping hierarchy based on different levels of feature semantics extracted from the image. Although superpixel segmentation map provides a plausible initial grouping based on low-level textural and edge cues, high-level semantics of larger receptive fields are needed when growing parts into objects. Third, a holistic understanding of the scene is required when considering the unified pperceptual parsing task. For example, knowing the scene-level kitchen label helps clarify countertop against desk. It is easy to do in a CNN but difficult in a parsing graph hierarchy. + +To tackle the challenges as mentioned above, we propose a novel Deep Grouping Model (DGM), which contains a few modules that are general enough to adapt to many CNNs. The Expectation-Maximization Graph Pooling (EMGP) module and Projection module transform multi-resolution feature maps into a multi-level graph by grouping different regions on the feature map in a bottom-up fashion (i.e., from high-to low-resolution). They have several advantages. Since the model groups pixels and regions iteratively, the number of nodes in the graph is far smaller than the number of pixels on a feature map, which reduces computational overhead. The relationship between different levels of the hierarchy are learned during grouping, rather than assuming a uniform distribution such as in bilinear interpolation or adaptive average pooling on a grid feature map [48, 59]. Furthermore, the contextual information at one level of hierarchy can be quantified via edge weights in a graph, which is sparser than fully-connected non-local block [45, 55], leading to a lower overhead. + +We put forward a Top-down Message Passing (TDMP) module, which propagates contextual information from the top-level graph to the bottom level graph by utilizing grouping results from EMGP. In this way, higher level context can be propagated adaptively to the corresponding irregular-shaped regions. For instance, object context features (e.g., human) at higher-level graph will be propagated to its corresponding parts (e.g., arms, legs, torso, etc.) at lower-level graph. Similarly, global scene context can also be propagated down to lower-level graph containing objects. Our proposed TDMP module is especially useful in the multi-task settings, where lower-level features enhanced by high-level seman + +tics are able to produce better results. At the end, we use Re-projection module to re-project features from the hierarchical graph back to multi-resolution grid feature maps, which are used for down-stream tasks. + +In order to prove the effectiveness of the proposed model, we apply our model on unified perceptual parsing task, a challenging task to recognize diverse perceptual concepts, including object (or stuff) segmentation, parts segmentation, scene classification, material segmentation, and texture prediction. We use the recent Broden+ dataset [2], a large-scale dataset combining five different datasets with heterogeneous task labels, that is designed for the unified perceptual parsing task. Our method is trained in a multi-task learning fashion, and we evaluate our model on each subtask. Results show that our method achieves the state-of-the-art on Broden+ dataset in every subtask. + +Furthermore, the proposed DGM provides better interpretability thanks to the hierarchical graph representation. By using the grouping result, DGM can be applied to other two applications: 1) click propagation, 2) explainability with Grad-CAM, which are the building blocks in recent works on interactive segmentation [52, 30] and weakly-supervised segmentation [47, 46, 24]. + +# 2. Related Work + +Grouping-based Method. Grouping-based segmentation method is extensively utilized before the deep learning methods. Ren et al. [37] propose grouping pixels into superpixels using Gestalt cues. Hierarchical grouping methods [1, 35, 42, 49, 50, 51] are also proposed for both image segmentation and video segmentation tasks. More recently, some deep learning methods start using grouping in the segmentation task. Gadde et al. [17] use superpixels to upsample CNN's low resolution prediction to the original image size. [40, 23] use deep feature rather than traditional low-level cues to predict superpixel map. Two works are closely related to our work. [21] puts forward local relation layer to model pixel-pair affinity in a predefined $7 \times 7$ square neighborhood, while our proposed model considers the neighborhood adaptively in an irregular-shaped region. Liang et al. [27] propose structure-envolving LSTM where Graph LSTM [28] is used for updating node features. In their work, only one pair of nodes is merged each time when a coarser graph is generated. Compared with [27], our model groups nodes more quickly thus reduces computational overhead. Farabet et al. [12] use multi-scale convolutional feature and conditional random field to regulate the probability of each pixel in segmentation prediction. In contrast, our work learns both grouping hierarchy and top-down message passing at feature level in a end-to-end fashion. + +Graph Neural Network. Some recent works employ Graph Neural Network on segmentation task. Liang et al. [26] map feature maps to a concept tree to enable concept reason- + +![](images/f5107b3f6360290df9cffd36d166324f7feda23cf4143d0a57f86ba8a5a376d6.jpg) + +![](images/36144a5e8838352d7098af6cef0cc7709aec16018be0b1871293c7b05a7571dc.jpg) +(a) Expectation-maximization Graph Pooling +Figure 2: An overview of the proposed Deep Grouping Model (DGM). + +![](images/72c76f098d3d2f24305c82d8aef957df7e4f027db068d154d7d9dae28dd61323.jpg) +(b) Projection + +![](images/590dadaf194199ae5bedfb97711240d019f63d8b49f3bfe64c45994b14d7f56a.jpg) +(c) Top-down Message Passing + +![](images/fd50b92a7964499272dfbc46f934bc04afae9741c77c43ac4e5be9ab9d6c82a6.jpg) +(d) Re-projection + +ing. Other works [25, 8] project feature map to graph via linear transformation with learned anchor vectors or convolutional weights, which may be successful in classifying single pixel's semantic meaning but does not consider similarity between pairs of pixels to group them into a region. Ying et al. [54] propose a differentiable pooling method through predicting pooling weights by GraphSAGE [18], but the method does not consider pairwise similarity between graph nodes and the number of clusters is also fixed. In comparison, our model considers pairwise affinity among nodes and supports a dynamic number of clustering centers. + +Contextual Modeling. Given the success of self-attention mechanism in many recognition tasks [45], recent work introduces self-attention module in the semantic segmentation field from different perspectives. Yuan et al. [55] propose object context pooling module. Fu et al. [15] apply attention mechanism on both position and channel. The aforementioned non-local based context modeling method creates large overhead since similarity between each pair of grid needs to be computed on the feature map. He et al. [19] introduces adaptive context module to model the affinity between region feature and pixel feature, where the region feature is computed from average pooling on square patch. In comparison with non-local based method and adaptive context module, our method models the context between nodes at different levels of the graph hierarchy, which not only leads to lower overhead but also allow contextual information flow to irregular-shaped regions. + +# 3. Deep Grouping Model (DGM) + +The proposed DGM represents an image as a hierarchical graph (see Fig. 2). The $L$ -level multiscale feature maps $\{\mathcal{F}^l \mid l = 1, \dots, L\}$ are extracted from different layers' output of a CNN, where $\mathcal{F}^1$ has a large resolution with more low-level details and $\mathcal{F}^L$ is in the lowest resolution containing more high-level semantics [56]. Correspondingly, we denote graph feature at the $l$ -th level as $\mathcal{G}^l = \langle \mathbf{V}^l, \mathbf{E}^l \rangle$ , where $\mathbf{V}^l$ and $\mathbf{E}^l$ denote vertex features and adjacency matrix, respectively. First, we initialize the bottom level graph $\mathcal{G}^1 = \langle \mathbf{V}^1, \mathbf{E}^1 \rangle$ from pre-computed superpixel $S$ and bottom level grid feature map $\mathcal{F}^1$ . Concretely, vertex features come from superpixel pooling, i.e., each node takes the mean of the features in the corresponding superpixel region of the feature map (formal definition can be seen in supplementary material). Unweighted adjacency matrix $\mathbf{E}^1$ is defined from the region adjacency graph of the superpixel $S$ [39], which is much sparser compared with fully-connected non-local operation [45, 55]. Notice that only $\mathbf{E}^1$ is unweighted adjacency matrix, while upper-level adjacency matrices $\mathbf{E}^l (l > 1)$ are weighted adjacency matrices (more details in Sec. 3.1). + +Bottom-up process. The bottom-up process is aiming at transforming multi-resolution grid feature maps $\{\mathcal{F}^l\mid l = 1,\dots ,L\}$ to hierarchical graph representation $\{\mathcal{G}^l\mid l = 1,\dots ,L\}$ (see Fig.2), where $\mathcal{G}^l$ not only dynamically com-. poses information from lower level graph $\mathcal{G}^{l - 1}$ (Fig. 2(a)), but also receives high-level semantics from feature map + +$\mathcal{F}^l$ (Fig. 2(b)). To this end, the proposed Expectation-Maximization Graph Pooling (EMGP) module and Projection module do the aforementioned jobs, respectively. + +Top-down process. From another perspective, high-level semantics can also help low-level representation. To this end, Top-down Message Passing (TDMP) module propagates messages from the top-level graph to the bottom-level graph (Fig. 2(c)). + +Finally, in order to make DGM compatible with modern CNN framework, we use a Re-projection module to transform hierarchical graph $\{\mathcal{G}^l\}$ back to multi-level grid-shape feature map $\{\hat{\mathcal{F}}^l \mid l = 1, \dots, L\}$ (Fig. 2(d)), which will be used in down-stream tasks. + +# 3.1. Bottom-up Graph Hierarchy Construction + +The bottom-up process transforms $\{\mathcal{F}^l\}$ to multi-level graph features $\{\mathcal{G}^l = \langle \mathbf{V}^l,\mathbf{E}^l\rangle \mid l = 1,\dots ,L\}$ from the bottom level to the top level (i.e., $l$ is in an increasing order when constructing the graph hierarchy). Concretely, in order to construct $\mathcal{G}^{l + 1}$ from $\mathcal{G}^l$ , the modules EMGP and Projection run successively. + +Expectation-Maximization Graph Pooling (EMGP). The goal of EMGP is to pool graph $\mathcal{G}^l$ to $\mathcal{G}^{l + 1}$ with less number of nodes, i.e., $|\mathbf{V}^{l + 1}| < |\mathbf{V}^l|$ (see Fig. 2(a)). Following the EM framework [10], we initialize $\bar{\mathbf{V}}^{l + 1}$ with uniformly sampled vertices from $\mathbf{V}^l$ , then update pooled graph vertex features $\bar{\mathbf{V}}^{l + 1}$ in $K$ iterations: + +$$ +\mathbf {P} _ {i j} ^ {l} = \frac {1}{\mathbf {Z} _ {j} ^ {l}} \exp \left(- \frac {\left| \left| \mathbf {V} _ {i} ^ {l} - \bar {\mathbf {V}} _ {j} ^ {l + 1} \right| \right| ^ {2}}{\sigma^ {2}}\right), \tag {1} +$$ + +$$ +\bar {\mathbf {V}} ^ {l + 1} = \left(\mathbf {P} ^ {l}\right) ^ {\intercal} \mathbf {V} ^ {l}, \tag {2} +$$ + +where $\mathbf{P}^l\in \mathbb{R}^{|\mathbf{V}^l |\times |\bar{\mathbf{V}}^{l + 1}|}$ computes the affinity of vertices between the levels $l$ and $l + 1$ via a Gaussian kernel with bandwidth $\sigma$ and $\mathbf{Z}^l\in \mathbb{R}^{|\bar{\mathbf{V}}^{l + 1}|}$ is a normalization term: + +$$ +\mathbf {Z} _ {j} ^ {l} = \sum_ {i} ^ {| \mathbf {V} ^ {l} |} \exp \left(- \frac {\left| \left| \mathbf {V} _ {i} ^ {l} - \bar {\mathbf {V}} _ {j} ^ {l + 1} \right| \right| ^ {2}}{\sigma^ {2}}\right). \tag {3} +$$ + +After $K$ -iteration updates of vertex features, following Ying et al. [54], the adjacency matrix of higher level graph $\mathbf{E}^{l + 1}$ can be computed by: + +$$ +\mathbf {E} ^ {l + 1} = \left(\mathbf {P} ^ {l}\right) ^ {\intercal} \mathbf {E} ^ {l} \mathbf {P} ^ {l}. \tag {4} +$$ + +Notice that our method is different from the "differentiable pooling" method proposed in [54]. Instead of predicting pooling weights $\mathbf{P}^l$ through a stack of graph convolutional layers, our method uses EM to make the prediction. Therefore, our method not only considers similarity between each + +pair of nodes, but also can change $|\mathbf{V}^{l + 1}|$ dynamically according to the content of the image. For example, an image of a simple scene with small number of objects or uniform textual, e.g., the sky, can be represented by a small $|\mathbf{V}^{l + 1}|$ in the graph. + +Projection. Although the pooled node features $\bar{\mathbf{V}}^{l + 1}$ summarize the lower level graph through a linear combination of the lower level graph nodes $\mathbf{V}^l$ , they do not necessarily contain higher level semantics. To incorporate higher level semantics, the Projection module projects the feature map $\mathcal{F}^{l + 1}$ to pooled node features $\bar{\mathbf{V}}^{l + 1}$ , outputting node feature $\mathbf{V}^{l + 1}$ . + +A straightforward design could be constructing a bipartite graph between $\mathcal{F}^{l + 1}$ and $\bar{\mathbf{V}}^{l + 1}$ and use graph convolution to propagate high-level semantics, where pixels on the feature map $\mathcal{F}^{l + 1}$ are treated as nodes and directed edges are pointing from $\mathcal{F}^{l + 1}$ to $\bar{\mathbf{V}}^{l + 1}$ . However, such design not only creates large overhead due to large number of pixels on the feature map, but also the edge weights of the bipartite graph is undefined. Therefore, we define auxiliary nodes $\mathbf{U}^{l + 1}$ , obtained from superpixel pooling on feature map $\mathcal{F}^{l + 1}$ by the bottom-level superpixel map $S$ , to address the aforementioned problems. Since both $\mathbf{U}^{l + 1}$ and $\mathbf{V}^1$ are computed from the same superpixel map $S$ , $\mathbf{U}^{l + 1}$ has the same number of vertices as $\mathbf{V}^1$ , i.e., $|\mathbf{U}^{l + 1}| = |\mathbf{V}^1|$ . However, $\mathbf{U}^{l + 1}$ contains high-level semantics as it is pooled from the feature map $\mathcal{F}^{l + 1}$ . + +A quasi-bipartite graph from $\mathbf{U}^{l + 1}$ to $\bar{\mathbf{V}}^{l + 1}$ can be constructed. Since $\mathbf{U}^{l + 1}$ can also be hierarchically grouped to $\mathbf{V}^{l + 1}$ as how $\mathbf{V}^1$ are merged to $\mathbf{V}^{l + 1}$ , we reuse $\{\mathbf{P}^l\}$ predicted by EMGP to construct the adjacency matrix of the quasi-bipartite directed graph. Concretely, we compute the cumulative product $\prod_{k = 1}^{l}\mathbf{P}^{k}\in \mathbb{R}^{|\mathbf{V}^{1}|\times |\mathbf{V}^{l + 1}|}$ , which can be regarded as graph pooling weights that directly pool $\mathbf{V}^1$ (or the auxiliary nodes $\mathbf{U}^{l + 1}$ ) to $\mathbf{V}^{l + 1}$ . To enable vertices $\bar{\mathbf{V}}^{l + 1}$ retain the information through EMGP, self-loops are added to $\bar{\mathbf{V}}^{l + 1}$ , resulting in the final adjacency matrix $\mathbf{I} + \prod_{k = 1}^{l}\mathbf{P}^{k}$ of the bipartite graph. Therefore, the bipartite graph is formally defined as $(\mathbf{U}^{l + 1},\bar{\mathbf{V}}^{l + 1},\mathbf{I} + \prod_{k = 1}^{l}\mathbf{P}^{k})$ , where directed edges are pointing from $\mathbf{U}^{l + 1}$ to $\bar{\mathbf{V}}^{l + 1}$ . + +Next, we use graph convolution to allow message passing from $\mathbf{U}^{l + 1}$ to $\mathbf{V}^{l + 1}$ : + +$$ +\mathbf {V} ^ {l + 1} = G C o n v \left(\mathbf {U} ^ {l + 1} \cup \bar {\mathbf {V}} ^ {l + 1}, \mathbf {I} + \prod_ {k = 1} ^ {l} \mathbf {P} ^ {k}\right), \tag {5} +$$ + +where $GConv$ stands for graph convolution. Following the mean aggregator proposed in GraphSAGE [18], we use weighted average aggregator GraphSAGE as the graph convolution layer: + +$$ +\mathbf {h} _ {v} = \sigma (\mathbf {W} \cdot \sum_ {u \in \mathcal {N} (v)} \mathbf {w} (u, v) \cdot \mathbf {h} _ {u}), \tag {6} +$$ + +where $\mathbf{h}_v$ stands for the feature of vertex $v$ , $\sigma$ is the sigmoid function, $\mathbf{W}$ is a learnable weight matrix, and $\mathcal{N}(v)$ defines the neighboring nodes of vertex $v$ . Here, $\mathbf{w}(u,v)$ is the weight of the directed edge from $u$ to $v$ , which can be found in the given adjacency matrix (i.e., $\mathbf{I} + \prod_{k=1}^{l} \mathbf{P}^k$ as in Eq. 5). Thus, the updated graph node features $\mathbf{V}^{l+1}$ contain features of both high-level semantics $\mathcal{F}^{l+1}$ and the feature summarization from its lower level graph $\mathcal{G}^l$ . + +Global Vector. After the construction of $\mathcal{G}^L$ , we obtain the global vector representation $\mathbf{R}$ (see the top node in Fig. 2) of the scene by: + +$$ +\mathbf {R} = \operatorname {R E A D O U T} \left(\mathbf {V} ^ {L}\right), \tag {7} +$$ + +where $\text{READOUT}$ function is used for combining features of a graph in many GNN methods [54, 43]. Here we use average pooling as the $\text{READOUT}$ function. In other words, $\mathbf{R} = \frac{1}{|\mathbf{V}^L|}\sum_i^{|\mathbf{V}^L|}\mathbf{V}_i^L$ . $\mathbf{R}$ can also be regarded as a graph at level $L + 1$ without edges, i.e., $\mathbf{R} = \mathcal{G}^{L + 1} = \langle \mathbf{V}^{L + 1},\emptyset \rangle$ . Since $\mathbf{R}$ is a vector representation of the image, it can be supervised by image classification tasks, e.g., a scene category label for the image. + +# 3.2. Top-down Message Passing (TDMP) + +To further enable high-level semantics to help low-level features, the $TDMP$ module iteratively updates each level of graph features from the top-level graph $\mathbf{R} = \mathcal{G}^{L + 1}$ to the bottom level graph $\mathcal{G}^1$ through message passing, outputting updated multi-level graph features. It serves much like the "decomposition" process as motivated in Introduction. + +Concretely, given $\mathbf{V}^{l + 1}$ (already updated) and $\mathbf{V}^l$ (to be updated), a quasi-bipartite graph is constructed (see Fig. 2(c)), where directed edges are pointing from $\mathbf{V}^{l + 1}$ to $\mathbf{V}^l$ . Intuitively, high-level semantics should be transmitted to their corresponding lower-level regions. For example, the whole human body feature at the $(l + 1)$ -th level should be sent to human parts (e.g., arms, legs) at the $l$ -th level. Thus, by reusing the grouping results in the bottom-up process, edges $\tilde{\mathbf{P}}^l\in \mathbb{R}^{|\mathbf{V}^l|\times |\mathbf{V}^{l + 1}|}$ can be obtained by: + +$$ +\tilde {\mathbf {P}} _ {i j} ^ {l} = \frac {1}{\tilde {\mathbf {Z}} _ {i} ^ {l}} \exp \left(- \frac {| | \mathbf {V} _ {i} ^ {l} - \mathbf {V} _ {j} ^ {l + 1} | | ^ {2}}{\sigma^ {2}}\right), \tag {8} +$$ + +where $\tilde{\mathbf{Z}}^l\in \mathbb{R}^{| \tilde{\mathbf{V}}^l |}$ is a normalization term: + +$$ +\tilde {\mathbf {Z}} _ {i} ^ {l} = \sum_ {j} ^ {| \mathbf {V} ^ {l + 1} |} \exp \left(- \frac {| | \mathbf {V} _ {i} ^ {l} - \mathbf {V} _ {j} ^ {l + 1} | | ^ {2}}{\sigma^ {2}}\right). \tag {9} +$$ + +After adding self-loops to $\mathbf{V}^l$ , a graph convolution layer is applied to achieve the top-down message passing: + +$$ +\mathbf {V} ^ {l} := G C o n v \left(\mathbf {V} ^ {l + 1} \cup \mathbf {V} ^ {l}, \mathbf {I} + \tilde {\mathbf {P}} ^ {l}\right), \tag {10} +$$ + +![](images/5008a1beb25fbb297d12c9d016e652e71df640724cc1ca13b5038a0d5348efed.jpg) +Figure 3: Full Model for the Unified Perceptual Parsing Task. + +where $\mathbf{V}^l$ is the updated vertex feature at the $l$ th level and $GConv$ is defined the same as in Eq. 6. + +# 3.3. Re-projection from Graph to Grid Features + +Finally, we re-project the updated vertex features $\{\mathbf{V}^l\}$ back to the grid features resulting in $\{\hat{\mathcal{F}}^l\}$ . The re-projection can be regarded as a mirror module of projection. Analogous to the projection module, at each level $l$ , a quasi-bipartite directed graph $\left(\mathbf{V}^l,\mathbf{U}^l,\mathbf{I} + \prod_{k = 1}^l\tilde{\mathbf{P}}^k\right)$ (see Fig. 2(d)) is built from superpixel pooling features $\mathbf{U}^l$ , updated vertex features $\mathbf{V}^l$ , and the adjacency matrix that comes from the self-loops of $\mathbf{U}^l$ and the cumulative product $\prod_{k = 1}^{l}\tilde{\mathbf{P}}^{k}$ . Here, edges are pointing from $\mathbf{V}^l$ to $\mathbf{U}^l$ . Then, we apply graph convolution to re-project the features: + +$$ +\hat {\mathbf {U}} ^ {l} = G C o n v \left(\mathbf {V} ^ {l} \cup \mathbf {U} ^ {l}, \mathbf {I} + \prod_ {k = 1} ^ {l} \tilde {\mathbf {P}} ^ {k}\right), \tag {11} +$$ + +where $\hat{\mathbf{U}}^l$ is the vertex feature receiving information from the graph and has the same number of superpixels defined in superpixel map $S$ . Lastly, $\hat{\mathbf{U}}^l$ is copied to pixel regions defined by the superpixel map $S$ , outputting the updated grid feature map $\hat{\mathcal{F}}^l$ . + +# 4. Unified Perceptual Parsing with DGM + +To fully verify the effectiveness of the hierarchical graph representation, we apply deep grouping model (DGM) on the unified perceptual parsing (UPP) task, a challenging task introduced by Xiao et al. [48]. Aiming at recognizing heterogeneous perceptual concepts of an image, UPP combines tasks of scene classification, object segmentation, parts segmentation, material segmentation, and texture recognition, requiring good modeling on features at different granularities. + +To this end, we insert DGM to a backbone model (see Fig. 3), which outputs $\{\hat{\mathcal{F}}^l\mid l = 1,\ldots ,L\}$ . With the residual connection [20] from $\{\mathcal{F}^l\mid l = 1\dots L\}$ , we obtain multi-resolution grid feature maps $\{\mathcal{F}^l +\hat{\mathcal{F}}^l\mid l = 1,\dots ,L\}$ . Fol + +lowing the architecture proposed by Xiao et al. [48], after bilinear interpolating all feature maps to the same size, we concatenate all $L$ levels of grid features $\{\mathcal{F}^l +\hat{\mathcal{F}}^l |l = 1,\dots ,L\}$ for object segmentation and part segmentation. In material segmentation, we only use the bottom-level grid feature $\mathcal{F}^1 +\hat{\mathcal{F}}^1$ for prediction by following the architecture of UPerNet [48]. + +For scene classification, we first apply global average pooling on the original top-level feature map $\mathcal{F}^L$ (not shown in the figure). Then, it is residual connected with the graph READOUT feature $\mathbf{R}$ for scene classification. + +Limited by the dataset in UPP task [2], only texture images with image-level labels are provided. Therefore, for texture recognition, the model classifies texture images with the feature come from global average pooling on the bottom grid features $\mathcal{F}^1 +\hat{\mathcal{F}}^1$ in training and quantitative evaluation. However, we can also apply the texture classification layer on each pixel to generate texture segmentation results on natural images. + +To summarize, the final loss of the full model on the unified perceptual parsing task is defined by: + +$$ +\mathcal {L} = \lambda_ {s} \mathcal {L} _ {s} + \lambda_ {t} \mathcal {L} _ {t} + \lambda_ {o} \mathcal {L} _ {o} + \lambda_ {p} \mathcal {L} _ {p} + \lambda_ {m} \mathcal {L} _ {m}, \tag {12} +$$ + +where $\mathcal{L}_s$ and $\mathcal{L}_t$ are cross-entropy losses between prediction and image labels for scene classification and texture classification, respectively. $\mathcal{L}_o$ , $\mathcal{L}_p$ , $\mathcal{L}_m$ are cross-entropy losses at each pixel between the prediction and ground-truth for object segmentation, part segmentation, and material segmentation, respectively. Following [48], coefficients of each loss term are $\lambda_s = 0.25$ , $\lambda_t = 1$ , $\lambda_o = 1$ , $\lambda_p = 0.5$ , $\lambda_m = 1$ . + +# 5. Experiments + +# 5.1. Dataset and Evaluation Metrics + +The Broden+ dataset [2] is used for training and evaluation on the unified perceptual parsing task [48]. The dataset is comprised of five large datasets: ADE20k [60], PASCAL Context [32], PASCAL-Part [7], OpenSurfaces [3], and DTD [9] datasets. For each subtask in unified perceptual parsing, the data source comes from the union of the datasets that contain subtask's labels. For example, object/stuff segmentation task will be trained on and evaluated on the union of ADE20k and PASCAL-Context datasets. In this way, not only the number of tasks is large, but also the number of categories is larger since datasets are merged together, which makes the unified perceptual parsing task extremely challenging. In terms of evaluation metrics, the scene classification task and texture classification task are evaluated via top-1 accuracy (Top-1 Acc.). The object/stuff segmentation, parts segmentation and material segmentation are evaluated by mIoU and pixel accuracy (P.A.). + +![](images/99f0ec8be9fbc2ef6ab6f2974dafafdad0adad4616d307216d21c4b2e7741720.jpg) +Figure 4: Qualitative comparison on Broden+ Dataset. + +# 5.2. Implementation Details + +We follow the experimental settings in [48]. During training, we resize the image's shorter side to a size that is randomly chosen from 300, 375, 450, 525, 600 and keep its aspect ratio. The shorter side of the image is resized to 450 pixels in the evaluation stage. Following [5], we use "poly" learning rate policy $(1 - \frac{iter}{max\_iter}^{power})$ to adjust learning rate during training, and the initial learning rate is 0.02, where max\_iter = 2 × 10^5 and power = 0.9. The batch size is 8, and the model is trained on 4 GPUs. + +MCG [35, 1] is used for extracting superpixels for training DGM, which is further merged greedily to make sure that the number of superpixel is at most 512. In terms of the DGM architecture, the input multi-resolution feature map $\mathcal{F}^l$ comes from $C_1$ to $C_4$ layers' output from ResNet [20]. Accordingly, we set the level of graph $L = 4$ in our experiment. All GraphSAGE [18] layers in DGM are followed by $L_2$ normalization and ReLU [33]. The EMGP module pools the graph to half the number of nodes in upper-level graph (i.e., $|\bar{\mathbf{V}}^{l + 1}| = |\mathbf{V}^l | / 2$ ). The number of iteration $K$ in EMGP is set as 5 in training and 10 in evaluation. + +Our code is based on the PyTorch framework [34]. Specifically, the PyTorch Geometric [14] is used to implement graph operations in DGM. Following UPerNet [48], in the experiment on Broden+ dataset, all tasks except the texture classification task are trained jointly. When training the texture classification task, the model's parameters are fixed except the texture classification branch. + +# 5.3. Comparison with the State-of-the-art + +Results of all tasks in the unified perceptual parsing (UPP) task are shown in Tab. 1. Since the dataset is fairly recent and only UPerNet [48] reports its results, we replicate OCNet [55] and APCNet [19]'s results1 on the Broden+ dataset, as they represent state-of-the-art contextual modeling methods based on non-local block and region-based context mod + +
TasksMethodObjectPartSceneMaterialTexture
mIoUP.A.mIoUP.A.Top-1 Acc.mIoUP.A.Top-1 Acc.
O+P+SAPCNet21.2571.7123.3941.0768.50---
OCNet22.6274.5828.5148.9268.50---
UPerNet23.8377.2330.1048.3471.35---
\(DGM\ w/o \)↓24.5874.7631.2351.1771.24---
\(DGM\)24.7675.1531.2650.5571.87---
O+P+S+M+TAPCNet20.3771.0122.3240.0868.4543.8879.9550.35
OCNet20.2177.0925.7543.7866.9248.2080.7051.95
UPerNet23.3677.0928.7546.9270.8754.1984.4557.44*
\(DGM\ w/o \)↓24.0574.2129.9449.4970.2454.5284.4158.15
\(DGM\)24.3774.9930.2849.7071.0354.5884.6260.10
+ +Table 1: Comparing with state-of-the-art methods on Broden+ dataset. $\mathrm{O + P + S}$ means object segmentation task, part segmentation task, and scene classification task are used in training and evaluation. $\mathrm{O + P + S + M + T}$ incrementally add material segmentation task and texture classification task in training and evaluation stages. *Based on the authors' released model, we continue to train UPerNet and get better results on texture classification than the reported number (35.10) in [48]. + +
MethodmIoUPixel Accuracy
UPerNet42.6681.01
+DGM w/o ↓43.6481.11
+DGM43.5181.13
HRNetv243.2081.47
+DGM w/o ↓43.8681.55
+DGM43.4681.53
DeepLabV344.181.1
+DGM w/o ↓44.3181.36
+DGM44.8681.35
CCNet [22]45.22-
APCNet [19]45.38-
OCNet [55]45.45-
+ +Table 2: Results on ADE20k validation set. + +eling in semantic segmentation, respectively. The backbone of UPerNet, OCNet and our proposed DGM is ResNet50, and APCNet's backbone is the dilated ResNet50 [48, 19, 55]. Backbones' weights are initialized with ImageNet [11] pretrained models. More results comparing with GCU [25] and HRNetv2 [44] backbone are included in Appendix. + +Results show that our model (DGM in Tab. 1) outperforms all other methods, achieving the state-of-the-art result on Broden+ in every subtask. Although DGM did not achieve the best performance in terms of pixel accuracy on the object segmentation subtask, we suspect that the pixel accuracy measure is easily biased by the imbalanced number of pixels among different classes, while mIoU is a better and more meaningful evaluation metric for segmentation. + +In the qualitative evaluation, our model can achieve more reasonable results. For example, in Fig. 4, compared with other methods, our model successfully segments both cabinet (in green) and toilet (in pink) in object segmentation. Our model's parts segmentation has smaller false prediction on the toilet. Finally, on the material segmentation, our model + +![](images/93414196ed868021d9b7116af5178ab5a37088cdf535449d8aa3f41663806102.jpg) +Figure 5: Visualization of perceptual groupings generated by DGM. A color represents a graph vertex. Note that the same color between different levels are not related. + +shows sharp boundary on the legs of wood chair. + +# 5.4. Ablation Study + +Single-task training. To ablate the effect of multi-task training, we train our model on ADE20k only focusing on the semantic segmentation task. We use three backbone models to train and evaluate our model: UPerNet, HRNetv2 [44], and DeepLabV3 [6]. Our DGM is general enough to be an add-on module for many segmentation networks. More details of how DGM is added will be illustrated in the supplementary material. Results in Tab. 2 (see +DGM) show that DGM can increase the performance for every backbone model. Admittedly, OCNet and APCNet show better performance on ADE20k. Our model serves a better role in the more challenging unified perceptual parsing where a joint representation for multiple tasks is needed. + +Top-down message passing. To evaluate the role of $TDMP$ , we evaluate DGM model without $TDMP$ (denoted as $\mathbf{DGM}$ w/o $\downarrow$ ). In the Broden+ dataset, DGM w/o $\downarrow$ shows weaker performance compared with the full model, proving the effectiveness of context modeling of $TDMP$ . In the single- + +
ModelFLOPs (Δ)#Params (Δ)
OCP161.4G15.179M
RCCA(R=2)16.5G23.931M
DGM w/o↓9.3G3.417M
DGM10.8G4.468M
+ +Table 3: Compare overhead of contextual modules. + +task ADE20k, DGM w/o $\downarrow$ performs weaker on DeepLabV3 backbone and achieves even better performance than the full model when UPerNet and HRNetv2 are the backbones. We suspect that the top-down message passing may not provide valuable information to lower-level graph features when only one task is trained and evaluated. In comparison, TDMP helps lower-level graph features for better prediction on part segmentation and material segmentation (see Tab. 1). + +# 5.5. Grouping Visualization + +To verify the quality of perceptual grouping, the grouping results are visualized in Fig. 5. Details of grouping visualization will be illustrated in the supplementary material. As shown in Fig. 5, DGM gradually merges conceptually-related regions as it goes to higher levels in the hierarchy. For example, in the second row, sofa gradually merges with tables to the main area in the living room. + +# 5.6. Overhead + +We compare the overhead with other contextual modeling methods: recurrent criss-cross attention (RCCA) module proposed in CCNet [22] and object context pooling module (OCP) in OCNet [55]. For a fair comparison, the size of the input images to all methods is $769 \times 769$ . In Tab. 3, we show the difference of FLOPs and the number of parameters before and after adding the contextual modeling module to the network. For our proposed DGM model, we use ResNet50 [48] as the backbone when evaluating the overhead. The results show that our model has significantly lower overhead compared with non-local base OCP module. Note that RCCA is the state-of-art method targeting at reducing overhead in contextual modeling. Our method beats RCCA module of CCNet. In Tab. 3, we also show the overhead of our method without using TDMP (DGM w/o $\downarrow$ ). The result shows that TDMP only creates little overhead. + +# 6. Applications + +We further show that DGM enables novel applications due to the added interpretability of the perceptual grouping process, which is difficult to achieve by using other segmentation networks. + +Click Propagation. In interactive segmentation, a user adds positive click on the object and negative click on the background, which are used to segment the selected instance on the image. One critical process of recent interactive seg + +![](images/8c5d6a532a0de151088c27d91de8f5377a50a2a8950c761390efb2e787d13af8.jpg) + +![](images/bccd4a31b1593be273e333214f7206af2b7106aefa23303d089ef6b0a0baf1cc.jpg) +Figure 6: Visualization of click propagation. Bottom-right is negative click while others are all positive clicks. +Figure 7: Visualization of Grad-CAM. Red-to-blue denotes the decreasing activation. Scene labels are shown. + +mentation methods [30, 52] is augmenting user's click by propagating it to other related areas on the image. Since our model produces a compositional-hierarchical graph, related areas can be dynamically computed through the learning process, rather than treating it as a pre-processing step. As shown in Fig. 6, given a user's click, our model first selects a superpixel. Then, it can propagate to higher levels by using the $\mathbf{P}^l$ defined in Eq. 1. For example, positive click is propagated to the entire shower kit in Fig. 6 top-left, and negative click will not be propagated to the bathtub in Fig. 6 bottom-right. More details are in the supplementary material. + +Explainability with Grad-CAM. We use Grad-CAM on graph [36] to localize activated vertices at each level of the hierarchy (more details in supplementary material). By using the gradient back-propagated from the ground-truth scene label, our model localizes semantically discriminative regions on the image. For example, the bed is highlighted with sharp boundary in Fig. 7 bedroom. + +# 7. Conclusion + +We propose Deep Grouping Model to marry a CNN segmentation network with the perceptual grouping process, which outperforms state-of-the-art methods on unified perceptual parsing task with little overhead. Meanwhile, our proposed model is of good interpretability and is useful in other tasks. We believe such hierarchical graph representation is of great potential to be applied to many other tasks. + +Acknowledgments. This work was supported in part by NSF 1741472, 1764415, 1813709, and 1909912. The article solely reflects the opinions and conclusions of its authors but not the funding agents. + +# References + +[1] Pablo Arbelaez, Jordi Pont-Tuset, Jonathan T. Barron, Ferran Marques, and Jitendra Malik. Multiscale combinatorial grouping. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2014. 2, 6 +[2] David Bau, Bolei Zhou, Aditya Khosla, Aude Oliva, and Antonio Torralba. Network dissection: Quantifying interpretability of deep visual representations. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. 2, 6 +[3] Sean Bell, Paul Upchurch, Noah Snavely, and Kavita Bala. Opensurfaces: A richly annotated catalog of surface appearance. ACM Trans. Graph., 32(4):111:1-111:17, July 2013. 6 +[4] Timothy F Brady, Anna Shafer-Skelton, and George A Alvarez. Global ensemble texture representations are critical to rapid scene perception. Journal of Experimental Psychology: Human Perception and Performance, 43(6):1160, 2017. 1 +[5] L. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille. Deep convolutional nets, atrous convolution, and fully connected crfs. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40(4):834-848, April 2018. 1, 6 +[6] Liang-Chieh Chen, George Papandreou, Florian Schroff, and Hartwig Adam. Rethinking atrous convolution for semantic image segmentation. arXiv preprint arXiv:1706.05587, 2017. 7 +[7] Xianjie Chen, Roozbeh Mottaghi, Xiaobai Liu, Sanja Fidler, Raquel Urtasun, and Alan Yuille. Detect what you can: Detecting and representing objects using holistic models and body parts. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2014. 6 +[8] Yunpeng Chen, Marcus Rohrbach, Zhicheng Yan, Yan Shuicheng, Jiashi Feng, and Yannis Kalantidis. Graph-based global reasoning networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 3 +[9] Mircea Cimpoi, Subhransu Maji, Iasonas Kokkinos, Sammy Mohamed, and Andrea Vedaldi. Describing textures in the wild. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2014. 6 +[10] A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the em algorithm. Journal of the Royal Statistical Society: Series B (Methodological), 39(1):1-22, 1977. 4 +[11] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2009. 7 +[12] Clement Farabet, Camille Couprie, Laurent Najman, and Yann LeCun. Learning hierarchical features for scene labeling. IEEE transactions on pattern analysis and machine intelligence, 35(8):1915-1929, 2012. 2 +[13] Pedro F Felzenszwalb and Daniel P Huttenlocher. Efficient graph-based image segmentation. International journal of computer vision, 59(2):167-181, 2004. 1 + +[14] Matthias Fey and Jan E. Lenssen. Fast graph representation learning with PyTorch Geometric. In ICLR Workshop on Representation Learning on Graphs and Manifolds, 2019. 6 +[15] Jun Fu, Jing Liu, Hajjie Tian, Yong Li, Yongjun Bao, Zhiwei Fang, and Hanqing Lu. Dual attention network for scene segmentation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 3 +[16] Jun Fu, Jing Liu, Yuhang Wang, Yong Li, Yongjun Bao, Jinhui Tang, and Hanqing Lu. Adaptive context network for scene parsing. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 1 +[17] Raghudeep Gadde, Varun Jampani, Martin Kiefel, Daniel Kappler, and Peter V. Gehler. Superpixel convolutional networks using bilateral inceptions. In Bastian Leibe, Jiri Matas, Nicu Sebe, and Max Welling, editors, Computer Vision – ECCV 2016, pages 597–613, Cham, 2016. Springer International Publishing. 2 +[18] Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems 30, pages 1024-1034. Curran Associates, Inc., 2017. 3, 4, 6 +[19] Junjun He, Zhongying Deng, Lei Zhou, Yali Wang, and Yu Qiao. Adaptive pyramid context network for semantic segmentation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 1, 3, 6, 7 +[20] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. 5, 6 +[21] Han Hu, Zheng Zhang, Zhenda Xie, and Stephen Lin. Local relation networks for image recognition. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 2 +[22] Zilong Huang, Xinggang Wang, Lichao Huang, Chang Huang, Yunchao Wei, and Wenyu Liu. Ccnet: Criss-cross attention for semantic segmentation. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 7, 8 +[23] Varun Jampani, Deqing Sun, Ming-Yu Liu, Ming-Hsuan Yang, and Jan Kautz. Superpixel sampling networks. In The European Conference on Computer Vision (ECCV), September 2018. 2 +[24] Krishna Kumar Singh and Yong Jae Lee. Hide-and-seek: Forcing a network to be meticulous for weakly-supervised object and action localization. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017. 2 +[25] Yin Li and Abhinav Gupta. Beyond grids: Learning graph representations for visual recognition. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, pages 9225-9235. Curran Associates, Inc., 2018. 3, 7 +[26] Xiaodan Liang, Zhiting Hu, Hao Zhang, Liang Lin, and Eric P Xing. Symbolic graph reasoning meets convolutions. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesà-Bianchi, and R. Garnett, editors, Advances in Neural Infor + +mation Processing Systems 31, pages 1853-1863. Curran Associates, Inc., 2018. 2 +[27] Xiaodan Liang, Liang Lin, Xiaohui Shen, Jiashi Feng, Shuicheng Yan, and Eric P. Xing. Interpretable structure-evolving lstm. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. 2 +[28] Xiaodan Liang, Xiaohui Shen, Jiashi Feng, Liang Lin, and Shuicheng Yan. Semantic object parsing with graph lstm. In Bastian Leibe, Jiri Matas, Nicu Sebe, and Max Welling, editors, Computer Vision – ECCV 2016, pages 125–143, Cham, 2016. Springer International Publishing. 2 +[29] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. 1 +[30] Soumajit Majumder and Angela Yao. Content-aware multilevel guidance for interactive instance segmentation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2, 8 +[31] Alastair P Moore, Simon JD Prince, Jonathan Warrell, Umar Mohammed, and Graham Jones. Superpixel lattices. In IEEE Conference on Computer Vision and Pattern Recognition, 2008. 1 +[32] Roozbeh Mottaghi, Xianjie Chen, Xiaobai Liu, Nam-Gyu Cho, Seong-Whan Lee, Sanja Fidler, Raquel Urtasun, and Alan Yuille. The role of context for object detection and semantic segmentation in the wild. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2014. 6 +[33] Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th international conference on machine learning (ICML-10), pages 807–814, 2010. 6 +[34] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NIPS-W, 2017. 6 +[35] J. Pont-Tuset, P. Arbeláez, J. T. Barron, F. Marques, and J. Malik. Multiscale combinatorial grouping for image segmentation and object proposal generation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39(1):128-140, Jan 2017. 1, 2, 6 +[36] Phillip E. Pope, Soheil Kolouri, Mohammad Rostami, Charles E. Martin, and Heiko Hoffmann. Explainability methods for graph convolutional neural networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 8 +[37] Ren and Malik. Learning a classification model for segmentation. In Proceedings Ninth IEEE International Conference on Computer Vision, pages 10-17 vol.1, Oct 2003. 1, 2 +[38] Joseph Tighe and Svetlana Lazebnik. Superparsing. International Journal of Computer Vision, 101(2):329-349, 2013. 1 +[39] A. Tremeau and P. Colantoni. Regions adjacency graph applied to color image segmentation. IEEE Transactions on Image Processing, 9(4):735-744, April 2000. 3 +[40] Wei-Chih Tu, Ming-Yu Liu, Varun Jampani, Deqing Sun, Shao-Yi Chien, Ming-Hsuan Yang, and Jan Kautz. Learning + +superpixels with segmentation-aware affinity loss. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 2 +[41] Zhuowen Tu, Xiangrong Chen, Alan L Yuille, and Song-Chun Zhu. Image parsing: Unifying segmentation, detection, and recognition. International Journal of computer vision, 63(2):113-140, 2005. 1 +[42] J. R. R. Uijlings, K. E. A. van de Sande, T. Gevers, and A. W. M. Smeulders. Selective search for object recognition. International Journal of Computer Vision, 104(2):154-171, Sep 2013. 2 +[43] Petar Velicković, William Fedus, William L. Hamilton, Pietro Liò, Yoshua Bengio, and R Devon Hjelm. Deep graph infomax. In International Conference on Learning Representations, 2019. 5 +[44] Jingdong Wang, Ke Sun, Tianheng Cheng, Borui Jiang, Chaorui Deng, Yang Zhao, Dong Liu, Yadong Mu, Mingkui Tan, Xinggang Wang, et al. Deep high-resolution representation learning for visual recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, March 2020. 1, 7 +[45] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 2, 3 +[46] Xiang Wang, Shaodi You, Xi Li, and Huimin Ma. Weakly-supervised semantic segmentation by iteratively mining common object features. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 2 +[47] Yunchao Wei, Jiashi Feng, Xiaodan Liang, Ming-Ming Cheng, Yao Zhao, and Shuicheng Yan. Object region mining with adversarial erasing: A simple classification to semantic segmentation approach. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. 2 +[48] Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, and Jian Sun. Unified perceptual parsing for scene understanding. In The European Conference on Computer Vision (ECCV), September 2018. 1, 2, 5, 6, 7, 8 +[49] Chenliang Xu and Jason J. Corso. Actor-action semantic segmentation with grouping process models. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. 2 +[50] Chenliang Xu, Spencer Whitt, and Jason J. Corso. Flattening supervoxel hierarchies by the uniform entropy slice. In The IEEE International Conference on Computer Vision (ICCV), December 2013. 2 +[51] Chenliang Xu, Caiming Xiong, and Jason J. Corso. Streaming hierarchical video segmentation. In Andrew Fitzgibbon, Svetlana Lazebnik, Pietro Perona, Yoichi Sato, and Cordelia Schmid, editors, Computer Vision – ECCV 2012, pages 626–639, Berlin, Heidelberg, 2012. Springer Berlin Heidelberg. 2 +[52] Ning Xu, Brian Price, Scott Cohen, Jimei Yang, and Thomas S. Huang. Deep interactive object selection. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. 2, 8 +[53] Jian Yao, Sanja Fidler, and Raquel Urtasun. Describing the scene as a whole: Joint object detection, scene classification + +and semantic segmentation. In IEEE Conference on Computer Vision and Pattern Recognition, 2012. 1 +[54] Zhitao Ying, Jiaxuan You, Christopher Morris, Xiang Ren, Will Hamilton, and Jure Leskovec. Hierarchical graph representation learning with differentiable pooling. In Advances in Neural Information Processing Systems, pages 4800-4810, 2018. 3, 4, 5 +[55] Yuhui Yuan and Jingdong Wang. Ocnet: Object context network for scene parsing. arXiv preprint arXiv:1809.00916, 2018. 1, 2, 3, 6, 7, 8 +[56] Matthew D. Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In David Fleet, Tomas Pajdla, Bernt Schiele, and Tinne Tuytelaars, editors, Computer Vision – ECCV 2014, pages 818–833, Cham, 2014. Springer International Publishing. 3 +[57] Hang Zhang, Kristin Dana, Jianping Shi, Zhongyue Zhang, Xiaogang Wang, Ambrish Tyagi, and Amit Agrawal. Context encoding for semantic segmentation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 1 +[58] Hang Zhang, Han Zhang, Chenguang Wang, and Junyuan Xie. Co-occurrent features in semantic segmentation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 1 +[59] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid scene parsing network. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. 1, 2 +[60] Bolei Zhou, Hang Zhao, Xavier Puig, Tete Xiao, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Semantic understanding of scenes through the ade20k dataset. International Journal of Computer Vision, 127(3):302-321, Mar 2019. 6 \ No newline at end of file diff --git a/deepgroupingmodelforunifiedperceptualparsing/images.zip b/deepgroupingmodelforunifiedperceptualparsing/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..236af891b4e1785555b95baf54490be05b3c6277 --- /dev/null +++ b/deepgroupingmodelforunifiedperceptualparsing/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49969f07fac40dc4dfbda88fed6960f785aea719958320918795eb42feaf62ff +size 549448 diff --git a/deepgroupingmodelforunifiedperceptualparsing/layout.json b/deepgroupingmodelforunifiedperceptualparsing/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8db73a87247c77978198eb50c66ca759550a0a20 --- /dev/null +++ b/deepgroupingmodelforunifiedperceptualparsing/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:248b2b3523b578659da210ac44f3c1bb552c706c82f47020e728de06564f354e +size 488561 diff --git a/deephomographyestimationfordynamicscenes/9c415e53-d48b-4ca7-9f2d-1e7594cc7d8e_content_list.json b/deephomographyestimationfordynamicscenes/9c415e53-d48b-4ca7-9f2d-1e7594cc7d8e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..5c8121d22a4b3f902e1888a693bdbb1a432d0ea9 --- /dev/null +++ b/deephomographyestimationfordynamicscenes/9c415e53-d48b-4ca7-9f2d-1e7594cc7d8e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da00b11be05aa4170f9fd3782ee5cc416f00644d91053cc718365c995e551462 +size 75216 diff --git a/deephomographyestimationfordynamicscenes/9c415e53-d48b-4ca7-9f2d-1e7594cc7d8e_model.json b/deephomographyestimationfordynamicscenes/9c415e53-d48b-4ca7-9f2d-1e7594cc7d8e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..09d423161c46e61b451256262de25f12a5af7152 --- /dev/null +++ b/deephomographyestimationfordynamicscenes/9c415e53-d48b-4ca7-9f2d-1e7594cc7d8e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fce340e10f00d800dc0d8053d8074f5cbdbf93a4e2bded0508130663cf87415 +size 89112 diff --git a/deephomographyestimationfordynamicscenes/9c415e53-d48b-4ca7-9f2d-1e7594cc7d8e_origin.pdf b/deephomographyestimationfordynamicscenes/9c415e53-d48b-4ca7-9f2d-1e7594cc7d8e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bd83dc6e1f35bedb22e6dfff29f8caa6ecd818a0 --- /dev/null +++ b/deephomographyestimationfordynamicscenes/9c415e53-d48b-4ca7-9f2d-1e7594cc7d8e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c621ee0b7ece1900be817af96d395160a44d08c3577360c048d643e7f685a95d +size 3194431 diff --git a/deephomographyestimationfordynamicscenes/full.md b/deephomographyestimationfordynamicscenes/full.md new file mode 100644 index 0000000000000000000000000000000000000000..7ab8cf5e84d41b050862b6e7222b12fe54cc1e8c --- /dev/null +++ b/deephomographyestimationfordynamicscenes/full.md @@ -0,0 +1,322 @@ +# Deep Homography Estimation for Dynamic Scenes + +Hoang Le + +Feng Liu* + +Portland State University + +{hoanl, fliu}@cs.pdx.edu + +Shu Zhang + +Google + +shzhang@google.com + +Aseem Agarwala* + +Adobe Research + +aseem@agarwala.org + +# Abstract + +Homography estimation is an important step in many computer vision problems. Recently, deep neural network methods have shown to be favorable for this problem when compared to traditional methods. However, these new methods do not consider dynamic content in input images. They train neural networks with only image pairs that can be perfectly aligned using homographies. This paper investigates and discusses how to design and train a deep neural network that handles dynamic scenes. We first collect a large video dataset with dynamic content1. We then develop a multi-scale neural network and show that when properly trained using our new dataset, this neural network can already handle dynamic scenes to some extent. To estimate a homography of a dynamic scene in a more principled way, we need to identify the dynamic content. Since dynamic content detection and homography estimation are two tightly coupled tasks, we follow the multi-task learning principles and augment our multi-scale network such that it jointly estimates the dynamics masks and homographies. Our experiments show that our method can robustly estimate homography for challenging scenarios with dynamic scenes, blur artifacts, or lack of textures. + +# 1. Introduction + +A homography models the global geometric transformation between two images. It not only directly serves as a motion model for many applications like video stabilization [14, 24] and image stitching [31, 33], but also is used to estimate 3D motion and scene structure in algorithms, such as SLAM [10] and visual odometry [13]. + +There are two categories of methods for homography estimation [31]. Direct photometric-based approaches search for an optimal homography that minimizes the alignment error between two input images. Sparse feature-based approaches first estimate sparse feature correspondences between the input images and then compute the homography + +![](images/02a8721816d197ea31f2db3b1b973d011e947580a00011b48e8f4b2a900f850b.jpg) + +![](images/9c1e4cab3f862fe6064dc339aaad934c0b8235abd37586ae05fe267d2ba05b16.jpg) +SIFT+RANSAC [21] + +![](images/e1019f18c7d1609641d521681b75bbd15d4126b28b6f32152860e2d217346882.jpg) + +![](images/f7398e61c8801c94531380dc9117874b6d423ec84ea253811ecf3b4f8fe764a4.jpg) +DHN [9] + +![](images/609a1810579269e9c5f59ec3c13dc6b6deb0c7117070099837e0309a6243beb4.jpg) + +![](images/54f1e1854dba3ef1630ad2ff70cf85bb36b96c3fc5da459133fb0cf6d0268ff4.jpg) +Our results +Figure 1. Challenging examples for homography estimation. Each figure shows one of the two input images. Each white box indicates where the other image in the pair will be warped to in the first image according to the ground truth homography and each red box indicates the result using the estimated homography. As shown in the top row, the lack of texture fails the traditional SIFT + RANSAC method while the deep learning methods work well. The example at the bottom is difficult as the moving person dominates the image. Compared to both the SIFT-based method and the deep homography estimation method [9], our dynamics-aware method can better estimate homography for a dynamic scene. + +from them. The direct approaches are robust to images with large textureless regions but are challenged by large motion. In contrast, while sparse feature-based approaches are more robust to large motion, they heavily depend on the quality of feature correspondences, which are often difficult to obtain in textureless regions or blurry images. + +Recent deep homography estimation methods train a convolutional neural network to compute a homography between two images [8, 9, 11, 26]. These deep neural network methods leverage both local and global features and can often perform better than the traditional methods on challenging scenarios, such as images lacking texture, as shown in the first example of Fig. 1. However, how they handle challenging scenarios such as dynamic scenes has not been studied, as existing methods focus on image pairs that can be fully aligned using homographies. In prac + +tice, dynamic objects are common. Traditional non-deep learning approaches use a robust estimation algorithm like RANSAC [12] to exclude them as outliers. We need to empower deep learning methods with the capability of being resistant to dynamic content to make them more practical. + +This paper investigates the problem of developing a deep learning method for homography estimation that is able to handle dynamic scenes without an iterative process like RANSAC. We first introduce a multi-scale deep convolutional neural network to handle image pairs with a large global motion. This network first estimates the homography from the low-resolution version of the input image pair and then progressively refines it at the increasingly higher resolutions. The architecture of the base neural network at each stage follows a VGG-style network similar to existing deep homography estimation methods [9, 26]. Our study shows that this multi-scale neural network can handle not only a large global motion, but also dynamic scenes to some extent when properly trained. + +To address the problem of homography estimation of a dynamic scene in a more principled way, we need to detect dynamic content and eliminate their effect on homography estimation. Actually, homography estimation and dynamic content detection are two tightly coupled tasks. According to the research on multi-task learning, training a neural network to simultaneously perform these two tasks can greatly improve its performance for both tasks. Therefore, we enhance our multi-scale network such that it jointly estimates the dynamics mask and homography for an image pair. To train this network, in addition to the homography loss, we use an auxiliary loss function that compares the dynamics mask from the ground-truth dynamics map that is estimated from the training data. This multi-task learning training strategy empowers our multi-scale homography estimation network to robustly handle dynamic scenes. + +As there are no publicly available large number of image pairs or videos of scene dynamics that come with known ground-truth homographies, we collected 32,385 static video clips from YouTube with a Creative Commons license. We then applied random homography sequences to these static clips to produce the training examples. These examples contain a wide variety of dynamic scenes. As shown in our experiments, our neural networks trained on this synthetic dataset generalize well to real-world videos. + +This paper contributes to the research on homography estimation by investigating ways to develop and train deep neural networks that are robust against dynamic scenes. First, we build a large video dataset with dynamic scenes for training deep homography estimation neural networks. Second, we develop a multi-scale neural network that can handle large motion and show that by carefully training, it can already reasonably accommodate dynamic scenes. Third, we develop a dynamics-aware homography estimation net + +work by integrating a dynamics mask network into our multi-scale network for simultaneous homography and dynamics estimation. Our experiments show that our method can handle various challenges, such as dynamic scenes, blurriness, lack of texture, and poor lighting conditions. + +# 2. Related Work + +Homography estimation is one of the basic computer vision problems [16]. According to multi-view geometry theory, two images of a planar scene or taken by a rotational camera can be related by a $3 \times 3$ homography matrix $\mathbf{H}$ : + +$$ +\hat {\mathbf {x}} = \mathbf {H} \mathbf {x} \tag {1} +$$ + +where $\hat{\mathbf{x}}$ and $\mathbf{x}$ are the homogeneous coordinates of two corresponding points in the two images. Note, the above equation is only valid for corresponding points on static objects. Below we first briefly describe two categories of off-the-shelf algorithms for homography estimation and then discuss the recent deep neural network based approaches. + +Pixel-based approaches directly search for an optimal homography matrix that minimizes the alignment error between two input images. Various error metrics between two images and parameter searching algorithms, such as hierarchical estimation and Fourier alignment, have been developed to make direct approaches robust and efficient. These direct methods are robust to images lacking in texture, but often have difficulty in dealing with large motion. Feature-based approaches are now popular for homography estimation. They first estimate local feature points using algorithms, such as SIFT [21] and SURF [4], and then match feature points between two images. For a video, corner points are often detected and then tracked across two consecutive frames for efficiency [29]. Given the set of corresponding feature pairs, an optimal homography matrix can be obtained by solving a least squares problem based on Eq. 1. In practice, errors can occur during feature matching and feature points can come from moving objects. Therefore, a robust estimation algorithm like RANSAC [12] and Magsac [3] is often used to remove the outliers. The performance of feature-based approaches depends on local feature detection and matching. For images suffering from blurriness or lacking in texture, they often cannot work well. + +Our work is more related to the recent deep learning approaches to homography estimation. In their seminal work, DeTone et al. developed VGG-style deep convolutional neural networks for homography estimation. They showed that a deep neural network can effectively compute the homography between two images [9]. Nguyen et al. extended this work by training the neural network using a photometric loss that measures the pixel error between a warped input image and the other one. This photometric loss allows for the unsupervised training of the neural network without ground-truth homographies [26]. To deal with the large motion between two images, Nowruzzi et al. + +![](images/08c66d594aebf4901f637443809cdae6ef1a2b7e250190e80e93dd9c47684a19.jpg) +Figure 2. Static video samples in our dynamic-scene homography dataset. + +developed a hierarchical neural network that iteratively refines homography estimation [11]. Chang et al. designed a Lucas-Kanade layer that is able to regress the homography between two images from their corresponding feature maps extracted by a shared convolutional neural network [8]. This Lucas-Kanade network can be cascaded to progressively refine the estimated homography. Zeng et al. developed a perspective field neural network to model the pixel-to-pixel bijection between two images and used that for homography estimation [32]. These deep homography estimation approaches are shown successful on images of a static scene; however, they do not consider dynamic scenes. + +Our multi-scale neural network extends the multi-stage approaches discussed above. Compared to Nowruzi et al. [11], our method starts from low-resolution versions of the input images and gradually increases the input image sizes, instead of taking the original input images as input at each stage. This makes our method more robust to large motion. Compared to Chang et al. [8], our method pre-aligns the input images to the next stage using the homography estimated in the previous stage to minimize the global motion. This helps the late-stage network to account for the global motion. More importantly, we further enhance our multi-scale neural network with a dynamics mask network to handle dynamic scenes, which was not considered in the previous neural network-based methods. + +# 3. Homography Dataset of Dynamic Scenes + +Existing deep neural networks for homography estimation are trained with image pairs that can be perfectly aligned. A common approach is to use a subset of the MS-COCO image set [19], and warp each image using a known homography to form an image pair [8, 9, 11]. Since we aim to train a neural network that can handle dynamic scenes, we cannot produce a dataset in this way. + +Ideally, each image pair in our dataset should contain dynamic scenes with a known homography. To our best knowledge, there is not such a public homography dataset that is large enough for training a deep neural network. Our solution is to first collect a large set of videos capturing dynamic scenes while the cameras are held static, and then apply known homography sequences to them. Specifically, we downloaded 877 videos with a Creative Commons License from YouTube. From these videos, we extracted 32,385 static video clips and then applied a known homography se + +quence to each of them to generate image/video pairs. Fig. 2 shows some sample frames from this video set. + +Static video clip detection. Since our goal is to build a reliable homography benchmark to train a deep neural network, it is critical that each image pair in our dataset can be perfectly aligned by a homography (except moving objects.) Thus, instead of using a structure-from-motion method to estimate and analyze camera motion, we use a more conservative approach aiming for a very high precision rate at the cost of a low recall rate when identifying static clips. + +We observe that if a video clip has camera motion, its boundary area changes temporally. Also, the central part of a video clip may change significantly due to the scene motion if the video is captured by a static camera. Accordingly, for every two consecutive frames, we calculate the similarity between their boundary areas. Specifically, we first resize each video frame to $256 \times 256$ . We consider the outer boundary with a 5-pixel thickness. We subdivide the boundary area into 32 boundary blocks of size $32 \times 5$ pixels. If more than $25\%$ of blocks stay the same between two consecutive frames, we consider that there is no camera motion between the two frames. We consider a boundary block unchanged over time if more than $90\%$ of its pixels only slightly change the color ( $\delta_{c} \leq 6.67$ ). To further remove non-static video clips, we estimate optical flows between frames in each video clip using the PWC-Net algorithm [30]. Since the difference between two consecutive frames is small, we skip $\delta t = 7$ frames to compute the optical flow. We remove the clips if the areas of moving pixels in the frames are greater than $65\%$ . Finally, we consider a video clip static if every two consecutive frames are static. To avoid the drifting error, we also enforce that the following frames in a sequence must also be considered static with regard to the first frame of the sequence. We extract static video clips that have a minimum length of 10 frames from a video using a greedy search method. + +We finally manually examine the resulting video clips to remove those misidentified as static ones. In total, we obtained 32,385 static video clips. The average length of these video clips is 22 frames and the scene motion ranges from 0-25 pixels. We split the dataset into three portions, $70\%$ for training, $20\%$ for testing and $10\%$ for validation. + +Image pair generation. Given a sequence of $n$ frames $\{I_i, 1 \leq i \leq n\}$ in a video clip, we randomly sample 2 frames $I_j$ and $I_k$ , with $1 \leq j, k \leq n$ , and $|j - k| \leq 5$ . + +![](images/9a61bdd436a47720acb09125cabb2d0d5ef808c22fd185824a566536557ad9df.jpg) +Figure 3. Multi-scale neural network for homography estimation. This network progressively estimates and refines homography from coarse to fine. + +We then use a similar method to Detone et al. [9] to generate a pair of image patches, one from $I_{j}$ and the other from $I_{k}$ . Specifically, we first randomly crop an image patch $I_{j}^{p}$ of size $128 \times 128$ at location $[x_{p}, y_{p}]$ in $I_{j}$ . We then randomly perturb the coordinates of the four corner points of $I_{j}^{p}$ by a value $r, -32 \leq r \leq 32$ . We use the four corner displacements to compute the corresponding homography $\mathbf{H}$ . Then, we apply the inverse of this homography, $\mathbf{H}^{-1}$ , on the other image $I_{k}$ : $\hat{I}_{k} = \mathbf{H}^{-1}(I_{k})$ , and then extract the corresponding patch at the same location $[x_{p}, y_{p}]$ to obtain image patch $\hat{I}_{k}^{p}$ . Each training sample contains $I_{j}^{p}$ , $\hat{I}_{k}^{p}$ , and their corresponding ground-truth homography $\mathbf{H}$ . + +# 4. Homography Estimation Neural Networks + +We first introduce a multi-scale deep homography estimation network that handles large motion, and then describe how we improve it with a dynamics mask network to better handle dynamic scenes. + +# 4.1. Multi-scale Neural Network + +Our neural network takes two gray-scale images of size $128 \times 128$ as input, and outputs the homography between them. Following the previous work [9, 11, 26], we use the displacements of the four image corners to represent the homography. As reported in previous work [1, 8, 11], progressively estimating and refining a homography with a multistage procedure is helpful to cope with large global motion between two images. We extend these methods and design a multi-scale multi-stage neural network to estimate the homography for a pair of images from coarse to fine. + +Fig. 3 illustrates a three-scale version of our multi-scale homography neural network. Given a pair of images $(I_1, I_2)$ , we build a pair of image pyramid $(I_1^k, I_2^k)$ , where $k$ indicates the pyramid level. The down-scaling factor at level $k$ is $2^k$ . We start from the highest pyramid level $(I_1^2, I_2^2)$ and use the base network $\mathrm{Net}^2$ to estimate a homography $\hat{\mathbf{H}}^2$ . Then, we warp $I_1^1$ using $\hat{\mathbf{H}}^2$ to obtain a pre-aligned image pair $(\hat{I}_1^1, I_2^1)$ . The homography of the unaligned image pair $(I_1^1, I_2^1)$ can be computed by cascading $\hat{\mathbf{H}}^2$ and $\hat{\mathbf{H}}^1$ . + +$$ +\mathbf {H} ^ {1} = \hat {\mathbf {H}} ^ {1} \mathbf {S} ^ {- 1} \hat {\mathbf {H}} ^ {2} \mathbf {S} \tag {2} +$$ + +where $\mathbf{H}^1$ is the homography of the unaligned image pair $(I_1^1, I_2^1)$ and $\mathbf{S}$ is a scaling matrix that down-samples an image by half to account for the different image sizes at the two scales. We continue by using $\mathbf{H}^1$ to pre-align $(I_1^0, I_2^0)$ as input for the subsequent base network and obtain + +![](images/d7d493b876a968ffefd045494fe4d5b421461b8e18f1c619ad41c8b57f701a87.jpg) +Figure 4. Architecture of the base network $\mathrm{Net}^0$ . + +the homography $\hat{\mathbf{H}}^0$ and compute the homography for the original image pair in a similar way to Eq. 2. + +We use a variation of the neural network introduced by DeTone et al. [9] as the base network at each stage. Fig. 4 shows the architecture of the base network $\mathrm{Net}^0$ . It starts with twelve $3 \times 3$ fully convolutional layers, each coupled with Batch Normalization [17] and a Rectified Linear Unit layer (ReLU). Every two consecutive convolutional layers are followed by a max pooling layer. These convolutional layers are followed by an average pooling layer, a dropout layer and a $1 \times 1$ convolution layer that outputs a homography vector of length 8. The architecture of other base networks $\mathrm{Net}^k$ is similar except that each has $2k$ less convolutional layers due to the smaller input image size. + +To train this multi-scale neural network, we first calculate the $l_{2}$ loss between the estimated and ground-truth homography, each parameterized using a corner displacement vector. We then compute the total loss at all the scales as the loss function. + +When our multi-scale neural network is trained using the examples derived from the MS-COCO dataset in a similar way to previous work [9], it works well with image pairs with only static background, for which the transformation can be perfectly modeled by a homography. However, when it is used to estimate homographies for image pairs with scene motion, the results are less accurate as reported in Sec. 5. This is expected as the training examples derived from the MS-COCO dataset do not contain dynamic scenes. + +To further examine the capability of this multi-scale neural network, we trained another version on our dynamic dataset described in Sec. 3. We found that training this multi-scale network on our dataset can improve its capability in handling dynamic scenes, as found in our experiments (Sec. 5.2). To better handle scene motion, we develop a mask-augmented network as described in the next section. + +# 4.2. Mask-augmented Deep Neural Network + +To better handle dynamic scenes, we need to identify dynamic content in the scene. Actually, dynamic content detection and homography estimation are two tightly coupled tasks. An accurate estimation of homography helps robustly detect dynamic content while correctly identifying dynamic content helps with accurate homography estimation. Based + +![](images/7f99eb4fe5a492f1394b4a22425aee652cfc11007ecb81c526e8803bb5d7ad1f.jpg) +Figure 5. Mask-augmented Deep Neural Network at level $k = 1$ . The network is augmented with a convolutional decoder that helps predict areas of dynamic objects to improve the homography prediction. + +![](images/621762be762a8c6a3b887ada6a52572b6ba2ed9379b85c799b61bebbafce77b4.jpg) + +on the research on multi-task learning, jointly training a model to perform these two tasks simultaneously can enable the success of both tasks [7, 28]. Accordingly, we improve our base homography network so that it estimates both the dynamics maps and the homography for a pair of images. To this end, we incorporate a dynamics mask estimator into our base homography neural network, as shown in the right of Fig. 5. This new network uses the same architecture as the previous base network except that we add a sub-neural network to regress a pair of dynamics maps. We refer to this new base network as a mask-augmented base network. + +We embed this mask-augmented base network into our multi-scale network in a similar way as before. As shown in the left of Fig. 5, the mask-augmented base network $\mathrm{Net}^{k + 1}$ outputs a pair of dynamics maps $(M_1^{k + 1}, M_2^{k + 1})$ and a homography $\hat{\mathbf{H}}^{k + 1}$ , from which we can compute a cascaded homography $\mathbf{H}^{k + 1}$ according to Eq. 2. Then, we first up-sample the pairs of dynamics maps to match the image size in the next level $k$ and obtain $(\bar{M}_1^k, \bar{M}_2^k)$ . Then we warp $\bar{M}_1^k$ using the homography $\mathbf{H}^{k + 1}$ and obtain $\hat{M}_1^k$ to match the warped input image $\hat{I}_1^k$ , and finally concatenate $(\hat{M}_1^k, \bar{M}_2^k)$ and $(\hat{I}_1^k, I_2^k)$ as input for the new base network at the next level $k$ . We further improve the performance of this mask-augmented network by first estimating the mask residuals $(\tilde{M}_1^k, \tilde{M}_2^k)$ and then obtaining the final masks by adding the residuals to the input upsampled masks $(\hat{M}_1^k, \bar{M}_2^k)$ . + +This mask-augmented homography neural network is difficult to train as it cannot automatically figure out the role of the dynamics maps. According to multi-task learning [7, 28], having an extra supervising signal helps train a neural network. So we estimate the ground-truth dynamics maps and use them as the extra supervising signals. Specifically, since each image pair $(I_i, I_j)$ is created from two frames of a static video, we first estimate the optical flow between the two video frames using PWC-Net [30] and then create a ground truth mask by labelling a pixel as 1 if the flow magnitude is greater than 1 pixel and 0 otherwise. We then generate a pair of masks $(M_i, M_j)$ , one for each image in the pair, by cropping and warping the ground truth mask in the same way as we generate the image pair $(I_i, I_j)$ . + +Now we have two loss functions: a homography loss $l_{f}$ described in Sec. 4.1 and a dynamics mask-based loss $l_{d}$ . + +We calculate $l_{d}$ as a binary cross entropy loss as follows [5]. + +$$ +l _ {d} = \frac {- M _ {g} \cdot \log \left(M _ {p}\right) ^ {T} - \left(1 - M _ {g}\right) \cdot \log \left(1 - M _ {p}\right) ^ {T}}{\left| M _ {g} \right|} \tag {3} +$$ + +where $M_p$ and $M_g$ are the predicted dynamics mask and the ground-truth mask, each arranged as a row vector. $|M_g|$ is the total number of pixels in $M_g$ . We combine the two losses to train our network: $L = \sum_{k} \sigma_f l_f^k + \sigma_d l_d^k$ where $l_f^k$ and $l_d^k$ are the homography loss and mask loss at scale $k$ and $\sigma_f$ and $\sigma_d$ are weights. + +Implementation details. Our neural networks are implemented using TensorFlow. We initialize the weight values using the Xavier algorithm [15] and the biases with zero. We use the Adam optimization algorithm to train the neural networks [18] using an exponentially decaying learning rate with an initial value of $10^{-4}$ , a decay step of $10^{5}$ , and a decay rate of 0.96. The dropout keep probability is set to 0.8. The mini-batch size is 32. + +We train the mask-augmented network in three steps. First, we train it on our dynamic-scene dataset with $\sigma_{f} = 1$ and $\sigma_{d} = 0$ for $2\times 10^{6}$ global iterations so that the network learns to predict homography only with ground-truth homography labels. We continue training it for another $10^{6}$ iterations with $\sigma_{f} = 1$ and $\sigma_{d} = 10$ so that it learns to predict both the homography and dynamics masks by leveraging the ground-truth masks. Finally, we train it for another $10^{6}$ iterations with $\sigma_{f} = 1$ and $\sigma_{d} = 0$ so that it learns to leverage the predicted dynamics masks to ultimately boost the performance of homography estimation for dynamic scenes. + +# 5. Experiments + +We evaluate two versions of our method: the multiscale homography network (MHN) and the dynamics mask-augmented network $(\mathrm{MHN}_m)$ . We compare them to both feature matching-based and deep learning-based methods. The first category of methods use the SIFT feature or its recent variations followed by a robust estimation method, including SIFT+RANSAC [21], SIFT+MAGSAC [3], SIFT+GeoDesc+RANSAC [23], SIFT+ContextDesc+RANSAC [22], LF-Net [27], and AFFNET [25]. We also use PWC-Net [30], a state-of-the-art optical flow method, to estimate dense correspondences + +![](images/9db0656fe7554ffcbe36d17c75542926f546ce005406372f27de43b303d4d671.jpg) +Figure 6. Evaluation on static scenes. + +![](images/50174d9b8b18f22e6d7262eeeb33bf6c18483100402f45bc08ee3303d97bdba7.jpg) + +![](images/8fcf5e71197f740f443074a53b83953a3f4c6a42e12926130cded074df2c0eae.jpg) +Figure 7. Evaluation on dynamic scenes. + +between input images and then use RANSAC to estimate the homography. The deep learning homography estimation methods include CLKN [8], DHN [9], and PFNet [32]. + +Our experiments use three datasets. The first is derived from the MS-COCO [19], following the procedure in the recent work [8, 9]. The image size is $128 \times 128$ and the image corners are randomly shifted in the range of $[-32, 32]$ pixels. Please refer to [8, 9] for more details. The second, named as $\mathrm{VidSet}_s$ , is the static version of our dynamic-scene dataset by creating image pairs from a single video frame so that there is no dynamic content in each image pair. The third is our dynamic-scene dataset described in Sec. 3, named as $\mathrm{VidSet}_d$ . Following [8], we use the mean corner error as the evaluation metric: $e_c = \frac{1}{4} \sum_{j=1}^{4} ||c_j - \hat{c}_j||_2$ where $c_j$ and $\hat{c}_j$ are corner $j$ transformed by the estimated homography and the ground-truth homography, respectively. + +# 5.1. Evaluation on Static Scenes + +Existing deep homography estimation methods focus on pairs of images that can be fully aligned by homography. We compare our multi-scale network (MHN) with these methods on both MS-COCO and VidSet $_s$ . As shown in Fig. 6, our multi-scale network described in Sec. 4.1 outperforms the competitive learning-based methods [9] and [32] but performs slightly worse than CLKN [8] in the high-precision region. Moreover, our method outperforms all the competitive feature matching or flow-based methods. This is consistent with the reports from the previous work [8, 9] that deep neural network approaches can often perform better than the conventional matching-based methods. + +![](images/086d0bdcd47a693a677ff4f41bc50aa224c0cc856c08cd1f540a951c38d0e76f.jpg) +Figure 8. Effect of training datasets. Our dynamic-scene dataset $\mathrm{VidSet}_d$ enables deep homography estimation networks better handle dynamic scenes than its static version $\mathrm{VidSet}_s$ . + +# 5.2. Evaluation on Dynamic Scenes + +In this test, we train and test our networks MHN and $\mathrm{MHN}_m$ and the other competitive networks, including DHN [9] and PFNet [32], on our dynamic-scene dataset $\mathrm{VidSet}_d$ . Fig. 7 shows that our networks significantly outperform the existing learning-based approaches and matching-based approaches in handling dynamic scenes, even though we train the existing deep learning methods on our dynamic-scene dataset. In addition, when trained on $\mathrm{VidSet}_d$ , our multi-scale network MHN can already handle dynamic scenes to some extent. On around $80\%$ of examples, it achieves a good accuracy of $\leq 1.0$ pixel. Our dynamics mask augmented network $\mathrm{MHN}_m$ further improves its performance, and achieves the same accuracy for more than $85\%$ of the testing mages. We were not able evaluate the performance of CLKN [8] on $\mathrm{VidSet}_d$ since their code is not available. However, we also expect that our mask network and our $\mathrm{VidSet}_d$ can also be married to CLKN to better handle dynamic scenes. + +Effect of training sets. We trained two versions of each homography network, one on the static version of our dynamic-scene dataset $(\mathrm{VidSet}_s)$ and the other on our dynamic-scene dataset $(\mathrm{VidSet}_d)$ . We tested them on the testing set of $\mathrm{VidSet}_d$ . As shown in Fig. 8, our dynamic-scene dataset can greatly improve most of these deep homography estimation networks in handling dynamic scenes. + +Effect of the dynamic area size. To examine how our methods work on images with a various amount of dynamic + +![](images/f626ed4a6e956136bd4f27b3affb521789dec4bf9cea3f69778c614ae4674e2c.jpg) +Figure 9. Effect of the size of dynamic area. Compared to existing deep homography estimation methods, such as DHN [9] and PFNet [32], our methods are robust against a large dynamic area. content, we calculate the dynamic area ratio of each example. Then, we create multiple versions of the testing set. For each set, we select a dynamic area ratio threshold and only include examples with the dynamic area ratio smaller than that threshold. We then test our methods on these testing sets. As reported in Fig. 9, both of our methods, MHN and $\mathrm{MHN}_m$ are more stable than the other deep homography methods when the dynamic area increases. + +# 5.3. Discussions + +Scale selection. An important hyper-parameter of our multi-scale neural network is the number of scales. We found that when increasing the number of scales from one to three, our network can be trained significantly faster. As shown in Fig. 10, it can handle larger global motion. But when the number of scale goes beyond three, the training becomes unstable. We attribute this to the very small image size that is processed by the first base neural network. This is similar to what Chang et al. reported [8]. + +Real-world videos. We experimented on videos from the NUS stabilization benchmark [20]. We estimate the homography between two frames that are ten frames apart. Fig. 11 shows several challenging examples with significant scene motion and lack of texture in the static background. We visualize each homography estimation result by first using the homography to warp $\mathrm{Frame}_0$ to align with $\mathrm{Frame}_{10}$ and then creating a red-cyan anaglyph from the warped $\mathrm{Frame}_0$ and $\mathrm{Frame}_{10}$ . Specifically, we take the red channel from $\mathrm{Frame}_{10}$ and the cyan channel from the warped $\mathrm{Frame}_0$ and merge these channels into an anaglyph image. Any non-boundary colorful pixels not on a moving object indicate misalignment. While our network is trained using synthetic examples (using ground truth homography estimated from images having dynamic objects and static background), it works well with the real videos. Fig. 11 also shows that our network can accurately identify the dynamic content by examining the dynamics masks. + +Parallax. Although there is no parallax in the static background in our training set, our network can handle parallax well for the above real-world examples. Since no homography in theory can perfectly account for the parallax in an image pair, we examine how our network handles it. To + +![](images/fbf3f3fe61d932674a1dd932f53a8a2102ef636e237dcc0e901f7345b201c429.jpg) +Figure 10. Effect of the number of scales in our multi-scale homography estimation network on MS-COCO. + +this end, we test our method on examples from optical flow benchmarks, namely Middlebury [2] and Sintel [6]. In this test, we use our method to estimate the homography between two frames, align them using the estimated homography, and finally compute optical flow between the two aligned frames. As shown in Fig. 12 (c), there is little motion in the background, while the objects that are close to the camera are not aligned. This suggests that our method finds a homography that accounts for the motion in an as-large-as possible area while treating the foreground objects as outliers. As also shown in Fig. 12 (d), our method identifies the foreground object in each example that is far away from the background plane in the dynamics map. Note, while the foreground objects do not move, they are outliers for homography estimation similar to a moving object. + +# 6. Conclusion + +This paper studied the problem of estimating homography for dynamic scenes. We first collected a large video dataset of dynamic scenes. We developed a multi-scale, multi-stage deep neural network that can handle large global motion and achieve the state-of-the-art homography estimation results when trained and tested on examples derived from the MS-COCO dataset. We further showed that this multi-scale network, when trained on our dynamic-scene dataset, can already handle dynamic scenes to some extent. We then extended this multi-scale network by jointly estimating the dynamics masks and homographies. The dynamics masks enable our method to deal with dynamic scenes better. Our experiments showed that our deep homography neural networks can handle challenging scenarios, such as dynamic scenes, blurriness, and lack of texture. + +Acknowledgements. Fig. 1 (top), Fig. 11, 12 (top), and Fig. 12 (bottom) originate from MS-COCO [19], NUS [20], Middlebury [2], and Sintel [6] datasets respectively. Fig. 1 (bottom) and Fig. 2 are used under a Creative Commons license from Youtube users Nikki Limo, chad schollmeyer, Lumnah Acres, Liziqi, Dielectric Videos, and 3DMachines. We thank Luke Ding for helping develop our dataset. + +![](images/e7f2fb524d50ad15afecd3e10e23ac12b05969a919db0b5201f1c487053ee4ff.jpg) + +![](images/dc24c23abe89b2ec3dafab59532674859372f598cf1273f7623007d04e43f417.jpg) + +![](images/65eb8ca3561b65aad048c68588cc265e2752f7b649bcd530d0e99ee7f78b5d0b.jpg) + +![](images/793a90afd4e872ec636cf92c3027219b852561107806e67b829258322a97b8dd.jpg) + +![](images/373ed2c671ca63d5da5d81b0415c37d9335c1c0c780e8bad04730d1620754800.jpg) + +![](images/7584c7ffa4e15b02a544c365955f7150a45a6717dcaa9ef05fb1313a6a759095.jpg) + +![](images/45a6f9b0fa349fcfafc26df764c191500858e2a2a721cf33eb3689c44c881ebb.jpg) + +![](images/5ffe0cc22e4ca4b59313f4ba406a7c3924ceea00e95c29fb9a9b99219e2e4e89.jpg) + +![](images/76a20a1baad4e6a000735b9f5714a2cc1b9de596aefb37ce5b81116825ea0fca.jpg) + +![](images/e790bf0737b10eb5505b340d80779b28f40f8562308d4f0e02248f495430bb5f.jpg) + +![](images/dff878fdbc2d92f7b48d868ab79afb708cbe3b2ba0c626fbf64140c3ab5e283c.jpg) + +![](images/2bb8bb57378aef6e2c4dda8316125dd794e4a3e3e305a9eee64214533f16e651.jpg) + +![](images/8beadccd347ebe0559c03850ff03dcb345220caa25c36824947e52b6fff85834.jpg) + +![](images/a2572d0a6a572b1cc833a97df491d5805f948c55ce8ee0d3defa9add0036214b.jpg) + +![](images/9c5a947396caadccb8b080ec029971e8c72bc7d1df8e1a9b7ca997e9fe05ae26.jpg) + +![](images/62c2fcc5edc7c85a9436f546928e730e5eaf8c0e1c6c0031ab2aee3c137d0de8.jpg) +Frame + +![](images/c01b5d77806ae9a3f568e65fb39e05adcaf95ef149b2393580f57f573064455e.jpg) +Frame10 + +![](images/b1dd2a06a92f6501423e2734131c2d3defc540048033fc501c779040d873ce87.jpg) +SIFT+RANSAC + +![](images/3b68d5189f179b8b4df73dc5efcab5304f7e2bfdc0434d8d58b7cb6b63121690.jpg) +Our Result + +![](images/3215633fa96411a087b99ac863e021a200fa40348ee8b20d0023de2e50691010.jpg) +Dynamics Mask + +![](images/2c3ebcfc213d53fa76f09e310a67f55c5a04a540b629348a8ae88b543743e025.jpg) +Figure 11. Real-world video examples from the NUS video stabilization benchmark [20]. We estimate homography for pairs of frames that are 10 frames apart. Each homography result is visualized using the red-cyan anaglyph that takes its red channel from $\mathrm{Frame}_{10}$ and the cyan channel from the warped $\mathrm{Frame}_0$ . Any non-boundary colorful pixels not on a moving object indicate misalignment. + +![](images/70f010300f0a618ac9127de3bb164b2ef8bb1940be8191e0fa40723fd2d49a33.jpg) + +![](images/b8fcda1398c4ea8644a1f50c5319527e77cf9efbe2a4eadd0f4aca33be82232b.jpg) + +![](images/645c3098ae0a5e1ae3c659995c4846b7188a7f06adcbca8dcbb402b02910d069.jpg) + +![](images/b85977386e55c5759ed148693f1d60fd3c2a31aa384b4fa01251ccb551099239.jpg) +(a) Frame0 + +![](images/9fed894f878f2b4af1fe9ca612521953d3188d645e5b33c30e38ffa4a9d63eb7.jpg) +(b) Original optical flow + +![](images/c9c04aa2e83868a3ef6d76625aadd84dea4df9893ff5f7c5ba7a7a1267c276bc.jpg) +(c) Flow after alignment + +![](images/dca1afe52517a0c23a7dcb8d39761d2e9ffa786dff42f9e75e2eeb36b3b16cc5.jpg) +(d) Dynamics Mask +Figure 12. Evaluation on parallax. These examples show that after a pair of images are aligned, there is little motion in the background as shown in (c). This suggests that our method finds a homography that accounts for the motion in an as-large-as-possible area. As shown in (d), our method treats foreground objects as outliers in the same way as they treat dynamic content. + +# References + +[1] Simon Baker and Iain Matthews. Lucas-kanade 20 years on: A unifying framework. International journal of computer vision, 56(3):221-255, 2004. 4 +[2] Simon Baker, Daniel Scharstein, JP Lewis, Stefan Roth, Michael J Black, and Richard Szeliski. A database and evaluation methodology for optical flow. International Journal of Computer Vision, 92(1):1-31, 2011. 7 +[3] Daniel Barath, Jiri Matas, and Jana Noskova. Magsac: marginalizing sample consensus. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 10197-10205, 2019. 2, 5 +[4] Herbert Bay, Tinne Tuytelaars, and Luc Van Gool. Surf: Speeded up robust features. In European conference on computer vision, pages 404-417. Springer, 2006. 2 +[5] Christopher M Bishop. Pattern recognition and machine learning. Springer Science+ Business Media, 2006. 5 +[6] D. J. Butler, J. Wulff, G. B. Stanley, and M. J. Black. A naturalistic open source movie for optical flow evaluation. In European Conf. on Computer Vision, pages 611-625, 2012. 7 +[7] Rich Caruana. Multitask learning: A knowledge-based source of inductive bias. In Proceedings of the Tenth International Conference on International Conference on Machine Learning, pages 41-48, 1993. 5 +[8] Che-Han Chang, Chun-Nan Chou, and Edward Y Chang. Clkn: Cascaded lucas-kanade networks for image alignment. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2213–2221, 2017. 1, 3, 4, 6, 7 +[9] Daniel DeTone, Tomasz Malisiewicz, and Andrew Rabinovich. Deep image homography estimation. arXiv preprint arXiv:1606.03798, 2016. 1, 2, 3, 4, 6, 7 +[10] Jakob Engel, Thomas Schöps, and Daniel Cremers. Ldslam: Large-scale direct monocular slam. In European conference on computer vision, pages 834-849. Springer, 2014. 1 +[11] Farzan Erlik Nowruzi, Robert Laganiere, and Nathalie Japkowicz. Homography estimation from image pairs with hierarchical convolutional networks. In Proceedings of The IEEE International Conference on Computer Vision Workshop, pages 913-920, 2017. 1, 3, 4 +[12] Martin A Fischler and Robert C Bolles. Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography. Communications of the ACM, 24(6):381-395, 1981. 2 +[13] Christian Forster, Matia Pizzoli, and Davide Scaramuzza. Svo: Fast semi-direct monocular visual odometry. In 2014 IEEE international conference on robotics and automation (ICRA), pages 15-22. IEEE, 2014. 1 +[14] Michael L Gleicher and Feng Liu. Re-cinematography: improving the camera dynamics of casual video. In Proceedings of the 15th ACM international conference on Multimedia, pages 27-36, 2007. 1 +[15] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Pro + +ceedings of the thirteenth international conference on artificial intelligence and statistics, pages 249-256, 2010. 5 +[16] Richard Hartley and Andrew Zisserman. Multiple View Geometry in Computer Vision. Cambridge University Press, 2003. 2 +[17] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning, pages 448-456, 2015. 4 +[18] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference for Learning Representations, 2015. 5 +[19] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft COCO: Common objects in context. In Computer Vision - ECCV 2014, pages 740-755. Springer International Publishing, 2014. 3, 6, 7 +[20] Shuaicheng Liu, Lu Yuan, Ping Tan, and Jian Sun. Bundled camera paths for video stabilization. ACM Transactions on Graphics, 32(4):78, 2013. 7, 8 +[21] David G Lowe. Distinctive image features from scale-invariant keypoints. International journal of computer vision, 60(2):91-110, 2004. 1, 2, 5 +[22] Zixin Luo, Tianwei Shen, Lei Zhou, Jiahui Zhang, Yao Yao, Shiwei Li, Tian Fang, and Long Quan. Contextdesc: Local descriptor augmentation with cross-modality context. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2527-2536, 2019. 5 +[23] Zixin Luo, Tianwei Shen, Lei Zhou, Siyu Zhu, Runze Zhang, Yao Yao, Tian Fang, and Long Quan. Geodesc: Learning local descriptors by integrating geometry constraints. In Proceedings of the European Conference on Computer Vision (ECCV), pages 168-183, 2018. 5 +[24] Yasuyuki Matsushita, Eyal Ofek, Weina Ge, Xiaou Tang, and Heung-Yeung Shum. Full-frame video stabilization with motion inpainting. IEEE Transactions on Pattern Analysis & Machine Intelligence, (7):1150-1163, 2006. 1 +[25] Dmytro Mishkin, Filip Radenovic, and Jiri Matas. Repeatability is not enough: Learning affine regions via discriminability. In Proceedings of the European Conference on Computer Vision (ECCV), pages 284-300, 2018. 5 +[26] Ty Nguyen, Steven W Chen, Shreyas S Shivakumar, Camillo Jose Taylor, and Vijay Kumar. Unsupervised deep homography: A fast and robust homography estimation model. IEEE Robotics and Automation Letters, 3(3):2346-2353, 2018. 1, 2, 4 +[27] Yuki Ono, Eduard Trulls, Pascal Fua, and Kwang Moo Yi. LF-Net: Learning local features from images. In S Bengio, H Wallach, H Larochelle, K Grauman, N Cesa-Bianchi, and R Garnett, editors, Advances in Neural Information Processing Systems 31, pages 6234–6244. Curran Associates, Inc., 2018. 5 +[28] Sebastian Ruder. An overview of multi-task learning in deep neural networks. arXiv preprint arXiv:1706.05098, 2017. 5 +[29] Jianbo Shi et al. Good features to track. In 1994 Proceedings of IEEE conference on computer vision and pattern recognition, pages 593-600, 1994. 2 + +[30] Deqing Sun, Xiaodong Yang, Ming-Yu Liu, and Jan Kautz. Models matter, so does training: An empirical study of CNNs for optical flow estimation. IEEE Trans. Pattern Anal. Mach. Intell., Jan. 2019. 3, 5 +[31] Richard Szeliski et al. Image alignment and stitching: A tutorial. Foundations and Trends in Computer Graphics and Vision, 2(1):1-104, 2007. 1 +[32] Rui Zeng, Simon Denman, Sridha Sridharan, and Clinton Fookes. Rethinking planar homography estimation using perspective fields. In Asian Conference on Computer Vision, pages 571-586. Springer, 2018. 3, 6, 7 +[33] Fan Zhang and Feng Liu. Parallax-tolerant image stitching. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3262-3269, 2014. 1 \ No newline at end of file diff --git a/deephomographyestimationfordynamicscenes/images.zip b/deephomographyestimationfordynamicscenes/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..65f9bbef74f704955c249cd8d91a44b1e90274f4 --- /dev/null +++ b/deephomographyestimationfordynamicscenes/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd77372653f6c3b36d20df1050be11f9fcc071f93b30606ec9f989569cf27e42 +size 713524 diff --git a/deephomographyestimationfordynamicscenes/layout.json b/deephomographyestimationfordynamicscenes/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..3b95f80460019acb259f6b2e74d43a7aa984bb9f --- /dev/null +++ b/deephomographyestimationfordynamicscenes/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd6fd7e013e52818c6c94813b0397c2a57ee05739df3d0b25b18ca97cf1e4ee3 +size 441859 diff --git a/deepimagespatialtransformationforpersonimagegeneration/f1c676d6-729c-46ad-a716-290f920b2b1f_content_list.json b/deepimagespatialtransformationforpersonimagegeneration/f1c676d6-729c-46ad-a716-290f920b2b1f_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..86061e6a307b38865ed605ee37bfd88b289225b0 --- /dev/null +++ b/deepimagespatialtransformationforpersonimagegeneration/f1c676d6-729c-46ad-a716-290f920b2b1f_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19a6bd1f9904b9468538ba5aa2dec763f83658af2cc9da10532c5c0d3a500edc +size 69670 diff --git a/deepimagespatialtransformationforpersonimagegeneration/f1c676d6-729c-46ad-a716-290f920b2b1f_model.json b/deepimagespatialtransformationforpersonimagegeneration/f1c676d6-729c-46ad-a716-290f920b2b1f_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b636896f7ff14519e9b7da244841d84f55a9112e --- /dev/null +++ b/deepimagespatialtransformationforpersonimagegeneration/f1c676d6-729c-46ad-a716-290f920b2b1f_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51dc599dbb7779c366617463aa63746b23292b80b0182d968da5137a78ed1eb5 +size 85312 diff --git a/deepimagespatialtransformationforpersonimagegeneration/f1c676d6-729c-46ad-a716-290f920b2b1f_origin.pdf b/deepimagespatialtransformationforpersonimagegeneration/f1c676d6-729c-46ad-a716-290f920b2b1f_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..38fe011a1330cae8773102d638d13ca583f5c43d --- /dev/null +++ b/deepimagespatialtransformationforpersonimagegeneration/f1c676d6-729c-46ad-a716-290f920b2b1f_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3f3d8fb2a469074e0b03003bb5971098de4be7bf490a80ea9d507c93e66e453 +size 1782288 diff --git a/deepimagespatialtransformationforpersonimagegeneration/full.md b/deepimagespatialtransformationforpersonimagegeneration/full.md new file mode 100644 index 0000000000000000000000000000000000000000..33cd4b61b2f549daa2b114f8e8469a1461f66e43 --- /dev/null +++ b/deepimagespatialtransformationforpersonimagegeneration/full.md @@ -0,0 +1,302 @@ +# Deep Image Spatial Transformation for Person Image Generation + +Yurui Ren $^{1,2}$ Xiaoming Yu $^{1,2}$ Junming Chen $^{1,2}$ Thomas H. Li $^{3,1}$ Ge Li $\boxtimes^{1,2}$ $^{1}$ School of Electronic and Computer Engineering, Peking University $^{2}$ Peng Cheng Laboratory + $^{3}$ Advanced Institute of Information Technology, Peking University + +{yrren,xiaomingyu,junming.chen}@pku.edu.cn tli@aiit.org.cn geli@ece.pku.edu.cn + +# Abstract + +Pose-guided person image generation is to transform a source person image to a target pose. This task requires spatial manipulations of source data. However, Convolutional Neural Networks are limited by the lack of ability to spatially transform the inputs. In this paper, we propose a differentiable global-flow local-attention framework to reassemble the inputs at the feature level. Specifically, our model first calculates the global correlations between sources and targets to predict flow fields. Then, the flowed local patch pairs are extracted from the feature maps to calculate the local attention coefficients. Finally, we warp the source features using a content-aware sampling method with the obtained local attention coefficients. The results of both subjective and objective experiments demonstrate the superiority of our model. Besides, additional results in video animation and view synthesis show that our model is applicable to other tasks requiring spatial transformation. Our source code is available at https://github.com/RenYurui/Global-Flow-Local-Attention. + +# 1. Introduction + +Image spatial transformation can be used to deal with the generation task where the output images are the spatial deformation versions of the input images. Such deformation can be caused by object motions or viewpoint changes. Many conditional image generation tasks can be seen as a type of spatial transformation tasks. For example, pose-guided person image generation [20, 25, 27, 40, 28, 29] transforms a person image from a source pose to a target pose while retaining the appearance details. As shown in Figure 1, this task can be tackled by reasonably reassembling the input data in the spatial domain. + +However, Convolutional Neural Networks (CNNs) are inefficient to spatially transform the inputs. CNNs calculate the outputs with a particular form of parameter sharing, which leads to an important property called equiv + +![](images/c600e1c00cbc8514f5aee69b6133936bfa00604104b55c656daf06d77aa6d54f.jpg) +Figure 1. The visualization of data spatial transformation. For each image pair, the left image is the generated result of our model, while the right image is the input source image. Our model spatially transforms the information from sources to targets at the features level. The heat maps indicate the attention coefficients. + +ariance to transformation [5]. It means that if the input spatially shifts the output shifts in the same way. This property can benefit tasks such as segmentation [4, 8], detection [26, 11] and image translation with aligned structures [12, 34] etc. However, it limits the networks by lacking abilities to spatially rearrange the input data. Spatial Transformer Networks (STN) [13] solves this problem by introducing a Spatial Transformer module to standard neural networks. This module regresses global transformation parameters and warps input features with an affine transformation. However, since it assumes a global affine transformation between sources and targets, this method cannot deal with the transformations of non-rigid objects. + +Attention mechanism [30, 35] allows networks to take use of non-local information, which gives networks abilities to build long-term correlations. It has been proved to be efficient in many tasks such as natural language processing [30], image recognition [32, 10], and image generation [35]. However, for spatial transformation tasks in which target images are the deformation results of source images, each output position has a clear one-to-one relationship with the source positions. Therefore, the attention coefficient matrix between the source and target should be a sparse matrix instead of a dense matrix. + +Flow-based operation forces the attention coefficient matrix to be a sparse matrix by sampling a very local source patch for each output position. These methods predict 2-D + +coordinate offsets specifying which positions in the sources could be sampled to generate the targets. However, in order to stabilize the training, most of the flow-based methods [39, 3] warp input data at the pixel level, which limits the networks to be unable to generate new contents. Meanwhile, large motions are difficult to be extracted due to the requirement of generating full-resolution flow fields [21]. Warping the inputs at the feature level can solve these problems. However, the networks are easy to be stuck within bad local minima [22, 33] due to two reasons. (1) The input features and flow fields are mutually constrained. The input features can not obtain reasonable gradients without correct flow fields. The network also cannot extract similarities to generate correct flow fields without reasonable features. (2) The poor gradient propagation provided by the commonly used Bilinear sampling method further lead to instability in training [14, 22]. + +In order to deal with these problems, in this paper, we combine flow-based operation with attention mechanisms. We propose a novel global-flow local-attention framework to force each output location to be only related to a local feature patch of sources. The architecture of our model can be found in Figure 2. Specifically, our network can be divided into two parts: Global Flow Field Estimator and Local Neural Texture Renderer. The Global Flow Filed Estimator is responsible for extracting the global correlations and generating flow fields. The Local Neural Texture Renderer is used to sample vivid source textures to targets according to the obtained flow fields. To avoid the poor gradient propagation of the Bilinear sampling, we propose a local attention mechanism as a content-aware sampling method. We compare our model with several state-of-the-art methods. The results of both subjective and objective experiments show the superior performance of our model. We also conduct comprehensive ablation studies to verify our hypothesis. Besides, we apply our model to other tasks requiring spatial transformation manipulation including view synthesis and video animation. The results show the versatility of our module. The main contributions of our paper can be summarized as: + +- A global-flow local-attention framework is proposed for the pose-guided person image generation task. Experiments demonstrate the effectiveness of the proposed method. +- The carefully-designed framework and content-aware sampling operation ensure that our model is able to warp and reasonably reassemble the input data at the feature level. This operation not only enables the model to generate new contents, but also reduces the difficulty of the flow field estimation task. +- Additional experiments on view synthesis and video animation show that our model can be flexibly applied to different tasks requiring spatial transformation. + +# 2. Related Work + +Pose-guided Person Image Generation. An early attempt [20] on the pose-guided person image generation task proposes a two-stage network to first generate a coarse image with target pose and then refine the results in an adversarial way. Essner et al. [2] try to disentangle the appearance and pose of person images. Their model enables both conditional image generation and transformation. However, they use U-Net based skip connections, which may lead to feature misalignments. Siarohin et al. [25] solve this problem by introducing deformable skip connections to spatially transform the textures. It decomposes the overall deformation by a set of local affine transformations (e.g. arms and legs etc.). Although it works well in person image generation, the requirement of the pre-defined transformation components limits its application. Zhu et al. [40] propose a more flexible method by using a progressive attention module to transform the source data. However, useful information may be lost during multiple transfers, which may result in blurry details. Han et al. [7] use a flow-based method to transform the source information. However, they warp the sources at the pixel level, which means that further refinement networks are required to fill the holes of occlusion contents. Liu et al. [18] and Li et al. [16] warp the inputs at the feature level. But both of them need additional 3D human models to calculate the flow fields between sources and targets, which limits the application of these models. Our model does not require any supplementary information and obtains the flow fields in an unsupervised manner. + +Image Spatial Transformation. Many methods have been proposed to enable the spatial transformation capability of Convolutional Neural Networks. Jaderberg et al. [13] introduce a differentiable Spatial Transformer module that estimates global transformation parameters and warps the features with affine transformation. Several variants have been proposed to improve the performance. Zhang et al. add controlling points for free-form deformation [36]. The model proposed in paper [17] sends the transformation parameters instead of the transformed features to the network to avoid sampling errors. Jiang et al. [14] demonstrate the poor gradient propagation of the commonly used Bilinear sampling. They propose a linearized multi-sampling method for spatial transformation. + +Flow-based methods are more flexible than affine transformation methods. They can deal with complex deformations. Appearance flow [39] predicts flow fields and generates the targets by warping the sources. However, it warps image pixels instead of features. This operation limits the model to be unable to generate new contents. Besides, it requires the model to predict flow fields with the same resolution as the result images, which makes it difficult for the model to capture large motions [41, 21]. Vid2vid [31] deals with these problems by predicting the ground-truth + +![](images/0162fda3cbba988bc4559dd8497c53467110874a1f1542721df3474963115546.jpg) +Figure 2. Overview of our model. The Global Flow Field Estimator is used to generate flow fields. The Local Neural Texture Renderer yields results by spatially transforming the source features using local attention. Dotted lines indicate that our local attention module can be used at different scales. + +flow fields using FlowNet [3] first and then trains their flow estimator in a supervised manner. They also use a generator for occluded content generation. Warping the sources at the feature level can avoid these problems. In order to stabilize the training, some papers propose to obtain the flow-fields by using some assumptions or supplementary information. Paper [24] assumes that keypoints are located on object parts that are locally rigid. They generate dense flow fields from sparse keypoints. Papers [18, 16] use the 3D human models and the visibility maps to calculate the flow fields between sources and targets. Paper [22] proposes a sampling correctness loss to constraint flow fields and achieve good results. + +# 3. Our Approach + +For the pose-guided person image generation task, target images are the deformation results of source images, which means that each position of targets is only related to a local region of sources. Therefore, we design a global-flow local-attention framework to reasonably sample and reassemble source features. Our network architecture is shown in Figure 2. It consists of two modules: Global Flow Field Estimator $F$ and Local Neural Texture Processor $G$ . The Global Flow Field Estimator is responsible for estimating the motions between sources and targets. It generates global flow fields $\mathbf{w}$ and occlusion masks $\mathbf{m}$ for the local attention blocks. With $\mathbf{w}$ and $\mathbf{m}$ , the Local Neural Texture Processor renders the target images with vivid source features using the local attention blocks. We describe the + +details of these modules in the following sections. Please note that to simplify the notations, we describe the network with a single local attention block. As shown in Figure 2, our model can be extended to use multiple attention blocks at different scales. + +# 3.1. Global Flow Field Estimator + +Let $\mathbf{p}_s$ and $\mathbf{p}_t$ denote the structure guidance of the source image $\mathbf{x}_s$ and the target image $\mathbf{x}_t$ respectively. Global Flow Field Estimator $F$ is trained to predict the motions between $\mathbf{x}_s$ and $\mathbf{x}_t$ in an unsupervised manner. It takes $\mathbf{x}_s$ , $\mathbf{p}_s$ and $\mathbf{p}_t$ as inputs and generates flow fields $\mathbf{w}$ and occlusion masks $\mathbf{m}$ . + +$$ +\mathbf {w}, \mathbf {m} = F \left(\mathbf {x} _ {s}, \mathbf {p} _ {s}, \mathbf {p} _ {t}\right) \tag {1} +$$ + +where $\mathbf{w}$ contains the coordinate offsets between sources and targets. The occlusion mask $\mathbf{m}$ with continuous values between 0 and 1 indicates whether the information of a target position exists in the sources. We design $F$ as a fully convolutional network. $\mathbf{w}$ and $\mathbf{m}$ share all weights of $F$ other than their output layers. + +As the labels of the flow fields $\mathbf{w}$ are always unavailable in this task, we use the sampling correctness loss proposed by [22] to constraint $\mathbf{w}$ . It calculates the similarity between the warped source feature and ground-truth target feature at the VGG feature level. Let $\mathbf{v}_s$ and $\mathbf{v}_t$ denote the features generated by a specific layer of VGG19. $\mathbf{v}_{s,\mathbf{w}} = \mathbf{w}(\mathbf{v}_s)$ is the warped results of the source feature $\mathbf{v}_s$ using $\mathbf{w}$ . The sampling correctness loss calculates the relative cosine sim + +![](images/00575da45ef0d47fbec1e6012d84db10b2b90ddba96558ff17b2e45957bbb609.jpg) +Figure 3. Overview of our Local Attention. We first extract the feature patch pair from the source and target according to the flow fields. Then the context-aware sampling kernel is calculated by the kernel prediction net. Finally, we sample the source feature and obtain the warped result located at $l$ . + +The similarity between $\mathbf{v}_{s,\mathbf{w}}$ and $\mathbf{v}_t$ . + +$$ +\mathcal {L} _ {c} = \frac {1}{N} \sum_ {l \in \Omega} e x p \left(- \frac {\mu \left(\mathbf {v} _ {s , \mathbf {w}} ^ {l} , \mathbf {v} _ {t} ^ {l}\right)}{\mu_ {m a x} ^ {l}}\right) \tag {2} +$$ + +where $\mu (*)$ denotes the cosine similarity. Coordinate set $\Omega$ contains all $N$ positions in the feature maps, and $\mathbf{v}_{s,\mathbf{w}}^l$ denotes the feature of $\mathbf{v}_{s,\mathbf{w}}$ located at the coordinate $l = (x,y)$ . The normalization term $\mu_{max}^l$ is calculated as + +$$ +\mu_ {m a x} ^ {l} = \max _ {l ^ {\prime} \in \Omega} \mu \left(\mathbf {v} _ {s} ^ {l ^ {\prime}}, \mathbf {v} _ {t} ^ {l}\right) \tag {3} +$$ + +It is used to avoid the bias brought by occlusion. + +The sampling correctness loss can constrain the flow fields to sample semantically similar regions. However, as the deformations of image neighborhoods are highly correlated, it would benefit if we could extract this relationship. Therefore, we further add a regularization term to our flow fields. This regularization term is used to punish local regions where the transformation is not an affine transformation. Let $\mathbf{c}_t$ be the 2D coordinate matrix of the target feature map. The corresponding source coordinate matrix can be written as $\mathbf{c}_s = \mathbf{c}_t + \mathbf{w}$ . We use $\mathcal{N}_n(\mathbf{c}_t,l)$ to denote local $n\times n$ patch of $\mathbf{c}_t$ centered at the location $l$ . Our regularization assumes that the transformation between $\mathcal{N}_n(\mathbf{c}_t,l)$ and $\mathcal{N}_n(\mathbf{c}_s,l)$ is an affine transformation. + +$$ +\mathbf {T} _ {l} = \mathbf {A} _ {l} \mathbf {S} _ {l} = \left[ \begin{array}{c c c} \theta_ {1 1} & \theta_ {1 2} & \theta_ {1 3} \\ \theta_ {2 1} & \theta_ {2 2} & \theta_ {2 3} \end{array} \right] \mathbf {S} _ {l} \tag {4} +$$ + +where $\mathbf{T}_l = \left[ \begin{array}{cccc}x_1 & x_2 & \ldots & x_{n\times n}\\ y_1 & y_2 & \ldots & y_{n\times n} \end{array} \right]$ with each coordinate + +$$ +(x _ {i}, y _ {i}) \in \mathcal {N} _ {n} (\mathbf {c} _ {t}, l) \text {a n d} \mathbf {S} _ {l} = \left[ \begin{array}{c c c c} x _ {1} & x _ {2} & \ldots & x _ {n \times n} \\ y _ {1} & y _ {2} & \ldots & y _ {n \times n} \\ 1 & 1 & \ldots & 1 \end{array} \right] +$$ + +with each coordinate $(x_{i},y_{i})\in \mathcal{N}_{n}(\mathbf{c}_{s},l)$ . The estimated affine transformation parameters $\hat{\mathbf{A}}_l$ can be solved using the least-squares estimation as + +$$ +\hat {\mathbf {A}} _ {l} = \left(\mathbf {S} _ {l} ^ {H} \mathbf {S} _ {l}\right) ^ {- 1} \mathbf {S} _ {l} ^ {H} \mathbf {T} _ {l} \tag {5} +$$ + +Our regularization is calculated as the $\ell_2$ distance of the error. + +$$ +\mathcal {L} _ {r} = \sum_ {l \in \Omega} \left\| \mathbf {T} _ {l} - \hat {\mathbf {A}} _ {l} \mathbf {S} _ {l} \right\| _ {2} ^ {2} \tag {6} +$$ + +# 3.2. Local Neural Texture Renderer + +With the flow fields $\mathbf{w}$ and occlusion masks $\mathbf{m}$ , our Local Neural Texture Renderer $G$ is responsible for generating the results by spatially transforming the information from sources to targets. It takes $\mathbf{x}_s$ , $\mathbf{p}_t$ , $\mathbf{w}$ and $\mathbf{m}$ as inputs and generate the result image $\hat{\mathbf{x}}_t$ . + +$$ +\hat {\mathbf {x}} _ {t} = G \left(\mathbf {x} _ {s}, \mathbf {p} _ {t}, \mathbf {w}, \mathbf {m}\right) \tag {7} +$$ + +Specifically, the information transformation occurs in the local attention module. As shown in Figure 2, this module works as a neural renderer where the target bones are rendered by the neural textures of the sources. Let $\mathbf{f}_t$ and $\mathbf{f}_s$ represent the extracted features of target bones $\mathbf{p}_t$ and + +
DeepFashionMarket-1501Number of +Parameters
FIDLPIPSJNDFIDLPIPSMask-LPIPSJND
Def-GAN18.4570.23309.12%25.3640.29940.149623.33%82.08M
VU-Net23.6670.26372.96%20.1440.32110.174724.48%139.36M
Pose-Attn20.7390.25336.11%22.6570.31960.159016.56%41.36M
Intr-Flow16.3140.213112.61%27.1630.28880.140330.85%49.58M
Ours10.5730.234124.80%19.7510.28170.148227.81%14.04M
+ +Table 1. The evaluation results compared with several state-of-the-art methods including Def-GAN [25], VU-Net [2], Pose-Attn[40], and Intr-Flow [16] over dataset DeepFashion [19] and Market-1501 [38]. FID [9] and LPIPS [37] are objective metrics. JND is obtained by human subjective studies. It represents the probability that the generated images are mistaken for real images. + +source images $\mathbf{x}_s$ respectively. We first extract local patches $\mathcal{N}_n(\mathbf{f}_t,l)$ and $\mathcal{N}_n(\mathbf{f}_s,l + \mathbf{w}^l)$ from $\mathbf{f}_t$ and $\mathbf{f}_s$ respectively. The patch $\mathcal{N}_n(\mathbf{f}_s,l + \mathbf{w}^l)$ is extracted using bilinear sampling as the coordinates may not be integers. Then, a kernel prediction network $M$ is used to predict local $n\times n$ kernel $\mathbf{k}_l$ as + +$$ +\mathbf {k} _ {l} = M \left(\mathcal {N} _ {n} \left(\mathbf {f} _ {s}, l + \mathbf {w} ^ {l}\right), \mathcal {N} _ {n} \left(\mathbf {f} _ {t}, l\right)\right) \tag {8} +$$ + +We design $M$ as a fully connected network, where the local patches $\mathcal{N}_n(\mathbf{f}_s,l + \mathbf{w}^l)$ and $\mathcal{N}_n(\mathbf{f}_t,l)$ are directly concatenated as the inputs. The softmax function is used as the non-linear activation function of the output layer of $M$ . This operation forces the sum of $\mathbf{k}_l$ to 1, which enables the stability of gradient backward. Finally, the flowed feature located at coordinate $l = (x,y)$ is calculated using a content-aware attention over the extracted source feature patch $\mathcal{N}_n(\mathbf{f}_s,l + \mathbf{w}^l)$ . + +$$ +\mathbf {f} _ {a t t n} ^ {l} = P \left(\mathbf {k} _ {l} \otimes \mathcal {N} _ {n} \left(\mathbf {f} _ {s}, l + \mathbf {w} ^ {l}\right)\right) \tag {9} +$$ + +where $\otimes$ denotes the element-wise multiplication over the spatial domain and $P$ represents the global average pooling operation. The warped feature map $\mathbf{f}_{attn}$ is obtained by repeating the previous steps for each location $l$ . + +However, not all contents of target images can be found in source images because of occlusion or movements. In order to enable generating new contents, the occlusion mask $\mathbf{m}$ with continuous value between 0 and 1 is used to select features between $\mathbf{f}_{\text{attn}}$ and $\mathbf{f}_t$ . + +$$ +\mathbf {f} _ {\text {o u t}} = (\mathbf {1} - \mathbf {m}) * \mathbf {f} _ {t} + \mathbf {m} * \mathbf {f} _ {\text {a t t n}} \tag {10} +$$ + +We train the network using a joint loss consisting of a reconstruction $\ell_1$ loss, adversarial loss, perceptual loss, and style loss. The reconstruction $\ell_1$ loss is written as + +$$ +\mathcal {L} _ {\ell_ {1}} = \left\| \mathbf {x} _ {t} - \hat {\mathbf {x}} _ {t} \right\| _ {1} \tag {11} +$$ + +The generative adversarial framework [6] is employed to mimic the distributions of the ground-truth $\mathbf{x}_t$ . The adversarial loss is written as + +$$ +\begin{array}{l} \mathcal {L} _ {a d v} = \mathbb {E} \left[ \log \left(1 - D \left(G \left(\mathbf {x} _ {s}, \mathbf {p} _ {t}, \mathbf {w}, \mathbf {m}\right)\right)\right) \right] \\ + \mathbb {E} [ \log D (\mathbf {x} _ {t}) ] \tag {12} \\ \end{array} +$$ + +where $D$ is the discriminator of the Local Neural Texture Processor $G$ . We also use the perceptual loss and style loss introduced by [15]. The perceptual loss calculates $\ell_1$ distance between activation maps of a pre-trained network. It can be written as + +$$ +\mathcal {L} _ {\text {p e r c}} = \sum_ {i} \| \phi_ {i} (\mathbf {x} _ {t}) - \phi_ {i} (\hat {\mathbf {x}} _ {t}) \| _ {1} \tag {13} +$$ + +where $\phi_{i}$ is the activation map of the $i$ -th layer of a pretrained network. The style loss calculates the statistic error between the activation maps as + +$$ +\mathcal {L} _ {\text {s t y l e}} = \sum_ {j} \left\| G _ {j} ^ {\phi} \left(\mathbf {x} _ {t}\right) - G _ {j} ^ {\phi} \left(\hat {\mathbf {x}} _ {t}\right) \right\| _ {1} \tag {14} +$$ + +where $G_{j}^{\phi}$ is the Gram matrix constructed from activation maps $\phi_{j}$ . We train our model using the overall loss as + +$$ +\mathcal {L} = \lambda_ {c} \mathcal {L} _ {c} + \lambda_ {r} \mathcal {L} _ {r} + \lambda_ {\ell_ {1}} \mathcal {L} _ {\ell_ {1}} + \lambda_ {a} \mathcal {L} _ {a d v} + \lambda_ {p} \mathcal {L} _ {p r e c} + \lambda_ {s} \mathcal {L} _ {s t y l e} \tag {15} +$$ + +# 4. Experiments + +# 4.1. Implementation Details + +Datasets. Two datasets are used in our experiments: person re-identification dataset Market-1501 [38] and DeepFashion In-shop Clothes Retrieval Benchmark [19]. Market-1501 contains 32668 low-resolution images $(128 \times 64)$ . The images vary in terms of the viewpoints, background, illumination etc. The DeepFashion dataset contains 52712 high-quality model images with clean backgrounds. We split the datasets with the same method as that of [40]. The personal identities of the training and testing sets do not overlap. + +Metrics. We use Learned Perceptual Image Patch Similarity (LPIPS) proposed by [37] to calculate the reconstruction error. LPIPS computes the distance between the generated images and reference images at the perceptual domain. It indicates the perceptual difference between the inputs. Meanwhile, Fréchet Inception Distance [9] (FID) is employed to measure the realism of the generated images. It calculates the Wasserstein-2 distance between distributions of the generated images and ground-truth images. Besides, + +![](images/9924c4a8d3b0ac7e42c30d0ac0a0be8aa6974e014293d4c8412c017a4e53d447.jpg) +Figure 4. The qualitative comparisons with several state-of-the-art models including Def-GAN [25], VU-Net [2], Pose-Attn[40], and IntraFlow [16]. The left part shows the results of the Fashion dataset. The right part shows the results of the Market-1501 dataset. + +![](images/fd73641ecc1f423cd61719fa3f8f92b42067fca451a2e9a8a26a255bce01ab22.jpg) + +we perform a Just Noticeable Difference (JND) test to evaluate the subjective quality. Volunteers are asked to choose the more realistic image from the data pair of ground-truth and generated images. + +Network Implementation and Training Details. Basically, auto-encoder structures are employed to design our $F$ and $G$ . The residual block is used as the basic component of these models. We train our model using $256 \times 256$ images for the Fashion dataset. Two local attention blocks are used for feature maps with resolutions as $32 \times 32$ and $64 \times 64$ . The extracted local patch sizes are 3 and 5 respectively. For Market-1501, we use $128 \times 64$ images with a single local attention block at the feature maps with resolution as $32 \times 16$ . The extracted patch size is 3. We train our model in stages. The Flow Field Estimator is first trained to generate flow fields. Then we train the whole model in an end-to-end manner. We adopt the ADAM optimizer with the learning rate as $10^{-4}$ . The batch size is set to 8 for all experiments. + +# 4.2. Comparisons + +We compare our method with several stare-of-the-art methods including Def-GAN [25], VU-Net [2], PoseAttn[40] and Intr-Flow [16]. The quantitative evaluation results are shown in Table 1. For the Market-1501 dataset, we + +follow the previous work [20] to calculate the mask-LPIPS to alleviate the influence of the backgrounds. It can be seen that our model achieves competitive results in both datasets, which means that our model can generate realistic results with fewer perceptual reconstruction errors. + +As the subjective metrics may not be sensitive to some artifacts, its results may mismatch with the actual subjective perceptions. Therefore, we implement a just noticeable difference test on Amazon Mechanical Turk (MTurk). This experiment requires volunteers to choose the more realistic image from image pairs of real and generated images. The test is performed over 800 images for each model and dataset. Each image is compared 5 times by different volunteers. The evaluation results are shown in Table 1. It can be seen that our model achieves the best result in the challenging Fashion dataset and competitive results in the Market-1501 dataset. + +The typical results of different methods are provided in Figure 4. For the Fashion dataset, VU-Net and Pose-Attn struggle to generate complex textures since these models lack efficient spatial transformation blocks. Def-GAN defines local affine transformation components (e.g. arms and legs etc.). This model can generate correct textures. However, the pre-defined affine transformations are not sufficient to represent complex spatial variance, which limits the + +
Flow-BasedContent-aware SamplingFIDLPIPS
BaselineN-16.0080.2473
Global-AttnN-18.6160.2575
Bi-SampleYN12.1430.2406
Full ModelYY10.5730.2341
+ +Table 2. The evaluation results of the ablation study. + +performance of the model. Flow-based model Intr-Flow is able to generate vivid textures for front pose images. However, it may fail to generate realistic results for side pose images due to the requirement of generating full-resolution flow fields. Meanwhile, this model needs 3D human models to generate the ground-truth flow fields for training. Our model regresses flow fields in an unsupervised manner. It can generate realistic images with not only the correct global pattern but also the vivid details such as the lace of clothes and the shoelace. For the Market-1501 Dataset, our model can generate correct pose with vivid backgrounds. Artifacts can be found in the results of competitors, such as the sharp edges in Pose-Attn and the halo effects in DefGAN. + +The numbers of model parameters are also provided to evaluate the computation complexity in Table 1. Thanks to our efficient attention blocks, our model does not require a large number of convolution layers. Thus, we can achieve high performance with less than half of the parameters of the competitors. + +# 4.3. Ablation Study + +In this subsection, we train several ablation models to verify our assumptions and evaluate the contribution of each component. + +Baseline. Our baseline model is an auto-encoder convolutional network. We do not use any attention blocks in this model. Images $\mathbf{x}_s$ , $\mathbf{p}_t$ , $\mathbf{p}_s$ are directly concatenated as the model inputs. + +Global Attention Model (Global-Attn). The Global-Attn model is designed to compare the global-attention block with our local-attention block. We use a similar network architecture as our Local Neural Texture Renderer $G$ for this model. The local attention blocks are replaced by global attention blocks where the attention coefficients are calculated by the similarities between the source features $\mathbf{f}_s$ and target features $\mathbf{f}_t$ . + +Bilinear Sampling Model (Bi-Sample). The Bi-Sample model is designed to evaluate the contribution of our content-aware sampling method described in Section 3.2. Both the Global Flow Field Estimator $F$ and Local Neural Texture Renderer $G$ are employed in this model. However, we use the Bilinear sampling as the sampling method in model $G$ . + +Full Model (Ours). We use our proposed global-flow local-attention framework in this model. + +![](images/0a87b5a4666ea37cb4cff62ea04e00261cf103c29bec0cc0f5f74e1725c8ce43.jpg) +Figure 5. Qualitative results of the ablation study. + +![](images/e8ddfdb053ea51505147543bd604b1015e726a0c5ef700ec41b2b2fe678b5e4b.jpg) +Figure 6. The visualization results of different attention modules. The red rectangles indicate the target locations. The heat maps show the attention coefficients. Blue represents low weights. + +The evaluation results of the ablation study are shown in Table 2. Compared with the Baseline, the performance of the Global-Attn model is degraded, which means that unreasonable attention block cannot efficiently transform the information. Improvements can be obtained by using flow-based methods such as the Bi-Sample model and our Full model which force the attention coefficient matrix to be a + +sparse matrix. However, the Bi-Sample model uses a predefined sampling method with a limited sampling receptive field, which may lead to unstable training. Our full model uses a content-aware sampling operation with an adjustable receptive field, which brings further performance gain. + +Subjective comparison of these ablation models can be found in Figure 5. It can be seen that the Baseline and Global-Attn model generate correct structures. However, the textures of the source images are not well-maintained. The possible explanation is that these models generate images by first extracting global features and then propagating the information to specific locations. This process leads to the loss of details. The flow-based methods spatially transform the features. They are able to reconstruct vivid details. However, the Bi-Sample model uses the pre-defined Bilinear sampling method. It cannot find the exact sampling locations, which leads to artifacts in the final results. + +We further provide the visualization of the attention maps in Figure 6. It can be seen that the Global-Attn model struggles to exclude irrelevant information. Therefore, the extracted features are hard to be used to generate specific textures. The Bi-Sample model assigns a local patch for each generated location. However, incorrect features are often flowed due to the limited sampling receptive field. Our Full model using the content-aware sampling method can flexibly change the sampling weights and avoid the artifacts. + +# 5. Application on Other Tasks + +In this section, we demonstrate the versatility of our global-flow local-attention module. Since our model does not require any additional information other than images and structure guidance, it can be flexibly applied to tasks requiring spatial transformation. Two example tasks are shown as follows. + +View Synthesis. View synthesis requires generating novel views of objects or scenes based on arbitrary input views. Since the appearance of different views is highly correlated, the existing information can be reassembled to generate the targets. The ShapeNet dataset [1] is used for training. We generate novel target views using single view input. The results can be found in Figure 7. We provide the results of appearance flow as a comparison. It can be seen that appearance flow struggles to generate occluded contents as they warp image pixels instead of features. Our model generates reasonable results. + +Image Animation. Given an input image and a driving video sequence depicting the structure movements, the image animation task requires generating a video containing the specific movements. This task can be solved by spatially moving the appearance of the sources. We train our model with the real videos in the FaceForensics dataset [23], which contains 1000 videos of news briefings from different reporters. The face regions are cropped for this task. We use + +![](images/df513740380014c337c2f0c6692a8eb3280f362976b0f1eba8145be31b0aecd4.jpg) +Figure 7. Qualitative results of the view synthesis task. We show the results of our model and appearance flow [39] model. Click on the image to start the animation in a browser. + +![](images/fc0bbb81b72b6e3a3c747373759efdc235d98f5f8966bbacb39509d44932943a.jpg) +Figure 8. Qualitative results of the image animation task. Our model generates the results video using reference image and edge guidance. Click on the image to start the animation in a browser. + +the edge maps as the structure guidance. For each frame, the input source frame and the previous generated $n$ frames are used as the references. The flow fields are calculated for each reference. The results can be found in Figure 8. It can be seen that our model generates realistic results with vivid movements. + +# 6. Conclusion + +In this paper, we solve the person image generation task using deep spatial transformation. We analyze the specific reasons causing instable training when warping and transforming sources at the feature level. Targeted solution global-flow local-attention framework is proposed to enable our model to reasonably reassemble the source neural textures. Experiments show that our model can generate target images with correct poses while maintaining vivid details. In addition, the ablation study shows that our improvements help the network find reasonable sampling positions. Finally, we show that our model can be easily extended to address other spatial deformation tasks such as view synthesis and video animation. + +Acknowledgements. This work was supported by Shenzhen Municipal Science and Technology Program (No.JCYJ20170818141146428) and National Natural Science Foundation of China and Guangdong Province Scientific Research on Big Data (No.U1611461). + +# References + +[1] Angel X Chang, Thomas Funkhouser, Leonidas Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, et al. Shapenet: An information-rich 3d model repository. arXiv preprint arXiv:1512.03012, 2015. 8 +[2] Patrick Esser, Ekaterina Sutter, and Björn Ommer. A variational u-net for conditional appearance and shape generation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8857-8866, 2018. 2, 5, 6 +[3] Philipp Fischer, Alexey Dosovitskiy, Eddy Ilg, Philip Häusser, Caner Hazirbaş, Vladimir Golkov, Patrick Van der Smagt, Daniel Cremers, and Thomas Brox. Flownet: Learning optical flow with convolutional networks. arXiv preprint arXiv:1504.06852, 2015. 2, 3 +[4] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 580-587, 2014. 1 +[5] Ian Goodfellow, *Yoshua Bengio*, and Aaron Courville. *Deep learning*. MIT press, 2016. 1 +[6] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014. 5 +[7] Xintong Han, Xiaojun Hu, Weilin Huang, and Matthew R Scott. Clothflow: A flow-based model for clothed person generation. In Proceedings of the IEEE International Conference on Computer Vision, pages 10471-10480, 2019. 2 +[8] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 2961-2969, 2017. 1 +[9] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In Advances in Neural Information Processing Systems, pages 6626-6637, 2017. 5 +[10] Han Hu, Zheng Zhang, Zhenda Xie, and Stephen Lin. Local relation networks for image recognition. arXiv preprint arXiv:1904.11491, 2019. 1 +[11] Jingjia Huang, Nannan Li, Thomas Li, Shan Liu, and Ge Li. Spatial-temporal context-aware online action detection and prediction. IEEE Transactions on Circuits and Systems for Video Technology, 2019. 1 +[12] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1125-1134, 2017. 1 +[13] Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In Advances in neural information processing systems, pages 2017-2025, 2015. 1, 2 +[14] Wei Jiang, Weiwei Sun, Andrea Tagliasacchi, Eduard Trulls, and Kwang Moo Yi. Linearized multi-sampling for differen + +tiable image transformation. Proceedings of the IEEE International Conference on Computer Vision, 2019. 2 +[15] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In European conference on computer vision, pages 694–711. Springer, 2016. 5 +[16] Yining Li, Chen Huang, and Chen Change Loy. Dense intrinsic appearance flow for human pose transfer. In IEEE Conference on Computer Vision and Pattern Recognition, 2019, 2, 3, 5, 6 +[17] Chen-Hsuan Lin and Simon Lucey. Inverse compositional spatial transformer networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2568-2576, 2017. 2 +[18] Wen Liu, Zhixin Piao, Jie Min, Wenhan Luo, Lin Ma, and Shenghua Gao. Liquid warping gan: A unified framework for human motion imitation, appearance transfer and novel view synthesis. In Proceedings of the IEEE International Conference on Computer Vision, pages 5904-5913, 2019. 2, 3 +[19] Ziwei Liu, Ping Luo, Shi Qiu, Xiaogang Wang, and Xiaou Tang. Deepfashion: Powering robust clothes recognition and retrieval with rich annotations. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1096-1104, 2016. 5 +[20] Liqian Ma, Xu Jia, Qianru Sun, Bernt Schiele, Tinne Tuytelaars, and Luc Van Gool. Pose guided person image generation. In Advances in Neural Information Processing Systems, pages 406-416, 2017. 1, 2, 6 +[21] Anurag Ranjan and Michael J Black. Optical flow estimation using a spatial pyramid network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4161-4170, 2017. 2 +[22] Yurui Ren, Xiaoming Yu, Ruonan Zhang, Thomas H. Li, Shan Liu, and Ge Li. Structureflow: Image inpainting via structure-aware appearance flow. In IEEE International Conference on Computer Vision (ICCV), 2019. 2, 3 +[23] Andreas Rössler, Davide Cozzolino, Luisa Verdoliva, Christian Riess, Justus Thies, and Matthias Nießner. Faceforensics: A large-scale video dataset for forgery detection in human faces. arXiv preprint arXiv:1803.09179, 2018. 8 +[24] Aliaksandr Siarohin, Stéphane Lathuilière, Sergey Tulyakov, Elisa Ricci, and Nicu Sebe. Animating arbitrary objects via deep motion transfer. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2377-2386, 2019. 3 +[25] Aliaksandr Siarohin, Enver Sangineto, Stéphane Lathuilière, and Nicu Sebe. Deformable gans for pose-based human image generation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3408-3416, 2018. 1, 2, 5, 6 +[26] Karen Simonyan and Andrew Zisserman. Two-stream convolutional networks for action recognition in videos. In Advances in neural information processing systems, pages 568-576, 2014. 1 +[27] Sijie Song, Wei Zhang, Jiaying Liu, and Tao Mei. Unsupervised person image generation with semantic parsing + +transformation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2357-2366, 2019. 1 +[28] Hao Tang, Dan Xu, Gaowen Liu, Wei Wang, Nicu Sebe, and Yan Yan. Cycle in cycle generative adversarial networks for keypoint-guided image generation. In Proceedings of the 27th ACM International Conference on Multimedia, pages 2052-2060, 2019. 1 +[29] Hao Tang, Dan Xu, Yan Yan, Jason J Corso, Philip HS Torr, and Nicu Sebe. Multi-channel attention selection gans for guided image-to-image translation. arXiv preprint arXiv:2002.01048, 2020. 1 +[30] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008, 2017. 1 +[31] Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, Guilin Liu, Andrew Tao, Jan Kautz, and Bryan Catanzaro. Video-to-video synthesis. arXiv preprint arXiv:1808.06601, 2018. 2 +[32] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7794-7803, 2018. 1 +[33] Jiahui Yu, Zhe Lin, Jimei Yang, Xiaohui Shen, Xin Lu, and Thomas S Huang. Generative image inpainting with contextual attention. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5505-5514, 2018. 2 +[34] Xiaoming Yu, Yuanqi Chen, Shan Liu, Thomas Li, and Ge Li. Multi-mapping image-to-image translation via learning disentanglement. In Advances in Neural Information Processing Systems, pages 2990-2999, 2019. 1 +[35] Han Zhang, Ian Goodfellow, Dimitris Metaxas, and Augustus Odena. Self-attention generative adversarial networks. arXiv preprint arXiv:1805.08318, 2018. 1 +[36] Haoyang Zhang and Xuming He. Deep free-form deformation network for object-mask registration. In Proceedings of the IEEE International Conference on Computer Vision, pages 4251-4259, 2017. 2 +[37] Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 586-595, 2018. 5 +[38] Liang Zheng, Liyue Shen, Lu Tian, Shengjin Wang, Jingdong Wang, and Qi Tian. Scalable person re-identification: A benchmark. In Proceedings of the IEEE international conference on computer vision, pages 1116–1124, 2015. 5 +[39] Tinghui Zhou, Shubham Tulsiani, Weilun Sun, Jitendra Malik, and Alexei A Efros. View synthesis by appearance flow. In European conference on computer vision, pages 286-301. Springer, 2016. 2, 8 +[40] Zhen Zhu, Tengteng Huang, Baoguang Shi, Miao Yu, Bofei Wang, and Xiang Bai. Progressive pose attention transfer for person image generation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2347-2356, 2019. 1, 2, 5, 6 + +[41] Xiaou Tang Yiming Liu Ziwei Liu, Raymond Yeh and Aseem Agarwala. Video frame synthesis using deep voxel flow. In Proceedings of International Conference on Computer Vision (ICCV), October 2017. 2 \ No newline at end of file diff --git a/deepimagespatialtransformationforpersonimagegeneration/images.zip b/deepimagespatialtransformationforpersonimagegeneration/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..2e95d286091e062a1b8cd6962f6aaadcc2c40aed --- /dev/null +++ b/deepimagespatialtransformationforpersonimagegeneration/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bcee61df56ddd30b981d7e4d5097ccb6077dcd562b951c7226df16902026b9ab +size 677497 diff --git a/deepimagespatialtransformationforpersonimagegeneration/layout.json b/deepimagespatialtransformationforpersonimagegeneration/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2634670bfad16a71ddbe23f196d0b6bd1f7be832 --- /dev/null +++ b/deepimagespatialtransformationforpersonimagegeneration/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5435fee0a0c7ab6fa18698d80b654f61ce962fbd2ed98be5d69ca94362036863 +size 374122 diff --git a/deepimplicitvolumecompression/d84836db-7634-45a7-8b6f-23a96d84d5a8_content_list.json b/deepimplicitvolumecompression/d84836db-7634-45a7-8b6f-23a96d84d5a8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..fb3fa7c18f7421e75b3eea65d895ee30d0b6b81e --- /dev/null +++ b/deepimplicitvolumecompression/d84836db-7634-45a7-8b6f-23a96d84d5a8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f1777f4759153b35a02d1dcc056c93514561bd1344d079e79bfbf27550c5da0 +size 76328 diff --git a/deepimplicitvolumecompression/d84836db-7634-45a7-8b6f-23a96d84d5a8_model.json b/deepimplicitvolumecompression/d84836db-7634-45a7-8b6f-23a96d84d5a8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..702cb25987fa0eae27d0808e35638e2423872771 --- /dev/null +++ b/deepimplicitvolumecompression/d84836db-7634-45a7-8b6f-23a96d84d5a8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f67b2649a4a5a03745254e5fe3de678f391a2738d4bd9f15aebad240bab34160 +size 99264 diff --git a/deepimplicitvolumecompression/d84836db-7634-45a7-8b6f-23a96d84d5a8_origin.pdf b/deepimplicitvolumecompression/d84836db-7634-45a7-8b6f-23a96d84d5a8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d0815707138553ea6b0d82d2efcae96a1b0e7253 --- /dev/null +++ b/deepimplicitvolumecompression/d84836db-7634-45a7-8b6f-23a96d84d5a8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d0f38007e426baf054ca9c7c030ee3b575690ce56f1f0e1fa9b43c6687a5e08 +size 3767215 diff --git a/deepimplicitvolumecompression/full.md b/deepimplicitvolumecompression/full.md new file mode 100644 index 0000000000000000000000000000000000000000..30c4ee1e9ba4b7f804a7fab0a241f9442fa6a418 --- /dev/null +++ b/deepimplicitvolumecompression/full.md @@ -0,0 +1,286 @@ +# Deep Implicit Volume Compression + +Danhang Tang* Saurabh Singh* Philip A. Chou Christian Håne Mingsong Dou Sean Fanello Jonathan Taylor Philip Davidson Onur G. Guleryuz Yinda Zhang Shahram Izadi Andrea Tagliausacchi Sofien Bouaziz Cem Keskin + +Google + +# Abstract + +We describe a novel approach for compressing truncated signed distance fields (TSDF) stored in 3D voxel grids, and their corresponding textures. To compress the TSDF, our method relies on a block-based neural network architecture trained end-to-end, achieving state-of-the-art rate-distortion trade-off. To prevent topological errors, we losslessly compress the signs of the TSDF, which also upper bounds the reconstruction error by the voxel size. To compress the corresponding texture, we designed a fast block-based UV parameterization, generating coherent texture maps that can be effectively compressed using existing video compression algorithms. We demonstrate the performance of our algorithms on two 4D performance capture datasets, reducing bitrate by $66\%$ for the same distortion, or alternatively reducing the distortion by $50\%$ for the same bitrate, compared to the state-of-the-art. + +# 1. Introduction + +In recent years, volumetric implicit representations have been at the heart of many 3D and 4D reconstruction approaches [22, 26, 27, 45], enabling novel applications such as real time dense surface mapping in AR devices and free-viewpoint videos. While these representations exhibit numerous advantages, transmitting high quality 4D sequences is still a challenge due to their large memory footprints. Designing efficient compression algorithms for implicit representations is therefore of prime importance to enable the deployment of novel consumer-level applications such as VR/AR telepresence [47], and to facilitate the streaming of free-viewpoint videos [8]. + +In contrast to compressing a mesh, it was recently shown that truncated signed distance fields (TSDF) [15] are highly suitable for efficient compression [31, 59] due to correlation in voxel values and their regular grid structure. Voxel-based SDF representations have been used with great suc + +![](images/ce2f24a8ec5b1495e5e65234f02402febe01139c3c942ac716fc030dfa07a57d.jpg) +Draco(Decimated) (78KB) + +![](images/1c088060186faa478a4f0847d4a8050f54a7dc8bebac32dfd7ca29664a3b0eba.jpg) +Tang et al. (81KB) + +![](images/9e39216fb2da71ff7da7acf902aa9b54ec61e63d47c6370a412ac08099b26ff3.jpg) +Ours (79KB) + +![](images/03477a798a8d4d0ff01714f9a76f2be6b32de8fe33151a9d446271588d1b355d.jpg) +Ours + texture +Figure 1: When targeting a low bitrate, Draco [24] requires decimation to have low-poly meshes as input, while [59] suffers from block artifacts. Our method has visibly lower distortion while maintaining similar bitrates. Raw meshes with flat shading are shown to reveal artifacts. + +cess for 3D shape learning using encoder-decoder architectures [58, 65]. This is in part due to their grid structure that can be naturally processed with 3D convolutions, allowing the use of convolutional neural networks (CNN) that have excelled in image processing tasks. Based on these observations, we propose a novel block-based encoder-decoder neural architecture trained end-to-end, achieving bitrates that are $33\%$ of prior art [59]. We compress and transmit the TSDF signs losslessly; this does not only guarantee that the reconstruction error is upper bounded by the voxel size, but also that the reconstructed surface is homeomorphic – even when lossy TDSF compression is used. Furthermore, we propose using the conditional distribution of the signs given + +the encoded TSDF block to compress the signs losslessly, leading to significant gains in bitrates. This also significantly reduces artifacts in the reconstructed geometry and textures. + +Recent 3D and 4D reconstruction pipelines not only reconstruct accurate geometry, but also generate high quality texture maps, e.g. $4096 \times 4096$ pixels, that need to be compressed and transmitted altogether with the geometry [26]. To complement our TSDF compression algorithm, we developed a fast parametrization method based on block-based charting, which encourages spatio-temporal coherence without tracking. Our approach allows efficient compression of textures using existing image-based techniques and removes the need of compressing and streaming UV coordinates. + +To summarize, we propose a novel block-based 3D compression model with these contributions: + +1. the first deep 3D compression method that can train end-to-end with entropy encoding, yielding state-of-the-art performance; +2. lossless compression of the surface topology using the conditional distribution of the TSDF signs, and thereby bounding the reconstruction error by the size of a voxel; +3. a novel block-based texture parametrization that inherently encourages temporal consistency, without tracking or the necessity of UV coordinates compression. + +# 2. Related works + +Compression of 3D/4D media (e.g., meshes, point clouds, volumes) is a fundamental problem for applications such as VR/AR, yet has received limited attention in the computer vision community. In this section, we describe two main aspects of 3D compression: geometry and texture, as well as reviewing recent trends in learnable compression. + +Geometry compression. Geometric surface representations can either be explicit or implicit. While explicit representations are dominant in traditional computer graphics [4, 13], implicit representations have found widespread use in perception related tasks such as real-time volumetric capture [20, 21, 27, 45]. Explicit representations include meshes, point clouds, and parametric surfaces (NURBS). We refer the reader to the relevant surveys [1, 39, 49] for compression of such representations. Mesh compressors such as Draco [24] use connectivity compression [40, 53] followed by vertex prediction [62]. An alternate strategy is to encode the mesh as geometry images [25], or geometry videos [5] for temporally consistent meshes. Point clouds have been compressed by Sparse Voxel Octrees (SVOs) [28, 41], first used for point cloud geometry compression in [56]. SVOs have been extended to coding dynamic point clouds in [29] and implemented in the Point Cloud Library (PCL) [54]. A version of this library became the anchor (i.e., reference proposal) for the MPEG Point Cloud Codec (PCC) [42]. The MPEG PCC standard is split into video-based PCC (V-PCC) + +and geometry-based PCC (G-PCC) [57]. V-PCC uses geometry video, while G-PCC uses SVOs. Implicit representations include (truncated) signed distance fields (SDFs) [15] and occupancy/indicator functions [30]. These have proved popular for 3D surface reconstruction [15, 19, 20, 22, 36, 45, 59] and general 2D and 3D representation [23]. Implicit functions have recently been employed for geometry compression [7, 32, 59], where the TSDF is encoded directly. + +Texture compression. In computer graphics, textures are images associated with meshes through UV maps. These images can be encoded using standard image or video codec [24]. For point clouds, color is associated with points as attributes. Point cloud attributes can be coded via spectral methods [12, 16, 60, 70] or transform methods [17]. Transform methods are used in MPEG G-PCC [57], and, similarly to TSDFs, have volumetric interpretation [10]. Another approach is to transmit the texture as ordinary video from each camera, and use projective texturing at the receiver [59]. However, the bitrate increases linearly with the number of cameras, and projective texturing can create artifacts when the underlying geometry is compressed. Employing a UV parametrization to store textures is not trivial, as enforcing spatial and temporal consistency can be computationally intensive. On one end of the spectrum, Motion2Fusion [22] sacrifices the spatial coherence typically desired by simply mapping each triangle to an arbitrary position of the atlas, hence sacrificing compression rate for efficiency. On the other extreme, [26, 50] take a step further by tracking features over time to generate a temporally consistent mesh connectivity and UV parametrization, therefore can be compressed with modern video codec. This process is however expensive and cannot be applied to real-time applications. + +Learnable compression strategies. Learnable compression strategies have a long history. Here we focus specifically on neural compression. The use of neural networks for image compression can be traced back to 1980s with auto-encoder models using uniform [44] or vector [38] quantization. However, these approaches were akin to non-linear dimensionality reduction methods and do not learn an entropy model explicitly. More recently Toderici et al. [61] used a recurrent LSTM based architecture to train multi-rate progressive coding models. However, they learned an explicit entropy model as a separate post processing step after the training of recurrent auto-encoding model. Balle et al. [2] proposed an end-to-end optimized image compression model that jointly optimizes the rate-distortion trade-off. This was extended by placing a hierarchical hyperprior on the latent representations to significantly improve the image compression performance [3]. While there has been significant application of deep learning on 3D/4D representations, e.g. [34, 48, 51, 58, 65, 68], application of deep learning to 3D/4D compression has been scant. However, very recent works closely related to ours have used rate-distortion opti + +![](images/94a83f3a0337bc66819db8af33927acb7cecd141a51ee9ffa2de7a7f7071f736.jpg) +Figure 2: Compression pipeline - Given an input TSDF block $\pmb{x}$ and its sign configuration $\mathbf{s} = \mathrm{sign}(\pmb{x})$ , an encoder transforms $\pmb{x}$ into a quantized code $\hat{\mathbf{z}} = \lfloor \mathcal{E}(\pmb{x}) \rfloor$ . Then $\hat{\mathbf{z}}$ and $\mathbf{s}$ are entropy coded and transmitted to the receiver ( $A_{\mathrm{enc}}$ and $A_{\mathrm{dec}}$ blocks) using a prior learned distribution $p_{\hat{\mathbf{z}}}(\hat{\mathbf{z}})$ and the conditional distribution $p_{\mathbf{s}|\hat{\mathbf{z}}}(\mathbf{s}|\hat{\mathbf{z}})$ as estimated by the decoder, respectively. The reconstructed block $\hat{\mathbf{x}} = \mathbf{s} \odot |\mathcal{D}(\hat{\mathbf{z}})|$ is used with marching cubes (MC in the figure) to extract the mesh, which is then used to generate the Morton packed chart $M_x$ . $M_x$ is coded separately (with the $T_{\mathrm{enc}}$ and $T_{\mathrm{dec}}$ blocks). + +mized auto-encoders similar to [3] to perform 3D geometry compression end-to-end: Yan et al. [69] used a PointNet-like encoder combined with a fully-connected decoder, trained to minimize directly the Chamfer distance subject to a rate constraint, on the entire point cloud. Quach et al. [52] performs block-based coding to obtain higher quality on the MVUB dataset [35]. Their network predicts voxel occupancy using a focal loss, which is similar to a weighted binary cross entropy. In the most complete and performant work until now, Wang et al. [64] also uses block-based coding and predicted voxel occupancy, with a weighted binary cross entropy. They reported a $60\%$ bitrate reduction compared to MPEG G-PCC on the high resolution 8iVFB dataset [18] hosted by MPEG, though they report only approximate equivalence with state-of-the-art MPEG V-PCC. + +In contrast, we use block-based coding on even higher resolution datasets, and report bitrates that are at least three times better than MPEG V-PCC, by compressing the TSDF directly rather than occupancy, yielding sub-voxel precision. + +# 3. Background + +Our goal is to compress an input sequence of TSDF volumes $\mathcal{V} = \{\mathcal{V}_t\}_{1}^T$ encoding the geometry of the surface, and their corresponding texture atlases $\mathcal{T} = \{\mathcal{T}_t\}_{1}^T$ , which are both extracted from a multi-view RGBD sequence [26, 59]. Since geometry and texture are quite different, we compress them separately. The two data streams are then fused by the receiver before rendering. To compress the geometry data $\mathcal{V}$ , inspired by the recent advances in learned compression methods, we propose an end-to-end trained compression pipeline taking volumetric blocks as input; see Section 4. Accordingly we also design a block-based UV parametrization algorithm for texture $\mathcal{T}$ ; see Section 5. For those unfamiliar with the topic and notation, we overview fundamentals of compression in the supplementary material. + +# 4. Geometry compression + +There are two primary challenges in end-to-end learning of compression, both of which arise from the non-differentiability of intermediate steps: ① compression is non-differentiable due to the quantization necessary for compression; ② surface reconstruction from TSDF values is typically non-differentiable in popular methods such as Marching Cubes [37]. To tackle ①, we draw inspiration from the recent advances in learned image compression [2, 3]. To tackle ②, we make the observation that Marching Cubes algorithm is differentiable with known topology. + +Computational feasibility of training. The dense TSDF volume data $\mathcal{V} = \{\mathcal{V}_t\}_{t=1}^T$ for an entire sequence is very high dimensional. For example, a sequence from the dataset used in Tang et al. [59] has 500 frames, with each frame containing $240 \times 240 \times 400$ voxels. The high dimensionality of data makes it computationally infeasible to compress the entire sequence jointly. Therefore, following Tang et al. [59], we process each frame independently in a block based manner. From the TSDF volume $\mathcal{V}$ , we extract all non-overlapping blocks $\{\pmb{x}_m\}_1^M$ of size $k \times k \times k$ that contain a zero crossing. We refer to these blocks as occupied blocks, and compress them independently. + +# 4.1. Inference + +The compression pipeline is illustrated in Figure 2. Given a block $\pmb{x}$ to be transmitted, the sender first computes the lossily quantized latent representation $\hat{\mathbf{z}} = \lfloor \mathcal{E}(\pmb{x};\pmb{\theta}_e)\rfloor$ using the learned encoder $\mathcal{E}$ with parameters $\pmb{\theta}_e$ . Next, the sender uses $\hat{\mathbf{z}}$ to compute the conditional probability distribution over the TSDF signs as $p_{\mathbf{s}|\hat{\mathbf{z}}}(\mathbf{s}|\hat{\mathbf{z}};\pmb{\theta}_s)$ , where $\mathbf{s}$ is the ground truth sign configuration of the block, and $\pmb{\theta}_s$ are the learnable parameters of the distribution. The sender then uses an entropy coder to compute the bitstreams $\hat{\mathbf{z}}_{\mathrm{bits}}$ and $\mathbf{s}_{\mathrm{bits}}$ by losslessly coding the latent code $\hat{\mathbf{z}}$ and signs $\mathbf{s}$ using the + +![](images/3c81eb4f763ebae28d1397919e635e7792e7f26283266482ac6c519b934e69c9.jpg) +Figure 3: Topology mask in inference: We illustrate a 2D slice from a block, where each cell represents a voxel. (left) Without masking, the reconstructed surface (red) deviates from the ground truth (green) because of compression error. (mid) Losslessly compressed signs will give us ground truth occupancy/topology during inference. (right) Therefore, the average reconstructed error due to lossy magnitude compression is bounded by the size of a voxel (5mm). + +![](images/a1788905a69a0f38f0355230813855ffdc7d3d2e6955d41deb333dc5ce83741b.jpg) + +![](images/ef128f50ce150a0dd20ba7c20d53ff89a39c2bac1f3b5bebb08b9752f9d645c0.jpg) + +distributions $p_{\hat{\mathbf{z}}}(\hat{\mathbf{z}};\phi)$ and $p_{\mathbf{s}|\hat{\mathbf{z}}}\left(\mathbf{s}|\hat{\mathbf{z}};\boldsymbol {\theta}_s\right)$ respectively. Here $p_{\hat{\mathbf{z}}}(\hat{\mathbf{z}};\phi)$ is a learned prior distribution over $\hat{\mathbf{z}}$ parameterized by $\phi$ . Note that while the prior distribution $p_{\hat{\mathbf{z}}}$ is part of the model and known a priori both to the sender and the receiver, the conditional distribution $p_{\mathbf{s}|\hat{\mathbf{z}}}$ needs to be computed by both. $\hat{\mathbf{z}}_{\mathrm{bits}}$ and $\mathbf{s}_{\mathrm{bits}}$ are then transmitted to the receiver, which first recovers $\hat{\mathbf{z}}$ using entropy decoding with the shared prior $p_{\hat{\mathbf{z}}}$ . The receiver then re-computes $p_{\mathbf{s}|\hat{\mathbf{z}}}$ in order to recover the losslessly coded ground truth signs s. Finally, the receiver recovers the lossy TSDF values by using the learned decoder $\mathcal{D}$ in conjunction with the ground truth signs s as $\hat{\boldsymbol{x}} = \mathbf{s}\odot |\mathcal{D}(\hat{\boldsymbol{z}};\boldsymbol{\theta}_d)|$ where $\odot$ is the element-wise product operator, $|\cdot |$ the element-wise absolute value operator, and $\theta_d$ the parameters of the decoder. + +To stitch the volume together, the block indices are transmitted to the client as well. Similar to [59], the blocks are sorted in an ascending manner, and delta encoding is used to convert the vector of indices to a representation that is entropy encoder friendly. Once the TSDF volume is reconstructed, a triangular mesh can be extracted via marching cubes. Note that for the marching cube algorithm, the polygon configurations are fully determined by the signs. As we transmit the signs losslessly, it is guaranteed that the mesh extracted from the decoded TSDF $\hat{x}$ will have the same topology as the mesh extracted from the uncompressed TSDF $x$ . It follows that the only possible reconstruction errors will be at the vertices that lie on the edges of the voxels. Therefore, the maximum reconstruction error is bounded by the edge length, i.e. the voxel size, as shown in Figure 3. + +# 4.2. Training + +We learn the parameters $\Theta = \{\pmb {\theta}_e,\pmb {\theta}_s,\pmb {\theta}_d,\phi \}$ of our compression model by minimizing the following objective + +$$ +\underset {\Theta} {\arg \min } \underbrace {D _ {\hat {\boldsymbol {x}}} (\boldsymbol {x} , \hat {\boldsymbol {x}} ; \boldsymbol {\theta} _ {e} , \boldsymbol {\theta} _ {d})} _ {\text {d i s t o r t i o n}} + \lambda \left[ \underbrace {R _ {\hat {\boldsymbol {z}}} (\hat {\boldsymbol {z}} ; \phi)} _ {\text {l a t e n t s b i t r a t e}} + \underbrace {R _ {\mathbf {s}} (\mathbf {s} ; \boldsymbol {\theta} _ {s})} _ {\text {s i g n s b i t r a t e}} \right] \tag {1} +$$ + +Distortion $D_{\hat{x}}(\pmb {x},\hat{\pmb{x}};\pmb {\theta}_e,\pmb {\theta}_d)$ .We minimize the reconstruction error between the ground truth and the predicted TSDF values. However, directly computing the squared difference $\| \hat{\pmb{x}} -\pmb {x}\| _2^2$ wastes model complexity on learning to precisely reconstruct values of TSDF voxels that are far away from the surface. In order to focus the network on the important voxels (i.e. the ones with a neighboring voxel of opposing sign), we use the ground truth signs. For each dimension, we create a mask of important voxels, namely $m_x,m_y$ and $m_z$ . Voxels that have more than one neighbor with opposite signs appear in multiple masks, further increasing their weights. We then use these masks to calculate the squared differences for important voxels only $D_{\hat{x}} = \frac{1}{B}\sum_{n = 1}^{B}\sum_{d\in x,y,z}\| m_d\cdot (\hat{x}_n - x_n)\| _2^2,$ for $B$ blocks. + +Rate of latents $R_{\hat{\mathbf{z}}}(\hat{\mathbf{z}}; \phi)$ . A second loss term we employ is $R_{\hat{\mathbf{z}}}$ , which is designed to reduce the bitrate of the compressed codes. This loss is essentially a differentiable estimate of the non-differentiable Shannon entropy of the quantized codes $\hat{\mathbf{z}}$ ; see [2] for additional details. + +Rate of losslessly compressed signs $R_{\mathbf{s}}(\mathbf{s}; \theta_s)$ . Since s contains only discrete values $\{-1, +1\}$ , it can be compressed losslessly using entropy coding. As mentioned above, we use the conditional probability distribution $p_{\mathbf{s}|\hat{\mathbf{z}}}(\mathbf{s}|\hat{\mathbf{z}})$ instead of the prior distribution $p_{\mathbf{s}}(\mathbf{s})$ . Note that the conditional distribution should have a much lower entropy than the priors, since s is dependent on the $\hat{\mathbf{z}}$ by design. This allows us to compress the signs far more efficiently. + +To make this dependency explicit, we add an extra head to the decoder, such that $p_{\mathbf{s}}(\mathbf{s}|\hat{\mathbf{z}}) = \mathcal{D}_s(\hat{\mathbf{z}})$ , and $\hat{\pmb{x}} = \mathbf{s} \odot |\mathcal{D}_b(\hat{\mathbf{z}})|$ . The sign rate loss $R_{\mathrm{s}}$ is then the cross entropy between the ground truth signs $\mathbf{s}$ , with $-1$ remapped to 0, and their conditional predictions $p_{\mathrm{s}}(\mathbf{s}|\hat{\mathbf{z}})$ . Minimizing $R_{\mathrm{s}}$ has the effect of training the network to make better sign predictions, while also minimizing the bitrate of the compressed signs. + +Encoder and Decoder architectures. Our proposed compression technique is agnostic to the choice of the individual architectures for the encoder and decoder. In this work, we targeted a scenario requiring a maximum model size of roughly 2MB, which makes the network suitable for mobile deployment. To limit the number of trainable parameters, we used convolutional networks, where both the encoder and the decoder consist of a series of 3D convolutions and transposed convolutions. More details about the specific architectures can be found in the supplementary material. + +# 5. Texture compression + +We propose a novel efficient and tracking-free UV parametrization method to be seamlessly combined with our block-level geometry compression; see Figure 2. As our parametrization process is deterministic, UV coordinates can be inferred on the receiver side, thus removing the need for compression and transmission of the UV coordinates. + +![](images/1ca9fd1889ea0c7f4b8d79b7cf4564ba386d38855b46556c5228d20886aa0c69.jpg) +Figure 4: Texture packing – (left) 3D blocks and 2D patches are ordered and matched by their Morton codes respectively. This process unwraps the 3D volume to the texture atlas. (right) The UVAtlas [71] only ensures local spatial coherence within each chart, whilst our method encourages global spatial coherence. Refer to the supplementary video for a comparison on temporal coherence. + +![](images/cc7cea000d775f02bcf872855cdca803a78d114eb74b1b6065a8f3ce631e8a14.jpg) + +Block-level charting. Traditional UV mapping either partitions the surface into a few large charts [71], or generates one chart per triangle to avoid UV parametrization as in PTEX [6]. In our case, since the volume has already been divided into fixed-size blocks during geometry compression, it is natural to explore block-level parametrization. To accommodate compression error, the compressed signal is decompressed on the sender side, such that both the sender and receiver have access to identical reconstructed volumes; see Figure 2 (left). Triangles of each occupied block are then extracted and grouped by their normals. Most blocks have only one group, while blocks in more complex areas (e.g. fingers) may have more. The vertices of the triangles in each group are then mapped to UV space as follows: $①$ the average normal in the group is used to determine a tangent space, onto which the vertices in the group are projected; $②$ the projections are rotated until they fit into an axis-aligned rectangle with minimum area, using rotating calipers [63]. This results in deterministic UV coordinates for each vertex in the group relative to a bounding box for the vertex projections; $③$ the bounding boxes for the groups in a block are then sorted by size and packed into a chart using a quadtree-like algorithm. There is exactly one 2D chart for each occupied 3D block. After this packing, the UV coordinates for the vertices in the block are offset to be relative to the chart. These charts are then packed into an atlas, where the UV coordinates for the vertices are again offset to be relative to the atlas, i.e. to be a global UV mapping. After UV parametrization, color information can be obtained from either per-vertex color in the geometry, previously generated atlas or even raw RGB captures. Our method is agnostic to this process. + +Morton packing. In order to optimize compression, the block-level charts need to be packed into an atlas in a way that maximizes spatio-temporal coherence. This is nontrivial, as in our sparse volume data structure the amount and positions of blocks can vary from frame to frame. As- + +summing the movement of the subject is smooth, preserving the 3D spatial structure among blocks during packing is expected to preserve spatio-temporal coherence. To achieve this effect we propose a Morton packing strategy. Morton ordering [43] (also called Z-order curve) has been widely used in 3D graphics to create spatial representations [33]. As our blocks are on a 3D regular grid, each occupied block can be indexed by a triple of integers $(x,y,z)\in \mathbb{Z}^3$ . Each integer has a binary representation, e.g. $x_{B - 1}\dots x_0$ , where $x = \sum_{b = 0}^{B - 1}x_b2^b$ . The 3D Morton code for $(x,y,z)$ is defined as the integer $\mathbf{M}_3(x,y,z) = \sum_{b = 0}^{B - 1}(4y_b + 2x_b + z_b)2^{3b}$ whose binary representation consists of the interleaved bits $y_{B - 1}x_{B - 1}z_{B - 1}\dots y_0x_0z_0$ . Likewise, as our charts are on a 2D regular grid, each chart can be indexed by a pair of integers $(u,v)\in \mathbb{Z}^2$ , whose 2D Morton code is the integer $\mathbf{M}_2(u,v) = \sum_{b = 0}^{B - 1}(2u_b + v_b)2^{2b}$ whose binary representation is $u_{B - 1}v_{B - 1}\dots u_0v_0$ . These functions are invertible simply by demultiplexing the bits. We map the chart for an occupied block at volumetric position $(x,y,z)$ to atlas position $(u,v) = \mathbf{M}_2^{-1}(\text{rank}(\mathbf{M}_3(x,y,z)))$ , where rank is the rank of the 3D Morton code in the list of 3D Morton codes, as illustrated in Figure 4 (left). Note that we choose to prioritize $y$ over $x$ and $z$ when interleaving their bits into the 3D Morton code, as $y$ is the vertical direction in our coordinate system, to accommodate typically standing human figures. Hence, as long as blocks move smoothly in 3D space, corresponding patches are likely to move smoothly in the atlas, leading to an approximate spatio-temporal coherence, and therefore better (video) texture compression efficacy. + +# 6. Evaluation + +To assess our method, we rely on the dataset captured by Tang et al. [59], which consists of six $\sim 500$ frames long RGBD multi-view sequences of different subjects at $30\mathrm{Hz}$ . We use three of them for training and the others + +
Raw dataNaïveOurs
Avg. Size / Volume155.1KB139.8KB2.9KB
+ +Table 1: Lossless sign compression: Our data-driven probability model, combined with an arithmetic coder, can improve the compression rate by $48 \times$ comparing to a naive probability model based on statistics of signs in the dataset. + +for evaluation. We also employ "The Relighttables" dataset by Guo et al. [26], which contains higher quality geometry and higher resolution texture maps - three $\sim 600$ -frame sequences. To demonstrate the generalization of learning-based methods, we only train on the dataset Tang et al. [59], and test on both Tang et al. [59] and Guo et al. [26]. + +# 6.1. Geometry compression + +We evaluate geometry compression using two different metrics: the Hausdorff metric $(\mathbf{H})$ [11] measures the (max) worst-case reconstruction error via: + +$$ +\mathbf {H} (\mathcal {S}, \hat {\mathcal {S}}) = \max \left(\max _ {x \in \mathcal {S} _ {v}} d (x, \hat {\mathcal {S}}), \max _ {y \in \tilde {\mathcal {S}} _ {v}} d (y, \mathcal {S})\right), \tag {2} +$$ + +where $S_{v}$ and $\hat{S}_v$ are the set of points on the ground truth and decoded surface respectively. $d(\mathbf{x},\mathcal{S})$ is the shortest Euclidean distance from a point $\mathbf{x}\in \mathbb{R}^3$ to the surface $S$ . Another metric is the symmetric Chamfer distance (C): + +$$ +\mathbf {C} (\mathcal {S}, \hat {\mathcal {S}}) = \frac {1}{2 | \mathcal {S} _ {v} |} \sum_ {x \in \mathcal {S} _ {v}} d (x, \hat {\mathcal {S}}) + \frac {1}{2 | \hat {\mathcal {S}} _ {v} |} \sum_ {y \in \hat {\mathcal {S}} _ {v}} d (y, \mathcal {S}). \tag {3} +$$ + +For each metric, we compute a final score averaging all volumes, which we refer to as Average Hausdorff Distance and Average Chamfer Distance respectively. + +Signs. We showcase the benefit of our data dependent probability model on rate in Table 1. Raw sign data, though being binary, has an average size of 154.1KB per volume. With naively computed probability of signs being positive over the dataset, an arithmetic coder can slightly improve the rate to $139.8\mathrm{KB}$ . This is because there are more positive TSDF values than negative in the dataset. With our learned, data dependent probability model, the arithmetic coder can drastically compress the signs down to $2.9\mathrm{KB}$ per volume. + +Topology Masking. To demonstrate the impact of utilizing ground truth sign/topology, we construct a baseline with a standard rate-distortion loss. Specifically, the distortion term is simplified as $D_{\hat{x}} = \frac{1}{B}\sum_{n = 1}^{B}\| \hat{\boldsymbol{x}}_n - \boldsymbol {x}_n\| _2^2$ . This baseline is shown as no topology mask in Figure 5. Without the error bound, its distortion is much higher than other baselines. The second baseline, in addition to using the same distortion term, losslessly compresses and streams the signs during inference, as described in Section 4. Despite the increased rate due to losslessly compressed signs, this + +![](images/bee6acc93b9cb7fa62672b0f5dedccd96e1a97869d7ec99fde2aa1fd41c84f92.jpg) +Figure 5: Topology Mask: When topology masking is applied during inference, an upper bound of error is guaranteed. Moreover, when also applied as a training loss, topology mask yields better rate-distortion. The difference is more obvious with the Hausdorff distance, which measures the worst case error. + +![](images/19815feae48649ee9a03775393ca67f86daf827567e93d440c7ae5c3e5d2ad65.jpg) + +![](images/0cbd7cafe692df93784d4d8b733eb0a11528bf1cf3bb5936b8204f02773e9277.jpg) +(a) Number of layers. +Figure 6: Ablation studies: (a) Larger number of layers in both the encoder and the decoder improves performance, although with diminishing returns and increasing model size. (b) Larger block size performs better at low rates, while smaller blocks achieve better trade-off at higher rates. + +![](images/06db9951619ebe06a7ab6b103964bf46b03659622b2b565ec2fa7f39fb4c22ca.jpg) +(b) Different block sizes. + +baseline still achieves better rate-distortion trade-off. Finally, using topology masking in both training and inference yields the best rate-distortion performance. + +Ablation studies. The impact of network architecture on compression is evaluated in Figure 6. While having more layers leads to better results, there are diminishing returns. To keep the model size practical, we restricted our model to three layers ( $<1.8\mathrm{MB}$ ). We also perform ablation for the block-size (voxels/block). Since in all volumes, the voxel size is $5\mathrm{mm}$ , a block with block-size $8^{3}$ has the physical size of $40\mathrm{mm}^{3}$ . Note that increasing the size of each block reduces the number of blocks. Results show that if one has a budget of more than $12\mathrm{KB}$ per volume, using block size $8^{3}$ yields much better rate-distortion performance. Therefore in the following experiments, $\times 3$ layers with $8^{3}$ blocks is used. + +State-of-the-art comparisons. We compare with state-ofthe-art geometry compression methods, including two volumetric methods: Tang et al. [59] and JP3D [55]; two mesh compression: Draco [24] and Free Viewpoint Video (FVV) [13]; as well as a point cloud compressor MPEG VPCC [57]. See their parameters in the supplementary material. For most of the methods, we sweep the rate hyper + +![](images/262c6fd75c4f486f2367d417ef0b8bd8891dbad7015353b8cf0f238cd358c4ab.jpg) +(a) Dataset Tang et al. [59] + +![](images/d296edf2197339b43dc562c3f010659dd9ae506a43d602cf13e35b2bf2212117.jpg) +(b) Dataset Guo et al. [26] + +parameter to generate rate-distortion curves. The dataset [26] contains high-resolution meshes ( $\sim$ 250K vertices), which has a negative impact on the Draco compression rate. Hence, for Draco only, we decimate the meshes to 25K vertices termed as Draco (decimated) to make it comparable to other methods. Figure 7 shows that on both datasets, our method significantly outperforms all prior art in both rate and distortion. For instance, to achieve the same level of rate (marked with $\nabla$ in Figure 7 (b)), the distortion of our method (0.12) is $50\%$ of Tang et al. [59] (0.25), and $14\%$ of Draco (decimated) (0.86) and MPEG (0.84). To achieve the same distortion level (0.25), our method (26KB) only requires $33\%$ of the previous best performing method Tang et al. [59] (79KB). + +To showcase difference in distortion, we select a few qualitative examples with similar rates, and visualize them in Figure 10: the Draco (decimated) results are low-res, the MPEG V-PCC results are noisy, while the results of Tang et al. [59] suffer blocking artifacts. + +Efficiency. To assess the complexity of our neural network, we measure the runtime of the encoder and the decoder. We freeze our graph and run it using the Tensorflow C++ interface on a single NVIDIA PASCAL TITAN Xp GPU. Our range encoder implementation is single-threaded CPU code, hence we include only the neural network inference time. We measure 20 ms to run both encoder and decoder on all the blocks of a single volume. + +# 6.2. Texture compression + +We compare our texture parametrization to UVAtlas [71]. In order to showcase the benefit of Morton packing, we also have a block-based baseline where naive bin packing is used without any spatio-temporal coherence, as shown in Table 2. To preserve the high quality of the target dataset [26], we generate high-res texture maps (4096x4096) for all experiments. The texture maps of each sequence are compressed with the H.264 implementation from FFMpeg with default parameters. Per-frame compressed sizes of different meth + +![](images/45ef8e61e4fcc64014608f1eb55408180def2e8051f47a1fa7cee0ed91bcbfbd.jpg) +Figure 7: Quantitative comparisons - Our method yields the best rate-distortion among state-of-the-arts. Data points marked with $\nabla$ are selected to have similar rates and whose distortion is visualized qualitatively in Figure 10. +Figure 8: Geometry / Qualitative - Examples from the Guo et al. [26] dataset with different rates. (1st row) Decompressed meshes. (2nd row) Shortest distance from decompressed vertices to ground truth surface. Distance between $[0, 2.5\mathrm{mm}]$ is mapped to $[0, 255]$ on the red channel. + +![](images/1ca74b287c91bcc59d8ba5e45ace3bc13b2451c207b0322555e19466d31cbaeb.jpg) +Figure 9: Texture / Qualitative - A frame taken from the comparison sequences in the supplementary video: (left) raw rgb image from camera; (mid) rendered with UVAtlas [71]; (right) rendered with our texture atlas. there is no visible difference in quality. + +ods are reported to showcase how texture parametrization impacts the compression rate. In order to measure distortion, each textured volume with its decompressed texture atlas is rendered into the viewpoints of RGB cameras that were used to construct the volumes, and compared with the corresponding raw RGB image. For simplicity we only select 10 views (out of 58) where the subject face is visible. When computing distortion, masks are used to ensure only foreground pixels are considered, as shown in Figure 9. + +
MethodRatePSNRSSIMMS-SSIM
UVAtlas [71]45730.90.9230.939
Ours (Naïve)52930.90.9240.939
Ours (Morton)35030.90.9240.940
+ +Table 2: Texture / Quantitative – Average KB per volume from video compression is reported as Rate. With negligible difference in distortion under different metrics (PSNR, SSIM [67] and MS-SSIM [66]), our method preserves better spatio-temporal coherence and thus has better compression rate. See qualitative results in the supplementary video. + +![](images/4f9aaa905a6751e5351426fb45db3c08a84718cc6601aee6c931e554cd96ace3.jpg) +Figure 10: Qualitative vs. State-of-the-art - Examples are selected to have a similar rate but different distortions, which correspond to the markers in Figure 7 (right) - flat Phong shading is used in all cases to reveal artifacts. In order to achieve the same level of bitrate as other methods, Draco requires decimating input, which results in low-poly reconstruction. MPEG-VPCC only compresses point clouds. Tang et al. [59] has visible block artifact. Our method achieves the best distortion. + +# 7. Conclusions + +We have introduced a novel system for the compression of TSDFs and their associated textures achieving state-of-the-art results. For geometry, we use a block-based learned encoder-decoder architecture that is particularly well suited for the uniform 3D grids typically used to store TSDFs. To train better, we present a new distortion term to emphasize the loss near the surface. Moreover, ground truth signs of the TSDF are losslessly compressed with our learned model to provide an error bound during decompression. For texture, we propose a novel block-based texture parametrization algorithm which encourages spatio-temporal coherence without tracking and the necessity of UV coordinate compression. As a result, our method yields a much better rate-distortion + +trade-off than prior art, achieving $50\%$ distortion, or when distortion is fixed, $33\%$ bitrate of Tang et al. [59]. + +Future work. There are a number of interesting avenues for future work. In our architecture, we have assumed blocks to be i.i.d., and dropping this assumption could further increase the compression rate – for example, one could devise an encoder that is particularly well suited to compress “human shaped” geometry. Further, we do not make any use of temporal consistency in 4D sequences, while from the realm of video compression we know coding inter-frame knowledge provides a very significant boost to compression performance. Finally, while our per-block texture parametrization is effective, it is not included in our end-to-end training pipeline – one could learn a per-block parametrization function to minimize screen-space artifacts. + +# References + +[1] P. Alliez and C. Gotsman. Recent advances in compression of 3d meshes. In N. A. Dodgson, M. S. Floater, and M. A. Sabin, editors, Advances in Multiresolution for Geometric Modeling, pages 3-26. Springer Berlin Heidelberg, Berlin, Heidelberg, 2005. 2 +[2] Johannes Balle, Valero Laparra, and Eero Simoncelli. End-to-end optimized image compression. In ICLR, 2017. 2, 3, 4, 13 +[3] Johannes Balle, David Minnen, Saurabh Singh, Sung Jin Hwang, and Nick Johnston. Variational image compression with a scale hyperprior. *ICLR*, 2018. 2, 3 +[4] Mario Botsch, Leif Kobbelt, Mark Pauly, Pierre Alliez, and Bruno Lévy. *Polygon mesh processing*. CRC press, 2010. 2 +[5] H. Briceno, P. Sander, L. McMillan, S. Gortler, and H. Hoppe. Geometry videos: a new representation for 3d animations. In Symp. Computer Animation, 2003. 2 +[6] Brent Burley and Dylan Lacewell. Ptex: Per-face texture mapping for production rendering. In Proceedings of the Nineteenth Eurographics Conference on Rendering, EGSR '08, pages 1155-1164, Aire-la-Ville, Switzerland, Switzerland, 2008. Eurographics Association. 5 +[7] Daniel-Ricao Canelhas, Erik Schaffernicht, Todor Stoyanov, Achim J Lilienthal, and Andrew J Davison. Compressed voxel-based mapping using unsupervised learning. Robotics, 2017. 2 +[8] Joel Carranza, Christian Theobalt, Marcus A. Magnor, and Hans-Peter Seidel. Free-viewpoint video of human actors. ACM Trans. Graph., 22(3):569-577, July 2003. ISSN 0730-0301. 1 +[9] P.A. Chou, T. Lookabaugh, and R.M. Gray. Entropy-constrained vector quantization. IEEE Transactions on Acoustics, Speech, and Signal Processing, 37(1):31-42, January 1989. 12 +[10] Philip A. Chou, Maxim Koroteev, and Maja Krivokuca. A volumetric approach to point cloud compression, Part I: Attribute compression. IEEE Trans. Image Processing, March 2019. 2 +[11] Paolo Cignoni, Claudio Rocchini, and Roberto Scopigno. Metro: Measuring error on simplified surfaces. cgf, 1998. 6 +[12] R. A. Cohen, D. Tian, and A. Vetro. Attribute compression for sparse point clouds using graph transforms. In IEEE Int'l Conf. Image Processing (ICIP), Sept 2016. 2 +[13] Alvaro Collet, Ming Chuang, Pat Sweeney, Don Gillett, Dennis Evseev, David Calabrese, Hugues Hoppe, Adam Kirk, and Steve Sullivan. High-quality streamable free-viewpoint video. ACM Trans. on Graphics (TOG), 2015. 2, 6, 13 +[14] T.M. Cover and J.A. Thomas. Elements of Information Theory. John Wiley and Sons, 2006. 12 +[15] B. Curless and M. Levoy. A volumetric method for building complex models from range images. In Proc. 23rd annual ACM conference on Computer graphics and interactive techniques (SIGGRAPH'96), pages 303-312, 1996. 1, 2 +[16] R. L. de Queiroz and P. A. Chou. Transform coding for point clouds using a Gaussian process model. IEEE Trans. Image Processing, 26(8), August 2017. 2 +[17] Ricardo L. de Queiroz and Philip A. Chou. Compression of + +3D point clouds using a region-adaptive hierarchical transform. IEEE Trans. Image Processing, 25(8), August 2016. 2 +[18] E. d'Eon, B. Harrison, T. Myers, and P. A. Chou. 8i voxelized full bodies — a voxelized point cloud dataset. input documents M74006 & m40059, ISO/IEC JTC1/SC29/WG1 & WG11 JPEG & MPEG, January 2017. Available at https://jpeg.org/plenodb/pc/8ilabs/. 3 +[19] M. Dou, J. Taylor, H. Fuchs, A. Fitzgibbon, and S. Izadi. 3d scanning deformable objects with a single rgbd sensor. In 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 493-501, June 2015. 2 +[20] M. Dou, S. Khamis, Y. Degtyarev, P. Davidson, S. R. Fanello, A. Kowdle, S. Orts Escolano, C. Rhemann, D. Kim, J. Taylor, P. Kohli, V. Tankovich, and S. Izadi. Fusion4d: real-time performance capture of challenging scenes. ACM Transactions on Graphics (TOG), 35(4):114, 2016. 2 +[21] Mingsong Dou, Philip Davidson, Sean Ryan Fanello, Sameh Khamis, Adarsh Kowdle, Christoph Rhemann, Vladimir Tankovich, , and Shahram Izadi. Motion2fusion: Real-time volumetric performance capture. ACM TOG (SIGGRAPH Asia), 2017. 2 +[22] Mingsong Dou, Philip Davidson, Sean Ryan Fanello, Sameh Khamis, Adarsh Kowdle, Christoph Rhemann, Vladimir Tankovich, and Shahram Izadi. Motion2fusion: real-time volumetric performance capture. ACM Trans. on Graphics (Proc. of SIGGRAPH Asia), 2017. 1, 2 +[23] Sarah F. Friske, Ronald N. Perry, Alyn P. Rockwood, and Thouis R. Jones. Adaptively sampled distance fields: A general representation of shape for computer graphics. In Proc. 27th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH '00. ACM, 2000. 2 +[24] Frank Galligan, Michael Hemmer, Ondrej Stava, Fan Zhang, and Jamieson Brettle. Google/draco: a library for compressing and decompressing 3d geometric meshes and point clouds. https://github.com/google/draco, 2018.1, 2, 6, 13 +[25] Xianfeng Gu, Steven J. Gortler, and Hugues Hoppe. Geometry images. ACM Trans. Graphics (SIGGRAPH), 21(3):355-361, July 2002. ISSN 0730-0301. 2 +[26] Kaiwen Guo, Peter Lincoln, Philip Davidson, Jay Busch, Xueming Yu, Matt Whalen, Geoff Harvey, Sergio Orts-Escolano, Rohit Pandey, Jason Dourgarian, Danhang Tang, Anastasia Tkach, Adarsh Kowdle, Emily Cooper, Ming-song Dou, Sean Fanello, Graham Fyffe, Christoph Rhemann, Jonathan Taylor, Paul Debevec, and Shahram Izadi. The relightables: Volumetric performance capture of humans with realistic relighting. In ACM TOG, 2019. 1, 2, 3, 6, 7 +[27] S. Izadi, D. Kim, O. Hilliges, D. Molyneaux, R. Newcombe, P. Kohli, J. Shotton, S. Hodges, D. Freeman, A. Davison, and A. Fitzgibbon. KinectFusion: Real-time 3D reconstruction and interaction using a moving depth camera. In Proc. UIST, 2011. 1, 2 +[28] C. L. Jackins and S. L. Tanimoto. Oct-trees and their use in representing three-dimensional objects. Computer Graphics and Image Processing, 14(3):249 - 270, 1980. ISSN 0146-664X. 2 +[29] J. Kammerl, N. Blodow, R. B. Rusu, S. Gedikli, M. Beetz, and + +E. Steinbach. Real-time compression of point cloud streams. In IEEE Int'l Conference on Robotics and Automation, Minnesota, USA, May 2012. 2 +[30] Michael Kazhdan and Hugues Hoppe. Screenedoisson surface reconstruction. ACM Transactions on Graphics (ToG), 2013. 2 +[31] Maja Krivokuca, Maxim Koroteev, and Philip A. Chou. A volumetric approach to point cloud compression. arXiv preprint arXiv:1810.00484, 2018. 1 +[32] Maja Krivokuca, Philip A. Chou, and Maxim Koroteev. A volumetric approach to point cloud compression, Part II: Geometry compression. IEEE Trans. Image Processing, submitted for possible publication. 2 +[33] Christian Lauterbach, Michael Garland, Shubhabrata Sen-gupta, David P. Luebke, and Dinesh Manocha. Fast bvh construction on gpus. Comput. Graph. Forum, 28(2):375-384, 2009. 5 +[34] Yiyi Liao, Simon Donne, and Andreas Geiger. Deep marching cubes: Learning explicit surface representations. In CVPR, pages 2916-2925. IEEE Computer Society, 2018. 2 +[35] C. Loop, Q. Cai, S. Orts Escolano, and P.A. Chou. Microsoft voxelized upper bodies — a voxelized point cloud dataset. input documents m38673/M72012, ISO/IEC JTC1/SC29/WG1 & WG11 JPEG & MPEG, May 2016. Available at https://jpeg.org/plenodb/pc/microsoft/. 3 +[36] C. Loop, Q. Cai, S. Orts-Escalano, and P. A. Chou. A closed-form bayesian fusion equation using occupancy probabilities. In Int'l Conf. on 3D Vision (3DV), October 2016. 2 +[37] William E. Lorensen and Harvey E. Cline. Marching cubes: A high resolution 3d surface construction algorithm. SIGGRAPH Comput. Graph., 21(4):163-169, August 1987. ISSN 0097-8930. 3, 12 +[38] SP Luttrell. Image compression using a neural network. In Proc. IGARSS, volume 88, pages 1231-1238, 1988. 2 +[39] Adrien Maglo, Guillaume Lavoué, Florent Dupont, and Céline Hudelot. 3d mesh compression: Survey, comparisons, and emerging trends. ACM Computing Surveys (CSUR), 47 (3):44, 2015. 2 +[40] K. Mamou, T. Zaharia, and F. Preteux. TFAN: A low complexity 3d mesh compression algorithm. Computer Animation and Virtual Worlds, 20, 2009. 2 +[41] Donald Meagher. Geometric modeling using octree encoding. Computer graphics and image processing, 19(2):129-147, 1982. 2 +[42] R. Mekuria, K. Blom, and P. Cesar. Design, implementation, and evaluation of a point cloud codec for tele-immersive video. IEEE Trans. Circuits and Systems for Video Technology, 27 (4):828-842, April 2017. 2 +[43] G. M Morton. A computer oriented geodetic data base; and a new technique in file sequencing. Technical report, IBM, Ottawa, Canada, 1966. 5 +[44] PAUL Munro and DAVID Zipser. Image compression by back propagation: an example of extensional programming. Models of cognition: A review of cognitive science, 2, 1989. 2 +[45] Richard A Newcombe, Dieter Fox, and Steven M Seitz. Dynamicfusion: Reconstruction and tracking of non-rigid scenes in real-time. In Proc. of Comp. Vision and Pattern Recognition (CVPR), 2015. 1, 2 + +[46] A. Ortega and K. Ramchandran. Rate-distortion methods for image and video compression. IEEE Signal Processing Magazine, 15(6):23-50, Nov 1998. 12 +[47] Sergio Orts-Escalano, Christoph Rhemann, Sean Fanello, Wayne Chang, Adarsh Kowdle, Yury Degtyarev, David Kim, Philip L Davidson, Sameh Khamis, Mingsong Dou, et al. Holoportation: Virtual 3d teleportation in real-time. In Proc. of the Symposium on User Interface Software and Technology, 2016. 1 +[48] Jeong Joon Park, Peter Florence, Julian Straub, Richard A. Newcombe, and Steven Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. In CVPR, pages 165-174. Computer Vision Foundation / IEEE, 2019. 2 +[49] J. Peng, Chang-Su Kim, and C. C. Jay Kuo. Technologies for 3d mesh compression: A survey. Journal of Vis. Comun. and Image Represent., 16(6):688-733, December 2005. 2 +[50] Fabian Prada, Misha Kazhdan, Ming Chuang, Alvaro Collet, and Hugues Hoppe. Spatiotemporal atlas parameterization for evolving meshes. ACM Trans. on Graphics (TOG), 2017. 2 +[51] Charles R. Qi, Hao Su, Kaichun Mo, and Leonidas J. Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. 2 +[52] Maurice Quach, Giuseppe Valenzise, and Frederic Dufaux. Learning convolutional transforms for lossy point cloud geometry compression. arXiv preprint arXiv:1903.08548, 2019. 3 +[53] J. Rossignac. Edgebreaker: Connectivity compression for triangle meshes. IEEE Trans. Visualization and Computer Graphics, 5(1):47-61, Jan. 1999. 2 +[54] R. B. Rusu and S. Cousins. 3d is here: Point cloud library (PCL). In IEEE Int'l Conf. on Robotics and Automation (ICRA), pages 1-4, 2011. 2 +[55] P. Schelkens, A. Munteanu, A. Tzannes, and C. Brislawn. Jpeg2000. part 10. volumetric data encoding. In 2006 IEEE International Symposium on Circuits and Systems, pages 4 pp.-3877, May 2006. 6, 13 +[56] R. Schnabel and R. Klein. Octree-based point-cloud compression. In Eurographics Symp. on Point-Based Graphics, July 2006. 2 +[57] Sebastian Schwarz, Marius Preda, Vittorio Baroncini, Madhukar Budagavi, Pablo Cesar, Philip A Chou, Robert A Cohen, Maja Krivokuca, Sébastien Lasserre, Zhu Li, et al. Emerging mpeg standards for point cloud compression. IEEE Journal on Emerging and Selected Topics in Circuits and Systems, 9 (1):133-148, 2018. 2, 6, 13 +[58] Vincent Sitzmann, Justus Thies, Felix Heide, Matthias Nießner, Gordon Wetzstein, and Michael Zollhöfer. Deepvoxels: Learning persistent 3d feature embeddings. In CVPR, pages 2437-2446. Computer Vision Foundation / IEEE, 2019. 1, 2 +[59] Danhang Tang, Mingsong Dou, Peter Lincoln, Philip Davidson, Kaiwen Guo, Jonathan Taylor, Sean Fanello, Cem Keskin, Adarsh Kowdle, Sofien Bouaziz, Shahram Izadi, and Andrea Tagliasacchi. Real-time compression and streaming of 4d performances. ACM Transaction on Graphics (Proc. + +SIGGRAPH Asia), 2018. 1, 2, 3, 4, 5, 6, 7, 8, 13 +[60] D. Thanou, P. A. Chou, and P. Frossard. Graph-based compression of dynamic 3d point cloud sequences. IEEE Trans. Image Processing, 25(4), April 2016. 2 +[61] George Toderici, Sean M O'Malley, Sung Jin Hwang, Damien Vincent, David Minnen, Shumeet Baluja, Michele Covell, and Rahul Sukthankar. Variable rate image compression with recurrent neural networks. arXiv preprint arXiv:1511.06085, 2015. 2 +[62] Costa Touma and Craig Gotsman. Triangle mesh compression. In Proceedings of the Graphics Interface 1998 Conference, June 18-20, 1998, Vancouver, BC, Canada, pages 26-34, June 1998. 2 +[63] Godfried Toussaint. Solving geometric problems with the rotating calipers, 1983. 5 +[64] Jianqiang Wang, Hao Zhu, Zhan Ma, Tong Chen, Haojie Liu, and Qiu Shen. Learned point cloud geometry compression. arXiv preprint arXiv:1909.12037, 2019. 3 +[65] Peng-Shuai Wang, Yang Liu, Yu-Xiao Guo, Chun-Yu Sun, and Xin Tong. O-cnn: Octree-based convolutional neural networks for 3d shape analysis. ACM Trans. Graph., 36(4): 72:1-72:11, July 2017. ISSN 0730-0301. 1, 2 +[66] Zhou Wang, Eero P Simoncelli, and Alan C Bovik. Multiscale structural similarity for image quality assessment. In The Thirty-Seventh Asilomar Conference on Signals, Systems & Computers, 2003, volume 2, pages 1398-1402. IEEE, 2003. 7 +[67] Zhou Wang, Alan C Bovik, Hamid R Sheikh, Eero P Simoncelli, et al. Image quality assessment: from error visibility to structural similarity. IEEE transactions on image processing, 13(4):600-612, 2004. 7 +[68] Zhirong Wu, Shuran Song, Aditya Khosla, Fisher Yu, Linguang Zhang, Xiaou Tang, and Jianxiong Xiao. 3d shapenets: A deep representation for volumetric shapes. In CVPR, pages 1912-1920. IEEE Computer Society, 2015. ISBN 978-1-4673-6964-0. 2 +[69] Wei Yan, Shan Liu, Thomas H Li, Zhu Li, Ge Li, et al. Deep autoencoder-based lossy geometry compression for point clouds. arXiv preprint arXiv:1905.03691, 2019. 3 +[70] C. Zhang, D. Florencio, and C. Loop. Point cloud attribute compression with graph transform. In 2014 IEEE Int'l Conf. Image Processing (ICIP), Oct 2014. 2 +[71] Kun Zhou, John Synder, Baining Guo, and Heung-Yeung Shum. Iso-charts: stretch-driven mesh parameterization using spectral analysis. In Proceedings of the 2004 Eurographics/ACM SIGGRAPH symposium on Geometry processing, pages 45-54. ACM, 2004. 5, 7 \ No newline at end of file diff --git a/deepimplicitvolumecompression/images.zip b/deepimplicitvolumecompression/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ef6726fd0a0c4653286b95f5c2f611a5b6f17647 --- /dev/null +++ b/deepimplicitvolumecompression/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa3d72dac5edab7350968fd4636ba3dbe477ce4f08d74ae14e9c5cf3df01f803 +size 462101 diff --git a/deepimplicitvolumecompression/layout.json b/deepimplicitvolumecompression/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..782241024c3d1ee633a15d5422d9b89cecedfd18 --- /dev/null +++ b/deepimplicitvolumecompression/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab44bbc8811a5630e1b97a3f774d277bd68d934a6020552c86a836549659fb21 +size 438915 diff --git a/deepiterativesurfacenormalestimation/a04c1e77-5b79-4f4a-b3bd-a3299f6d8551_content_list.json b/deepiterativesurfacenormalestimation/a04c1e77-5b79-4f4a-b3bd-a3299f6d8551_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..5e970a2c0167d6103dfe275db5b50d0b334bc628 --- /dev/null +++ b/deepiterativesurfacenormalestimation/a04c1e77-5b79-4f4a-b3bd-a3299f6d8551_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ceeebef162d85707a909194f8b316b3fc43f6a842faa60c3932742be414a6502 +size 75497 diff --git a/deepiterativesurfacenormalestimation/a04c1e77-5b79-4f4a-b3bd-a3299f6d8551_model.json b/deepiterativesurfacenormalestimation/a04c1e77-5b79-4f4a-b3bd-a3299f6d8551_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4337afac4968ac3caa1e731057d161ef24c45f53 --- /dev/null +++ b/deepiterativesurfacenormalestimation/a04c1e77-5b79-4f4a-b3bd-a3299f6d8551_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc7d4c5cde087772cadfb6259908f12ea841dfd5e69bde7335538a039cc8a727 +size 92044 diff --git a/deepiterativesurfacenormalestimation/a04c1e77-5b79-4f4a-b3bd-a3299f6d8551_origin.pdf b/deepiterativesurfacenormalestimation/a04c1e77-5b79-4f4a-b3bd-a3299f6d8551_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ce89456d92a84df40ea3992fe6c062f21e724f4b --- /dev/null +++ b/deepiterativesurfacenormalestimation/a04c1e77-5b79-4f4a-b3bd-a3299f6d8551_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa1672508558f6198ddb5c57c8ca8aa490bd3af0ad81ffa8293bfb658b24d29e +size 1012810 diff --git a/deepiterativesurfacenormalestimation/full.md b/deepiterativesurfacenormalestimation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a3ae23e3cdb72b7fd8ce2453e1dfdd0b43c44cc9 --- /dev/null +++ b/deepiterativesurfacenormalestimation/full.md @@ -0,0 +1,331 @@ +# Deep Iterative Surface Normal Estimation + +Jan Eric Lenssen1,2,* + +janeric.lenssen@udo.edu + +Christian Osendorfer1 + +christian@nnaisense.com + +Jonathan Masci1 + +jonathan@nnaisense.com + +1 NNAISENSE + +TU Dortmund University + +# Abstract + +This paper presents an end-to-end differentiable algorithm for robust and detail-preserving surface normal estimation on unstructured point-clouds. We utilize graph neural networks to iteratively parameterize an adaptive anisotropic kernel that produces point weights for weighted least-squares plane fitting in local neighborhoods. The approach retains the interpretability and efficiency of traditional sequential plane fitting while benefiting from adaptation to data set statistics through deep learning. This results in a state-of-the-art surface normal estimator that is robust to noise, outliers and point density variation, preserves sharp features through anisotropic kernels and equivariance through a local quaternion-based spatial transformer. Contrary to previous deep learning methods, the proposed approach does not require any hand-crafted features or preprocessing. It improves on the state-of-the-art results while being more than two orders of magnitude faster and more parameter efficient. + +# 1. Introduction + +Normal vectors are local surface descriptors that are used as an input for several computer vision tasks ranging from surface reconstruction [27] to registration [39] and segmentation [17]. For this reason, the task of surface normal estimation has been an important and well studied research topic for a long time, with several methods dating back up to 30 years [23]. Progress in the field, however, has been plateauing only until recently when a number of works has shown that improvements can be achieved with the use of data-driven deep learning techniques [5, 7, 19], as also shown in related fields like point cloud denoising [42] or finding correspondences on meshes and point clouds [10, 14, 32, 35]. Deep learning methods are known to often achieve better results compared to data-independent methods. However, they have downsides in terms of robustness + +![](images/0eca7daaa9729e42c4efc56a85337b19ccf2cafeab8c224156b550a89116019a.jpg) +Figure 1: Simplified overview of the proposed method for deep iterative surface normal estimation. The figure shows the process for a subset of three points. (a) Surfaces are fitted by optimizing weighted least squares. (b) A graph neural network infers kernel parameters and local orientation from intermediate pair-wise point descriptors. (c) A trainable, adaptive kernel refines the weights for the next step of the least squares optimization. + +to small input changes, adversarial attacks, interpretability, and sometimes also computational efficiency. Also, they do not make use of often well-known intrinsic problem structure, which leads to the necessity of having a large amount of training data and model parameters to learn that structure on their own. + +It is well-known that surface normal estimation can be formulated as a least-squares optimization problem. A way to utilize this problem-specific knowledge with deep learning is to take an iteratively reweighting least squares (IRLS) scheme [22] for robust model fitting and modify it using deep data-dependent weighting, as it has been done recently (with or without iterations) for other tasks [25, 43, 44, 46]. + +It is a promising candidate to combine robustness, interpretability and efficiency with the data prior of deep neural networks (DNNs). From a deep learning perspective, the approach imposes a strong bias on the architecture, heavily constraining the space of solutions to those which are better suited for the given problem. + +Contribution In this work, we present such a trainable reweighting procedure for input graphs with a large number of weighted least square problems and use it to design a fast and accurate algorithm for surface normal estimation on unstructured point clouds (c.f. Figure 1). The method consists of a light-weight graph neural network (GNN), which parameterizes a local quaternion transformer and a deep kernel function to iteratively re-weight graph edges in a large-scale point neighborhood graph. We show that the resulting algorithm + +- reaches state-of-the-art performance in surface normal estimation on unstructured point clouds, +- is more than two orders of magnitude faster and more parameter efficient than related deep learning approaches, and +- is robust to noise and point density variation, while being equivariant and able to preserve sharp features. + +# 2. Related work + +Traditional methods for surface normal estimation make use of plane fitting approaches like unweighted principal component analysis (PCA) [23] and singular value decomposition (SVD) (c.f. [28] for an overview). The performance of these approaches usually hinges upon the often cumbersome selection of data-specific hyper-parameters, such as point neighborhood sizes, and it is sensitive to noise, outliers and density variations. Because of this, several heuristics have been proposed to ease such selection, e.g. those for finding a neighborhood size for plane fitting [34]. Another limitation of plane fitting methods is that they tend to smoothen sharp details, in fact they can be seen as isotropic low-pass filters. In order to preserve sharp features methods that extract normal vectors from estimated Voronoi cells have been proposed [2, 33] and combined with PCA [1]. Alternative approaches include edge-aware sampling [24] or normal vector estimation in Hough space [6]. In addition, several methods arise from more complex surface reconstruction techniques, e.g. moving least squares (MLS) [30], spherical fitting [18], jet fitting [9] and multi-scale kernel methods [3]. + +Deep learning methods. Deep learning based approaches also found their way into surface normal estimation with + +the recent success of deep learning in a wide range of domains. These approaches can be divided into two groups, depending on the actual type of input data they use. The first group aims at normal estimation from single images [4, 12, 15, 29, 31, 41, 45] and has received a lot of interest over the last few years due to the well understood properties of CNNs for grid-structured data. + +The second line of research directly uses unstructured point clouds and emerged only very recently, partially due to the advent of graph neural networks and geometric deep learning [8]. Boulch et al. [7] proposed to use a CNN on Hough transformed point clouds in order to find surface planes of the point cloud in Hough space. Based on the recently introduced point processing network, PointNet [40], Guerrero et al. [19] proposed a deep multi-scale architecture for surface normal estimation. Later, Ben-Shabat et al. [5] improved on those results using 3D point cloud fisher vectors as input features and a three-dimensional CNN architecture consisting of multiple expert networks. + +# 3. Problem and background + +Let $S$ be a manifold in $\mathbb{R}^3$ , $\mathcal{P} = \{\mathbf{p}_0, \dots, \mathbf{p}_m\}$ a finite set of sampled and possibly distorted points from that manifold and $\hat{\mathbf{N}} = \{\hat{\mathbf{n}}_0, \dots, \hat{\mathbf{n}}_m\}$ the tangent plane normal vectors at sample points $\mathbf{p}_i$ . Surface normal estimation for the point cloud $\mathcal{P}$ can be described as the problem of estimating a set of normal vectors $\mathbf{N} = \{\mathbf{n}_0, \dots, \mathbf{n}_m\}$ given $\mathcal{P}$ , whose direction match those of the actual surface normals $\hat{\mathbf{n}}_i$ as close as possible. We consider the problem of unoriented normal estimation, determining the normal vectors up to a sign flip. Estimating the correct sign can be done in a post-processing step, depending on the task at hand, and is explicitly tackled by several works [37, 25, 47]. + +A standard approach to determine unoriented surface normals is fitting planes to the local neighborhood of every point $\mathbf{p}_i$ [30]. Given a radius $r$ or a neighborhood size $k$ , we model the input as a nearest neighbor graph $G = (\mathcal{P}, \mathcal{E})$ , where we have a directed edge $(i, j) \in \mathcal{E}$ if and only if $||\mathbf{p}_j - \mathbf{p}_j||_2 < r$ or if $\mathbf{p}_j$ is one of the $k$ nearest neighbors of $\mathbf{p}_i$ , respectively. Let $\mathcal{N}(i)$ denote the local neighborhood of $\mathbf{p}_i$ , with $k_i \equiv |\mathcal{N}(i)|$ , containing all $\mathbf{p}_j$ with $(i, j) \in \mathcal{E}$ . Furthermore, let $\mathcal{P}(i) \in \mathbb{R}^{k_i \times 3}$ be the matrix of centered coordinates of the points from this neighborhood, that is + +$$ +\mathcal {P} (i) _ {j} = \mathbf {p} _ {j} ^ {\top} - \frac {1}{k _ {i}} \sum_ {m \in \mathcal {N} (i)} \mathbf {p} _ {m} ^ {\top}, \quad \mathbf {p} _ {j} \in \mathcal {N} (i). \tag {1} +$$ + +Fitting a plane to this neighborhood is then described as finding the least squares solution of a homogeneous system of linear equations: + +$$ +\mathbf {n} _ {i} ^ {*} = \underset {\mathbf {n}: | \mathbf {n} | = 1} {\arg \min } \left| \left| \mathcal {P} (i) \mathbf {n} \right| \right| _ {2} ^ {2} = \underset {\mathbf {n}: | \mathbf {n} | = 1} {\arg \min } \sum_ {j \in \mathcal {N} (i)} \left| \left| \mathcal {P} (i) _ {j} \cdot \mathbf {n} \right| \right| ^ {2} \tag {2} +$$ + +The simple plane fitting of Eq. 2 is not robust and does not result in high-quality normal vectors: It produces accurate results only if there are no outliers in the data, which is never the case in practice. Additionally, this approach eliminates sharp details because it acts as a low-pass filter on the point cloud. Even when an isotropic radial kernel function $\theta (||\mathcal{P}(i)||)$ is used to weight points according to their distance to the local mean, fine details cannot be preserved. + +Both problems can be resolved through integrating weighting functions into Eq. 2. Sharp features can be preserved with an anisotropic kernel that infers weights of point pairs based on their relative positions, i.e.: + +$$ +\mathbf {n} _ {i} ^ {*} = \underset {\mathbf {n}: | \mathbf {n} | = 1} {\arg \min } \sum_ {j \in \mathcal {N} (i)} \psi \left(\mathbf {p} _ {j} - \mathbf {p} _ {i}\right) \cdot \left| \left| \mathcal {P} (i) _ {j} \cdot \mathbf {n} \right| \right| ^ {2} \tag {3} +$$ + +where $\psi(\cdot)$ is an anisotropic kernel, considering the full Cartesian relationship between neighboring points, instead of only their distance. However, an anisotropy kernel is no longer rotation invariant, so that equivariance of output normals needs to be ensured additionally. Robustness to outliers can be achieved by another kernel that weights points according to an inlier score $s_{i,j}$ . More specifically, Eq. 2 is changed to + +$$ +\mathbf {n} _ {i} ^ {*} = \underset {\mathbf {n}: | \mathbf {n} | = 1} {\arg \min } \sum_ {j \in \mathcal {N} (i)} s _ {i, j} \cdot \left| \left| \mathcal {P} (i) _ {j} \cdot \mathbf {n} \right| \right| ^ {2}, \tag {4} +$$ + +where $s_{i,j}$ weights outliers with a low and inliers with a high score. However, in order to infer information about the outlier status of points an initial model estimation is necessary. A standard solution to this circular dependency is to formulate the problem as a sequence of weighted least-squares problems [22, 43]. Given the residuals $\mathbf{r}^l$ of the least squares solution from iteration $l$ , the solution for iteration $l + 1$ is computed as + +$$ +\mathbf {n} _ {i} ^ {l + 1} = \underset {\mathbf {n}: | \mathbf {n} | = 1} {\arg \min } \sum_ {j \in \mathcal {N} (i)} s \left(\mathbf {r} _ {i, j} ^ {l}\right) \cdot \left| \left| \mathcal {P} (i) _ {j} \cdot \mathbf {n} \right| \right| ^ {2}. \tag {5} +$$ + +That is, the inlier score and the estimated model are refined in an alternating fashion. + +# 4. Deep iterative surface normal estimation + +In this section we present our method, which combines the described properties of robustness, anisotropy and equivariance with the deep learning property of adaptation to large data set statistics. In contrast to existing deep learning methods [5, 19], we do not directly regress normal vectors from point features but weights for a least-squares optimization step, utilizing the problem specific knowledge outlined above. + +The core of the algorithm is a trainable kernel function $\psi : \mathbb{R}^3 \times \mathbb{R}^d \to \mathbb{R}$ , which computes weights as + +$$ +w _ {i, j} = \psi \left(\mathbf {R} _ {i} \left(\mathbf {p} _ {j} - \mathbf {p} _ {i}\right), \theta_ {i}\right), \tag {6} +$$ + +Algorithm 1 Differentiable iterative normal estimation +Input: + $\mathcal{P}$ : Point cloud + $L$ : Number of iterations + $k$ or $r$ : Neighborhood size (num. neighbors or radius) +Output: +N: Normal vector estimations + $(\mathcal{P},\mathcal{E})\gets$ Neighborhood graph from $\mathcal{P}$ and $k / r$ +C $\leftarrow$ CovMatrices(P,E) +U, $\boldsymbol{\Sigma}\gets$ ParallelEig(C) + $\mathbf{N}^0\gets$ Extract Solutions from U +for $l\in \{1,\dots ,L\}$ do + $(\Theta ,\mathbf{Q})\gets \mathrm{GNN}(\mathcal{P},\mathcal{E},\mathbf{N}^{l - 1})$ +R $\leftarrow$ QuatsToMats(Q) +W $\leftarrow$ ApplyKernel $\psi (\mathbf{R},\mathcal{P},\Theta ,\mathcal{E})$ +C $\leftarrow$ WeightedCovMatrices(P,W,E) +U, $\boldsymbol{\Sigma}\gets$ ParallelEig(C) + $\mathbf{N}^l\gets$ Extract Solutions from U +end for +return $\mathbf{N}^L$ + +where $\theta$ are kernel parameters and $\mathbf{R}$ is a rotation matrix. The kernel is shared by all local neighborhoods of the point graph while $\theta$ and $\mathbf{R}$ are individual for each node. Because there is no apriori information about the structure of the input data, a reasonable approach is to model $\psi$ as an MLP and to find kernel parameters through supervised learning from data. To this end, parameters $\theta$ and poses $\mathbf{R}$ for each neighborhood are jointly regressed by a graph neural network on the point neighborhood graph. Then, the kernel function $\psi$ regresses anisotropic, equivariant weights $w_{i,j}$ for each edge in the graph, which are used to find the normal vectors using traditional weighted least-squares optimization + +$$ +\mathbf {n} _ {i} = \underset {\mathbf {n}: | \mathbf {n} | = 1} {\arg \min } \sum_ {j \in \mathcal {N} (i)} \operatorname {s o f t m a x} _ {j \in \mathcal {N} (i)} \left(w _ {i, j}\right) \left\| \mathcal {P} (i) _ {j} \cdot \mathbf {n} \right\| ^ {2}, \tag {7} +$$ + +in parallel for all $i \in \mathcal{P}$ . Similar to iterative re-weighting least squares (c.f. Eq. 5), we apply the method in an iterative fashion to achieve robustness and provide the residuals of the previous solution as input to the graph neural network. + +The core algorithm is formulated as pseudo code in Algorithm 1. The initial weighting of the points in a neighborhood is chosen to be uniform, which results in unweighted least-squares plane fitting in the initial iteration. In the following, we present the graph neural network, the local quaternion rotation and our differentiable least square solver in more detail. + +# 4.1. GNN for parameterization and rotation + +For regressing parameters $\theta$ and rotations $\mathbf{R}$ for the whole point cloud, graph neural networks [13, 20] are a natural fit because the network must be invariant to the ordering of the points in a neighborhood and it must be able to allow weight sharing over neighborhoods with varying cardinality. + +Our graph neural network architecture consists of a neighborhood aggregation procedure, which is applied three consecutive times. Given MLPs $h$ and $\gamma$ , the neighborhood aggregation scheme, similar to that of PointNet [40] and to general message passing graph neural network frameworks [20, 36], is given by message function + +$$ +\mathbf {f} _ {e} (i, j) = h \left(\mathbf {f} (i) \mid \mathbf {d} _ {i, j} \mid \mathbf {p r f} (i, j)\right), \tag {8} +$$ + +and node update function + +$$ +\mathbf {f} (i) = \gamma \left(\frac {1}{| \mathcal {N} (i) |} \sum_ {j \in \mathcal {N} (i)} \mathbf {f} _ {e} (i, j)\right), \tag {9} +$$ + +with | denoting feature concatenation. Using this scheme, we alternate between computing new edge features $\mathbf{f}_e(i,j)$ and node features $\mathbf{f}(i)$ . In addition to the Cartesian relation vector $\mathbf{d}_{i,j} = (\mathbf{p}_j - \mathbf{p}_i)$ , pair-wise residual features, a modified version of Point Pair Features (PPF) [10, 11], are provided as input: + +$$ +\mathbf {p r f} (i, j) = \left(\left| \mathbf {n} _ {i} \cdot \mathbf {d} _ {i, j} \right|, \left| \mathbf {n} _ {j} \cdot \mathbf {d} _ {i, j} \right|, \left| \mathbf {n} _ {i} \cdot \mathbf {n} _ {j} \right|, \| \mathbf {d} _ {i, j} \| _ {2} ^ {2}\right). \tag {10} +$$ + +They are computed directly from the last set of least-squares solutions and contain the residuals as point-plane distances $|\mathbf{n}_i\cdot \mathbf{d}_{i,j}|$ + +After applying the message passing scheme, the output node feature matrix $\mathbf{F} \in \mathbb{R}^{N \times (d + 4)}$ is interpreted as a tuple $(\Theta \in \mathbb{R}^{N \times d}, \mathbf{Q} \in \mathbb{R}^{N \times 4})$ , containing kernel and rotation parameters for all nodes. We use the row-normalized $\mathbf{Q}$ as unit quaternions to efficiently parameterize the rotation group $SO(3)$ . We found that using a rotation matrix instead of an arbitrary $3 \times 3$ matrix (as in the Spatial Transformer Network [26]) heavily improves training stability, as also observed by Guerrero et al. [19]. By applying a custom, differentiable map from quaternion space to the space of rotation matrices we efficiently compute the local rotation matrices $\mathbf{R}$ for all nodes in parallel. + +All in all, the graph neural network is permutation invariant, can be efficiently applied in parallel on varying neighborhood sizes, and is a local operator. Locality is an advantage which allows the algorithm to be applied on partial point clouds and scans, without relying on global features or semantics. + +# 4.2. Parallel differentiable least-squares + +In every iteration of the presented algorithm, the plane fitting problem of Eq. 7 needs to be solved. A standard approach is to utilize the Singular Value Decomposition of the + +weighted matrix $\mathrm{diag}(\sqrt{\mathbf{w}_i^l})\mathcal{P}(i)$ : Let $\mathbf{U}\Sigma \mathbf{V}^{\mathbf{T}}$ be its decomposition, then the column vector of $\mathbf{V}$ corresponding to the smallest singular value is the optimal solution for the given least squares problem [21, 43]. However, $n$ SVDs (for potentially varying matrix sizes) need to be solved in our scenario, one for every neighborhood, which makes this approach prohibitive. A much more efficient approach in this case is to consider the eigendecomposition of the weighted $3\times 3$ covariance matrix $\mathbf{C}(i) = \mathcal{P}(i)^{\top}\mathrm{diag}(\mathbf{w}_i^l)\mathcal{P}(i)$ which has the columns of $\mathbf{V}$ as its eigenvectors [21]. The solution for Eq. 7 is then the eigenvector associated with the smallest eigenvalue. The computational complexity for the eigendecomposition of this $3\times 3$ matrix is $O(1)$ and hence for one overall iteration $O(n)$ . + +Our algorithm is trained end-to-end by minimizing the distance between ground truth normals and the least squares solution, requiring backpropagation through the eigendecomposition. We follow the work of Giles [16]: Given partial derivatives $\partial L / \partial \mathbf{U}$ and $\partial L / \partial \pmb{\Sigma}$ for eigenvectors and eigenvalues, respectively, we compute the partial derivatives for a real symmetric $3\times 3$ covariance matrix $\mathbf{C}$ as + +$$ +\frac {\partial L}{\partial \mathbf {C}} = \mathbf {U} \left(\left(\frac {\partial L}{\partial \boldsymbol {\Sigma}}\right) _ {d i a g} + \mathbf {F} \circ \mathbf {U} ^ {\top} \frac {\partial L}{\partial \mathbf {U}}\right) \mathbf {U} ^ {\top}, \tag {11} +$$ + +where $\mathbf{F}_{i,j} = (\lambda_j - \lambda_i)^{-1}$ contains inverse eigenvalue differences. We implemented forward and backward steps for eigendecomposition of a large number of symmetric $3\times 3$ matrices, where we parallelize over graph nodes, leading to an $O(1)$ implementation (using $O(n)$ processors) of parallel least squares solvers. + +Handling numerical instability. Backpropagation through the eigendecomposition can lead to numerical instabilities due to at least two reasons: 1) Low-rank input matrices with two or more zero eigenvalues. 2) Exploding gradients when two eigenvalues are very close to each other and values of $\mathbf{F}$ go to infinity. We apply two tricks to avoid these problems. First, a small amount of noise is added to the diagonal elements of all covariance matrices, making them full-rank. Second, gradients are clipped after the backward step on very large values, to tackle the cases of nearly equal eigenvalues that lead to exploding gradients. + +# 4.3. Training + +Training is performed by minimizing the Euclidean distance between estimated normals $\mathbf{N}$ and ground truth normals $\hat{\mathbf{N}}$ , averaged over all normal vectors in the training set: + +$$ +L (\hat {\mathbf {N}}, \mathbf {N}) = \frac {1}{n} \sum_ {i = 1} ^ {n} \min \left(\left\| \hat {\mathbf {n}} _ {i} - \mathbf {n} _ {i} \right\| _ {2}, \left\| \hat {\mathbf {n}} _ {i} + \mathbf {n} _ {i} \right\| _ {2}\right), \tag {12} +$$ + +where the minimum of the distances to the flipped or non-flipped ground truth vectors is used. While we also experi + +
Ours (k=64,L=4)Nesti-Net [5]PCPNet [19]HoughCNN [7]PCAJet [9]
No noise6.726.999.6810.2312.2912.23
Noise (σ=0.00125)9.9510.1111.4611.6212.8712.84
Noise (σ=0.006)17.1817.6318.2622.6618.3818.33
Noise (σ=0.012)21.9622.2822.833.3927.527.68
Varying Density (Stripes)7.738.4711.7412.4713.6613.39
Varying Density (Gradients)7.519.0013.4211.0212.8113.13
Average11.8412.4114.5616.916.2516.29
+ +Table 1: Results for unoriented normal estimation. Shown are normal estimation errors in angle RMSE. For PCA and Jet, optimal neighborhood size for average error is chosen. For our approach, we display results for a balanced neighborhood size $k = 64$ , which improves on the state of the art for all noise levels. Results for different $k$ are shown in Table 2. + +mented with different angular losses, we found that the Euclidean distance loss still provides the best result and the most stable training. A loss is computed after each least squares step and the network is trained iteratively by performing a gradient descent step after each iteration of the algorithm. This fights vanishing gradients that occur due to the normalization of vectors in quaternion and eigenvector computations. The weights of our network are shared over iterations, allowing generalization to further iterations. + +# 5. Experiments + +Experiments were conducted to compare the proposed Differentiable Iterative Surface Normal Estimation with state-of-the-art methods both quantitatively, measuring normal estimation accuracy, and qualitatively, on a Poisson reconstruction and on a transfer learning task. Section 5.1 introduces the dataset used to train our model whereas Section 5.2 details the architecture and the protocol followed in our experiments. Then, qualitative (Section 5.3) and quantitative (Section 5.5) results are presented and an analysis of complexity and execution time (Section 5.4) is given. + +# 5.1. PCPNet dataset + +Our method is trained and validated quantitatively on the PCPNet dataset as provided by Guerrero et al. [19]. It consists of a mixture of high-resolution scans, point clouds sampled from handmade mesh surfaces and differentiable surfaces. Each point cloud consists of 100k points. We reproduce the experimental setup of [5, 19], training on the provided split containing 32 point clouds under different levels of noise. The test set consists of six categories, containing four sets with different levels of noise (no noise, $\sigma = 0.00125$ , $\sigma = 0.0065$ and $\sigma = 0.012$ ) and two sets with different sampling density (striped pattern and gradient pattern). We evaluate unoriented normal estimation, same as the related approaches. The Root Mean Squared Error (RMSE) on the provided 5k points subset is used as performance metric following the protocol of related work, where the RMSE is first computed for each test point cloud + +before the results are averaged over all point clouds in one category. Model selection is performed using the provided validation set. + +# 5.2. Experimental setup and architecture + +The presented graph neural network was implemented using the Pytorch Geometric library [13]. The neural networks $h$ , $\gamma$ and $\psi$ each consist of two linear layers, with ReLU non-linearity. A detailed description of the architecture is presented in the supplemental materials. During training, output weights from the kernel are randomly set to zero with probability of 0.25. + +It should be noted that despite inheriting the neighborhood size parameter from traditional PCA, it is possible for a network trained on a specific $k$ to be applied for other $k$ as well. This is because all networks can be shared across an arbitrary number of points and the softmax function normalizes weights for neighborhoods of varying sizes. We observed that generalization across different $k$ only leads to a very small increase in average error. However, to fairly evaluate our method for different $k$ , a network is trained for each $k \in \{32, 48, 64, 96, 128\}$ . Trained consists of 300 epochs using the RMSProp optimization method. All reported test results are given after 4 re-weighting iterations of our algorithm. Iterating longer does not show significant improvements. Quantitative results over iterations, results for extrapolation over iterations and generalization between different $k$ are presented in the supplemental materials. For further realization details, we refer to our implementation, which we will make available online prior to publication. + +# 5.3.Quantitative Evaluation + +RMSE results for the PCPNet test set of our approach (with $k = 64$ ) and related works are shown in Table 1. We improve on the state of the art on all noise levels and varying densities. While the improvement is only small, it should be noted that we reach it while being orders of magnitude faster and more parameter efficient (c.f. Section 5.4, which is of importance for many applications in resource constraint environments. For the non deep learn- + +
Ours L = 4PCA
Neighborhood size k3248649612832486496128
No noise6.096.636.726.827.359.109.9410.6811.9312.54
Noise (σ = 0.00125)10.229.639.9510.459.6411.2211.5612.0812.7112.97
Noise (σ = 0.006)18.1717.3617.1817.0316.9028.4123.0020.6818.8118.12
Noise (σ = 0.012)25.1722.4021.9621.8022.1345.3538.4833.6728.8126.67
Varying Density (Stripes)7.227.637.737.878.6710.4811.4012.0713.1814.07
Varying Density (Gradients)6.847.197.517.698.499.9610.7411.3512.3613.21
Average12.2811.8111.8411.9412.2019.0917.5216.7516.3016.26
+ +![](images/050582359976cf09bcbe1a2d16cc908b69d07d2d6a0e09f7c584948684cc08c1.jpg) + +![](images/2d28d59a30116646314a075c87f76f9fbed249815eace1ed8887f170de06789f.jpg) + +![](images/0678ba36127531e96137f906901e189b07e0843112129e7f1d735d9bb893780f.jpg) + +![](images/012960fef07f27ce2a57aad729038a23c93062466b9261d8d53433be80949fc2.jpg) + +![](images/1942d3bcf41e71cc9b5c8b90bbbe619561574b9777d9d2170f11f5761c980312.jpg) +Figure 2: Comparison for varying angle error threshold. For error thresholds on the x-axis, the y-axis shows the percentage of normals which have an error lower than that threshold. Our method and PCA use neighborhood size $k = 64$ . For low noise settings and varying density, our method succeeds in recovering sharp features, as shown by the higher accuracies for low angle thresholds. + +![](images/c1fe6b21e07e4f735115b2ddda33985fac3f00039bad96bba76a0c4d72039e63.jpg) + +ing approaches, PCA and Jet, results for medium neighborhood sizes are displayed. In addition, results for different $k$ are provided in Table 2 and compared to errors obtained by PCA with the same respective neighborhood size. Our method performs stronger than the PCA baseline in all scenarios. As expected, varying $k$ leads to a behavior similar to that of PCA, with large $k$ 's performing better on more noisy data. However, it can be observed that our approach is more robust to changes of $k$ : Even for small neighborhood sizes, high noise is handled significantly better than by PCA and large neighborhoods still produce satisfactory results for low noise data. It should be noted that for all + +evaluated $k$ we improve on the state of the art w.r.t. average error. An evaluation for smaller $k$ down to $k = 2$ is provided in the supplemental materials. + +While the RMSE error metric is well suited for a general comparison, it is not a good proxy to estimate the ability of recovering sharp features since it does not take into account the error distribution over angles. Therefore, as an additional metric, Figure 2 presents the percentage of angle errors falling below different angle thresholds. The results confirm that our approach is better at preserving details and sharp edges, especially for low noise point clouds and varying density, where it outperforms other approaches. For higher noise, results similar to Nesti-Net are achieved. + +# 5.4. Efficiency + +Our model is small, consisting of only 7981 trainable parameters, shared over iterations and spatial locations. On a single Nvidia Titan Xp, a point cloud with $100k$ points is processed in 5.67 seconds (0.0567 ms per point). A large part of this is the kd-tree used to compute the nearest neighbor graph, which takes 2.1 seconds of the 5.67 seconds. It is run on the CPU and could be further sped-up by utilizing GPUs. + +Table 2: Comparison of unoriented normal estimation RMSE between the proposed method and PCA for different neighborhood sizes $k$ . It can be seen that our method consistently provides lower errors while being significantly more robust to changes of that parameter, compared to PCA. + +
OursNesti-Net [5]PCPNet [19]
Num. parameters7981179M22M
Exec. time, 100k p.3.57 s1350 s470 s
Relative exec. time1×378×131×
+ +Table 3: Comparison of efficiency between the approaches using deep learning. We list number of model parameters as well as average execution times for estimating normals on a point cloud with 100k points. + +In Table 3 we compare our approach against the related deep learning approaches Nesti-Net and PCPNet. Our approach is orders of magnitude $(378\times$ and $131\times)$ faster than the related approaches. The comparison was made + +![](images/606cf5f7cfa981c0f8cea88d923e4e4dca0853b86e6cbd6068667d3190cd8ae8.jpg) +Figure 3: Qualitative comparison between our method ( $k = 64$ , $L = 4$ ) and related work. We show diverse examples from the test set, sampled from different categories, noise levels and density variations. The color encodes the angle error of estimated normals in degrees. Best viewed in the digital version of the paper. + +![](images/4d089c5a059c328acbdd016a7ada4a9098296975dfa21aa25ea5dd38283ca670.jpg) +Figure 4: Local behaviour of our method over several iterations for a sharp edge (a) and a noisy surface (b). The partial point clouds where sampled from the PCPNet test dataset. The colors in the first rows show the weights from the kernel network for one normal in the neighborhood while the colors in the second row show the angle error of all neighborhood normals. + +as fair as possible by excluding nearest neighbor queries (note that this favors the other approaches since they need larger neighborhoods) and the original implementations. The speedup of our method can be contributed to the much smaller network size and the parallel design of the GNN and least-squares optimization steps. + +# 5.5. Qualitative Evaluation + +This section visually presents surface normal errors for various elements of the PCPNet test set in Figure 3 and compares them against results from the PCA baseline and related deep learning approaches. It can be seen that the biggest improvements are obtained for low noise scenarios and varying density, where our method is able to preserve sharp features of objects better than the other methods. In general it can be observed that our approach tends to provide sharp, discriminative normals for points on edges instead of smooth averages. In rare cases, this can lead to a false assignment of points to planes, as we can see in the + +example in column 8. It can be observed that, in contrast to Nesti-Net, our approach behaves equivariant to input rotation as is seen clearly on the diagonal edge of the box example in column 3. Sharp edges are kept also in uncommon rotations, which we can attribute to our local rotational transformer. Results for more examples are displayed in the supplemental material. + +Interpretability. In order to interpret the results of our method, Figure 4 shows a detailed view of local neighborhoods over several iterations of our algorithm. An example for a sharp edge is shown in Figure 4a and a high noise surface in Figure 4b. Both sets of points were sampled from the real test data. For the sharp edge, the algorithm initially fits a plane with uniform weights, leading to smoothed normals. Over the iterations, high weights concentrate on the more plausible plane, leading to recovering of the sharp edge. In the noisy example, we can see that outliers are iteratively receiving lower weights, leading to more stable estimates. + +![](images/e190763e2a3709de6d57fb279028a94c71a8dcacba84bf34ff7ebdeb93f06cce.jpg) +Figure 5: Selected results after applying Poisson surface reconstruction using the estimated normal vectors. In most cases, differences between the methods are very small. Examples 2 and 3 show reconstructions from point clouds with varying density, which show the largest differences. + +Surface reconstruction. To further evaluate the quality of the produced normals when used as input to other computer vision pipelines, Figure 5 shows the results for Poisson surface reconstruction. Since the methods in this comparison all perform unoriented normal estimation (Guerrero et al. [19] evaluates both, unoriented and oriented, where we chose the unoriented version for a fair comparison), we determine the signs of the output normals from all four methods using the ground truth normals. Most of the reconstructions show only small differences, with our approach and Nesti-Net retaining slightly more details than the others. Significant differences can be observed for point clouds with varying density, displayed in rows 2 and 3. Here, our approach successfully retains the original structure of the object while still providing sharp edges. + +Transfer to NYU depth dataset. In order to show generality of our approach, our models trained on the PCPNet dataset are validated on the NYU depth v2 dataset [38], a common benchmark dataset in the field of estimating normals from single images. It contains 1449 aligned and preprocessed RGBD frames, which are transformed to a point cloud before applying our method. After performing unoriented estimation, the normals are flipped towards the camera position. Evaluation is done qualitatively, since the dataset does not contain ground truth normal vectors. Results for three different neighborhood sizes in comparison to PCA are shown in Figure 6. Our approach behaves as expected, as it is able to infer plausible normals for the given scenes. For all $k$ , our approach is able to preserve sharp fea + +![](images/73b22edb65f6c5931011af2331b09db8092e96621bae9a1cd8629262733dca5d.jpg) +Figure 6: Examples for normal estimation on scanned data from the NYU depth v2 dataset. Colors encode the orientation of normals. Our model generalizes to this dataset while being able to retain more details and sharper edges than PCA. However, scanning artifacts are also kept and visible. Best viewed in the digital version of the paper. + +tures while PCA produces very smooth results. However, this also leads to the sharp extraction of scanning artifacts, which can be seen on the walls of the scanned room. + +# 6. Conclusion and future work + +We presented a novel method for deep surface normal estimation on unstructured point clouds, consisting of parallel, differentiable least-squares optimization and deep reweighting. In each iterations, the weights are computed using a kernel function that is individually parameterized and rotated for each neighborhood by a task-specific graph neural network. The algorithm is much more efficient than previous deep learning methods, reaches state-of-the-art accuracy, and has favorable properties like equivariance and robustness to noise. For future work, investigating the possibility of utilizing deep data priors to parameterize least-squares problems holds large potential. We suspect that introducing data-dependency to other traditional methods can lead to progress in other fields of research, by reducing common disadvantages of pure deep learning approaches. On the theoretical side, it is interesting to dive deeper into convergence properties of IRLS with deep re-weighting. + +# Acknowledgements + +We thank Matthias Fey for his work on Pytorch Geometric. We also thank him and Prof. Dr. Heinrich Müller for helpful advice and discussions. + +# References + +[1] P. Alliez, D. Cohen-Steiner, Y. Tong, and M. Desbrun. Voronoi-based variational reconstruction of unoriented point sets. In Proceedings of the Fifth Eurographics Symposium on Geometry Processing, SGP '07, pages 39–48, 2007. +[2] Nina Amenta and Marshall Bern. Surface reconstruction by voronoi filtering. In Proceedings of the Fourteenth Annual Symposium on Computational Geometry, SCG '98, pages 39-48, 1998. +[3] Samir Aroudj, Patrick Seemann, Fabian Langguth, Stefan Guthe, and Michael Goesele. Visibility-consistent thin surface reconstruction using multi-scale kernels. ACM Transaction on Graphics, 36(6):187:1-187:13, 2017. +[4] Aayush Bansal, Bryan C. Russell, and Abhinav Gupta. Marr revisited: 2d-3d alignment via surface normal prediction. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5965-5974, 2016. +[5] Yizhak Ben-Shabat, Michael Lindenbaum, and Anath Fischer. Nesti-net: Normal estimation for unstructured 3d point clouds using convolutional neural networks. CoRR, abs/1812.00709, 2018. +[6] Alexandre Boulch and Renaud Marlet. Fast and Robust Normal Estimation for Point Clouds with Sharp Features. Computer Graphics Forum, 2012. +[7] Alexandre Boulch and Renaud Marlet. Deep Learning for Robust Normal Estimation in Unstructured Point Clouds. Computer Graphics Forum, 2016. +[8] M. M. Bronstein, J. Bruna, Y. LeCun, A. Szlam, and P. Vandergheynst. Geometric deep learning: Going beyond euclidean data. IEEE Signal Processing Magazine, 34(4):18-42, July 2017. +[9] F. Cazals and M. Pouget. Estimating differential quantities using polynomial fitting of osculating jets. In Proceedings of the 2003 Eurographics/ACM SIGGRAPH Symposium on Geometry Processing, pages 177-187, 2003. +[10] Haowen Deng, Tolga Birdal, and Slobodan Ilic. Ppf-foldnet: Unsupervised learning of rotation invariant 3d local descriptors. In European Conference of Computer Vision (ECCV), pages 620-638, 2018. +[11] Haowen Deng, Tolga Birdal, and Slobodan Ilic. Ppfnet: Global context aware local features for robust 3d point matching. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 195-205, 2018. +[12] David Eigen and Rob Fergus. Predicting depth, surface normals and semantic labels with a common multi-scale convolutional architecture. In Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), pages 2650-2658, 2015. +[13] Matthias Fey and Jan E. Lenssen. Fast graph representation learning with PyTorch Geometric. CoRR, abs/1903.02428, 2019. +[14] Matthias Fey, Jan Eric Lenssen, Frank Weichert, and Heinrich Müller. Splinecnn: Fast geometric deep learning with continuous b-spline kernels. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 869-877, 2018. + +[15] David F. Fouhey, Abhinav Gupta, and Martial Hebert. Data-driven 3D primitives for single image understanding. In International Conference on Computer Vision (ICCV), 2013. +[16] Mike B. Giles. Collected matrix derivative results for forward and reverse mode algorithmic differentiation. In Christian H. Bischof, H. Martin Bucker, Paul Hovland, Uwe Naumann, and Jean Utke, editors, Advances in Automatic Differentiation, pages 35-44. Springer Berlin Heidelberg, 2008. +[17] Eleonora Grilli, Fabio Menna, and Fabio Remondino. A review of point clouds segmentation and classification algorithms. ISPRS - International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, XLII-2/W3:339-344, 02 2017. +[18] Gael Guennebaud and Markus Gross. Algebraic point set surfaces. ACM Transactions on Graphics, 26(3), 2007. +[19] Paul Guerrero, Yanir Kleiman, Maks Ovsjanikov, and Niloy J. Mitra. Pcnet learning local shape properties from raw point clouds. Computer Graphics Forum, 37(2):75-85, 2018. +[20] William L. Hamilton, Zhitao Ying, and Jure Leskovec. Representation learning on graphs: Methods and applications. IEEE Data Eng. Bull., 40:52-74, 2017. +[21] Richard Hartley and Andrew Zisserman. Multiple View Geometry in Computer Vision. Cambridge University Press, New York, NY, USA, 2 edition, 2003. +[22] Paul W. Holland and Roy E. Welsch. Robust regression using iteratively reweighted least-squares. Communications in Statistics - Theory and Methods, 6(9):813-827, 1977. +[23] Hugues Hoppe, Tony DeRose, Tom Duchamp, John McDonald, and Werner Stuetzle. Surface reconstruction from unorganized points. In Proceedings of the 19th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH '92, pages 71-78, 1992. +[24] Hui Huang, Shihao Wu, Minglun Gong, Daniel Cohen-Or, Uri Ascher, and Hao (Richard) Zhang. Edge-aware point set resampling. ACM Trans. Graph., 32(1):9:1-9:12, Feb. 2013. +[25] Xiangru Huang, Zhenxiao Liang, Xiaowei Zhou, Yao Xie, Leonidas J. Guibas, and Qixing Huang. Learning transformation synchronization. CoRR, abs/1901.09458, 2019. +[26] Max Jaderberg, Karen Simonyan, Andrew Zisserman, and Koray Kavukcuoglu. Spatial transformer networks. In Proceedings of the 28th International Conference on Neural Information Processing Systems (NeurIPS), pages 2017-2025, 2015. +[27] Michael Kazhdan, Matthew Bolitho, and Hugues Hoppe. Poisson surface reconstruction. In Proceedings of the Fourth Eurographics Symposium on Geometry Processing, SGP '06, pages 61-70, 2006. +[28] K. Klasing, D. Althoff, D. Wollherr, and M. Buss. Comparison of surface normal estimation methods for range sensing applications. In 2009 IEEE International Conference on Robotics and Automation, pages 3206-3211, May 2009. +[29] Lubor Ladicky, Bernhard Zeisl, and Marc Pollefeys. Discriminatively trained dense surface normal estimation. In ECCV, 2014. +[30] David Levin. The approximation power of moving least-squares. Math. Comput., 67(224):1517-1531, Oct. 1998. + +[31] Bo Li, Chunhua Shen, Yuchao Dai, A. van den Hengel, and Mingyi He. Depth and surface normal estimation from monocular images using regression on deep features and hierarchical crfs. In 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1119-1127, 2015. +[32] Jonathan Masci, Davide Boscaini, Michael M. Bronstein, and Pierre Vandergheynst. Geodesic convolutional neural networks on riemannian manifolds. In Proceedings of the 2015 IEEE International Conference on Computer Vision Workshop (ICCVW), pages 832-840, 2015. +[33] Quentin Merigot, Maks Ovsjanikov, and Leonidas J. Guibas. Voronoi-based curvature and feature estimation from point clouds. IEEE Transactions on Visualization and Computer Graphics, 17(6):743-756, 2011. +[34] N. J. Mitra, A. Nguyen, and L. Guibas. Estimating surface normals in noisy point cloud data. In special issue of International Journal of Computational Geometry and Applications, volume 14, pages 261-276, 2004. +[35] Federico Monti, Davide Boscaini, Jonathan Masci, Emanuele Rodolà, Jan Svoboda, and Michael M. Bronstein. Geometric deep learning on graphs and manifolds using mixture model cnns. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5425-5434, 2017. +[36] Christopher Morris, Martin Ritzert, Matthias Fey, William L. Hamilton, Jan Eric Lenssen, Gaurav Rattan, and Martin Grohe. Weisfeiler and leman go neural: Higher-order graph neural networks. In AAAI Conference on Artificial Intelligence (AAAI), 2019. +[37] Patrick Mullen, Fernando de Goes, Mathieu Desbrun, David Cohen-Steiner, and Pierre Alliez. Signing the unsigned: Robust surface reconstruction from raw pointsets. Computer Graphics Forum, 29(5):1733-1741, 2010. +[38] Pushmeet Kohli Nathan Silberman, Derek Hoiem and Rob Fergus. Indoor segmentation and support inference from rgbd images. In European Conference on Computer Vision (ECCV), 2012. +[39] François Pomerleau, Francis Colas, and Roland Siegwart. A review of point cloud registration algorithms for mobile robotics. Found. Trends Robot, 4(1):1-104, May 2015. +[40] Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In Advances in Neural Information Processing Systems 30, pages 5099-5108. 2017. +[41] Xiaojuan Qi, Renjie Liao, Zhengzhe Liu, Raquel Urtasun, and Jiaya Jia. Geonet: Geometric neural network for joint depth and surface normal estimation. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 283-291, 2018. +[42] Marie-Julie Rakotosaona, Vittorio La Barbera, Paul Guerrero, Niloy J. Mitra, and Maks Ovsjanikov. POINTCLEANNET: learning to denoise and remove outliers from dense point clouds. CoRR, abs/1901.01060, 2019. +[43] Rene Ranftl and Vladlen Koltun. Deep fundamental matrix estimation. In European Conference on Computer Vision (ECCV), September 2018. + +[44] Supasorn Suwajanakorn, Noah Snavely, Jonathan J. Tompson, and Mohammad Norouzi. Discovery of latent 3d keypoints via end-to-end geometric reasoning. In Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems (NeurIPS), pages 2063-2074, 2018. +[45] Xiaolong Wang, David F. Fouhey, and Abhinav Gupta. Designing deep networks for surface normal estimation. 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 539-547, 2015. +[46] Yue Wang and Justin M. Solomon. Deep closest point: Learning representations for point cloud registration. In International Conference on Computer Vision (ICCV), 2019. +[47] Shihao Wu, Hui Huang, Minglun Gong, Matthias Zwicker, and Daniel Cohen-Or. Deep points consolidation. ACM Transaction on Graphics, 34(6):176:1-176:13, 2015. \ No newline at end of file diff --git a/deepiterativesurfacenormalestimation/images.zip b/deepiterativesurfacenormalestimation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..133a329cdfa6d4e536ade3c6a9b8501350c6e62f --- /dev/null +++ b/deepiterativesurfacenormalestimation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2c0e49eb7f0c5a8a60521655a37abf2e22f2a48888af5b25d338ec77ade8a24 +size 549959 diff --git a/deepiterativesurfacenormalestimation/layout.json b/deepiterativesurfacenormalestimation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..802da9bb42b52ca840321d427808ab078b4fe9c8 --- /dev/null +++ b/deepiterativesurfacenormalestimation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1309a9328848117d28b4320cc99962c86589529698efa57bf29cd8e9c8ad9da1 +size 400714 diff --git a/deepkinematicsanalysisformonocular3dhumanposeestimation/16695081-d974-469b-879d-51be4ec3268e_content_list.json b/deepkinematicsanalysisformonocular3dhumanposeestimation/16695081-d974-469b-879d-51be4ec3268e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..732f92bcf63085b3701f27119a5a408fd687d52a --- /dev/null +++ b/deepkinematicsanalysisformonocular3dhumanposeestimation/16695081-d974-469b-879d-51be4ec3268e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed468060a4cbddd63002f788b65242738493a532c6414cdb085efa73777c0e8e +size 84041 diff --git a/deepkinematicsanalysisformonocular3dhumanposeestimation/16695081-d974-469b-879d-51be4ec3268e_model.json b/deepkinematicsanalysisformonocular3dhumanposeestimation/16695081-d974-469b-879d-51be4ec3268e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e76b766761a772597df16a9ea4a253bfec37ea9e --- /dev/null +++ b/deepkinematicsanalysisformonocular3dhumanposeestimation/16695081-d974-469b-879d-51be4ec3268e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51b2819d848b7d6a11d03e00ef7627a7ba3030da8a5f51c73d86c19d6228b94d +size 102575 diff --git a/deepkinematicsanalysisformonocular3dhumanposeestimation/16695081-d974-469b-879d-51be4ec3268e_origin.pdf b/deepkinematicsanalysisformonocular3dhumanposeestimation/16695081-d974-469b-879d-51be4ec3268e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..18b708cf07073918a5bd1506e9165fbd7da44081 --- /dev/null +++ b/deepkinematicsanalysisformonocular3dhumanposeestimation/16695081-d974-469b-879d-51be4ec3268e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c681d7b1dac96897cc9e9f50ba113bc6fb68e9720c34afb6308d6b48ad9a1eb8 +size 841972 diff --git a/deepkinematicsanalysisformonocular3dhumanposeestimation/full.md b/deepkinematicsanalysisformonocular3dhumanposeestimation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..26a207cc5015c55bb39e28585f78a6b49653ba4d --- /dev/null +++ b/deepkinematicsanalysisformonocular3dhumanposeestimation/full.md @@ -0,0 +1,328 @@ +# Deep Kinematics Analysis for Monocular 3D Human Pose Estimation + +Jingwei Xu\*1,2, Zhenbo Yu\*1,2, Bingbing Ni\*1,2,3, Jiancheng Yang1,2, Xiaokang Yang1,2, Wenjun Zhang1,2 + +$^{1}$ Shanghai Jiao Tong University, Shanghai 200240, China + +$^{2}$ MoE Key Lab of Artificial Intelligence, AI Institute, Shanghai Jiao Tong University + +$^{3}$ Huawei Hisilicon + +{xjwxjw,yuzhenbo,nibingbing,jekyll4168,xkyang,zhangwenjun}@sjtu.edu.cn, nibingbing@hisilicon.com + +# Abstract + +For monocular 3D pose estimation conditioned on 2D detection, noisy/unreliable input is a key obstacle in this task. Simple structure constraints attempting to tackle this problem, e.g., symmetry loss and joint angle limit, could only provide marginal improvements and are commonly treated as auxiliary losses in previous researches. It still remains challenging to fully utilize human prior knowledge in this task. In this paper, we propose to address above issue in a systematic view. Firstly, we show that optimizing the kinematics structure of noisy 2D inputs is critical to obtain accurate 3D estimations. Secondly, based on corrected 2D joints, we further explicitly decompose articulated motion with human topology, which leads to more compact 3D static structure easier for estimation. Finally, we propose a temporal module to refine 3D trajectories, which obtains more rational results. Above three steps are seamlessly integrated into deep neural models, which form a deep kinematics analysis pipeline concurrently considering the static/dynamic structure of 2D inputs and 3D outputs. Extensive experiments show that proposed framework achieves state-of-the-art performance on two widely used 3D human action datasets. Meanwhile, targeted ablation study shows that each former step is critical for the latter one to obtain promising results. + +# 1. Introduction + +Pose estimation is a hot-spot topic in computer vision researches [35, 51, 2, 5]. Particularly, 3D pose estimation for monocular video has drawn tremendous attention in the past decades [21, 18, 37, 33, 1, 6], which involves estimating keypoint trajectories of human subject in 3D space. This research topic possesses several valuable downstream applications, e.g., action recognition [3, 23], human body recon + +![](images/b5fdd63d12e883c1a202ca0123957e966c0fa79e5799d6a01fdacb75f87e4a2f.jpg) +Deep + +![](images/c256f7354fdb5c1fdbf546670c9521cbca06b53efd9eaa52dab1da07593ce8db.jpg) +Reliable (approx) + +![](images/bdeded5fdae7fd65a31307a3a64f3006a4994561a8839b14bafcc5d5dc1f6639.jpg) +Unreliable + +![](images/2512436835fd2f46ba41666645b89d04e378a45075e07e4c925e5338ca841f3e.jpg) + +![](images/652ecf88ad94847177c17d0291c34fd9d4870ea346a185d797062c30ce6b807e.jpg) +Figure 1: Overview of proposed framework. Our model pursues 3D pose estimation with more reasonable structure and more compact output space, which incorporates kinematics analysis into deep models. Step 1: Noisy/unreliable 2D Inputs (denoted as red dots) are corrected with perspective projection. Step 2: 3D poses are further estimated in a decomposed manner within more compact space. Step 3: Unreliably estimated 3D poses are excluded from previous outputs (denoted by red cross), which are finally refined as a completion task. + +![](images/24b303da9af0b2481c0f5a573a65bb0f21b36aa6aec7802ed84b8e8f9e843065.jpg) +Step 3 + +![](images/3aa61ff86db4d77ac244896be97651f46fe50d8ef7d600f3d4ad74c16e7698b2.jpg) + +![](images/2dbcec91e6d26ddb28ca074682d3f7c874ea0be396f78685b9ec230e372672f7.jpg) + +![](images/d3fded4d13e25fab63d6fea7ecbef95d0a4102e2a4cfad7d84c511b2d0d7acb8.jpg) + +![](images/33bf906967cc24baa19e0e07168cf9af975acc60a6e92bef734a825535a4a72f.jpg) + +struction [16, 13, 47] and robotics manipulation [34]. + +Recently, many works [11, 5] have used 2D pose detectors to facilitate the 3D human pose estimation task. Several previous researches [28, 25, 46, 38, 7] take detected 2D keypoints as input and predict corresponding 3D joint locations from monocular video, which have promising results and require much less training resources compared to other works fed with RGB images [19, 42, 10, 54]. Our work belongs to this branch with explicit incorporation of kinematics analysis, which would be discussed in detail at latter paragraphs. + +Despite considerable progress in 2D-keypoint condi + +![](images/8387bb387af0cb3abc0419495f66bf1b1d3872cd15f8fb7d3546f9484f90659f.jpg) +Figure 2: Detailed architecture of proposed framework. Three hierarchical modules (from left to right) correspond to 2D pose correction $(\phi_{2D})$ , 3D pose estimation $(\phi_{3D}^{len}, \phi_{3D}^{dir})$ and 3D trajectory refinement $(\phi_{3D}^{ctn})$ respectively. $\tilde{p}_{2D}$ is corrected 2D pose and $\tilde{f}, \tilde{c}$ refer to regressed camera parameters. $\tilde{l}_{3D}$ and $\tilde{r}_{3D}$ are estimated length and direction from $\phi_{3D}^{len}, \phi_{3D}^{dir}$ . $\tilde{S}_{3D}$ and $\hat{S}_{3D}$ stand for 3D pose before/after trajectory completion respectively. + +tioned 3D pose estimation, several critical challenges remain yet to be solved. On one hand, 2D detections are generally noisy and unreliable due to motion blur and self-occlusion contained in video sequences. Current methods [25, 46, 33] adopt simple structure constraints, e.g., symmetric bone length [33] and limited joint angle [16], to facilitate 3D joint predictions, which are insufficient to bring significant improvements for this task. On the other hand, the majority of existing approaches directly formulate this task as a coordinate regression problem, which do not fully take the inherent kinematics structure of human subject into consideration and commonly leads to invalid results. + +Real-world human motion obeys kinematics laws involving 2D/3D correspondence and static/dynamic structure: (1) For camera-based view, 3D and projected 2D joints should follow the constraint of perspective projection. (2) For static structure, the length between two adjacent 3D joints (defined by skeleton) should be constant throughout the whole motion sequence. (3) For dynamic structure, estimated 3D trajectory formed by the same joint should be smooth and continuous. We are thus motivated to integrate all above laws forming a systematical analysis pipeline from correspondence to structure, which facilitates pursuing 3D poses within more rational solution space. + +In this paper, we propose to systematically incorporate kinematics analysis into deep models for effective utilization of human prior knowledge. As illustrated in Fig. 1, we firstly refine 2D inputs to be more reliable rather than only consider the estimation accuracy of 3D keypoints [33, 1]. A novel optimization scheme is designed for 2D keypoints under the constraint of perspective projection, which mainly facilitates kinematics structure correction of noisy 2D inputs. To our best knowledge, it is the first attempt that perspective projection is used for 2D joints refinement rather than 3D counterparts. Experimental results demonstrate + +that above 2D optimization scheme is critical for the following 3D pose estimation. Secondly, starting from the static structure of human subject, we decompose articulated motion based on rigid body assumption, which breaks unconstrained 3D trajectories down to a tree-structured combination of 2D sphere curves with much lower dimension. More specifically, we split 3D coordinate regression problem into two sub-tasks, i.e., length and direction estimation, which are complementary to each other and reduce the learning difficulty by a large margin. Finally, we notice that not all parts are equally estimated. To pursue valid dynamic structure we exclude those joints with low reliability from above predictions and the whole 3D trajectory is completed based on more reliable parts. Above three steps are seamlessly integrated into deep neural models, which form a systematic analysis pipeline, i.e., our model simultaneously considers the kinematics structure of 2D inputs and 3D outputs. + +We conduct detailed ablation study to demonstrate the contribution of each component of proposed framework. Further extensive experiments show that our model achieves state-of-the-art performance on two widely used 3D human motion datasets. + +# 2. Related Work + +In this section, we discuss the approaches that are based on deep neural networks for 3D pose estimation. + +Holistic 3D pose estimation. With the excellent feature extraction capacity of deep neural networks, many approaches [19, 31, 44, 42, 26, 32, 27, 10, 54, 6] utilize Deep Convolutional Neural Networks to estimate 3D poses from the images or other sources (e.g., point clouds [50, 22, 49]) directly. In this paper we concentrate on the image one. Li et al. [19] firstly apply CNNs to jointly estimate 3D poses and detect body parts via a multi-task framework. Tekin et al. [42] use an overcomplete auto-encoder to learn a high + +![](images/0ee319c53326c719ced7f7548c3a8a5e8106248447b9c161c8f4cca2227f5c5f.jpg) +Figure 3: Example of perspective projection used to refine 2D inputs. This essentially incorporates 3D supervision signal for 2D pose training, where 2D/3D correspondence is better preserved. + +dimensional latent pose representation and account for joint dependencies. Differently, [10] and [54] both utilize intermediate 3D representations and 2D counterparts to regress 3D poses. However, training deep models directly from images requires expensive computation resources and careful hyper-parameter tuning. Differently, our model starts with detected 2D joints as inputs whose pipeline is largely simplified but with comparable performance. + +Two-step pose estimation. To avoid collecting 2D-3D paired data, a variety of works [55, 25, 43, 4, 9, 53, 52, 28, 38, 7] decouple the task of 3D pose estimation into two independent stages: (1) firstly predicting 2D joint location in image space using off-the-shelf 2D pose estimation methods; (2) and then learning a mapping to lift them to 3D space. Moreno et al. [28] learn a mapping from 2D to 3D distance matrices. A simple yet effective method [25] can directly predict 3D joint locations via deep CNNs. Regarding the prior knowledge of human structure, Wang et al. [46] propose a progressive approach that explicitly accounts for the distinct DOFs among the body parts. Sharma et al. [38] synthesize diverse anatomically plausible 3Dpose samples conditioned on the estimated 2D poses via a deep conditional variational auto-encoder based model. The generic combination [7] of Graph Convolutional Network (GCN) and Connected Network (FCN) can also improve the representation capability. These approaches mainly focus on the second stage and our method also belongs to this branch. However, few researches have paid attention on the inherent validity of 2D/3D poses in a systemic and comprehensive view, where kinematics structure and view correspondence are generally ignored. + +Video pose estimation. Since most previous works operate in a single-frame setting, recently more attention [14, 21, 18, 8, 37, 33, 1, 6, 20, 36, 48] has been put on temporal information from monocular video clips. LSTMs [21] have been applied to refine 3D poses predicted + +Table 1: Influence of 2D accuracy for 3D pose estimation. Both are evaluated by mean squared error. $M = 1$ is no 2D refinement is applied. + +
Window Length2D Joints Train/Test3D Joints Train/Test
M=10.058 / 0.0780.027 / 0.053
M=50.042 / 0.0710.024 / 0.052
M=90.033 / 0.0670.023 / 0.052
+ +from single images. There has also been work on RNN approach [18] which considers prior knowledge with body part based structural connectivity. Rayat et al. [37] utilize the temporal smoothness constraint across a sequence of 2D joint locations to estimate a sequence of 3D poses. Pavllo et al. [33] transform a sequence of 2D poses through temporal convolutions and make computational complexity independent of key-point spatial resolution. Multi-scale features for the graph-based representations [1] are critic to pose estimation by a local-to-global network architecture. Unlike existing temporal based methods, our model explicitly incorporate a kinematics analysis pipeline for 3D pose estimation. + +# 3. Method + +In this section, we present detailed description of proposed method. The overall framework is illustrated in Fig. 2. In our method and experiments, we focus on pose estimation over a short video clip $(T\leq 9)$ + +# 3.1. Projection based 2D Pose Correction + +2D Temporal Refinement. Given a monocular video clip with length of $T$ time stamps, we first apply pretrained 2D pose detector (e.g., CPN [5]) to obtain 2D joints. 2D detections on single frame are generally noisy and unreliable due to motion blur and occlusion [11]. We first utilize a temporal CNN model (denoted as $\phi_{2D}$ as shown in Fig. 2) to refine 2D initial inputs (denoted as $\tilde{\mathbf{P}} = \{\tilde{\mathbf{p}}_t\}_{t=1}^T$ , $\tilde{\mathbf{K}} = \{\tilde{\mathbf{k}}_t\}_{t=1}^T$ , $\tilde{\mathbf{p}}_t \in \mathbb{R}^{J \times 2}$ , $\tilde{\mathbf{k}}_t \in \mathbb{R}^J$ .) Here $J$ refers to the number of joints for single human. Specifically, $\tilde{\mathbf{p}}_t = [\tilde{\mathbf{a}}_t, \tilde{\mathbf{b}}_t]$ where $\tilde{\mathbf{a}}_t$ and $\tilde{\mathbf{b}}_t$ represent 2D coordinates and $\tilde{\mathbf{k}}_t$ is corresponding confidence score. We adopt MSE loss weighted by confidence score $\tilde{\mathbf{K}}$ for trained as follows: + +$$ +\mathcal {L} _ {2 D} ^ {T e m} = \sum_ {t = 1} ^ {T} \tilde {\mathbf {k}} _ {t} \sqrt {\left| \mathbf {a} _ {t} - \tilde {\mathbf {a}} _ {t} \right| _ {2} ^ {2} + \left| \mathbf {b} _ {t} - \tilde {\mathbf {b}} _ {t} \right| _ {2} ^ {2}}, \tag {1} +$$ + +where $\mathbf{a}_t$ , $\mathbf{b}_t$ refers to the ground truth 2D joints. Intuitively, this procedure utilizes temporal smoothness to refine detected 2D joints. + +Limitation: Train/Test Imbalance. However, above optimization does not directly facilitate performance boosting for final 3D pose estimation. We conduct verification experiments (on Human3.6M dataset [15]) to support our statements. Specifically, we adopt single-frame 3D pose estimation model [33] with refined 2D joints as inputs. As shown in Tab. 1, estimation accuracy of 2D and 3D joints on both train and test set are reported. We can observe that with increase of window length, the training accuracy boosts for both 2D and 3D joints. But the improvement on 3D test set is marginal (last column). We attribute this for imbalanced inputs on Train/Test set. The large accuracy gap between train and test inputs (first two columns) is unknown to the following 3D pose estimation model, which leads to suboptimal results. + +Solution: Projection Constraint. To this end, we propose to refine the 2D inputs in a different point of view, i.e., 2D/3D correspondence is critical for rational pose estimation (as shown in Fig. 3). We denote 3D joints as $\mathbf{S} = \{\mathbf{s}_t\}_{t=1}^T, \mathbf{s}_t = [\mathbf{x}_t, \mathbf{y}_t, \mathbf{z}_t] \in \mathbb{R}^{J \times 3}$ . For each time stamp $t$ , projected 2D joints $\mathbf{p}$ and 3D joints $\mathbf{s}$ should obey perspective projection as follows: + +$$ +\mathbf {a} = \frac {\mathbf {x}}{\mathbf {z}} f _ {x} + c _ {x}, \mathbf {b} = \frac {\mathbf {y}}{\mathbf {z}} f _ {y} + c _ {y}, \tag {2} +$$ + +where $\mathbf{f} = [f_x, f_y]$ and $\mathbf{c} = [c_x, c_y]$ are focal length and point respectively. We omit subscript $t$ for simplicity. Our main idea is to recover $\mathbf{f}$ and $\mathbf{c}$ from refined 2D inputs and ground truth 3D joints during training. Intuitively, well estimated $\tilde{\mathbf{f}}$ and $\tilde{\mathbf{c}}$ indicate the projection correspondence is generally preserved. The remaining problem is how to obtain $\tilde{\mathbf{f}}$ and $\tilde{\mathbf{c}}$ efficiently. + +Linear squares regression is a simple yet effective approach for above issue. Take the projection $x$ -axis coordinates for example. As indicated by Eqn. 2, paired data points $(\mathbf{a}, \frac{\mathbf{x}}{\mathbf{z}}) = \{(a^j, \frac{x^j}{z^j})\}_{j=1}^J$ involving single human subject follows a straight line whose intercept and slope correspond to $f_x$ and $c_x$ respectively. For simplicity we omit the denominator, i.e., $\frac{x^j}{z^j} : x^j$ . Given refined 2D detections $\tilde{\mathbf{p}}$ and ground truth 3D joints $\mathbf{s}$ , we estimate $f_x$ and $c_x$ as follows: + +$$ +\tilde {f} _ {x} = \frac {\bar {a} \left(\sum_ {j = 1} ^ {J} x ^ {j}\right) ^ {2} - \bar {x} \sum_ {j = 1} ^ {J} x ^ {j} \tilde {a} ^ {j}}{\sum_ {j = 1} ^ {J} \left(x ^ {j}\right) ^ {2} - J \bar {x} ^ {2}}, \tilde {c} _ {x} = \bar {a} - \tilde {f} _ {x} \bar {x}, (3) +$$ + +where $\bar{a} = \frac{1}{J}\sum_{j=1}^{J}\tilde{a}^j$ , $\bar{x} = \frac{1}{J}\sum_{j=1}^{J}x^j$ . We obtain ground truth $f_x$ and $c_x$ the same as Eqn. 3 with ground truth $\mathbf{p}$ and $\mathbf{s}$ as inputs. We adopt L1 loss for training as follows: + +$$ +\mathcal {L} _ {2 D} ^ {p r o j} = \left| f _ {x} - \tilde {f} _ {x} \right| + \left| c _ {x} - \tilde {c} _ {x} \right|. \tag {4} +$$ + +Furthermore, estimated $\tilde{f}_x$ and $\tilde{c}_x$ at each time stamp should be constant for the whole monocular video clip, which is also utilized for training. More specifically, we randomly + +![](images/6592d1d2cee1939d96db04e61a15f85cbd23a8715b9e48026cb7c66f828f39e4.jpg) +Figure 4: Illustration of articulated motion for a pair of parent-children joints. The motion trajectory of children joint relative to its parent degenerates to spherical curve. + +select two time stamps, where estimated $\tilde{f}_x$ and $\tilde{c}_x$ are penalized with L1 difference. As shown in Fig. 2, $\phi_{2D}$ adopts an encoder-decoder architecture, the temporal length of outputs are equal to that of inputs. For detailed architecture please refer to supplementary material. + +Note that datasets used in our paper (Human3.6M [15] and HumanEva [39] Dataset) are recorded by cameras with fixed and almost identical $(\mathbf{f},\mathbf{c})$ , which indicates a global projection relation existing between all 2D and 3D poses. The refinement model is trained towards a single projection relation. If video sequences are recorded by cameras with varied $(\mathbf{f},\mathbf{c})$ , we could feed the $(\mathbf{f},\mathbf{c})$ as inputs to guarantee the generalization ability of proposed model. As intrinsic parameters, $(\mathbf{f},\mathbf{c})$ are generally low cost to obtain [33]. This part is leaved as future work worth studying. + +# 3.2. Decomposed 3D pose estimation + +Based on refined 2D joints, our second model (denoted as $\phi_{3D}^{dcm}$ ) predicts corresponding 3D keypoints. As discussed in Sec. 1, 3D articulated motion involved in monocular video clip is structure constrained. Fig. 4 depicts this kinematics law more explicitly. The motion trajectory of children joint relative to its parent (defined by human skeleton) forms a spherical curve. + +Explicit Pose Decomposition. Motivated by this, we decompose original coordinate regression problem into two complementary sub-tasks, i.e., length and direction regression. Specifically, for a 3D sequence $\mathbf{S} \in \mathbb{R}^{T \times J \times 3}$ , we first obtain the relative coordinate according to predefined skeleton topology, i.e., $\Delta \mathbf{S}^{j_c} = \mathbf{S}^{j_c} - \mathbf{S}^{j_p}$ , where $j_c$ refers some child joint and $j_p$ indicates its parent joint (shown in Fig. 4). Suppose the skeleton defined by joint pair $\{j_c, j_p\}$ is of length $l^{j_c}$ , $\Delta \mathbf{S}^{j_c}$ could be rewritten as $\Delta \mathbf{S}^{j_c} = \{l^{j_c} \mathbf{r}_t^{j_c}\}_{t=1}^T$ , where $\mathbf{r}_t^{j_c}$ is the unit vector representing direction of skeleton between $(j_c, j_p)$ at time stamp $t$ . $l^{j_c}$ is kept constant across the whole video clip. Therefore we predict $l^{j_c}$ and $\mathbf{r}_t^{j_c}$ as intermediate results, which are composed together according to human skeleton for final estimation (Eqn. 5). + +Global-local Combined 2D inputs. We extend inputs + +![](images/9a456276b82960b912ececcf593329c282f06a1dcb400c79dacba64ce94bebd5.jpg) +Figure 5: Per-joint estimation error in terms of MPJPE. Notably, the estimation error of four limbs (indexed by $0/1/4/5/6/7/10/11$ with red bar) is significantly higher than other joints. Dashed black line indicates mean MPJPE for all joints. + +$\tilde{\mathbf{P}}$ with similar manner as $\mathbf{S}$ , i.e., $[\tilde{\mathbf{P}}, \Delta \tilde{\mathbf{P}}, ||\Delta \tilde{\mathbf{P}}||_2^2] \in \mathbb{R}^{T \times J \times 5}$ . $\Delta \tilde{\mathbf{P}} \in \mathbb{R}^{T \times J \times 2}$ is obtained the same as $\Delta \mathbf{S}$ and $||\Delta \dot{\tilde{\mathbf{P}}}||_2^2 \in \mathbb{R}^{T \times J \times 1}$ is calculated pixel length for each skeleton. Above operation combines both global and local information as inputs, which provides more structured information for 3D pose estimation. + +Length & Direction Estimation. We adopt a two-stream architecture for length and direction estimation, where two sub-modules are denoted as $\phi_{3D}^{len}$ and $\phi_{3D}^{dir}$ respectively. For length estimation, we first extract pose feature for each time stamp, and then conduct feature aggregation at middle level representation, which are finally used to predict skeleton length $\tilde{\mathbf{l}} = \{\tilde{l}^j\}_{j=1}^J$ . In contrast, skeleton direction is estimated independently at each time stamp and the unit vector $\tilde{\mathbf{r}}_t = \{\tilde{\mathbf{r}}_t^{j,j}\}_{j=1}^J$ is obtained through a L2 normalization layer. For detailed architecture of $\phi_{3D}^{len}$ and $\phi_{3D}^{dir}$ , please refer to supplementary material. Up to now we obtain $\Delta \tilde{\mathbf{S}} = \tilde{\mathbf{l}} \tilde{\mathbf{R}}$ , where $\tilde{\mathbf{R}} = \{\tilde{\mathbf{r}}_t\}_{t=1}^T$ . Final estimation $\tilde{\mathbf{S}}$ is obtained through iterative summarization over $\Delta \tilde{\mathbf{S}}$ according to human topology as follows: + +$$ +\tilde {\mathbf {S}} ^ {j _ {c}} = \Delta \tilde {\mathbf {S}} ^ {j _ {c}} + \tilde {\mathbf {S}} ^ {j _ {p}}. \tag {5} +$$ + +Correspondingly, we adopt intermediate loss functions to facilitate the training procedure. For length estimation, we use L1 loss (denoted as $\mathcal{L}_{3D}^{len} = |\tilde{\mathbf{l}} -\mathbf{l}|$ ) to obtain more accurate results. For direction estimation, a cosine similarity loss (denoted as $\mathcal{L}_{3D}^{dir} = \langle \tilde{\mathbf{r}},\mathbf{r}\rangle -1$ ) is applied on $\tilde{\mathbf{R}}$ , which penalizes angle difference rather than distance. For final composed prediction, we use L2 loss (denoted as $\mathcal{L}_{3D}^{fin}$ ) for training. All three loss functions are shown as follows. For detailed architecture of $\phi_{3D}^{dir}$ and $\phi_{3D}^{len}$ please refer to supplementary material. + +$$ +\mathcal {L} _ {3 D} ^ {d c m} = \mathcal {L} _ {3 D} ^ {l e n} + \mathcal {L} _ {3 D} ^ {d i r}, \mathcal {L} _ {3 D} ^ {f i n} = | | \tilde {\mathbf {S}} - \mathbf {S} | | _ {2} ^ {2}. \tag {6} +$$ + +Discussion on Pose Decomposition. The most related work for this part is Sun et al. [41], which conducts pose + +estimation in an compositional way. However, our work differentiates from Sun et al. [41] in following three aspects: (1) Our work concentrate on monocular pose estimation rather than single image. (2) Instead of direct coordinate regression, we explicitly decomposes output space with rigid body structure, whose dimension is reduced from $3 \times T \times J$ to $2 \times T \times J + J$ , where the first part is about direction estimation while the second part corresponds to length estimation. More compact output space facilitates 3D pose estimation model to obtain more rational results by a large margin. (3) We design targeted losses $\mathcal{L}_{3D}^{dir}$ and $\mathcal{L}_{3D}^{len}$ based on above length/direction decomposition, which reduces the learning difficulty by a large margin. + +# 3.3. Pose Refinement as Trajectory Completion + +Based on pose decomposition we estimate the skeleton direction at each time stamp independently, which needs further refinement. In this section, we consider above problem as trajectory completion task, where refinement is applied on unreliable estimated joints. + +Which joints should be refined? Not all joints are estimated equally. As shown in Fig 5, we can observe that the estimation error of four limbs (i.e., joints $0/1/4/5/6/7/10/11$ also as shown in Fig. 4) is significantly higher than others. Therefore, we focus on four-limb regularization. Meanwhile, the confidence score $\tilde{\mathbf{K}}$ (mentioned in Sec. 3.1) produced by 2D detectors is an informative indicator for unreliable estimation of joints location. To this end, we optimize four-limb joints assigned with low 2D confidence score. + +Trajectory Completion with Reliable Estimation. Given estimated 3D joints $\tilde{\mathbf{S}}\in \mathbb{R}^{T\times J\times 3}$ , we first apply a dropout layer [40] directly on the joints associated with four limbs. The dropout rate is $1 - \tilde{\mathbf{K}}$ rather than a constant value, i.e., unreliable joints are excluded from $\tilde{\mathbf{S}}\in \mathbb{R}^{T\times J\times 3}$ which are further completed with reliable ones. The completion model is denoted as $\phi_{3D}^{ctn}$ consisting of a bi-directional LSTM [12] network (shown in Fig. 2). We denote completed output as $\hat{\mathbf{S}}$ , which trained as follows: + +$$ +\mathcal {L} _ {3 D} ^ {c t n} = \left| \left| \hat {\mathbf {S}} - \mathbf {S} \right| \right| _ {2} ^ {2} + \left| \left| \mathcal {H} (\hat {\mathbf {S}}) - \mathcal {H} (\mathbf {S}) \right| \right| _ {2} ^ {2} + \left| \left| \mathcal {F} (\hat {\mathbf {S}}) - \mathcal {F} (\mathbf {S}) \right| \right| _ {2} ^ {2}, \tag {7} +$$ + +where $\mathcal{H}$ and $\mathcal{F}$ refer to first and second order difference over temporal axis respectively. Intuitively, high-order continuity facilitates better modelling of dynamic structure for human subject. + +# 3.4. Implementation Details + +Our model is end-to-end trainable and the overall loss function is $\mathcal{L}_{2D}^{tem} + 0.1\mathcal{L}_{2D}^{proj} + 0.1\mathcal{L}_{2D}^{pel} + \mathcal{L}_{3D}^{dcm} + \mathcal{L}_{3D}^{fin} + 0.1\mathcal{L}_{3D}^{ctn}$ . We adopt PyTorch [29] to implement our proposed framework. During training phase, learning rate, learning decay and weight decay are set to $1e^{-3}$ , $0.93$ , $1e^{-4}$ respectively. Dropout rate is set to 0.25 except the one mentioned + +
Protocol 1: MPJPEDir.Disc.EatGreetPhonePhotoPosePurch.SitSitD.SmokeWaitWalkD.WalkWalkT.Avg
Martinez et al. [25] ICCV'17 (T=1)51.856.258.159.069.578.455.258.174.094.662.359.165.149.552.462.9
Luvizon et al. [24] CVPR'18 (T=1)49.251.647.650.551.860.348.551.761.570.953.748.957.944.448.953.2
Hossain & Little [37] ECCV'18 (T=5)48.450.757.255.263.172.653.051.766.180.959.057.362.446.649.658.3
Lee et al. [18] ECCV'18 (T=3)40.249.247.852.650.175.050.243.055.873.954.155.658.243.343.352.8
Pavillo et al. [33] CVPR'19 (T=1)47.150.649.051.853.661.449.447.459.367.452.449.555.339.542.751.8
Pavillo et al. [33] CVPR'19 (T=9)---------------49.8
Cai et al. [1] ICCV'19 (T=1)46.548.847.650.952.961.348.345.859.264.451.248.453.539.241.250.6
Cai et al. [1] ICCV'19 (T=7)44.647.445.648.850.859.047.243.957.961.949.746.651.337.139.448.8
Ours, 1-frame40.647.145.746.650.763.145.047.756.363.949.446.551.938.142.349.2
Ours, 7-frames38.244.442.843.747.660.342.045.453.260.846.443.548.534.638.646.3
Ours, 9-frames37.443.542.742.746.659.741.345.152.760.245.843.147.733.737.145.6
+ +
Protocol 2: PA-MPJPEDir.Disc.EatGreetPhonePhotoPosePurch.SitSitD.SmokeWaitWalkD.WalkWalkT.Avg
Sun et al. [41] ICCV'17 (T=1)42.144.345.045.451.553.043.241.359.373.351.044.048.038.344.848.3
Fang et al. [9] AAAI'18 (T=1)38.241.743.744.948.555.340.238.254.564.447.244.347.336.741.745.7
Pavlakos et al. [30] CVPR'18 (T=1)34.739.841.838.642.547.538.036.650.756.842.639.643.932.136.541.8
Hossain & Little [37] ECCV'18 (T=5)35.739.344.643.047.254.038.337.551.661.346.541.447.334.239.444.1
Pavllo et al. [33] CVPR'19 (T=1)36.038.738.041.740.145.937.135.446.853.441.436.943.130.334.840.0
Cai et al. [1] ICCV'19 (T=1)36.838.738.241.740.746.837.935.647.651.741.336.842.731.034.740.2
Cai et al. [1] ICCV'19 (T=7)35.737.836.940.739.645.237.434.546.950.140.536.141.029.633.239.0
Ours, 1-frame33.637.437.037.639.246.434.335.445.152.140.135.542.129.835.338.9
Ours, 7-frames31.735.335.035.336.944.232.033.842.549.337.633.439.627.632.536.7
Ours, 9-frames31.034.834.734.436.243.931.633.542.349.037.133.039.126.931.936.2
+ +Table 2: Quantitative comparisons of Mean Per Joint Position Error (MPJPE) in millimeter between the estimated pose and the ground-truth on Human3.6M under P1 and P2, where T denotes the number of input frames used in each method. Lower is better and best is bold highlighted. + +
Protocol 2 +PA-MPJPEWalkJogBox
S1S2S3S1S2S3S1S2S3
Pavlakos et al. [31]22.319.529.728.921.923.8---
Pavlakos et al. [30]18.812.729.223.515.414.5---
Lee et al. [18]18.619.930.525.716.817.742.848.153.4
Pavillo et al. [33]13.910.246.620.913.113.823.833.732.0
Ours,9-frames13.210.229.912.612.313.013.218.120.4
+ +in Sec. 3.3. We adopt the same strategy for BN momentum decay as in [33]. Adam Optimizer [17] is used for all modules. The whole model is trained with 200 epochs. + +# 4. Experiments + +# 4.1. Datasets & Evaluation Metrics + +Human3.6M Datasets [15]. In our work, we follow the experimental setup in previous researches [10, 45, 33]. More specifically, we use Subject $1 / 5 / 6 / 7 / 8$ for training and Subject $9 / 11$ for testing. Without access to action labels and camera parameters, all video sequences are used for training one single model. + +Table 3: Prediction accuracy on HumanEva Dataset [39] in terms of Protocol # 2 evaluation. Note that we train one model with all three actions (i.e., Walk, Jog and Box) models. Lower is better and best is bold highlighted. + +
MPJPE(P1)PA-MPJPE(P2)
Baseline51.840.0
2D Refine49.939.4
2D Refine + 3D Decompose47.137.5
2D Refine + 3D Decompose + 3D Completion45.636.2
+ +Table 4: Ablation study on the contribution of proposed three modules in terms of both P1 and P2. Note that Baseline refers to single-frame results of Pavllo et al. [33]. + +HumanEva-I Datasets [39]. Compared to Human3.6M dataset [15], HumanEva-I [39] is more light-weight containing three erect actions: Walk, Jog, Box. We follow the same data preprocessing strategy used in [33] for train/test split. We report the estimation accuracy with $T = 9$ . + +Evaluation Metrics. Following the majority of previous works [24, 37, 18, 1, 33] we evaluate our model in terms of mean per joint position error (MPJPE, P1 for short) commonly denoted as protocol #1. Several researches [41, 9, 30, 37, 33, 1] estimate 3D pose after alignment involving rotation and translation (PA-MPJPE, P2 for short), which is termed as protocol #2. Both protocols are utilized in our work. + +![](images/602063dc91ed9fe4422a960ba6763a94c1f3e7cca3c8c96cfc66418d8fea6910.jpg) +1 + +![](images/732779bc107265fd21ce0d8d6855246272b09d262df4e861c2d14a6b066661d0.jpg) +Seep 2 + +![](images/8a19b98bfa27124a3257e768dc2a97df9b82a0756ec2f0ae06e62199150768a7.jpg) +s +Figure 6: Visualization of predicted 3D poses on monocular video clip. Each row corresponds to one action sequence. + +# 4.2. Quantitative Evaluation + +Results on Human3.6M Dataset [15]. As shown in Tab. 2, we report pose estimation results in terms of Protocol #1 and #2. Note that previous works evaluate this task with different temporal length. For fairness we compare with them under the same inputs. When $T = 1$ trajectory completion model $\phi_{3D}^{ctn}$ is nonfunctional. Benefited from 2D correction and 3D decomposition, our model outperforms prior art (Cai et al. [1]) under both P1 and P2 evaluation when $T = 1$ . Boosted by explicit kinematics analysis, the estimation accuracy outperforms Pavllo et al. [33] by $8.4\% (4.2\mathrm{mm})$ when $T = 9$ . A notable performance improvement over Cai et al. [1] is also presented for $T = 7$ , i.e., $46.3\mathrm{mm}$ vs. $48.8\mathrm{mm}$ . Regarding evaluation with action classes, our final model $(T = 9)$ achieves best performance on the majority of them. Especially on several relatively harder actions, e.g., sitting and sitting down with severe occlusion, our model is robust enough to obtain better results compared to Pavllo et al. [33] which merely considers temporal smoothness rather than estimation reliability. This is further validated in our own model. From $T = 1$ to $T = 9$ , estimation accuracy is enhanced constantly under both P1 and P2 evaluation, which is mainly facilitated by decomposed 3D pose estimation and 3D trajectory completion. + +Results on HumanEva Dataset [39]. As shown in Tab. 3, we report pose estimation results in terms of Protocol #2. Compared to Human3.6M Dataset [15], HumanEva Dataset [39] is relatively easier to learn, where estimation accuracy is near saturated. Still, performance gain is observed for all three actions over Pavllo et al. [33]. By explicitly incorporating kinematics analysis into deep models, reasonable spatial-temporal structure is well preserved and output space is more compact, which finally lead to higher estimation accuracy. + +# 4.3. Qualitative Evaluation + +We further present direct visualization results of monocular 3D pose estimation. As illustrated in Fig. 6, three sequences with diverse actions are presented. Meanwhile, for each time stamp we demonstrate both refined 2D pose and + +
1-Frame3-Frames5-Frames7-Frames9-Frames
Pavllo et al. [33]51.80---49.80
Cai et al. [1]50.6249.0848.8648.78-
Ours49.2147.8746.8346.2645.61
+ +Table 5: Prediction accuracy with different input length and in terms of MPJPE. We compare our model with Pavllo et al. [33] and Cai et al. [1]. + +corresponding 3D prediction. Our model makes it to produce visually natural estimation which is mainly benefited from explicit kinematics constraint. For example, sitting down sequence (second row in Fig. 6) is well estimated for both 2D and 3D joints, where the structure of four limbs is properly handled by our model (requiring awareness of human topology). More visual results are provided in supplementary material for reference. + +# 4.4. Ablation Study + +Analysis on all modules. Recall that our model consists of three modules: $\phi_{2D}$ , $\phi_{3D}^{dcm}$ and $\phi_{3D}^{ctn}$ . To validate the contribution of each module, we present corresponding ablation study on Human3.6M Dataset [15]. As shown in Tab. 4, both accuracy on P1 and P2 are reported. Baseline refers to single frame estimation model of Pavllo et al. [33]. We can notice that each module offers positive contribution under evaluation of P1 and P2. Notably, the most significant improvement comes from 3D decomposition module $\phi_{3D}^{dcm}$ , which benefits from $\phi_{2D}$ with more reasonable 2D/3D correspondence and further leads to more compact output space. + +Analysis on temporal length. As shown in Tab. 5, we report the estimation accuracy w.r.t. different input lengths. We can notice that with the increase of temporal horizon, our model constantly performs better than those with shorter inputs. For the identical input length, our model also produces more accurate results than prior arts, i.e., Pavllo et al. [33] and Cai et al. [1]. + +Analysis on projection based 2D correction. One remaining but critical problem is: how does projection based + +![](images/4ff1aaea29aacb1ae80225e3c2ebbf109ef71c9648fad06c1d68ab0e9847180a.jpg) + +![](images/e29984eb9e25f8aa2b32c651494ab4efdc19c0e3c9b5b07798d54a2296c63bdf.jpg) + +![](images/7540fe54d0efd097e77d807a1478af7bebf40e7fe8d82931ad041f513eae15ef.jpg) + +![](images/71f0dd296d7c6a7b92a629411c7628a0c5eb2b9f78d0a11feb5b360d62799af0.jpg) + +![](images/c54d62de8e8284c1db84262efb823520dd500f1e7f4fbb9150bfd63cb7a61bab.jpg) +Figure 7: Analysis on projection based 2D correction. A/C correspond to $f_{x}, c_{x}$ estimation without/with constraint of perspective projection. B/D correspond to two typical examples of projection correspondence between 2D and 3D joints without/with constraint of perspective projection. +Figure 8: Analysis on decomposed 3D estimation. The length (upper part) and direction (lower part) estimation of left shank (skeleton between joint 4 and joint 5) are presented. + +2D correction facilitate 3D pose estimation? As shown in Fig 7(A and C), we plot estimated/ground thruth focal length $f_{x}$ and point $c_{x}$ on test set for evaluation. Fig 7A corresponds to training without $\mathcal{L}_{2D}^{proj}$ while Fig 7C shows results trained with it. Orange dot corresponds to ground truth and blue cross are estimated results. Boosted by $\mathcal{L}_{2D}^{proj}$ , the estimated projection structure in camera view is more accurate. Moreover, we present two typical examples of correspondence between 2D and 3D joints in Fig. 7 (B and D). Following Eqn. 2, X-axis represents $\mathbf{x} / \mathbf{z}$ while Y-axis is a. Notation is used the same as Fig. 7 (A and C). All joints be + +
1-Frame3-Frames5-Frames7-Frames9-Frames
Full model w/o φctn7.805.114.033.573.29
φ3D7.803.702.452.132.01
Full model
+ +Table 6: Prediction accuracy (Human3.6M Dataset [15]) with different input length in terms of MPJVE [33]. The first row corresponds to training without trajectory model $\phi_{3D}^{ctn}$ , while the second row refers to full model. Note that $\phi_{3D}^{ctn}$ is nonfunctional when $T = 1$ , whose estimation accuracy is identical to the first row. + +long to one single frame. Orange dots referring ground truth lie in a straight line. Similarly, Fig. 7D depicts test results trained with $\mathcal{L}_{2D}^{proj}$ while Fig. 7B not. It clearly shows that 2D correction based on projection correspondence is more reasonable and accurate. + +Analysis on decomposed 3D estimation. To analyze the contribution of $\phi_{3D}^{dcn}$ , we present both length and direction results shown in Fig. 8. Red line corresponds to ground truth, blue line is single-frame estimation, green line refers to the results of Pavllo et al. [33] and orange line is ours. For length estimation, our model is robust to the variation of 2D poses. One the contrary, both single-frame estimation and the model of Pavllo et al. [33] fails to produce valid length estimation which should keep constant throughout the whole video clip. Based on accurate length estimation, our model is capable of finding joint angle within more compact space. As shown in Fig. 8B where the direction is calculated as angle between left shank and Y-axis, our model performs better than all other baselines by a large margin, i.e., estimated direction is closer to ground truth (red line) with smaller variation. + +Analysis on 3D trajectory completion. Following Pavllo et al. [33], we evaluate trajectory estimation accuracy in terms of MPJVE, i.e., velocity error, to further validate the contribution of $\phi_{3D}^{ctn}$ . As shown in Tab. 6, facilitated by $\phi_{3D}^{ctn}$ our model achieves lower velocity error with all experimented temporal lengths (from $T = 3$ to $T = 9$ ). + +# 5. Conclusion + +In this paper, we propose a deep kinematics analysis framework for monocular 3D pose estimation. By explicitly incorporating kinematics regularization into deep models, we achieves more reliable estimation with noisy 2D joints as inputs. Extensive experiments show that our model achieves state-of-the-art performance on two widely used 3D human action datasets. + +Acknowledgment This work was supported by National Science Foundation of China (61976137, 61527804, U1611461, U19B2035), STCSM(18DZ1112300). This work was also supported by National Key Research and Development Program of China (2016YFB1001003). The authors would like to give a personal thanks to the Student Innovation Center of SJTU for providing GPUs. + +# References + +[1] Yujun Cai, Liuhao Ge, Jun Liu, Jianfei Cai, Tat-Jen Cham, Junsong Yuan, and Nadia Magnenat Thalmann. Exploiting spatial-temporal relationships for 3d pose estimation via graph convolutional networks. In ICCV, October 2019. +[2] Zhe Cao, Tomas Simon, Shih-En Wei, and Yaser Sheikh. Realtime multi-person 2d pose estimation using part affinity fields. In CVPR, pages 1302-1310, 2017. +[3] João Carreira and Andrew Zisserman. Quo vadis, action recognition? A new model and the kinetics dataset. In CVPR, pages 4724-4733, 2017. +[4] Ching-Hang Chen and Deva Ramanan. 3d human pose estimation= 2d pose estimation+ matching. In CVPR, pages 7035-7043, 2017. +[5] Yilun Chen, Zhicheng Wang, Yuxiang Peng, Zhiqiang Zhang, Gang Yu, and Jian Sun. Cascaded pyramid network for multi-person pose estimation. In CVPR, pages 7103-7112, 2018. +[6] Yu Cheng, Bo Yang, Bo Wang, Wending Yan, and Robby T. Tan. Occlusion-aware networks for 3d human pose estimation in video. In ICCV, October 2019. +[7] Hai Ci, Chunyu Wang, Xiaoxuan Ma, and Yizhou Wang. Optimizing Network Structure for 3D Human Pose Estimation. In ICCV, October 2019. +[8] Huseyin Coskun, Felix Achilles, Robert DiPietro, Nassir Navab, and Federico Tombari. Long short-term memory kalman filters: Recurrent neural estimators for pose regularization. In ICCV, pages 5524-5532, 2017. +[9] Hao-Shu Fang, Yuanlu Xu, Wenguan Wang, Xiaobai Liu, and Song-Chun Zhu. Learning pose grammar to encode human body configuration for 3d pose estimation. In AAAI, 2018. +[10] Ikhsanul Habibie, Weipeng Xu, Dushyant Mehta, Gerard Pons-Moll, and Christian Theobalt. In the wild human pose estimation using explicit 2d features and intermediate 3d representations. In CVPR, pages 10905-10914, 2019. +[11] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross B. Girshick. Mask R-CNN. In YCCV, pages 2980-2988, 2017. +[12] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. NC, 9(8):1735-1780, 1997. +[13] Zhongyue Huang, Jingwei Xu, and Bingbing Ni. Human motion generation via cross-space constrained sampling. In IJCAI, pages 757-763, 2018. +[14] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, pages 448-456, 2015. +[15] Catalin Ionescu, Dragos Papava, Vlad Olaru, and Cristian Sminchisescu. Human3.6m: Large scale datasets and predictive methods for 3d human sensing in natural environments. TPAMI, 36(7):1325-1339, 2014. +[16] Angjoo Kanazawa, Michael J. Black, David W. Jacobs, and Jitendra Malik. End-to-end recovery of human shape and pose. In CVPR, pages 7122-7131, 2018. +[17] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. + +[18] Kyoungoh Lee, Inwooong Lee, and Sanghoon Lee. Propagating lstm: 3d pose estimation based on joint interdependency. In ECCV, pages 119-135, 2018. +[19] Sijin Li and Antoni B Chan. 3d human pose estimation from monocular images with deep convolutional neural network. In ACCV, pages 332-347, 2014. +[20] Jiahao Lin and Gim Hee Lee. Trajectory space factorization for deep video-based 3d human pose estimation. arXiv preprint arXiv:1908.08289, 2019. +[21] Mude Lin, Liang Lin, Xiaodan Liang, Keze Wang, and Hui Cheng. Recurrent 3d pose sequence machines. In CVPR, pages 810-819, 2017. +[22] Jinxian Liu, Bingbing Ni, Caiyuan Li, Jiancheng Yang, and Qi Tian. Dynamic points agglomeration for hierarchical point sets learning. In Proceedings of the IEEE International Conference on Computer Vision, pages 7546-7555, 2019. +[23] Jun Liu, Gang Wang, Ping Hu, Ling-Yu Duan, and Alex C. Kot. Global context-aware attention LSTM networks for 3d action recognition. In CVPR, pages 3671-3680, 2017. +[24] Diogo C Luvizon, David Picard, and Hedi Tabia. 2d/3d pose estimation and action recognition using multitask deep learning. In CVPR, pages 5137-5146, 2018. +[25] Julieta Martinez, Rayat Hossain, Javier Romero, and James J Little. A simple yet effective baseline for 3d human pose estimation. In ICCV, pages 2640-2649, 2017. +[26] Dushyant Mehta, Helge Rhodin, Dan Casas, Pascal Fua, Oleksandr Sotnychenko, Weipeng Xu, and Christian Theobalt. Monocular 3d human pose estimation in the wild using improved cnn supervision. In 3DV, pages 506-516, 2017. +[27] Dushyant Mehta, Srinath Sridhar, Oleksandr Sotnychenko, Helge Rhodin, Mohammad Shafiei, Hans-Peter Seidel, Weipeng Xu, Dan Casas, and Christian Theobalt. Vnect: Real-time 3d human pose estimation with a single rgb camera. TOG, 36(4):44, 2017. +[28] Francesc Moreno-Noguer. 3d human pose estimation from a single image via distance matrix regression. In CVPR, pages 2823-2832, 2017. +[29] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in PyTorch. In NIPS, 2017. +[30] Georgios Pavlakos, Xiaowei Zhou, and Kostas Daniilidis. Ordinal depth supervision for 3d human pose estimation. In CVPR, pages 7307-7316, 2018. +[31] Georgios Pavlakos, Xiaowei Zhou, Konstantinos G Derpanis, and Kostas Daniilidis. Coarse-to-fine volumetric prediction for single-image 3d human pose. In CVPR, pages 7025-7034, 2017. +[32] Georgios Pavlakos, Luyang Zhu, Xiaowei Zhou, and Kostas Daniilidis. Learning to estimate 3d human pose and shape from a single color image. In CVPR, pages 459-468, 2018. +[33] Dario Pavllo, Christoph Feichtenhofer, David Grangier, and Michael Auli. 3D human pose estimation in video with temporal convolutions and semi-supervised training. In CVPR, pages 7753-7762, 2019. + +[34] Xue Bin Peng, Pieter Abbeel, Sergey Levine, and Michiel van de Panne. Deepmimic: example-guided deep reinforcement learning of physics-based character skills. ACM Trans. Graph., 37(4):143:1-143:14, 2018. +[35] Tomas Pfister, James Charles, and Andrew Zisserman. Flowing convnets for human pose estimation in videos. In ICCV, pages 1913-1921, 2015. +[36] Huy Hieu Pham, Houssam Salmane, Louahdi Khoudour, Alain Crouzil, Pablo Zegers, and Sergio A Velastin. A unified deep framework for joint 3d pose estimation and action recognition from a single rgb camera. arXiv preprint arXiv:1907.06968, 2019. +[37] Mir Rayat Imtiaz Hossain and James J Little. Exploiting temporal information for 3d human pose estimation. In ECCV, pages 68-84, 2018. +[38] Saurabh Sharma, Pavan Teja Varigonda, Prashast Bindal, Abhishek Sharma, and Arjun Jain. Monocular 3d human pose estimation by generation and ordinal ranking. In ICCV, October 2019. +[39] Leonid Sigal, Alexandru O. Balan, and Michael J. Black. Humaneva: Synchronized video and motion capture dataset and baseline algorithm for evaluation of articulated human motion. IJCV, 87(1-2):4-27, 2010. +[40] Nitish Srivastava, Geoffrey E. Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. JMLR, 15(1):1929-1958, 2014. +[41] Xiao Sun, Jiaxiang Shang, Shuang Liang, and Yichen Wei. Compositional human pose regression. In ICCV, pages 2602-2611, 2017. +[42] Bugra Tekin, Isinsu Katircioglu, Mathieu Salzmann, Vincent Lepetit, and Pascal Fua. Structured prediction of 3d human pose with deep neural networks. In BMVC, 2016. +[43] Bugra Tekin, Pablo Márquez-Neila, Mathieu Salzmann, and Pascal Fua. Learning to fuse 2d and 3d image cues for monocular body pose estimation. In ICCV, pages 3941–3950, 2017. +[44] Bugra Tekin, Artem Rozantsev, Vincent Lepetit, and Pascal Fua. Direct prediction of 3d body poses from motion compensated sequences. In CVPR, pages 991-1000, 2016. +[45] Bastian Wandt and Bodo Rosenhahn. Repnet: Weakly supervised training of an adversarial reprojection network for 3d human pose estimation. In CVPR, pages 7782-7791, 2019. +[46] Jue Wang, Shaoli Huang, Xinchao Wang, and Dacheng Tao. Not all parts are created equal: 3d pose estimation by modeling bi-directional dependencies of body parts. In ICCV, October 2019. +[47] Yichao Yan, Bingbing Ni, Wendong Zhang, Jingwei Xu, and Xiaokang Yang. Structure-constrained motion sequence generation. IEEE Trans. Multimedia, 21(7). +[48] Yichao Yan, Jingwei Xu, Bingbing Ni, Wendong Zhang, and Xiaokang Yang. Skeleton-aided articulated motion generation. In ACM MM, pages 199–207, 2017. +[49] Y. Yan, N. Zhuang, b. ni, J. Zhang, M. Xu, Q. Zhang, Z. ZHENG, S. Cheng, Q. Tian, y. xu, X. Yang, and W. Zhang. Fine-grained video captioning via graph-based multi-granularity interaction learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 1-1, 2019. + +[50] Jiancheng Yang, Qiang Zhang, Bingbing Ni, Linguo Li, Jinxian Liu, Mengdie Zhou, and Qi Tian. Modeling point clouds with self-attention and gumbel subset sampling. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3323–3332, 2019. +[51] Wei Yang, Shuang Li, Wanli Ouyang, Hongsheng Li, and Xiaogang Wang. Learning feature pyramids for human pose estimation. In ICCV, pages 1290-1299, 2017. +[52] Hashim Yasin, Umar Iqbal, Bjorn Kruger, Andreas Weber, and Juergen Gall. A dual-source approach for 3d pose estimation from a single image. In CVPR, pages 4948-4956, 2016. +[53] Long Zhao, Xi Peng, Yu Tian, Mubbasir Kapadia, and Dimitris N Metaxas. Semantic graph convolutional networks for 3d human pose regression. In CVPR, pages 3425-3435, 2019. +[54] Kun Zhou, Xiaoguang Han, Nianjuan Jiang, Kui Jia, and Jiangbo Lu. Hemlets pose: Learning part-centric heatmap triplets for accurate 3d human pose estimation. In ICCV, October 2019. +[55] Xiaowei Zhou, Menglong Zhu, Spyridon Leonardos, Konstantinos G Derpanis, and Kostas Daniilidis. Sparseness meets deepness: 3d human pose estimation from monocular video. In CVPR, pages 4966-4975, 2016. \ No newline at end of file diff --git a/deepkinematicsanalysisformonocular3dhumanposeestimation/images.zip b/deepkinematicsanalysisformonocular3dhumanposeestimation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..048fceace202d416db6892cdbbd3d7dd39dd4e67 --- /dev/null +++ b/deepkinematicsanalysisformonocular3dhumanposeestimation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df398c5d1c00bbbab364237195431054969ed502cd5164500ce8425940d5c821 +size 807679 diff --git a/deepkinematicsanalysisformonocular3dhumanposeestimation/layout.json b/deepkinematicsanalysisformonocular3dhumanposeestimation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..727f370fd3af920e7160d86af849f4a4aba98449 --- /dev/null +++ b/deepkinematicsanalysisformonocular3dhumanposeestimation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28d5abb3a8d737a864fb32e94cec0e624d857bc8b8ce567d8a8ddab8bd2afe2e +size 466077 diff --git a/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/ca874427-a446-4efb-88ae-7ff6edd1aa70_content_list.json b/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/ca874427-a446-4efb-88ae-7ff6edd1aa70_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..93e46d9f0647e5ffdb0aeb04d7374280e9822457 --- /dev/null +++ b/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/ca874427-a446-4efb-88ae-7ff6edd1aa70_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6a4f5785872b1fc973e089a224c5dc8bf3e09a54a995da4844cd8b53d214874 +size 103141 diff --git a/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/ca874427-a446-4efb-88ae-7ff6edd1aa70_model.json b/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/ca874427-a446-4efb-88ae-7ff6edd1aa70_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7e2689415ada7232009c947bb88d182c9a7df16f --- /dev/null +++ b/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/ca874427-a446-4efb-88ae-7ff6edd1aa70_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c815bcfcfdf87cce40ceae865d14afea27a14edc2cd222c040748501fed301de +size 130920 diff --git a/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/ca874427-a446-4efb-88ae-7ff6edd1aa70_origin.pdf b/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/ca874427-a446-4efb-88ae-7ff6edd1aa70_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e509abee17a5386bd34dddd1fe59746e685e20a1 --- /dev/null +++ b/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/ca874427-a446-4efb-88ae-7ff6edd1aa70_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6bce8ef0d1969f9520ec0be33af5aba48aec43b9517d3bf0b658f82a6769f2e +size 1504588 diff --git a/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/full.md b/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/full.md new file mode 100644 index 0000000000000000000000000000000000000000..3458655f4791363ea345912d804ea53352daf70d --- /dev/null +++ b/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/full.md @@ -0,0 +1,557 @@ +# Deep Learning for Handling Kernel/model Uncertainty in Image Deconvolution + +Yuesong Nan and Hui Ji +Department of Mathematics, National University of Singapore, 119076, Singapore +nanyuesong@u.nus.edu and matjh@nus.edu.sg + +# Abstract + +Most existing non-blind image deconvolution methods assume that the given blurring kernel is error-free. In practice, blurring kernel often is estimated via some blind deblurring algorithm which is not exactly the truth. Also, the convolution model is only an approximation to practical blurring effect. It is known that non-blind deconvolution is susceptible to such a kernel/model error. Based on an error-in-variable (EIV) model of image blurring that takes kernel error into consideration, this paper presents a deep learning method for deconvolution, which uncrolls a total-least-squares (TLS) estimator whose relating priors are learned by neural networks (NNs). The experiments showed that the proposed method is robust to kernel/model error. It noticeably outperformed existing solutions when deblurring images using noisy kernels, e.g. the ones estimated from existing blind motion deblurring methods. + +# 1. Introduction + +Image blurring is one prime loss of image quality in practice, which often is modeled by a convolution process: + +$$ +\boldsymbol {y} = \boldsymbol {k} \otimes \boldsymbol {x} + \boldsymbol {n}, \tag {1} +$$ + +where $\pmb{y}$ denotes the blurred image, $\pmb{x}$ denotes the latent image, $\pmb{k}$ represents the kernel and $\pmb{n}$ represents noise. The operator $\mathbf{\Gamma}'\otimes \mathbf{\Gamma}'$ stands for the discrete convolution. Image deconvolution is about recovering $\pmb{x}$ from $\pmb{y}$ by solving (1). Depending on the availability of $\pmb{k}$ , image deconvolution can be classified into (1) blind image deblurring which needs to estimate both $\pmb{k}$ and $\pmb{x}$ , and (2) non-blind image deconvolution which takes $\pmb{k}$ as input and only estimates $\pmb{x}$ . For example, removing motion blur from images is a typical blind image deblurring problem whose blur kernel needs to be estimated for individual image. + +In the past, many methods have been proposed for tackling blind motion deblurring; see e.g. [12, 3, 23, 7, 45, 20, 40, 47, 31, 30, ?]. Most of them take an iterative scheme to alternatively estimate the kernel $\pmb{k}$ and the latent image $\pmb{x}$ . Although non-blind image deconvolution is called inside + +![](images/28c8f4f0af30a78081bc82b171e1c372e969a4d46bdefcb89c6196644c87c37d.jpg) +(a) Blurry input + +![](images/a9baf943ea1c81c88465e52c31f8c501d84117fcc672eb67b21f4daf495d9212.jpg) +(b) Latent clear image + +![](images/a7267b28b0453d7370abecb343162fd145fbbf3b3ee917167a8a5107874de1ac.jpg) +(c) Result from truth kernel + +![](images/33692257c46d9700aced34fc824a4d1907d4801a4bb88440c3814e4bf95bc10d.jpg) +(d) Result from estimated kernel +Figure 1: Sensitivity of image deconvolution to kernel error. (a)-(b): Noisy blurred input $(\sigma = 1\%)$ and the truth sharp image; (c)-(d): The results when using the non-blind deconvolution method Krishnan and Fergus [19] to deblur the input shown in (a) using truth kernel and the kernel estimated by Cho and Lee [7]. + +the iteration, the iteration focuses on the estimation of the kernel $\pmb{k}$ . For such a purpose, it is actually a good practice to only recover partial salient structures in those intermediate estimates of image $\pmb{x}$ ; e.g. [7, 45, 47, 30]. At last, once the kernel is determined, an non-blind deconvolution method is called to recover the image $\pmb{x}$ with all details. + +# 1.1. Deconvolution is sensitive to kernel/model error + +Blind motion deblurring remains a challenge problem, and motion-blur kernel estimated by existing methods is hardly error-free. Furthermore, convolution-based model of motion-blurring holds true only if scene depths are roughly constant and camera movement is the translation on image plane. Same as image noise, without specific treatment, the kernel/model error will cause severe artifacts in the result. + +Re-writing (1) in the form of matrix-vector, we have + +$$ +y = K x + n. +$$ + +where $y, x, n$ denotes $\mathbf{y}, \mathbf{x}, \mathbf{n}$ in the form of column-wise vector, and $K$ denotes the toepliz matrix representing convolution. Suppose that $\widehat{\pmb{k}}$ is an inexact estimate of the truth kernel from some existing method with $\widehat{\pmb{k}} = \pmb{k} + \pmb{\Delta}_{\pmb{k}}$ . Then, + +$$ +y = K x + n = \left(\widehat {K} - \Delta_ {K}\right) x + n. \tag {2} +$$ + +Note that $\Delta_K$ can be viewed either as the convolution matrix w.r.t. kernel error $\Delta_k$ , or viewed as model error when motion blur is not exactly an uniform convolution. A direct inversion then leads to + +$$ +\widehat {x} = \left(\widehat {K}\right) ^ {- 1} y = \left(K - \Delta_ {K}\right) ^ {- 1} (K x + n) +$$ + +By Taylor expansion, we have then + +$$ +\begin{array}{l} \hat {x} = \left(K - \Delta_ {K}\right) ^ {- 1} (K x + n) \\ = (I + K ^ {- 1} \Delta_ {K}) (x + K ^ {- 1} n) + O (\| \Delta_ {K} \| _ {F} ^ {2}) \\ = x + \underbrace {K ^ {- 1} \left(\Delta_ {K} x\right)} _ {\text {K e r n e l e r r o r}} + \underbrace {(I + K ^ {- 1} \Delta_ {K}) \left(K ^ {- 1} n\right)} _ {\text {m e a s u r e m e n t n o i s e}} + O \left(\left\| \Delta_ {K} \right\| _ {F} ^ {2}\right) \tag {3} \\ \end{array} +$$ + +As $K$ is an ill-conditioned matrix, same as image noise, the term caused by the kernel error $\Delta_K$ will also be significantly magnified. + +Most non-blind deblurring methods impose additional regularization on image to suppressing noise amplification. These regularizations do not effectively suppress the artifacts caused by kernel/model error, i.e. $K^{-1}\Delta_Kx$ . See Fig 1 for an illustration of deblurring an image using the $\ell_1$ -norm relating regularization method [19], where the kernel is estimated by the blind deblurring method [7]. It can be seen that there are strong ringing artifacts in the results. In other words, there is such a need to study non-blind deconvolution method that is robust to kernel/model error, which can see its practical usage in blind image deblurring. + +# 1.2. Main idea + +This paper aims at developing a powerful image deconvolution method that is robust to likely kernel/model errors. Such robustness is important when solving many image restoration problems in practice, especially blind motion deblurring. Image blurring model considered in this paper is as follows, + +$$ +y = (\widehat {K} - \Delta_ {K}) x + n = \widehat {K} x - \Delta_ {K} x + n, \tag {4} +$$ + +where $y$ is an input blurred image, $x$ is the latent clear image to be recovered, $\widehat{K}$ is the matrix form of the 2D convolution operator w.r.t. the estimated blur kernel $\widehat{\pmb{k}}$ . There are two noise sources: + +1. Measurement noise $n$ , which is assumed to be additive Gaussian white noise as most do; +2. Model error $\Delta_K$ , introduced by either kernel error from blind deblurring algorithm or by modeling error when blurring is not exactly uniform. + +The problem (4) is the so-called Error-in-Variable (EIV) model [5] in statistical regression. In the case that the matrix $K$ is well-posed, the total least squares (TLS) estimator [14] estimates the solution to (4) by solving a constrained optimization problem: + +$$ +\min _ {\Delta_ {K}, n, x} \| \Delta_ {K} \| _ {F} ^ {2} + \| n \| _ {2} ^ {2}, \quad \text {s . t .} \quad (\widehat {K} x - \Delta_ {K} x = y - n). +$$ + +In the case of image deconvolution, as the matrix $K$ is ill-conditioned, certain prior needs to be imposed on $x$ to suppress + +noise amplification in the standard TLS estimator. Consider a variable $u$ that represents the error term $\Delta_K x$ . Then, we propose to formulate the problem (4) as an optimization problem: + +$$ +\min _ {x, u} \| y - K x - u \| _ {2} ^ {2} + \phi (x) + \psi (u | x), \tag {5} +$$ + +where + +$$ +\psi (u | x) = \min _ {\Delta_ {k} \in \Omega} \| \Delta_ {k} \| _ {F} ^ {2} + \lambda \| u - \Delta_ {K} x \| _ {2} ^ {2}. +$$ + +The feasible set $\Omega$ for $\Delta_{k}$ denote structure prior for the matrix $\Delta_K$ . For instance, the set of doubly Toeplitz matrices w.r.t. kernel error. It can be seen that there are two regularization terms in (5). The term $\phi (\cdot)$ denotes the regularization term defined by the image prior imposed on $x$ . Another term $\psi (\cdot |x)$ denotes the regularization term on $u$ that is related to $x$ . + +In the presence of kernel/model error, how close the solution of (5) to the truth $x$ largely depends on the design of two regularization terms $\phi$ and $\psi$ . The first is based on the image prior of natural images, and the second is based on the prediction of the correction term $u$ . Recent development on deep-NN-based image restoration methods showed the effectiveness of deep NN as the tool to learn complex prior on image data, see e.g. [39, 46, 34, 48, 21, 27, 17, 2]. Thus, by learning $\phi, \psi$ , this paper proposed a deep learning method for non-blind deconvolution with specific treatment on kernel/model error. + +In brief, the proposed method unrolls an iterative optimization algorithm for solving (5), and replaces the processes relating to two regularization terms $\phi, \psi$ by learnable NN-based mappings. At each stage of the proposed method, there are two NNs involved. One is a deep convolutional neural network (CNN) for removing undesirable artifacts caused by measurement noise and model error. The other is a deep U-Net for predicting correction term $\pmb{u}$ . Such a deep learning method not only effectively addresses measurement noise, but also handles kernel/noise error well, when recovering a noisy blurred image using some estimated blur kernel. + +# 1.3. Main contribution + +In practical blind image deblurring, especially blind motion deblurring, kernel/model error is the main factor account for poor recovery quality. Despite its practical importance, the robustness to kernel/model error did not receive sufficient attention in the development of non-blind deblurring method, see the short list in existing literature [16, 43, 32, 33]. + +This paper presented a deep learning based approach for image deconvolution with the focus on handling kernel/model error. See the below for the summary of the main contributions of the paper. + +- The paper analyzed the impact of kernel/model error to image deconvolution in the context of EIV model, and proposed a TLS-based optimization model for addressing model error +- Built on an iterative scheme for solving the model, a deep learning method is presented that unrolls the scheme with deep-NN-based priors on both images and correction terms +- Training samples play an important role in the generalization capacity of deep-NN-based methods. This paper presents a new method for synthesizing motion-blur kernels which provides high-quality training samples. + +Extensive experiments are conducted in this paper, which shows that the proposed method can effectively handle model/kernel errors when being used for deblurring images using the kernel from existing blind deblurring methods. The proposed NN can be trained using the training samples synthesized by the proposed procedure to outperform existing related methods by a noticeable margin. In summary, the proposed image deconvolution method provides a better solution than existing ones on handling kernel/model error. The work certainly can see its value to many image restoration tasks, including blind image deblurring. + +# 2. Related Work + +Owing to space limitation, we give a detailed discussion on the methods focusing on handling kernel/model error, while having a very brief review on the methods focusing on noise robustness. + +# 2.1. Image deblurring focusing on noise robustness + +The robustness to noise in deblurring comes from the regularization on latent image, derived from certain image prior assumed by the method. Earlier linear methods, e.g. Wiener filtering and Tikhonov regularization, assume smoothness prior on latent image. Non-linear methods assume that image gradients follow certain heavy-tailed distributions. For example, the $\ell_1$ -norm relating regularization, including total-variation (TV) method [29]) and wavelet methods [3, ?], assumes sparsity prior of image in gradient/wavelet domain. The $\ell_p$ -norm based method [19] assumes hyper-Laplacian prior on image gradients. Non-local methods, e.g. [9, 11, ?], assume recurrence prior of image patches. + +In recent years, learning-based methods emerges as a promising approach which learns image prior from data. See e.g. [35, 51, 38, 39, 46, 34, 21, 27, 50, 48, 17, 2]. Roth and Black [35], Zoran and Weiss [51], and Schmidt and Roth [38] proposed to learn the parameters of some statistical model on images or image patches for characterizing images. For deep learning based non-blind deblurring methods, one approach is directly applied NN to map blurred image to latent image, including Schuler et al. [39], Xu et al. [46], and Ren et al. [34]. A more prevalent class of NN-based methods is based the so-called optimization unrolling, which follows the iterative scheme by solving some regularization methods and uses NN to replace certain modules, e.g. Kruse et al. [21], Meinhardt et al. [27], and Zhang et al. [48]. The NNs listed above are trained with known noise level. the deblurring networks proposed in Jin et al. [17] and Bigdeli et al. [2] are adaptive to different noise levels. + +While most methods assume Gaussian white noise, there are also studies on the methods that are robust to non-Gaussian noise. Carlavan and Laure [4] proposed a deblurring method in the presence of Poisson measurement noise. Dong et al. [10] proposed to learn fidelity term to address complex real noise. When there are saturated regions in blurred images, these saturated pixels can be viewed as outliers. The robustness to such outliers are addressed in Whyte et al. [44] and Cho et al. [8]. + +# 2.2. Image deblurring focusing on handling kernel/model error + +As it does not assume the blurring process is known, blind image deblurring needs to estimate blurring kernel before deblurring + +images. As blind deblurring is a challenging ill-posed non-linear inverse problem, the estimation of blurring kernel is hardly free of error. In addition, the convolution-based blurring model itself is only an approximation to practical blurring process. + +There is limited literature on non-blind deconvolution that focuses on handling kernel/model error. Ji and Wang [16] proposed an $\ell_1$ -norm relating regularization method with two auxiliary variables that address kernel error and result artifacts. The drawback of such method is that the sparsity prior imposed on these two variables does not always hold true in practice. Ren et al. [32] proposed a partial convolution model with the estimation of a confidential map for modeling kernel estimation error in Fourier domain, and deblurring the image using such a confidential map. Vasu et al. [43] proposed a deep learning based approach, whose main idea is to produce multiple estimations of the latent image w.r.t. different regularization hyper-parameters and then fuse them together using DNN to have the final deblurring result. The success of the method [43] depends on appropriate setting of regularization hyper-parameters which can be tricky in practice. Ren et al. [33] discussed a more general image restoration formulation which also covers non-blind deblurring with an erroneous kernel. The main idea of [33] is to simultaneously estimate fidelity term and image prior in the NN, in which fidelity term is composed by different norms of the residue under a learnable filter bank. The method [33] is not specific designed for image deconvolution, and its performance is not better than that of [43]. + +# 3. Main body + +The proposed method is based on the unrolling of the iterative scheme for solving the following optimization problem: + +$$ +\min _ {\boldsymbol {x}, \boldsymbol {u}} \| \boldsymbol {y} - \widehat {\boldsymbol {k}} \otimes \boldsymbol {x} - \boldsymbol {u} \| _ {2} ^ {2} + \phi (\boldsymbol {x}) + \psi (\boldsymbol {u} | \boldsymbol {x}), \tag {6} +$$ + +where $\phi (\cdot)$ and $\psi (\cdot |\cdot)$ are two regularization terms related to the priors imposed on the latent image and the correction term caused by kernel/model error. As image prior usually is imposed on the high-frequency components of $\pmb{x}$ , one often introduces an auxiliary variable $\pmb{z}$ to facilitate the design of efficient numerical solver. In this paper, we apply the half-quadratic splitting [13] to reformulate the problem (6) as: + +$$ +\min _ {\boldsymbol {x}, \boldsymbol {z}, \boldsymbol {u}} \| \boldsymbol {y} - \widehat {\boldsymbol {k}} \otimes \boldsymbol {x} - \boldsymbol {u} \| _ {2} ^ {2} + \| \operatorname {d i a g} (\lambda) (\Gamma \boldsymbol {x} - \boldsymbol {z}) \| _ {2} ^ {2} + \rho (\boldsymbol {z}) + \psi (\boldsymbol {u} | \boldsymbol {x}), \tag {7} +$$ + +where $\Gamma$ denote the set of high-pass filters such that $\Gamma x$ covers high-frequency components of the image $x$ . For instance, gradient operator $\nabla$ or wavelet filter bank $\{f_i\otimes \}$ + +# 3.1. Iterative scheme and optimization unrolling + +The optimization problem (7) can be solved via an alternating iterative scheme: + +$$ +\begin{array}{l} \boldsymbol {x} ^ {(t)} = \underset {\boldsymbol {x}} {\operatorname {a r g m i n}} \| \boldsymbol {y} - \widehat {\boldsymbol {k}} \otimes \boldsymbol {x} - \boldsymbol {u} ^ {(t - 1)} \| _ {2} ^ {2} \\ + \lambda \| \operatorname {d i a g} (\lambda) \left(\Gamma \boldsymbol {x} - \boldsymbol {z} ^ {(t - 1)}\right) \| _ {2} ^ {2}; \tag {8} \\ \end{array} +$$ + +$$ +\boldsymbol {z} ^ {(t)} = \underset {\boldsymbol {z}} {\operatorname {a r g m i n}} \mu \| \Gamma \boldsymbol {x} ^ {(t)} - \boldsymbol {z} \| _ {2} ^ {2} + \rho (\boldsymbol {z}); \tag {9} +$$ + +$$ +\boldsymbol {u} ^ {(t)} = \underset {\boldsymbol {u}} {\operatorname {a r g m i n}} \| \boldsymbol {y} - \widehat {\boldsymbol {k}} \otimes \boldsymbol {x} ^ {(t)} - \boldsymbol {u} \| _ {2} ^ {2} + \psi (\boldsymbol {u} | \boldsymbol {x} ^ {(t)}). \tag {10} +$$ + +![](images/b0f8840fd9db64bb6aec634d7a4e4e72f8c36fb5611b100245005348af1cedba.jpg) +Figure 2: The structure of Dual-Path U-net based correction process + +There are three steps involved in each iteration. The first step (8) is an inversion process that gives a least squares solution to the latent image, provided the given input corrected by $\pmb{u}^{(t - 1)}$ and the estimate of high-pass image channels $\pmb{z}^{(t - 1)}$ . Such a least squares solution has an analytic solution, which can be efficiently solved using discrete Fourier transform when $\Gamma$ is composed by multiple convolutions with high-pass filters. The second step (9) is a denoising process or de-artifacting process, which removes possible artifacts from high-pass image channels using certain prior encoded in $\rho$ . The third step (10) is a correction process for correcting the term relating to model error, which relies on a functional $\psi (\cdot |\pmb {x})$ driven by $\pmb{x}$ . + +It can be seen that the challenging parts in the iterative scheme above are both the second step and the third step, which involve complex regularizations on both image and correction terms. The design of these two regularization terms is also critical to the robustness of the method to kernel/model error. In the next, we will give a detailed discussion on how to use deep NN as a tool to learn the second and the third step. + +# 3.2. CNN-based denoising process + +CNN-based learnable image prior has been extensively exploited in image denoising and restoration (e.g. [49, 50, 27]), and showed its superior performance over pre-defined image priors in many experiments. In our implementation, we also use a CNN to model the denoising process, i.e., the second step (9). As the channels of $z$ are correlated in the sense that they are high-pass components of the same image, we first train a CNN to remove noise in $x^{(t)}$ and then pass the result high-pass channels to $z$ . Such a modification keeps the correlation among different high-pass channels of the same image. Furthermore, similar to [15], we use all possible estimates in all previous stages as the input $x^{(1)}, x^{(2)}, \dots, x^{(t)}$ , which help avoiding the issue of vanishing gradients. In short, the function of the denoising process at the stage $t$ for denoising takes the forms as + +$$ +\mathcal {D} ^ {(t)} \left(\cdot \mid \theta_ {D} ^ {(t)}\right): \left[ \boldsymbol {x} ^ {(1)}, \boldsymbol {x} ^ {(2)}, \dots , \boldsymbol {x} ^ {(t)} \right]\rightarrow \tilde {\boldsymbol {x}} \rightarrow \nabla \tilde {\boldsymbol {x}} \rightarrow \boldsymbol {z} ^ {(t)}, +$$ + +where $\theta_D^{(t)}$ denotes the parameters of $\mathcal{D}^{(t)}$ , and the CNN is used for modeling the mapping from $[\pmb{x}^{(1)},\pmb{x}^{(2)},\dots ,\pmb{x}^{(t)}]$ to $\tilde{\pmb{x}}$ . + +The CNN-based denoising process is called $Dn$ -CNN, whose implementation details are given as follows. At each stage, We use 17-block standard CNN with the structure + +$$ +\operatorname {C o n v} \rightarrow \mathrm {B N} \rightarrow \operatorname {R e L U}. +$$ + +except the first block and the last block. The first block omits the BN layer, and the last block only contains one Conv layer. For all + +Conv layers in the CNN, The kernel size is $3 \times 3$ and the channel size is 64. + +# 3.3. Dual-path U-net based correction process + +The third step (10) is about estimating the correction term $\pmb{u}$ from the residual $\pmb{r}^{(t)} = \pmb{y} - \widehat{\pmb{k}}\otimes \pmb{x}^{(t)}$ , regularized by the term $\psi (\cdot |\pmb{x}^{(t)})$ . The term $\psi (\cdot |\pmb{x}^{(t)})$ is dependent on the latent variable $\pmb{x}$ . In other words, the variable $\pmb{u}$ is determined by both the residual $\pmb{r}^{(t)}$ and the estimate $\pmb{x}^{(t)}$ . We propose to learn a deep NN to approximate the mapping from $(\pmb{r}^{(t)},\pmb{x}^{(t)})$ to $\pmb{u}^{(t)}$ , which can be expressed as + +$$ +\mathcal {P} ^ {(t)} \left(\cdot \mid \theta_ {P} ^ {(t)}\right): \left(\begin{array}{c}\boldsymbol {y} - \widehat {\boldsymbol {k}} \otimes \boldsymbol {x} ^ {(t)}\\\boldsymbol {x} ^ {(t)}\end{array}\right)\rightarrow \boldsymbol {u} ^ {(t)}, \tag {11} +$$ + +where $\theta_P^{(t)}$ denotes NN parameters of $\mathcal{P}^{(t)}$ . Our proposed approximation module is called DP-Unet. The DP-Unet implements the U-net [26] with the combinations of the downsampled codes from the dual inputs. See Fig 2 for the diagram of DP-Unet. + +# 3.4. Overall network structure and loss function + +The proposed CNN has totally $T + 1$ stages, denoted by $\{S_t\}_{t = 0}^T$ , corresponding to $T + 1$ iterations in the optimization algorithm. The proposed NN generates a sequence of deconvoluted images $\{\pmb{x}^{(1)},\pmb{x}^{(2)},\dots ,\pmb{x}^{(T + 1)}\}$ : + +$$ +\begin{array}{l} S _ {0}: (\boldsymbol {y}, \widehat {\boldsymbol {k}}) \rightarrow \boldsymbol {x} ^ {(1)}, \\ S _ {t}: (\boldsymbol {y}, \widehat {\boldsymbol {k}}, [ \boldsymbol {x} ^ {(1)}, \boldsymbol {x} ^ {(2)}, \dots , \boldsymbol {x} ^ {(t)} ]) \to \boldsymbol {x} ^ {(t + 1)}, 1 \leq t \leq T. \\ \end{array} +$$ + +In stage $S_0$ , the $\pmb{u}^{(0)}, \pmb{z}^{(0)}$ are set to be 0. All other stages contain three components: Db-INV for the inversion process; DP-Unet for estimating fidelity correction term, Dn-CNN for removing artifacts from the estimate of image gradients passed from Db-INV. It is observed that after the stage $S_4$ , little performance gain has been seen in later stages. Thus we set $T = 4$ . See Fig 3 for the outline of the proposed NN. + +Given a set of training data $\{\pmb{x}_j,\pmb{y}_j\}_{j = 1}^J$ where $(x_{j},y_{j})$ denotes the pair of latent image and its noisy blurred counterpart. Let $\pmb{x}_j^{(i)}$ represents the output of the $i$ -th stage in our NN w.r.t. the input $\pmb{y}_j$ . The loss function is defined as + +$$ +\mathcal {L} := \frac {1}{J} \sum_ {j = 0} ^ {J} \left(\| \boldsymbol {x} _ {j} ^ {(T + 1)} - \boldsymbol {x} _ {j} \| _ {2} ^ {2} + \sum_ {i = 2} ^ {T} \mu_ {i} \| \boldsymbol {x} _ {j} ^ {(i)} - \boldsymbol {x} _ {j} \| _ {2} ^ {2}\right), \tag {12} +$$ + +where the weights $\{\mu_i\}_{i = 1}^{T - 1}$ are set to 0.8 throughout all experiments. The first term in (12) is for encouraging the output of the + +![](images/6002203473994057c9a502d60068e74627ab54e5378ddc13031b8ce666138a52.jpg) +Figure 3: Diagram of the proposed NN for image deblurring in the presence of kernel/model error. + +NN close to the truth. The second term is for avoiding the intermediate results too far from the truth. + +# 3.5. Synthesis of erroneous kernel + +Besides NN architecture, sufficient high-quality training samples are also vital for the success of deep-learning based model. However, constructing an inaccurate kernel set for training is a great challenge. It not only needs to run time-consuming blind deblurring algorithms to obtain kernels, but the generated kernels are algorithm-dependent and not representative enough to reflect various types of kernel errors. Thus, we propose a procedure to synthesize erroneous kernels that can cover a wide range of error patterns shown in different blind deblurring methods. + +There are several patterns observed in kernel error from existing blind deblurring algorithms, including + +- kernel diffusion (overly smoothed), +- missing pieces of kernels, +- random spike-like noise. + +See Fig 4 (b-e) for an illustration. Each of these error patterns has a profound effect of the quality of the results. We propose an algorithm 1 to generate noisy kernels that can reflect these error patterns. There are 4 steps in the synthesis of noisy kernels: (1) Adding Gaussian noise around the contour of the ground true kernel with s.t.d $\sigma_{1}$ ; (2) randomly sampling the kernel using Bernoulli sampling model with probability $\beta$ ; (3) blurring the kernel with a Gaussian function with kernel size $m \times n$ and s.t.d $\mu$ ; and (4) adding Gaussian noise out of the kernel contour with s.t.d $\sigma_{2}$ . Note that the noises added around and away the contour are treated differently. The noise around the contour tends to be smoothed out while the noises off the contour are randomly distributed. See Fig 4 (f-i) for the visualization of noisy kernels synthesized by the proposed procedure. The procedure is outlined in Algorithm 1. The error degree is controlled by the noise level. In our implementation, noise levels are set as $\sigma_{1} = 0.01$ , $\sigma_{2} = 0.002$ . The scale and standard deviation of blurry function are sampled from some uniform distributions: $m, n \sim \mathcal{U}(1,5)$ , $\mu \sim \mathcal{U}(0.05,8)$ to generate kernels with different error degrees. The sampling rate in Bernoulli sampling model is set as 0.95. + +# Algorithm 1 Kernel error synthesis + +Input: Ground truth kernel $\pmb{k}$ . Noise level $\sigma_1, \sigma_2$ . Size and standard deviation of kernel blurry function ([m, n], $\mu$ ). Bernoulli sampling probability $\beta$ . + +Output: Generated noisy kernel $\widehat{k}$ + +1: $\% \%$ Generate noises and kernel blurry function +2: $\pmb{n}_1 = \mathcal{N}(0,\sigma_1^2\mathbf{I})$ . $n_2 = \mathcal{N}(0,\sigma_2^2\mathbf{I})$ . $\pmb {f} = \mathcal{N}([m,n],\mu^{2}\mathbf{I})$ +3: $\% \%$ Generate mask indicated the region around kernel +4: $M = \text{where}(\pmb{k} > 0)$ $\%$ Find the contour of kernel +5: $M = \text{dilate}(M)$ % Dilate kernel contour +6: $\% \%$ noisy kernel generation process +7: $\hat{\pmb{k}} = \pmb{n}_1\odot \pmb{M} + \pmb{k}$ % Add noise around the kernel +8: $\hat{\pmb{k}} = \mathcal{B}(\hat{\pmb{k}},\beta)$ % Bernoulli random sampling +9: $\widehat{\pmb{k}} = \widehat{\pmb{k}}\otimes \pmb{f}$ % Blurring the kernel +10: $\widehat{\pmb{k}} = \widehat{\pmb{k}} +\pmb{n}_2\odot (\mathbf{I} - \pmb {M})$ $\%$ Add noise off the contour + +![](images/d38230ab757a66c2e47b37e4c42e71da1e5e11f07e24173d8e8b8596f1e51dfc.jpg) +Figure 4: Illustration of real and synthesized noisy kernels. (a) True kernel. (b-e) The kernels estimated from existing blind deblurring methods including Cho and Lee [7], Levin et al. [24], Sun et al. [41], Michaeli and Irani[28]; (f-i) the noisy kernels generated from the proposed synthesis procedure. + +# 4. Experiments + +# 4.1. Experimental settings + +Training data. We use the BSDS500 dataset [1] to prepare training data. A set of 500 latent images is generated by randomly cropping the images in the BSDS500 into the ones of size $256 \times 256$ . As for kernel preparation, we use both the synthetic and real blurry kernels for training. As for synthetic kernels, we use the proposed noisy kernel synthetic procedure to deal with a 192 motion-blur kernel set from [37]. For true kernels, we adopt the same procedure as [43] to utilize the kernels return by blind deblurring methods [20, 25, 41, 6]. Synthetic kernels and true kernels both take the half of the noisy kernel set. Totally, about 140k noisy kernels + +are used for training. We also apply the affine registration [42] in the kernel set to address possible misalignment. It is noted that there is no any overlap between training and testing sets. + +Test data. We use three standard benchmark datasets in image restoration as test datasets. Levin et al.'s dataset [25] contains 32 gray-scale images produced by 4 sharp images convolved with 8 ground truth kernels from [25]. The estimated kernels are obtained by applying 4 blind deblurring algorithms on them: Cho and Lee [7], Levin et al. [25], Pan et al. [30], and Sun et al. [41]. Sun et al.'s dataset [41] has totally 640 images, generated by 80 clear images and the same truth kernels from [25]. The estimated kernels are obtained by applying 3 blind motion deblurring algorithms on them: Cho and Lee [7], Xu and Jia [45], Michaeli and Irani [28]. Lai et al.'s dataset [22] contains about 100 color images and 4 ground truth kernels. In order to have the same configuration as other deep learning method, we only use a subset of the dataset1, the same one used in Vasu's [43]. The estimated kernels are obtained by applying 4 blind deblurring algorithms on them: Xu and Jia [45], Xu et al. [47], Sun et al. [41], Perrone and Favaro [31]. + +Other important details. For initialization, all weights in NN are initialized by orthogonal matrices [36], and the biases are set to zeros. As for $\{\lambda_i^{(t)}\}_i$ , we set $\lambda_i^{(0)} = 0.005$ for stage $S_0$ . For later stage, $\lambda_i^{(t)}$ is set as 0.1 for no noise case and 0.5 for $1\%$ noise case. The NN is trained using the Adam method [18]. The model is trained with 500 epochs. The learning rate is initially set be $1\times 10^{-3}$ and drops with rate 0.2 after epoch 350. As for metric calculation, we follow the same procedure as [25, 43], i.e. first aligning output images with the sharp images with sub-pixel shift and then cutting off the boundary pixels. + +# 4.2. Ablation study + +Our ablation studies focus on the performance gain brought by two components: (1) the introduction of DP-Unet, and (2) the proposed procedures for simulating kernels estimated in practice. We train our NN with the same settings. See Table 1 for the results on the Levin et al.'s dataset. + +Table 1: Ablation study on the proposed NN + +
Levin et al.[7][25][30][41]
w/o DP-Unet30.6130.8534.3032.90
w/o Synthesis Kernels30.0630.3533.8632.39
Ours30.9231.1434.6633.36
+ +With vs. without DP-Unet. Table 1 shows that the DP-Unet module provides around $0.3 - 0.4\mathrm{dB}$ performance gain which is quite noticeable. See Fig 5 for an illustration how DP-Unet helps to reduce artifacts in the deblurred result. The ringing artifacts in (b) is mostly attenuated by using DP-Unet shown in (a). Such an improvement justified the need of the explicit treatment of kernel/model error and the effectiveness of the DP-Unet for predicting correction term. + +With vs. without synthetic kernels. In this study, while keeping all other settings the same, the NN is trained twice. One only + +![](images/6b0e4485849407159886a699e4f35d9c3e0046a35c4642dc8dc3d8564a4cc84b.jpg) +(a) With DP-Unet +(b) Without DP-Unet +(c) Ground truth +Figure 5: Visual inspection of recovered image with and without DP-Unet part in the NN. Zoom in for better visualization + +uses the kernels returned from existing blind deblurring methods. The other uses both the the kernels returned from existing blind deblurring methods and the kernels synthesized from Algorithm 1. It can be seen from Table 1 that, for the network trained without using the kernels synthesized by Algorithm 1, there is a significant performance hit in terms of PSNR value, about $0.7\mathrm{dB}$ . Such a performance loss clearly indicates the effectiveness of Algorithm 1 on generating noisy kernels whose error patterns are close to that from practical blind deblurring methods. + +# 4.3. Performance evaluation and comparison + +The performance evaluation is split into two parts. The first part focuses on the comparison of the proposed method to existing representative non-blind deblurring algorithms without specific treatment on kernel/model error. The second part focuses on the comparison of the proposed method to the ones that focus on the robustness to kernel/model error. + +In the first part, the proposed method is compared to representative non-blind image deblurring algorithms without special treatment on kernel error, including Krishnan and Fergus [19], Zoran and Weiss [51], Kruse et al. [21], Zhang et al. [50], Zhang et al. [48]. Note that the last three are deep learning based methods. For this experiment, we use "edge-taper" [38] in MATLAB Image Processing Toolbox for simulating the boundary condition of practical blurring, and the Gaussian noise level is set to be $1\%$ . + +See Table 2 for the comparison of the proposed method to these 5 methods in different configurations. The results from Kruse et al. [21] are marked as N/A as it fails to generate meaningful images in certain color channel for some instances in Lai et al.'s dataset. It can be seen that the proposed algorithm is better than other methods about from $0.4$ to $1.0\mathrm{dB}$ in Levin et al.'s dataset and from $0.3$ to $0.6\mathrm{dB}$ in Sun et al.'s dataset. For color images blurred by large kernels in Lai et al.'s dataset, the kernel error is much more severe than that in the other two datasets. Thus, the results from those existing methods without specific treatment on kernel error did quite poorly in comparison to ours. Indeed, the performance gain from our method is about $2\mathrm{dB}$ . The quantitative performance gain of the proposed method is also consistent with the improvement of visual quality. See Fig 6 for the illustration of some results. It shows the importance of handling kernel/model error in practical deblurring. + +In the second part, two experiments are conducted. The first experiment is comparing the proposed method to the other two nonlearning based regularization methods that have specific treatment on possible kernel error. One is Ji and Wang [16] and the other is Whyte et al. [44]. Again, the boundary extension is the same as the first part and the noise level is set to $1\%$ . See Table 3 for the + +Table 2: Average PSNR(dB)/SSIM of the results, in comparison to image deblurring methods without specific treatment on kernel error + +
NBDMethod for Kernel estimation
Levin et al.Sun et al.Lai et al.
[7][24][30][41][7][45][28][45][47][41][31]
[19]28.03/0.7928.03/0.8030.08/0.8429.26/0.8228.66/0.7929.20/0.8028.85/0.7919.89/0.7219.17/0.6519.53/0.6318.60/0.65
[51]27.75/0.8127.82/0.8229.10/0.8528.57/0.8328.78/0.8129.08/0.8128.66/0.8020.33/0.7419.88/0.7220.02/0.7119.58/0.70
[21]28.54/0.8629.00/0.8831.19/0.9230.83/0.9029.69/0.8730.51/0.8829.82/0.86N/AN/AN/AN/A
[50]27.99/0.8228.09/0.8130.42/0.8629.56/0.8328.84/0.8129.54/0.8329.23/0.8219.99/0.7019.36/0.6719.46/0.6718.68/0.68
[48]28.67/0.8528.74/0.8631.12/0.9030.27/0.8829.79/0.8630.45/0.8629.84/0.8420.27/0.7419.52/0.7019.80/0.7019.12/0.70
Ours29.76/0.8829.78/0.8931.97/0.9231.24/0.9130.44/0.8730.84/0.8730.27/0.8622.53/0.7422.27/0.7322.31/0.7221.61/0.70
+ +Table 3: Average PSNR(dB)/SSIM of the results on three benchmark datasets, in comparison to robust regularization methods with specific treatment on kernel error/outliers + +
Levin et al.[7][24][30][41]
[16]27.81/0.8327.94/0.8429.19/0.8628.86/0.85
[44]27.94/0.8028.02/0.8129.55/0.8429.10/0.82
Ours29.76/0.8829.78/0.8931.97/0.9231.24/0.91
Sun et al.[7][45][28]
[16]27.65/0.7627.85/0.7627.66/0.75
[44]28.57/0.7829.06/0.7928.74/0.78
Ours30.44/0.8730.84/0.8730.27/0.86
Lai et al.[45][47][41][31]
[16]19.70/0.7219.55/0.6619.53/0.6919.15/0.70
[44]20.21/0.7219.87/0.7019.91/0.6919.35/0.70
Ours22.52/0.7422.25/0.7322.29/0.7221.55/0.70
+ +comparison of the results from different methods. It can be seen that the proposed deep-learning-based method noticeably outperformed these two regularization methods. It shows the advantage of the proposed deep learning method over traditional regularization methods on handling kernel/model error. + +In the second experiment, the proposed method is compared to another deep-learning method Vasu et al. [43]. It is noted that Ren et al.'s method [33] is not specifically designed for handling kernel error, and there is no training code or trained model available online for deblurring motion-blurred images. Thus it is not included in the experiment. For fairness, we following the same setting as Vasu et al. [43], which keeps the boundary information and blurred images are noise-free. + +See Table 4 for the comparison. It can be seen that the performance of our deep-learning-based approach was modestly better than Vasu et al. [43] on the datasets with small kernel errors: from $0.2$ to $0.4\mathrm{dB}$ gain on Levin et al.'s dataset. For other two datasets with large kernel error, our method outperformed Vasu et al. [43] by a large margin: from 1 to $2\mathrm{dB}$ gain in most cases. This shows the effectiveness of our method on handling kernel/model error over existing deep learning method. + +# 4.4. Illustration on real images + +As there is no ground truth for quantitative evaluation, only some examples are shown for visual comparison. Real images are deblurred using the same trained model in the previous experiments. See Fig 7 for visual comparison of some examples from + +Table 4: Average PSNR(dB)/SSIM of the results, in comparison to existing deep learning method Vasu et al. [43] that focuses on handling kernel error + +
Levin et al.[7][24][30][41]
[43]30.62/0.8930.87/0.9134.35/0.9533.22/0.94
Ours30.92/0.9031.14/0.9234.66/0.9633.36/0.94
Sun et al.[7][45][28]
[43]29.54/0.8832.60/0.9130.69/0.85
Ours32.12/0.9232.76/0.9331.60/0.90
Lai et al.[45][47][41][31]
[43]22.90/0.7722.38/0.7622.60/0.7521.86/0.75
Ours24.83/0.8124.52/0.8024.79/0.8023.35/0.76
+ +Lai et al.'s dataset [22]. It can be seen that our results are noticeably better than those from other methods in terms of visual quality. More examples can be found in the supplementary file. It clearly indicated the benefit of the proposed method to practical image deblurring, i.e. by simply calling the proposed deblurring method in the last stage of blind motion deblurring, one can have the results with better visual quality. + +# 5. Conclusion + +This paper aimed at developing a deep learning method for non-blind image deconvolution that can handle kernel/model error well. Based on the EIV model of image blurring in the presence of kernel/model error, a TLS-based iterative optimization scheme was first proposed for deblurring the image. Then, we presented a deep learning method that unrolls the iterative scheme with deep-NN-based priors on both images and correction terms. In addition, an algorithm is proposed for simulating erroneous kernels for NN training. The experiments showed that our proposed method significantly outperformed existing methods when being used in blind motion deblurring, which justifies the benefit of special treatment on kernel/model uncertainty in our method and our algorithm of simulating practical erroneous kernels, + +# Acknowledgment + +Yuesong Nan and Hui Ji would like to acknowledge the support from the Singapore MOE Academic Research Fund (AcRF) Tier 2 research project (MOE2017-T2-2-156). + +![](images/1355e137230d0ca1df2e30c30a4da11443ee7bfe6fc94090e192397d14716951.jpg) +Input + +![](images/03b9e449bf56b6eda19d71449f62cae9c4485813fe7d6ba5c7011a1d9f617b3b.jpg) +[16] + +![](images/82afc2f53e3d5d6356b55f0e22f9db5c458a46e9397257cbeae99e5f819d1e6c.jpg) +[44] + +![](images/9a52a74e2bfd49f1eaf2398294a83e1c2eb06bcbd5bda274a85d69e66fe07451.jpg) +[19] + +![](images/e14ecf5c1e2adb9db8c7c315989357ed62b7d1c6f293f035dff5a453941a0b57.jpg) +[51] + +![](images/d51e19785769330d139a22495fe7feb32635c45b00b473322f1718a8ca69b7ee.jpg) +[48] + +![](images/8c30efa29fcb0518172bd499006f33936b49e54b97649317b0a6da5f8a676fd4.jpg) +[21] + +![](images/93b3c88d031e34203c4d227a84f7fb06f44d2f6ca28d2698d267e299a7ff43ad.jpg) +Ours + +![](images/9d9b73350625f12f48e004022080bf8cf9deae049b2e933b469059c71892b56b.jpg) +Sharp + +![](images/d0a728afb9bf85b6f2f0d303f1630a67533c9aa6894173b3151e61d1c60b1514.jpg) +Input + +![](images/f335c63623b3a8f631bc471897992dd9816723a76079af41a2f048e1c1b1690e.jpg) +[16] + +![](images/5fab43475f24c218e2c7bf91465d164297d42e4dfa6621abfb94c7500da36061.jpg) +[44] + +![](images/b1404382604ff23ccd0eaaf8aa1f98b1afb24713f3e679ec8a80ceeb72826011.jpg) +[19] + +![](images/3123834e1f157b6cb4b6f2523681b0e8e732f5a3f7955f75117f5322eea2128b.jpg) +[51] + +![](images/c5701070767ba09e8478585a34a2741b6e9990e0dde113b95baf58f997dc1272.jpg) +[48] + +![](images/a2294724d4973ef70035d110818df13edd7ace2148fe9718137e42e003d92967.jpg) +[21] + +![](images/97ae31925bac53511ee218ff3f8cb49ece722c3317e1028a484b2b5a58e9dbec.jpg) +Ours + +![](images/b406d4fd886cfec37bf2b9e7ac4973ed4ee0b286e278de76992339d4f57782df.jpg) +Sharp + +![](images/59694c2eb1e9630c0018710db7558a2e32be4264598843a55e580e3d3a4ca9c6.jpg) +Input + +![](images/eec48823c28e3b95ad567fbb804b43663df98e2333eb1465a9c149633f78365a.jpg) +[16] + +![](images/0c8a6647a82fef51482fbeb3ee85a9d30b229ee65f8514b3230b6eddb98e1f5a.jpg) +[44] + +![](images/0906932c3ef3aa1e70227892c41ef0a6849f9fc9d2ff0a12270f1cb7ca1d2698.jpg) +[19] + +![](images/009a3132a17f4c5da151f0a73ff9332b39081591d8ca87b94be01e4a6447a36f.jpg) +Figure 6: Deblurred results from Levin et al.'s dataset with the kernels returned by Pan et al. [30], Sun et al.'s dataset with the kernels returned by Michal and Irani [28], and Lai et al.'s dataset with the kernel returned by Xu and Jia [45]. The noise level is set as $1\%$ . + +![](images/1a7c13834fa71393eb907b6339de4bff37de59414e635641db7d339e272cf677.jpg) +[51] + +![](images/59ff5b6d4142c94f2b74a9134f398403237bd18ffe8d211484a706e6bf88a066.jpg) +[48] + +![](images/f1c0da45bf48eed65f4775cc7f2566c6b176b8ef2b408bdb3c6aabe613590501.jpg) +Ours + +![](images/e13d7789c8ec5b4c56664500ede3320322140ed3ab936a2e9d83f1d8a56a9237.jpg) +Sharp + +![](images/1d7233ae47a3265bcda9217095389942e3db469465fba1961dd603f537c90e9b.jpg) + +![](images/b70c1090ed4f1f7e102547b084937f609835faf9229a454298e8ec9dd3d18b5f.jpg) + +![](images/63d6feae82db4cab4c49a95c9cc8650d8dcd4905b456ae0fdc58ae2e19375363.jpg) + +![](images/79dbc5f4d440a98efa486fae91489951695257d893d5bd42395869b42a1c73ce.jpg) + +![](images/3a086e8f3bd9cf0ad0a95393d3ed80d8221c7f27f3c69cb60d1c37d1c692cf6b.jpg) + +![](images/9c67dc926a227079c16c02946c8a11c0f72cb56d9f2e57bdf4c480ba583c7573.jpg) + +![](images/fba39856f4c82713c5f4207c50d7cc45edf1aa6a2338f2f2264fc450d4363c84.jpg) + +![](images/256eb4159393ef3d2c7b25f336800d38e16832a33a8a51fe4c7e14aa7e902ef0.jpg) + +![](images/0bb9921704febdd1e25de3ea35c0774f557ccec5ade695102444931d3ed336df.jpg) +Input + +![](images/d6cf7271c8085faa0be84e2bbd29e5a5a7242a2961ed63bb010b555f889b26df.jpg) +[19] + +![](images/1c3faae5846ad6fa9c2b5cc0b5cfd6aefc5326be6f82bda0cde6e3d4169fe57b.jpg) +[51] + +![](images/97afdc757ed081684f342ad41a9245b758c926d4a3c8b0473e821d0655fb46e4.jpg) +[16] + +![](images/50346f7b7e834e69ea19bd968b822bd418e1cff5bf93945085c7dcf729209e94.jpg) +[44] + +![](images/6e46efb0984ecf315114841c4ca4fe12792536d6c41366d09e05c53de44942af.jpg) +[48] + +![](images/460bffe8f4e77d9e235bca0b51ecf2d4511a3e71dc2104578845b28f1933aeab.jpg) +[43] + +![](images/f211863685f0539abf92e02c348c2957d821273b6a745b5e85642441303e418f.jpg) +Ours + +![](images/8690684b76ac66721a3927cb1786327dfb2ccbae9a207b331147249a6b6328b1.jpg) + +![](images/657024bb14f16726ff4239bbbc941b5fd2465d1732122cecadbfe92b13070ccf.jpg) + +![](images/c0e01c0568f20ddf18eed6522f23ea5d815d13160be38b9aaf522fd72e8e0e55.jpg) + +![](images/d5155e2aafa78abd7d022eb28130941efae6edc909420e99c115c42b98c7b994.jpg) + +![](images/9c519ad4e7e2455fc73207188775fa0e184d1ad5eb959693bb588a6ecf9064e3.jpg) + +![](images/73a895544bbf424d9c8eaadba706a64c735e7cb587f90014680efdf36b14789f.jpg) + +![](images/ee46d94b8b4c58a233bfc3a50750a5991d38d15cc28a80d357c2033035891257.jpg) + +![](images/3840d7fd63e742378a6ea0f1ecb6274c82d1e2aef12dd25892533ad8d409eda8.jpg) + +![](images/784216a482e527cf5d541c9ab652464e395a0321fc3bff975043d53568cbb666.jpg) +Input + +![](images/df080dffbf59c2d8b12b55ddb51fef5e75fcecf6f2f7c03e426495cd3364e666.jpg) +[19] + +![](images/cbab070a8183295b7cd02d87433a6f645d0a05d28233874752c0328080693b84.jpg) +[51] + +![](images/b2627adb79c9bb208838d494a253d62ca3df0ec1bad68c10f55a783bc259646f.jpg) +[16] +Figure 7: Deblurred results of image "harubang" and "face2" from the real dataset in Lai et al. [22]. The kernels are estimated by Cho and Lee [7] for image "harubang" and by Pan et al. [30] for image "face2". See more examples in the supplementary file. + +![](images/e09e0bd32f7ee78342848c0c864b8c344680001b80ddd5185e132e509ba29d98.jpg) +[44] + +![](images/9daac4cf82cb32ce77c884b474d21501a7a8a0b21f21dcf6d56855a42263230b.jpg) +[48] + +![](images/58082aa3811f6771f70bb7ecd7e479214c700cb57846c204ab66f053eaa457f7.jpg) +[43] + +![](images/8fe4499d4209cc791820e1e72949188262cbce3255db44bfd6b34e827c174e22.jpg) +Ours + +# References + +[1] Pablo Arbelaez, Michael Maire, Charless Fowlkes, and Jitendra Malik. Contour detection and hierarchical image segmentation. IEEE Trans. Pattern Anal. Mach. Intell., 33(5):898-916, May 2011. +[2] Siavash Arjomand Bigdeli, Matthias Zwicker, Paolo Favaro, and Meiguang Jin. Deep mean-shift priors for image restoration. In NIPS, pages 763-772, 2017. +[3] Jian-Feng Cai, Hui Ji, Chaoqiang Liu, and Zuowei Shen. Blind motion deblurring from a single image using sparse approximation. In CVPR, pages 104-111. IEEE, 2009. +[4] Mikael Carlavan and Laure Blanc-Féraud. Sparseoisson noisy image deblurring. IEEE Transactions on Image Processing, 21(4):1834-1846, 2011. +[5] Raymond J Carroll, David Ruppert, Leonard A Stefanski, and Ciprian M Crainiceanu. Measurement error in nonlinear models: a modern perspective. Chapman and Hall/CRC, 2006. +[6] Ayan Chakrabarti. A neural approach to blind motion deblurring. In European conference on computer vision, pages 221-235. Springer, 2016. +[7] Sunghyun Cho and Seungyong Lee. Fast motion deblurring. ACM Transactions on graphics (TOG), 28(5):145, 2009. +[8] Sunghyun Cho, Jue Wang, and Seungyong Lee. Handling outliers in non-blind image deconvolution. In 2011 International Conference on Computer Vision, pages 495-502. IEEE, 2011. +[9] Aram Danielyan, Vladimir Katkovnik, and Karen Egiazarian. BM3D frames and variational image deblurring. IEEE Trans. Image Process., 21(4):1715-1728, 2012. +[10] Jiangxin Dong, Jinshan Pan, Deqing Sun, Zhixun Su, and Ming-Hsuan Yang. Learning data terms for non-blind deblurring. In Proceedings of the European Conference on Computer Vision (ECCV), pages 748-763, 2018. +[11] Weisheng Dong, Lei Zhang, Guangming Shi, and Xin Li. Nonlocally centralized sparse representation for image restoration. IEEE Trans. Image Process., 22(4):1620-1630, 2013. +[12] R. Fergus, B. Singh, A. Hertzmann, S. T. Roweis, and W. T. Freeman. Removing camera shake from a single photograph. ACM TOG (Proc. SIGGRAPH), 25(3):787-794, 2006. +[13] Donald Geman and Chengda Yang. Nonlinear image recovery with half-quadratic regularization. IEEE Trans. Image Process., 4(7):932-946, 1995. +[14] Gene H Golub and Charles F Van Loan. An analysis of the total least squares problem. SIAM journal on numerical analysis, 17(6):883-893, 1980. +[15] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, pages 4700-4708, 2017. +[16] Hui Ji and Kang Wang. Robust image deblurring with an inaccurate blur kernel. IEEE Transactions on Image processing, 21(4):1624-1634, 2011. +[17] Meiguang Jin, Stefan Roth, and Paolo Favaro. Noise-blind image deblurring. In CVPR, pages 3510-3518, 2017. +[18] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. + +[19] Dilip Krishnan and Rob Fergus. Fast image deconvolution using hyper-laplacian priors. In NIPS, pages 1033-1041, 2009. +[20] Dilip Krishnan, Terence Tay, and Rob Fergus. Blind deconvolution using a normalized sparsity measure. In CVPR 2011, pages 233-240. IEEE, 2011. +[21] Jakob Kruse, Carsten Rother, and Uwe Schmidt. Learning to push the limits of efficient fft-based image deconvolution. In CVPR, pages 4586-4594, 2017. +[22] Wei-Sheng Lai, Jia-Bin Huang, Zhe Hu, Narendra Ahuja, and Ming-Hsuan Yang. A comparative study for single image blind deblurring. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1701-1709, 2016. +[23] Anat Levin, Yair Weiss, Fredo Durand, and William T Freeman. Understanding and evaluating blind deconvolution algorithms. In CVPR, pages 1964-1971. IEEE, 2009. +[24] Anat Levin, Yair Weiss, Fredo Durand, and William T Freeman. Efficient marginal likelihood optimization in blind deconvolution. In CVPR, pages 2657-2664. IEEE, 2011. +[25] Anat Levin, Yair Weiss, Fredo Durand, and William T Freeman. Efficient marginal likelihood optimization in blind deconvolution. In CVPR, pages 2657-2664. IEEE, 2011. +[26] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3431-3440, 2015. +[27] Tim Meinhardt, Michael Moller, Caner Hazirbas, and Daniel Cremers. Learning proximal operators: Using denoising networks for regularizing inverse imaging problems. In ICCV, pages 1781-1790, 2017. +[28] Tomer Michaeli and Michal Irani. Blind deblurring using internal patch recurrence. In European Conference on Computer Vision, pages 783-798. Springer, 2014. +[29] Stanley Osher, Martin Burger, Donald Goldfarb, Jinjun Xu, and Wotao Yin. An iterative regularization method for total variation-based image restoration. SIAM Multiscale Modeling Simul., 4(2):460-489, 2005. +[30] Jinshan Pan, Deqing Sun, Hanspeter Pfister, and Ming-Hsuan Yang. Blind image deblurring using dark channel prior. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1628-1636, 2016. +[31] Daniele Perrone and Paolo Favaro. Total variation blind deconvolution: The devil is in the details. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2909-2916, 2014. +[32] Dongwei Ren, Wangmeng Zuo, David Zhang, Jun Xu, and Lei Zhang. Partial deconvolution with inaccurate blur kernel. IEEE Transactions on Image Processing, 27(1):511-524, 2017. +[33] D. Ren, W. Zuo, D. Zhang, L. Zhang, and M. Yang. Simultaneous fidelity and regularization learning for image restoration. arXiv preprint arXiv:1804.04522, 2018. +[34] Wenqi Ren, Jiawei Zhang, Lin Ma, Jinshan Pan, Xiaochun Cao, Wangmeng Zuo, Wei Liu, and Ming-Hsuan Yang. Deep non-blind deconvolution via generalized low-rank approximation. In NIPS, pages 295-305, 2018. + +[35] Stefan Roth and Michael J Black. Fields of experts: A framework for learning image priors. In CVPR, pages 860-867. IEEE, 2005. +[36] Andrew M Saxe, James L McClelland, and Surya Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv preprint arXiv:1312.6120, 2013. +[37] Uwe Schmidt, Jeremy Jancsary, Sebastian Nowozin, Stefan Roth, and Carsten Rother. Cascades of regression tree fields for image restoration. IEEE Trans. Pattern Anal. Mach. Intell., 38(4):677-689, 2016. +[38] Uwe Schmidt and Stefan Roth. Shrinkage fields for effective image restoration. In CVPR, pages 2774-2781, 2014. +[39] Christian J Schuler, Harold Christopher Burger, Stefan Harmeling, and Bernhard Scholkopf. A machine learning approach for non-blind image deconvolution. In CVPR, pages 1067-1074, 2013. +[40] Libin Sun, Sunghyun Cho, Jue Wang, and James Hays. Edge-based blur kernel estimation using patch priors. In ICCP, pages 1-8. IEEE, 2013. +[41] Libin Sun, Sunghyun Cho, Jue Wang, and James Hays. Edge-based blur kernel estimation using patch priors. In IEEE International Conference on Computational Photography (ICCP), pages 1-8. IEEE, 2013. +[42] Richard Szeliski. Computer vision: algorithms and applications. Springer Science & Business Media, 2010. +[43] Subeesh Vasu, Venkatesh Reddy Maligireddy, and AN Rajagopalan. Non-blind deblurring: Handling kernel uncertainty with cnns. In Proceedings of the IEEE Conference + +on Computer Vision and Pattern Recognition, pages 3272-3281, 2018. +[44] Oliver Whyte, Josef Sivic, and Andrew Zisserman. Deblurring shaken and partially saturated images. International journal of computer vision, 110(2):185-201, 2014. +[45] Li Xu and Jiaya Jia. Two-phase kernel estimation for robust motion deblurring. In European conference on computer vision, pages 157-170. Springer, 2010. +[46] Li Xu, Jimmy SJ Ren, Ce Liu, and Jiaya Jia. Deep convolutional neural network for image deconvolution. In NIPS, pages 1790-1798, 2014. +[47] Li Xu, Shicheng Zheng, and Jiaya Jia. Unnatural 10 sparse representation for natural image deblurring. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1107-1114, 2013. +[48] Jiawei Zhang, Jinshan Pan, Wei-Sheng Lai, Rynson WH Lau, and Ming-Hsuan Yang. Learning fully convolutional networks for iterative non-blind deconvolution. In CVPR, pages 3817-3825, 2017. +[49] Kai Zhang, Wangmeng Zuo, Yunjin Chen, Deyu Meng, and Lei Zhang. Beyond a gaussian denoiser: Residual learning of deep cnn for image denoising. IEEE Trans. Image Process., 26(7):3142-3155, 2017. +[50] Kai Zhang, Wangmeng Zuo, Shuhang Gu, and Lei Zhang. Learning deep cnn denoiser prior for image restoration. In CVPR, volume 2, 2017. +[51] Daniel Zoran and Yair Weiss. From learning models of natural image patches to whole image restoration. In ICCV, pages 479-486. IEEE, 2011. \ No newline at end of file diff --git a/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/images.zip b/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9a81fae5c09f9aa437d665cd489686cb237d72a0 --- /dev/null +++ b/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4ebb6f348d9e66a2f2f4f8cb2d74286572ea95d352ffd2ef262fd8e7455928a +size 869029 diff --git a/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/layout.json b/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..00dfa8aad829af6782a9c2f079fa3287cc2e5bb5 --- /dev/null +++ b/deeplearningforhandlingkernelmodeluncertaintyinimagedeconvolution/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b52b45616dc537a45523cec383168d80b447765e321ebf9e1fe353a553d69106 +size 656868 diff --git a/deeplpfdeeplocalparametricfiltersforimageenhancement/8d4adf20-b0dc-4717-830e-95d5baccd19b_content_list.json b/deeplpfdeeplocalparametricfiltersforimageenhancement/8d4adf20-b0dc-4717-830e-95d5baccd19b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..6777abcb69599da2a343e96dcab154f170e08480 --- /dev/null +++ b/deeplpfdeeplocalparametricfiltersforimageenhancement/8d4adf20-b0dc-4717-830e-95d5baccd19b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b85d9b7d542dd3510ddb8a3c89a249bab2241b0d8e5c36b3cc81f8ec1f9b67f6 +size 69051 diff --git a/deeplpfdeeplocalparametricfiltersforimageenhancement/8d4adf20-b0dc-4717-830e-95d5baccd19b_model.json b/deeplpfdeeplocalparametricfiltersforimageenhancement/8d4adf20-b0dc-4717-830e-95d5baccd19b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7b297ec8aa7640f0bc17dd2d64961d5fcf78655e --- /dev/null +++ b/deeplpfdeeplocalparametricfiltersforimageenhancement/8d4adf20-b0dc-4717-830e-95d5baccd19b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5dfdb0c4feeaf89152862bba013dc971e74ed771cc27c60b17ffbc84f5bc265d +size 83491 diff --git a/deeplpfdeeplocalparametricfiltersforimageenhancement/8d4adf20-b0dc-4717-830e-95d5baccd19b_origin.pdf b/deeplpfdeeplocalparametricfiltersforimageenhancement/8d4adf20-b0dc-4717-830e-95d5baccd19b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4438f322f1519d2e402720c3a37581622582879e --- /dev/null +++ b/deeplpfdeeplocalparametricfiltersforimageenhancement/8d4adf20-b0dc-4717-830e-95d5baccd19b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f2a403af3b36e815897a2b51737d01aee81f8c44859a7a138282b8a1ed892b8 +size 6029241 diff --git a/deeplpfdeeplocalparametricfiltersforimageenhancement/full.md b/deeplpfdeeplocalparametricfiltersforimageenhancement/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f7abcb575bf76a9a4c0e132699aa8cdfc1105340 --- /dev/null +++ b/deeplpfdeeplocalparametricfiltersforimageenhancement/full.md @@ -0,0 +1,291 @@ +# DeepLPF: Deep Local Parametric Filters for Image Enhancement + +Sean Moran1, Pierre Marza*1,2, Steven McDonagh1, Sarah Parisot1,3, Gregory Slabaugh1 + +sean.j.moran@gmail.com, pierre.marza@gmail.com, + +{steven.mcdonagh, sarah.parisot, gregory.slabaugh} @huawei.com, + +1Huawei Noah's Ark Lab + +$^{2}$ INSA Lyon + +3Mila Montréal + +# Abstract + +Digital artists often improve the aesthetic quality of digital photographs through manual retouching. Beyond global adjustments, professional image editing programs provide local adjustment tools operating on specific parts of an image. Options include parametric (graduated, radial filters) and unconstrained brush tools. These highly expressive tools enable a diverse set of local image enhancements. However, their use can be time consuming, and requires artistic capability. State-of-the-art automated image enhancement approaches typically focus on learning pixel-level or global enhancements. The former can be noisy and lack interpretability, while the latter can fail to capture fine-grained adjustments. In this paper, we introduce a novel approach to automatically enhance images using learned spatially local filters of three different types (Elliptical Filter, Graduated Filter, Polynomial Filter). We introduce a deep neural network, dubbed Deep Local Parametric Filters (DeepLPF), which regresses the parameters of these spatially localized filters that are then automatically applied to enhance the image. DeepLPF provides a natural form of model regularization and enables interpretable, intuitive adjustments that lead to visually pleasing results. We report on multiple benchmarks and show that DeepLPF produces state-of-the-art performance on two variants of the MIT-Adobe 5k [3] dataset, often using a fraction of the parameters required for competing methods. + +# 1. Introduction + +Digital photography has progressed dramatically in recent years due to sustained improvements in camera sensors and image signal processing pipelines. Yet despite this progress, captured photographs may still lack quality due to varying factors including scene condition, poor illumination, or photographer skill. Human image retouchers often + +![](images/6238e9f3098e87f96c326d09907234b7a2733c845de9de018708d94fecb11dc1.jpg) + +![](images/666cf64fbfda28eb75654b1a7068188b4d2d5961b843ea034d0508706921323b.jpg) + +![](images/d482a30220af7e14cb8adbce10da9b7af0330f79cc31506b7958372cabedc64b.jpg) +Figure 1: DeepLPF for parametric local image enhancement. Left: Examples of estimated filters. Right: The produced output images. Top: Adjustment of the image red channel with a single Elliptical Filter. Bottom: Adjustment of the image red channel with a single Graduated Filter. + +![](images/c0340036116aeec4cbdc4e51ee1e883514dcc98d4e8f4316b8c13592786ec57b.jpg) + +![](images/12c50febbdfcd934960251eae04489841336a9eb280e52eeb711c77765c77721.jpg) + +improve the aesthetic quality of digital photographs through manual adjustments. Professional-grade software (e.g. Photoshop, Lightroom) allows application of a variety of modifications through both interactive and semi-automated tools. + +In addition to elementary global adjustments such as contrast enhancement and brightening, advanced editing functionality is also available through local image adjustments, such as the examples shown in Fig 1. However, manual enhancement remains challenging for non-experts who may lack appropriate skills, time, or aesthetic judgment to improve their images effectively. + +These observations motivate the development of fully + +automatic photo enhancement tools that can replace non-expert user work or provide an improved manual-editing starting point for professional artists. Photographers often retouch images using a combination of different local filters that only affect limited spatial regions of the image. For example, a photographer might want to adjust the darkness of the sky using a graduated filter while increasing the brightness of a face using an appropriately sized elliptical filter, and retouching small fine image detail using a brush tool. + +Inspired by this manual workflow, we propose a novel approach that learns parametric filters for local image enhancement. We draw influence from digital photo editing software, but model and emulate local editing tools using a deep neural network. Given (input, enhanced) pairs as training examples, we reproduce local, mid-level adjustments through learned graduated and elliptical filters and a learned brush tool. By constraining our model to learn how to utilize tools that are similar to those found in a digital artists' toolbox, we provide a natural form of model regularization and enable interpretable, intuitive adjustments that lead to visually pleasing results. Extensive experiments on multiple public datasets show that we outperform state-of-the-art [8, 25, 4] results with a fraction of the neural network weight capacity. + +Our Contributions can be summarised as follows: + +- Local Parametric Filters: We propose a method for automatic estimation of parametric filters for local image enhancement. We instantiate our idea using Elliptical, Graduated, Polynomial filters. Our formulation provides intuitively interpretable and intrinsically regularised filters that ensure weight efficiency (capacity frugality) and mitigate overfitting. +- Multiple Filter Fusion Block: We present a principled strategy for the fusion of multiple learned parametric image filters. Our novel plug-and-play neural block is capable of fusing multiple independent parameter filter outputs and provides a flexible layer that can be integrated with common network backbones for image quality enhancement. +- State-Of-The-Art Image Enhancement Quality: DeepLPF provides state-of-the-art image quality enhancement on two challenging benchmarks. + +# 2. Related work + +Digital photo enhancement has a rich history in both the image processing and computer vision communities. Early automated enhancement focused primarily on image contrast [20, 24, 29], while recent work has employed data-driven methods to learn image adjustments for improving contrast, colour, brightness and saturation [11, 13, 9, 8, 10, 19]. The related image enhancement work can be broadly + +divided into methods that operate globally or locally on an image, or propose models that operate over both scales. + +Global image enhancement: Bychkovsky et al. [3] collected the popular MIT-Adobe-5K dataset1 that consists of 5,000 photographs and their retouching by five different artists. The authors propose a regression based approach to learn the artists' photographic adjustments from image pairs. To automate colour enhancement, [27] propose a learning-to-rank approach over ten popular global colour controls. In [7] an FCN is used to learn approximations to various global image processing operators such as photographic style, non-local dehazing and pencil drawing. Photo post-processing is performed by a white-box framework in [10] where global retouching curves are predicted in RGB space. A Reinforcement Learning (RL) approach enables the image adjustment process in [10] and Deep RL is used to define an ordering for enhancement adjustments in [19], enabling application of global image modifications (eg. contrast, saturation). + +Local image enhancement: Aubry et al. [34] propose fast local Laplacian filtering for enhancing image detail. Hwang et al. [12] propose a method for local image enhancement that searches for the best local match for an image in a training database of (input, enhanced) image pairs. Semantic maps are constructed in [28] to achieve semantic-aware enhancement and learn local adjustments. Underexposed photo enhancement [25] (DeepUPE) learns a scaling luminance map using an encoder-decoder setup however no global adjustment is performed. The learned mapping has high complexity and crucially depends on the regularization strategy employed. Chen et al. [7] propose a method for fast learning of image operators using a multi-scale context aggregation network. Enhancement via image-to-image translation using both cycle consistency [32] and unsupervised learning [18] have also been proposed in recent years. + +Global and local image enhancement: Chen et al. [8] develop Deep Photo Enhancer (DPE), a deep model for enhancement based on two-way generative adversarial networks (GANs). As well as local pixel-level adjustments, DPE introduces a global feature extraction layer to capture global scene context. Ignatov et al. [14] design a weakly-supervised image-to-image GAN-based network, removing the need for pixel-wise alignment of image pairs. Chen et al. [4] propose a low-light enhancement model that operates directly on raw sensor data and propose a fully-convolutional approach to learn short-exposure, long-exposure mappings using their low-light dataset. Recent work makes use of multitask learning [16] for real-time image processing with various image operators. Bilateral guided joint upsampling enables an encoder/decoder architecture for local as well as global image processing. HDRNet [9] learns global and local image adjustments by lever + +![](images/ade33cc517536944445175e1c95eae939f6f3e03085b71589d374fb30cd30b88.jpg) +Figure 2: Examples of local filter usage in Lightroom for the brush tool (top row), graduated (middle row) and radial (bottom row) filters. Images are shown before (left) and after filter based enhancement by a human artist (right). + +aging a two stream convolutional architecture. The local stream extracts local features that are used to predict the coefficients of local affine transforms, while the global stream extracts global features that permit an understanding of scene category, average intensity etc. In [13] DSLR-quality photos are produced for mobile devices using residual networks to improve both colour and sharpness. + +In contrast with prior work, we propose to frame the enhancement problem by learning parametric filters, operating locally on an image. Learnable, parametrized filters align well with the intuitive, well-understood human artistic tools often employed for enhancement and this naturally produces appealing results that possess a degree of familiarity to human observers. Additionally, the use of our filter parameterization strategy serves to both constrain model capacity and regularize the learning process, mitigating overfitting and resulting in moderate model capacity cost. + +# 3. Deep Local Parametric Filters (DeepLPF) + +DeepLPF defines a novel approach for local image enhancement, introducing a deep fusion architecture capable of combining the output from learned, spatially local parametric image filters that are designed to emulate the combined application of analogous manual filters. In this work, we instantiate three of the most popular local image filters + +(Elliptical, Graduated, Polynomial). Figure 2 illustrates usage, and resulting effects of, comparable manual Lighthroom filters. In Section 3.1 we present our global DeepLPF architecture, designed to learn and apply sets of different parametric filters. Section 3.2 then provides detail on the design of the three considered local parametric filters, and describes the parameter prediction block used to estimate filter parameters. Finally, Sections 3.3 and 3.4 explain how multiple filters are fused together and provide detail on our training loss function, respectively. + +# 3.1. DeepLPF Architecture + +The architecture of DeepLPF is shown in Figure 3. Given a low quality RGB input image $I$ and its corresponding high quality enhanced target image $Y$ , DeepLPF is trained to learn a transformation $f_{\theta}$ such that $\hat{Y} = f_{\theta}(I)$ is close to $Y$ as determined by an objective function based on image quality. Our model combines a single-stream network architecture for fine-grained enhancement, followed by a two-stream architecture for higher-level, local enhancement. We first employ a standard CNN backbone (e.g. ResNet, UNet) to estimate a $H \times W \times C$ dimensional feature map. The first three channels of the feature map represent the image to be adjusted, while the remaining $C' = C - 3$ channels represent additional features that feed into three filter parameter prediction blocks. The first single stream path estimates the parameters of a polynomial filter that is subsequently applied to the pixels of the backbone enhanced image $\hat{Y}_1$ input image. This block emulates a brush tool which adjusts images at the pixel level with a smoothness constraint imposed by the brush's shape. The image enhanced by the polynomial filter, $\hat{Y}_2$ , is concatenated with the $C'$ backbone features, and serves as input to the two stream paths, which learns and applies more constrained, local enhancements in the form of elliptical and graduated filters. The adjustment maps of the elliptical and graduated filters are estimated using two parallel regression blocks. Elliptical and graduated maps are fused using simple addition, although more involved schemes could be employed e.g. weighted combination. This fusion step results in a scaling map $\hat{S}$ that is element-wise multiplied to $\hat{Y}_2$ to give image $\hat{Y}_3$ , effectively applying the elliptical and graduated adjustments to the image after polynomial enhancement. The image $\hat{Y}_1$ , enhanced by the backbone network, is finally added through a long residual connection to $\hat{Y}_3$ producing the final output image $\hat{Y}$ . + +# 3.2. Local Parametric Filters + +We provide detail on three examples of local parametric filter: the Graduated Filter (3.2.2), Elliptical Filter (3.2.3) and Polynomial Filter (3.2.4). Filters permit different types of local image adjustment, governed by their parametric form, and parameter values specify the exact image effect + +![](images/2b750abe5e45292660b0855cd7ad0f91cee03cfe1eb5d13a8818cf9ac84478df.jpg) +Figure 3: Architecture diagram illustrating our approach to combine the different filter types (polynomial, elliptical, graduated) in a single end-to-end trainable neural network. The architecture combines a single stream path for initial enhancement with the polynomial filter and a two stream path for further refinement with the graduated and elliptical filters. + +in each case. Filter parameter values are image specific and are predicted using supervised CNN regression (3.2.1). + +# 3.2.1 Filter Parameter Prediction Network + +Our parameter prediction block is a lightweight CNN that accepts a feature set from a backbone network and regresses filter parameters individually. The network block alternates between a series of convolutional and max pooling layers that gradually downsample the feature map resolution. Following these layers there is a global average pooling layer and a fully connected layer which is responsible for predicting the filter parameters. The global average pooling layer ensures that the network is agnostic to the resolution of the input feature set. Activation functions are Leaky ReLUs and dropout (50%, both train and test) is applied to the fully connected layer. Further architectural details are provided in our supplementary material. + +For the three example filters considered; the only difference between respective network regressors is the number of output nodes in the final fully connected layer. This corresponds to the number of parameters that define the respective filter (Table 1). In comparison to contemporary local pixel level enhancement methods [8], the number of parameters required is greatly reduced. Our network output size can be altered to estimate the parameters of multiple instances of the same filter type. Our methodology for predicting the parameters of an image transformation is aligned with previous work [9, 5, 23] that shows that learning a parameterised transformation is often more effective and simpler than directly predicting an enhanced image directly. Importantly, the regression network is agnostic to the + +Table 1: Parameters used in localized filters + +
Filter# ParametersParameters
GraduatedG=8sgR, sgG, sgB, m, c, o1, o2, ginv
EllipticalE=8seR, seG, seB, h, k, θ, a, b
Cubic-10P=30{A···J} per colour channel
Cubic-20P=60{A···T} per colour channel
+ +specific implementation of backbone model allowing image filters to be used to enhance the output of any image translation network. + +# 3.2.2 Graduated Filter + +Graduated filters are commonly used in photo editing software to adjust images with high contrast planar regions such as an overexposed sky. Our graduated image filter, illustrated in Figure 4a, is parametrised by three parallel lines. The central line defines the filter location and orientation, taking the form $y = mx + c$ with slope $m$ and intercept $c$ , providing a linear parameterisation in standard fashion. Offsets $o_1$ and $o_2$ provide two additional parameters such that each (channel-wise) adjustment map is composed of four distinct regions that form a heatmap $s(x,y)$ . In the the $100\%$ area all pixels are multiplied by scaling parameter $s_g$ . Then, in the $100 - 50\%$ area, the applied scaling factor linearly decreases from $s_g$ to $\frac{s_g}{2}$ . Inside the $50 - 0\%$ area, the scaling value is further decreased linearly until reaching the $0\%$ area where pixels are not adjusted. Mathematically, the graduated filter is described in Equations 1-3: + +![](images/11a14616c3cd61e6a3ab761e949fd483c3526b0eec3640df220c390b41a23a22.jpg) +(a) +Figure 4: Parametrisation and heatmap of the graduated (a) and elliptical (b) filters. See main text for further detail. + +![](images/97dd2914636fa5a463e85da4d48f8ccd86f493754ebf0dbd31ad94f397a877b0.jpg) +(b) + +$$ +a (x, y) = s _ {g} \min \left\{\frac {1}{2} \left(1 + \frac {\ell (x , y)}{d _ {2}}\right), 1 \right\} \tag {1} +$$ + +$$ +b (x, y) = s _ {g} \max \left\{\frac {1}{2} \left(1 + \frac {\ell (x , y)}{d _ {1}}\right), 0 \right\} \tag {2} +$$ + +$$ +s (x, y) = \left\{ \begin{array}{l} \hat {g} _ {i n v} a (x, y) + (1 - \hat {g} _ {i n v}) b (x, y), l (x, y) \geq 0 \\ (1 - \hat {g} _ {i n v}) a (x, y) + \hat {g} _ {i n v} b (x, y), l (x, y) < 0 \end{array} \right. \tag {3} +$$ + +where $\ell(x, y) = y - (mx + c)$ is a function of the location of a point $(x, y)$ relative to the central line, $d_1 = o_1 \cos \alpha$ , $d_2 = o_2 \cos \alpha$ , $\alpha = \tan^{-1}(m)$ , and $\hat{g}_{inv}$ is a binary indicator variable. Parameter $\hat{g}_{inv}$ permits inversion with respect to the top and bottom lines. Inversion determines the location of the $100\%$ scaling area relative to the central line. To enable learnable inversion, we predict a binary indicator parameter $\hat{g}_{inv} = \frac{1}{2} (\operatorname{sgn}(g_{inv}) + 1)$ , where $\operatorname{sgn}$ denotes the sign function, $g_{inv}$ is the real-valued predicted parameter and $\hat{g}_{inv}$ is the binarised $\hat{g}_{inv} \in \{0, 1\}$ version. The gradient of this sign function is everywhere zero and undefined at zero, therefore we use the straight-through estimator [2] on the backward pass to learn this binary variable. + +# 3.2.3 Elliptical Filter + +A further filter we utilise defines an ellipse parametrised by the center $(h, k)$ , semi-major axis $(a)$ , semi-minor axis $(b)$ and rotation angle $(\theta)$ . The learned scaling factor $s_e$ is maximal at the center of the ellipse (100% point) and decreases linearly until reaching the boundary. Pixels are not adjusted outside the ellipse (0% area). + +Mathematically, a channel-wise heatmap, defined by the elliptical filter, is denoted as: + +$$ +\begin{array}{l} s (x, y) = s _ {e} \min \left(0, 1 - \frac {\left[ (x - h) \cos \theta + (y - k) \sin \theta \right] ^ {2}}{a ^ {2}} \right. \\ \left. + \frac {\left[ (x - h) \sin \theta - (y - k) \cos \theta \right] ^ {2}}{b ^ {2}}\right). \tag {4} \\ \end{array} +$$ + +An example elliptical filter parametrisation and heatmap is illustrated in Fig. 4b. Elliptical filters are often used to enhance, accentuate objects or specific regions of interest within photographs e.g. human faces. + +# 3.2.4 Polynomial Filter + +Our third considered filter type constitutes a polynomial filter capable of providing fine-grained, regularised adjustments over the entire image. The polynomial filter emulates a brush tool, providing a broad class of geometric shapes while incorporating spatial smoothness. We consider order- $p$ polynomial filters of the forms $i \cdot (x + y + \gamma)^{p}$ and $(x + y + i + \gamma)^{p}$ , where $i$ is the image channel intensity at pixel location $(x,y)$ , and $\gamma$ is an independent scalar. We empirically find a cubic polynomial $(p = 3)$ to offer both expressive image adjustments yet only a limited set of parameters. We explore two variants of the cubic filter, cubic-10 and cubic-20. + +Our smaller cubic filter (cubic-10) constitutes a set of 10 parameters to predict; $\{A, B, C, \ldots, J\}$ , defining a cubic function $f$ that maps intensity $i$ to a new adjusted intensity $i'$ : + +$$ +\begin{array}{l} i ^ {\prime} (x, y) = f (x, y, i) \\ = i * \left(A x ^ {3} + B x ^ {2} y + C x ^ {2} + D + \right. \\ + D x y ^ {2} + E x y + F x + G y ^ {3} + H y ^ {2} \tag {5} \\ + I y + J) \\ \end{array} +$$ + +Considering twice as many learnable parameters, the cubic-20 filter explores higher order intensity terms, and consists of a set of 20 parameters $\{A,B,C,\dots ,T\}$ .. + +$$ +\begin{array}{l} i ^ {\prime} (x, y) = f (x, y, i) \\ = A x ^ {3} + B x ^ {2} y + C x ^ {2} i + D x ^ {2} + E x y ^ {2} \\ + F x y i + G x y + H x i ^ {2} + I x i + J x \tag {6} \\ + K y ^ {3} + L y ^ {2} i + M y ^ {2} + N y i ^ {2} + O y i \\ + P y + Q i ^ {3} + R i ^ {2} + S i + T \\ \end{array} +$$ + +Our cubic filters consider both spatial and intensity information while constraining the complexity of the learnt mapping to a regularized form. This permits the learning of precise, pixel level enhancement while ensuring that transformations are locally smooth. We estimate an independent + +![](images/8fef74fab640d296bcd2d2003bb77f154ebe323a29a6a0f93bbb339e95c77f15.jpg) +Elliptical (Green Channel) +Figure 5: Model output images and examples of Elliptical, Graduated and Polynomial (cubic-10) image filters learnt by one instance of DeepLPF. Lighter filter heat map colours correspond to larger image adjustment values. Cubic-10 filter is shown without the intensity $(i)$ term. Best viewed in colour. + +![](images/5bebc10f3e9d73ce350b0890d4a36e4787bafc7f52e40af279bebd12929940cf.jpg) + +![](images/9d6d884d6966d0b7e0a40330cd2e6863022e7a5b8a1b40ba46687e12b8c2bacb.jpg) +Graduated (Blue Channel) + +![](images/5868bb4a948128b4217e7fb797d8605eefc5f50dbe788429806a4603cd89b033.jpg) + +![](images/5096231536eeefbfe2cd04ed6abd4e68ee489ef1c0260ac3dac28f2b0e1654ad.jpg) +Cubic (Red Channel) + +![](images/72e6d338132efec4641ed86a99f017af5e9f064cba497ed39cc58005333ad34d.jpg) + +cubic function for each colour channel yielding a total of 30 parameters for the cubic-10 and 60 parameters for the cubic-20 filter respectively. + +# 3.3. Fusing Multiple Filters of the Same Type + +Our graduated and elliptical prediction blocks can each output parameter values for $n$ instances of their respective filter type. Further exploration towards choosing $n$ appropriately is detailed in Section 4.2. In the case $n > 1$ , multiple instances are combined into an adjustment map through element-wise multiplication, + +$$ +s _ {g} (x, y) = \prod_ {i = 1} ^ {n} s _ {g i} (x, y), \quad s _ {e} (x, y) = \prod_ {i = 1} ^ {n} s _ {e i} (x, y) \tag {7} +$$ + +where $s_{gi}(x,y)$ and $s_{ei}(x,y)$ are the adjustment map of the $i^{th}$ instance of the corresponding graduated and elliptical filters respectively. On the contrary, since a single per-channel cubic filter allows intrinsically high flexibility in terms of expressive power, we opt not to fuse multiple cubic filters together. + +# 3.4. DeepLPF Loss Function + +The DeepLPF training loss leverages the CIELab colour space to compute the $L_{1}$ loss on the Lab channels and the MS-SSIM loss on the L channel (Equation 8). By splitting chrominance and luminance information into separate loss terms, our model is able to account for separate focus on both local (MS-SSIM) and global $(L_{1})$ image enhancements during training [22, 31]. Given a set of $N$ image pairs $\{(Y_i,\hat{Y}_i)\}_{i = 1}^N$ , where $Y_{i}$ is the reference image and $\hat{Y}_i$ is the predicted image, we define the DeepLPF training loss function as: + +$$ +\begin{array}{l} \mathcal {L} = \sum_ {i = 1} ^ {N} \left\{\omega_ {\mathrm {l a b}} \right| \left| L a b \left(\hat {Y} _ {i}\right) - L a b \left(Y _ {i}\right) \right| | _ {1} \tag {8} \\ + \omega_ {\mathrm {m s - s s i m}} \mathrm {M S - S S I M} (L (\hat {Y _ {i}}), L (Y _ {i})) \} \\ \end{array} +$$ + +where $Lab(\cdot)$ is a function that returns the CIELab Lab channels corresponding to the RGB channels of the input image and $L(\cdot)$ returns the L channel of the image in + +CIELab colour space. MS-SSIM is the multi-scale structural similarity [26], and $\omega_{\mathrm{lab}}, \omega_{\mathrm{ms - ssim}}$ are hyperparameters weighting the relative influence of the terms in the loss function. + +# 4. Experiments + +# 4.1. Experimental Setup + +Datasets: We evaluate DeepLPF on three challenging benchmarks, derived from two public datasets. Firstly (i) MIT-Adobe-5K-DPE [8]: 5000 images captured using various DSLR cameras. Each captured image is subsequently (independently) retouched by five human artists. In order to make our results reproducible and directly comparable to the state-of-the-art, we consider only the (supervised) subset used by DeepPhotoEnhancer (DPE) [8] and additionally follow their dataset pre-processing procedure. The image retouching of Artist C is used to define image enhancement ground truth. The data subset is split into 2250, 500 training and testing image pairs respectively. We randomly sample 500 images from the training set, providing an additional validation set for hyperparameter optimisation. The images are resized to have a long-edge of 500 pixels. (ii) MIT-Adobe-5K-UPE [25]: our second benchmark consists of the same image content as MIT-Adobe-5K-DPE however image pre-processing here differs and instead follows the protocol of DeepUPE [25]. We therefore refrain from image resizing and dataset samples vary in pixel resolution; $6 - 25M$ . We additionally follow the train / test split provided by [25] and our second benchmark therefore consists of 4500 training image pairs, from which we randomly sample 500 to form a validation set. Testing images (500) are identical to those samples selected by DeepUPE and ground truth again consists of the Artist C manually retouched images. (iii) See-in-the-dark (SID) [4]: the dataset consists of 5094 image pairs, captured by a Fuji camera. For each pair the input is a short-exposure image in raw format and the ground truth is a long-exposure RGB image. Images are $24M$ pixel in size and content consists of both indoor and outdoor environments capturing diverse scenes and common objects of varying size. + +Table 2: Model filter type ablation study (upper) and comparisons with state-of-the art methods (lower) using the MIT-Adobe-5K-DPE benchmark. PSNR and SSIM results, reported by competing works, are replicated from [8]. + +
ArchitecturePSNR↑SSIM↑LPIPS↓#Weights
U-Net21.570.8430.6011.3 M
U-Net+Elliptical22.560.879-1.5 M
U-Net+Graduated22.640.888-1.5 M
U-Net+Elliptical+Graduated22.880.886-1.6 M
U-Net+Cubic-1022.690.871-1.5 M
U-Net+Cubic-2023.440.886-1.5 M
U-Net+Cubic-20+Elliptical+Graduated23.930.9030.5821.8 M
DPED [13]21.760.871--
8RESBLK [32, 18]23.420.875--
FCN [7]20.660.849--
CRN [6]22.380.877--
DPE [8]23.800.9000.5873.3 M
+ +Evaluation Metrics: We evaluate quantitatively using PSNR, SSIM and the perceptual LPIPS metric [30]. + +Implementation details: Our experiments all employ a U-Net backbone [21]. The base U-Net architecture, used for MIT-Adobe-5K-DPE experimentation, is detailed in the supplementary material. The U-Net architectures used for the other benchmarks are similar yet have a reduced number of convolutional filters (MIT-Adobe-5K-UPE) or include pixel shuffling functionality [17] to account for RAW input (SID). All experiments use the Adam Optimizer with a learning rate of $10^{-4}$ . Our architecture makes use of three graduated (elliptical) filters per channel and we search for loss function (Eq. 8) hyperparameters empirically resulting in: $\omega_{lab} = \{1,1,1\}$ and $\omega_{ms - ssim} = \{10^{-3},10,10^{-3}\}$ for all MIT-Adobe-5K-DPE, MIT-Adobe-5K-UPE and SID experiments, respectively. + +# 4.2. Experimental Results + +Ablation study: We firstly conduct experiments to understand the different contributions and credit assignment for our method filter components, using the MIT-Adobe-5K-DPE data. Table 2 (upper) shows ablative results for our considered image filter components. For each configuration, we report PSNR metrics and verify experimentally the importance of integrating each component and their superior combined performance. + +Individual filters are shown to bring boosts in performance $c.f.$ the U-Net backbone alone. The polynomial (cubic) filter has a greater impact than elliptical and graduated filters. We hypothesise that this can be attributed to the spatially large yet non-linear effects enabled by this filter type. Combining all filter blocks incorporates the benefits of each and demonstrates strongest performance. We highlight that only $\sim \frac{1}{4}$ of model parameters (i.e. around $452k$ ) in the full architecture are attributed to filter blocks. The remaining capacity is dedicated to the U-Net backbone, il + +![](images/40d2b2a9befaecf47b37f37d95625416a542816afc218baf0e16f7f8a8ed985c.jpg) +(a) + +![](images/c0d309ad50a54d103d8d25defcb49c952c4f4ad517ce1d7dfdec3278e0bc33ba.jpg) +(b) +Figure 6: Experimental study evaluating the effect of the number of graduated and elliptical filters used (MIT-Adobe-5K-DPE dataset). + +lustrating that the majority of performance gain is a result of designing models capable of frugally emulating manual image enhancement tools. + +We further investigate the influence of graduated and elliptical filter quantity on model performance in Figure 6. We find a general upward trend in PSNR, SSIM metrics as the number of filters per channel are increased. This upward trend can be attributed to the increased modelling capacity brought about by the additional filters. We select 3 filters per channel in our experiments which provides a tradeoff between image quality and parameter count. + +Quantitative Comparison: We compare DeepLPF image quality on MIT-Adobe-5K-DPE with contemporary methods (Table 2, lower). Our full architecture is able to outperform recent methods; 8RESBLK [32, 18] and the supervised state-of-the-art (Deep Photo Enhancer (DPE) [8]) on each of the three considered metrics, whilst our method parameter count approaches half that of their model capacity. Our implicitly regularised model formulation of filters allows similar quality enhancement capabilities yet is represented in a simpler form. + +Similarly DeepLPF outperforms DeepUPE [25] on our second benchmark; MIT-Adobe-5K-UPE (i.e. using their dataset splits and pre-processing protocols) when considering PSNR and LPIPS and provides competitive SSIM performance, and improves upon on all other compared works across the PSNR, SSIM metrics (see Table 3). + +Finally we examine performance on the Fuji portion of the challenging SID dataset. Results are presented in Table 4 where it can be observed that DeepLPF is able to improve upon the U-Net method presented in [4] across all three considered metrics. Our method again proves more frugal, with model capacity lower by a factor of nearly four. + +Qualitative Comparison: Sample visual results comparing DeepLPF (trained independently using each of the three datasets) are shown in comparison to DPE [8], DeepUPE [25] and SID (U-Net) [4] models in Figure 7 rows, respectively. The park scene (first row) can be seen to visually improve with regard to reproduction of colour faithful + +![](images/cfe72de19ec6386be9ca3e63c4b2b780fa47964cf105999c735a19641cb8cfad.jpg) +Figure 7: Qualitative comparisons between DeepLPF and various state-of-the-art methods. See text for further details. + +Table 3: Quantitative comparison with state-of-the-art methods on the MIT-Adobe-5K-UPE benchmark. PSNR and SSIM reported by competing works, are replicated from [8]. + +
ArchitecturePSNR↑SSIM↑LPIPS↓# Weights
DeepLPF24.480.8870.103800K
U-Net [21]22.240.850-1.3 M
HDRNet [9]21.960.866--
DPE [8]22.150.850-3.3 M
White-Box [10]18.570.701--
Distort-and-Recover [19]20.970.841--
DeepUPE [25]23.040.8930.1581.0 M
+ +Table 4: Quantitative performance comparisons for the image enhancement task defined by the RAW to RGB image pairs in the SID dataset (Fuji camera) [4]. + +
ArchitecturePSNR↑SSIM↑LPIPS↓#Weights
DeepLPF26.820.7020.5642.0 M
U-Net [4]26.610.6800.5867.8 M
+ +ness in comparison to the DPE result. In the second row DeepUPE has overexposed the scene, whereas DeepLPF maintains both accurate exposure and colour content. The final row compares results on the challenging low-light dataset. The SID model output suffers from a purple colour + +cast whereas the DeepLPF output provides improved colour constancy in comparison to the ground truth. Finally, Figure 5 provides a selection of parametric filters, represented by heatmaps, learned by our model. We provide additional qualitative results in the supplementary material. + +# 5. Conclusion + +In this paper, we have explored automated parameterisation of filters for spatially localised image enhancement. Inspired by professional image editing tools and software, our method estimates a sequence of image edits using graduated, elliptical and polynomial filters whose parameters can be regressed directly from convolutional features provided by a backbone network e.g. U-Net. Our localised filters produce interpretable image adjustments with visually pleasing results and filters constitute plugable and reusable network blocks capable of improving image visual quality. + +In future work we can further explore automatic estimation of the optimal sequence of filter application; e.g. the Gumbel softmax trick [15] may prove useful to select operations from a potentially large bank of image editing tools. We think that combining our presented local filters with additional local or global filter types and segmentation masks, refining enhancements to semantically related pixels, also provide interesting future directions towards interpretable and frugal automated image enhancement. + +# References + +[1] Mathieu Aubry, Sylvain Paris, Samuel W. Hasinoff, Jan Kautz, and Frédo Durand. Fast local laplacian filters: Theory and applications. ACM Trans. Graph., 33(5):167:1-167:14, Sept. 2014. 2, 12, 17, 18 +[2] Yoshua Bengio. Estimating or propagating gradients through stochastic neurons. CoRR, abs/1305.2982, 2013. 5 +[3] Vladimir Bychkovsky, Sylvain Paris, Eric Chan, and Fredo Durand. Learning photographic global tonal adjustment with a database of input/output image pairs. In CVPR, pages 97-104. IEEE, 2011. 1, 2 +[4] Chen Chen, Qifeng Chen, Jia Xu, and Vladlen Koltun. Learning to see in the dark. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3291-3300, 2018. 2, 6, 7, 8, 12, 19 +[5] Jiawen Chen, Andrew Adams, Neal Wadhwa, and Samuel W. Hasinoff. Bilateral guided upsampling. ACM Trans. Graph., 35(6):203:1-203:8, Nov. 2016. 4 +[6] Qifeng Chen and Vladlen Koltun. Photographic image synthesis with cascaded refinement networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 1511-1520, 2017. 7 +[7] Qifeng Chen, Jia Xu, and Vladlen Koltun. Fast image processing with fully-convolutional networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 2497–2506, 2017. 2, 7 +[8] Yu-Sheng Chen, Yu-Ching Wang, Man-Hsin Kao, and Yung-Yu Chuang. Deep photo enhancer: Unpaired learning for image enhancement from photographs with GANs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6306-6314, 2018. 2, 4, 6, 7, 8, 12, 15, 17, 18 +[9] Michael Gharbi, Jiawen Chen, Jonathan T Barron, Samuel W Hasinoff, and Frédo Durand. Deep bilateral learning for real-time image enhancement. ACM Transactions on Graphics (TOG), 36(4):118, 2017. 2, 4, 8 +[10] Yuanming Hu, Hao He, Chenxi Xu, Baoyuan Wang, and Stephen Lin. Exposure: A white-box photo post-processing framework. ACM Transactions on Graphics (TOG), 37(2):26, 2018. 2, 8 +[11] Sung Ju Hwang, Ashish Kapoor, and Sing Bing Kang. Context-based automatic local image enhancement. In European Conference on Computer Vision, pages 569-582. Springer, 2012. 2 +[12] Sung Ju Hwang, Ashish Kapoor, and Sing Bing Kang. Context-based automatic local image enhancement. In Andrew Fitzgibbon, Svetlana Lazebnik, Pietro Perona, Yoichi Sato, and Cordelia Schmid, editors, Computer Vision – ECCV 2012, pages 569–582, Berlin, Heidelberg, 2012. Springer Berlin Heidelberg. 2 +[13] Andrey Ignatov, Nikolay Kobyshev, Radu Timofte, Kenneth Vanhoey, and Luc Van Gool. Dslr-quality photos on mobile devices with deep convolutional networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 3277-3285, 2017. 2, 3, 7, 12, 17, 18 +[14] Andrey Ignatov, Nikolay Kobyshev, Radu Timofte, Kenneth Vanhoey, and Luc Van Gool. Wespe: weakly supervised + +photo enhancer for digital cameras. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 691-700, 2018. 2 +[15] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. In ICLR, 2017. 8 +[16] Kyeongbo Kong, Junggi Lee, Woo-Jin Song, Minsung Kang, Kyung Joon Kwon, and Seong Gyun Kim. Multitask bilateral learning for real-time image enhancement. Journal of the Society for Information Display, 2019. 2 +[17] Christian Ledig, Lucas Theis, Ferenc Huszar, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew P. Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, and Wenzhe Shi. Photo-realistic single image super-resolution using a generative adversarial network. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 105-114, 2017. +[18] Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. In Advances in Neural Information Processing Systems, pages 700-708, 2017. 2, 7 +[19] Jongchan Park, Joon-Young Lee, Donggeun Yoo, and In So Kweon. Distort-and-recover: Color enhancement using deep reinforcement learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5928-5936, 2018. 2, 8 +[20] Stephen M Pizer, R Eugene Johnston, James P Ericksen, Bonnie C Yankaskas, and Keith E Muller. Contrast-limited adaptive histogram equalization: speed and effectiveness. In Proceedings of the First Conference on Visualization in Biomedical Computing, pages 337-345. IEEE, 1990. 2 +[21] O. Ronneberger, P. Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention (MICCAI), volume 9351 of LNCS, pages 234-241. Springer, 2015. (available on arXiv:1505.04597 [cs.CV]). 7, 8, 11, 12, 16, 20 +[22] E. Schwartz, R. Giryes, and A. M. Bronstein. DeepISP: Towards Learning an End-to-End Image Processing Pipeline. IEEE Transactions on Image Processing, 28(2):912–923, 2019. 6 +[23] Yichang Shih, Sylvain Paris, Frédo Durand, and William T. Freeman. Data-driven hallucination of different times of day from a single outdoor photo. ACM Trans. Graph., 32(6):200:1-200:11, Nov. 2013. 4 +[24] J Alex Stark. Adaptive image contrast enhancement using generalizations of histogram equalization. IEEE Transactions on image processing, 9(5):889-896, 2000. 2 +[25] Ruixing Wang, Qing Zhang, Chi-Wing Fu, Xiaoyong Shen, Wei-Shi Zheng, and Jiaya Jia. Underexposed photo enhancement using deep illumination estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6849-6857, 2019. 2, 6, 7, 8, 11, 14 +[26] Z. Wang, E.P. Simoncelli, and A.C. Bovik. Multiscale Structural Similarity for Image Quality Assessment. In The Thirty-Seventh Asilomar Conference on Signals, Systems and Computers, 2003. 6 + +[27] Jianzhou Yan, Stephen Lin, Sing Bing Kang, and Xiaou Tang. A learning-to-rank approach for image color enhancement. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2987-2994, 2014. 2 +[28] Zhicheng Yan, Hao Zhang, Baoyuan Wang, Sylvain Paris, and Yizhou Yu. Automatic photo adjustment using deep neural networks. ACM Transactions on Graphics (TOG), 35(2):11, 2016. 2 +[29] Lu Yuan and Jian Sun. Automatic exposure correction of consumer photographs. In European Conference on Computer Vision, pages 771-785. Springer, 2012. 2 +[30] Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In CVPR, 2018. 7 +[31] Hang Zhao, Orazio Gallo, Iuri Frosio, and Jan Kautz. Loss Functions for Neural Networks for Image Processing. IEEE Transactions on Computational Imaging, 3(1), 2017. 6 +[32] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 2223-2232, 2017. 2, 7 \ No newline at end of file diff --git a/deeplpfdeeplocalparametricfiltersforimageenhancement/images.zip b/deeplpfdeeplocalparametricfiltersforimageenhancement/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..d365dd27446471df97b5d55f650be537290a9694 --- /dev/null +++ b/deeplpfdeeplocalparametricfiltersforimageenhancement/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4aa3a8bad51fe90aeabb3569b2397046e1e62e209ea7b9f7751371e439412fdd +size 563410 diff --git a/deeplpfdeeplocalparametricfiltersforimageenhancement/layout.json b/deeplpfdeeplocalparametricfiltersforimageenhancement/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..648d055495e9eebf6ea79ebe9d5aa69b9fdc91e1 --- /dev/null +++ b/deeplpfdeeplocalparametricfiltersforimageenhancement/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f34e6db60f5bd9eaae2b3c20819f6851b4534bf7d319bf360e9f4a549b594bf8 +size 347276 diff --git a/deepmetriclearningviaadaptivelearnableassessment/acfb99b4-d374-4b4d-a360-f21615b846d3_content_list.json b/deepmetriclearningviaadaptivelearnableassessment/acfb99b4-d374-4b4d-a360-f21615b846d3_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..016ce622b51529a83c506452f0891bbcfd4f1ebf --- /dev/null +++ b/deepmetriclearningviaadaptivelearnableassessment/acfb99b4-d374-4b4d-a360-f21615b846d3_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d54d2cbb05c6c218418bff6c1f13e494ccf6af5aacbc2b563d3ce5df0cf251b +size 82653 diff --git a/deepmetriclearningviaadaptivelearnableassessment/acfb99b4-d374-4b4d-a360-f21615b846d3_model.json b/deepmetriclearningviaadaptivelearnableassessment/acfb99b4-d374-4b4d-a360-f21615b846d3_model.json new file mode 100644 index 0000000000000000000000000000000000000000..be57e0c400182518b5bd09a35b6d4d78d9e59341 --- /dev/null +++ b/deepmetriclearningviaadaptivelearnableassessment/acfb99b4-d374-4b4d-a360-f21615b846d3_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8db2a3f251f01523d9a94d3760bf2de07af9fe14ae7be62bbe61b2203388585e +size 106051 diff --git a/deepmetriclearningviaadaptivelearnableassessment/acfb99b4-d374-4b4d-a360-f21615b846d3_origin.pdf b/deepmetriclearningviaadaptivelearnableassessment/acfb99b4-d374-4b4d-a360-f21615b846d3_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a790bc789d582a36fd21c3451d53387206b09ffb --- /dev/null +++ b/deepmetriclearningviaadaptivelearnableassessment/acfb99b4-d374-4b4d-a360-f21615b846d3_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f493e5c7c55ac4ca78767bce29f6543709f0c410de92c1b96cb827a6e635da8f +size 3588180 diff --git a/deepmetriclearningviaadaptivelearnableassessment/full.md b/deepmetriclearningviaadaptivelearnableassessment/full.md new file mode 100644 index 0000000000000000000000000000000000000000..bc63995aa6fba8db2d856c756b00ee79c92b1586 --- /dev/null +++ b/deepmetriclearningviaadaptivelearnableassessment/full.md @@ -0,0 +1,370 @@ +# Deep Metric Learning via Adaptive Learnable Assessment + +Wenzhao Zheng $^{1,2,3}$ , Jiwen Lu $^{1,2,3,*}$ , Jie Zhou $^{1,2,3,4}$ + +$^{1}$ Department of Automation, Tsinghua University, China + +$^{2}$ State Key Lab of Intelligent Technologies and Systems, China + +3Beijing National Research Center for Information Science and Technology, China + +$^{4}$ Tsinghua Shenzhen International Graduate School, Tsinghua University, China + +zhengwz18@mails.tsinghua.edu.cn;lujiwen@tsinghua.edu.cn;jzhou@tsinghua.edu.cn + +# Abstract + +In this paper, we propose a deep metric learning via adaptive learnable assessment (DML-ALA) method for image retrieval and clustering, which aims to learn a sample assessment strategy to maximize the generalization of the trained metric. Unlike existing deep metric learning methods that usually utilize a fixed sampling strategy like hard negative mining, we propose a sequence-aware learnable assessor which re-weights each training example to train the metric towards good generalization. We formulate the learning of this assessor as a meta-learning problem, where we employ an episode-based training scheme and update the assessor at each iteration to adapt to the current model status. We construct each episode by sampling two subsets of disjoint labels to simulate the procedure of training and testing and use the performance of one-gradient-updated metric on the validation subset as the meta-objective of the assessor. Experimental results on the widely used CUB200-2011, Cars196, and Stanford Online Products datasets demonstrate the effectiveness of the proposed approach. + +# 1. Introduction + +Developing an effective metric to measure similarities of examples is at the core of many computer vision tasks. Generally, the distance of two points can be represented as the Euclidean distance in an embedding space, and deep metric learning utilizes deep neural networks [15, 19, 32, 39] to learn discriminative embeddings of images, so that samples from the same class have similar representations while samples from different classes have dissimilar representations. Recently a variety of deep metric learning methods have been proposed in the literature and demonstrate great power in various tasks, such as person re-identification [3, 31, 45, 57], face recognition [16, 22, 30], image set classifi + +![](images/9c6f33f1cce4341b179ede4d12e923b629a66f3a2a22c2859f473b6c06155942.jpg) + +![](images/62acf53ed1dd004fe15fbe72c450eaeac3958e4ebd771833b2dc9ac1aabb75b4.jpg) +Figure 1. Flow-chart of our DML-ALA and comparisons with conventional deep metric learning (DML) methods. The proposed DML-ALA employs a simultaneously trained assessor to perform sampling instead of a hand-crafted sampling strategy. At each iteration, the training of our model consists of three stages: 1) updating the metric once using the weighted loss on the training subset, 2) training the assessor to maximize the performance of the updated metric on the validation subset, and 3) training the original metric using examples weighted by the trained assessor. Note that we only use the updated mehtric for the training of the assessor and discard it after each iteration. + +cation [23] and image retrieval [20, 27, 36]. + +Losses in metric learning are usually defined over two or more examples with a certain class structure called a "tuple". The number of $m$ -tuples that can be formed from $N$ examples has $O(N^{m})$ complexity, rendering it inefficient to utilize all of them equally even for datasets of modest + +sizes. There have been many studies exploring an efficient sampling strategy [10, 14, 17, 25, 30, 50]. Most existing methods utilize a hand-crafted sampling strategy, which is pre-defined based on some prior knowledge. However, during training the model is being updated constantly, and thus a fixed sampling strategy may not be effective at all stages. For example, the widely used hard mining strategy mines hard tuples that affect training the most, but it also ignores a variety of easy samples that might be helpful at the beginning [56]. This raises a natural question: how to choose the appropriate sampling strategy at different training stages? + +In this work, we provide a positive solution to answer this question. We propose an adaptive learnable assessment (ALA) method which performs sampling adaptively to maximize the generalization ability of the trained metric, where the flow-chart is shown in Figure 1. The conventional hard mining strategy equals re-weighting each tuple by 0 or 1 according to a criterion regarding its hardness. We extend it by adopting a soft weighting scheme that generates weights between 0 and 1. Considering that inputs for the training of the metric are a sequence of tuples, we propose a sequence-aware assessor that is able to incorporate knowledge refined from previous inputs and the current model status. In addition, we argue that the success of existing deep metric learning methods has been impeded by overfitting, as verified in [43]. Inspired by this, we formulate the learning of the proposed assessor as a meta-learning problem with a meta-objective of maximizing the generalization. To achieve this, we employ an episode-based training scheme [42] and construct each episode with two subsets of disjoint labels to simulate the training set and test set partition. The metric trained in this manner works along with the assessor to seek the direction of good generalization. Experimental results on the CUB-200-2011 [44], Cars196 [18], and Stanford Online Products [36] datasets show that the proposed ALA improves the performance of existing methods in both image retrieval and clustering tasks. + +# 2. Related Work + +Deep Metric Learning: The training of a representative deep metric learning method involves two essential components: sampling and updating. There are two trends of recent progress regarding loss function and sampling strategy. The first trend of works designs different losses to consider various information buried beneath training samples [2, 6, 12, 30, 34, 36, 47, 48, 53]. For example, the triplet loss [5, 30, 46] pushes away the distance of a negative pair to be larger than that of a positive pair. Sohn [34] extended the triplet loss to an N-pair loss which pushes away N-1 negatives in an $(\mathbf{N} + 1)$ -tuple all at once. Ustinova et al. [40] presented a histogram loss to punish the overlap between similarity distributions of positive and negative pairs. + +The other trend of works aims at exploring for an ef + +fective sampling strategy to train the metric. The quality of samples used in the metric learning process has a crucial influence not only on the convergence speed of training but more importantly on the performance of the method. A widely used approach is the hard negative mining strategy [10, 14, 17, 30, 54], which essentially under-samples the training set for false positive samples that provide the most information. Hard mining may cause a distribution shift due to the under-sampling [52], motivating some works to consider other sampling frameworks to avoid sampling only the hard ones [7, 8, 10, 24, 25, 37, 50, 51, 55, 56]. For example, Wu et al. [50] proposed to select samples uniformly based on distances. Movshovitz et al. [25] proposed to use proxies to efficiently represent a set of samples, reducing the sampling complexity dramatically. Duan et al. [8] and Zhao et al. [55] trained a generator to synthesize hard samples in an adversarial manner. Zheng et al. [56] utilized linear interpolation to generate hardness-aware synthetics. However, all these methods utilize fixed pre-defined sampling strategies which assume some prior knowledge, and thus cannot flexibly adapt to the current model status. + +Meta-Learning: Recently deep learning [15, 19, 32, 39] has shown great power and enabled machines to outperform humans in various tasks. The main issue hindering further development is the demand for numerous training data and massive computing resources. As an attempt to address this issue, meta-learning [1, 4, 9, 26, 29, 33, 38, 42] aims to learn a higher-level model (meta-learner) to instruct the learning process of the original model (learner) to adapt to new tasks rapidly. For example, Vinyals et al. [42] proposed an episode-based training strategy to simulate the process of one-shot learning, which is used to train a matching network to directly map a few labelled samples and an unlabeled sample to its label. Finn et al. [9] proposed a model-agnostic meta-learning algorithm to learn a set of initial parameters enabling a model to adapt to a new task quickly. + +Inspired by recent works in meta-learning, we design a learnable assessor as the meta-learner and utilize it to train the metric adaptively to maximize the generalization ability. To achieve this, we employ an episode-based training scheme [42], where we construct each episode to simulate the procedure of training and testing. Different from most existing meta-learning methods, we train a meta-learner to perform sampling, which is shown in [50] to have a significant effect in deep metric learning. + +# 3. Proposed Approach + +In this section, we first introduce the basic ideas of deep metric learning and review the conventional hard mining sampling strategy. Then, we present our adaptive learnable assessor considering the sequential information of training examples. Finally, we propose an efficient approach to learn the assessor simultaneously by maximizing the generaliza + +![](images/12b2611a625f5c792d00b33cd760e09a16b3d42c1fa0256e6e0769d68a82988d.jpg) +Figure 2. Illustration of the proposed sequence-aware learnable assessment. For each loss over a tuple, the assessor generates an adaptive weight combining information about this tuple's structure with the knowledge of previous inputs and current model status. To achieve this, a latent state is passed through the assessor over the whole training process, containing information learned from previous experience. + +tion ability of the trained metric. + +# 3.1. Problem Formulation + +Suppose we have a set of samples $\mathbf{X} = [\mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_N]$ and their corresponding class labels $\mathbf{L} = [l_1, l_2, \dots, l_N]$ . The objective of deep metric learning is to learn an embedding function $f(x; \theta)$ which maps a sample from the original space to an n-dimensional embedding (metric) space so that in this space samples from the same class form a cluster far away from the other samples. More concretely, we measure the distance between two examples by computing the Euclidean distance between them in the embedding space: + +$$ +D \left(\mathbf {x} _ {i}, \mathbf {x} _ {j}\right) = d \left(\mathbf {y} _ {i}, \mathbf {y} _ {j}; \theta\right) = \left\| \mathbf {y} _ {i} - \mathbf {y} _ {j} \right\| _ {2}, \tag {1} +$$ + +where $\mathbf{y} = f(\mathbf{x};\theta)$ is the learned embedding of $\mathbf{x}$ . The objective of deep metric learning can be formulated as: + +$$ +\min _ {\theta} \left\{ \begin{array}{l l} d \left(\mathbf {y} _ {i}, \mathbf {y} _ {j}; \theta\right) & , i f l _ {i} = l _ {j} \\ - d \left(\mathbf {y} _ {i}, \mathbf {y} _ {j}; \theta\right) & , i f l _ {i} \neq l _ {j}. \end{array} \right. \tag {2} +$$ + +Deep metric learning methods usually utilize a deep network as the embedding function $f(x; \theta)$ , where $\theta$ represents the parameters of the network. The network is trained towards (2) by minimizing a well-designed loss function: + +$$ +\theta^ {*} = \underset {\theta} {\arg \min } \sum_ {\mathbf {T} \in \boldsymbol {\mathcal {T}}} L (\mathbf {T}; f _ {\theta}), \tag {3} +$$ + +where $\mathbf{T} = \{\mathbf{y}_i\} \in \mathcal{T}$ is a tuple composed of several examples with a certain class structure. + +For example, the conventional triplet loss acts on a tuple of three samples (which is also called a triplet). A triplet $\mathbf{T} = \{\mathbf{y},\mathbf{y}^{+},\mathbf{y}^{-}\}$ is composed of an anchor point $\mathbf{y}$ , a positive point $\mathbf{y}^{+}$ which is from the same class as the anchor, and a negative point $\mathbf{y}^{-}$ which is from a different class. The triplet loss aims at increasing the distance between the anchor and negative to be larger than the distance between the anchor and positive by a fixed margin $m$ : + +$$ +L (\mathbf {T} (\mathbf {y}, \mathbf {y} ^ {+}, \mathbf {y} ^ {-})) = [ d (\mathbf {y}, \mathbf {y} ^ {+}) ^ {2} - d (\mathbf {y}, \mathbf {y} ^ {-}) ^ {2} + m ] _ {+}, \quad (4) +$$ + +where $[\cdot ]_{+} = max(\cdot ,0)$ is the hinge function. + +Given $N$ training samples, the set of triplets $\mathcal{T}$ has the complexity size $O(N^3)$ , making it inefficient to utilize all of them equally. A widely used technique is the hard mining strategy, which mines the hard triplets in a batch and ignores the easy ones since they provide little information for the network. One simple way to obtain a hard triplet $\mathbf{T}_{\text{hard}} = \{\mathbf{y}_h, \mathbf{y}_h^+, \mathbf{y}_h^-\}$ in a batch is to find a negative $\mathbf{y}_h^-$ with the smallest distance from the anchor $\mathbf{y}_h$ : + +$$ +\mathbf {y} _ {h} ^ {-} = \underset {\mathbf {y} _ {h} ^ {-}} {\arg \min } d \left(\mathbf {y} _ {h}, \mathbf {y} _ {h} ^ {-}\right). \tag {5} +$$ + +We see from (4) and (5) that hard triplets lead to substantial loss and thus provide abundant information for training. The training of a network equipped with the hard mining strategy can be represented as: + +$$ +\begin{array}{l} \theta^ {*} = \arg \min _ {\theta} \sum_ {\mathbf {T} \in \mathcal {T} _ {h a r d}} L (\mathbf {T}; f _ {\theta}) \\ = \arg \min _ {\theta} \sum_ {\mathbf {T} \in \mathcal {T}} \Vdash \boldsymbol {\tau} _ {h a r d} (\mathbf {T}) L (\mathbf {T}; f _ {\theta}), \tag {6} \\ \end{array} +$$ + +where $\mathbb{I}\pmb{\tau}_{hard}(\mathbf{T})$ is an indicator function which equals 1 when $\mathbf{T}\in \pmb{\tau}_{hard}$ and 0 otherwise. + +# 3.2. Sequence-Aware Learnable Assessment + +Suppose we randomly sample $N$ tuples sequentially from the training set. We divide this sampled sequence $\mathbf{T}^N\in \mathcal{T}^N$ into batches and use them to train the network by mini-batch gradient descent. The hard mining strategy can be seen as assigning a weight to each sample in the sequence, which equals 1 for hard tuples and 0 otherwise. + +We go beyond the hard mining strategy and define a sample assessment strategy $\mathbf{S} \in \mathcal{S}$ to be a mapping which maps a tuple sequence $\mathbf{T}^N \in \mathcal{T}^N$ to a weight sequence $(w_1, w_2, \dots, w_N) \in \mathcal{R}^N$ where each $w_i \in (0, 1)$ . We de + +![](images/9becfa04788ac690fd80b16aac3ffab45d0c1e1b63fa79928f162cb575db0315.jpg) +Figure 3. The network architecture of the proposed DML-ALA. We add a fully connected layer after a CNN network as the metric. The assessor is composed of an LSTM module and a fully connected layer. The embeddings of a tuple are concatenated and then taken as inputs of the assessor. + +fine the training using assessment strategy S as: + +$$ +\theta^ {*} = \arg \min _ {\theta} \sum_ {i = 1} ^ {N} S _ {i} \left(\mathbf {T} ^ {N}\right) L \left(\mathbf {T} _ {i}; f _ {\theta}\right), \tag {7} +$$ + +where $S_{i}$ denotes the ith output of sample assessment strategy $\mathbf{S}$ and $\mathbf{T}_i$ denotes the ith example in the sequence $\mathbf{T}^N$ . We argue that $\mathcal{S}$ includes a variety of sampling strategies. For example, we can represent the hard mining strategy as $\mathbf{S}^{h}(\mathbf{T}^{N}) = \{\mathbb{I}_{\mathcal{T}_{hard}}(\mathbf{T}_{i})\} \in \mathcal{S}$ . + +Most existing methods utilize hand-crafted sampling strategies, which usually assume some prior knowledge and cannot adapt to the model at different stages. For example, the hard mining strategy may be effective at the beginning, but the number of hard samples decreases as the training proceeds and little supervision can be further provided. Also, the under-sampling of the hard mining strategy may cause a distribution shift, harming the generalization ability. + +To address this problem, we propose a sequence-aware learnable sample assessment strategy, which adaptively generates a weight for each tuple to best benefit training of the metric considering knowledge about the current model status, as shown in Figure 2. In practice, the tuple sequence $\mathbf{T}^N$ is usually generated progressively, so we do not see the whole sequence until the last step. We instead consider a subset of $\mathcal{S}$ and define a learnable assessor $A$ which takes as inputs a tuple $\mathbf{T}$ and a state variable $\mathbf{h}$ , and outputs a real number $w\in (0,1)$ , i.e., $A(\mathbf{T},\mathbf{h};\phi) = w$ , where $\phi$ is the parameters. We also assume that the assessor $A$ determines a state transformation function $\mathbf{H}_A:\mathbf{h}\mapsto \mathbf{H}(\mathbf{h},\mathbf{T};\phi)$ . The assessor $A$ naturally induces a sample assessment strategy: + +$$ +\mathbf {S} ^ {A} \left(\mathbf {T} ^ {N}\right) = \left\{A \left(\mathbf {T} _ {i}, \mathbf {h} _ {i - 1}; \phi_ {i}\right) \right\} \in \boldsymbol {\mathcal {S}}, \tag {8} +$$ + +where $\mathbf{T}_i$ is the $i$ th tuple in the sequence $\mathbf{T}^N$ , $\mathbf{h}_{i-1} = \mathbf{H}(\mathbf{h}_{i-2}, \mathbf{T}_{i-1}; \phi_{i-1})$ is the state variable at step $i-1$ , and $\phi_i$ is the parameters of assessor $A$ at step $i$ . + +The state variable $\mathbf{h}$ encodes information from previous states, making the generated weights aware of the order of $\mathbf{T}^N$ . It passes knowledge about previous input tuples and model status through training, enabling the assessor to interact with the metric. The assessor and the transformation function are also updated throughout training, capable of adapting to different training stages and model status. + +We exploit a long short-term memory (LSTM) [11] network to integrate both the assessor and state transformation function. Having obtained a tuple of embeddings, we first concatenate them into a vector and use it as the input of the LSTM. At each step, the LSTM network takes in this concatenated vector and outputs a vector on the basis of a latent state cell which is simultaneously refined to incorporate knowledge learned from this step. We add a fully connected layer with a sigmoid activation function following the LSTM network to map the output vector to a real number $w \in (0, 1)$ as the assessed weight. The state variable is hidden inside the LSTM module, so in the context of a sequence $\mathbf{T}^N$ , we can omit it from the assessor input for brevity (i.e., $w = A(\mathbf{T}; \phi)$ ). The training using assessor $A$ can be represented as: + +$$ +\theta^ {*} = \arg \min _ {\theta} \sum_ {i = 1} ^ {N} A \left(\mathbf {T} _ {i}; \phi\right) L \left(\mathbf {T} _ {i}; f _ {\theta}\right). \tag {9} +$$ + +The proposed sequence-aware learnable assessor can preserve information from previous training process and exploit it to determine the current strategy. In addition, the assessor interacts with the metric and updates itself to produce adaptive weights that can best benefit the following training process. Figure 3 shows the network architecture of the proposed DML-ALA. + +# 3.3. Adaptive Meta-Training of the Assessor + +With a learnable assessor, we adaptively customize the training of the metric model. However, the learning of such a assessor is not trivial. Directly minimizing (9) with respect to $\phi$ leads to a trivial solution of $A(\mathbf{T};\boldsymbol{\phi}^{*}) = 0, \forall \mathbf{T} \in \mathcal{T}$ . We present an efficient meta-learning based approach to simultaneously learn the assessor in the training process by maximizing the generalization ability of the trained metric, as shown in Figure 1. + +The assessor plays a vital role in the training process. It acts more like an optimizer for the metric, guiding the training direction. Furthermore, the assessor itself is learnable. The learning of the assessor is a learning problem at a higher level, which we formulate as a meta-learning problem. + +The success of existing deep metric learning methods has been impeded by over-fitting. Real images usually vary widely in the aspects of background, illumination, pose, etc. However, intra-class variations are usually discouraged by the general objective of metric learning (2), leading to a metric with poor generalization ability. + +# Algorithm 1: DML-ALA + +Input: Training image set, labels, learning rates $\alpha$ and $\beta$ , episode size $m$ , iteration number $T$ , and iteration number for assessor at each episode $K$ . +Output: Parameters of metric $\theta$ , and parameters of assessor $\phi$ . +1: for iter = 1, 2, ..., T do +2: Construct an episode of m samples and form two sets of tuples $\{\mathbf{T}\}_{tr}$ and $\{\mathbf{T}\}_{va}$ . +3: Perform one gradient update to $\theta$ and obtain $\theta^{\prime}$ following (10). +4: for iter = 1, 2, ..., K do +5: Update assessor parameters $\phi$ following (12). +6: end for +7: Update metric parameters $\theta$ with the updated assessor parameters $\phi^{*}$ following (13). +8: end for +9: return $\theta$ and $\phi$ . + +This issue is hard to tackle by designing a loss function, which would probably be contradictory with (2). Instead, we propose to train an assessor to maximize the generalization ability of learned metric. We achieve this by exploiting the idea of episode-based training [42]. At each training iteration, we construct an episode by sampling two subsets of $M$ and $N$ examples with disjoint labels. We denote them as the training subset and validation subset. We then form two sets of tuples $\{\mathbf{T}\}_{tr}$ and $\{\mathbf{T}\}_{va}$ from the respective subsets. + +We design one episode to simulate the procedure of training and testing. Our goal is to seek a sample assessment strategy to maximize the metric performance on the validation subset, after utilizing it to update the metric on the training subset. At each iteration, we first perform one gradient update to $\theta$ using (9) and obtain the updated parameters $\theta^{\prime}$ : + +$$ +\begin{array}{l} \theta^ {\prime} = \theta - \alpha \nabla_ {\theta} \sum_ {\mathbf {T} \in \{\mathbf {T} \} _ {t r}} A (\mathbf {T}; \phi) L (\mathbf {T}; f _ {\theta}) \\ = \theta - \alpha \sum_ {\mathbf {T} \in \{\mathbf {T} \} _ {t r}} A (\mathbf {T}; \phi) \nabla_ {\theta} L (\mathbf {T}; f _ {\theta}), \tag {10} \\ \end{array} +$$ + +where $\alpha$ is the learning rate of the metric. + +We then evaluate the updated model on the validation subset and employ the validation loss to train the assessor. More concretely, the meta-training objective of the assessor can be represented as: + +$$ +\begin{array}{l} \min _ {\phi} \sum_ {\mathbf {T} ^ {\prime} \in \{\mathbf {T} \} _ {v a}} L \left(\mathbf {T} ^ {\prime}; f _ {\theta^ {\prime}}\right) \tag {11} \\ { = } { \operatorname* { m i n } _ { \phi } \sum _ { \mathbf { T } ^ { \prime } \in \{ \mathbf { T } \} _ { v a } } L \big ( \mathbf { T } ^ { \prime } ; f _ { \theta - \alpha } \sum _ { \mathbf { T } \in \{ \mathbf { T } \} _ { t r } } A ( \mathbf { T } ; \phi ) \nabla _ { \theta } L ( \mathbf { T } ; f _ { \theta } ) \big ) . } \\ \end{array} +$$ + +Note that this loss is computed over the metric with the updated parameters $\theta^{\prime}$ which is differentiable w.r.t. $\phi$ + +Ideally, we want to train the assessor $A$ to minimize (11), but to improve the efficiency we only update it for a fixed times $K$ . For each update: + +$$ +\phi \leftarrow \phi - \beta \nabla_ {\phi} \sum_ {\mathbf {T} ^ {\prime} \in \{\mathbf {T} \} _ {v a}} L \left(\mathbf {T} ^ {\prime}; f _ {\theta^ {\prime}}\right), \tag {12} +$$ + +where $\beta$ is the meta learning rate of assessor $A$ . + +Finally, we update the original metric (i.e., $f_{\theta}$ , not $f_{\theta'}$ ) once using the updated assessor $A_{\phi^*}$ : + +$$ +\theta \leftarrow \theta - \alpha \sum_ {\mathbf {T} \in \{\mathbf {T} \} _ {t r}} A (\mathbf {T}; \phi^ {*}) \nabla_ {\theta} L (\mathbf {T}; f _ {\theta}), \tag {13} +$$ + +and use it as the learned metric parameters at this iteration. + +We only utilize updated model $f_{\theta'}$ to evaluate the generalization ability of the current optimizer (with assessor $A_{\phi}$ ) and discard it after each iteration. The metric is optimized using (13) with the updated assessor $A_{\phi^*}$ , ensuring that the metric is always trained towards good generalization. + +We sample each episode randomly from the training set, so the optimization of the metric and assessor can be performed using stochastic gradient descent (SGD). The metric and assessor are updated alternately at each iteration, but can be seen as being trained simultaneously across iterations throughout the whole process. The metric and assessor are coupled with each other, collaborating to seek a representation with good discrimination and generalization ability. Algorithm 1 details the proposed DML-ALA. + +# 3.4. Implementation Details + +We implemented our method using the TensorFlow package throughout the experiments. For fair comparisons with most deep metric learning methods, we employed the GoogLeNet [39] model pre-trained on ImageNet ILSVRC dataset [28] followed by a randomly initialized fully connected layer. We set the output embedding size of our method to 512. We implemented the assessor with a two-layer LSTM [11] model and a fully connected layer, where there are 64 hidden units in each layer. We normalized all the images to 256 by 256 as inputs. For training, we performed standard random cropping at 227 by 227 and horizontal random mirror for data augmentation. We set the base learning rate to $10^{-4}$ for the CNN, $10^{-3}$ for the last fully connected layer, and $4 \times 10^{-4}$ for the assessor. At each iteration, we constructed an episode with a training subset of 100 samples and a validation subset of 20 samples and updated the assessor for 3 times. We tuned all the hyperparameters via cross-validation on the training set. + +# 4. Experiments + +In this section, we evaluated the proposed framework in both image retrieval and clustering tasks. We conducted + +experiments on three widely used benchmark datasets, including the CUB-200-2011 [44], Cars196 [18], and Stanford Online Products [36] datasets. + +# 4.1. Datasets + +We followed [36] and evaluated our method under the setting where the training set is disjoint from the test set. We split each dataset into training/test set as described below: + +- The CUB-200-2011 dataset [44] is composed of 11,788 images including 200 bird species. We split the images into a training set containing the first 100 species (5,864 images) and a test set containing the rest 100 species (5,924 images). +- The Cars196 dataset [18] is composed of 16,185 images of 196 car makes and models. We split the images into a training set containing the first 98 models (8,054 images) and a test set containing the rest 100 models (8,131 images). +- The Stanford Online Products dataset [36] is composed of 120,053 images of 22,634 online products from eBay.com. We split the images into a training set containing the first 11,318 products (59,551 images) and a test set containing the rest 11,316 products (60,502 images). + +# 4.2. Evaluation Metrics + +Following recent works [8, 35, 36] on deep metric learning, we conducted experiments in image retrieval and clustering tasks. We employed Recall@Ks to evaluate our method in the retrieval task, which computes the percentage of images with at least one correct retrieved example from the K nearest neighbors. We employed NMI and $\mathrm{F_1}$ to evaluate our method in the clustering task. The normalized mutual information (NMI) is defined as the ratio of mutual information and the arithmetic mean of entropy of clusters and the ground truth classes, i.e., $\mathrm{NMI}(\Omega ,\mathbb{C}) = \frac{2I(\Omega;\mathbb{C})}{H(\Omega) + H(\mathbb{C})}$ , where $\Omega = \{\omega_{1},\dots ,\omega_{K}\}$ is a set of clusters and $\mathbb{C} = \{c_1,\dots ,c_K\}$ is a set of ground truth classes. $\omega_{i}$ represents the set of samples assigned to the $i$ th cluster, and $c_{j}$ represents the set of samples belonging to the $j$ th class. $\mathrm{F_1}$ is defined as the harmonic mean of precision and recall, i.e., $\mathrm{F_1} = \frac{2PR}{P + R}$ . + +# 4.3. Results and Analysis + +Effect of Episode Construction: We construct the training and validation subsets to simulate the procedure of training and testing so that we can evaluate the generalization ability of the metric. To study the effect of using disjoint labels, we performed an ablation study where both the original triplet loss and our method used random tuples. + +Table 1. Results using different tuple settings on CUB-200-2011. + +
MethodNMIF1R@1R@2R@4
Triplet (random)48.314.534.747.058.3
ALA (random)56.625.544.458.470.9
Triplet (disjoint)49.815.035.947.759.1
ALA (disjoint)58.726.346.360.172.4
+ +Table 2. Results on the training and test set of CUB-200-2011. + +
MethodNMIF1R@1R@2R@4
Triplet (training)76.553.065.272.579.9
ALA (training)79.356.166.574.381.0
Triplet (testing)49.815.035.947.759.1
ALA (testing)58.726.346.360.172.4
+ +![](images/6691b30937a8318a2843b01e4bb4d64c19fc533d96dae13863ef75772832ba87.jpg) +(a) Variance + +![](images/8fa7653dcb0d2f4e2d78b2d1ae497e0548562e7ed1c19af09615eace7f1989be.jpg) +(b) Mean + +![](images/4dc31a5a9f19c38292b49f77ea5dfdf6aadfd30e7f5f252922118ec4c73d5a11.jpg) +(c) Hardness + +![](images/02804c4c5ff009c134ad2523e2db0e2c087eec3106ed0be9d72037c239cff90d.jpg) +(d) Ratio +Figure 4. Weight analysis of ALA (triplet loss) on CUB-200-2011. + +Table 1 shows that ALA using a random validation subset still boosts the performance of the original method, but with a smaller margin compared to that using disjoint tuples. The reason is that the assessor is less restricted due to joint labels and each episode cannot precisely simulate the training and test set partition. This illustrates that both the adaptive assessment and the use of disjoint subsets contribute to the performance improvement. + +Alleviation of Overfitting: Table 2 shows the training and testing performance of the triplet loss with/without ALA on the CUB-200-2011 dataset. We see that with comparable training performance, our proposed ALA achieves much better results on the test set. This verifies that the proposed ALA can alleviate overfitting to some extent. + +Analysis of Assessed Tuple Weights: We conducted experiments with the triplet loss on the CUB-200-2011 dataset to analyze the assessed tuple weights. Figures 4(a) and 4(b) show the weight variance and mean in each iteration. We observe that in the beginning our ALA treats all the samples almost equally, but learns to assign different weights as training proceeds. This suggests that the sampling strategy mainly influences the latter half of training, when further training of the model requires more challenging tuples. + +Table 3. Comparisons with existing sampling methods on the CUB-200-2011 dataset. + +
MethodNMIF1R@1R@2R@4R@8
Rand-disjoint49.815.035.947.759.170.0
Semi-hard53.417.940.652.364.275.0
Smart mining58.1-45.957.769.679.8
Dis-weighted56.325.444.157.570.180.5
DAML51.317.637.649.361.374.4
DVML55.525.043.756.067.876.9
HDML55.121.943.655.867.778.3
DE-DSP53.719.841.053.264.8-
ALA58.726.346.360.172.482.6
+ +Table 4. Comparisons with existing sampling methods on the Cars196 dataset. + +
MethodNMIF1R@1R@2R@4R@8
Rand-disjoint52.917.945.157.469.779.2
Semi-hard55.722.453.265.474.383.6
Smart mining58.2-56.168.378.085.9
Dis-weighted58.325.459.472.381.687.2
DAML56.522.960.672.582.589.9
DVML61.128.264.373.779.285.1
HDML59.427.261.072.680.788.5
DE-DSP55.022.359.371.381.3-
ALA61.729.667.278.486.692.0
+ +Table 5. Comparisons with existing sampling methods on the Stanford Online Products dataset. + +
MethodNMIF1R@1R@10R@100
Rand-disjoint86.320.253.972.185.7
Semi-hard86.722.157.875.388.1
Dis-weighted87.923.458.977.289.6
DAML87.122.358.175.088.0
DVML89.031.166.582.391.8
HDML87.222.558.575.588.3
DE-DSP87.422.758.275.888.4
ALA89.735.468.683.191.9
+ +To show in one aspect what triplets our ALA assigns larger weights, we define the average weighted hardness (AWH) as $\frac{1}{n}\sum_{i = 1}^{n}w_{i}\frac{d(\mathbf{y}_{i},\mathbf{y}_{i}^{+})}{d(\mathbf{y}_{i},\mathbf{y}_{i}^{-})}$ , where $\frac{d(\mathbf{y}_i,\mathbf{y}_i^+)}{d(\mathbf{y}_i,\mathbf{y}_i^-)}$ is the ratio of distances between the positive and negative pair in each triplet, and $w_{i}$ is the assessed weight. The AWH reflects the average hardness level of weighted tuples. Figure 4(c) shows the AWH of ALA and the original method in each iteration, and figure 4(d) shows the ratio of the two. We can see that the AWH tends to decrease, but ALA assigns larger weights to harder tuples as training proceeds to keep AWH at a high level. This is reasonable since it is beneficial to train the model with samples of increasing hardness levels [14, 56]. + +Comparisons with Existing Sampling Methods: We compared the proposed ALA with existing sampling methods, including random sampling of disjoint tuples, semi-hard negative mining [30], smart mining [14], distance-weighted sampling [50], DAML [8], DVML [21], HDML [56], and DE-DSP [7]. We equipped the widely + +Table 6. Applications to various losses on CUB-200-2011. + +
MethodNMIF1R@1R@2R@4R@8
Lifted56.422.646.959.871.281.5
Clustering59.2-48.261.471.881.9
N-pair60.228.251.964.374.983.2
Angular61.030.253.665.075.383.7
Contrastive47.212.527.236.349.862.1
Cont + ALA50.619.337.346.558.274.0
Triplet49.815.035.947.759.170.0
Triplet + ALA58.726.346.360.172.482.6
Margin58.726.649.662.774.182.9
Margin + ALA66.335.161.673.983.189.7
+ +Table 7. Applications to various losses on Cars196. + +
MethodNMIF1R@1R@2R@4R@8
Lifted57.825.159.970.479.687.0
Clustering59.0-58.170.680.387.8
N-pair62.731.868.978.985.890.9
Angular62.431.871.380.787.091.8
Contrastive42.310.527.638.351.063.9
Cont + ALA43.712.536.348.260.173.2
Triplet52.917.945.157.469.779.2
Triplet + ALA61.729.667.278.486.692.0
Margin59.728.171.579.387.891.6
Margin + ALA68.538.480.587.992.895.9
+ +used triplet loss with these sampling methods and conducted experiments under the same settings (e.g., CNN architecture and batch construction). + +Tables 3, 4, and 5 show the experimental results of different sampling methods, where red numbers represent the best results. We observe that the proposed ALA outperforms existing sampling methods. The reason is that the other methods utilize a fixed strategy, while the proposed ALA can simultaneously learn an adaptive assessor to maximize the generalization ability of the learned metric. In particular, although DAML [8] and HDML [56] can exploit more potential of existing samples by generating synthetic samples as complements, our method still achieves better results. Furthermore, we emphasize that ALA does not conflict with these generative methods, which can be integrated to further boost the performance. + +Applications to Various Losses: We applied the proposed ALA to three losses for direct comparisons, including contrastive loss [13], triplet loss [49], and margin loss [50]. We also compared our method with other four baseline losses, including lifted structure [36], clustering loss [35], N-pair loss [34], and angular loss [47]. + +We conducted all the experiments under the same settings for fair comparisons. In particular, for all baseline methods, we sample tuples of disjoint labels in each iteration as previous works (e.g., [47] for triplet loss). Therefore, our framework takes in batches of the same structure as baseline methods as shown in 1. The only difference is + +![](images/70f879084759230d9baf737859711040116640fdc0b4c102112c7984bcc171fc.jpg) +Figure 5. Barnes-Hut t-SNE visualization [41] of the learned embedding (Margin + ALA) on the CUB-200-2011 dataset. + +Table 8. Applications to various losses on Stanford Online Products. + +
MethodNMIF1R@1R@10R@100
Lifted87.225.362.680.991.2
Clustering89.5-67.083.792.2
N-pair88.128.267.783.893.0
Angular87.826.567.983.292.2
Contrastive82.410.137.553.971.0
Cont + ALA84.312.542.958.574.1
Triplet86.320.253.972.185.7
Triplet + ALA89.735.468.683.191.9
Margin87.326.765.580.790.9
Margin + ALA91.039.377.089.496.1
+ +that ALA further splits each batch into two subsets. Also, we discard the temporary updated metric and only update the original metric once during each iteration. + +Tables 6, 7, and 8 show the quantitative results on the CUB-200-2011, Cars196, and Stanford Online Products datasets respectively. We use red numbers to indicate the best results and bold numbers to represent an improvement over the corresponding original methods. We observe that our proposed ALA can uniformly boost the performance of original methods on all the three datasets. In particular, our framework combined with the margin loss outperforms the other baseline methods and achieves the best results. We see that the performance boost is relatively small on the largesized Stanford Online Products dataset. We think this is because the large amount of training data alleviate the problem of over-fitting, which our method is designed to address. + +For a training iteration, our framework (with the triplet loss) takes an average of 0.65s with one GTX 1080 Ti card, which is approximately twice as much as the original method takes (0.31s). However, we emphasize that our ALA is only used for more effective training and introduces no additional workload to computation during evaluation. + +Qualitative Results: Figure 5 visualizes the embedding of our method (Margin + ALA) using Barnes-Hut t-SNE [41] on the CUB-200-2011 dataset. We represent the label of each image by the color of the border and enlarge several areas for clarity. We see that our method can effectively group semantically similar images, in spite of subtle visual cues and large variations of viewpoints, poses, etc. + +# 5. Conclusion + +In this paper, we have proposed a deep metric learning via adaptive learnable assessment (DML-ALA) method to maximize the generalization ability of the learned metric. By utilizing an episode-based training scheme, we can simulate the procedure of training and testing at one iteration, where we simultaneously train a sequence-aware assessor to instruct the learning process adaptively. Experimental results on three widely used benchmarks have shown that the proposed ALA outperforms existing sampling methods and improves current deep metric learning methods in both image retrieval and clustering tasks. While the proposed sample assessment method is designed for deep metric learning, it can be easily modified to apply to other machine learning approaches where sampling is a vital component. + +# Acknowledgement + +This work was supported in part by the National Key Research and Development Program of China under Grant 2017YFA0700802, in part by the National Natural Science Foundation of China under Grant 61822603, Grant U1813218, Grant U1713214, and Grant 61672306, in part by the Shenzhen Fundamental Research Fund (Subject Arrangement) under Grant JCYJ20170412170602564, and in part by Tsinghua University Initiative Scientific Research Program. + +# References + +[1] Marcin Andrychowicz, Misha Denil, Sergio Gomez, Matthew W Hoffman, David Pfau, Tom Schaul, Brendan Shillingford, and Nando De Freitas. Learning to learn by gradient descent by gradient descent. In NIPS, pages 3981-3989, 2016. +[2] Fatih Cakir, Kun He, Xide Xia, Brian Kulis, and Stan Sclaroff. Deep metric learning to rank. In CVPR, pages 1861-1870, 2019. +[3] Weihua Chen, Xiaotang Chen, Jianguo Zhang, and Kaiqi Huang. Beyond triplet loss: a deep quadruplet network for person re-identification. In CVPR, pages 1320–329, 2017. +[4] Yutian Chen, Matthew W Hoffman, Sergio Gomez Colmenarejo, Misha Denil, Timothy P Lillicrap, Matt Botvinick, and Nando Freitas. Learning to learn without gradient descent by gradient descent. In ICML, pages 748-756, 2017. +[5] De Cheng, Yihong Gong, Sanping Zhou, Jinjun Wang, and Nanning Zheng. Person re-identification by multi-channel parts-based cnn with improved triplet loss function. In CVPR, pages 1335–1344, 2016. +[6] Thanh-Toan Do, Toan Tran, Ian Reid, Vijay Kumar, Tuan Hoang, and Gustavo Carneiro. A theoretically sound upper bound on the triplet loss for improving the efficiency of deep distance metric learning. In CVPR, pages 10404-10413, 2019. +[7] Yueqi Duan, Lei Chen, Jiwen Lu, and Jie Zhou. Deep embedding learning with discriminative sampling policy. In CVPR, pages 4964-4973, 2019. +[8] Yueqi Duan, Wenzhao Zheng, Xudong Lin, Jiwen Lu, and Jie Zhou. Deep adversarial metric learning. In CVPR, pages 2780-2789, 2018. +[9] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In ICML, pages 1126-1135, 2017. +[10] Weifeng Ge, Weilin Huang, Dengke Dong, and Matthew R Scott. Deep metric learning with hierarchical triplet loss. In ECCV, pages 269-285, 2018. +[11] Felix A. Gers, Jürgen Schmidhuber, and Fred A. Cummins. Learning to forget: Continual prediction with LSTM. Neural Computation, 12:2451-2471, 2000. +[12] Soumyadeep Ghosh, Richa Singh, and Mayank Vatsa. On learning density aware embeddings. In CVPR, pages 4884-4892, 2019. +[13] Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In CVPR, pages 1735-1742, 2006. +[14] Ben Harwood, Vijay Kumar B G, Gustavo Carneiro, Ian Reid, and Tom Drummond. Smart mining for deep metric learning. In ICCV, pages 2840-2848, 2017. +[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. +[16] Junlin Hu, Jiwen Lu, and Yap-Peng Tan. Discriminative deep metric learning for face verification in the wild. In CVPR, pages 1875-1882, 2014. +[17] Chen Huang, Chen Change Loy, and Xiaou Tang. Local similarity-aware deep feature embedding. In NIPS, pages 1262-1270, 2016. +[18] Jonathan Krause, Michael Stark, Jia Deng, and Li Fei-Fei. + +3d object representations for fine-grained categorization. In ICCVW, pages 554-561, 2013. +[19] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1097-1105, 2012. +[20] Marc T Law, Raquel Urtasun, and Richard S Zemel. Deep spectral clustering learning. In ICML, pages 1985-1994, 2017. +[21] Xudong Lin, Yueqi Duan, Qiyuan Dong, Jiwen Lu, and Jie Zhou. Deep variational metric learning. In ECCV, pages 689-704, 2018. +[22] Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj, and Le Song. Spherical face: Deep hypersphere embedding for face recognition. In CVPR, pages 6738-6746, 2017. +[23] Jiwen Lu, Gang Wang, Weihong Deng, Pierre Moulin, and Jie Zhou. Multi-manifold deep metric learning for image set classification. In CVPR, pages 1137-1145, 2015. +[24] Jing Lu, Chaofan Xu, Wei Zhang, Ling-Yu Duan, and Tao Mei. Sampling wisely: Deep image embedding by top-k precision optimization. In ICCV, pages 7961-7970, 2019. +[25] Yair Movshovitz-Attias, Alexander Toshev, Thomas K. Leung, Sergey Ioffe, and Saurabh Singh. No fuss distance metric learning using proxies. In ICCV, pages 360–368, 2017. +[26] Tsendsumen Munkhdalai and Hong Yu. Meta networks. In ICML, pages 2554-2563, 2017. +[27] Michael Opitz, Georg Waltner, Horst Possegger, and Horst Bischof. Bier - boosting independent embeddings robustly. In ICCV, pages 5189-5198, 2017. +[28] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. IJCV, 115(3):211-252, 2015. +[29] Adam Santoro, Sergey Bartunov, Matthew Botvinick, Daan Wierstra, and Timothy Lillicrap. Meta-learning with memory-augmented neural networks. In ICML, pages 1842-1850, 2016. +[30] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In CVPR, pages 815-823, 2015. +[31] Hailin Shi, Yang Yang, Xiangyu Zhu, Shengcai Liao, Zhen Lei, Weishi Zheng, and Stan Z Li. Embedding deep metric for person re-identification: A study against large variations. In ECCV, pages 732–748, 2016. +[32] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv, abs/1409.1556, 2014. +[33] Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In NIPS, pages 4077-4087, 2017. +[34] Kihyuk Sohn. Improved deep metric learning with multiclass n-pair loss objective. In NIPS, pages 1857-1865, 2016. +[35] Hyun Oh Song, Stefanie Jegelka, Vivek Rathod, and Kevin Murphy. Deep metric learning via facility location. In CVPR, pages 2206-2214, 2017. +[36] Hyun Oh Song, Yu Xiang, Stefanie Jegelka, and Silvio Savarese. Deep metric learning via lifted structured feature embedding. In CVPR, pages 4004-4012, 2016. +[37] Yumin Suh, Bohyung Han, Wonsik Kim, and Kyoung Mu Lee. Stochastic class-based hard example mining for deep + +metric learning. In CVPR, pages 7251-7259, 2019. +[38] Flood Sung, Yongxin Yang, Li Zhang, Tao Xiang, Philip H.S. Torr, and Timothy M. Hospedales. Learning to compare: Relation network for few-shot learning. In CVPR, 2018. +[39] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott E Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, pages 1-9, 2015. +[40] Evgeniya Ustinova and Victor Lempitsky. Learning deep embeddings with histogram loss. In NIPS, pages 4170-4178, 2016. +[41] Laurens Van Der Maaten. Accelerating t-sne using tree-based algorithms. JMLR, 15(1):3221-3245, 2014. +[42] Oriol Vinyals, Charles Blundell, Tim Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In NIPS, pages 3630-3638, 2016. +[43] Nam Vo and James Hays. Generalization in metric learning: Should the embedding layer be the embedding layer? arXiv, abs/1803.03310, 2018. +[44] Catherine Wah, Steve Branson, Peter Welinder, Pietro Perona, and Serge J Belongie. The Caltech-UCSD Birds-200-2011 dataset. Technical Report CNS-TR-2011-001, California Institute of Technology, 2011. +[45] Faqiang Wang, Wangmeng Zuo, Liang Lin, David Zhang, and Lei Zhang. Joint learning of single-image and cross-image representations for person re-identification. In CVPR, pages 1288–1296, 2016. +[46] Jiang Wang, Yang Song, Thomas Leung, Chuck Rosenberg, Jingbin Wang, James Philbin, Bo Chen, and Ying Wu. Learning fine-grained image similarity with deep ranking. In CVPR, pages 1386-1393, 2014. +[47] Jian Wang, Feng Zhou, Shilei Wen, Xiao Liu, and Yuanqing Lin. Deep metric learning with angular loss. In ICCV, pages 2593-2601, 2017. +[48] Xun Wang, Xintong Han, Weilin Huang, Dengke Dong, and Matthew R Scott. Multi-similarity loss with general pair weighting for deep metric learning. In CVPR, pages 5022-5030, 2019. +[49] Kilian Q Weinberger and Lawrence K Saul. Distance metric learning for large margin nearest neighbor classification. JMLR, 10(2):207-244, 2009. +[50] Chao-Yuan Wu, R Manmatha, Alexander J Smola, and Philipp Krahenbuhl. Sampling matters in deep embedding learning. In ICCV, pages 2859-2867, 2017. +[51] Xinyi Xu, Yanhua Yang, Cheng Deng, and Feng Zheng. Deep asymmetric metric learning via rich relationship mining. In CVPR, pages 4076-4085, 2019. +[52] Baosheng Yu, Tongliang Liu, Mingming Gong, Changxing Ding, and Dacheng Tao. Correcting the triplet selection bias for triplet loss. In ECCV, pages 71-87, 2018. +[53] Baosheng Yu and Dacheng Tao. Deep metric learning with tupleit margin loss. In ICCV, pages 6490-6499, 2019. +[54] Yuhui Yuan, Kuiyuan Yang, and Chao Zhang. Hard-aware deeply cascaded embedding. In ICCV, pages 814-823, 2017. +[55] Yiru Zhao, Zhongming Jin, Guo-jun Qi, Hongtao Lu, and Xian-sheng Hua. An adversarial approach to hard triplet generation. In ECCV, pages 501-517, 2018. +[56] Wenzhao Zheng, Zhaodong Chen, Jiwen Lu, and Jie Zhou. + +Hardness-aware deep metric learning. In CVPR, pages 72-81, 2019. +[57] Jiahuan Zhou, Pei Yu, Wei Tang, and Ying Wu. Efficient online local metric adaptation via negative samples for person re-identification. In ICCV, pages 2420–2428, 2017. \ No newline at end of file diff --git a/deepmetriclearningviaadaptivelearnableassessment/images.zip b/deepmetriclearningviaadaptivelearnableassessment/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..13e3230f0609fd6210beec49c08531299c9082bf --- /dev/null +++ b/deepmetriclearningviaadaptivelearnableassessment/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9616244206fb48ca200cafdf38ff6d2c2a08acb18d6c0cc5b926c765df50cb67 +size 667072 diff --git a/deepmetriclearningviaadaptivelearnableassessment/layout.json b/deepmetriclearningviaadaptivelearnableassessment/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2c04eb637717264e932d0ad12efe00e62d432c9b --- /dev/null +++ b/deepmetriclearningviaadaptivelearnableassessment/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25a0c1fb57fd69304b66b0ec0a409b0d6dd5122f7aebe03fbf27d10ecb1f1b8f +size 455625 diff --git a/deepnonlineofsightreconstruction/41e848c6-765b-4717-ae42-98b3ed3b952f_content_list.json b/deepnonlineofsightreconstruction/41e848c6-765b-4717-ae42-98b3ed3b952f_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ff8433ffe046be91472308ca040d3e24d03381b9 --- /dev/null +++ b/deepnonlineofsightreconstruction/41e848c6-765b-4717-ae42-98b3ed3b952f_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf38bc8c1b7db2e47762b06692fcb9ca97835f874266709331aded3d9fcf34d1 +size 65190 diff --git a/deepnonlineofsightreconstruction/41e848c6-765b-4717-ae42-98b3ed3b952f_model.json b/deepnonlineofsightreconstruction/41e848c6-765b-4717-ae42-98b3ed3b952f_model.json new file mode 100644 index 0000000000000000000000000000000000000000..940832fe6d5a2364aa13f60c4cd9922aad1ad005 --- /dev/null +++ b/deepnonlineofsightreconstruction/41e848c6-765b-4717-ae42-98b3ed3b952f_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7598d4d283bcc9814591de289bbd1795932ef08c863a81d7f148c67cf1e66adb +size 82455 diff --git a/deepnonlineofsightreconstruction/41e848c6-765b-4717-ae42-98b3ed3b952f_origin.pdf b/deepnonlineofsightreconstruction/41e848c6-765b-4717-ae42-98b3ed3b952f_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..10fe35eee62d21243145954baa5a6ec25db5e2fa --- /dev/null +++ b/deepnonlineofsightreconstruction/41e848c6-765b-4717-ae42-98b3ed3b952f_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36d5f58d254fc199a0721df0af8c3c32da1f042105675e2fb4cad498fd80ee56 +size 1883109 diff --git a/deepnonlineofsightreconstruction/full.md b/deepnonlineofsightreconstruction/full.md new file mode 100644 index 0000000000000000000000000000000000000000..d464a56de71d483894b150e96ac8e714c843e7fd --- /dev/null +++ b/deepnonlineofsightreconstruction/full.md @@ -0,0 +1,268 @@ +# Deep Non-Line-Of-Sight Reconstruction + +Javier Grau Chopite* + +Matthias B. Hullin† + +Michael Wand† + +Julian Iseringhausen + +# Abstract + +The recent years have seen a surge of interest in methods for imaging beyond the direct line of sight. The most prominent techniques rely on time-resolved optical impulse responses, obtained by illuminating a diffuse wall with an ultrashort light pulse and observing multi-bounce indirect reflections with an ultrafast time-resolved imager. Reconstruction of geometry from such data, however, is a complex non-linear inverse problem that comes with substantial computational demands. In this paper, we employ convolutional feed-forward networks for solving the reconstruction problem efficiently while maintaining good reconstruction quality. Specifically, we devise a tailored autoencoder architecture, trained end-to-end, that maps transient images directly to a depth-map representation. Training is done using a recent, very efficient transient renderer for three-bounce indirect light transport that enables the quick generation of large amounts of training data for the network. We examine the performance of our method on a variety of synthetic and experimental datasets and its dependency on the choice of training data and augmentation strategies, as well as architectural features. We demonstrate that our feed-forward network, even if trained solely on synthetic data, is able to obtain results competitive with previous model-based optimization methods, while being orders of magnitude faster. + +# 1. Introduction + +Over the last decades, the reconstruction of object shapes by means of time-of-flight measurements has matured to a highly pervasive and impactful technology. While it can already be challenging to image objects that are directly visible, recent years have seen researchers successfully demonstrating the even harder task of reconstructing targets hidden beyond the direct line of sight. In this setting, which we call the non-line-of-sight (NLoS) reconstruction problem, the loss of temporal and directional information caused by multiple bounces across more or less diffuse surfaces means that the problem has to be approached in a drastically different manner. Among the techniques proposed in + +literature for reconstructing object geometry and reflectance from three-bounce indirect measurements are combinatorial approaches [18], parametric model fits using simple, highly efficient forward models [15, 18, 19, 27, 29, 34], backprojection not unlike what is used in computed tomography [20, 35], inverse filtering approaches [12, 28] and spacetime diffraction integrals [23, 24]. For the purpose of this paper, we focus on such active-illumination, time-of-flight input despite the fact that steady-state or even purely passive approaches have also been demonstrated [2, 4, 17, 19]. + +Representation learning methods based on deep neural networks have become a powerful and widely adopted tool for representing complex mappings between high-dimensional (function) spaces of natural signals by learning from examples. In recent work, this includes convolutional regressors for direct time-of-flight imaging [22]. Using scale-space representations with short-cuts across matching scales has turned out to be a particularly successful recipe [31]. Generative convolutional feed-forward networks have also been used for the creation of 3D data, including 2D-to-3D translations [7, 21, 38]. Despite this widespread success, no such approaches have so far been applied to the NLoS reconstruction problem. We assume that this can be attributed to the practical difficulty of generating large amounts of NLoS training data in laboratories or natural scenarios. A key step is therefore the development of a simulator that strikes a good balance between computational cost and physical predictiveness so as to keep the training problem tractable while yielding generalizable results. + +In this paper, we build upon a highly efficient renderer that has already been used to implement a relatively slow analysis-by-synthesis scheme for NLoS reconstruction [15]. Here, we use this renderer as a source for large amounts of training data for the NLoS reconstruction problem. We complement this existing forward model with the following additional contributions which are needed to arrive at a full deep learning solution: + +- We propose an end-to-end regressor that computes depth maps from 3D space-time impulse responses. +- In order to train our network, we propose sampling strategies to generate a wide gamut of representative NLoS datasets. +- We show that our dataset representation allows for parameter-free target extraction. +- We propose a fast approximate model for real-world time-of-flight histogramming setups that turns the rendered, clean datasets into data that is closer to what can + +![](images/c5d355e79fcfee3a4c54314c7960dc01537c454f4c5e5bb26322532a0d558105.jpg) +Figure 1. Non-line-of-sight setting. The target $O$ hidden behind an occluder is probed by pointing a laser source toward a wall. Indirect reflections travel through the hidden scene and are then picked up by a sensing device $D$ . The arrangement depicted here is the coaxial setting introduced by O'Toole et al. [28]. + +be expected from real-world devices. The model, while not as refined and detailed as existing SPAD models [13], can be applied as an augmentation step during training. +- We test the performance of our system on synthetic as well as experimental input data. + +Despite the simplicity of its components, we show that our system, while never trained on any real-world input, can make meaningful predictions on experimental data. This holds even when scenes contain retroreflective objects that violate the assumptions of our (purely diffuse) forward model. To our knowledge, this constitutes the first time that a deep learning approach has been successfully demonstrated for the NLoS reconstruction problem, with the additional benefit of being parameter-free. With prediction times of 20 milliseconds, our method is also among the fastest techniques available. + +# 2. Deep Non-Line-of-Sight Reconstruction + +The purpose of our work is to devise a deep learning approach to the NLoS reconstruction problem. In this section, we introduce the interfaces to input/output data and use them to motivate a suitable architecture. + +# 2.1. Problem Statement + +A typical sensing setup is shown in Fig. 1. A laser source projects a very short pulse of light (often modelled as a Dirac pulse) to a location on a wall, from where it is reflected into the occluded part of the scene and, after interaction with the hidden target, picked up from the wall by a time-resolved detector. We formulate the operation of such a system in terms of the forward model $T$ , which comprises the full image formation including light sources, propagation and detection. The non-line-of-sight reconstruction problem relates to an inverse mapping, where the measurement $I$ is given and the hidden target $O$ is to be estimated: + +$$ +O = T ^ {- 1} (I). \tag {1} +$$ + +![](images/a0c9507b9cf1c47847b016c1d8fb47cf4a08d259a4af78af5015ef794d0e4876.jpg) +Figure 2. Schematic overview of the reconstruction pipeline. Input is provided in the form of a transient data volume. A convolutional neural network maps this data to a 2D depth map. + +This mapping $T^{-1}$ is what we aim to encode in a deep learning approach. + +# 2.2. Input: Transient Image + +Depending on the implementation, a setup as described above could produce data in various forms ranging from a timestamped serial stream of individual photon detection events to histograms that are densely sampled in space $(x,y)$ and time $(t)$ . For the purpose of this work, we assume a fully sampled space-time cube of time-resolved intensity measurements. Such a 3D volume of intensity data $I_{xyt}$ , also called a transient image [33, 35], will therefore serve as the input to our system. + +# 2.3. Output: Predicting Depth Maps + +Another central design decision relates to the representation of scene geometry. Among the candidates are volumetric (e.g., a box filled with scattering densities) and surface representations, with the latter offering a more compact encoding of opaque scenes. Since deep learning of generative models using irregularly structured geometry data is still an open problem [14, 1, 26], we decide to represent the scene as a depth map (a 2D map of range values). This choice of output comes with the sacrifice of not being able to reflect certain types of self-occlusion [11]. Yet, the representation is intuitively understandable and proves reasonably versatile for a wide range of test scenes as shown, for instance, in a recent optimization framework [34]. + +# 2.4. State of the Art in Deep Learning Architectures + +Given these design choices regarding the input and output interfaces, the resulting high-level data flow is illustrated in Fig. 2. Modelling such inverse problems using end-to-end trained convolutional regressors has proven successful for a wide variety of computer vision tasks on dense data. In classical vision problems like image segmentation, a 1-to-1 mapping of an input image to per-pixel object class weights is desired. One possible architecture is an autoencoder which compresses the input to fewer degrees of freedom, then unpacks it to the original format [8]. An approach to learning input-to-output mappings consists in tailoring architectural features of such network and train in a supervised way [36]. Such a neural regressor, as we + +will use in our approach, is naturally limited to the entropy of the input data. If further details should be hallucinated, generative statistical modeling has to be used, for example through variational autoencoders or generative adversarial networks [9, 30]. We do not follow this path, as we seek objective rather than visually pleasing reconstructions. + +Our setting is characterized by a dimensionality mismatch: from a 3-dimensional input (two spatial dimensions plus time of flight), we want to infer a 2-dimensional output (a depth map). While there can be some correlation between spatial dimensions in the input and the output [28], this does not necessarily hold in all sensing geometries. Similar problems have for example been studied in deep network-based reconstruction of 3D images from 2D views, e.g. [7, 8, 21, 32, 38]. Where most prior work tries to infer 3D output from 2D input, our challenge is to go from the 3D transient image to 2D depth map output and hence more closely related to work on SPAD data denoising [22]. While sophisticated translation mechanisms are possible, such as sparse point clouds and differentiable rendering [21], a simple solution is to just use fully connected networks as translators [8]. Our architecture combines convolutional layers with fully connected columns in time with a final decoder for optimal reconstruction quality at reasonable cost. To our knowledge, no prior work has proposed an end-to-end deep NLoS reconstruction pipeline. + +# 2.5. An Architecture for NLoS sensing + +Several options are available for retrieving shapes from time-of-flight data (see supplemental material). Given their success in segmentation tasks, we resort to convolutional regressors [31, 6] to build a 3D/2D encoder-decoder network. Our guiding principle consists in extracting spatio-temporal descriptors using 3D convolutions, and subsequently decoding these into 2D features for the further target estimation. In our experiments we found that regressing depth values with convolutional layers provide only coarse estimations of the target. For the direct-line-of-sight setting, authors in [23] successfully used bypass connections that use the intensity image to inform the upsampler network. However, for the NLOS case, intensity images computed from the transient volumes contain very little information about the target due to the presence of the diffuse wall. Our empirical studies showed that dense layers can be a good solution, as they exhibit superior performance (10%) than convolutions at the regression stage. A detailed overview of our deep neural network is shown in Figure 3. We identify three main components within our network, which we motivate as follows: + +3D/2D U-Net. At the entry level of the network, we construct an encoder-decoder network that follows the basic design principles of U-Net [31, 6]. On the encoder side, the network contracts the 3D transient image into 2D feature + +vectors, with the temporal dimension fully contracted at the bottleneck. The decoder upsamples 2D maps from the contracted vectors. Skip connections from the encoder to the decoder enhance gradient propagation and scale separation. + +Upsampler network. Once the U-Net has again reached the spatial resolution of the input, we stack an upsampling network that expands incoming maps into higher spatial resolutions. This network employs the same upsampling mechanism as the decoder, namely an up-convolution followed by two 2D convolution + ReLU layers. + +Regressor network. When the upsampler has reached a specified target resolution, we stack a regressor network that computes depth images from incoming feature maps. It consists of a $1 \times 1$ convolution that contracts incoming channels, and two fully-connected layers. + +Throughout the entire pipeline, we use convolutional layers of one channel. We start with convolutions of size $3 \times 3 \times 9$ and gradually diminish the temporal size by 2 during encoding. We chose average pooling over max-pooling at this stage as this showed better validation performance on small batches. Upsampling during decoding is done by keeping channels constant while replicating the activation values to the target resolution, followed by a $2 \times 2$ (up-)convolution. Finally, skip connections are implemented as average pooling layers along the entire time domain followed by concatenations onto the decoder. + +# 3. NLoS Datasets + +Success of a deep learning approach to the NLoS reconstruction problem vitally depends on the availability of large amounts of suitable training data, i.e., pairs of transient images and corresponding depth maps. Collecting such data in the real world can be ruled out, as experimental setups developed so far require considerable amounts of calibration, automation and budget, and setting up thousands of different scenes by hand would be infeasible. We therefore resort to purely synthetic data to train our neural networks. This implies a number of challenges: + +- A gamut of possible hidden targets needs to be defined, sampled and cast to depth maps +- For every scene, a transient image must be synthesized in a way that reflects how real-world light transport as well as the real-world measurement devices behave. +- Design and modeling choices should account for efficient dataset synthesis, as large amounts of data are necessary. + +# 3.1. Generating Deep NLoS Datasets + +We define a NLoS dataset as the collection of pairs $(I^1, O^1), \ldots, (I^N, O^N)$ , where $O^i$ represents the depth map of a hidden target and $I^i$ the corresponding transient image. In the following, we describe our sampling and generation strategies to collect such datasets. + +![](images/0b182ae2d216f551c1a09b002f00aeeb8a5f7991f060170e2d92efd60108bba6.jpg) +Figure 3. Our functional model for the NLoS reconstruction task. Time-of-flight volumes are analyzed by a $3\mathrm{D}\rightarrow 2\mathrm{D}$ encoder-decoder in the first stage. Resulting features are upsampled to a specified target resolution and further decoded into the object's representation, in this case a depth image of the hidden region. + +# 3.1.1 Depth Map Generation + +We collect depth maps from two different sources: + +- Depth maps of 3D objects: given a database of 3D models, we generate a depth scene by placing one or more models inside a bounding volume. Then, we obtain the depth map by orthographic projection. Each model is positioned in the scene with a random affine transformation. +- Samples of measured data: An alternative approach to generating depth scenes consists in directly sampling depth maps from available RGB-D sequences. + +Following either of these options, we generate datasets of target geometries $(O^1,\ldots ,O^N)$ , represented as depth maps with fixed resolution. The depth map is transformed to the bounding volume $[-1,1]^3$ , where $z\leq -1$ represents the background region and $-1 < z\leq 1$ foreground geometry. + +# 3.1.2 Transient rendering + +The next step of our data generation consists in rendering transient images of the targets $O^i$ for a fixed sensor $D$ . Several techniques have been developed in recent years for rendering transient light transport [16, 25, 33, 34, 37]. Due to its accuracy and efficiency, we opt for the technique introduced by Iseringhausen et al. [15], which can be adapted to various capture geometries including the coaxial setting [28]. As the renderer accumulates light contributions per triangle of a meshed object, we triangulate our depth samples and feed them to the renderer, where these are further transformed from their native bounding volume to the bounding region of the hidden target. Prior to rendering, triangles with one or more background vertex, as well as triangles that are excessively stretched in $z$ -direction (which form artificial walls connecting objects at different depths), are pruned out. The reflectance of all surfaces is assumed to + +be diffuse. The resulting transient rendering is stored in the NLoS dataset labeled with its corresponding depth map. + +# 3.2. Sensor Model For NLoS Datasets + +The rendering algorithm discussed above does not encompass all effects that should be covered in the image formation model $T$ . Basic physical principles (photon statistics), as well as the hardware used to implement NLoS measurements in the real world, significantly contribute to the quality of the resulting signal. Since most publicly available real-world datasets have been acquired by single photon avalanche detectors (SPADs), we seek to extend our forward model (1) to include the most important features of this technology. While very advanced and accurate models for SPAD sensors exist [13], they require full knowledge of the relevant parameters of the setup and are expensive to evaluate. Since we are interested in feeding networks with tens of thousands of sensor-augmented samples during training, we opt for a strongly simplified model in favor of efficiency. Given a sample $I(x,y,t)$ generated by our renderer, we approximate the SPAD response as + +$$ +I ^ {\prime} (x, y, t) = \mathcal {P} (c * I (x, y, t) + b), \tag {2} +$$ + +where $c$ is a scale factor that converts unitless intensity values from the renderer to photon counts. We randomly sample $c$ from an interval that is conservatively chosen by hand and contains the correct factor with high confidence. Including this variation in the training data encourages the regressor to become invariant to global changes in intensity. The global bias $b$ accounts for the base level of dark counts expected in transient measurements [13]. To estimate it, we look at the early temporal bins of real-world measurements that precede the response from the scene. Again, we randomly sample this value from an adequately chosen interval to achieve invariance with respect to this global offset. + +![](images/b64a4aebcb5bf5f15a423dc41c241bf5a79dad35843eb083fc2f9269aec0aa1c.jpg) +Figure 4. Comparison of a real pixel vs. our SPAD pixel model. Left: A real pixel measured with a SPAD sensor [28]. Center: A rendered pixel computed by using the forward model [15]. Right: Rendered pixel after applying our SPAD model. + +![](images/a6a124e48a5b4d0781f58c8956fd789009f653acee1e51dbd111fd10c15dbace.jpg) +Figure 5. Examples of depth map datasets used for training each three of our models. + +Finally, the function $\mathcal{P}$ samples a Poisson distribution to reflect photon counting statistics. + +Figure 4 shows how our SPAD model approaches a rendered pixel to an experimental SPAD measurement. Although the model provides a coarse approximation, it captures the overall features of the real sensor while being easy to implement and very fast to compute. This enables its evaluation "on the fly" during training. + +# 3.3. Training strategy + +We implement our system in Keras with TensorFlow backend. To train our network, we backpropagate the mean squared difference of depth maps. We experimented with $L_{1}$ losses, but preliminary runs showed instabilities during training and/or convergence to poor local minima. Weights are initialized as in [10] and optimized using Adam with default settings and a learning rate of 0.0001. Trainings were performed on Nvidia GeForce RTX 2080 Ti over a runtime of 3-5 days, and models were regularized by means of early stopping. The long training times and the need for regularization are mostly due to the last stage of the pipeline with the large fully-connected layers, which contain most of the parameters. We opted for the (rather simple) early stopping at minimal validation error rather than drop-out due to better performance in our experiments. + +![](images/2fa2c700b19a138f76081a03576385d8b5cf458a6a6ed9cd64c4288e9885b709.jpg) +Figure 6. Average accuracy and RMS depth error across datasets. Models trained with synthetically generated depth maps (FlatNet and ShapeNet) exhibit better mean accuracy than the model trained on RGB-D data (Redwood), whereas the latter exhibits better at RMSE scores of the true positive pixels. + +![](images/dca2354b36f9ead044dbf632fb4d575863833681d08dac36f361080a31a009c1.jpg) + +# 4. Results and evaluation + +In the following, we evaluate our system on synthetic and real test cases. Input resolution is $32 \times 32 \times 256$ , with 16 ps time bins. For the case of $64 \times 64$ outputs (Sections 4.1-4.5) the average prediction time was $23~\mathrm{ms}$ . + +# 4.1. Training models on synthetic data + +We generate three NLoS datasets following the strategies proposed in Section 3.1.1: FlatNet, which uses strictly flat shapes as source models; ShapeNet, which samples models from the ShapeNetCore database [3]; Redwood, which extracts crops from real-world depth maps in the Redwood database [5]. We render 40,000 depth maps for each of these datasets (see Figure 5). Next, for each depth dataset we render the corresponding transient images. Datasets are partitioned into 36,000 training pairs and 4,000 test pairs. The input transient images are augmented using the SPAD sensor model during runtime. + +To evaluate the prediction performance we consider two important aspects of the reconstruction task. On one hand, we note that an evaluation metric must account for the quality of foreground/background classification. For the remaining studies of this paper, we use the classification accuracy: + +$$ +\text {A c c u r a c y} = \frac {\mathrm {T P} + \mathrm {T N}}{\mathrm {T P} + \mathrm {T N} + \mathrm {F P} + \mathrm {F N}}, \tag {3} +$$ + +combining rates for missing geometry (false negatives/FN), excess (false positives/FP), correct foreground (true positives/TP) and background (true negatives/TN). In addition, we evaluate the depth error for true positives using a root-mean-square error (RMSE) metric. Figure 6 shows the cross-validated errors on the test partitions of each dataset. Note that, in average, the synthetically-trained models, FlatNet and ShapeNet, perform worst in the depth error sense than Redwood (see RMSE), but exhibit in turn superior classification performance (accuracy). Unlike FlatNet + +and ShapeNet (with $71\%$ and $78\%$ background pixels, respectively), Redwood only contains $7\%$ background pixels across the entire database. Such imbalance likely leads to bias and could therefore explain the observed behavior. + +# 4.2. Evaluation on Synthetic Input + +In addition to these large-scale datasets, we manually prepare three synthetic test cases: SynthBunny, SynthMannequin and SynthDiffuseS. Figure 7 shows predictions on these synthetic datasets that have been augmented by a plausible amount of sensor noise and bias. Far-away pixels in depth maps are masked as background ( $z = -1$ ). This feature distinguishes our pipeline from current state-of-the-art methods proposed in [28] or [23], which require an additional threshold and possibly other parameters in order to perform such segmentation. As Figure 8 shows, the model trained on real depth images (Redwood) again tends to overestimate the foreground geometry. When comparing FlatNet with ShapeNet, the former overestimates less geometry for SynthDiffuseS and SynthMannequin than the latter, but it also misses slightly more. When testing on SynthBunny, we observe that ShapeNet captures the overall shape with reasonable RMSE while the FlatNet model misses even basic features of the shape, possibly due to not having been trained on curved shapes. + +# 4.3. Evaluation on Real-World Experimental Input + +Having trained and validated our models on synthetic data, we now test the performance of the ShapeNet model on input measured in the real world. We use data provided by O'Toole et al. [28] and Lindell et al. [23], which we downsample to our standard resolution. As baseline for our comparison, we use the light cone transform (LCT) [28] performed on the original datasets. Figure 9 shows how our network successfully retrieves global features of diffuse targets (DiffuseS and Statue) and, surprisingly, also those of partially specular objects with thin semi-transparent structures (Bike). This even holds for retroreflective targets (Figure 10), although our network was trained on purely diffuse input. The performance of our network on retroreflective and otherwise non-Lambertian input indicates that it is robust to mild deviations from the Lambertian ideal. + +# 4.4. Sensor Model Evaluation + +We now seek to evaluate our SPAD model, i.e., to assess whether simpler augmentations deliver satisfactory performance on synthetic and real cases. To this end, we trained two additional versions of the ShapeNet model that only include Poisson noise or no augmentation at all ("plain"). Figure 11 shows the impact of our sensor model on noise-degraded synthetic samples as well as on real-world input. While all models are able to predict visually recognizable renditions of SynthDiffuseS, they perform poorly for more + +![](images/678d89e6a0c23026ddbcc4c6e9ed32091c41c120c94ffca58300fc997583ab34.jpg) +Figure 7. Qualitative visualization of three synthetic depth maps as reconstructed by our trained models and by LCT [28]. Inputs are contaminated with Poisson noise. In average, our models are able to retrieve the overall target shapes, which are comparable to state-of-the-art methods (LCT). + +complicated geometries SynthBunny and SynthMannequin. Combining Poisson and bias (Eq. 2) clearly brings the greatest benefit. On the real-world dataset DiffuseS [28], the difference turns out even more severe. + +# 4.5. Extrapolating Real-World Challenges + +We evaluate the performance of our pipeline in two adverse scenarios that are of high practical relevance for NLoS reconstruction: low light and low input resolution. + +To assess robustness under low-light conditions (light paths involving three diffuse bounces tend to be extremely lossy), we increase the level of Poisson noise on our three synthetic test cases, and feed them to the ShapeNet-trained model (Figure 12). The predictions are stable even under severe noise degradation. + +Another interesting aspect of any reconstruction scheme is to determine the critical input resolution that is required to recover a given target. We simulate this situation by blockwise averaging of values in the input data. This is not equivalent to training a suitably dimensioned network at native resolution. Yet, it allows us to use models trained in the full resolution to perform predictions on decimated input. We + +![](images/7f87088b0d853b824ba0de1e1985f7692cc6c10388d11b56b25cee521c7f6f50.jpg) +Figure 8. Quantitative assessment of synthetic depth maps from figure 7 in absolute difference values (per pixel) and accuracy. The trained models miss less geometry (red regions inside contour) than LCT, as evidenced in the SynthBunny and SynthMannequin cases, but also tend to overestimate more geometry (red regions outside contour). Although absolute difference values are better in LCT, our models still perform within acceptable margins. + +independently decimated the spatial and temporal dimensions by factors of 2, 4 and 8. Figure 13 shows the behavior for a synthetic and a real test case. We note that one level of spatial reduction (factor $2 \times 2$ ) leads to acceptable results, whereas even a fourfold reduction of the temporal resolution yields virtually indistinguishable results for both the synthetic and the real test case. In the supplementary document, we perform a similar series for LCT reconstruction. + +# 4.6. Higher-Resolution Reconstructions + +We also explored the question of whether we can train models for higher resolution targets with the proposed pipeline. Like in the previous case, we stack layers until the output size is matched (two, for the case $128 \times 128$ ). As fully-connected layers grow quickly with the output size, using multiple fully-connected regressor layers becomes increasingly expensive. This constitutes an inherent limitation of our architecture. For the specific case of $128 \times 128$ outputs, we can still use one fully-connected layer, which re + +![](images/90a2fb83e6a1c72f48007677056e1a39ea4404a7e2fe62afff989348172cd4dc.jpg) +Figure 9. Predictions on three different scenes captured by [28] and [23] using ShapeNet and LCT. Our method allows for depth map segmentation without ambiguity. On the other hand, although LCT is able to better reconstruct complex targets (see Statue), extracting depth maps from the resulting volumes for the Bike and DiffuseS can be hard. The Bike scene is partially specular and thus deviates from our our diffuse assumption. + +![](images/b5ba6b2a3d889b672c28250b0bf0a7d86ffbe0f506c93d07b78baf8d824852e8.jpg) +Figure 10. Predictions of three retroreflective scenes by O'Toole et al. [28] (top) using ShapeNet (middle row) and LCT (bottom row). Retroreflective targets constitute a failure case of our method. Yet, our model is able to reconstruct the OutdoorS target (left) enough to make it more recognizable than LCT. For the Mannequin case, although far too coarse, the network still captures global features of the general shape. + +tains good quality (see supplementary material). We trained on ShapeNet depth maps of $128 \times 128$ while keeping the input resolution unchanged. Figure 14 shows $128 \times 128$ predictions performed on the real measurements. By quali + +![](images/30c56944159ba45b46af0050f6984648b1b6c3d1359c0dcfd8099d439f100005.jpg) +Figure 11. Adding sensor features to the forward model improves performance on noisy synthetic as well as real-world input. Only the full model with Poisson and bias recovers a recognizable depiction of the DiffuseS target. + +![](images/f880a8827310e89b7fd504be66a8a49e7370ea584545fb2ddd7c4bdad25d12b9.jpg) +Figure 12. Predictions for input data with high amounts of added Poisson noise. The numbers indicate peak signal-to-noise ratio of the input. Note that, even for extreme levels of noise, our network is still able to retrieve relevant features of the targets. + +tatively inspecting these results, we observe that both diffuse and non-diffuse predictions have benefited from these choices. + +# 5. Discussion + +In this study we show that deep learning is a promising approach for non-line-of-sight geometry reconstruction. Thanks to our sensor model, our network generalizes to real-world scenes, even though it is trained on purely synthetic data. We are also able to show that our approach performs well for input data with extreme amounts of shot noise. Thanks to its fast runtime, our approach might prove a competitive option for time-critical applications. In fu + +![](images/5d260953aa06f8af5ca4be31de416105b8b5e0c300bc6a205ae2d5670bb75272.jpg) +Figure 13. ShapeNet predictions on spatially and temporally downsampled data. Shown are a synthetic (top) and a real-world (bottom) example. In both cases, synthetic and real measurement, the trained model is robust to moderate amounts of decimation. + +![](images/6163cc506fdbb3d2cf27e7085b900f23774b9cc1059866ef3737666bf0ecd0f4.jpg) +Figure 14. Multiple ShapeNet $128 \times 128$ predictions on real measurements. Top: Diffuse targets (DiffuseS and Statue) and partially specular (Bike). Bottom: Retroreflective targets. + +ture work, we would like to extend our scene representation to three dimensions in order to be able to account for selfocclusion in the scene. Furthermore, it would be interesting to investigate on how to combine multiple measurements using a deep neural network. + +Acknowledgements. This work was funded by the European Research Council (ERC Starting Grant "ECHO") and by the German Research Foundation (HU-2273/2-1). + +# References + +[1] Panos Achlioptas, Olga Diamanti, Ioannis Mitliagkas, and Leonidas Guibas. Learning representations and generative models for 3d point clouds. 2018. 2 +[2] Katherine L Bouman, Vickie Ye, Adam B Yedidia, Frédo Durand, Gregory W Wornell, Antonio Torralba, and William T Freeman. Turning corners into cameras: Principles and methods. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2270-2278, 2017. 1 +[3] Angel X. Chang, Thomas A. Funkhouser, Leonidas J. Guibas, Pat Hanrahan, Qi-Xing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, Jianxiong Xiao, Li Yi, and Fisher Yu. Shapenet: An information-rich 3d model repository. CoRR, abs/1512.03012, 2015. 5 +[4] Wenzheng Chen, Simon Daneau, Fahim Mannan, and Felix Heide. Steady-state non-line-of-sight imaging. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 1 +[5] Sungjoon Choi, Qian-Yi Zhou, Stephen Miller, and Vladlen Koltun. A large dataset of object scans. arXiv:1602.02481, 2016. 5 +[6] Özgün Çiçek, Ahmed Abdulkadir, Soeren S Lienkamp, Thomas Brox, and Olaf Ronneberger. 3d u-net: learning dense volumetric segmentation from sparse annotation. In International conference on medical image computing and computer-assisted intervention, pages 424-432. Springer, 2016. 3 +[7] A. Dosovitskiy, J. T. Springenberg, M. Tatarchenko, and T. Brox. Learning to generate chairs, tables and cars with convolutional networks. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39(4):692-705, April 2017. 1, 3 +[8] Rohit Girdhar, David F Fouhey, Mikel Rodriguez, and Abhinav Gupta. Learning a predictable and generative vector representation for objects. In European Conference on Computer Vision, pages 484-499. Springer, 2016. 2, 3 +[9] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014. 3 +[10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In The IEEE International Conference on Computer Vision (ICCV), December 2015. 5 +[11] Felix Heide, Matthew O'Toole, Kai Zang, David B. Lindell, Steven Diamond, and Gordon Wetzstein. Non-line-of-sight imaging with partial occluders and surface normals. ACM Trans. Graph., 2019. 2 +[12] Felix Heide, Lei Xiao, Wolfgang Heidrich, and Matthias B. Hullin. Diffuse mirrors: 3D reconstruction from diffuse indirect illumination using inexpensive time-of-flight sensors. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2014. 1 +[13] Quercus Hernandez, Diego Gutierrez, and Adrian Jarabo. A computational model of a single-photon avalanche + +diode sensor for transient imaging. arXiv preprint arXiv:1703.02635, 2017. 2, 4 +[14] Haibin Huang, Evangelos Kalogerakis, Siddhartha Chaudhuri, Duygu Ceylan, Vladimir G. Kim, and Ersin Yumer. Learning local shape descriptors from part correspondences with multiview convolutional networks. ACM Trans. Graph., 37(1):6:1-6:14, Nov. 2017. 2 +[15] Julian Iseringhausen and Matthias B. Hullin. Non-line-of-sight reconstruction using efficient transient rendering. ACM Trans. Graph. (TOG), 39(1), 2020. 1, 4, 5 +[16] Adrian Jarabo, Julio Marco, Adolfo Muñoz, Raul Buisan, Wojciech Jarosz, and Diego Gutierrez. A framework for transient rendering. ACM Transactions on Graphics (TOG), 33(6):177, 2014. 4 +[17] Ori Katz, Eran Small, and Yaron Silberberg. Looking around corners and through thin turbid layers in real time with scattered incoherent light. Nature Photonics, 6(8):549-553, 2012. 1 +[18] A. Kirmani, T. Hutchison, J. Davis, and R. Raskar. Looking around the corner using transient imaging. In Proc. ICCV, pages 159-166, 2009. 1 +[19] Jonathan Klein, Christoph Peters, Jaime Martin, Martin Laurenzis, and Matthias B. Hullin. Tracking objects outside the line of sight using 2D intensity images. Scientific Reports, 6(32491), 2016. 1 +[20] Martin Laurenzis and Andreas Velten. Nonline-of-sight laser gated viewing of scattered photons. Optical Engineering, 53(2):023102-023102, 2014. 1 +[21] Chen-Hsuan Lin, Chen Kong, and Simon Lucey. Learning efficient point cloud generation for dense 3d object reconstruction. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. 1, 3 +[22] David B. Lindell, Matthew O'Toole, and Gordon Wetzstein. Single-Photon 3D Imaging with Deep Sensor Fusion. ACM Trans. Graph. (SIGGRAPH), (4), 2018. 1, 3 +[23] David B. Lindell, Gordon Wetzstein, and Matthew O'Toole. Wave-based non-line-of-sight imaging using fast f-k migration. ACM Trans. Graph. (SIGGRAPH), 38(4):116, 2019. 1, 3, 6, 7 +[24] Xiaochun Liu, Ibón Guillén, Marco La Manna, Ji Hyun Nam, Syed Azer Reza, Toan Huu Le, Adrian Jarabo, Diego Gutierrez, and Andreas Velten. Non-line-of-sight imaging using phasor-field virtual wave optics. Nature, 572(7771):620-623, 2019. 1 +[25] Julio Marco, Wojciech Jarosz, Diego Gutierrez, and Adrian Jarabo. Transient photon beams. In Spanish Computer Graphics Conference (CEIG). The Eurographics Association, June 2017. 4 +[26] Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3d reconstruction in function space. In Proceedings IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2019. 2 +[27] N. Naik, S. Zhao, A. Velten, R. Raskar, and K. Bala. Single view reflectance capture using multiplexed scattering and time-of-flight imaging. ACM Trans. Graph., 30(6):171, 2011. 1 + +[28] Matthew O'Toole, David B. Lindell, and Gordon Wetzstein. Confocal non-line-of-sight imaging based on the light-cone transform. Nature, 555(25489):338-341, 2018. 1, 2, 3, 4, 5, 6, 7 +[29] Adithya Kumar Pediredla, Mauro Buttafava, Alberto Tosi, Oliver Cossairt, and Ashok Veeraraghavan. Reconstructing rooms using photon echoes: A plane based model and reconstruction algorithm for looking around the corner. In Computational Photography (ICCP), 2017 IEEE International Conference on, pages 1-12. IEEE, 2017. 1 +[30] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. 3 +[31] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. CoRR, abs/1505.04597, 2015. 1, 3 +[32] Vincent Sitzmann, Justus Thies, Felix Heide, Matthias Nießner, Gordon Wetzstein, and Michael Zollhöfer. Deepvoxels: Learning persistent 3d feature embeddings. In Proc. CVPR, 2019. 3 +[33] Adam Smith, James Skorupski, and James Davis. Transient rendering. Technical Report UCSC-SOE-08-26, School of Engineering, University of California, Santa Cruz, 2008. 2, 4 +[34] Chia-Yin Tsai, Aswin C Sankaranarayanan, and Ioannis Gkioulekas. Beyond volumetric albedo-a surface optimization framework for non-line-of-sight imaging. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1545-1555, 2019. 1, 2, 4 +[35] A. Velten, T. Willwacher, O. Gupta, A. Veeraraghavan, M.G. Bawendi, and R. Raskar. Recovering three-dimensional shape around a corner using ultrafast time-of-flight imaging. Nature Communications, 3:745, 2012. 1, 2 +[36] Shih-En Wei, Varun Ramakrishna, Takeo Kanade, and Yaser Sheikh. Convolutional pose machines. CoRR, abs/1602.00134, 2016. 2 +[37] Di Wu, Andreas Velten, Matthew O'Toole, Belen Masia, Amit Agrawal, Qionghai Dai, and Ramesh Raskar. Decomposing global light transport using time of flight imaging. International Journal of Computer Vision, 107(2):123-138, Apr 2014. 4 +[38] Zhirong Wu, Shuran Song, Aditya Khosla, Fisher Yu, Linguang Zhang, Xiaou Tang, and Jianxiong Xiao. 3d shapenets: A deep representation for volumetric shapes. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. 1, 3 \ No newline at end of file diff --git a/deepnonlineofsightreconstruction/images.zip b/deepnonlineofsightreconstruction/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..29d764cbc3289375d418c17dded7fafee0feb34f --- /dev/null +++ b/deepnonlineofsightreconstruction/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b302763cd66c763a51fd8506e97cef43001eb390ae3e1d4a7392d065b3d60be +size 616946 diff --git a/deepnonlineofsightreconstruction/layout.json b/deepnonlineofsightreconstruction/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..9010257027348ccfa4383b094935555939f64393 --- /dev/null +++ b/deepnonlineofsightreconstruction/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba7987bbe9c156b514391c924ee5f5327427097a123a17fb1ec3265d2bf27036 +size 310548 diff --git a/deepopticsforsingleshothighdynamicrangeimaging/65544552-28c4-4698-b167-677bdb679942_content_list.json b/deepopticsforsingleshothighdynamicrangeimaging/65544552-28c4-4698-b167-677bdb679942_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..8a32846cb50042b9b7b367687889e09344a2376f --- /dev/null +++ b/deepopticsforsingleshothighdynamicrangeimaging/65544552-28c4-4698-b167-677bdb679942_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff5c1922e1f2bbb25168d374ed6a74d03e074739782b1bc0d2417cee91eb83f9 +size 92631 diff --git a/deepopticsforsingleshothighdynamicrangeimaging/65544552-28c4-4698-b167-677bdb679942_model.json b/deepopticsforsingleshothighdynamicrangeimaging/65544552-28c4-4698-b167-677bdb679942_model.json new file mode 100644 index 0000000000000000000000000000000000000000..9caca9a367cfa622c0d8c0e820c383b6e2bf5221 --- /dev/null +++ b/deepopticsforsingleshothighdynamicrangeimaging/65544552-28c4-4698-b167-677bdb679942_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24204a955dee17ee8cf50538c8649cbf9cad3694cda1a50c86d5eb7f9de63326 +size 120079 diff --git a/deepopticsforsingleshothighdynamicrangeimaging/65544552-28c4-4698-b167-677bdb679942_origin.pdf b/deepopticsforsingleshothighdynamicrangeimaging/65544552-28c4-4698-b167-677bdb679942_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..23e66019743ce2b9f405ffb4c90eab503c6ae2a5 --- /dev/null +++ b/deepopticsforsingleshothighdynamicrangeimaging/65544552-28c4-4698-b167-677bdb679942_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:639cd0a4472879fe9d285ff8931b27f18bcb5f1bf7babdaed026a00dadf8bdbe +size 3849256 diff --git a/deepopticsforsingleshothighdynamicrangeimaging/full.md b/deepopticsforsingleshothighdynamicrangeimaging/full.md new file mode 100644 index 0000000000000000000000000000000000000000..483b5ad62d742a2141b79bcad9c45d2f309efa16 --- /dev/null +++ b/deepopticsforsingleshothighdynamicrangeimaging/full.md @@ -0,0 +1,461 @@ +# Deep Optics for Single-shot High-dynamic-range Imaging + +Christopher A. Metzler + +Hayato Ikoma + +Yifan Peng + +Gordon Wetzstein + +Stanford University + +{cmetzler, hikoma, evanpeng, gordon.wetzstein}@stanford.edu + +# Abstract + +High-dynamic-range (HDR) imaging is crucial for many applications. Yet, acquiring HDR images with a single shot remains a challenging problem. Whereas modern deep learning approaches are successful at hallucinating plausible HDR content from a single low-dynamic-range (LDR) image, saturated scene details often cannot be faithfully recovered. Inspired by recent deep optical imaging approaches, we interpret this problem as jointly training an optical encoder and electronic decoder where the encoder is parameterized by the point spread function (PSF) of the lens, the bottleneck is the sensor with a limited dynamic range, and the decoder is a convolutional neural network (CNN). The lens surface is then jointly optimized with the CNN in a training phase; we fabricate this optimized optical element and attach it as a hardware add-on to a conventional camera during inference. In extensive simulations and with a physical prototype, we demonstrate that this end-to-end deep optical imaging approach to single-shot HDR imaging outperforms both purely CNN-based approaches and other PSF engineering approaches. + +# 1. Introduction + +High dynamic range (HDR) imaging is one of the most widely used computational photography techniques with a plethora of applications, for example in image-based lighting [15], HDR display [59], and image processing [55, 5]. However, the dynamic range of a camera sensor is fundamentally limited by the full well capacity of its pixels. When the number of generated photoelectrons exceeds the full well capacity, which is typically the case when imaging scenes with a high contrast, intensity information is irreversibly lost due to saturation. Ever shrinking pixel sizes, for example in mobile devices, exacerbate this problem because the full well capacity is proportional to the pixel size. + +Several different strategies have been developed to overcome the limited dynamic range of available sensors. One class of techniques captures multiple low-dynamic-range (LDR) sensor images with fixed [26] or + +![](images/723fa23f0c2aa8cf234ee59bf3de6a6f2266c4fccba8bdcaf143fb811869baca.jpg) + +![](images/9bc9d27de9523576a3dbbf12b392676d96da0ddb4c8f616e2ebe8f2f431f09c9.jpg) + +![](images/a4f98e8e835dc75c1cccaf9d6bd0401ee5bb3ea130121487198be3fca5ce62a5.jpg) +Figure 1: Conventional sensors are limited in their ability to capture high-dynamic-range (HDR) scenes. Details in brighter parts of the image, such as the light bulb, are saturated in a low-dynamic-range (LDR) photograph (top left). Our end-to-end (E2E) approach jointly optimizes a diffractive optical element (top right) and a neural network to enable single-shot HDR imaging. This deep optical imaging system records a single sensor image (bottom left) that contains optically encoded HDR information, which helps the network recover an HDR image (bottom right). + +![](images/642186da107a3dbe73d20a018b0b7303ce4519a7dad9eb085148ef7fc0a25f6d.jpg) + +varying [40, 16, 46] exposure settings. Unfortunately, motion can be problematic when capturing dynamic scenes with this approach. Another class of techniques uses multiple optically aligned sensors [45, 66] to capture these exposures simultaneously, but calibration, cost, and device form factor can be challenging with such special-purpose cameras. Single-shot approaches are an attractive solution, but traditionally required custom exposure patterns to be multiplexed on the sensor [49, 24, 61]. More recently, single-shot HDR imaging approaches were proposed that hallucinate an HDR image from a single saturated LDR image (HDR-CNN, e.g. [18]). While successful in many cases, saturated scenes details often cannot be faithfully recovered via hallucination. + +In this work, rather than hallucinating missing pixel values, we aim to preserve information about the saturated pixel values by encoding information about the brightest pixel values into nearby pixels via an optical filter with an optimized point spread function (PSF). Unlike previous attempts to encode HDR pixel information with an optical filter [58], we turn to machine learning to automatically design both the optical element and the reconstruction algorithm end-to-end, so as to maximize the information passed from the HDR scene to the low-dynamic-range (LDR) measurements. In essence, we construct an autoencoder where the encoding is performed optically and the decoding is performed computationally. Both encoder and decoder are trained in an end-to-end fashion, with the optimized optical element being fabricated and remaining fixed during inference. + +In optimizing the encoder and decoder, our system must solve three challenging inverse problems at once. (1) Mapping a PSF to a manufacturable optical filter is implicitly a phase retrieval problem. (2) Using optically encoded information to fill in saturated regions is an inpainting problem. (3) Removing said optically encoded information from non-saturated regions is a deconvolution problem. Our work is the first to explore and successfully address this unique and challenging combination of inverse problems. + +Using extensive simulations, we demonstrate that deep optics generally achieves better results than alternative single-shot HDR imaging approaches. This is intuitive, because compared with HDR-CNN approaches, our optimized PSF has more degrees of freedom to encode scene information in the sensor image, and compared with other optical encoding techniques, ours uses an optical element that is jointly optimized with the reconstruction algorithm, rather than heuristically chosen. We demonstrate the proposed camera system with a proof-of-concept prototype by fabricating a diffractive optical element that can simply be attached as a hardware add-on to a conventional camera lens. + +Specifically, we make the following contributions + +- We introduce an optical encoder and CNN-based decoder pipeline for single-shot HDR imaging. +- We present a new single-shot "multiplexing" approach to HDR imaging; the learned, grating-like diffractive optical element (DOE) creates shifted and scaled copies of the image which are used to reconstruct the brightest regions of the scene. +- We analyze the proposed system and demonstrate that it outperforms existing single-shot HDR methods. +- We fabricate the optimized diffractive optical element and validate the proposed system experi + +mentally. + +# 2. Related Work + +HDR Imaging aims at overcoming the limited dynamic range of conventional image sensors using computational photography techniques. Many approaches rely on capturing several LDR images with different exposures and fusing them into a single HDR image [40, 16, 46, 26, 25]. Although motion between the LDR images can be a problem, many proposals have been introduced to deal with this problem [36, 20, 22, 30, 32], allowing even HDR video to be recorded from temporally varying exposures [34, 60, 33]. + +Although many of these multi-shot approaches are successful in some scenarios, they can fail for fast motion and they can also be computationally expensive. To mitigate these limitations, multiple sensors can be optically combined to capture these exposures simultaneously [1, 45, 66]. However, this is costly and bulky and the system calibration can be challenging. + +Motivated by these shortcomings, several approaches to single-shot HDR imaging have been proposed. Reverse tone mapping approaches aim at solving an ill-posed problem [6, 47, 56]. Using computational photography approaches, this problem can be made "less ill-posed", for example using spatially varying pixel exposures via neutral density filter arrays or spatially varying ISO settings [49, 70, 24, 61], using an optically coded point spread function (PSF) [58], or using a special modulo camera [73]. Most recently, convolutional neural networks (CNNs) have been employed to hallucinate realistic HDR images from a single LDR image [18, 19, 37]. + +Our work also uses a CNN to recover an HDR image from a single LDR image, but rather than hallucinating it, we use an optimized PSF to encode as much of the HDR image content as possible in the sensor image. While Rouf et al. [58] also used an optical filter to aim for the same goal, theirs was heuristically chosen and is limited in its ability to recover high-quality HDR images. We train a CNN end-to-end with an estimizable optical filter that achieves far superior image quality. We fabricate this optimized lens using grayscale lithography and demonstrate its ability to capture single-shot HDR images with a prototype camera system. + +In concurrent work, Alghamdi et al. [2] explored a CNN-based image reconstruction approach from spatially coded LDR measurements, but they did not use an end-to-end approach to optimizing the optical coding strategy. Their algorithm requires a custom neutral density filter array on the sensors. Also in concurrent work, Martel et al. [43] recently proposed an end-to-end learning strategy for the spatially varying pixel exposures of a programmable "neural" sensor for + +![](images/050d73de1d99c1709a61e9b710df7161aa2db2a7e8ede4f4b6cb69f10501cd90.jpg) +Figure 2: Illustration of the proposed end-to-end optimization framework. HDR images of a training set are convolved with the PSF created by a lens surface profile $\phi$ . These simulated measurements are clipped by a function $f(\cdot)$ to emulate sensor saturation and noise $\pmb{\eta}$ is added. The resulting RGB image $\mathbf{y}$ is processed by a convolutional neural network (CNN) and its output compared with the ground truth HDR image using the loss function $\mathcal{L}$ . In the learning stage, this loss is back-propagated into the CNN parameters and also into the height values $\phi$ of the lens. During inference, a captured LDR image blurred by the optical PSF is fed directly into the pre-trained CNN to reconstruct an HDR image. + +![](images/7d1d3cdd57096ede6d7ab3bba866451069fad4da6dbf0d4e5140a24852b03ad4.jpg) + +# HDR imaging. + +Computational Optics There is a long history of co-designing optics and image processing. In computational photography, research in this topic has focused on various applications such as extended-depth-of-field imaging [17, 14, 13], motion or defocus deblurring [54, 75, 74], depth estimation [38, 39], multispectral imaging [69, 11, 31], light field imaging [51, 68, 44], achromatic imaging [53], gigapixel imaging [12, 7], and lensless imaging [3, 4]. In computational microscopy, similar concepts are known as point spread function (PSF) engineering and have been used for optimizing the capabilities of single-molecule localization microscopy [52, 62]. In all of these examples, some optimality criterion is defined for the PSF, which is then optimized to work well for a particular choice of algorithm. This can be interpreted as co-design, whereas our approach builds on the emerging concept of end-to-end design, where optics and image processing are optimized jointly in an end-to-end fashion. + +Deep Optics The idea of end-to-end optimization of optics and image processing has recently gained much attention. This concept has been demonstrated to provide significant benefits for applications in color imaging and demosaicing [8], extended depth of field and superresolution imaging [64], monocular depth imaging [27, 23, 71, 10], image classification [9], time-of-flight imaging [42, 65], computational microscopy [29, 28, 50, 35], and focusing light through scattering media [67]. To the best of our knowledge, this work is the first to explore deep optics for single-shot HDR imaging. + +# 3. End-to-end HDR Imaging + +A camera maps a scene $\mathbf{x}$ to a two-dimensional sensor image $\mathbf{y}$ as + +$$ +\mathbf {y} = f \left(\mathbf {h} * \mathbf {x} + \boldsymbol {\eta}\right), \tag {1} +$$ + +where $\mathbf{x} \in \mathbb{R}_+^{n_x \times n_y}$ is a discrete image with $n_x \times n_y$ pixels, each containing values that are proportional to the irradiance incident on the sensor. The irradiance + +is scaled such that the non-saturated values map to the range $\mathbf{x}_i\in [0,1]$ . Furthermore, $\pmb{\eta}$ models signal-independent read noise, $\mathbf{h}$ is the optical point spread function (PSF) created by the camera lens, $*$ denotes the 2-D convolution operator, and $f(\cdot)$ is the camera's response function. This image formation model assumes that the PSF is shift-invariant, but the model could be generalized to describe PSFs that vary laterally or with depth. + +We assume that the camera has a linear camera response function, which is typically the case when working with raw sensor data: + +$$ +f \left(\mathbf {x} _ {i}\right) = \left\{ \begin{array}{l l} 0, & \text {i f} \mathbf {x} _ {i} < 0, \\ \mathbf {x} _ {i}, & \text {i f} 0 \leq \mathbf {x} _ {i} \leq 1, \\ 1, & \text {i f} \mathbf {x} _ {i} > 1. \end{array} \right. \tag {2} +$$ + +Nonlinear camera response functions can be calibrated and inverted so as to mimic a linear response function [48]. We ignore the effects of quantization. + +Our goal in this work is to jointly optimize the PSF $\mathbf{h}$ and a reconstruction algorithm $G: \mathbf{y} \mapsto \hat{\mathbf{x}}$ so as to recover $\mathbf{x}$ from $\mathbf{y}$ when $\| \mathbf{x} \|_{\infty} \gg 1$ . To this end, we turn to differentiable optical systems and algorithms, which we describe in the following. + +# 3.1. Modeling the Optical Point Spread Function + +As shown in Figure 1, our optical system is a conventional single lens reflex camera lens with a custom diffractive optical element (DOE) add-on. Similar to a photographic filter, the DOE is mounted directly on the lens. To model the light transport from a scene, through these optical elements, to the sensor, we build on a differentiable Fourier optics model [21], an approach closely related to recent work on end-to-end camera designs [64, 9, 71, 10]. Specifically, our aim is to find the microscopic surface profile $\phi$ of the DOE that creates a PSF $\mathbf{h}$ which is optimally suited for the HDR image reconstruction algorithm. + +Assuming that the scene is at optical infinity, the complex-valued wave field of a point located on the + +![](images/29b727cf0afbfb82490f5458b7354c270ed6e630ee5c23c227d1720bba80a7ea.jpg) +Figure 3: Our training dataset consisted of HDR images scaled such that between 1 and $2\%$ of their pixels' values were saturated and clipped (red). + +optical axis becomes a plane wave immediately before the DOE, i.e. $\mathbf{u}_{in} = \exp (ikz)$ , where $k = \frac{2\pi}{\lambda}$ is the wave number and $\lambda$ is the wavelength. The phase of this wave is affected by the DOE in a spatially varying manner by a complex-valued phase delay $\mathbf{t}_{\phi}$ , which is directly calculated from the surface profile $\phi$ as + +$$ +\mathbf {t} _ {\phi} (u, v, \lambda) = \mathbf {A} _ {\phi} (u, v) \cdot \exp (i k (n (\lambda) - 1) \phi (u, v)). \tag {3} +$$ + +Here, $u, v$ are the lateral coordinates on the DOE surface, $n(\lambda)$ is the wavelength-dependent refractive index of the material that the DOE is made of and $A_{\phi}(u, v)$ is a binary circular mask with diameter $D_{\phi}$ that models the aperture of the DOE as + +$$ +\mathbf {A} _ {\phi} (u, v) = \left\{ \begin{array}{l l} 1, & \text {i f} u ^ {2} + v ^ {2} \leq \left(\frac {D _ {\phi}}{2}\right) ^ {2}, \\ 0, & \text {o t h e r w i s e .} \end{array} \right. \tag {4} +$$ + +The wave field continues to propagate by some distance $d_{\phi}$ to the camera lens with focal length $g$ . This lens induces the following phase delay: + +$$ +\mathbf {t} _ {l} \left(u ^ {\prime}, v ^ {\prime}\right) = \mathbf {A} _ {l} \left(u ^ {\prime}, v ^ {\prime}\right) \cdot \exp \left(- i \frac {k}{2 g} \left(u ^ {\prime 2} + v ^ {\prime 2}\right)\right). \tag {5} +$$ + +Although the physical compound lens contains many optical elements that correct optical aberrations, a simplified thin lens model (Eq. 5) adequately describes the mathematical behavior of the lens. + +Finally, the wave field propagates by a distance $d_{s}$ to the sensor, where its intensity $\mathbf{h} = |\mathbf{u}_{\text {sensor }}|^{2}$ is recorded. Putting all of this together results in + +$$ +\left. \mathbf {h} _ {\phi} (x, y) = \left| P _ {d _ {s}} \left\{\mathbf {t} _ {l} \cdot P _ {d _ {\phi}} \left\{\mathbf {t} _ {\phi} \cdot \exp (i k z) \right\} \right\} \right| ^ {2}, \right. \tag {6} +$$ + +where $P_{d}\{u\}$ models free-space propagation of a wave field $u$ by a distance $d$ . + +# 3.2. CNN-based Image Reconstruction + +To recover $\mathbf{x}$ from $\mathbf{y}$ we use a convolutional neural network based on the well-known U-Net architecture [57]. Specifically, our U-Net uses skip connections and has 5 scales with 4 consecutive downsampling operations (maxpool) and 4 consecutive upsampling operations (transposed convolutions initialized with bilinear filter weights). At each scale of the U-Net, we + +![](images/36fe9e6404e392f16ddf03cef0ebe465aeb53bce189091839852ed885de11ada.jpg) +(a) Star PSF + +![](images/7f7f81fb98e579b173cf4fc3e51e12966b78fac79c9f3eaf790f5f20b2369fd9.jpg) + +![](images/ad88a8cfc8d93fffd758fcf9009905ddf590bc4cc054ef75d5f603e5c45263a4.jpg) +(b) E2E PSF + +![](images/4ae8bce8522c8648c2c4aaccfd32b4d39dfe86ea91a38e1095322e54203493f6.jpg) + +![](images/eea02469ff8a141b38ad355364060c5fa69324f5b0f0945834795e35e5450c71.jpg) +(c) E2E PSF (unconstrained) + +![](images/9bae74fc66429523225891abbf16e560b5d53fc4d5b89f93b65775bf6c07f7af.jpg) + +Figure 4: Simulated sensor images for an example from our evaluation set and point spread functions (PSFs) of several different optical coding approaches: (a) Rouf et al.'s star-shaped PSF [58], (b) our end-to-end optimized PSF with physically realizable constraints, and (c) our end-to-end optimized PSF without constraints. All three color channels of the PSFs are shown separately in the log domain. Whereas the star PSF continuously blurs the image along several radial streaks (a), the deep optics approach creates a PSF with several distinct peaks, which result in image content being copied at chromatically varying distances and at different intensity scales (b). The unconstrained PSF blurs the green color channel while focusing the red and blue channels. + +include one additional convolutional layer; each convolutional layer is followed by a rectified linear unit (ReLU). BatchNorm layers are used after each upsampling layer and after the final convolutional layer. This architecture is inspired by Eilertsen's work [18] but slightly leaner, which resulted in faster convergence of the lens' surface profile. As illustrated in Figure 2, each network layer has 64 feature maps. + +# 3.3. End-to-end Training Details + +We jointly optimize the PSF and the CNN via the end-to-end (E2E) framework illustrated in Figure 2. In particular, using thousands of HDR training images, we simulate (1) passing an HDR image through our optical system, (2) capturing a noisy and saturated LDR image with a sensor, and (3) reconstructing the HDR images with the CNN. We compute the corresponding loss and use Tensorflow's autodifferentiation capabilities to back-propagate the error and update the parameters $\theta$ of the CNN and the DOE height $\phi$ . + +Loss Function Following Kalantari and Ramamoorthi [32], we originally experimented with minimizing the mean-squared-error (MSE) between the tonemapred reconstruction and ground-truth HDR images. While successful in training the CNN, this outlier-sensitive loss function caused the network to focus its efforts on the most overexposed and challenging images in the training data. Using this approach, a typical Dirac delta-type was found as a locally optimal solution for the PSF. + +To encourage the development of more powerful PSFs, we instead minimize the sum, over all the + +batches, of per-batch, $\gamma$ -corrected, $\ell_2$ -loss: + +$$ +\mathcal {L} _ {\text {D a t a}} = \sum_ {\mathrm {B} \subset \text {B a t c h e s}} \left\| \left(\mathbf {x} _ {\mathrm {B}} + \epsilon\right) ^ {\gamma} - \left(\hat {\mathbf {x}} _ {\mathrm {B}} + \epsilon\right) ^ {\gamma} \right\| _ {2}, \tag {7} +$$ + +where $\mathbf{x}_{\mathrm{B}}$ denotes a vector consisting of all the images in batch B, $\hat{\mathbf{x}}_{\mathrm{B}}$ denotes a vector consisting of all the reconstructions of the images in batch B, $\gamma = 1 / 2$ , and $\epsilon$ is a small constant that avoids the non-differentiability around 0. That is, we effectively minimize the root mean-squared-error (RMSE) over batches, as opposed to the typical MSE loss. + +In the context of regression, sums of $\ell_2$ -norms over groups encourage group-sparse solutions [63]. In our context, sums of $\ell_2$ -norms make the network more robust to outliers, i.e. it allows the network to fail for the most challenging reconstructions so long as the $\ell_2$ -norm of the error is small for most batches. + +Incorporating Fabrication Constraints To ensure that the optimized height map can be manufactured, we clip its values to the maximum range during training and add an additional smoothness term on $\phi$ to prevent the resulting surface profile to include many discontinuities. Specifically, we add the loss + +$$ +\mathcal {L} _ {\text {R e g}} = \nu \| \mathbf {D} * \phi \| _ {2} ^ {2}, \tag {8} +$$ + +to the overall loss function, where $\mathbf{D}$ is a Laplacian filter and $\nu = 10^{9}$ is a weighting parameter. + +Datasets Following Eilertsen et al. [18], we use training and validation datasets consisting of 2837 HDR images drawn from a combination of videos and images from a number of sources. We performed data augmentation by cropping, rescaling, and adjusting hue and saturation. The final training set contains just under 60,000 different HDR images with a resolution of $320 \times 320$ pixels. Our test set consists of 223 HDR images, of which 83 are still images and the rest frames drawn from every 10th frame of four separate video sequences (which were not used for training). To generate LDR/HDR image pairs, we simulated capturing LDR frames where we set the exposure such that between 1 and $2\%$ of the pixels were saturated. A histogram of the pixel values in our training data is shown in Figure 3. + +Miscellaneous Training Details We trained the end-to-end model using the Adam optimizer with a minibatch size of 8. We applied an exponential learning rate decay with an initial rate of 0.0001. We trained the network for 100 epochs, which took about 3 days on a Pascal Titan X graphics processing unit. Source code, trained models, and our captured data is available at https://github.com/computational-imaging/DeepOpticsHDR. + +
HDR-VDPPSNR-LPSNR-γ
LDR51.439.838.9
HDR-CNN [18]58.642.142.9
U-Net56.441.842.3
Star PSF+U-Net[58]56.742.142.3
E2E PSF+U-Net60.645.644.3
E2E PSF+U-Net(unconstrained)67.146.840.7
+ +Table 1: Quantitative evaluation for the test set. Several single-shot HDR imaging approaches are compared using a perceptual difference computed by HDR-VDP-2 and peak signal-to-noise ratio (PSNR) computed in the linear domain (L) and in the $\gamma$ -corrected domain. + +# 4. Analysis and Evaluation + +In this section, we evaluate the proposed method in simulation and show comparisons to various other single-shot HDR imaging approaches. + +Figure 4 shows simulated sensor images and PSFs for several options of optically coding the sensor image before reconstruction. The PSF that was optimized with the method proposed in the previous section is shown in (b) and also in Figure 6. This PSF contains several peaks, each creating a shifted and scaled copy of the sensor image superimposed on itself. In this way, the PSF serves to multiplex together different exposures of the image. The copies for individual color channels appear at slightly different location, which leads to visible chromatic aberrations in the sensor image; such chromatic aberrations are inevitable when using a single DOE design. We also optimize a PSF using the proposed optimization method but without parameterizing it by a physically realizable optical element (c). Therefore, the color channels of this PSF are completely independent of one another and individual pixel values can be arbitrary as long as the are in the range [0,1] and sum to 1 for each channel. We also show the star-shaped PSF proposed by Rouf [58]. + +We compare several reconstruction approaches in Figure 5. These include the conventional LDR image, Eilertsen et al.'s CNN applied to this LDR image (HDR-CNN), the proposed smaller U-Net applied to this LDR image, the U-Net applied to an image captured with the star PSF, and our end-to-end deep optics approach with physically realizable constraints. We used a U-net rather than the algorithm from [58] with the Star filter as CNNs dramatically outperform conventional algorithms at deconvolution [72]. For fair comparison, the U-Nets in each example are trained for the respective PSF. We show regions of interest in the insets along with visible differences predicted by HDR-VDP-2 [41]. In all cases, the proposed deep optics approach achieves the best results. + +![](images/010eb291d91d393f428c3ab3560e34438c29d190797ee6f6e5955030ddb4e7f4.jpg) +Reference HDR + +![](images/49cfaf613436577501d04bf67935e17407841c7a1d0fcdfa378623683e8febae.jpg) + +![](images/443491ca444f36122a1764d1778f374c8dc0ce91fbd7ca7173ac97c538db26ed.jpg) +LDR + +![](images/970fe3976ce9a58ddbd406269b8fb1f96b0d4c0c3bbe737e5b6ac901a6b2792c.jpg) +PSNR 46.2, Q 43.5 + +![](images/77ea5fbf90ac804cf6240458d73db114b3cff901b6ba7d7a12db0804acb34725.jpg) +HDR-CNN + +![](images/06df3290c604f2636af9be550cedfeafc2f3e0ac1d2d9fb8057e30c6adc9fc99.jpg) +PSNR 47.9, Q 49.1 + +![](images/c745e92d1300ab8bc7ad421c8e1f52c422f8b1dde7ccd0c94fec253be8aeba44.jpg) +U-Net + +![](images/c88e78fedf2d51ef5c59a77038d5b6c54be17d4b3afde07da62edeebc77f909a.jpg) +PSNR 47.7, Q 43.7 + +![](images/bcfd29c88b7cbcac2164f9bb70c4879fa1540067a94078aaeaa2a9ca9e7b1b1f.jpg) +Star-PSF + U-net + +![](images/074c8985eea846a0c7cbc40d2f64d473eecf7f3c0116c8cad7b87efc917c6cba.jpg) +PSNR 48.0, Q 44.8 + +![](images/7ffd8797df518e097c5526830c138a639f0a053f5c3c9662bc14bfe8cfed1ca1.jpg) +E2E PSF + U-net + +![](images/c41cca0fe8953f0e53dcc6d6e8d56850859a4069cf6bea90fe912f49a5ddc68b.jpg) +PSNR 50.7, Q 53.7 + +![](images/dadad0642ca61e40d01cde48793bc98e81cb2e908e3afef79b58feb2ac3f4dcc.jpg) + +![](images/271554c702dea9945250729001f5717372114eb761be1b7bab09fa7cca43910d.jpg) +Figure 5: Comparison of single-shot HDR imaging approaches. In all examples, images are displayed at -1 stop and regions of interest at -3 stops. In the columns, we show ground truth HDR image, a corresponding LDR image, CNN-based reconstruction applied to the LDR image (HDR-CNN) [18], a slightly simpler U-Net applied to the LDR image, the star PSF [58] with a U-Net reconstruction, and our end-to-end approach (E2E). Color-coded insets show probabilities of perceiving the difference between reconstructions and ground truth HDR images, as computed by the HDR-VDP-2 visible differences predictor. In all cases, the E2E approach qualitatively and quantitatively (evaluated with peak signal-to-noise ratio (PSNR) and HDR-VDP Q value) outperforms other approaches. + +![](images/c679bf2b3c666801900575847ea13d33dfa2c5dacdc165a78c32c4adfd26d128.jpg) + +![](images/6cdf0ba387c97218fefd98c73f080197c0d7b968c6d9a1c72e8f8c6dfdc1665f.jpg) +PSNR 51.5, Q 51.7 + +![](images/b25dbdf56c5099210714b7a5d1b59c590b270d04eefc18c7d8ca50c1295451eb.jpg) + +![](images/c01b1e4f4b410af434b00bd2a99017076095cada184efb9c7f412d9905f47d3e.jpg) + +![](images/539abb5c2120cf2a57756815a464518cfc8e2f5b839f23e66f75e41fb4f2b095.jpg) +PSNR 53.4, Q 57.5 + +![](images/e8f797a4e5915a34d9b192fb1970fa0c941ae7cb72c646fcde1b9fac630b08b9.jpg) + +![](images/d3c0d03759206157854e5ad7b0a613958f3fed9031aa325ab3965f0517c2ba8a.jpg) +PSNR 55.0, Q 61.1 + +![](images/a633de2c765545f1b2e5bbaad42c1fd9f0b08b86830dfd59ce99cbcc2609fe3b.jpg) + +![](images/9fe8bad1f95a38af837567971d075bcc00efc66852065359ae9a39e55a02a2fe.jpg) +PSNR 55.2, Q 62.3 + +![](images/963f9004becb87aef058862dc7a0047d64c21ec9ccf78fa9820a5ff19acfe9f6.jpg) + +![](images/15ba2ec2666406cbbbf4e89fb211f8266efbe306dcebaac8adf90e1101d1b192.jpg) +PSNR 57.7, Q 65.7 + +Finally, we show a quantitative comparison of all these methods in Table 1. Here, we report the average perceptual difference as computed by HDR-VDP-2 as well as peak signal-to-noise ratio (PSNR) over the entire test set in the linear and $\gamma$ -corrected domains. We observed that the end-to-end (E2E) approaches achieve the best image quality. The unconstrained E2E approach is usually better than the physically realizable version because it has more degrees of freedom. However, the PSNR- $\gamma$ of the unconstrained PSF is slightly lower than that of the realizable approach. This is likely due to the fact that the network was trained using an outlier-robust loss, to which it over-fit. Recall, optimizing PSNR directly leads to sub-optimal convergence of the PSF (see Sec. 3.3). + +# 5. Fabrication and Implementation + +Lens Fabrication Once a phase profile is optimized, we fabricate the corresponding diffractive optical element (DOE) using polydimethyl-siloxane (PDMS) through replica molding. Figure 6 shows the optimized height profile (left) along with a 3D rendering of profilometer measurements of the fabricated DOE (center), which has a diameter of $5\mathrm{mm}$ . Qualitatively, the shapes are similar. We also show the simulated (top right) and the captured PSFs (bottom right). These PSFs match well and both create a Dirac peak in the + +center and lower-amplitude satellite peaks at slightly different locations for the three color channels. This PSF is created by the lens surface profile that resembles a grating-like structure. The captured PSF is slightly blurrier than the simulation and there is additional glare, both likely due to slight fabrication errors and interreflections between the lens elements. + +System Integration We mount the fabricated DOE as an add-on to a conventional single lens reflex camera (Canon Rebel T5) equipped with a standard compound lens (Nikon Nikkor $35\mathrm{mm}$ ). The DOE is fixed in a Thorlabs lens tube with rotating optic adjustment (SM1M05), which is coupled to the SLR lens via an optomechanical adapter (Thorlabs SM1A2). Figure 1 (right) shows the DOE and SLR lens. In this setup, the DOE is physically mounted at a slight distance to the compound camera lens. The exact distance between these optical elements is unknown because we model the primary camera lens as having a single refractive surface. While this is the easiest approach, a more detailed optical model of the compound lens may be desirable, although to model it appropriately, proprietary information from the lens manufacturer would have to be known. Moreover, the lack of anti-reflection coatings on the DOE may add interreflections and glare, and likely contributes to a slight mismatch between + +![](images/34601c6b82d26d55b210b1eaf972e4423c1ed344f685f925f4d56dd628970c73.jpg) +Figure 6: Optimized height profile of the diffractive optical element (DOE, left) along with profilometer measurements of the fabricated DOE. The DOE structure partially resembles that of a grating, which creates multiple peaks in the point spread function (PSF, right). Intuitively, this PSF creates three shifted and scaled copies of the input image. Although the measured PSF is slightly blurrier than the simulated PSF, likely due to imperfections in the fabrication process and approximations of our image formation model, their general shapes are comparable. + +simulated and captured PSFs. + +To calibrate our camera system, we capture several different exposures of a white light source behind a $75\mu \mathrm{m}$ -sized pinhole. These photographs are merged into a single HDR image [16]. This captured point spread function of our optical system is used to refine the pre-trained CNN by optimizing its parameters for the fixed captured PSF, as described in Section 3.3. Refining the CNN with a fixed PSF is significantly faster than training the end-to-end system from scratch and only takes a few hours. + +# 6. Experimental Results + +Using the prototype camera described in the previous section, we captured several HDR example scenes (see Fig. 7). These include two scenes recorded in a laboratory setting (top and center row) and one outdoor scene captured at night (bottom row). In Figure 7, captured measurements along with reconstructions computed by our CNN as well as reference LDR and HDR images and the result of the HDR-CNN [18] are shown. The ground truth HDR scene was computed by merging multiple images with different exposures [16]. In all of these examples, the captured LDR images include saturated areas that contain details, which are lost in the measurements, such as the filament of a light bulb (top row) or the structure of a light source on a wall (bottom row). We show these images as well as magnified closeups (right column) at varying exposure values (EVs) to best highlight these details. In should be noted that these are all examples where we expect the HDR-CNN approach to fail, because the network simply has no information about the detail in the saturated parts—the best it can do is + +to inpaint these regions. Inpainting results in smooth regions that exceed the dynamic range of the LDR sensor image but that do not resemble the actual content in these examples. + +# 7. Discussion + +In summary, we propose an end-to-end approach to jointly train an optical encoder, i.e. the point spread function created by a custom optical element, and electronic decoder, i.e. a convolutional neural network, for the application of single-shot high-dynamic-range imaging. As opposed to CNN-based methods that operate directly on conventional LDR images, our deep optics approach has the ability to optically encode details from bright parts of the scene into the LDR measurements. In particular, our method uses a unique multiplexing solution to HDR imaging, which it developed automatically, wherein the PSF superimposes multiple shifted exposures on top of one another. The proposed framework builds on the emerging idea of end-to-end optimization of optics and image processing, but to our knowledge it is the first to explore this general methodology for single-shot HDR imaging. + +Limitations Conceptually, HDR-CNN approaches that operate directly on conventional LDR images solve an inpainting problem. Accordingly, and unlike our deep optics approach, the worst case solution of HDR-CNNs is a conventional LDR image, which is directly recorded and which may not always need additional post-processing to begin with. Our method changes the optical image formation, so post-processing becomes a necessary part of the imaging pipeline. Slight reconstruction artifacts in our experimental results (Figs. 7), which are primarily due to imperfections in the PSF calibration, can be found in both non-saturated and saturated parts of the image due to the need for processing the entire LDR image, rather than just its saturated parts. + +In essence, the inverse problem in our method is more closely related to deconvolution problems than to inpainting problems, although for extremely bright scenes where even the lower intensity copies of the sensor image saturate, inpainting is unavoidable and the additional scene copies in our measurements may actually be harmful. Therefore, careful curation of the training set is crucial, because it needs to include HDR images with values adequately representing those observed during inference. A network is likely going to fail to produce high-quality results for conditions that it has not been trained for. + +Unlike multi-shot approaches, our single-shot HDR imaging technique does not suffer from ghosting artifacts. However, in dark imaging conditions long exposures, which potentially cause motion blur, may be + +![](images/cf93dda6148be86346345de3c574abd24cd6af4867504ba7585f2895a80942e6.jpg) +LDR +0 EV + +![](images/1bb174ee960cbb5cd9f4ef581136b94d7843d378be6ea3c8c83ab2ce8e34b235.jpg) +HDR-CNN +-2 EV + +![](images/011c38ab39f14832d1f52d4263e02fbe3c2e2b00ce1c875a9dfe1f587aa70a7f.jpg) +E2E Measurement +0 EV + +![](images/be08d96035ff602944ed5d9a096d07cea85c7cd58a8d8bfe0457053614ed1235.jpg) +E2E Reconstr. +-2 EV + +![](images/7564a9ff12beb84c911e02912874e7e89535cb41e4e81ec2fab154bcb84d2b49.jpg) +Reference HDR +-2 EV + +![](images/b1596435b4ea6c384dd50cb89e8db092ec0c7874353ac8285b0154fa663aa033.jpg) +-2.3 EV + +![](images/8262b8ac33ce31816d72f4fb6a46fa1d3c074fc4847de97676bd8da4bbb3937e.jpg) + +![](images/7a02a91769b5876346ec6aa445725f37164282af8377f022a7fccdaf20259f33.jpg) +0 EV + +![](images/52183cbb79ae71186c447c1903a746a44f1be2ffd7acd1c5c92e225dfd7f0942.jpg) +-2.3 EV + +![](images/4662ff565ee854b787bcb38650979933ffc36bfe9fb87b85ac33159dd1c3ef90.jpg) +0 EV + +![](images/034f6ce4ae6534a8f66ddcad1aa8abac381e67834b7e45885c9e99fd9f9e9811.jpg) +-2.3 EV + +![](images/93b7df2547c7e095ce2dfeb15f75c481c95a36a6ea4ac2218950eee84c9df302.jpg) +-2.3 EV + +![](images/3b7bc3c4a0bd3ced7b7162f40feb53fb07861262acdbd5743b9681990496553c.jpg) +-3.3 EV + +![](images/328db97c75ef5877257ab9d27a8060106e396d716e470049e2bc7e48d696c93f.jpg) + +![](images/a6d65c76d288afc92dfbd81da600b7dc5bd024be29aead511cb6295b0f6cd91d.jpg) +0 EV +Figure 7: Experimental results of two indoor scenes (top rows) and one outdoor scene at night (bottom row). The limited dynamic range of the sensor loses details in the brighter parts of the captured LDR image (first column) as compared with the reference HDR image (fifth column). A CNN operating directly on the LDR images hallucinates brighter content in these saturated parts, but it is missing the detail (second column). The measurements captured with our prototype camera optically encode this detail in the image by superimposing several scaled and shifted copies of the image on itself (third column). This information is used by our CNN to recover the missing parts of the scene while digitally removing the image copies (fourth column). The closeups, showing E2E measurements, HDR-CNN, E2E Reconstruction, and ground truth HDR, demonstrate that deep optics is more successful in recovering bright detail of HDR scenes than other single-shot HDR imaging approaches (right column). + +![](images/fbe50148fbef70188cecbe40c28082821ad9d25876c42201f3dde59a01fbbc05.jpg) +-1.6 EV + +![](images/f946da2526e9519b67342a6aabb2328c4ec5e1cd83e49dbfb3e4efab185bf730.jpg) +0 EV + +![](images/7fab5a1383dca207637442e1646634b5e143aba4c7af58477574530c452fbc72.jpg) +-1.6 EV + +![](images/b7469d4563e2bbbced440b469f2220d131de4d35af8ccbd54ac4253eac3dbff5.jpg) +-1.6 EV + +![](images/2f186512b95440aecd2f36b2fe5b4bdedeec422ec2526724d0c962e5a60099e0.jpg) +-4.9 EV + +![](images/82dfee2dba24179259006757e4bca6038d4b2883a0488673b3f120f169f399ae.jpg) + +# necessary. + +The fabricated diffractive optical element creates a PSF that closely resembles the simulated PSF. Yet, blur and glare, likely due to interreflections between optical elements, are problematic. Optical blur makes the deconvolution problem harder and glare causes the PSF to be shift variant (see the Supplement), which limits the effective field of view of our captured data (depth-of-field is unaffected). Thus, although the add-on approach of mounting the DOE in front of an SLR camera lens is convenient and flexible, integrating the DOE into the aperture plane of the primary lens may produce better results, as it more closely resembles our paraxial image formation model. Alternatively, the image formation model could be generalized to a nonparaxial model. Finally, anti-reflection coatings may help mitigate glare in the optics. + +Future Work End-to-end methods enable designing optics tailored for a particular task, rather than just capturing the sharpest image. Evaluating the benefits + +of end-to-end optimization of optics and image processing for other applications, including multispectral, light field, and lensless imaging or computational microscopy, is an interesting avenue of future work. + +# Acknowledgments + +C.M. was supported the by an ORISE Intelligence Community Postdoctoral Fellowship. G.W. was supported by an NSF CAREER Award (IIS 1553333), a Sloan Fellowship, by the KAUST Office of Sponsored Research through the Visual Computing Center CCF grant, and a PECASE by the ARL. Part of this work was performed at the Stanford Nano Shared Facilities (SNSF)/Stanford Nanofabrication Facility (SNF), supported by the National Science Foundation under award ECCS-1542152. + +# References + +[1] Manoj Aggarwal and Narendra Ahuja. Split aperture imaging for high dynamic range. International Journal + +of Computer Vision, 58(1):7-17, 2004. +[2] M. Alghamdi, Q. Fu, A. Thabet, and W. Heidrich. Reconfigurable snapshot hdr imaging using coded masks and inception network. In International Symposium on Vision, Modeling and Visualization, 2019. +[3] N. Antipa, S. Necula, R. Ng, and L. Waller. Single-shot diffuser-encoded light field imaging. In Proc. IEEE ICCP, pages 1-11, 2016. +[4] M. S. Asif, A. Ayremlou, A. Sankaranarayanan, A. Veeraraghavan, and R. G. Baraniuk. Flatcam: Thin, lensless cameras using coded aperture and computation. IEEE Trans. Computational Imaging, 3(3):384-397, 2017. +[5] F. Banterle, A. Artusi, K. Debattista, and A. Chalmers. Advanced High Dynamic Range Imaging: Theory and Practice. AK Peters (CRC Press), 2011. +[6] Francesco Banterle, Patrick Ledda, Kurt Debattista, and Alan Chalmers. Inverse tone mapping. In Proceedings of the 4th international conference on Computer graphics and interactive techniques in Australasia and Southeast Asia, pages 349-356, 2006. +[7] D. J. Brady, M. E. Gehm, R. A. Stack, D. L. Marks, D. S. Kittle, D. R. Golish, E. M. Vera, and S. D. Feller. Multiscale gigapixel photography. Nature, 486:386-389, 2012. +[8] Ayan Chakrabarti. Learning sensor multiplexing design through back-propagation. In Advances in Neural Information Processing Systems, pages 3081-3089, 2016. +[9] Julie Chang, Vincent Sitzmann, Xiong Dun, Wolfgang Heidrich, and Gordon Wetzstein. Hybrid optical-electronic convolutional neural networks with optimized diffractive optics for image classification. Scientific reports, 8(1):12324, 2018. +[10] Julie Chang and Gordon Wetzstein. Deep optics for monocular depth estimation and 3d object detection. In Proc. ICCV, 2019. +[11] Inchang Choi, Daniel S. Jeon, Giljoo Nam, Diego Gutierrez, and Min H. Kim. High-quality hyperspectral reconstruction using a spectral prior. ACM Trans. Graph. (SIGGRAPH Asia), 36(6):218:1-218:13, 2017. +[12] O. Cossairt, D. Miau, and S.K. Nayar. Gigapixel computational imaging. In Proc. ICCP, 2011. +[13] Oliver Cossairt and Shree Nayar. Spectral focal sweep: Extended depth of field from chromatic aberrations. In Proc. ICCP, pages 1-8, 2010. +[14] Oliver Cossairt, Changyin Zhou, and Shree Nayar. Diffusion coded photography for extended depth of field. ACM Trans. Graph. (SIGGRAPH), 29(4):31:1-31:10, 2010. +[15] P. Debevec. Image-based lighting. IEEE Computer Graphics and Applications, 22(2):26-34, 2002. +[16] Paul E. Debevec and Jitendra Malik. Recovering high dynamic range radiance maps from photographs. In Proc. SIGGRAPH, pages 369-378, 1997. +[17] Edward R. Dowski and W. Thomas Cathey. Extended depth of field through wave-front coding. OSA Appl. Opt., 34(11):1859-1866, 1995. + +[18] Gabriel Eilertsen, Joel Kronander, Gyorgy Denes, Rafal K Mantiuk, and Jonas Unger. Hdr image reconstruction from a single exposure using deep CNNs. ACM Transactions on Graphics (TOG), 36(6):178, 2017. +[19] Yuki Endo, Yoshihiro Kanamori, and Jun Mitani. Deep reverse tone mapping. ACM Trans. Graph., 36(6):177:1-177:10, 2017. +[20] Orazio Gallo, Natasha Gelfandz, Wei-Chao Chen, Marius Tico, and Kari Pulli. Artifact-free high dynamic range imaging. In Proc. ICCP, pages 1-7, 2009. +[21] Joseph W Goodman. Introduction to Fourier optics. Roberts and Company Publishers, 2005. +[22] Miguel Granados, Kwang In Kim, James Tompkin, and Christian Theobalt. Automatic noise modeling for ghost-free hdr reconstruction. ACM Trans. Graph., 32(6):201:1-201:10, 2013. +[23] H. Haim, S. Elmalem, R. Giryes, A. M. Bronstein, and E. Marom. Depth estimation from a single image using deep learned phase coded mask. IEEE Trans. Computational Imaging, 4(3):298-310, 2018. +[24] Saghi Hajisharif, Joel Kronander, and Jonas Unger. Adaptive dualiso hdr reconstruction. EURASIP Journal on Image and Video Processing, 2015, 2015. +[25] S. W. Hasinoff, F. Durand, and W. T. Freeman. Noise-optimal capture for high dynamic range photography. In Proc. CVPR, pages 553-560, 2010. +[26] Samuel W Hasinoff, Dillon Sharlet, Ryan Geiss, Andrew Adams, Jonathan T Barron, Florian Kainz, Jiawen Chen, and Marc Levoy. Burst photography for high dynamic range and low-light imaging on mobile cameras. ACM Transactions on Graphics (TOG), 35(6):192, 2016. +[27] Lei He, Guanghui Wang, and Zhanyi Hu. Learning depth from single images with deep neural network embedding focal length. IEEE Transactions on Image Processing, 27(9):4676-4689, 2018. +[28] Eran Hershko, Lucien E. Weiss, Tomer Michaeli, and Yoav Shechtman. Multicolor localization microscopy and point-spread-function engineering by deep learning. OSA Opt. Express, 27(5):6158-6183, 2019. +[29] Roarke Horstmeyer, Richard Y Chen, Barbara Kappes, and Benjamin Judkewitz. Convolutional neural networks that teach microscopes how to image. arXiv preprint arXiv:1709.07223, 2017. +[30] J. Hu, O. Gallo, K. Pulli, and X. Sun. Hdr deghosting: How to deal with saturation? In Proc. CVPR, 2013. +[31] Daniel S Jeon, Seung-Hwan Baek, Shinyoung Yi, Qiang Fu, Xiong Dun, Wolfgang Heidrich, and Min H Kim. Compact snapshot hyperspectral imaging with diffracted rotation. ACM Transactions on Graphics (TOG), 38(4):117, 2019. +[32] Nima Khademi Kalantari and Ravi Ramamoorthi. Deep high dynamic range imaging of dynamic scenes. ACM Trans. Graph. (SIGGRAPH), 36(4), 2017. +[33] Nima Khademi Kalantari, Eli Shechtman, Connelly Barnes, Soheil Darabi, Dan B Goldman, and Pradeep Sen. Patch-based High Dynamic Range Video. ACM Trans. Graph. (SIGGRAPH Asia), 32(6), 2013. + +[34] Sing Bing Kang, Matthew Uytendaele, Simon Winder, and Richard Szeliski. High dynamic range video. ACM Trans. Graph. (SIGGRAPH), 22(3):319-325, 2003. +[35] Michael Kellman, Emrah Bostan, Michael Chen, and Laura Waller. Data-driven design for fourier psychographic microscopy. In 2019 IEEE International Conference on Computational Photography (ICCP), pages 1-8. IEEE, 2019. +[36] E. A. Khan, A. O. Akyuz, and E. Reinhard. Ghost removal in high dynamic range images. In Proc. ICIP, pages 2005-2008, 2006. +[37] Sijeong Lee, Gwon Hwan An, and Suk-Ju Kang. Deep recursive hdri: Inverse tone mapping using generative adversarial networks. In Proc. ECCV, pages 596-611, 2018. +[38] Anat Levin, Rob Fergus, Frédo Durand, and William T. Freeman. Image and depth from a conventional camera with a coded aperture. ACM Trans. Graph. (SIGGRAPH), 26(3), 2007. +[39] Anat Levin, Samuel W. Hasinoff, Paul Green, Frédo Durand, and William T. Freeman. 4d frequency analysis of computational cameras for depth of field extension. ACM Trans. Graph. (SIGGRAPH), 28(3):97:1-97:14, 2009. +[40] Mann, Picard, S. Mann, and R. W. Picard. On being 'undigital' with digital cameras: Extending dynamic range by combining differently exposed pictures. In Proceedings of IS&T, pages 442-448, 1995. +[41] Rafat Mantiuk, Kil Joong Kim, Allan G. Rempel, and Wolfgang Heidrich. Hdr-vdp-2: A calibrated visual metric for visibility and quality predictions in all luminance conditions. ACM Trans. Graph. (SIGGRAPH), 30(4):40:1-40:14, 2011. +[42] Julio Marco, Quercus Hernandez, Adolfo Muñoz, Yue Dong, Adrian Jarabo, Min H. Kim, Xin Tong, and Diego Gutierrez. Deeptof: Off-the-shelf real-time correction of multipath interference in time-of-flight imaging. ACM Trans. Graph. (SIGGRAPH Asia), 36(6):219:1-219:12, 2017. +[43] J.N.P. Martel, L.K. Müller, S.J. Carey, P. Dudek, and G. Wetzstein. Neural Sensors: Learning Pixel Exposures for HDR Imaging and Video Compressive Sensing with Programmable Sensors. Proc. IEEE ICCP, 2020. +[44] Kshitij Marwah, Gordon Wetzstein, Yosuke Bando, and Ramesh Raskar. Compressive light field photography using overcomplete dictionaries and optimized projections. ACM Trans. Graph. (SIGGRAPH), 32(4):46:1-46:12, 2013. +[45] M. McGuire, W. Matusik, H. Pfister, B. Chen, J. F. Hughes, and S. K. Nayar. Optical splitting trees for high-precision monocular imaging. IEEE Computer Graphics and Applications, 27(2):32-42, 2007. +[46] Tom Mertens, Jan Kautz, and Frank Van Reeth. Exposure fusion: A simple and practical alternative to high dynamic range photography. In Computer graph + +icsforum(Eurographics),volume28, pages161-171. +WileyOnlineLibrary,2009. +[47] Laurence Meylan, Scott Daly, and Sabine Süssstrunk. The reproduction of specular highlights on high dynamic range displays. IS&T/SID 14th Color Imaging Conference (CIC), 2006. +[48] T. Mitsunaga and S. K. Nayar. Radiometric self calibration. In Proc. IEEE CVPR, volume 1, pages 374-380, 1999. +[49] S. K. Nayar and T. Mitsunaga. High dynamic range imaging: spatially varying pixel exposures. In Proc. CVPR, volume 1, pages 472-479 vol.1, 2000. +[50] Elias Nehme, Daniel Freedman, Racheli Gordon, Boris Ferdman, Tomer Michaeli, and Yoav Shechtman. Dense three dimensional localization microscopy by deep learning. arXiv preprint arXiv:1906.09957, 2019. +[51] Ren Ng, Marc Levoy, Mathieu Bredif, Gene Duval, Mark Horowitz, and Pat Hanrahan. Light field photography with a hand-held plenoptic camera. Tech Report CSTR 2005-02, 2005. +[52] Sri Rama Prasanna Pavani, Michael A. Thompson, Julie S. Biteen, Samuel J. Lord, Na Liu, Robert J. Twieg, Rafael Piestun, and W. E. Moerner. Three-dimensional, single-molecule fluorescence imaging beyond the diffraction limit by using a double-helix point spread function. 106(9):2995-2999, 2009. +[53] Yifan Peng, Qiang Fu, Felix Heide, and Wolfgang Heidrich. The diffractive achromat full spectrum computational imaging with diffractive optics. ACM Trans. Graph. (SIGGRAPH), 35(4):31:1-31:11, 2016. +[54] Ramesh Raskar, Amit Agrawal, and Jack Tumblin. Coded exposure photography: Motion deblurring using fluttered shutter. ACM Trans. Graph. (SIGGRAPH), 25(3):795-804, 2006. +[55] Erik Reinhard, Wolfgang Heidrich, Paul Debevec, Sumanta Pattanaik, Greg Ward, and Karol Myszkowski. High dynamic range imaging: acquisition, display, and image-based lighting. Morgan Kaufmann, 2010. +[56] Allan G. Rempel, Matthew Trentacoste, Helge Seetzen, H. David Young, Wolfgang Heidrich, Lorne Whitehead, and Greg Ward. Ldr2hdr: On-the-fly reverse tone mapping of legacy video and photographs. ACM Trans. Graph. (SIGGRAPH), 26(3), 2007. +[57] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pages 234-241. Springer, 2015. +[58] Mushfiqur Rouf, Rafal Mantiuk, Wolfgang Heidrich, Matthew Trentacoste, and Cheryl Lau. Glare encoding of high dynamic range images. In Proc. CVPR 2011, pages 289-296, 2011. +[59] Helge Seetzen, Wolfgang Heidrich, Wolfgang Stuerzlinger, Greg Ward, Lorne Whitehead, Matthew Trentacoste, Abhijeet Ghosh, and Andrejs Vorozcovs. High dynamic range display systems. ACM Trans. Graph. (SIGGRAPH), 23(3):760-768, 2004. + +[60] Pradeep Sen, Nima Khademi Kalantari, Maziar Yaësoubi, Soheil Darabi, Dan B. Goldman, and Eli Shechtman. Robust patch-based hdr reconstruction of dynamic scenes. ACM Trans. Graph. (SIGGRAPH Asia), 31(6):203:1-203:11, 2012. +[61] Ana Serrano, Felix Heide, Diego Gutierrez, Gordon Wetzstein, and Belen Masia. Convolutional sparse coding for high dynamic range imaging. In Computer Graphics Forum (Eurographics), pages 153-163, 2016. +[62] Yoav Shechtman, Steffen J. Sahl, Adam S. Backer, and W. E. Moerner. Optimal point spread function design for 3d imaging. Phys. Rev. Lett., 113:133902, 2014. +[63] Noah Simon, Jerome Friedman, Trevor Hastie, and Robert Tibshirani. A sparse-group lasso. Journal of Computational and Graphical Statistics, 22(2):231-245, 2013. +[64] Vincent Sitzmann, Steven Diamond, Yifan Peng, Xiong Dun, Stephen Boyd, Wolfgang Heidrich, Felix Heide, and Gordon Wetzstein. End-to-end optimization of optics and image processing for achromatic extended depth of field and super-resolution imaging. ACM Transactions on Graphics (TOG), 37(4):114, 2018. +[65] Shuochen Su, Felix Heide, Gordon Wetzstein, and Wolfgang Heidrich. Deep end-to-end time-of-flight imaging. In Proc. CVPR, 2018. +[66] Michael D. Tocci, Chris Kiser, Nora Tocci, and Pradeep Sen. A versatile hdr video production system. ACM Trans. Graph. (SIGGRAPH), 30(4):41:1-41:10, 2011. +[67] Alex Turpin, Ivan Vishniakou, and Johannes D Seelig. Light scattering control with neural networks in transmission and reflection. *Arxiv: 180505602 [Cs],* 2018. +[68] Ashok Veeraraghavan, Ramesh Raskar, Amit Agrawal, Ankit Mohan, and Jack Tumblin. Dappled photography: Mask enhanced cameras for heterodyned light fields and coded aperture refocusing. ACM Trans. Graph. (SIGGRAPH), 26(3), 2007. +[69] Ashwin Wagadarikar, Renu John, Rebecca Willett, and David Brady. Single disperser design for coded aperture snapshot spectral imaging. OSA Appl. Opt., 47(10):B44-B51, 2008. +[70] G. Wetzstein, I. Ihrke, and W. Heidrich. Sensor saturation in fourier multiplexed imaging. In Proc. CVPR, pages 545-552, 2010. +[71] Yicheng Wu, Vivek Boominathan, Huaijin Chen, Aswin Sankaranarayanan, and Ashok Veeraraghavan. Phasecam3d - learning phase masks for passive single view depth estimation. In Proc. ICCP, 2019. +[72] Li Xu, Jimmy SJ Ren, Ce Liu, and Jiaya Jia. Deep convolutional neural network for image deconvolution. In Advances in neural information processing systems, pages 1790-1798, 2014. +[73] H. Zhao, B. Shi, C. Fernandez-Cull, S. Yeung, and R. Raskar. Unbounded high dynamic range photography using a modulo camera. In Proc. ICCP, pages 1-10, 2015. + +[74] C. Zhou, S. Lin, and S. K. Nayar. Coded aperture pairs for depth from defocus. In Proc. ICCV, 2009. +[75] C. Zhou and S. Nayar. What are good apertures for defocus deblurring? In Proc. IEEE ICCP, pages 1-8, 2009. \ No newline at end of file diff --git a/deepopticsforsingleshothighdynamicrangeimaging/images.zip b/deepopticsforsingleshothighdynamicrangeimaging/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..2c24ee79c71cabf92379b4a8d05a6649e13b9b6b --- /dev/null +++ b/deepopticsforsingleshothighdynamicrangeimaging/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50f51d6b4850972920d9d3521609bae987868af7048cbf3c46d8ef695f76d823 +size 406451 diff --git a/deepopticsforsingleshothighdynamicrangeimaging/layout.json b/deepopticsforsingleshothighdynamicrangeimaging/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..93400641afd5dd3306c8373b26acaa579ffd5a4b --- /dev/null +++ b/deepopticsforsingleshothighdynamicrangeimaging/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7ff2907defa3873cca7299797ad5a1324fa4a2ea8afc439c6ab4b02d030d712 +size 523128 diff --git a/deepparametricshapepredictionsusingdistancefields/d9222807-35cb-4cd2-a82d-32fd8269964a_content_list.json b/deepparametricshapepredictionsusingdistancefields/d9222807-35cb-4cd2-a82d-32fd8269964a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..5990fddfed7dfa93859879d481d49d3b869ba799 --- /dev/null +++ b/deepparametricshapepredictionsusingdistancefields/d9222807-35cb-4cd2-a82d-32fd8269964a_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b248d3ce24cf76b96c10fa61f04246bedca484ad4875bc04b4b4bcacbc59eb0 +size 80407 diff --git a/deepparametricshapepredictionsusingdistancefields/d9222807-35cb-4cd2-a82d-32fd8269964a_model.json b/deepparametricshapepredictionsusingdistancefields/d9222807-35cb-4cd2-a82d-32fd8269964a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c5d4a976f82f3d90038a951c9f5635d41da67279 --- /dev/null +++ b/deepparametricshapepredictionsusingdistancefields/d9222807-35cb-4cd2-a82d-32fd8269964a_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06703023f09be816bc42a561369af8921c7cafdc18565da5479a84cdf7c5cbdb +size 100459 diff --git a/deepparametricshapepredictionsusingdistancefields/d9222807-35cb-4cd2-a82d-32fd8269964a_origin.pdf b/deepparametricshapepredictionsusingdistancefields/d9222807-35cb-4cd2-a82d-32fd8269964a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d45689b2b124ad68adb573aef58154a8d7626765 --- /dev/null +++ b/deepparametricshapepredictionsusingdistancefields/d9222807-35cb-4cd2-a82d-32fd8269964a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c623e65da72b26c01b8f6a46d377fce1fd503dab9e4917cf70c4fd8af9dfa078 +size 1833754 diff --git a/deepparametricshapepredictionsusingdistancefields/full.md b/deepparametricshapepredictionsusingdistancefields/full.md new file mode 100644 index 0000000000000000000000000000000000000000..eb8c46a52889045c7f8442a59a57998c1d8384ad --- /dev/null +++ b/deepparametricshapepredictionsusingdistancefields/full.md @@ -0,0 +1,391 @@ +# Deep Parametric Shape Predictions using Distance Fields + +Dmitriy Smirnov1 Matthew Fisher2 Vladimir G. Kim2 Richard Zhang2 Justin Solomon1 +1Massachusetts Institute of Technology 2Adobe Research + +# Abstract + +Many tasks in graphics and vision demand machinery for converting shapes into consistent representations with sparse sets of parameters; these representations facilitate rendering, editing, and storage. When the source data is noisy or ambiguous, however, artists and engineers often manually construct such representations, a tedious and potentially time-consuming process. While advances in deep learning have been successfully applied to noisy geometric data, the task of generating parametric shapes has so far been difficult for these methods. Hence, we propose a new framework for predicting parametric shape primitives using deep learning. We use distance fields to transition between shape parameters like control points and input data on a pixel grid. We demonstrate efficacy on 2D and 3D tasks, including font vectorization and surface abstraction. + +# 1. Introduction + +The creation, modification, and rendering of parametric shapes, such as in vector graphics, is a fundamental problem of interest to engineers, artists, animators, and designers. Such representations offer distinct advantages. By expressing shapes as collections of primitives, we can easily apply transformations and render at arbitrary resolution while storing only a sparse representation. Moreover, generating parametric representations that are consistent across inputs enables us to learn common underlying structure and estimate correspondences between shapes, facilitating tools for retrieval, exploration, style/structure transfer, and so on. + +It is often useful to generate parametric models from data that do not directly correspond to the target geometry and contain imperfections or missing parts. This can be an artifact of noise, corruption, or human-generated input; often, an artist intends to create a precise geometric object but produces one that is "sketchy" and ambiguous. Hence, we turn to machine learning methods, which have shown success in inferring structure from noisy data. + +Convolutional neural networks (CNNs) achieve state-of-the-art results in vision tasks such as image classification [22], segmentation [25], and image-to-image translation [19]. CNNs, however, operate on raster representations. + +![](images/451d23207f2ef369ebc96ab73e4a418192bc6798a8f22dc710b90815552efbb9.jpg) +Figure 1: Drawbacks of Chamfer distance (above) fixed by our losses (below). In (a), sampling uniformly in the parameter space of a Bezier curve (orange) yields oversampling at the high-curvature area, resulting in a low Chamfer distance to the segments (blue). Our method yields a spatially uniform representation. In (b), two sets of nearly-orthogonal line segments have near-zero Chamfer distance despite misaligned normals. We explicitly measure normal alignment. + +Grid structure is fundamentally built into convolution as a mechanism for information to travel between network layers. This structure is leveraged to optimize GPU performance. Recent deep learning pipelines that output vector shape primitives have been significantly less successful than pipelines for analogous tasks on raster images or voxelized volumes. + +A challenge in applying deep learning to parametric geometry is the combination of Eulerian and Lagrangian representations. CNNs process data in an Eulerian fashion, applying fixed operations to a dense grid; Eulerian shape representations like indicator functions come as values on a fixed grid. Parametric shapes, on the other hand, use sparse sets of parameters like control points to express geometry. In contrast to stationary Eulerian grids, this Lagrangian representation moves with the shape. Mediating between Eulerian and Lagrangian geometry is key to any learning pipeline for the problems above, a task we consider in detail. + +We propose a learning framework for predicting parametric shapes, addressing the aforementioned issues. By analytically computing a distance field to the primitives during training, we formulate an Eulerian version of Chamfer distance, a common metric for geometric similarity [41, 12, 24, 17]. Our metric does not require samples from the predicted or target shapes, eliminating artifacts that emerge due to nonuniform sampling. Additionally, our distance field enables alternative loss functions that are sensitive to specific geometric qualities like alignment. We illustrate the advantages of our + +method over Chamfer distance in Figure 1. + +We apply our new framework in 2D to a diverse dataset of fonts, training a network that takes in a raster image of a glyph and outputs a collection of Bezier curves. This effectively maps glyphs onto a common set of parameters that can be traversed intuitively. We use this embedding for font exploration and retrieval, correspondence, and interpolation in a completely self-supervised setting, without need for human labelling or annotation. + +We also show that our approach works in 3D. With surface primitives in place of curves, we perform abstraction on ShapeNet [7], outputting parametric primitives to approximate each input. Our method can produce consistent shape segmentations, outperforming state-of-the-art deep cuboid fitting of Tulsiani et al. [41] on semantic segmentation. + +Contributions. We present a technique for predicting parametric shapes from 2D and 3D raster data, including: + +- a general distance field loss function motivating several self-supervised losses based on a common formulation; +- application to 2D font glyph vectorization, with application to correspondence, exploration, retrieval, and repair; +- application to 3D surface abstraction, with results for different primitives and constructive solid geometry (CSG) as well as application to segmentation. + +# 2. Related Work + +Deep shape reconstruction. Reconstructing geometry from one or more viewpoints is crucial in applications like robotics and autonomous driving [13, 35, 38]. Recent deep networks can produce point clouds or voxel occupancy grids given a single image [12, 8], but their output suffers from fixed resolution. + +Learning signed distance fields defined on a voxel grid [9, 37] or directly [30] allows high-resolution rendering but requires surface extraction; this representation is neither sparse nor modular. Liao et al. address the rendering issue by incorporating marching cubes into a differentiable pipeline, but the lack of sparsity remains problematic, and predicted shapes are still on a voxel grid [23]. + +Parametric shapes offer a sparse, non-voxelized solution. Methods for converting point clouds to geometric primitives achieve high-quality results but require supervision, either relying on existing labeled data [27, 26, 15] or prescribed templates [14]. Groueix et al. output primitives at any resolution, but their primitives are not naturally parameterized or sparsely represented [17]. Genova et. al. propose to represent geometry as isosurfaces of axis-aligned Gaussians [16]. Others [17, 39, 31] develop tailored primitives but use standard Chamfer distance as the loss objective. We demonstrate and address the issues inherent in Chamfer distance. + +Font exploration and manipulation. Designing or even finding a font can be tedious using generic vector graphics + +tools. Certain geometric features distinguish letters from one another across fonts, while others distinguish fonts from one another. Due to these difficulties and the presence of large font datasets, font exploration, design, and retrieval have emerged as challenging problems in graphics and learning. + +Previous exploration methods categorize and organize fonts via crowdsourced attributes [28] or embed fonts on a manifold using purely geometric features [6, 2]. Instead, we leverage deep vectorization to automatically generate a sparse representation for each glyph. This enables exploration on the basis of general shape rather than fine detail. + +Automatic font generation methods usually fall into two categories. Rule-based methods [40, 32] use engineered decomposition and reassembly of glyphs into parts. Deep learning approaches [1, 43] produce raster images, with limited resolution and potential for image-based artifacts, making them unfit for use as glyphs. We apply our method to edit existing fonts while retaining vector structure and demonstrate vectorization of glyphs from noisy partial data. + +Parametric shape collections. As the number of publicly-available 3D models grows, methods for organizing, classifying, and exploring models become crucial. Many approaches decompose models into modular parametric components, commonly relying on prespecified templates or labeled collections of specific parts [20, 36, 29]. Such shape collections prove useful in domain-specific applications in design and manufacturing [34, 42]. Our deep learning pipeline allows generation of parametric shapes to perform these tasks. It works quickly on new inputs at test time and is generic, handling a variety of modalities without supervision and producing different output types. + +# 3. Preliminaries + +Let $A, B \subset \mathbb{R}^n$ be two measurable shapes. Let $X$ and $Y$ be two point sets sampled uniformly from $A$ and $B$ . The directed Chamfer distance between $X$ and $Y$ is + +$$ +\operatorname {C h} _ {\operatorname {d i r}} (X, Y) = \frac {1}{| X |} \sum_ {x \in X} \min _ {y \in Y} \| x - y \| _ {2} ^ {2}, \tag {1} +$$ + +and the symmetric Chamfer distance is defined as + +$$ +\operatorname {C h} (X, Y) = \operatorname {C h} _ {\operatorname {d i r}} (X, Y) + \operatorname {C h} _ {\operatorname {d i r}} (Y, X). \tag {2} +$$ + +These were proposed for computational applications in [5] and have been used as a loss function assessing similarity of a learned shape to ground truth in learning [41, 12, 24, 17]. + +To relate our proposed loss to Chamfer distance, we define variational directed Chamfer distance as + +$$ +\operatorname {C h} _ {\operatorname {d i r}} ^ {\operatorname {v a r}} (A, B) = \frac {1}{\operatorname {V o l} (\mathrm {A})} \int_ {A} \inf _ {y \in B} \| x - y \| _ {2} ^ {2} \mathrm {d} V (x), \tag {3} +$$ + +with variational symmetric Chamfer distance $\mathrm{Ch}(A,B)^{\mathrm{var}}$ defined analogously, extending (1) and (2) to smooth objects. + +If points are sampled uniformly, under relatively weak assumptions, $\mathrm{Ch}(X,Y)\to 0$ iff $A = B$ as the number of samples grows, making it a reasonable shape matching metric. Chamfer distance, however, has fundamental drawbacks: + +- It is highly dependent on the sampled points and sensitive to non-uniform sampling, as in Figure 1a. +- It is agnostic to normal alignment. As in Figure 1b, Chamfer distance between a dense set of vertical lines and a dense set of horizontal lines approaches zero. +- It is slow to compute. For each $x$ sampled from $A$ , it is necessary to find the closest $y$ sampled from $B$ , a quadratic-time operation when implemented naively. Efficient structures like $k$ -d trees are not well-suited to GPUs. + +Our method does not suffer from these disadvantages. + +# 4. Method + +We introduce a framework for formulating loss functions suitable for learning parametric shapes in 2D and 3D; our formulation not only generalizes Chamfer distance but also leads to stronger loss functions that improve performance on a variety of tasks. We start by defining a general loss on distance fields and propose two specific losses. + +# 4.1. General Distance Field Loss + +Given $A, B \subseteq \mathbb{R}^n$ , let $\mathrm{d}_A, \mathrm{d}_B: \mathbb{R}^n \to \mathbb{R}_+$ measure distance from each point in $\mathbb{R}^n$ to $A$ and $B$ , respectively, $\mathrm{d}_A(x) := \inf_{y \in A} \|x - y\|_2$ . In our experiments, $n \in \{2, 3\}$ . Let $S \subseteq \mathbb{R}^n$ be a bounded set with $A, B \subseteq S$ . We define a general distance field loss as + +$$ +\mathcal {L} _ {\Psi} [ A, B ] = \frac {1}{\operatorname {V o l} (S)} \int_ {x \in S} \Psi_ {A, B} (x) \mathrm {d} V (x), \tag {4} +$$ + +for some measure of discrepancy $\Psi$ . Note that we represent $A$ and $B$ only by their respective distance functions, and the loss is computed over $S$ . + +Let $\Phi \in \mathbb{R}^p$ be a collection of parameters defining a shape $S_{\Phi} \subseteq \mathbb{R}^n$ . For instance, if $S_{\Phi}$ consists of Bézier curves, $\Phi$ contains a list of control points. Given a target shape $T \subseteq \mathbb{R}^n$ , we formulate fitting a parametric shape to approximate $T$ w.r.t. $\Psi$ as minimizing + +$$ +f _ {\Psi} (\Phi) = \mathcal {L} _ {\Psi} [ S _ {\Phi}, T ]. \tag {5} +$$ + +For optimal shape parameters, $\hat{\Phi} \coloneqq \arg \min_{\Phi} f_{\Psi}(\Phi)$ . We propose two discrepancy measures, providing loss functions that capture different geometric features. + +# 4.2. Surface Loss + +We define surface discrepancy to be + +$$ +\Psi_ {A, B} ^ {\text {s u r f}} (x) = \delta \left\{\ker d _ {A} ^ {2} \right\} (x) d _ {B} ^ {2} (x) + \delta \left\{\ker d _ {B} ^ {2} \right\} (x) d _ {A} ^ {2} (x) \tag {6} +$$ + +where $\delta \{X\}$ is the Dirac delta defined uniformly on $X$ , and $\ker f$ denotes the zero level-set of $f$ . $\Psi^{\mathrm{surf}} > 0$ iff the shapes do not match, making it sensitive to local geometry: + +![](images/fc8daa88d1b697d2d50fcdc8dc506dc72acabb5523a335936e9add08ebb5a031.jpg) +Figure 2: An overview of our pipelines—font vectorization (green) and 3D abstraction (orange). + +Proposition 1 The symmetric variational Chamfer distance between $A, B \subseteq \mathbb{R}^n$ is equal to the surface loss between $A$ and $B$ , i.e., $\mathrm{Ch}^{\mathrm{var}}(A, B) = \mathcal{L}_{\Psi_{A,B}^{\mathrm{surf}}}$ . + +Unlike Chamfer distance, the discrete version of our surface loss can be approximated efficiently without sampling points from either the parametric or target shape via evaluation over a regular grid, as we show in §4.4. + +# 4.3. Normal Alignment Loss + +We define normal alignment discrepancy to be + +$$ +\Psi_ {A, B} ^ {\text {a l i g n}} (x) = 1 - \left\langle \nabla \mathrm {d} _ {A} (x), \nabla \mathrm {d} _ {B} (x) \right\rangle^ {2}. \tag {7} +$$ + +Minimizing $f_{\Psi^{\mathrm{align}}}$ aligns normals of the predicted primitives to those of the target. Following Figure 1b, if $A$ contains dense vertical lines and $B$ contains horizontal lines, $\mathcal{L}_{\Psi_{A,B}^{\mathrm{align}}} \gg 0$ while $\mathrm{Ch}(A,B) \approx 0$ . + +# 4.4. Final Loss Function + +The general distance field loss and proposed discrepancy measures are differentiable w.r.t. the shape parameters $\Phi$ , as long as $\mathrm{d}_{S_{\Phi}}$ is differentiable w.r.t. $\Phi$ . Thus, they are well-suited to be optimized by a deep network predicting parametric shapes. We approximate (4) via Monte Carlo integration: + +$$ +\mathcal {L} _ {\Psi} [ A, B ] \approx \frac {1}{| G |} \sum_ {x \in G} \Psi_ {A, B} (x), \tag {8} +$$ + +where $G$ is a 2D or 3D grid. + +While we use a voxel grid grid to compute the integrals in our loss function, the resolution of the voxel grid only affects quadrature without limiting the resolution of our representation. The grid dictates how we sample distance values; the values themselves are derived from a continuous parametric representation. A small subvoxel change in the geometry will affect the distance value at multiple discrete voxels. This property is in distinct contrast to representations that only consider the occupancy grid of a shape—the resolution of such representations is strictly limited by the grid resolution. + +For $\Psi^{\mathrm{surf}}$ , we use Smootherstep $(1 - \mathrm{d}_A^2 /\gamma^2)$ (with Smootherstep defined as in [11]) as a smooth version of + +$\delta \{\ker \mathrm{d}_A^2\}$ to evaluate the expression on a grid and to avoid discontinuities, enabling smooth gradients in our optimization. We set $\gamma$ to twice the diameter of a voxel. For $\Psi^{\mathrm{align}}$ , we approximate gradients using finite differences. + +We minimize $f_{\Psi} = f_{\Psi^{\mathrm{surf}}} + \alpha^{\mathrm{align}}f_{\Psi^{\mathrm{align}}},$ determining $\alpha^{\mathrm{align}} = 0.01$ for all experiments using cross-validation. + +# 4.5. Network Architecture and Training + +The network takes a $128 \times 128$ image or a $64 \times 64 \times 64$ distance field as input and outputs a parametric shape. We encode our input to a $\mathbb{R}^{256}$ latent space using a ResNet-18 [18] architecture. We then use a fully connected layer with 256 units and ReLU nonlinearity followed by a fully connected layer with number of units equal to the dimension of the target parameterization. We pass the output through a sigmoid and rescale it depending on the parameters being predicted. Our pipeline is illustrated in Figure 2. We train each network on a single Tesla GeForce GTX Titan X GPU for approximately one day, using Adam [21] with learning rate $10^{-4}$ and batch size 32 for 2D and 16 for 3D. + +# 5.2D: Font Exploration and Manipulation + +We demonstrate our method in 2D for font glyph vectorization. Given a raster image of a glyph, our network outputs control points defining a collection of quadratic Bezier curves that approximate its outline. We produce nearly exact vector representations of glyphs from simple (non-decorative) fonts. From a decorative glyph with fine-grained detail, however, we recover a good approximation of the glyph's shape using a small number of Bezier primitives and a consistent structure. This process can be interpreted as projection onto a common latent space of control points. + +We first describe our choice of primitives as well as the computation of their distance fields. We introduce a template-based approach to allow our network to better handle multimodal data (different letters) and test several applications. + +# 5.1. Approach + +Primitives. We wish to use a 2D parametric shape primitive that is sparse and expressive and admits an analytic distance field. Our choice is the quadratic Bézier curve (which we refer to as curve), parameterized by control points $a, b, c \in \mathbb{R}^2$ and defined by $\gamma(t) = (1 - t)^2a + 2(1 - t)tb + t^2c$ , for $0 \leq t \leq 1$ . We represent 2D shapes as the union of $n$ curves parameterized by $\Phi = \{a_i, b_i, c_i\}_{i=1}^n \subseteq \mathbb{R}^{3n}$ . + +Proposition 2 Given a curve $\gamma$ parameterized by $a, b, c \in \mathbb{R}^2$ and a point $p \in \mathbb{R}^2$ , the $\hat{t} \in \mathbb{R}$ such that $\gamma(\hat{t})$ is the closest point on the curve to $p$ satisfies the following: + +$$ +\begin{array}{l} \langle B, B \rangle \hat {t} ^ {3} + 3 \langle A, B \rangle \hat {t} ^ {2} + (2 \langle A, A \rangle + \langle B, a - p \rangle) \hat {t} \tag {9} \\ + \langle A, a - p \rangle = 0, \\ \end{array} +$$ + +where $A = b - a$ and $B = c - 2b + a$ . + +![](images/4585afeecbbfbc9a5affea730e412fb5c0b564c68f6562d67f34cbf6a6bd6f3f.jpg) +Figure 3:Glyphs with predicted boundary curves rendered with predicted stroke thickness. The network thickens curves to account for stylistic details at the glyph boundaries. + +![](images/4d0cdc4b4ea4d81d0439a0541cc6c0b962a6312e2520c6b5ef89623a06b1d22f.jpg) +(a) Lettter templates + +![](images/7e80f4e591738c0da9febd52920edaceff61a15cd66d8045b94a20f671df4f6c.jpg) +(a) Simple templates +Figure 4: Font glyph templates. These determine the connectivity and initialize the placement of the predicted curves. + +Thus, evaluating the distance to a single curve $\mathrm{d}_{\gamma_i}(p) = \| p - \gamma_i(\hat{t})\|_2$ requires finding the roots of a cubic [33], which we can do analytically. To compute distance to the union of the curves, we take a minimum: $\mathrm{d}_{\Phi}(p) = \min_{i=1}^{n} \mathrm{d}_{\gamma_i}(p)$ . + +In addition to the control points, we predict a stroke thickness for each curve. We use this parameter when computing the loss by "lifting" the predicted distance field, thus thickening the curve—if curve $\gamma$ has thickness $s$ , we set $d_{\gamma}^{s}(p) = \min(d_{\gamma}(p) - s, 0)$ . While we do not visualize stroke thickness in our experiments, this approach allows the network to thicken curves to better match high-frequency filigree (see Figure 3). This thickening is a simple operation in our distance field representation; sampling-based methods do not provide a natural way to thicken predicted geometry. + +Templates. Our training procedure is self-supervised, as we do not have ground truth curve annotations. To better handle the multimodal nature of our entire dataset with a single network, we label each training example with its letter, passed as additional input. This allows us to condition on input class by concatenating a 26-dimensional one-hot vector to the input, a common technique for conditioning [44]. + +We choose a "standard" curve representation per letter, capturing each letter's distinct geometric and topological features, by designing 26 templates from a shared set of control points. A template of type $\ell \in \{\mathrm{A},\dots ,\mathrm{Z}\}$ is a collection of points $T_{\ell} = \{p_{1},\ldots ,p_{n}\} \subseteq \mathbb{R}^{2n}$ with corresponding connectivity determining how the points define curves. Since our curves form closed loops, we reuse endpoints. + +For glyph boundaries of uppercase English letters, there are three connectivity types—one loop (e.g., “C”), two loops (e.g., “A”), and three loops (“B”). In our templates, the first loop has 15 curves and the other loops have 4 curves each. We will show that while letter templates (Figure 4a) better specialize to the boundaries of each glyph, we still achieve good results with simple templates (Figure 4b). Even without letter-specific templates, our system learns a consistent geometric representation, establishing cross-glyph correspondences purely using self-supervision. + +We use predefined templates together with our labeling of each training example for two purposes. First, connectivity + +is used to compute curve control points from the network output. Second, they provide a template loss: + +$$ +\mathcal {L} ^ {\text {t e m p l a t e}} (\ell , x) = \alpha^ {\text {t e m p l a t e}} e ^ {(t / s)} \| T _ {\ell} - h ^ {t} (x) \| _ {2} ^ {2}, \tag {10} +$$ + +where $s \in \mathbb{Z}_+$ , $\gamma \in (0,1)$ , $t$ is the iteration number, $x$ is the input image, and $h^t(x)$ is the network output at iteration $t$ . This initializes the network output, such that an input of type $\ell$ initially maps to template $\ell$ . As this term decays, the other loss terms take over. We set $\alpha^{\text{template}} = 10$ and $s = 500$ , though other choices of parameters for which the template term initially overpowers the rest of the loss also work. + +# 5.2. Experiments + +We train our network on the 26 uppercase English letters extracted from nearly 10,000 fonts. The input is a raster image of a letter, and the target distance field to the boundary of the original vector representation is precomputed. + +Ablation study. We demonstrate the benefit of our loss over Chamfer distance as well as the contribution of each of our loss terms. While having 26 unique templates helps achieve better results, it is not crucial—we evaluate a network trained with three "simple templates" (Figure 4b), which capture the three topology classes of our data. + +
ModelAverage error
Full model (ours)0.509
No surface term (ours)1.613
No alignment term (ours)0.642
Simple templates (ours)0.641
Chamfer (with letter templates)0.623
AtlasNet [17]5.154
+ +Table 1: Comparison between subsets of our full model as well as standard Chamfer distance and AtlasNet. Average error is Chamfer distance (in pixels on a $128 \times 128$ image) between ground truth and uniformly sampled predicted curves. + +For the Chamfer loss experiment, we use the same hyperparameters as for our method and sample 5,000 points from the source and target geometry. We initialize the model output to the full letter templates, like in our full model. + +We also evaluate on 20 sans-serif fonts, computing Chamfer distance between our predicted curves and ground truth geometry, sampling uniformly (average error in Table 1). Uniform sampling is a computationally-expensive and nondifferentiable procedure only for evaluation a posteriori—not suitable for training. While it does not correct all of Chamfer distance's shortcomings, we use it as a baseline to evaluate quality. We limit to sans-serif fonts since we do not expect to faithfully recover local geometry. Our full loss outperforms Chamfer loss, and both our loss terms are necessary. Figure 5 shows qualitative results on test set glyphs; see supplementary material for additional results. + +![](images/942ffaa4fd53458ccff10928690bbf5a112f548043cb2884130b9932366aa6c2.jpg) +Figure 5: Ablation study and comparison to Chamfer. + +We demonstrate robustness in Figure 6 by quantizing our loss values and plotting the number of examples for each value. High loss outliers are generally caused by noisy data—they are either not uppercase English letters or have fundamentally uncommon structure. + +![](images/cdbd68b65adc21e8f404a42e0c5493423d75c13bd8cc7cab5a9a404307851778.jpg) +Figure 6: Number of examples per quantized loss value. We visualize the input and predicted curves for several outliers. + +Comparison to AtlasNet. In AtlasNet [17], geometry is reconstructed by training implicit decoders, which map a point in the unit square to a point on the target surface, optimizing Chamfer distance. We modify the AtlasNet system to our task and demonstrate that our method method proposes a more effective geometry representation and loss. + +AtlasNet represents shapes as points in a learned high dimensional space, which does not obviously correlate to geometric features. Thus, in contrast to our explicit representation as a collection of control points, it does not facilitate geometric interpretability. Additionally, this makes it difficult to impose geometric priors—it is unclear how to initialize AtlasNet to predefined templates, as we do in §5.1. + +![](images/10069eda79ecfcda1f879143522e5af8b4e6c65b73c6c59e312bd50a79b968d7.jpg) +(a) Plain font glyphs + +![](images/6585c950ec175661c53e2c0cac63410d7de13a1009f00e40289231d2b8285f27.jpg) +(b) Decorative font glyphs + +![](images/03e94d775408079178ac841963d2a281e300267af37ce47512b1d692b62aab39.jpg) +Figure 7: Vectorization of various glyphs. For each we show the raster input (top left,black) along with the vectorization (colored curves) superimposed. When the input has simple structure (a), we recover an accurate vectorization. For fonts with decorative details (b), our method places curves to capture overall structure. Results are taken from the test dataset. +Figure 8: Comparison to AtlasNet [17] with a closed loop start shape to our simple templates and full models. We only train (and test) AtlasNet on letters with a single loop. + +For a fair comparison, we train an AtlasNet model that maps points from the boundary of a circle (rather than the interior of a square) into 2D. We only train on letters with single loop topology $(C,E,F,$ etc.) and sample 5,000 points. Thus, this setting is comparable to the simple templates experiment from our ablation. + +We show results in Figure 8. Although AtlasNet recovers overall structure of the input, it suffers from artifacts, self-intersections, and imprecision not exhibited by our method, even with simple templates. Likely, this is due to the fact that AtlasNet exhibits the drawbacks of Chamfer distance identified in §3, i.e., non-uniform sampling and lack of sensitivity to normal alignment. We include a quantitative comparison in Table 1. Our method outperforms AtlasNet even based on on a uniformly-sampled Chamfer distance metric. + +Vectorization. For any font glyph, our method generates a consistent sparse vector representation, robustly and accurately describing the glyph's structure while ignoring decorative and noisy details. For simple fonts, our representation is a near-perfect vectorization, as in Figure 7a. For decorative glyphs, our method produces a meaningful abstraction. While a true vectorization would contain many curves with a large number of connected components, we succinctly capture the glyph's overall structure (Figure 7b). + +Our method preserves semantic correspondences. The same curve is consistently used for the boundary of, e.g., the top of an "I". These correspondences persist across letters with both full and simple templates—see, e.g., the "E" and "F" in Figure 7a and 7b and "simple templates" in Figure 5. + +Retrieval and exploration. Our sparse representation can be used to explore the space of glyphs, useful for artists and designers, without the need for manual labelling or annotation. Treating control points as a metric space, we can perform Euclidean nearest-neighbor lookups for font retrieval. + +In Figure 9, for each query glyph, we compute its curve representation and retrieve seven nearest neighbors in curve space. Because our representation captures geometric structure, we find glyphs that are similar structurally, despite decorative and stylistic differences. + +We can also consider a path in curve space starting at the curves for one glyph and ending at those for another. By sampling nearest neighbors along this trajectory, we "interpolate" between glyphs. As in Figure 10, this produces meaningful collections of fonts for the same letter and reasonable results when the start and end glyphs are different letters. Additional results are in supplementary material. + +![](images/569b98c9f3a441d303bf98728a97c1bbf2cfb478354d1f03fdad006652f0b97a.jpg) +Figure 9: Nearest neighbors for a glyph in curve space, sorted by proximity. The query glyph is in orange. + +Nearest-neighbor lookups in curve space also can help find a font matching desired geometric characteristics. A possible workflow is in Figure 11—through incremental refinements of the curves the user can quickly find a font. + +Style and structure mixing. Our sparse curve representation describes geometric structure, ignoring stylistic and + +![](images/bddbb3d5ada987bbb00830deb66008cda91e44797a701ede071e3f23cc129032.jpg) +Figure 10: Interpolating between fonts in curve space. The start and end are in orange and blue, respectively, and the nearest glyphs to linear interpolants are shown in order. + +![](images/62b00670cc90abe904eb4acfad280891e8aeab2414026e7c5a17733414957e73.jpg) +Figure 11: User-guided font exploration. At each edit, the nearest glyph is displayed below. This lets the user explore the dataset through geometric refinements. + +![](images/30b2e994a1c146e0741b55c6a34106b89bb051f598c104dba09ae148725384cd.jpg) +Figure 12: Mixing of style (columns) and structure (rows) of the $A$ glyph from different fonts. We deform each starting glyph (orange) into the structure of each target glyph (blue). + +decorative details. We leverage this to warp a glyph with desired style to the structure of another glyph (Figure 12). + +We first generate the sparse curve representation for source and target glyphs. Since our representation uses the same set of curves, we can estimate dense correspondences and use them to warp original vectors of the source glyph to conform to the shape of the target. For each point on the source, we apply a translation that is a weighted sum of the translations from the sparse curve control points in the source glyph to those in the target glyph. + +Repair. Our system learns a strong prior on glyph shape, allowing us to robustly handle noisy input. In [1], a generative adversarial network (GAN) generates novel glyphs. The outputs, however, are raster images, often with noise and missing parts. Figure 13 shows how our method can simultaneously vectorize and repair GAN-generated glyphs. Compared to a vectorization tool like Adobe Illustrator Live Trace, we infer missing data based on learned priors, making the glyphs usable starting points for font design. + +![](images/24ea7eaa3c52f84a38a384f9d59c749f90407b6df04d1b61f3de930ecc01c2fa.jpg) +Figure 13: Vectorized GAN-generated fonts from [1]. + +![](images/d3546351a50327714dcc0e4a8e8ac9c7813b1b517bdaad47bec145a61d4ed334.jpg) +Figure 14: Vectorization of Chinese character 您. + +Other glyphs. Our method generalizes to more complex input than uppercase English glyphs. We demonstrate this by training a model to vectorize the Chinese character 您, which has significant geometric and topological complexity. We use a template that roughly captures the structure of the character. Results on several fonts are shown in Figure 14. + +# 6.3D: Volumetric Primitive Prediction + +We reconstruct 3D surfaces out of various primitives, which allow our model to be expressive, sparse, and abstract. + +# 6.1. Approach + +Our first primitive is a cuboid, parameterized by $\{b, t, q\}$ , where $b = (w, h, d)$ , $t \in \mathbb{R}^3$ and $q \in \mathbb{S}^4$ a quaternion, i.e., an origin-centered (hollow) rectangular prism with dimensions $2b$ to which we apply rotation $q$ and then translation $t$ . + +Proposition 3 Let $C$ be a cuboid with parameters $\{b, t, q\}$ and $p \in \mathbb{R}^3$ a point. Then, the signed distance between $p$ and $C$ is + +$$ +\mathrm {d} _ {C} (p) = \left\| \max (d, 0) \right\| _ {2} + \min \left(\max \left(d _ {x}, d _ {y}, d _ {z}\right), 0\right), \tag {11} +$$ + +where $p' = q^{-1}(p - t)q$ using the Hamilton product and $d = (|p_x'|, |p_y'|, |p_z'|) - b$ . + +Inspired by [31], we additionally use a rounded cuboid primitive by introducing a radius parameter $r$ and computing the signed distance by $\mathrm{d}_{RC}(p) = \mathrm{d}_C(p) - r$ . + +A unique advantage of our distance field representation is the ability to perform CSG boolean operations. Since our distances are signed, we can compute the distance to the union of $n$ primitives by taking a minimum over distance + +![](images/cd1ca2aed7319bbd692027123fd3eb3958dc0d021a04b2a8ef81880fef0e3e9a.jpg) +Figure 15: Abstractions of test set chairs using our method and the method of [41]. + +![](images/817b9470b3dcdda2c96c9293317e1898dcc8ce55c646b2457d2642cd999a7a68.jpg) +Figure 16: Cuboid abstractions of test set airplanes. + +fields. With sampling-based methods such as Chamfer distance optimization, care must be taken to avoid sampling interior faces that are not part of the outer surface. + +# 6.2. Experiments + +We train on the airplane and chair categories of ShapeNet Core V2 [7], taking as input a distance field. Thus, our method is fully self-supervised. + +Surface abstraction. In Figure 15, for each ShapeNet chair, we show the our cuboid abstraction, our rounded cuboid abstraction, and the abstraction of [41]. We show our cuboid abstractions of ShapeNet airplanes in Figure 16. Each of our networks outputs 16 primitives, and we discard cuboids with high overlap using the method of [41]. The resulting abstractions capture high-level structures of the input. See supplementary material for additional results. + +Segmentation. Because we place cuboids consistently, we can use them for segmentation. Following [41], we demonstrate on the COSEG chair dataset. We first label each cuboid predicted by our network (trained on ShapeNet chairs) with a segmentation class (seat, back, legs). Then, we generate a cuboid decomposition of each chair in the dataset and segment according to the nearest cuboid. We achieve a mean accuracy of $94.6\%$ , exceeding the $89.0\%$ accuracy of [41]. + +CSG operations. In Figure 17, we show results of a network that outputs parameters for the union of eight rounded cuboids minus eight rounded cuboids. For inputs compatible with this template, we get good results. It is unclear how to achieve unsupervised CSG predictions using Chamfer loss. + +# 7. Conclusion + +Representation is a key theme in deep learning—and machine learning more broadly—applied to geometry. Assorted + +![](images/d7e210038ae999be7e27638f99b5fbc55ccb0ac5f3afb3388d5c17550225c1f9.jpg) +Figure 17: Test set chair CSG abstractions. We predict eight rounded cuboids minus eight other rounded cuboids. + +means of communicating a shape to and from a deep network present varying tradeoffs between efficiency, quality, and applicability. While considerable effort has been put into choosing representations for certain tasks, the tasks we consider have fixed representations for the input and output: They take in a shape as a function on a grid and output a sparse set of parameters. Using distance fields and derived functions as intermediate representations is natural and effective, not only performing well empirically but also providing a simple way to describe geometric loss functions. + +Our learning procedure is applicable to many additional tasks. A natural next step is to incorporate our network into more complex pipelines for tasks like vectorization of complex drawings [3], for which the output of a learning procedure needs to be combined with classical techniques to ensure smooth, topologically valid output. A challenging direction might be to incorporate user guidance into training or evaluation, developing the algorithm as a partner in shape reconstruction rather than generating a deterministic output. + +Our experiments suggest several extensions for future work. The key drawback of our approach is the requirement of closed-form distances for the primitives. While there are many primitives that could be incorporated this way, a fruitful direction might be to alleviate this requirement, e.g. by including flexible implicit primitives like metaballs [4]. We could also incorporate more boolean operations into our pipeline, which easily supports them using algebraic operations on signed distances, in analogy to the CAD pipeline, to generate complex topologies and geometries with few primitives. The combinatorial problem of determining the best sequence of boolean operations for a given input would be particularly challenging even for clean data [10]. Finally, it may be possible to incorporate our network into generative algorithms to create new unseen shapes. + +# 8. Acknowledgement + +The authors acknowledge the generous support of Army Research Office grant W911NF1710068, Air Force Office of Scientific Research award FA9550-19-1-031, of National Science Foundation grant IIS-1838071, National Science Foundation Graduate Research Fellowship under Grant No. 1122374, from an Amazon Research Award, from the MIT-IBM Watson AI Laboratory, from the Toyota-CSAIL Joint Research Center, from a gift from Adobe Systems, and from the Skoltech-MIT Next Generation Program. + +# References + +[1] Samaneh Azadi, Matthew Fisher, Vladimir Kim, Zhaowen Wang, Eli Shechtman, and Trevor Darrell. Multi-content gan for few-shot font style transfer. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, volume 11, page 13, 2018. 2, 7 +[2] Elena Balashova, Amit Bermano, Vladimir G. Kim, Stephen DiVerdi, Aaron Hertzmann, and Thomas Funkhouser. Learning a stroke-based representation for fonts. CGF, 2018. 2 +[3] Mikhail Bessmeltsev and Justin Solomon. Vectorization of line drawings via polyvector fields. ACM Transactions on Graphics (TOG), 2019. 8 +[4] James F Blinn. A generalization of algebraic surface drawing. ACM Transactions on Graphics (TOG), 1(3):235-256, 1982. 8 +[5] Gunilla Borgefors. Distance transformations in arbitrary dimensions. Computer vision, graphics, and image processing, 27(3):321-345, 1984. 2 +[6] Neill DF Campbell and Jan Kautz. Learning a manifold of fonts. ACM Transactions on Graphics (TOG), 33(4):91, 2014. 2 +[7] Angel X. Chang, Thomas Funkhouser, Leonidas Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, Jianxiong Xiao, Li Yi, and Fisher Yu. ShapeNet: An Information-Rich 3D Model Repository. Technical Report arXiv:1512.03012 [cs.GR], Stanford University — Princeton University — Toyota Technological Institute at Chicago, 2015. 2, 8 +[8] Christopher B Choy, Danfei Xu, JunYoung Gwak, Kevin Chen, and Silvio Savarese. 3d-r2n2: A unified approach for single and multi-view 3d object reconstruction. In European conference on computer vision, pages 628-644. Springer, 2016. 2 +[9] Angela Dai, Charles Ruizhongtai Qi, and Matthias Nießner. Shape completion using 3d-encoder-predictor cnns and shape synthesis. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), volume 3, 2017. 2 +[10] Tao Du, Jeevana Priya Inala, Yewen Pu, Andrew Spielberg, Adriana Schulz, Daniela Rus, Armando Solar-Lezama, and Wojciech Matusik. Inversecsg: Automatic conversion of 3d models to csg trees. In SIGGRAPH Asia 2018 Technical Papers, page 213. ACM, 2018. 8 +[11] David S Ebert and F Kenton Musgrave. Texturing & modeling: a procedural approach. Morgan Kaufmann, 2003. 3 +[12] Haoqiang Fan, Hao Su, and Leonidas J Guibas. A point set generation network for 3d object reconstruction from a single image. In CVPR, volume 2, page 6, 2017. 1, 2 +[13] Jorge Fuentes-Pacheco, José Ruiz-Ascencio, and Juan Manuel Rendon-Mancha. Visual simultaneous localization and mapping: a survey. Artificial Intelligence Review, 43(1):55–81, 2015. 2 +[14] Vignesh Ganapathi-Subramanian, Olga Diamanti, Soeren Pirk, Chengcheng Tang, Matthias Niessner, and Leonidas Guibas. Parsing geometry using structure-aware shape templates. In 2018 International Conference on 3D Vision (3DV), pages 672–681. IEEE, 2018. 2 + +[15] Jun Gao, Chengcheng Tang, Vignesh Ganapathi-Subramanian, Jiahui Huang, Hao Su, and Leonidas J Guibas. Deepspline: Data-driven reconstruction of parametric curves and surfaces. arXiv preprint arXiv:1901.03781, 2019. 2 +[16] Kyle Genova, Forrester Cole, Daniel Vlasic, Aaron Sarna, William T. Freeman, and Thomas Funkhouser. Learning shape templates with structured implicit functions. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2019. 2 +[17] Thibault Groueix, Matthew Fisher, Vladimir G. Kim, Bryan Russell, and Mathieu Aubry. AtlasNet: A Papier-Mâché Approach to Learning 3D Surface Generation. In Proceedings IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2018. 1, 2, 5, 6 +[18] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 4 +[19] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. CVPR, 2017. 1 +[20] Vladimir G Kim, Wilmot Li, Niloy J Mitra, Siddhartha Chaudhuri, Stephen DiVerdi, and Thomas Funkhouser. Learning part-based templates from large collections of 3d shapes. ACM Transactions on Graphics (TOG), 32(4):70, 2013. 2 +[21] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. International Conference on Learning Representations, 12 2014. 4 +[22] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097-1105, 2012. 1 +[23] Yiyi Liao, Simon Donne, and Andreas Geiger. Deep marching cubes: Learning explicit surface representations. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2916-2925, 2018. 2 +[24] Xia Liu and Kikuo Fujimura. Hand gesture recognition using depth data. In Proc. 6th IEEE Int. Conf. Automatic Face Gesture Recog., page 529. IEEE, 2004. 1, 2 +[25] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3431-3440, 2015. 1 +[26] Kaichun Mo, Paul Guerrero, Li Yi, Hao Su, Peter Wonka, Niloy Mitra, and Leonidas Guibas. Structurenet: Hierarchical graph networks for 3d shape generation. ACM Transactions on Graphics (TOG), Siggraph Asia 2019, 38(6):Article 242, 2019. 2 +[27] Chengjie Niu, Jun Li, and Kai Xu. Im2struct: Recovering 3d shape structure from a single rgb image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4521-4529, 2018. 2 +[28] Peter O'Donovan, Janis Libeks, Aseem Agarwala, and Aaron Hertzmann. Exploratory font selection using crowdsourced attributes. ACM Transactions on Graphics (TOG), 33(4):92, 2014. 2 + +[29] Maks Ovsjanikov, Wilmot Li, Leonidas Guibas, and Niloy J Mitra. Exploration of continuous variability in collections of 3d shapes. In ACM Transactions on Graphics (TOG), volume 30, page 33. ACM, 2011. 2 +[30] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2 +[31] Despoina Paschalidou, Ali Osman Ulusoy, and Andreas Geiger. Superquadrics revisited: Learning 3d shape parsing beyond cuboids. In Proceedings IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2019. 2, 7 +[32] Huy Quoc Phan, Hongbo Fu, and Antoni B Chan. Flexyfont: Learning transferring rules for flexible typeface synthesis. In Computer Graphics Forum, volume 34, pages 245-256. Wiley Online Library, 2015. 2 +[33] Zheng Qin, Michael D McCool, and Craig S Kaplan. Real-time texture-mapped vector glyphs. In Proceedings of the 2006 symposium on Interactive 3D graphics and games, pages 125-132. ACM, 2006. 4 +[34] Adriana Schulz, Ariel Shamir, Ilya Baran, David IW Levin, Pitchaya Sitthi-Amorn, and Wojciech Matusik. Retrieval on parametric shape collections. ACM Transactions on Graphics (TOG), 36(1):11, 2017. 2 +[35] Steven M Seitz, Brian Curless, James Diebel, Daniel Scharstein, and Richard Szeliski. A comparison and evaluation of multi-view stereo reconstruction algorithms. In CVPR, 2006. 2 +[36] Chao-Hui Shen, Hongbo Fu, Kang Chen, and Shi-Min Hu. Structure recovery by part assembly. ACM Transactions on Graphics (TOG), 31(6):180, 2012. 2 +[37] David Stutz and Andreas Geiger. Learning 3d shape completion under weak supervision. International Journal of Computer Vision, pages 1-20, 2018. 2 +[38] Hang Su, Subhransu Maji, Evangelos Kalogerakis, and Erik Learned-Miller. Multi-view convolutional neural networks for 3d shape recognition. In Proceedings of the IEEE international conference on computer vision, pages 945-953, 2015. 2 +[39] Chunyu Sun, Qianfang Zou, Xin Tong, and Yang Liu. Learning adaptive hierarchical cuboid abstractions of 3d shape collections. ACM Transactions on Graphics (SIGGRAPH Asia), 38(6), 2019. 2 +[40] Rapee Suveeranont and Takeo Igarashi. Example-based automatic font generation. In International Symposium on Smart Graphics, pages 127-138. Springer, 2010. 2 +[41] Shubham Tulsiani, Hao Su, Leonidas J Guibas, Alexei A Efros, and Jitendra Malik. Learning shape abstractions by assembling volumetric primitives. In Proc. CVPR, volume 2, 2017. 1, 2, 8 +[42] Nobuyuki Umetani, Takeo Igarashi, and Niloy J Mitra. Guided exploration of physically valid shapes for furniture design. ACM Trans. Graph., 31(4):86-1, 2012. 2 +[43] Paul Upchurch, Noah Snavely, and Kavita Bala. From a to z: supervised transfer of style and content using deep neural network generators. arXiv preprint arXiv:1603.02003, 2016. 2 + +[44] Jun-Yan Zhu, Richard Zhang, Deepak Pathak, Trevor Darrell, Alexei A Efros, Oliver Wang, and Eli Shechtman. Toward multimodal image-to-image translation. In Advances in Neural Information Processing Systems, pages 465-476, 2017. 4 \ No newline at end of file diff --git a/deepparametricshapepredictionsusingdistancefields/images.zip b/deepparametricshapepredictionsusingdistancefields/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..d7b073e491ea1a43d8b4cdeeed5783fc1a2fa483 --- /dev/null +++ b/deepparametricshapepredictionsusingdistancefields/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d9e6e463b496b039b7a732cced7f2988858c694a54584b2ec5eef0d14e0e922 +size 589928 diff --git a/deepparametricshapepredictionsusingdistancefields/layout.json b/deepparametricshapepredictionsusingdistancefields/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..30db4477530d03147547d5abd302fff065b1e8ff --- /dev/null +++ b/deepparametricshapepredictionsusingdistancefields/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ef4ff32e6f9c5ac8fb089c13fc8f9547493801290107dfb883f01a244d19ab1 +size 445921 diff --git a/deeppolarizationcuesfortransparentobjectsegmentation/61a38bd8-d631-436b-baf8-2d233909eb18_content_list.json b/deeppolarizationcuesfortransparentobjectsegmentation/61a38bd8-d631-436b-baf8-2d233909eb18_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..320b508c7ef5d4cd1000b403a34e2ca8f0cf22f0 --- /dev/null +++ b/deeppolarizationcuesfortransparentobjectsegmentation/61a38bd8-d631-436b-baf8-2d233909eb18_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3838c8878a06dc7f0b970581600f4c21c1bee9154021e7204c1dea55dac589df +size 77952 diff --git a/deeppolarizationcuesfortransparentobjectsegmentation/61a38bd8-d631-436b-baf8-2d233909eb18_model.json b/deeppolarizationcuesfortransparentobjectsegmentation/61a38bd8-d631-436b-baf8-2d233909eb18_model.json new file mode 100644 index 0000000000000000000000000000000000000000..fd0a2dc5d0b0187f1e00c6ed3022ae2b9c61f0d6 --- /dev/null +++ b/deeppolarizationcuesfortransparentobjectsegmentation/61a38bd8-d631-436b-baf8-2d233909eb18_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30d80b6fbc14984f0aae3b983db4418210c674f088af5556d7b75be3eb4841ac +size 98181 diff --git a/deeppolarizationcuesfortransparentobjectsegmentation/61a38bd8-d631-436b-baf8-2d233909eb18_origin.pdf b/deeppolarizationcuesfortransparentobjectsegmentation/61a38bd8-d631-436b-baf8-2d233909eb18_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..575b3f82fbbc00d34267eac44a9a50c436f9cf9d --- /dev/null +++ b/deeppolarizationcuesfortransparentobjectsegmentation/61a38bd8-d631-436b-baf8-2d233909eb18_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:884f7473639470f510421b73e59e6e97da6eb6c50de90111db265b47bb0d50b1 +size 1347787 diff --git a/deeppolarizationcuesfortransparentobjectsegmentation/full.md b/deeppolarizationcuesfortransparentobjectsegmentation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..c1617bfb8eefc48fb5a3caf3e48c2c28c69ad005 --- /dev/null +++ b/deeppolarizationcuesfortransparentobjectsegmentation/full.md @@ -0,0 +1,351 @@ +# Deep Polarization Cues for Transparent Object Segmentation + +Agastya Kalra1, Vage Taamazyan1, Supreeth Krishna Rao1, Kartik Venkataraman1, Ramesh Raskar*1,2, and Achuta Kadambi*1,3 + +Akasha Imaging + +2MIT Media Lab + +3University of California, Los Angeles (UCLA) + +# Abstract + +Segmentation of transparent objects is a hard, open problem in computer vision. Transparent objects lack texture of their own, adopting instead the texture of scene background. This paper reframes the problem of transparent object segmentation into the realm of light polarization, i.e., the rotation of light waves. We use a polarization camera to capture multi-modal imagery and couple this with a unique deep learning backbone for processing polarization input data. Our method achieves instance segmentation on cluttered, transparent objects in various scene and background conditions, demonstrating an improvement over traditional image-based approaches. As an application we use this for robotic bin picking of transparent objects. + +# 1. Introduction + +Transparent objects occur in manufacturing, life sciences, and automotive industries. In contrast to conventional objects, transparent objects lack texture of their own. As a result, it is hard to segment transparent objects captured with standard imaging—segmentation algorithms do not have any texture to latch on to. In this paper, we bring transparent object segmentation to the realm of polarization imaging. As shown in Figure 1, the polarization imagery of transparent objects visualizes their very unique texture. There is a geometry-dependent signature on edges and a very unique pattern arises in the angle of linear polarization. The object's intrinsic texture is more visible in the polarization than in just in the intensity. Unfortunately, the peculiar texture of polarization requires re-examination for deep learning in the context of polarization imagery. + +![](images/0b7f596fbe495b61403e215c035aba296cc8509791747cf6118606bd6ee87f09.jpg) +(a) Intensity Image - 2 of the above balls are printouts + +![](images/ccb9035cb0cf59ac746662bf0f1a8914aa5d225548e89f4483c3f08542327f69.jpg) +(b) Mask-RCNN Segmentation - detects two false positives + +![](images/429635b3a058156317fefd4f4db130677a12a588fe9e550aedba5c8bb8a5c307.jpg) +(c) Angle of Polarization - easily separates real ball from printout + +![](images/26d570563aff76d4408f88e37e9aebc0cde963f3cf0a59debcd61de0c1618d84.jpg) +(d) Our Segmentation - detects no false positives +Figure 1: Polarized CNNs leverage unique texture from polarized imagery for robust segmentation. Standard instance segmentation is unable to differentiate between a print-out spoof and a real ball. Our segmentation is able to robustly segment the real ball using the unique polarization texture. Our paper studies this textural motif and designs a customized deep learning architecture. + +In this paper, we introduce a new deep learning framework for polarization-based segmentation of transparent objects. We refer to our framework as a Polarized Convolutional Neural Network (Polarized CNN). Our framework consists of a novel backbone that is suitable for processing the peculiar texture of polarization and can be coupled with architectures like Mask R-CNN (e.g. Polarized Mask R-CNN) to produce accurate and robust solution for instance segmentation of transparent objects. We summarize our + +
MethodClutter AccuracyEnvironment AssumptionPrint-Out spoofsSensorsPhysical Limitations
Intensity Mask R-CNN [19]MediumSeen during TrainingNot robust1Optical
Light Field [45]Not designed for instance segmentationNoneRobust1Range limits
RGBD [44, 12]Not designed for instance segmentationIndoorsRobust2+Range limits
Polarized CNN ProposedMedium-HighNoneRobust1Optical
+ +Table 1: Polarization input has a large application scope. It is monocular - therefore only optically limited, works in cluttered conditions, robust to novel backgrounds and lighting conditions, and robust to print-out spofs. Other modalities suffer in at least one of these categories. + +contributions as: + +- A robust method for transparent object instance segmentation that outperforms previous methods. +- Polarized CNNs: an attention-fusion based framework to process polarization data. We compare against several simpler Polarization + CNN baselines in a detailed ablation study. +- The first single-frame monocular instance segmentation approach that is significantly more robust to print-out spoofs. +- Application scenario: using Polarized CNNs in the context of robotic bin picking of cluttered transparent balls. + +# 2. Scientific Background and Related Work + +Difficulty of Transparency The interaction between light and transparent objects is rich and complex, but the material of an object determines its transparency in visible light. For many household objects, the majority of visible light passes straight through and a small portion ( $\sim 4 - 8\%$ dependent on the refractive index) is reflected. This is because visible wavelengths are insufficient in energy to excite atoms in the transparent object. This leads the texture behind the object to dominate the image. This unique property leads to the following difficulties when attempting instance segmentation. + +1. Clutter: Clear edges are hard to see in densely cluttered scenes with transparent objects. In extreme cases, the edges are not visible at all (see Figure 3 (b) for an example), creating ambiguities in the exact shape of the objects [45, 12]. +2. Novel Environments: Low reflectivity in the visible spectrum causes these objects to appear different, out-of-distribution, in novel environments leading to poor generalization. + +3. Print-Out Spoofs: Any algorithm using a single RGB image is very susceptible to print-out spoofs [46, 24] due to the perspective ambiguity. While other non-monocular algorithms for semantic segmentation of transparent objects exist [45, 44], they are range limited and unable to handle instance segmentation (see Table 1). + +Physics of Polarization Image Formation A light ray hitting the camera has three measured components: the intensity of light (intensity image/I), the percentage of light that is linearly polarized (degree of linear polarization/DOLP/ρ) and the direction of that linear polarization (angle of linear polarization/AOLP/φ). These properties encode information about the surface curvature and material of the object being imaged [4]. Measuring I, ρ, and φ at each pixel requires 3+ images of a scene taken behind a polarizing filter at different angles, φpol. Then we solve for φ, ρ, I using the following equation: + +$$ +I _ {\phi_ {p o l}} = I (1 + \rho \cos (2 (\phi - \phi_ {p o l}))). \tag {1} +$$ + +In our case we use a FLIR Blackfly S multi-polar camera that gives us $I_{0}, I_{45}, I_{90}, I_{135}$ in a single capture. + +Shape from Polarization (SfP) theory [4] gives us the following relationship between the refractive index $(n)$ , azimuth angle $(\theta_{a})$ and zenith angle $(\theta_{z})$ of the surface normal of an object and the $\phi$ and $\rho$ components of the light ray coming from that object. When diffuse reflection is dominant: + +$$ +\begin{array}{l} \rho = \frac {\left(n - \frac {1}{n}\right) ^ {2} \sin^ {2} \left(\theta_ {z}\right)}{2 + 2 n ^ {2} - \left(\left(n + \frac {1}{n}\right) ^ {2} \sin^ {2} \theta_ {z} + 4 \cos \theta_ {z} \sqrt {n ^ {2} - \sin^ {2} \theta_ {z}}\right)}, (2) \\ \phi = \theta_ {a}. (3) \\ \end{array} +$$ + +And when the specular reflection is dominant: + +$$ +\begin{array}{l} \rho = \frac {2 \sin^ {2} \theta_ {z} \cos \theta_ {z} \sqrt {n ^ {2} - \sin^ {2} \theta_ {z}}}{n ^ {2} - \sin^ {2} \theta_ {z} - n ^ {2} \sin^ {2} \theta_ {z} + 2 \sin^ {4} \theta_ {z}}, (4) \\ \phi = \theta_ {a} - \frac {\pi}{2}. (5) \\ \end{array} +$$ + +Note that in both cases $\rho$ increases exponentially as $\theta_z$ increases and if the refractive index is the same, specular reflection is much more polarized than diffuse reflection. + +Deep Instance Segmentation: There are many approaches for deep instance segmentation: semantic segmentation based [5, 20, 3], proposal-based [14], and even RNN based [36, 34]. Our framework can be applied to any of them. In this work we focus on the state-of-the-art Mask R-CNN [14] architecture. Mask R-CNN works by taking an input image $x$ , which is an HxWx3 tensor of image intensity values, and running it through a backbone network: + +$C = B(x)$ . $B(x)$ is responsible for extracting useful features from the input image and can be any standard CNN architecture e.g. ResNet-101 [15]. The backbone network outputs a set of tensors, $C = \{C_1,C_2,C_3,C_4,C_5\}$ , where each tensor $C_i$ represents a different resolution feature map. These feature maps are then combined in a feature pyramid network (FPN) [22], processed with a region proposal network (RPN) [35], and finally passed through an output subnetwork [35, 14] to produce classes, bounding boxes, and pixel-wise segmentations. These are merged with nonmaximum suppression for instance segmentation. More details are available in [14]. + +Deep Learning for Multi-Modal Input Deep learning has been used to combine many modalities including depth and RGB [11, 43, 24], polarimetric and RGB [47] and more [46, 43, 41]. All of these architectures have unique backbones for each input signal. The depth at which they are fused classifies them as one of the following: early-fusion[43], mid-fusion [33] and late-fusion [47]. In this work we apply mid-fusion, as described in [33], since it is easily extendable to Mask R-CNN. Mid-fusion is defined as follows: Assume there are two input images $x_{a}$ and $x_{b}$ . First, each image is fed into a unique backbone $B_{a}(x_{a})$ and $B_{b}(x_{b})$ , then the output of each backbone is fused at each scale $i$ with a fusion function $f$ . + +$$ +C _ {i} = f \left(C _ {i a}, C _ {i b}\right). \tag {6} +$$ + +There are four main fusion methods: + +- $C_{ia} + C_{ib}$ addition/averaging of the tensors [11]. +- $G([C_{ia}, C_{ib}])$ concatenation of the tensors along the depth axis followed by a 1x1 Convolution $G$ to reduce dimensionality [32, 33]. +- $w_{ia}C_{ia} + w_{ib}C_{ib}$ mixture of experts (MoE) [28, 43] where a sub-network predicts two scalar weights $w_{ia}$ and $w_{ib}$ such that $w_{ia} + w_{ib} = 1$ allowing the network to dynamically weight each input. +- $G([SE(C_{ia}), SE(C_{ib})]$ and squeeze-excitation (SE) fusion [46] where each input tensor has its channels re-weighted using an SE block [16] and then follows the concatenation procedure above. + +None of these fusion methods allow for spatially dynamic weighting. + +Transparent Object Instance Segmentation Previous work [19, 21] uses deep learning trained on existing RGB image datasets [7, 23, 13] for detection of transparent objects. These can easily be extended to instance segmentation by replacing the SSD [19] or R-CNN [21] with Mask R-CNN [14]. We call this Intensity Mask R-CNN and use this as our baseline. + +There are several other approaches to do detection and segmentation with more complex imaging setups that would + +be more robust to print-out proofs. However these approaches are not extendable to instance segmentation. Multiple existing approaches use an RGB + depth sensor (e.g. Kinect) to do transparent object segmentation [44, 12, 39], pose estimation [25, 26] and even 3D reconstruction [38, 2]. However, in a cluttered environment a depth sensor provides no information on instance boundaries for transparent objects. Other approaches also include using light field information for segmentation [45] and camera motion utilization for shape reconstruction of transparent objects [6]. + +Polarization in Computer Vision Shape from polarization can be used for 3D reconstruction of objects such as shiny metals [30], diffuse dielectrics [4], and transparent/translucent objects [29, 37, 8]. Polarization is also used for problems in 3D imaging [17, 10, 18, 49], reflection separation [31, 40], face scanning [27], underwater de-scattering [42], and semantic segmentation [48]. + +Polarization for semantic segmentation of roads [47] is the only other work using polarization with deep learning. They do not treat it as multi-modal fusion, rather they concatenate $[I_0, I_{45}, I_{90}, I_{135}]$ and feed it to a deep network. While this works, the model struggles to learn the physical priors, which leads to poor performance. Our framework leverages the physics of polarization described in equation 1 to create three unique input images $I$ , $\rho$ , and $\phi$ . These images a fused in a multi-modal fashion in our unique backbone. + +# 3. Our Method + +In what follows, we derive the polarization image formation model, motivate why this image contains better texture for transparent object segmentation, and then present our Polarized CNN framework for adding those cues in deep learning models. + +# 3.1. Polarization Image Formation (Transparency) + +Light rays coming from a transparent objects have two components: a reflected portion, consisting of $I_{r}$ , $\rho_{r}$ , $\phi_{r}$ and the refracted portion $I_{t}$ , $\rho_{t}$ , $\phi_{t}$ . The intensity of a single pixel in the resulting image can be written as: + +$$ +I = I _ {r} + I _ {t}. \tag {7} +$$ + +When we add a polarizing filter in front of the camera we get: + +$$ +I _ {\phi_ {p o l}} = I _ {r} \left(1 + \rho_ {r} \cos \left(2 \left(\phi_ {r} - \phi_ {p o l}\right)\right)\right) + I _ {t} \left(1 + \rho_ {t} \cos \left(2 \left(\phi_ {t} - \phi_ {p o l}\right)\right)\right). \tag {8} +$$ + +To understand the impact this has on our measured $\rho$ and $\phi$ from 1, we solve for $\rho$ and $\phi$ in terms of $I_{r},\rho_{r},\phi_{r},I_{t},\rho_{t},\phi_{t}$ + +$$ +\rho = \frac {\sqrt {\left(I _ {r} \rho_ {r}\right) ^ {2} + \left(I _ {t} \rho_ {t}\right) ^ {2} + 2 I _ {t} \rho_ {t} I _ {r} \rho_ {r} \cos \left(2 \left(\phi_ {r} - \phi_ {t}\right)\right)}}{I _ {r} + I _ {t}}, \tag {9} +$$ + +![](images/7712c6f429cffbad265aa06e18e298243be98877ec81d9defb9fc9e547175e1d.jpg) +Background object + +$$ +\phi = \arctan \left(\frac {I _ {r} \rho_ {r} \sin \left(2 \left(\phi_ {r} - \phi_ {t}\right)\right)}{I _ {t} \rho_ {t} + I _ {r} \rho_ {r} \cos \left(2 \left(\phi_ {r} - \phi_ {t}\right)\right)}\right) + \phi_ {r}. \tag {10} +$$ + +Equations 7, 9, and 10 give us the image formation model for $I$ , $\rho$ , and $\phi$ in the case of transparency. We use these equations to show the superiority of the $\rho$ and $\phi$ images for transparent object segmentation when compared to $I$ . We verify this through an ablation analysis in Table 3 rows 1-3. + +Here we motivate why $\rho$ and $\phi$ can show texture when objects appear textureless in $I$ . An object's texture appears invisible in $I$ because it is strictly dependent on the ratio of $\frac{I_r}{I_t}$ (see equation 7). Unlike opaque objects where $I_t = 0$ , transparent objects transmit most light and only reflect a small portion. This is why we bring this problem into the realm of polarization, where the strength of a transparent objects texture is instead dependent on $\phi_r - \phi_t$ and the ratio of $\frac{I_r\rho_r}{I_t\rho_t}$ (see equations 9, 10). We can safely assume that $\phi_r \neq \phi_t$ and $\theta_{zr} \neq \theta_{zt}$ for the majority of pixels, i.e. the geometry of the background and transparent object are different. And we know that $\rho_r$ follows the specular reflection curve [29], meaning it is highly polarized, and at Brewster's angle (approx. $60^{\circ}$ ), it is 1.0 (see equation 4). Therefore we can be certain that at the appropriate zenith angles, $\rho_r \geq \rho_t$ , and if the background is diffuse or has a low zenith angle, $\rho_r \gg \rho_t$ . We can see this effect in Figure 1 where the sphere's texture dominates when $\theta_z \approx 60^\circ$ . This leads us to believe that in many cases: + +$$ +\frac {I _ {r}}{I _ {t}} \leq \frac {I _ {r} \rho_ {r}}{I _ {t} \rho_ {t}}. \tag {11} +$$ + +![](images/70cf811e8ae3cd746a991af234ea3225b3cc667cc50ed08ffe1621b6d95f307a.jpg) + +![](images/21556435285c64be4b0bf54bc613f9760b6b0a2c5052806cf87e86f2cf0eacb9.jpg) + +![](images/5fabe6dfc2a2e131ecf7ee544ee54255900d31edbb0dc7e204c0a57e406e02b4.jpg) +Figure 2: Polarization image formation model for transparent objects. A light ray hitting the multi-polar sensor contains polarization information from both a transparent object and the background object. The small fraction of reflected light from a transparent object is heavily polarized, and thus has a large impact on the polarization measurement. +Figure 3: The polarization texture of the transparent objects improves input quality.(a) The texture of the 2 balls is inconsistent in the intensity image due to the change in background, highlighting problem (2). In the DOLP this doesn't happen. (b) The edge is practically invisible in the intensity image, but is much brighter in the AOLP. (c) A cross-section of the edge shows the edge has much higher contrast in the AOLP and DOLP when compared to the intensity. + +![](images/6f7a825a27a5e53f2f0c907769a7cae75ca6ddcfd01500ca9f9b017f2c5cddd7.jpg) +(a) + +![](images/6e43d7f818a0de55b31aae83b0c55c0b8e484a4d09c89ec7b72898e768a71133.jpg) + +![](images/e51138af35755eeb882d311dcc4d7e84744e587ac3666c33347bee6cb7180f4c.jpg) +(b) + +![](images/558bd7734ac9b961cdcd66f0a94e1d45b91643616e6f3e44ffd5f598e4d3ee55.jpg) + +![](images/6715a1720bb45fbf18929ae6fabd0df374e74ddb8a1a57ce5788e14205f58d4e.jpg) +(c) + +Thus even if the texture of the transparent object appears invisible in $I$ , it may be more visible in $\phi$ and $\rho$ , motivating this paper. We discuss specific cases further in the supplement and discuss the implications on the key problems below. + +Clutter In clutter, a key difficulty lies in seeing the edges of a texture-less transparent object, see Figure 3 (b) and (c) for an example. Since the texture appears more visible in $\phi$ and $\rho$ , some edges are better visible. + +Novel Environments Other than increasing the strength of the transparent object texture, the $\rho$ image also reduces the impact of diffuse backgrounds like textured clothes. This allows the transparent object to appear similar even though the environment has changed. We show an example in Figure 3 (a) and verify the effectiveness in Table 3. + +Print-Out Spoofs Paper is flat, leading to a mostly uniform $\phi$ and $\rho$ . Transparent objects have some amount of surface variation, which will appear very non-uniform in $\phi$ and $\rho$ as shown in Figure 1. + +![](images/e44ad243b04643ef2f13f55d4f5edfcd31fb3fcddf2571498e7bf3740fbe7c06.jpg) +Figure 4: Our Polarized CNN framework applied to Mask-RCNN. We use three separate backbones and merge them with attention-fusion to produce high quality instance segmentation with Mask R-CNN. See Section 3.2. + +# 3.2. Polarized CNN Framework: + +Polarized CNNs, as shown applied to Mask R-CNN in Figure 4, is a framework for effectively leveraging the extra information contained in polarized images using deep learning. Applying this framework requires three changes to a CNN architecture: (1) Input Image: Applying the physical equations of polarization to create the right input images. (2) Attention-fusion Polar Backbone: Treating the problem as a multi-modal fusion problem. (3) Geometric Data Augmentations: Correctly augmenting the data to reflect the physics of polarization. + +Input Image We propose feeding in three input images: the AOLP $(\phi)$ , the DOLP $(\rho)$ , and the intensity image $(I)$ from equation 1 as the optimal input for transparent object. These images are computed from $I_0, I_{45}, I_{90}$ , and $I_{135}$ , normalized to be in the range [0-255] and turned into three-channel gray scale images to allow for easy transfer learning from MSCoCo [23] pre-trained weights. + +Multi-Modal Fusion Each input image is fed through a unique backbone: $B_{I}(I), B_{\rho}(\rho), B_{\phi}(\phi)$ . We propose a + +![](images/898443781b126a64bb3b2e28dff598a44ad43fe53ae9a201078cce1387e95629.jpg) + +![](images/f5bd4d6ca9899aace63017b893eae02dfd9e143febdef8d3f83a73da791f65a0.jpg) + +![](images/66d8e3502c92c75c5b0458ef3355b2febd9bfd646741a6fc495aa4850c837218.jpg) + +![](images/827cdd130ea1141b550ec3102e2bc8adae853e2754b3b3fdd0a8ea14b1678163.jpg) + +![](images/b4f6524b3097b4ab021679988396c56efc4068360ba8fbb000db54c9c0cebecf.jpg) +Figure 5: Our attention module allows for interpretable multi-modal fusion. The learned attention weights are brightest on the AOLP and DOLP to avoid the ambiguous print-out spoof in the intensity image. More examples available in the supplement. + +![](images/aae654075cbf9da5203e518aa6726cdedb0b93890a182eacc8ab408e18159b08.jpg) + +![](images/4c37dd4df816b5860ce60a07c4da7abbfc058a1928eea51d7151c2008e460417.jpg) +AOLP + +![](images/bd21adf3c0220dabfefe738755b065401121efb5b04ebe77d09bd4ae3e194608.jpg) +Ground Truth + +novel spatially-aware attention-fusion mechanism to perform multi-modal fusion. The output feature maps from each backbone $B_{I}$ , $B_{\rho}$ , $B_{\phi}$ at each scale $i$ , $C_{i,I}$ , $C_{i,\rho}$ , $C_{i,\phi}$ are concatenated and processed through a set of convolutional layers $\Omega_{i}$ . $\Omega_{i}$ outputs a 3-channel image with the same height and width as the input. This is followed by a softmax giving us pixel-wise attention weights $\alpha$ : + +$$ +[ \alpha_ {i, \phi}, \alpha_ {i, \rho}, \alpha_ {i, I} ] = \operatorname {s o f t m a x} \left(\Omega_ {i} \left([ C _ {i, \phi}, C _ {i, \rho}, C _ {i, I} ]\right)\right). \tag {12} +$$ + +These attention weights are used to perform a weighted average per channel: + +$$ +C _ {i} = \alpha_ {i, \phi} C _ {i, \phi} + \alpha_ {i, \rho} C _ {i, \rho} + \alpha_ {i, I} C _ {i, I}. \tag {13} +$$ + +The attention module allows the model to weight the different inputs depending on how relevant they are to a given portion of the scene. Results are available in Table 2 and discussion in Section 4. Figure 4 describes this model and architecture in detail. Attention maps are visualized in Figure 5 and in the supplement. + +Geometric Data Augmentations In small training datasets, affine transformations are an important data augmentation to achieve good generalization performance. Naively applying this to the $\phi$ image doesn't work. The AOLP is an angle from 0-360 that reflects the direction of the electromagnetic wave with respect to the camera coordinate frame. If a rotation operator is applied to the image, then this is the equivalent of rotating the camera around its Z-axis. This rotation will change the orientation of the xy plane of the camera, and thus will change the relative direction of the wave. To account for this change, the pixel values of the AOLP must be rotated accordingly in the opposite direction. We apply this same principal to other affine transformations. This is key to achieving good performance as we show later in Section 4. + +![](images/b28f557a0c2483a347aadd1e2745d595f9d6d37a00758cc00ee6da1a6351a6a2.jpg) +Figure 6: Qualitative comparisons showing improvement from Intensity to Polarized Mask R-CNNs. (a) Polarization helps accurately segment clutter where it is ambiguous in the intensity image. (b) The Intensity Mask R-CNN completely fails to adapt to the novel environment while the polar model succeeds. (c) The Intensity Mask R-CNN is fooled by the printed paper however the Polarized Mask R-CNN is robust. (d) An example image from our robotic bin picking application. Polarization adapts better to this novel environment with poor lighting. + +# 4. Experiments + +We perform a thorough set of experiments to determine the effectiveness of the proposed Polarized CNN and each individual component. + +# 4.1. Experimental Details + +Implementation To conduct the experiments, we use a keras [9] implementation of Mask R-CNN [1]. All experiments were run on an AWS p3.2xlarge instance with a single P100 GPU. + +Training Data Our transparent object training set contains 1000 images with over 20000 instances of transparent objects in 15 unique environments from a 6 possible classes: plastic cups, plastic trays, glasses, ornaments, and other. + +Evaluation Data We construct 4 test sets to properly evaluate problems (1)-(3). An example image from each test set is available in Figure 6. + +- Clutter This test set contains 200 images of cluttered transparent objects in environments similar to the training set with no print-outs - used to test problem (1). +- Novel Environments (Env) This test set contains 50 images taken of 6 objects per image with environments not available in the training set. The backgrounds contain harsh lighting, textured cloths, shiny metals, and more - testing problem (2). +- Print-Out Spoofs (POS) This test set contains 50 images, each containing a 1-6 printed objects and 1-2 real objects. +- Robotic Bin Picking (RBP) This set contains 300 images taken from a live demo of our robotic arm picking up ornaments. This set is used to test the instance segmentation performance in a real world application. + +For each dataset, we use two metrics to measure accuracy: mean average precision in range of IoUs 0.5-0.7 + +$(mAP_{5:7})$ , and mean average precision in the range of IoUs 0.75-0.9 $(mAP_{75:9})$ . These two metrics measure coarse segmentation and fine-grained segmentation respectively. To further test generalization, we test all models on object detection as well using the Faster R-CNN component of Mask R-CNN. + +Capture Setup All images are taken with a Flir Blackfly S Monochrome Polar Camera. To allow all models to be trained on the exact same set of images, the intensity baseline is done with monochrome images. This is fair because the transparent objects in our dataset are colorless, RGB data does not add value for transparent object segmentation. We verify this in the supplement. + +# 4.2. Polarized vs. Intensity Mask R-CNN + +We test the Intensity Mask R-CNN [19] and our Polarized Mask R-CNN on the four test sets mentioned above. Qualitative examples from each dataset are visible in Figure 6 and quantitative results in Table 2. Our average improvement in coarse segmentation is $14.3\%$ mAP, and in fine-grained segmentation is $17.2\%$ mAP. The performance improvement in problem (1) is more visible when doing fine-grained segmentation where the gap in performance goes from $1.1\%$ mAP to $4.5\%$ mAP. This supports our thesis that polarization data provides useful edge information allowing the model to more accurately segment objects. For generalization to new environments we see much larger gains for both fine-grained and coarse segmentation supporting our thesis that the intrinsic texture of a transparent object appears more visible in the polarized images. Our architecture shows a similarly large improvement in robustness against print-out spools, achieving almost $90\%$ mAP. This demonstrates a monocular solution that is robust to perspective projection issues such as print-out spools. All of these results help explain the dramatic improvement in performance shown for an uncontrolled and cluttered environment like Robotic Bin Picking (RBP). The results in Table 2 highlight the benefits of Polarized CNNs for robust instance segmentation of transparent objects. + +# 4.3. Polarization + CNN Comparisons + +We create many different Polarization $+$ CNN baselines to compare against our Polarized CNNs framework. + +Input Images Our first set of baselines uses the following inputs independently, $\rho$ , $\phi$ , $I$ [19], and $I_0 - I_{135}$ [47]. We train a Mask R-CNN on each input type, and test all on four test sets in Table 3. Each input is good for a different problem. Both $\phi$ and $\rho$ are much better than $I$ at avoiding print-out proofs. $\rho$ is the most useful signal on the RBP and Env datasets. $I$ is the best at handling cluttered environments previously seen. It achieves the slightly better performance on the Clutter test set, but is significantly worse + +in all 3 other test sets. [46]'s method for processing polar input performs is worse than $\rho$ in novel backgrounds and worse than $\phi$ at avoiding print-out proofs. Hence the first four rows of Table 3 show that while using all 4 channels independently, as in [47] is good, there is more to be gained by adopting physical priors in the deep learning model by using $\rho$ and $\phi$ . + +Multi-Modal Fusion After verifying that $I$ , $\rho$ , and $\phi$ are the appropriate input channels, we evaluate the different fusion method baselines. We compare to four major standard approaches [11, 33, 28, 46] described in Section 3.2. Overall, attention-based fusion of polarization data leads to improved robustness for transparent object instance segmentation across all tests. We visualize the ablation analysis in the supplement. + +We also demonstrate that multi-modal fusion is necessary by comparing against concatenating all three images into a single 3-channel image and using a single backbone. The model is unable to take advantage of all three channels and learns a very sub-optimal policy which is on average 8 mAP worse than our attention-fusion mechanism. + +Geometric Data Augmentations We verify the necessity for geometrically accurate data augmentations in an ablation study with results reported in Table 4. It shows that using normal augmentations actually hurts performance in some cases, whereas geometric augmentations improve performance across all four test sets. + +# 4.4. Application: Pick and Place + +Bin picking of transparent and translucent (non-Lambertian) objects is an incredibly hard and open problem. To show the difference high quality, robust segmentation makes, we compare Intensity Mask R-CNN with our Polar Mask R-CNN as part of a proof of concept end-to-end system to bin pick different sized cluttered transparent ornaments. + +A bin picking solution contains three components, a segmentation component to isolate each object, a depth estimation component, and a pose estimation component. To understand the effect of segmentation, we use a simple depth estimation and pose where we have the robot arm move to the center of the segmentation and stop when it hits a surface. This only works because the objects are perfect spheres. A slightly inaccurate segmentation can cause an incorrect estimate and a false pick. This application allows us to compare both Polarized Mask R-CNN and Intensity Mask R-CNN. We test our system in 5 tough environments outside the training set. For each environment we stack 15 balls, then measure the number of correct/incorrect (missed) picks the robot arm makes to pick up all 15 balls or makes + +
Evaluation CriteriaMean ScoreClutterEnvPOSRBP
ModelTask\( mAP_{5:7} \)\( mAP_{75:9} \)\( mAP_{5:7} \)\( mAP_{75:9} \)\( mAP_{5:7} \)\( mAP_{75:9} \)\( mAP_{5:7} \)\( mAP_{75:9} \)\( mAP_{5:7} \)\( mAP_{75:9} \)
Intensity Mask R-CNN [19]Instance Seg.0.6560.4540.8780.6890.2810.1460.6850.6160.7790.364
Polarized Mask R-CNN (Ours)Instance Seg.0.7930.6350.8890.7330.5110.3510.8930.8410.8770.614
Intensity Mask R-CNN [19]Detection0.6620.4340.8850.6940.2770.130.6810.5460.8030.364
Polarized Mask R-CNN (Ours)Detection0.7960.6010.8930.7230.5160.2990.8930.7580.8830.624
+ +Table 2: Polarized Mask R-CNN outperforms Intensity Mask R-CNN for both detection and instance segmentation. + +
Model InfoMean ScoreClutterEnvPOSRBP
Input TypeBackbone\( {mAP}_{5:7} \)\( {mAP}_{75:9} \)\( {mAP}_{5:7} \)\( {mAP}_{75:9} \)\( {mAP}_{5:7} \)\( {mAP}_{75:9} \)\( {mAP}_{5:7} \)\( {mAP}_{75:9} \)\( {mAP}_{5:7} \)\( {mAP}_{75:9} \)\( {mAP}_{75:9} \)
\( I_{un} \) [19]ResNet-1010.6560.4540.8780.6890.2810.1460.6850.6160.7790.364
\( \phi \)ResNet-1010.7020.5310.840.6050.280.1450.8720.8070.8160.573
\( \rho \)ResNet-1010.7380.5610.8670.6530.4470.2560.80.7160.8380.609
\( I_0,I_45,I_{90},I_{135} \) [47]Concat + ResNet-1010.7430.5450.890.7110.3860.2210.8680.8030.8290.444
\( I_{un},\phi ,\rho \)Concat + ResNet-1010.7110.5380.8640.6560.2780.1340.8330.7650.870.596
\( I_{un},\phi ,\rho \)Mid-Fusion + Mean [11]*0.7870.6240.8920.7340.4930.3370.8860.8420.8790.582
\( I_{un},\phi ,\rho \)Mid-Fusion + Concat [32, 33]*0.7680.6060.8920.7270.4690.2970.8430.7860.8690.615
\( I_{un},\phi ,\rho \)Mid-Fusion + MoE [28, 43]*0.7770.6160.8890.7380.4680.2870.8710.8250.8780.615
\( I_{un},\phi ,\rho \)Mid-Fusion + SE Merge [46]*0.7640.6030.8940.7400.4480.2980.8440.7940.8700.578
\( I_{un},\phi ,\rho \)Mid-Fusion + Attention (Ours)0.7930.6350.8890.7330.5110.3510.8930.8410.8770.615
+ +Table 3: Instance Segmentation Ablation Analysis Input and Backbone Ablation Results. We bold any result with 0.005 mAP of the best result. * Adapted to our task. + +
Input TypeMeanClutterEnvPOSRBP
AOLP0.4760.5500.1360.7070.514
AOLP + Augs0.4860.5910.0800.7460.528
AOLP + Geometric Augs0.5310.6050.1450.8070.573
+ +![](images/674950b88b1c306133bbff3063422565c3bfa857a7a5760cc558fbef34f27f7a.jpg) +Figure 7: Transparent object bin picking setup: A custom polar stereo camera pair calibrated with a UR3 robotic arm with a suction cup gripper, picking a bin of stacked transparent objects. + +15 incorrect picks, whichever comes first. The results are + +Table 4: Geometric data augmentations are vital for improved performance. + +
Model TypePickedFalse PicksRemainingTotal
Intensity Mask R-CNN [19]60563090
Polarized Mask R-CNN (Ours)9018090
+ +Table 5: Polarized CNNs allow the robot to empty the bin with minimal false picks. + +available in Table 4. Intensity based model is unable to empty the bin consistently because the robotic arm consistently misses certain picks due to poor segmentation quality. The polar model on the other hand, picks all 90 balls successfully, with approximately 1 incorrect pick for every 6 correct picks. These results validate the effect that a difference of $20\mathrm{mAP}$ can make. + +# 5. Conclusion + +Transparent objects have more prominent textures in the polarization domain. This unique texture is best exploited with our Polarized CNN framework, which we demonstrate on instance segmentation with Mask R-CNN. We support this with our experiments and demonstrate it's importance with an application to robotic bin picking. We also demonstrated a passive monocular system that is robust to print-out spoof attacks. We hope to spur future work in computer vision that exploits polarization with data driven problems and explore novel camera configurations for applications in broad areas such as robotics, autonomous driving, and face authentication. + +# References + +[1] Waleed Abdulla. Mask r-cnn for object detection and instance segmentation on keras and tensorflow. https:// + +github.com/matterport/Mask_RCNN, 2017.6 +[2] Nicolas Alt, Patrick Rives, and Eckehard Steinbach. Reconstruction of transparent objects in unstructured scenes with a depth camera. In 2013 IEEE International Conference on Image Processing, pages 4131-4135. IEEE, 2013. 3 +[3] Anurag Arnab and Philip HS Torr. Pixelwise instance segmentation with a dynamically instantiated network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 441-450, 2017. 2 +[4] Gary A Atkinson and Edwin R Hancock. Recovery of surface orientation from diffuse polarization. IEEE transactions on image processing, 15(6):1653-1664, 2006. 2, 3 +[5] Min Bai and Raquel Urtasun. Deep watershed transform for instance segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5221-5229, 2017. 2 +[6] Moshe Ben-Ezra and Shree K Nayar. What does motion reveal about transparency? In Proceedings of the IEEE International Conference on Computer Vision, page 1025. IEEE, 2003. 3 +[7] Rodrigo Benenson, Stefan Popov, and Vittorio Ferrari. Large-scale interactive object segmentation with human annotators. In CVPR, 2019. 3 +[8] Tongbo Chen, Hendrik PA Lensch, Christian Fuchs, and Hans-Peter Seidel. Polarization and phase-shifting for 3d scanning of translucent objects. In 2007 IEEE conference on computer vision and pattern recognition, pages 1-8. IEEE, 2007. 3 +[9] François Chollet et al. Keras. https://keras.io, 2015. 6 +[10] Zhaopeng Cui, Jinwei Gu, Boxin Shi, Ping Tan, and Jan Kautz. Polarimetric multi-view stereo. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1558-1567, 2017. 3 +[11] Di Feng, Christian Haase-Schuetz, Lars Rosenbaum, Heinz Hertlein, Fabian Duffhauss, Claudius Glaeser, Werner Wiesbeck, and Klaus Dietmayer. Deep multi-modal object detection and semantic segmentation for autonomous driving: Datasets, methods, and challenges. arXiv preprint arXiv:1902.07830, 2019. 3, 7, 8 +[12] Chen Guo-Hua, Wang Jun-Yi, and Zhang Ai-Jun. Transparent object detection and location based on rgb-d camera. In Journal of Physics: Conference Series, volume 1183, page 012011. IOP Publishing, 2019. 2, 3 +[13] Agrim Gupta, Piotr Dollar, and Ross Girshick. LVIS: A dataset for large vocabulary instance segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 3 +[14] Kaiming He, Georgia Gkioxari, Piotr Dollar, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 2961-2969, 2017. 2, 3 +[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 3 + +[16] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7132-7141, 2018. 3 +[17] Achuta Kadambi, Vage Taamazyan, Boxin Shi, and Ramesh Raskar. Polarized 3d: High-quality depth sensing with polarization cues. In Proceedings of the IEEE International Conference on Computer Vision, pages 3370-3378, 2015. 3 +[18] Achuta Kadambi, Vage Taamazyan, Boxin Shi, and Ramesh Raskar. Depth sensing using geometrically constrained polarization normals. International Journal of Computer Vision, 125(1-3):34-51, 2017. 3 +[19] May Phyo Khaing and Mukunoki Masayuki. Transparent object detection using convolutional neural network. In International Conference on Big Data Analysis and Deep Learning Applications, pages 86-93. Springer, 2018. 2, 3, 7, 8 +[20] Alexander Kirillov, Evgeny Levinkov, Bjoern Andres, Bogdan Savchynskyy, and Carsten Rother. Instancecut: from edges to instances with multicut. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5008-5017, 2017. 2 +[21] Po-Jen Lai and Chiou-Shann Fuh. Transparent object detection using regions with convolutional neural network. In IPPR Conference on Computer Vision, Graphics, and Image Processing, pages 1-8, 2015. 3 +[22] Tsung-Yi Lin, Piotr Dólar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2117-2125, 2017. 3 +[23] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740-755. Springer, 2014. 3, 5 +[24] Yaojie Liu, Amin Jourabloo, and Xiaoming Liu. Learning deep models for face anti-spoofing: Binary or auxiliary supervision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 389-398, 2018. 2, 3 +[25] Ilya Lysenko, Victor Eruhimov, and Gary Bradski. Recognition and pose estimation of rigid transparent objects with a Kinect sensor. Robotics, 273:273-280, 2013. 3 +[26] Ilya Lysenkov and Vincent Rabaud. Pose estimation of rigid transparent objects in transparent clutter. In 2013 IEEE International Conference on Robotics and Automation, pages 162-169. IEEE, 2013. 3 +[27] Wan-Chun Ma, Tim Hawkins, Pieter Peers, Charles-Felix Chabert, Malte Weiss, and Paul Debevec. Rapid acquisition of specular and diffuse normal maps from polarized spherical gradient illumination. In Proceedings of the 18th Eurographics conference on Rendering Techniques, pages 183-194. Eurographics Association, 2007. 3 +[28] Oier Mees, Andreas Eitel, and Wolfram Burgard. Choosing smartly: Adaptive multimodal fusion for object detection in changing environments. In 2016 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 151-156. IEEE, 2016. 3, 7, 8 + +[29] Daisuke Miyazaki, Masataka Kagesawa, and Katsushi Ikeuchi. Transparent surface modeling from a pair of polarization images. IEEE Transactions on Pattern Analysis & Machine Intelligence, (1):73-82, 2004. 3, 4 +[30] Olivier Morel, Fabrice Meriaudeau, Christophe Stolz, and Patrick Gorria. Polarization imaging applied to 3d reconstruction of specular metallic surfaces. In Machine Vision Applications in Industrial Inspection XIII, volume 5679, pages 178-186. International Society for Optics and Photonics, 2005. 3 +[31] Shree K Nayar, Xi-Sheng Fang, and Terrance Boult. Separation of reflection components using color and polarization. International Journal of Computer Vision, 21(3):163-186, 1997. 3 +[32] Andreas Pfeuffer and Klaus Dietmayer. Optimal sensor data fusion architecture for object detection in adverse weather conditions. In 2018 21st International Conference on Information Fusion (FUSION), pages 1-8. IEEE, 2018. 3, 8 +[33] Hazem Rashed, Ahmad El Sallab, Senthil Yogamani, and Mohamed ElHelw. Motion and depth augmented semantic segmentation for autonomous navigation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 0–0, 2019. 3, 7, 8 +[34] Mengye Ren and Richard S Zemel. End-to-end instance segmentation with recurrent attention. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6656-6664, 2017. 2 +[35] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pages 91-99, 2015. 3 +[36] Bernardino Romero-Paredes and Philip Hilaire Sean Torr. Recurrent instance segmentation. In European conference on computer vision, pages 312-329. Springer, 2016. 2 +[37] Megumi Saito, Yoichi Sato, Katsushi Ikeuchi, and Hiroshi Kashiwagi. Measurement of surface orientations of transparent objects using polarization in highlight. Systems and Computers in Japan, 32(5):64-71, 2001. 3 +[38] Shreeyak S Sajjan, Matthew Moore, Mike Pan, Ganesh Nagaraja, Johnny Lee, Andy Zeng, and Shuran Song. Cleargrasp: 3d shape estimation of transparent objects for manipulation. arXiv preprint arXiv:1910.02550, 2019. 3 +[39] Viktor Seib, Andreas Barthen, Philipp Marohn, and Dietrich Paulus. Friend or foe: exploiting sensor failures for transparent object localization and classification. In 2016 International Conference on Robotics and Machine Vision, volume 10253, page 102530I. International Society for Optics and Photonics, 2017. 3 +[40] Vage Taamazyan, Achuta Kadambi, and Ramesh Raskar. Shape from mixed polarization. arXiv preprint arXiv:1605.02066, 2016. 3 +[41] Ruxandra Tapu, Bogdan Mocanu, and Titus Zaharia. Dynamic subtitles: A multimodal video accessibility enhancement dedicated to deaf and hearing impaired users. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pages 0–0, 2019. 3 + +[42] Tali Treibitz and Yoav Y Schechner. Active polarization scattering. IEEE transactions on pattern analysis and machine intelligence, 31(3):385-399, 2008. 3 +[43] Abhinav Valada, Johan Vertens, Ankit Dhall, and Wolfram Burgard. Adapnet: Adaptive semantic segmentation in adverse environmental conditions. In 2017 IEEE International Conference on Robotics and Automation (ICRA), pages 4644-4651. IEEE, 2017. 3, 8 +[44] Tao Wang, Xuming He, and Nick Barnes. Glass object localization by joint inference of boundary and depth. In Proceedings of the 21st International Conference on Pattern Recognition (ICPR2012), pages 3783-3786. IEEE, 2012. 2, 3 +[45] Yichao Xu, Hajime Nagahara, Atsushi Shimada, and Rin-ichiro Taniguchi. Transcut: Transparent object segmentation from a light-field image. In Proceedings of the IEEE International Conference on Computer Vision, pages 3442–3450, 2015. 2, 3 +[46] Shifeng Zhang, Xiaobo Wang, Ajian Liu, Chenxu Zhao, Jun Wan, Sergio Escalera, Hailin Shi, Zezheng Wang, and Stan Z Li. A dataset and benchmark for large-scale multi-modal face anti-spoofing. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 919–928, 2019. 2, 3, 7, 8 +[47] Yifei Zhang, Olivier Morel, Marc Blanchon, Ralph Seulin, Mojdeh Rastgoo, and Désiré Sidibe. Exploration of deep learning-based multimodal fusion for semantic road scene segmentation. 2019. 3, 7, 8 +[48] Yifei Zhang, Olivier Morel, Marc Blanchon, Ralph Seulin, Mojdeh Rastgoo, and Désiré Sidibe. Exploration of Deep Learning-based Multimodal Fusion for Semantic Road Scene Segmentation. In VISAPP 2019 14th International Conference on Computer Vision Theory and Applications, Proceedings of the 14th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications, Prague, Czech Republic, Feb. 2019. 3 +[49] Dizhong Zhu and William AP Smith. Depth from a polarisation+rgb stereo pair. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7586-7595, 2019. 3 \ No newline at end of file diff --git a/deeppolarizationcuesfortransparentobjectsegmentation/images.zip b/deeppolarizationcuesfortransparentobjectsegmentation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..00aea6e1c332fd1bfd775ca8107b5f27c439235f --- /dev/null +++ b/deeppolarizationcuesfortransparentobjectsegmentation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29476204d9f1eaf2612b90d6f78b06d33af91adb49d759bd15addfa5fc7244fb +size 716308 diff --git a/deeppolarizationcuesfortransparentobjectsegmentation/layout.json b/deeppolarizationcuesfortransparentobjectsegmentation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a38c19268a67f87beceb26a23581e8018f459ed6 --- /dev/null +++ b/deeppolarizationcuesfortransparentobjectsegmentation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd1e3e4c11f6deca1280260d610b31f9f9e72a9f12efe6ba350206ad1674acc0 +size 438875 diff --git a/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/d31c3f44-dd26-453d-9ac1-bdb3333cc827_content_list.json b/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/d31c3f44-dd26-453d-9ac1-bdb3333cc827_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d61c8a4500a30c160fd76d1fdb4aea754bf4c579 --- /dev/null +++ b/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/d31c3f44-dd26-453d-9ac1-bdb3333cc827_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1771999745fe93293b7c817b78dc908f62b4e667515e5cecf9eb099a01dd6b4 +size 74447 diff --git a/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/d31c3f44-dd26-453d-9ac1-bdb3333cc827_model.json b/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/d31c3f44-dd26-453d-9ac1-bdb3333cc827_model.json new file mode 100644 index 0000000000000000000000000000000000000000..f949ad89e06fea1f39400f6f549a547c7fca8e94 --- /dev/null +++ b/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/d31c3f44-dd26-453d-9ac1-bdb3333cc827_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ad8349ee7c0b5b2c59d57b67d9cc528a6c85f1a409c101b71b31b35b7b08b35 +size 91463 diff --git a/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/d31c3f44-dd26-453d-9ac1-bdb3333cc827_origin.pdf b/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/d31c3f44-dd26-453d-9ac1-bdb3333cc827_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c898554737fed08aa6ec44cedff449e43af20aa7 --- /dev/null +++ b/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/d31c3f44-dd26-453d-9ac1-bdb3333cc827_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4f2f958a46351db58192f1ea7511f65629a38880961f92f8c4f03c6b4156185 +size 2489330 diff --git a/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/full.md b/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..503933a2e440d5085e5ead26e273842c17a1cb35 --- /dev/null +++ b/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/full.md @@ -0,0 +1,336 @@ +# Deep Relational Reasoning Graph Network for Arbitrary Shape Text Detection + +Shi-Xue Zhang $^{1}$ , Xiaobin Zhu $^{1}$ , Jie-Bo Hou $^{1}$ , Chang Liu $^{1}$ Chun Yang $^{1}$ , Hongfa Wang $^{4}$ , Xu-Cheng Yin $^{1,2,3*}$ + +$^{1}$ School of Computer and Communication Engineering, University of Science and Technology Beijing + $^{2}$ Institute of Artificial Intelligence, University of Science and Technology Beijing + $^{3}$ USTB-EEasyTech Joint Lab of Artificial Intelligence, ${}^{4}$ Tencent Technology (Shenzhen) Co. Ltd +zhangshixue11@163.com, {zhuxiaobin, chunyang, xuchengyin}@ustb.edu.cn +houjiebo@gmail.com, lasercat@gmx.us, hongfawang@tencent.com + +# Abstract + +Arbitrary shape text detection is a challenging task due to the high variety and complexity of scenes texts. In this paper, we propose a novel unified relational reasoning graph network for arbitrary shape text detection. In our method, an innovative local graph bridges a text proposal model via Convolutional Neural Network (CNN) and a deep relational reasoning network via Graph Convolutional Network (GCN), making our network end-to-end trainable. To be concrete, every text instance will be divided into a series of small rectangular components, and the geometry attributes (e.g., height, width, and orientation) of the small components will be estimated by our text proposal model. Given the geometry attributes, the local graph construction model can roughly establish linkages between different text components. For further reasoning and deducing the likelihood of linkages between the component and its neighbors, we adopt a graph-based network to perform deep relational reasoning on local graphs. Experiments on public available datasets demonstrate the state-of-the-art performance of our method. Code is available at https://github.com/GXYM/DRRG. + +# 1. Introduction + +Scene text detection has been widely applied in various applications, such as online education, product search, instant translation, and video scene parsing [39, 26]. With the prosperity of deep learning, text detection algorithms [27, 42, 21, 19] have achieved impressive performance in controlled environments where text instances have regular shapes or aspect ratios. However, because of the limited text representation forms, pioneer works tend to fail in detecting texts with arbitrary shapes. Recently, some methods, e.g., + +![](images/2c38f4a644cbef94665d5b1a063dc464bcd4502ced695dd6f5c608946c5521f8.jpg) +Figure 1. Illustration of relational reasoning: Generating local graphs based on the geometry attributes of text components; inferring linkage likelihood via GCN; finally grouping node classification results into text. + +TextSnake [17] and CRAFT [1], try to solve this problem with the Connected Component (CC) strategy. However, these methods haven't fully explored the abundant relations between text components, which can benefit the aggregation of text components for final text instance. + +In the CC-based method, one essential task is to excavate the rational relations between separated character/component regions for linking them into holistic text instances. The existing methods usually use pre-defined rule, link map or embedding map to group the detected components into text instance. Generally speaking, grouping the text components with learned link relationship or embedding relationship is more robust than using pre-defined rules, especially in the cases of long and curve texts. From our key observations and experiments, deep relational reasoning for mining the stable relations between these component regions can greatly enhance the performance of ar + +binary shape text detection. The link or embedding based methods [21, 28] usually uses CNNs to deduce the linkage of separate components, but the separated components are actually non-Euclidean data and CNNs are not good at processing non-Euclidean data. Therefore, the simple link map or embedding map is inadequate for learning stable relations between two non-adjacent components. The non-Euclidean data can be represented with graph, so we can transform the separate text components into graphs. As shown in Fig.1, we regard one text component as a node. Hence, we can select a node as a pivot and connect it with surrounding nodes into a local graph, as described in Sec. 3.3. The context information contained in local graphs (edges among the nodes) is informative for estimating the linkage likelihood between pivot and other nodes. It's a consensus that graph network has innate advantage for deducing relationships between nodes on the graph. Recently, the GCN based methods have achieved remarkable performance in clustering face [33] and global reasoning for various tasks [2]. Highly motivated by the works in [33, 2], we apply a graph convolution network to perform deep reasoning on local graphs to deduce deep linkage likelihood between components and corresponding neighbors for arbitrary shape text detection. + +In this paper, we propose a novel unified deep relational reasoning graph network for arbitrary shape text detection. According to CTPN [27] and TextSnake [17], we divide every text instance into text components, and propose a text proposal network to estimate the geometry attributes of these text components. To group the generated components, we adopt a graph-based network to perform deep relational reasoning and inferring the linkage relationship using the geometry attributes of components and neighbors. In addition, a local graph is designed to bridge the text proposal network and relational reasoning network, making our network end-to-end trainable. Finally, we group the detected text components into holistic text instances according to the relational results. + +In summary, the main contributions of this paper are three-fold: + +- We propose a novel unified end-to-end trainable framework for arbitrary shape text detection, in which a novel local graph bridges a CNN based text proposal network and a GCN based relational reasoning network. +- To the best of our knowledge, our work presents one of the very first attempts to perform deep relational reasoning via graph convolutional network for arbitrary shape text detection. +- The proposed method achieves the state-of-the-art performance both on polygon datasets and quadrilateral datasets. + +# 2. Related Work + +Regression-Based Methods. Methods of this type rely on a box-regression based object detection frameworks with word-level and line-level prior knowledge [19, 10, 11, 42]. Different with generic objects, texts are often presented in irregular shapes with various aspect ratios. To deal with this problem, RRD [11] adjusts anchor ratios of SSD [13] for accommodating the aspect ratio variations in irregular shapes. Textboxes++ [10] modifies convolutional kernels and anchor boxes to effectively capture various text shapes. EAST [42] directly inferences pixel-level quadrangles of word candidates without anchor mechanism and proposal detection. Although regression-based methods have achieved good performance in quadrilateral text detection, they often can't well adapt to arbitrary shape text detection. + +Segmentation-Based Methods. Methods of this type [3, 30, 28, 34, 17] mainly draw inspiration from semantic segmentation methods and detect texts by estimating word bounding areas. In PixelLink [3], linkage relationships between a pixel and its neighboring pixels are predicted for grouping pixels belonging to the same instance. To effectively distinguish adjacent text instances, PSENet [30] adopts a progressive scale algorithm to gradually expand the predefined kernels. Tian et al. [28] considered each text instance as a cluster and perform pixel clustering through an embedding map.TextField [34] adopts a deep direction field to link neighbor pixels and generate candidate text parts. However, the performances of these methods are strongly affected by the quality of segmentation accuracy. + +CC-Based Methods. The CC-based methods usually detect individual text parts or characters firstly, followed by a link or group post-processing procedure for generating final texts. CC-based methods [24, 38, 41, 37] had been widely used in traditional scene text detection methods before the popularity of deep learning. In the era of deep learning, CC-based methods have also been extensively studied [27, 21, 25, 1, 4]. CTPN [27] uses a modified framework of Faster R-CNN [20] to extract horizontal text components with a fixed-size width for easily connecting dense text components and generating horizontal text lines. SegLink [21] decomposes every scene text into two detectable elements, namely segment and link, where the link indicates that a pair of adjacent segments belong to the same word. CRAFT [1] detects the text area by exploring each character and affinity between characters. TextDragon [4] first detects the local area of the text, and then groups these bounding boxes according to their geometric relations. + +Relational Reasoning. CC-based methods are usually robust for long or non-quadrilateral text, but the performance of these methods are strongly depends on the robustness of grouping or linkage results. Text pixels are clustered by learning the linkage relationship between a pixel and its neighboring pixels in [3]. In [28], embedding features are + +![](images/44ddb2f2509baafac806faed206cfdfd758782f7d52a655f53e76cf32d43cbff.jpg) +Figure 2. Overview of our overall architecture. Our network mainly consists of five components, i.e., shared convolutions, text component prediction, local graphs, relational reasoning, and link merging. + +used to provide instance information and to generate the text area. CRAFT [1] predicts character region maps and affinity maps by weakly-supervised learning. The region map is used to localize characters, and the affinity map is used to group characters into a single instance. These methods are based on the CNNs, which cannot directly capture relations between distant component regions for the limitation of local convolutional operators. Recently, Wang et al. [33] proposed a spectral-based GCN to solve the problem of clustering faces, where the designed GCN can rationally link different face instances belonging to the same person in complex situations. + +# 3. Proposed Method + +# 3.1. Overview + +The framework of our method is illustrated in Fig. 2. The text component proposal network and the deep relational reasoning graph network share convolutional features, and the shared convolutions use the VGG-16 [23] with FPN [12] as backbone, as shown in Fig. 3. The text proposal network uses the shared features to estimate geometric attributes of text components. After obtaining the geometry attributes, the local graph can roughly establish linkages between different text components. Based on local graphs, the relational reasoning network will further infer the deep likelihood of linkages between the component and its neighbors. Finally, text components will be aggregated into holistic text instance according to the reasoning results. + +# 3.2. Text Component Prediction + +In our work, each text instance is constructed by a series of ordered rectangular components, as shown in Fig. 4 (a). And each text component $D$ is associated with a group of geometry attributes, i.e., $D = (x,y,h,w,\cos \theta ,\sin \theta)$ , in which $x$ and $y$ are the axis of text box; $h$ and $w$ are the height and the width of the component; $\cos \theta$ and $\sin \theta$ indicate the + +![](images/ce41904ab7d84aeb7299c99ec67acce3dced05a9f16d1dde80954e583e684729.jpg) +Figure 3. Architecture of shared convolutions, where $CR$ represents classification and regression operation in text component prediction, and details are listed in Eq. 3. + +orientation of the text component. The $h$ is the sum of $h1$ and $h2$ , as shown in Fig. 4 (c). The $w$ is obtained by a linear transformation on $h$ , which is computed as + +$$ +w _ {i} = \left\{ \begin{array}{l} w _ {\min }, h _ {i} < = 2 \cdot w _ {\min }, \\ h _ {i} / 2, \quad 2 \cdot w _ {\min } < h _ {i} < 2 \cdot w _ {\max }, \\ w _ {\max }, h _ {i} > = 2 \cdot w _ {\max }, \end{array} \right. \tag {1} +$$ + +where $h_i$ denotes the height of the $i$ -th text component. In experiments, we empirically set $w_{min} = 8$ and $w_{max} = 24$ . + +In order to define the orientation of text components and extract the text center region (TCR) easily, we use the method in [17] to calculate the head and tail of text region, as shown with the black arrow in Fig.4 (a). Text region is divided into a series of ordered quadrilateral regions along the long side (indicated by yellow lines + +as shown in Fig.4 (a), so we can obtain two groups of points $P1 = \{tp_0, tp_1, \dots, tp_i, \dots, tp_n\}$ and $P2 = \{bp_0, bp_1, \dots, bp_i, \dots, bp_n\}$ . The line marked with red points is the top line and green points is the bottom. In our approach, we need to clearly define the top and bottom of each text instance, according to the following criterion: + +$$ +p = \sum_ {i = 0} ^ {n} \sin \left(v _ {i}\right), v _ {i} \in V, \tag {2} +$$ + +where $V = \{tp_0 - bp_0, \dots, tp_i - bp_i, \dots, tp_n - bp_n\}$ is a group of vertexes ( $tp_i$ is the center of the top line and $bp_i$ is the center of the bottom line). If $p > = 0$ , $P1$ is top and $P2$ is bottom, else $P1$ is bottom and $P2$ is top. The angle of vector $v_i$ indicates the orientation $\theta$ of text component. + +TCR is obtained by shrinking text region (TR), as shown in Fig. 4 (b). First, we compute the text center line, Then, we shrink the two ends of center line by $0.5w$ end pixels, making it easy for the network to separate adjacent text instances and reduce the computation cost of NMS. Finally, we expand the center line area by $0.3h$ . After extracting shared features, two convolution layers are applied to predict the attributes of the text component as + +$$ +C R = \operatorname {c o n v} _ {1 \times 1} \left(\operatorname {c o n v} _ {3 \times 3} \left(F _ {\text {s h a r e}}\right)\right), \tag {3} +$$ + +where $CR \in \Re^{h \times w \times 8}$ , with 4 channels for the classification logits of TR/TCR, and 4 channels for the regression logits of $h_1, h_2, \cos \theta$ , and $\sin \theta$ . The final predictions are obtained by softmaxing TR/TCR and regularizing $\cos \theta$ and $\sin \theta$ for squaring sum equals 1 [17]. Final detection results are produced by threshold and locality-aware NMS on the positive samples. + +Detection Loss. The text component prediction loss is consisted of two losses, and computed as + +$$ +L _ {d e t} = L _ {c l s} + L _ {r e g}, \tag {4} +$$ + +where $L_{reg}$ is a smooth $L1$ [20] regression loss and $L_{cls}$ is a cross-entropy classification loss. The classification loss is computed as + +$$ +L _ {c l s} = L _ {t r} + \lambda_ {1} L _ {t c r p} + \lambda_ {2} L _ {t c r n}, \tag {5} +$$ + +where $L_{tr}$ represents the loss for TR; $L_{tcrp}$ only calculates pixels inside TR and $L_{tcrn}$ just calculates the pixels outside TR. $L_{tcrn}$ is used to suppress noise of the background in TCR. In this way, the obtained TCR can benefit post-processing steps. The OHEM [22] is adopted for TR loss, in which the ratio between the negatives and positives is set to 3:1. In our experiments, the weights $\lambda_1$ and $\lambda_2$ are empirically set to 1.0 and 0.5, respectively. + +Because the attributes of height and orientation are absent for non-TCR region, we only calculate regression loss + +![](images/6acab4a17cbf07377ee01e9082d6a1974010dc71e4ca4fefba8e56f552a461ed.jpg) + +![](images/ebc9db084700ffaffd5c2dc79ed49260531e96eecfd24f006227c87fd6166c59.jpg) +(a) +(b) + +![](images/392d63d1a6db235b65c827314341f6819b24d0f83de4fae92d2981750d0fd492.jpg) +(c) +Figure 4. Illustration of the proposal of text component: (a) Generating text component; (b) Extracting text center region; (c) Calculating geometry attributes. + +for TCR region as followings: + +$$ +L _ {r e g} = L _ {h} + \beta \left(L _ {\sin} + L _ {\cos}\right), \tag {6} +$$ + +$$ +L _ {\sin} = \operatorname {s m o o t h} _ {L 1} (\hat {\sin} \theta - \sin \theta), \tag {7} +$$ + +$$ +L _ {c o s} = \operatorname {s m o o t h} _ {L 1} (\hat {\cos} \theta - \cos \theta), \tag {8} +$$ + +$$ +L _ {h} = \frac {1}{\Omega} \sum_ {i \in \Omega} (\log (h + 1) \sum_ {k = 0} ^ {2} \operatorname {s m o o t h} _ {L 1} \left(\frac {\hat {h} _ {k i}}{h _ {k i}} - 1\right)), \tag {9} +$$ + +where $h_{ki}$ , $\sin \theta$ and $\cos \theta$ are ground-truth values, and $\hat{h_{ki}}$ , $\hat{\sin\theta}$ and $\hat{\cos\theta}$ are the corresponding predicted values; the $\Omega$ denotes the set of positive elements in TCR; the $h$ is the height of text component in ground truth. The weight $\log (h + 1)$ is beneficial for the height regression of large scale text component. The hyper-parameter $\beta$ is set to 1.0 in our work. + +# 3.3. Local Graph Generation + +We estimate the linkage likelihood between two nodes (text components) based on their context information in a local graph. It is inefficient to construct a whole graph for each image because text component usually only has the possibility of connection with its neighbors. Therefore, we construct multiple local graphs for every image. These local graphs generally contain a limited number of nodes, which will make it easy making relational reasoning high efficient. + +We modify IPS [33] to generate local graph, where pivot's neighbors up to $h$ -hop are used as nodes. In our work, we just use 2-hop as nodes for local graph. For clear explanation, $V_{p}$ is used to represent the nodes in local graph $G_{p}$ and $p$ represents the pivot. The 1-hop neighbors of $p$ consist of 8 nearest neighbors, and the 2-hop neighbors of $p$ consist of 4 nearest neighbors. The high-order neighbors provide auxiliary information of the local structure of the context between a pivot and its neighbor [33]. Here, we + +only consider the Euclidean similarity $E_{s}$ between nodes for performing KNN operation, and $E_{s}$ computed as + +$$ +E _ {s} = 1 - D \left(p, v _ {i}\right) / \max \left(H _ {m}, W _ {m}\right), v _ {i} \in V _ {p}, \tag {10} +$$ + +where $D(p, v_i)$ is an L2 distance between $p$ and $v_i$ , $H_m$ is image height, and $W_m$ is image width. To avoid gradient accumulation of easy samples caused by many identical graphs in training, the pivot $p$ should satisfy the following criterion: + +$$ +G _ {i o u} = \frac {G _ {p} \cap G _ {q}}{G _ {p} \cup G _ {q}} < \xi , p, q \in T, \tag {11} +$$ + +where $G_{p}$ and $G_{q}$ are two local graphs; the pivot $p$ and $q$ are in the same text instance $T$ ; $G_{p} \cap G_{q}$ is the intersection of 1-hop neighbors of $G_{p}$ and $G_{q}$ ; $G_{p} \cup G_{q}$ is the union of 1-hop neighbors of $G_{p}$ and $G_{q}$ . In our experiments, $\xi$ is set to 0.75. This strategy not only leads to considerable acceleration, but also reduces the number of easy samples, yet keeps the balance of hard and easy samples. + +# 3.4. Deep Relational Reasoning + +The text components in every image will be divided into multiple local graphs by local graph generation, which consists of the pivot and its 2-hop neighbors. The rough linkage information contained in the local graph (edges among the nodes) is valuable for estimating the linkage likelihood between the pivot and its neighbors. For further reasoning and deducing the likelihood of linkage between the pivot and its neighbors, We adopt a specific graph-based neural network [33, 8] to excavate the linkage relationships between the pivot and its neighbors based on local graph. The graph is usually expressed as $g(X, A)$ , and the graph convolutional network usually takes the feature matrix $X$ and the adjacency matrix $A$ as the input of the network. Therefore, we need to extract the feature matrix $X$ and compute matrix $A$ for the local graph. + +Node Feature Extraction. The node features consist of two parts features, namely, RROI features and geometric features. In order to obtain the RROI features, we use the RROI-Align layer which integrates the advantages of RoI-Align [6] and RROI [19] to extract the feature block of the input text component. To ensure the convergence ability of our model, we use the ground truth to generate the text component in training. Text components within the same text instance have similar geometric features. However, the RROI features will lose some geometric attributes, such as location information. Therefore, we should take these geometric attributes into consideration during node feature generation, as shown in Fig. 5. For one text component, we feed it with the feature maps $F_{n}$ to RROI-Align layer, and then a $1\times 3\times 4\times C_r$ feature block is obtained, where $F_{n}$ is illustrated in Fig. 3. Afterwards, it will be reshaped to $1\times 12\cdot C_r$ , namely $F_{r}$ . The geometric attributes of text + +![](images/514aa2e4ac7472f8deaed2bc55b6c584729b9454afc6cf8430c2d1cd09d1ea05.jpg) +Figure 5. Illustration of $g(X, A)$ generation. $F_r$ represents the geometry features; $X$ is node feature matrix; $A$ is an adjacency matrix; $g(X, A)$ represents the mathematical expression of local graph. The details of embedding operation in Eq. 12 and Eq. 13. + +component are embedded into high dimensional spaces according to the technique in [29, 5]. The embedding is performed by applying sine and cosine functions of varying wavelengths to a scalar $z$ as + +$$ +\varepsilon_ {2 i} (z) = \cos \left(\frac {z}{1 0 0 0 ^ {2 i / C _ {\varepsilon}}}\right), i \in (0, C _ {\varepsilon} / 2 - 1), \tag {12} +$$ + +$$ +\varepsilon_ {2 i + 1} (z) = \sin \left(\frac {z}{1 0 0 0 ^ {2 i / C _ {\varepsilon}}}\right), i \in (0, C _ {\varepsilon} / 2 - 1), \tag {13} +$$ + +where the dimension of the embedding vector $\varepsilon(z)$ is $C_{\varepsilon}$ . As a result, each text component is embedded into a vector $F_{g}$ with $6 \cdot C_{\varepsilon}$ dimension. Finally, $F_{r}$ and $F_{g}$ will be concatenated together as node features. + +Node Feature Normalization. We normalize the features of node by subtracting $x_{p}$ . It encodes the pivot $p$ information into the features of a local graph and makes the relation reasoning network easily learn the linkage relationships between the pivot and its neighbors. + +$$ +\mathbf {F} _ {p} = \left[ \dots , x _ {q} - x _ {p}, \dots \right] ^ {T}, q \in V _ {p}, \tag {14} +$$ + +where $x_{p}$ is the feature of the pivot $p$ ; the $V_{p}$ denotes the node set on local graph and their features are $\{x_{q}|q\in V_{p}\}$ . + +Adjacency Matrix Generation. We use an adjacency matrix $A_{p} \in \Re^{N*N}$ to represent the topological structure of local graph. For a node $n_i \in V_p$ , we filter out the top $u$ nearest neighbors $U(n_i)$ . For the node $n_j \in U(n_i)$ , we will set $A_{p}(n_{i},n_{j}) = 1$ . The hyper-parameter $u$ is empirically set to 3 in our work. + +Graph Convolutions. After obtaining the feature matrix $X$ and the adjacency matrix $A$ , we use a graph-based relational reasoning network to estimate the linkage relationships of the pivot and its neighbors based on the established graph. We modify the structure in [33, 8], and the graph convolution layer in our method can be formulated as + +$$ +\mathbf {Y} ^ {(l)} = \sigma \left(\left(\mathbf {X} ^ {(l)} \oplus \mathbf {G} \mathbf {X} ^ {(l)}\right) \mathbf {W} ^ {l}\right), \tag {15} +$$ + +$$ +\mathbf {G} = \tilde {\mathbf {D}} ^ {- 1 / 2} \tilde {\mathbf {A}} \tilde {\mathbf {D}} ^ {- 1 / 2}, \tag {16} +$$ + +where $\mathbf{X}^{(l)}\in \Re^{N\times d_i},\mathbf{Y}^{(l)}\in \Re^{N\times d_o},d_i / d_o$ is the dimension of input / output node features and $N$ is the number of nodes; $\mathbf{G}$ is a symmetric normalized laplacian of size + +$N \times N$ ; the operator $\oplus$ represents matrix concatenation; $W^{(l)}$ is a layer-specific trainable weight matrix; $\sigma(\cdot)$ denotes a non-linear activation function; $\tilde{A} = A + I_N$ is an adjacency matrix of the local graph with added self-connections; $I_N$ is the identity matrix and $\tilde{\mathbf{D}}$ is a diagonal matrix with $\tilde{D}_{ii} = \sum_{j} \tilde{A}_{ij}$ . Our relational reasoning model is the stack of one Batch Normalization layer and four graph convolution layers activated by the ReLU function. We adopt softmax cross-entropy loss as the objective function for optimization. Similar to [33], we only backpropagate the gradient for nodes on the 1-hop neighbors in training, because we just care about the linkage between a pivot and its 1-hop neighbors. For testing, we also only consider the classification on 1-hop nodes. + +# 3.5. Inference + +Given the text components, we group text components into text instances according to the reasoning results. We first apply thresholding to TR and TCR respectively, and then NMS is applied to reduce redundancy. To infer the likelihood of linkages between the pivot and its neighbors, we loop over all text components, constructing a local graph with each component as the pivot. Consequently, we obtain a set of edges weighted by the linkage likelihood. Finally, we use Breath First Search (BFS) to cluster and merge the linkages. + +After we get the clustered text components, we sort the components for boundary generation. The text instance $T$ can be represented as $T = \{D_0, \dots, D_i, \dots, D_n\}$ . The Min-Path algorithm is applied to search the shortest path through all text component centers, and then we sort $T$ by searching results. For boundary generation, we just need to link the mid-point of the ordered top and bottom in ordered text components sequentially, as shown in Fig. 2. + +# 4. Experiments + +# 4.1. Datasets + +Total-Text: It consists of 1,255 training and 300 testing complex images, including horizontal, multi-oriented, and curved text instances with polygon and word-level annotations. + +CTW-1500: It consists of 1,000 training and 500 testing images. Every image has curved text instances, which are all annotated by polygons with 14 vertices. + +MSRA-TD500: It consists of 500 training and 200 testing images, including English and Chinese scripts. This dataset is dedicated for detecting multi-lingual long texts of arbitrary orientations. + +ICDAR2015: It consists of 1,000 training images and 500 testing images, including many multi-orientated and very small-scale text instances. The ground truth is annotated with word-level quadrangle. + +ICDAR2017: It consists of 7,200 training images, 1,800 validation images and 9,000 test images with texts in 9 languages for multi-lingual scene text detection. The text instances are also annotated by quadrangle. + +# 4.2. Implementation Details + +The backbone of our network is the pre-trained VGG16 [23] on ImageNet [9]. The training procedure mainly includes two steps: pre-training our network on SynthText dataset with two epochs, and fine-tuning on specific benchmark dataset with 600 epochs. In the pre-training stage, we randomly crop text regions, which will be resized to 512. The batch size is set to 12. Adam optimizer is applied to train our model with a learning rate $10^{-4}$ . In fine-tuning, for multi-scale training, we randomly crop the text region, and resize them to $640 \times 640$ (batch is 8), $800 \times 800$ (batch is 4), and $960 \times 960$ (batch is 4), respectively. In fine-tuning, SGD optimizer is applied to train our model. The initial learning rate is 0.01 and multiplied by 0.8 after each 100 epochs. Also, the basic data augmentation techniques like rotations, crops, color variations, and partial flipping are applied. The hyper-parameters related to local graph are fixed during training and testing. Experiments are performed on single GPU (RTX-2080Ti), and PyTorch 1.2.0. + +
DatasetsMethodsRPH
Total-Textbaseline80.0685.4582.67
baseline+gn83.1185.9484.50
CTW1500baseline80.5783.0681.80
baseline+gn81.4583.7582.58
TD500baseline78.5283.2480.81
baseline+gn82.3088.0585.08
+ +Table 1. Ablation study for relational reasoning network. "R", "P" and "H" represent recall, precision and Hmean, respectively. For "baseline", we adopt the intersection of TR and TCL, instead of the relationship learned by GCN, to group text patches. + +# 4.3. Ablation Study + +To verify the effectiveness of the relational reasoning network, We conduct ablation experiments on Total-Text, CTW1500 and MSRA-TD500. Tab. 1 shows the experimental results on three datasets. For reducing the influence of data on the experimental results, we adopt the SynthText to pre-train model, and then we fine-tune it on Total-Text and CTW1500. Because MSRA-TD500 consists of English and Chinese, we use ICDAR2017-MLT to pre-train our network for MSRA-TD500. The longer sides of the images within Total-Text, CTW1500 and MSRA-TD500 are restricted to 1, 280, 1, 024 and 640, respectively, meanwhile keeping the aspect ratio. As shown in Tab. 1, the relational reasoning network achieves improvements by $1.83\%$ , $0.78\%$ and $4.27\%$ in Hmean on Total-Text, CTW1500 and + +
MethodsTotal-TextCTW-1500MSRA-TD500
RecallPrecisionHmeanRecallPrecisionHmeanRecallPrecisionHmean
SegLink [21]------70.086.077.0
MCN [15]------798883
TextSnake [17]74.582.778.485.367.975.673.983.278.3
LSE†[28]---77.882.780.181.784.282.9
ATTR†[32]76.280.978.5---82.185.283.6
MSR†[36]73.085.278.679.084.181.576.787.481.7
CSE [16]79.781.480.276.178.777.4---
TextDragon [4]75.785.680.382.884.583.6---
TextField [34]79.981.280.679.883.081.475.987.481.3
PSENet-1s†[30]77.9684.0280.8779.784.882.2---
ICG [25]80.982.181.579.882.881.3---
LOMO*†[40]79.387.683.376.585.780.8---
CRAFT [1]79.987.683.681.186.083.578.288.282.9
PAN†[31]81.089.385.081.286.483.783.884.484.1
Ours84.9386.5485.7383.0285.9384.4582.3088.0585.08
+ +Table 2. Experimental results on Total-Text, CTW-1500 and MSRA-TD500. The symbol * means the multi-scale test is performed. The symbol † indicates the backbone network is not VGG16. The best score is highlighted in bold. + +![](images/ca099ba6fddf1c1ab72f222e72f53a2926461fe54dc58a13ccb821b0432f8b0d.jpg) +Figure 6. The representative samples with irregular labels on CTW-1500. Up row: the results of our method. Bottom row: the ground truth of CTW-1500. + +![](images/689c703b445a68126d17af3f78faa474bca1beab33430f448e8b9450b5037733.jpg) + +MSRA-TD500, respectively. Remarkably, the recall of our method with relational reasoning network has improved significantly in all datasets (3.05% on Total-Text, 0.88% on CTW1500, and 3.78% on MSRA-TD500). Our method coherently improves the detection performance on MSRA-TD500 abundant with long texts (recall 3.78%, precision 4.81%, Hmean 4.27%). The performance of our method on CTW1500 is not remarkable, because its annotations are sometimes confusing. The CTW1500 has no "DO NOT CARE", so some small texts and Non-English texts are not annotated, as shown in Fig. 6 ①. Moreover, the text line annotations are confusing, as shown in Fig. 6 ② and ③. + +# 4.4. Comparison with the state-of-the-arts + +Polygon-Type Datasets. Here, ICDAR2017-MLT is used to pre-train our model, and fine-tuning is only conducted on CTW1500 and Total-Text, separately. All experiments are + +performed with a single image resolution. + +Total-Text. This dataset mainly contains curved and multi-oriented texts, annotated in word-level. In testing, we resize the shortest side to 512 if it is less than 512, and keep the longest side is not larger than 1, 280. Some visible results are listed in Fig.7 (a) (b). From Fig.7, we can observe that our method precisely detects word-level irregular texts, and it is can accurately separate close text instances of arbitrary shapes. The quantitative results are shown in Tab. 2. The proposed method achieves $85.73\%$ Hmean, significantly outperforming other methods. + +CTW1500. This dataset mainly contains curved and multi-oriented texts, annotated in line-level. In testing, we resize the shortest side to 512 if it is less than 512, and keep the longest side is not larger than 1,024. Some visible results are shown in Fig. 7 (c) and Fig. 6. It indicates that the proposed method correctly detects the boundaries of arbitrary shape text precisely. The quantitative results are listed in Tab. 2. Compared with the other staste-of-the-art methods, our approach achieves promising in recall (83.02%) and Hmean (84.45%). Specifically, our method greatly outperforms TextSnake on CTW1500 and Total-Text, improves Hmean by $8.85\%$ and $6.6\%$ respectively. + +Quadrilateral-Type Datasets. For fairly comparison, we adopt IC17 to pre-train our model, then fine-tune it on IC15 and TD500, separately. However, these datasets are evaluated with rectangular boxes, hence we need to convert the detection results into rectangular boxes. Therefore, we shrink the text instance by 0.05, and take the smallest circumscribed rectangle for evaluation. + +MSRA-TD500. This dataset contains lots of long texts and text scales vary significantly. In testing, we resize the + +![](images/5c8de9d71c6339f8764dac87e41ff221b135a061f691eb0eccdc7b90c4bbd852.jpg) +(a) Total-Text +Figure 7. Experimental results of our method. Up row: each column shows the results of GCN clustering on different datasets. Bottom row: each column shows the corresponding results of boundary generation. + +![](images/60c951589c21191a0d41647bae7e772a3922df839ba82cf5a5065d327d72ce67.jpg) +(b) Total-Text + +![](images/c42598cbb46863bd9827286c19d269d959ff76436e082a0dfcae8ffbe36b8ba0.jpg) +(c) CTW1500 + +![](images/cef568ae97a76db082ef54278f3878e642a95dc54269f2cc88dd0b43c3f2f23b.jpg) +(d) MSRA-TD500 + +
MethodsRecallPrecisionHmean
SegLink [21]76.873.175.0
MCN [15]728076
EAST* [42]78.383.380.7
TextField [34]80.0584.382.4
TextSnake [17]84.980.482.6
Textboxes++*[10]78.587.882.9
PixelLink [3]82.085.583.7
FOTS† [14]82.0488.8485.31
PSENet-1s† [30]84.586.9285.69
LSET[28]85.088.386.6
ATRR† [32]83.390.486.8
CRAFT [1]84.389.886.9
Ours84.6988.5386.56
+ +shortest side to 512 if it's less than 512, and keep the longest side isn't larger than 640. Fig. 7 (d) are some representative results. The proposed method successfully detects long text lines of arbitrary orientations and sizes. The quantitative comparisons with other methods on this dataset is listed in Tab. 2. Notably, our method achieves $85.08\%$ on Hmean, significantly outperforms other methods. + +ICDARs (IC15, IC17). Considering IC15 contains many low resolution and many small text instances. The instance balance [3] is applied to assist training. The IC17 contains multilingual scene text and the annotations are given in word-level. In inference, we adjust the size of test images appropriately. For IC15, we resize the shortest side to 960 if it is less than 960, and keep the longest side is not larger than 1, 960. For IC17, we resize the shortest side to 512 if it is less than 512, and keep the longest side is not larger than 2, 048. The quantitative results are + +Table 3. Experimental results on ICDAR2015. + +
MethodsRecallPrecisionHmean
SARI FDU RRPN[19]55.5071.1762.37
He et al. [7]57.976.766.0
\( Border^† \)[35]60.673.966.6
Lyu et al. [18]55.683.866.8
\( FOTS^† \)[14]57.5180.9567.25
\( LOMO^† \)[40]60.678.868.5
Ours61.0474.9967.31
+ +Table 4. Experimental results on ICDAR17 MLT. + +listed in Tab. 4 and Tab. 3. Apparently, our method achieves $86.56\%$ Hmean on IC15 and $67.31\%$ Hmean on IC15. The proposed method achieves competitive results against the state-of-the-art methods. + +# 5. Conclusion + +In this paper, we propose a novel CC-based method for arbitrary shape scene text detection. The proposed method adopts a spectral-based graph convolution network learn linkage relationship between the text components, and use this information to guide post-processing to connect components to text instances correctly. Experiments on five benchmarks show that the proposed method not only has good performance for arbitrary shape text detection, but also good for oriented and multilingual text. In the future, we are interested in developing an end-to-end text reading system for text of arbitrary shapes with graph network. + +Acknowledgements. This work was supported by National Key R&D Program of China (No.2019YFB1405990), Beijing Natural Science Foundation (No.4194084), China Postdoctoral Science Foundation (No.2018M641199) and Fundamental Research Funds for the Central Universities (No. FRF-TP-18-060A1). + +# References + +[1] Youngmin Baek, Bado Lee, Dongyoon Han, Sangdoo Yun, and Hwalsuk Lee. Character region awareness for text detection. In CVPR, pages 9365-9374, 2019. +[2] Yunpeng Chen, Marcus Rohrbach, Zhicheng Yan, Shuicheng Yan, Jiashi Feng, and Yannis Kalantidis. Graph-based global reasoning networks. In CVPR, pages 433-442, 2019. +[3] Dan Deng, Haifeng Liu, Xuelong Li, and Deng Cai. PixelLink: Detecting scene text via instance segmentation. In AAAI, pages 6773-6780, 2018. +[4] Wei Feng, Wenhao He, Fei Yin, Xu-Yao Zhang, and ChengLin Liu. Textdragon: An end-to-end framework for arbitrary shaped text spotting. In ICCV, pages 9075-9084, 2019. +[5] Jiayuan Gu, Han Hu, Liwei Wang, Yichen Wei, and Jifeng Dai. Learning region features for object detection. In ECCV, pages 392-406, 2018. +[6] Kaiming He, Georgia Gkioxari, Piotr Dolkar, and Ross B. Girshick. Mask R-CNN. In ICCV, pages 2980-2988, 2017. +[7] Wenhao He, Xu-Yao Zhang, Fei Yin, and Cheng-Lin Liu. Multi-oriented and multi-lingual scene text detection with direct regression. IEEE Trans. Image Processing, 27(11):5406-5419, 2018. +[8] Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017. +[9] Alex Krizhevsky, I. Sutskever, and G. Hinton. Imagenet classification with deep convolutional neural networks. NIPS, pages 1106-1114, 2012. +[10] Minghui Liao, Baoguang Shi, and Xiang Bai. Textboxes++. A single-shot oriented scene text detector. IEEE Transactions on Image Processing, 27(8):3676-3690, 2018. +[11] Minghui Liao, Zhen Zhu, Baoguang Shi, Gui-Song Xia, and Xiang Bai. Rotation-sensitive regression for oriented scene text detection. In CVPR, pages 5909-5918, 2018. +[12] Tsung-Yi Lin, Piotr Dollar, Ross B. Girshick, Kaiming He, Bharath Hariharan, and Serge J. Belongie. Feature pyramid networks for object detection. In CVPR, pages 936-944, 2017. +[13] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott E. Reed, Cheng-Yang Fu, and Alexander C. Berg. SSD: Single shot multibox detector. In ECCV, pages 21-37, 2016. +[14] Xuebo Liu, Ding Liang, Shi Yan, Dagui Chen, Yu Qiao, and Junjie Yan. FOTS: Fast oriented text spotting with a unified network. In CVPR, pages 5676-5685, 2018. +[15] Zichuan Liu, Guosheng Lin, S. Yang, Jiashi Feng, Weisi Lin, and Wang Ling Goh. Learning markov clustering networks for scene text detection. In CVPR, pages 6936-6944, 2018. +[16] Zichuan Liu, Guosheng Lin, Sheng Yang, Fayao Liu, Weisi Lin, and Wang Ling Goh. Towards robust curve text detection with conditional spatial expansion. In CVPR, pages 7269-7278, 2019. +[17] Shangbang Long, Jiaqiang Ruan, Wenjie Zhang, Xin He, Wenhao Wu, and Cong Yao. Textsnake: A flexible representation for detecting text of arbitrary shapes. In ECCV, pages 19-35, 2018. + +[18] Pengyuan Lyu, Cong Yao, Wenhao Wu, Shuicheng Yan, and Xiang Bai. Multi-oriented scene text detection via corner localization and region segmentation. In CVPR, pages 7553-7563, 2018. +[19] Jianqi Ma, Weiyuan Shao, Hao Ye, Li Wang, Hong Wang, Yingbin Zheng, and Xiangyang Xue. Arbitrary-oriented scene text detection via rotation proposals. IEEE Trans. Multimedia, 20(11):3111-3122, 2018. +[20] Shaoqing Ren, Kaiming He, Ross B. Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. IEEE Trans. Pattern Anal. Mach. Intell., 39(6):1137-1149, 2017. +[21] Baoguang Shi, Xiang Bai, and Serge J. Belongie. Detecting oriented text in natural images by linking segments. In CVPR, pages 3482-3490, 2017. +[22] Abhinav Shrivastava, Abhinav Gupta, and Ross B. Girshick. Training region-based object detectors with online hard example mining. In CVPR, pages 761-769, 2016. +[23] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. +[24] Lei Sun, Qiang Huo, Wei Jia, and Kai Chen. A robust approach for text detection from natural scene images. Pattern Recognition, 48(9):2906-2920, 2015. +[25] Jun Tang, Zhibo Yang, Yongpan Wang, Qi Zheng, Yongchao Xu, and Xiang Bai. Seglink++: Detecting dense and arbitrary-shaped scene text by instance-aware component grouping. Pattern Recognition, 96, 2019. +[26] Shu Tian, Xu-Cheng Yin, Ya Su, and Hong-Wei Hao. A unified framework for tracking based text detection and recognition from web videos. IEEE Trans. Pattern Anal. Mach. Intell., 40(3):542-554, 2018. +[27] Zhi Tian, Weilin Huang, Tong He, Pan He, and Yu Qiao. Detecting text in natural image with connectionist text proposal network. In ECCV, pages 56-72, 2016. +[28] Zhuotao Tian, Michelle Shu, Pengyuan Lyu, Ruiyu Li, Chao Zhou, Xiaoyong Shen, and Jiaya Jia. Learning shape-aware embedding for scene text detection. In CVPR, pages 4234-4243, 2019. +[29] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, pages 5998-6008, 2017. +[30] Wenhai Wang, Enze Xie, Xiang Li, Wenbo Hou, Tong Lu, Gang Yu, and Shuai Shao. Shape robust text detection with progressive scale expansion network. In CVPR, pages 9336-9345, 2019. +[31] Wenhai Wang, Enze Xie, Xiaoge Song, Yuhang Zang, Wenjia Wang, Tong Lu, Gang Yu, and Chunhua Shen. Efficient and accurate arbitrary-shaped text detection with pixel aggregation network. In ICCV, pages 8439-8448, 2019. +[32] Xiaobing Wang, Yingying Jiang, Zhenbo Luo, Cheng-Lin Liu, Hyunsoo Choi, and Sungjin Kim. Arbitrary shape scene text detection with adaptive text region representation. In CVPR, pages 6449-6458, 2019. +[33] Zhongdao Wang, Liang Zheng, Yali Li, and Shengjin Wang. Linkage based face clustering via graph convolution network. In CVPR, pages 1117-1125, 2019. + +[34] Yongchao Xu, Yukang Wang, Wei Zhou, Yongpan Wang, Zhibo Yang, and Xiang Bai. Textfield: Learning a deep direction field for irregular scene text detection. IEEE Trans. Image Processing, 28(11):5566-5579, 2019. +[35] Chuhui Xue, Shijian Lu, and Fangneng Zhan. Accurate scene text detection through border semantics awareness and bootstrapping. In ECCV, pages 370-387, 2018. +[36] Chuhui Xue, Shijian Lu, and Wei Zhang. MSR: multi-scale shape regression for scene text detection. In IJCAI, pages 989-995, 2019. +[37] Xu-Cheng Yin, Wei-Yi Pei, Jun Zhang, and Hong-Wei Hao. Multi-orientation scene text detection with adaptive clustering. IEEE Trans. Pattern Anal. Mach. Intell., 37(9):1930-1937, 2015. +[38] Xu-Cheng Yin, Xuwang Yin, Kaizhu Huang, and Hong-Wei Hao. Robust text detection in natural scene images. IEEE Trans. Pattern Anal. Mach. Intell., 36(5):970–983, 2014. +[39] Xu-Cheng Yin, Ze-Yu Zuo, Shu Tian, and Cheng-Lin Liu. Text detection, tracking and recognition in video: A comprehensive survey. IEEE Trans. Image Processing, 25(6):2752-2773, 2016. +[40] Chengquan Zhang, Borong Liang, Zuming Huang, Mengyi En, Junyu Han, Errui Ding, and Xinghao Ding. Look more than once: An accurate detector for text of arbitrary shapes. In CVPR, pages 10552-10561, 2019. +[41] Zheng Zhang, Wei Shen, Cong Yao, and Xiang Bai. Symmetry-based text line detection in natural scenes. In CVPR, pages 2558-2567, 2015. +[42] Xinyu Zhou, C.Yao, He Wen, Yuzhi Wang, Shuchang Zhou, Weiran He, and Jiajun Liang. EAST: An efficient and accurate scene text detector. In CVPR, pages 2642-2651, 2017. \ No newline at end of file diff --git a/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/images.zip b/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..67e00f622de2221d7c191f0497f1c1659856f095 --- /dev/null +++ b/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68872d45b474a0b8a64cd73e9c46d87469c04271f47b0fba9c3fb92ddb0c97d1 +size 820095 diff --git a/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/layout.json b/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1e9657ba1fc61b7540fc77d0817a913257e0f848 --- /dev/null +++ b/deeprelationalreasoninggraphnetworkforarbitraryshapetextdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46a383f88d84227021a87f6ff8983f43da7ccc14a56757639776d357256b0624 +size 432574 diff --git a/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/03a76425-6892-4cfb-95bb-30ed23f88982_content_list.json b/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/03a76425-6892-4cfb-95bb-30ed23f88982_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..006a7ac132b57dff194d3a212a30b9a0059081ce --- /dev/null +++ b/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/03a76425-6892-4cfb-95bb-30ed23f88982_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aae5c719d1abece16b4c40b2697e918a4d271ec41adc29eccb9c11b93530ff87 +size 84135 diff --git a/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/03a76425-6892-4cfb-95bb-30ed23f88982_model.json b/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/03a76425-6892-4cfb-95bb-30ed23f88982_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6d77165394b4f3f8d62f9ca93ce5837ce05d01ea --- /dev/null +++ b/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/03a76425-6892-4cfb-95bb-30ed23f88982_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3d960b80616162ddab8d9e5e75be78449f27d986b2e64eb8f6ecadb97c7b10f +size 102545 diff --git a/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/03a76425-6892-4cfb-95bb-30ed23f88982_origin.pdf b/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/03a76425-6892-4cfb-95bb-30ed23f88982_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..75a56c68a4612de526dcb051e38523de0829b58f --- /dev/null +++ b/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/03a76425-6892-4cfb-95bb-30ed23f88982_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff5f6daba671fa015a11a1a6a3288a387355dda4fcb2036add4ccfd105e7b679 +size 438950 diff --git a/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/full.md b/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a8c6fa8d284d85b3477dea5e0e0ebe522b55a00d --- /dev/null +++ b/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/full.md @@ -0,0 +1,338 @@ +# Deep Representation Learning on Long-tailed Data: A Learnable Embedding Augmentation Perspective + +Jialun Liu $^{1*}$ , Yifan Sun $^{2*}$ , Chuchu Han $^{3}$ , Zhaopeng Dou $^{4}$ , Wenhui Li $^{1\dagger}$ + +$^{1}$ Jilin University $^{2}$ Megvii Inc. $^{3}$ Huazhong University of Science and Technology $^{4}$ Tsinghua University + +jialun18@mails.jlu.edu.cn peter@megvii.com liwh@jlu.edu.cn + +# Abstract + +This paper considers learning deep features from long-tailed data. We observe that in the deep feature space, the head classes and the tail classes present different distribution patterns. The head classes have a relatively large spatial span, while the tail classes have a significantly small spatial span, due to the lack of intra-class diversity. This uneven distribution between head and tail classes distorts the overall feature space, which compromises the discriminative ability of the learned features. In response, we seek to expand the distribution of the tail classes during training, so as to alleviate the distortion of the feature space. To this end, we propose to augment each instance of the tail classes with certain disturbances in the deep feature space. With the augmentation, a specified feature vector becomes a set of probable features scattered around itself, which is analogical to an atomic nucleus surrounded by the electron cloud. Intuitively, we name it as "feature cloud". The intraclass distribution of the feature cloud is learned from the head classes, and thus provides higher intra-class variation to the tail classes. Consequently, it alleviates the distortion of the learned feature space, and improves deep representation learning on long tailed data. Extensive experimental evaluations on person re-identification and face recognition tasks confirm the effectiveness of our method. + +# 1. Introduction + +Large-scale datasets play a crucial role in deep representation learning, as well as in many other deep learning based visual tasks. In the real-world, large-scale datasets often exhibit extreme long-tailed distribution [8, 10]. Concretely, some identities have sufficient samples, while for other massive identities, only very few samples are available. They are defined as the head classes and tail classes, respectively. Long-tailed distribution poses great challenge + +to deep representation learning [1]. + +We investigate the impact of long-tailed distribution with focus on the deeply learned feature space. In a specified deep representation task, i.e., person re-identification (re-ID), We visualize several neighboring head classes in Fig. 1 and find that the sample number is an important factor for intra-class diversity. Firstly we observe the original distribution of the head classes in Fig. 1 (a). The head classes can be well distinguished with a distinct margin. With rich intra-class diversity, each head class occupies a wide span in the feature space. Further, we reduce the samples of some head classes so they change to tail classes. As is shown in Fig. 1 (b), we discover that samples from tail class distribute narrowly in the learned feature space, due to the lack of intra-class diversity. This uneven distribution distorts the overall feature space and consequently compromises the discriminative ability of the learned features. + +To be more concrete, we further quantitatively investigate the intra-class diversity w.r.t. the long-tailed distribution. Given a specified class, we calculate the geometric angles between the features and the corresponding class center in the deep feature space. We transform a re-ID dataset (i.e., DukeMTMC-reID) into a long-tailed one by setting some classes to have only 4 samples. Under a popular baseline for deep representation learning [35], the variations of head classes are distributed within $0.463 \pm 0.030$ (95% Confidence Interval (CI)). In contrast, the variations of tail classes are significantly small, with $0.288 \pm 0.023$ as the 95% CI. Such observations further confirms that 1) tail classes have smaller variance and 2) the sample number per class is the dominating factor on the variance. + +With this insight, we propose to transfer the intra-class distribution of head classes to tail classes in the feature space. Our target is to encourage the tail classes to achieve similar intra-class angular variability with the head classes in training. Specifically, we first calculate the distribution of angles between the features of head class and their corresponding class center. By averaging the angular variances of all the head classes, we obtain the overall variance of head classes. Next, we consider transferring the variance + +![](images/9cd41ebe151afc690010715f15e86dc6a523943a057e25d85343e2e155576a4c.jpg) +(a) + +![](images/e304e9ac4280f1801d7c3f38a2b91fc4703c9bbd44dae09d0fc5ee9485c8c919.jpg) +(b) +Figure 1. We select several classes from DukeMTMC-reID dataset [44, 24] then visualize features in the embedding layer with t-SNE [32]. (a) The visualization of features from head classes (dot). With the wide region in the feature space, each class can be well distinguished. (b) We reduce the samples of some head classes so that they become tail classes (triangle). With these tail classes, the spanned feature space is narrowed, which leads to the distortion of the original feature space. So it is hard for the tail classes to be separated from other classes. (c) In training, the space is expanded for the tail class so that it is pushed away from others. + +![](images/4234a473059f8f7f0ca3a934a2db8ca244bcfbfb21748913ca040d7a15476791.jpg) +(c) + +of head class to each tail class. To this end, we propose to augment each tail class instance with certain disturbances in the deep feature space. With the augmentation, a specified feature vector becomes a set of probable features scattered around itself, which is termed "feature cloud". Each instance with the corresponding feature cloud will have a relatively large distribution range, making the tail classes have a similar angular distribution with head class. Our method enforces stricter supervision on the tail classes, and thus leads to higher within-class compactness. As Fig. 1 (c) shows, with the compensation of intra-class diversity during training, the tail classes are separated from other classes by a clear margin. Under the setting of re-ID mentioned before, the intra-class angular variance of tail classes turns out over even lower (than the tail classes in baseline), which is ccentered at 0.201. + +Moreover, to improve the flexibility of the method, we abandon the explicit definition of head class and tail class. Compared with some methods that divide the two classes, our approach makes the calculation entirely related to the distribution of dataset, and there is no human interference. + +We summarize the contributions of our work as follows: + +- We propose a learnable embedding augmentation perspective to alleviate the problem of discriminative feature learning on long-tailed data, which transfers the intra-class angular distribution learned from head classes to tail classes. +- Extensive ablation experiments on re-ID and face recognition demonstrate the effectiveness of the proposed method. + +# 2. Related Work + +Feature learning on imbalanced datasets. Recent works for feature learning on imbalanced data are + +mainly divided into three manners: re-sampling [1], re-weighting [21], and data augmentation [3]. The re-sampling technique includes two types: over-sampling the tail classes and under-sampling the head classes. Over-sampling manner samples the tail data repeatedly, which enables the classifier to learn tail classes better. But it may lead to over-fitting of tail classes. To reduce the risk of over-fitting, SMOTE [2] is proposed to generate synthetic data of the tail class. It randomly places the newly created instances between each tail class data point and its nearest neighbor. The under-sampling manner [6] reduces the amount of data from head classes while keeping the tail classes. But it may lose valuable information on head classes when data imbalance is extreme. The re-weighting approach assigns different weights for different classes or different samples. The traditional method re-weights classes proportionally to the inverse of their frequency of samples. Cui et al. [4] improve the re-weighting by the inverse effective number of samples. Li et al. [18] propose a method which down-weights examples with either very small gradients or large gradients because examples with small gradients are well-classified and those with large gradients tend to be outliers. Recently, data augmentation methods based on Generative Adversarial Network (GAN) [3] are popular. [41] and [9] transfer the semantic knowledge learned from the head classes to compensate tail classes, which encourage the tail classes to have similar data distribution to the head classes. All the methods divide the classes into the head or tail class, while our method abandons the constraint. + +Loss function. Loss function plays an important role in deep feature learning, and the most popular one is the Softmax loss [28]. However, it mainly considers whether the samples can be correctly classified and lacks the constraint of inter-class distance and intra-class distance. In order to improve the feature discrimination, many loss func + +![](images/bfbe00709d3f8c26e26b4dc4ad7389f55f308f14bee862431b7503818492411a.jpg) +Figure 2. Overview of our proposed framework. The head data and tail data are fed into the deep network to obtain the features. We calculate the distribution of angles between the features and the class center for head class and tail class, respectively. Subsequently, we transfer the angular variance of head class (red curve) to tail class (green curve). In other words, based on the original distribution of tail class, we add an additional distribution (yellow curve). Then we get a new distribution of tail class (blue curve). Finally, we use the head data and the new tail data to calculate the loss. + +tions are proposed to enhance the cosine and angular margins between different classes. Wen et al. [39] design a center loss to reduce the distance between the sample and the corresponding class center. The L2-Softmax [23] and NormFace [34] add normalization to produce represented features and achieve better performance. Besides normalization, adding a margin can enhance the discrimination of features by inserting distance among samples of different classes. A-Softmax Loss [20] normalizes the weights and adds multiplicative angular margins to learn more divisible angular characteristics. CosFace [35] adds an additive cosine margin to compress the features of the same class in a compact space, while enlarging the gap of features of different classes. ArcFace [5] puts an additive margin into angular space so that the loss relies on both sine and cosine dynamically to learn more angular characteristics. CosFace [35] and ArcFace [5] are chosen as baseline. Although we model the intra-class angle, which is similar to them, our goal is to solve the problem of discriminative feature learning on long-tailed data. + +# 3. The Proposed Approach + +In this section, A brief description of our method is given in Section 3.1. We review the baseline in Section 3.2. We describe the updating process of the class center and the calculation of angular distribution in Section 3.3. The construction of the feature cloud is detailed in Section 3.4. + +# 3.1. Overview of Framework + +The framework of our method is shown in Fig. 2. First, the head data and tail data are fed into the deep model to extract features. And we consider to model the distribution of intra-class features by the distribution of angles between features and their corresponding class center. Then the cen + +ter of each class is calculated, as to be detailed in Section 3.3. We build an angle memory for each class, which is used to store the angles between the features and their class center. Assuming the angles obey the Gaussian distribution, the angular distributions of head class and tail class can be denoted as $\theta_h \sim \mathrm{N}(\mu_h, \sigma_h^2)$ and $\theta_t \sim \mathrm{N}(\mu_t, \sigma_t^2)$ , respectively. Next, we transfer the angular variance learned from the head class to every tail class. Consequently, the intraclass angular diversity of tail class is similar to the head class. Specifically, we build a feature cloud around each tail instance. An instance sampled from the feature cloud has the same identity with the tail instance. The angle between them is $\theta_\Delta$ and $\theta_\Delta \sim \mathrm{N}(0, \sigma_h^2 - \sigma_t^2)$ . We assume the two distribution: $\theta_t \sim \mathrm{N}(\mu_t, \sigma_t^2)$ and $\theta_\Delta \sim \mathrm{N}(0, \sigma_h^2 - \sigma_t^2)$ are independent of each other. By transformation, the new intra-class angular distribution of tail class is built as $\theta_t + \theta_\Delta \sim \mathrm{N}(\mu_t, \sigma_h^2)$ in training process. Finally, we use the original features of head classes and the reconstructed features of tail classes to calculate the loss. + +# 3.2. Baseline Methods + +The traditional softmax loss optimizes the decision boundary between two categories, but it lacks the constraint of inter-class distance and intra-class distance. CosFace [35] effectively minimizes intra-class distance and maximums inter-class distance by the introducing a cosine margin to maximize the decision margin in the angular space. The loss function can be formulated as: + +$$ +L _ {1} = - \frac {1}{N} \sum_ {n = 1} ^ {N} \log \frac {e ^ {s (\cos \left(\theta_ {y _ {n}}\right) - m _ {c})}}{e ^ {s (\cos \left(\theta_ {y _ {n}}\right) - m _ {c})} + \sum_ {j \neq y _ {n}} ^ {C} e ^ {s \cos \left(\theta_ {j}\right)}}, \tag {1} +$$ + +where $N$ and $C$ are the mini-batch size and the number of total classes, respectively. $y_{n}$ is the label of $n$ -th image. + +We define the feature vector of $n$ -th image and the weight vector of class $y_{n}$ as $f_{n}$ and $W_{y}$ , respectively. $f_{n}$ and $W_{y}$ are normalized by $l_{2}$ normalisation and the norm of feature vector is rescaled to $s$ . $\theta_{y_n}$ is the angle between the weight $W_{y}$ and the feature $f_{n}$ . $m_{c}$ is a hyper-parameter controlling the magnitude of the cosine margin. + +Different from CosFace [35], ArcFace [5] employs an additive angular margin loss, which is formulated as: + +$$ +L _ {2} = - \frac {1}{N} \sum_ {n = 1} ^ {N} \log \frac {e ^ {s \left(\cos \left(\theta_ {y _ {n}} + m _ {a}\right)\right)}}{e ^ {s \left(\cos \left(\theta_ {y _ {n}} + m _ {a}\right)\right)} + \sum_ {j \neq y _ {n}} ^ {C} e ^ {s \cos \left(\theta_ {j}\right)}}, \tag {2} +$$ + +where $m_{a}$ is an additive angular margin penalty between feature vector $f_{n}$ and its corresponding $W_{y}$ . It aims to enhance the intra-class compactness and inter-class distance simultaneously. + +In this paper, we choose CosFace [35] and ArcFace [5] as baseline. The reasons are as follows: + +- They have achieved the state-of-the-art performance in the face recognition task, which can be seen as strong baselines in the community of deep feature learning. +- They optimize the intra-class similarity by achieving much lower intra-class angular variability. Since our method employs intra-class angles to model the intra-class feature distribution, the two loss functions can be naturally combined with our method. + +# 3.3. Learning the intra-class angular distribution + +The intra-class angular diversity can intuitively show the diversity of intra-class features. In this section, we study the distribution of angles between the features and their corresponding class center. $c_{i}$ denotes the $i$ -th class center of features. $f_{i}^{k}$ is the $k$ -th instance feature of class $i$ . $c_{i}$ has the same dimension as $f_{i}^{k}$ . So, we can calculate the angle between $f_{i}^{k}$ and $c_{i}$ as follow: + +$$ +\beta_ {i, k} = \operatorname {a r c c o s} \left(\frac {f _ {i} ^ {k} c _ {i}}{\| f _ {i} ^ {k} \| \| c _ {i} \|}\right), \tag {3} +$$ + +where the $c_{i}$ should be updated in the training processing. Ideally, we need to take the entire training samples into account and average the features of every class in each epoch. Obviously, this approach is impractical and inefficient. Inspired by [39], we also perform the update based on a mini-batch. In each mini-batch, the class center is computed by averaging the feature vectors of the corresponding class. To avoid the misleading by some mislabelled samples, we set a center learning rate $\gamma$ to update the class center. The updating method of $c_{i}$ is formulated as: + +$$ +c _ {i} ^ {l} = (1 - \gamma) c _ {i} ^ {l} + \gamma c _ {i} ^ {l - 1}, \tag {4} +$$ + +where $c_i^l$ is the center of class $i$ in $l$ -th mini-batch. Each class center is updated by the center of current and previous mini-batch. + +![](images/1bcb089e651d7d5f76916c41af289fd819826c0021c70554095e4e1bca5d3151.jpg) +Figure 3. We transfer the intra-class angular distribution learned from the head class to the tail class. + +For the class $i$ , we maintain an angle memory $\beta_{i}$ to store the angles between the features and their corresponding class center $c_{i}$ . The size of angle memory is formulated as: + +$$ +S _ {i} = K _ {i} \times P. \tag {5} +$$ + +$K_{i}$ is the sample number of the $i$ -th class. $P$ is a hyperparameter determining the angle memory per class. Then we calculate the mean $\mu_{i}$ and variance $\sigma_{i}^{2}$ of $\beta_{i}$ . The angular distribution of the class $i$ is formulated as $\mathrm{N}(\mu_i,\sigma_i^2)$ . + +# 3.4. Constructing the feature cloud for tail data + +In this section, we elaborate the process of constructing the feature cloud for a tail instance. First, like the previous works [41, 46], we assign a label to mark the head and tail class, yielding the vanilla version. On the other hand, we introduce a full version which abandons the explicit division of head and tail class. This manner is more flexible since it is only related to the distribution of the dataset. + +Vanilla version. We strictly divide the head class and the tail class through a threshold $T$ . If the number of samples belonging to class $i$ is larger than $T$ , the $i$ -th class is defined as a head class. Otherwise, it is defined as a tail class. + +In the Section 3.3, we have calculated the angular distribution of each class, which is assumed to lie in Gaussian distribution. By averaging the variance of all head classes, we obtain the overall variance of the head class. The mean is computed in the similar way. So the overall angular distribution of the head class is as follow: + +$$ +\mu_ {h} = \frac {\sum_ {z = 1} ^ {C _ {h}} \mu_ {z}}{C _ {h}}, \quad \sigma_ {h} ^ {2} = \frac {\sum_ {z = 1} ^ {C _ {h}} \sigma_ {z} ^ {2}}{C _ {h}}, \tag {6} +$$ + +where $C_h$ is the number of head classes. $\mu_z$ and $\sigma_z^2$ is the angular mean and variance of the $z$ -th head class, respectively. $\mu_h$ and $\sigma_h^2$ describe the overall angular distribution of the head class. We can also obtain the class center for every tail class. The angular distribution of the $x$ -th tail class is denoted as $\mathrm{N}(\mu_t^x,\sigma_t^{x^2})$ . + +For the head classes, they include sufficient samples which show the intra-class angular diversity. In general, $\sigma_h$ is greater than $\sigma_t$ , so our target is to transfer $\sigma_h^2$ to each tail class. As is shown in Fig. 3, we construct a feature cloud around each feature of $x$ -th tail class. By this way, the space + +spanned by tail class is enlarged, in training, and the real tail instances are pushed away from other classes. The angle between the feature belonging to the $x$ -th tail class and a feature sampled from its corresponding feature cloud is $\alpha_{x}$ , where $\alpha_{x} \sim \mathrm{N}(0, \sigma_{h}^{2} - \sigma_{t}^{x2})$ and $\alpha_{x} \in \mathbb{R}^{1 \times C}$ . In training, the feature sampled from the feature cloud shares the same identity with the real tail feature. We have assumed the two distributions: $\mathrm{N}(\mu_t^x, \sigma_t^{x2})$ and $\mathrm{N}(0, \sigma_h^2 - \sigma_t^{x2})$ are independent of each other in Section 3.1. So the original angular distribution of the $x$ -th tail class is transferred from $\mathrm{N}(\mu_t^x, \sigma_t^{x2})$ to $\mathrm{N}(\mu_t^x, \sigma_h^2)$ . + +The new loss functions based on CosFace [35] and ArcFace [5] are defined as: + +$$ +L _ {3} = - \frac {1}{N} \sum_ {n = 1} ^ {N} \log \frac {e ^ {s \left(\cos \left(\theta_ {y _ {n}} + \alpha_ {y}\right) - m _ {c}\right)}}{e ^ {s \left(\cos \left(\theta_ {y _ {n}} + \alpha_ {y}\right) - m _ {c}\right)} + \sum_ {j \neq y _ {n}} ^ {C} e ^ {s \cos \left(\theta_ {j} + \alpha_ {y}\right)}}, \tag {7} +$$ + +$$ +L _ {4} = - \frac {1}{N} \sum_ {n = 1} ^ {N} \log \frac {e ^ {s \left(\cos \left(\theta_ {y n} + \alpha_ {y} + m _ {a}\right)\right)}}{e ^ {s \left(\cos \left(\theta_ {y n} + \alpha_ {y} + m _ {a}\right)\right)} + \sum_ {j \neq y _ {n}} ^ {C} e ^ {s \cos \left(\theta_ {j} + \alpha_ {y}\right)}}, \tag {8} +$$ + +in Eq.7 and 8, $\theta +\alpha$ and $\theta +\alpha +m_{a}$ are all clipped in the range $[0,\pi ]$ . $N$ and $C$ are the mini-batch size and class number, respectively. $\theta_{y_n}$ is the angle between the feature $f_{n}$ and the weight $W_{y}$ . $s$ is the scale, and $m_c$ , $m_{a}$ are the cosine margin and the angular margin in CosFace [35] and ArcFace [5], respectively. If $y_{n}$ is a head class, $\alpha_{y} = 0$ . As the training progresses, the tail class has the rich angular diversity as head class. + +Actually, we approximate the angle $(\theta^{\prime})$ between the feature sampled from feature cloud and the weight. If $\alpha > 0$ , we approximate $\theta^{\prime}$ by the upper bound of it, and the lower bound when $\alpha \leq 0$ . The proof is given below. + +Proposition. We denote a feature in the tail class as $f$ , and $W$ is the corresponding weight vector in the full connection layer. $f'$ is a feature randomly sampled from the feature cloud around $f$ . + +$$ +\langle f, W \rangle = \theta , \quad \langle f, f ^ {\prime} \rangle = \alpha_ {+}, \quad \langle W, f ^ {\prime} \rangle = \theta^ {\prime}, +$$ + +$$ +\| f \| = \| w \| = \| f ^ {\prime} \| = 1, \quad 0 \leq \theta + \alpha_ {+} \leq \pi , +$$ + +where $\langle a,b\rangle$ represents the angle between vector $a$ and $b$ , and $\|a\|$ represent the norm of vector $a$ . We want to prove: $|\theta - \alpha_{+}| \leq \theta' \leq \theta + \alpha_{+}$ . + +Proof. Simply, we suppose that $f = [1,0,\dots ,0]$ , then $W = [\cos \theta ,w_2,\dots ,w_n]$ . We use the Householder transformation [13] to transform $W$ to $V$ , where $V = [\cos \theta ,\sin \theta ,0,\dots ,0]$ . Let $P = I - 2U\cdot U^T$ , where $U = W - V / \| W - V\|$ , then $f = Pf, V = PW, \hat{f}^{\prime} = Pf^{\prime}$ . $P$ is an orthogonal transformation which preserves the inner product and norm. Therefore, we have + +$$ +\langle f, V \rangle = \theta , \quad \langle f, \hat {f} ^ {\prime} \rangle = \alpha_ {+}, \quad \langle V, \hat {f} ^ {\prime} \rangle = \theta^ {\prime}. +$$ + +Denote $\hat{f}^{\prime} = [\hat{f}_{1}^{\prime},\hat{f}_{2}^{\prime},\dots ,\hat{f}_{n}^{\prime}],$ then + +$$ +\cos \alpha_ {+} = f \cdot \hat {f} ^ {\prime} = \hat {f} _ {1} ^ {\prime}, \quad \hat {f} _ {2} ^ {\prime 2} + \dots + \hat {f} _ {n} ^ {\prime 2} = \sin^ {2} \alpha_ {+}. +$$ + +We get $\hat{f}_2^\prime \sin \theta \in [-\sin \alpha_+ \sin \theta, \sin \alpha_+ \sin \theta]$ , where $\theta \in [0, \pi]$ . Further, we have + +$$ +\cos \theta^ {\prime} = \hat {f} ^ {\prime} \cdot V = \cos \alpha_ {+} \cos \theta + \hat {f} _ {2} ^ {\prime} \sin \theta , +$$ + +$$ +\cos \theta^ {\prime} \in [ \cos (\theta + \alpha_ {+}), \cos (\theta - \alpha_ {+}) ]. +$$ + +We get the conclusion: $|\theta - \alpha_{+}| \leq \theta' \leq \theta + \alpha_{+}$ . + +Although $\alpha \sim N(0, \sigma^2)$ , we only need to focus on $\alpha \in [-\pi, \pi]$ , since $\theta + \alpha$ is clipped in the range $[0, \pi]$ . + +- when $0 \leq \alpha \leq \pi$ , substituting $\alpha$ for $\alpha_{+}$ , we have $|\theta - \alpha| \leq \theta' \leq \theta + \alpha$ , in which $\theta + \alpha$ is the upper bound. +- when $-\pi \leq \alpha \leq 0$ , substituting $-\alpha$ for $\alpha_{+}$ , we have $|\theta - (-\alpha)| \leq \theta' \leq \theta + \alpha$ , which is equivalent to $\theta + \alpha \leq \theta' \leq \theta - \alpha$ , so $\theta + \alpha$ is the lower bound. + +Full version. The distorted feature space is well repaired by constructing a feature cloud around a tail instance. But the process in the vanilla version is inflexible. We set a threshold $T$ to divide the head and tail classes, artificially. The overall angular distribution in Eq.6 only depends on the head classes. In the full version, the explicit definition is discarded. We have observed that the intra-class diversity is positively correlated with the sample number, in general. Therefore, we calculate the overall variance by weighting the angular variance of each class. The weight is the sample number per class. The final variance is formulated as: + +$$ +\sigma^ {2} = \sum_ {i = 1} ^ {C} \frac {\left(K _ {i} - 1\right) \sigma_ {i} ^ {2}}{\sum \left(\mathrm {K} _ {\mathrm {i}} - 1\right)}, \tag {9} +$$ + +where $C$ is the number of classes, and $K_{i}$ is the number of samples belong to class $i$ . $\sigma_{i}^{2}$ is the angular variance of the $i$ -th class. A smaller $K_{i}$ means that the variance of the $i$ -th class almost has no contribution to the final variance, so the final variance mainly depends on the classes with sufficient samples. For $i$ -th class, if $\sigma_{i}^{2} < \sigma^{2}$ , it means the class $i$ has poor intra-class diversity. Therefore $\alpha_{y}$ is available in Eq.7 and 8, and we construct the feature cloud for each instance sampled from class $i$ . + +The advantage of the full version is that the calculation of feature cloud entirely depends on the distribution of the dataset. There is no human interference in the process. + +# 4. Experiments + +In this section, we conduct extensive experiments to confirm the effectiveness of our method. First we describe the experimental settings. Then we show the performance on person re-identification and face recognition with different long-tailed settings. + +# 4.1. Settings + +Person re-identification. Evaluations are conducted on three datasets: Market-1501 [42], DukeMTMC-reID [24, 44] and MSMT17 [37]. To study the impact of the ratio between head classes and tail classes on training a re-ID system, we construct several long-tailed datasets based on the original dataset. We rank the classes by their number of samples. The top 150, 100, 50 and 20 identities are marked as the head class, respectively. The rest is treated as the tail classes, and the number of samples is reduced to 5 each class. In this way, we form the training sets of $\langle H150,S5\rangle$ , $\langle H100,S5\rangle$ , $\langle H50,S5\rangle$ , and $\langle H20,S5\rangle$ . For training, we choose the widely used ResNet-50 [11] as the backbone. The last layer of the network is followed by a Batch Normalization layer (BN). The optimizer is Adam. The scale $s$ and $m_{c}$ of CosFace [35] are set to be 24 and 0.2, respectively. The scale $s$ and $m_{a}$ of ArcFace [35] are set to be 16 and 0.2, respectively. The learning rate of class center $\gamma$ is set to be 0.1. For testing, the 2048-d global features after BN are used for evaluation. The cosine distance of features is computed as the similarity score. We use two evaluation metrics: Cumulative Matching Characteristic (CMC) and mean average precision(mAP) to evaluate our method. + +Face recognition. We adopt the widely used dataset MS-Celeb-1M for training. The original MS-Celeb-1M data is known to be very noisy, so we clean the dirty face images and exclude the $79K$ identities and $1M$ images. We rank the classes through the number of samples they have. The top $5K$ and $3K$ are selected as head classes. Among the rest classes, we select the first $10K$ and $20K$ as tail classes and randomly pick 5 images per class. In this way, we form the training set of $\langle H5K,T20K\rangle$ , $\langle H5K,T10K\rangle$ , $\langle H3K,T20K\rangle$ and $\langle H3K,T10K\rangle$ . The face images are resized to $112\times 112$ . For training, we choose the ResNet-18 [11] as our backbone. We train the model for 30 epoch by adopting the triangular learning rate policy[26], and construct feature cloud at the start of the third cycle. The scale $s$ and $m_{c}$ of CosFace [35] are set to be 64 and 0.35. The scale $s$ and $m_{a}$ of ArcFace [35] are set to be 64 and 0.5. We extract 512-D features for model inference. For testing, we evaluate our method on LFW [14], MegaFace challenge1 (MF1) [17] and IJB-C [22]. We report our results on the Rank-1 accuracy of LFW and MF1, and different TPR@FPR of IJB-C TPR@FPR. + +# 4.2. Experiments on person re-identification + +Performance of baseline. Table 1 reports the results of the baseline. We compare our baseline with the advanced methods. Our baseline achieves very competitive performance, which is reliable. + +Comparison with state-of-the-art approaches. We compare our full version with the state-of-the-art methods on Market-1501 and DukeMTMC-reID. The comparisons + +
MethodsMarket-1501DukeMTMCMSMT17
mAPRank-1mAPRank-1mAPRank-1
HA-CNN [19]75.791.263.880.5--
PCB [30]77.492.366.181.840.468.2
Mancs [33]82.393.171.884.9--
CosFace79.592.473.085.649.275.3
ArcFace81.192.573.285.850.575.5
+ +Table 1. Comparison with the advanced methods on the Market-1501, DukeMTMC-reID and MSMT17 datasets + +
MethodsMarket-1501DukeMTMC
mAPRank-1mAPRank-1
GFSVDNet [29]62.182.356.876.7
BraidNet [36]69.583.769.576.4
CamStyle [47]71.689.557.678.3
Advesarial [15]70.486.462.179.1
Dual [7]76.691.464.681.8
Mancs [33]82.393.184.971.8
IANet [12]83.194.473.487.1
DG-Net [43]86.094.874.886.6
PFAACN [40]66.985.959.276.8
PSE [25]69.087.762.079.8
PCB [30]77.492.366.181.8
SPReID [16]81.392.570.984.4
OursLEAP-CF84.294.474.287.8
LEAF-AF83.293.574.286.9
+ +are reported in Table 2. It shows that our baseline has surpassed many advanced methods. And our method further improves the performance compared with baseline. Specifically, LEPA-CF achieves $94.4\%$ on rank-1 for Market-1501, and $87.8\%$ on rank-1 for DukeMTMC-reID. We also evaluate our method on a recently released dataset MSMT17 [37]. The result is shown in Table 3. Compared with DG-Net [43], our performance is very close to it. However, our method is a simple but efficient method, which does not use GAN to generate many image-level samples. + +Table 2. Comparison with state-of-the-art methods on Market-1501 and DukeMTMC-reID. Three groups: global features(GF), part features(PF) and ours. LEAP-CF and LEAP-AF are our full version combined with CosFace and ArcFace, respectively. + +
MethodsmAPRank-1Rank-5Rank-10
GoogleNet [31]23.047.665.071.8
Pose-driven [27]29.758.073.679.4
Verif-Identif [45]31.660.576.281.6
GLAD [38]34.061.476.881.6
PCB [30]40.468.281.285.5
IANet [12]46.875.585.588.7
DG-Net [43]52.377.287.490.5
LEAP-CF50.876.786.990.0
LEAP-AF51.376.386.589.8
+ +Table 3. Comparison with advanced methods on the MSMT17. + +Evaluation with the vanilla version. We evaluate the + +![](images/c8e37c56ae779022cda5f5272f341c9c2ecbc13a7cd65760b19aa3bc304978cd.jpg) +(a) Market-1501 + +![](images/20adc15c873311bcdaa6e91d5289ca392eba4e216c641515a005523a3efec933.jpg) +Figure 4. Comparison of vanilla version and full version on Market-1501 and DukeMTMC-reID. LEAP-CV and LEAP-AV are our vanilla version combined with CosFace and ArcFace, respectively. LEAP-CF and LEAP-AF are our full version combined with CosFace and ArcFace, respectively. + +![](images/aefdb346f6b24e324e39e0f02aad4b6232b2752821dccf25bf459cb07722f866.jpg) +(b) DukeMTMC + +![](images/cc6aa8dd231557273f55a53cd4b8ba70101294e44b90065a3139550c2791266b.jpg) + +
Dataset →Market-1501DukeMTMC
Train ↓Method ↓mAPRank-1mAPRank-1
(H150, S5)CosFace67.386.357.375.6
LEAP-CV70.686.959.477.1
ArcFace70.687.360.277.6
LEAP-AV71.387.960.678.7
(H100, S5)CosFace62.883.352.670.3
LEAP-CV68.786.555.674.8
ArcFace68.086.656.774.8
LEAP-AV69.887.357.976.5
(H50, S5)CosFace60.580.748.067.7
LEAP-CV67.384.953.173.0
ArcFace64.283.851.171.1
LEAP-AV67.184.654.473.5
(H20, S5)CosFace55.678.647.066.0
LEAP-CV64.183.252.472.7
ArcFace60.181.150.569.3
LEAP-AV64.382.254.273.7
+ +effectiveness of the vanilla version. For comparison, we train the baseline model on the long-tailed re-ID datasets under the supervision of CosFace [35] and ArcFace [5]. We compare our method with baseline methods. The results are shown in Table 4. We have the following observations. First, compared with CosFace, ArcFace has higher Rank-1 and mAP accuracy on the same long-tailed setting. For example, on Market-1501 with $\langle H20, S5 \rangle$ , ArcFace achieves the Rank-1 accuracy of $81.1\%$ , while the Rank-1 accuracy of CosFace is $78.6\%$ . This indicates that Arcface has a stronger robustness for the long-tailed re-ID. Second, in different long-tailed settings, the proposed LEAP method combined with CosFace and ArcFace achieves consistently better results than the baseline with significant margins. This indicates that the LEAP is a robust method for long-tailed data distribution. Third, as the long-tailed distribu + +tion is more serious, the improvement of our method becomes even more obvious. For example, in the $\langle H20,S5\rangle$ setting on DukeMTMC-reID, the improvement of LEAPCV reaches $+6.7\%$ (from $66.0\%$ to $72.7\%$ ) in the Rank-1 accuracy. + +Comparison between vanilla version and full version. We show the results comparison of vanilla version and full version under different long-tailed settings in Fig. 4. We observe that the full version obtains the results very close to vanilla version, and even better results in some settings. By this experiment, we justify that compared with those methods which need a label to distinguish between head class and tail class, the full version is more flexible. + +Table 4. Controlled experiments by varying the ratio between head and tail data. $H$ is the number of head class. $S$ denotes that the sample number per tail class. CosFace and ArcFace are baselines. LEAP-CV and LEAP-AV are vanilla versions combined with CosFace and ArcFace. + +
Dataset →Market-1501DukeMTMC
Train ↓Method ↓mAPRank-1mAPRank-1
(H20,S5)CosFace55.678.647.066.0
LEAP-CF65.283.452.772.8
ArcFace60.181.150.569.3
LEAP-AF63.983.254.273.6
(H20,S4)CosFace43.167.736.053.7
LEAP-CF54.776.842.663.0
ArcFace49.473.839.758.8
LEAP-AF56.577.944.264.4
(H20,S3)CosFace31.955.525.640.8
LEAP-CF43.567.233.251.1
ArcFace36.260.128.946.7
LEAP-AF44.166.134.353.3
+ +Table 5. Impact analysis of different tail data for feature learning. + +The impact of tail data. When the head class is reduced gradually and the tail data is increasing, the results are shown in Table 5, we observe the effect of tail data on performance. We gradually reduce the samples of each tail class, which results in insufficient training data, and the performance of the model drops dramatically. However, our method still makes a large margin improvement over the baseline. For example, in the $\langle H20,S3\rangle$ setting on Market1501, even the number of samples for each tail class is only 3, the improvement of LEAP-CF reaches $+11.7\%$ (from + +
Test →LFWMegaFaceIJB-C(TPR@FPR)
Train ↓Method ↓Rank-1Rank-11e-31e-41e-5
(H5K,T10K)CosFace98.7381.4183.3573.3263.42
LEAP-CV98.8881.7883.8373.9664.64
ArcFace98.6081.0882.3072.4562.46
LEAP-AV98.6781.6983.1672.9763.22
(H5K,T20K)CosFace98.8782.7284.7776.7168.19
LEAP-CV98.9883.1684.8277.2168.88
ArcFace98.7382.7684.4576.2266.93
LEAP-AV99.1083.3685.7077.7768.05
(H3K,T10K)CosFace97.6572.2779.0868.0656.52
LEAP-CV97.9773.1979.6069.1858.89
ArcFace97.8272.4578.2466.9955.31
LEAP-AV98.0773.4378.8467.8255.75
(H3K,T20K)CosFace98.0274.0681.2171.6861.03
LEAP-CV98.2375.1881.8772.1662.62
ArcFace98.2875.2481.0971.3661.60
LEAP-AV98.7376.2882.6173.2162.72
+ +Table 6. Face recognition results on LFW, MF1 and IJB-C are reported by varying the ratio between head and tail classes in training sets. $H$ and $T$ is the number of head class and tail class, respectively. + +![](images/e393325306cb10fb097e999fb66f9e7ac1f958b354f5d0fb0168633274c3754f.jpg) + +![](images/56b5cb7016ccdf772c95898312a6c68b044d122ae0e415aadc3788dc50c9ddbc.jpg) + +![](images/02f73d7d21b8d58010de18cb1d717cd1ebfdb06c89d2d596fb5ee22a00bafc5c.jpg) +Figure 5. Different timings of constructing the feature cloud for tail data. (a) Combined our method with CosFace [35]. (b) Combined our method with ArcFace [5] + +![](images/844f9f6a45fd9982a1c6bdc8f2334027697b32b2e92c0c51f164c783d0a136f7.jpg) + +55.5% to 67.2%) in the Rank-1 accuracy. + +Timing of feature cloud for tail data. We investigate the effect of timing of constructing a feature cloud for tail data on Market-1501 and DukeMTMC-reID dataset. We take a long-tailed version: $\langle H20, S4 \rangle$ as an example. The varying curve of the results is shown in Fig. 5. (a) Combined with CosFace [35]. When epoch is in the range of 10 to 30, our results are just marginally impacted and the best results are achieved. (b) Combined with ArcFace [5]. Our results are impacted just marginally and the best results are achieved from 20-th to 30-th epoch. + +# 4.3. Experiments on face recognition + +To further verify the observations in the re-ID task, we perform a similar set of experiments on the face recognition task. Different from re-ID, the dataset of face recognition has a relatively large scale. In order to improve the training efficiency, we update the class center every 5 iteration. The result is shown in Table 6. On LFW, our performance is improved slightly since LFW has been well solved. MF1 and IJB-C are the most challenging testing benchmark for face recognition. We report the Rank-1 accuracy of MF1 and TPR@FPR of IJB-C. Compared with the baseline, our method obtains consistency improvement. For example, in the $\langle H3K,T10K\rangle$ setting, we evaluate our method on IJB-C, the LEAP-CV improves TPR@FPR(1e-5) from $56.52\%$ to $58.89\%$ . In the $\langle H3K,T20K\rangle$ setting, we evaluate our method on MF1, the LEAP-CV improves Rank-1 accuracy from $74.06\%$ to $75.18\%$ . + +# 5. Conclusions + +This paper proposes a novel approach for deep representation learning on long-tailed data. We observe that in the deeply-learned feature space, the tail classes are prone to lack of intra-class diversity, which consequentially distorts the overall distribution of feature space. In response, we enhance the diversity of tail class with augmentation embedded in deep feature space. The pattern of the augmentation is learned from the head classes (with abundant intra-class diversity) and transferred to tail classes in the manner of feature cloud. Experiments on person re-identification and face recognition demonstrate the effectiveness of our method on deep feature learning with long-tailed distribution. + +# References + +[1] Mateusz Buda, Atsuto Maki, and Maciej A Mazurowski. A systematic study of the class imbalance problem in convolutional neural networks. Neural Networks, 106:249-259, 2018. 1, 2 +[2] Nitesh V Chawla, Kevin W Bowyer, Lawrence O Hall, and W Philip Kegelmeyer. Smote: synthetic minority oversampling technique. Journal of artificial intelligence research, 16:321-357, 2002. 2 +[3] Yunjey Choi, Minje Choi, Munyoung Kim, Jung-Woo Ha, Sunghun Kim, and Jaegul Choo. Stargan: Unified generative adversarial networks for multi-domain image-to-image translation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8789-8797, 2018. 2 +[4] Yin Cui, Menglin Jia, Tsung-Yi Lin, Yang Song, and Serge Belongie. Class-balanced loss based on effective number of samples. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9268-9277, 2019. 2 +[5] Jiankang Deng, Jia Guo, Niannan Xue, and Stefanos Zafeiriou. Arcface: Additive angular margin loss for deep face recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4690-4699, 2019. 3, 4, 5, 7, 8 +[6] Chris Drummond, Robert C Holte, et al. C4.5, class imbalance, and cost sensitivity: why under-sampling beats over-sampling. In Workshop on learning from imbalanced datasets II, volume 11, pages 1-8. CiteSeer, 2003. 2 +[7] Yang Du, Chunfeng Yuan, Bing Li, Lili Zhao, Yangxi Li, and Weiming Hu. Interaction-aware spatio-temporal pyramid attention networks for action classification. In Proceedings of the European Conference on Computer Vision (ECCV), pages 373-389, 2018. 6 +[8] Mark Everingham, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The pascal visual object classes (voc) challenge. International journal of computer vision, 88(2):303-338, 2010. 1 +[9] Hang Gao, Zheng Shou, Alireza Zareian, Hanwang Zhang, and Shih-Fu Chang. Low-shot learning via covariance-preserving adversarial augmentation networks. In Advances in Neural Information Processing Systems, pages 975-985, 2018. 2 +[10] Yandong Guo, Lei Zhang, Yuxiao Hu, Xiaodong He, and Jianfeng Gao. Ms-celeb-1m: A dataset and benchmark for large-scale face recognition. In European Conference on Computer Vision, pages 87–102. Springer, 2016. 1 +[11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 6 +[12] Ruibing Hou, Bingpeng Ma, Hong Chang, Xinqian Gu, Shiguang Shan, and Xilin Chen. Interaction-and-aggregation network for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9317–9326, 2019. 6 + +[13] Alston S Householder. Unitary triangularization of a nonsymmetric matrix. Journal of the ACM (JACM), 5(4):339-342, 1958. 5 +[14] Gary B Huang, Marwan Mattar, Tamara Berg, and Eric Learned-Miller. Labeled faces in the wild: A database for studying face recognition in unconstrained environments. 2008. 6 +[15] Houjing Huang, Dangwei Li, Zhang Zhang, Xiaotang Chen, and Kaiqi Huang. Adversarily occluded samples for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5098–5107, 2018. 6 +[16] Mahdi M Kalayeh, Emrah Basaran, Muhittin Gokmen, Mustafa E Kamasak, and Mubarak Shah. Human semantic parsing for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1062–1071, 2018. 6 +[17] Ira Kemelmacher-Shlizerman, Steven M Seitz, Daniel Miller, and Evan Brossard. The megaface benchmark: 1 million faces for recognition at scale. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4873-4882, 2016. 6 +[18] Buyu Li, Yu Liu, and Xiaogang Wang. Gradient harmonized single-stage detector. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 8577-8584, 2019. 2 +[19] Wei Li, Xiatian Zhu, and Shaogang Gong. Harmonious attention network for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2285–2294, 2018. 6 +[20] Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj, and Le Song. Spherical face: Deep hypersphere embedding for face recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 212-220, 2017. 3 +[21] Dhruv Mahajan, Ross Girshick, Vignesh Ramanathan, Kaiming He, Manohar Paluri, Yixuan Li, Ashwin Bharambe, and Laurens van der Maaten. Exploring the limits of weakly supervised pretraining. In Proceedings of the European Conference on Computer Vision (ECCV), pages 181-196, 2018. 2 +[22] Brianna Maze, Jocelyn Adams, James A Duncan, Nathan Kalka, Tim Miller, Charles Otto, Anil K Jain, W Tyler Niggel, Janet Anderson, Jordan Cheney, et al. Iarpa janus benchmark-c: Face dataset and protocol. In 2018 International Conference on Biometrics (ICB), pages 158-165. IEEE, 2018. 6 +[23] Rajeev Ranjan, Carlos D Castillo, and Rama Chellappa. L2-constrained softmax loss for discriminative face verification. arXiv preprint arXiv:1703.09507, 2017. 3 +[24] Ergys Ristani, Francesco Solera, Roger Zou, Rita Cucchiara, and Carlo Tomasi. Performance measures and a data set for multi-target, multi-camera tracking. In European Conference on Computer Vision, pages 17-35. Springer, 2016. 2, 6 +[25] M Saquib Sarfraz, Arne Schumann, Andreas Eberle, and Rainer Stiefelhagen. A pose-sensitive embedding for person re-identification with expanded cross neighborhood re + +ranking. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 420-429, 2018. 6 +[26] Leslie N Smith. Cyclical learning rates for training neural networks. In 2017 IEEE Winter Conference on Applications of Computer Vision (WACV), pages 464-472. IEEE, 2017. 6 +[27] Chi Su, Jianing Li, Shiliang Zhang, Junliang Xing, Wen Gao, and Qi Tian. Pose-driven deep convolutional model for person re-identification. In Proceedings of the IEEE International Conference on Computer Vision, pages 3960–3969, 2017. 6 +[28] Yi Sun, Xiaogang Wang, and Xiaou Tang. Deep learning face representation from predicting 10,000 classes. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1891-1898, 2014. 2 +[29] Yifan Sun, Liang Zheng, Weijian Deng, and Shengjin Wang. Svdnet for pedestrian retrieval. In Proceedings of the IEEE International Conference on Computer Vision, pages 3800-3808, 2017. 6 +[30] Yifan Sun, Liang Zheng, Yi Yang, Qi Tian, and Shengjin Wang. Beyond part models: Person retrieval with refined part pooling (and a strong convolutional baseline). In Proceedings of the European Conference on Computer Vision (ECCV), pages 480-496, 2018. 6 +[31] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1-9, 2015. 6 +[32] Laurens Van Der Maaten. Accelerating t-sne using tree-based algorithms. The Journal of Machine Learning Research, 15(1):3221-3245, 2014. 2 +[33] Cheng Wang, Qian Zhang, Chang Huang, Wenyu Liu, and Xinggang Wang. Mancs: A multi-task attentional network with curriculum sampling for person re-identification. In Proceedings of the European Conference on Computer Vision (ECCV), pages 365–381, 2018. 6 +[34] Feng Wang, Xiang Xiang, Jian Cheng, and Alan Loddon Yuille. Normface: 12 hypersphere embedding for face verification. In Proceedings of the 25th ACM international conference on Multimedia, pages 1041-1049. ACM, 2017. 3 +[35] Hao Wang, Yitong Wang, Zheng Zhou, Xing Ji, Dihong Gong, Jingchao Zhou, Zhifeng Li, and Wei Liu. Cosface: Large margin cosine loss for deep face recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5265-5274, 2018. 1, 3, 4, 5, 6, 7, 8 +[36] Yicheng Wang, Zhenzhong Chen, Feng Wu, and Gang Wang. Person re-identification with cascaded pairwise convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1470–1478, 2018. 6 +[37] Longhui Wei, Shiliang Zhang, Wen Gao, and Qi Tian. Person transfer gan to bridge domain gap for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 79–88, 2018. 6 + +[38] Longhui Wei, Shiliang Zhang, Hantao Yao, Wen Gao, and Qi Tian. Glad: Global-local-alignment descriptor for pedestrian retrieval. In Proceedings of the 25th ACM international conference on Multimedia, pages 420-428. ACM, 2017. 6 +[39] Yandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao. A discriminative feature learning approach for deep face recognition. In European conference on computer vision, pages 499-515. Springer, 2016. 3, 4 +[40] Jing Xu, Rui Zhao, Feng Zhu, Huaming Wang, and Wanli Ouyang. Attention-aware compositional network for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2119–2128, 2018. 6 +[41] Xi Yin, Xiang Yu, Kihyuk Sohn, Xiaoming Liu, and Manmohan Chandraker. Feature transfer learning for face recognition with under-represented data. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5704-5713, 2019. 2, 4 +[42] Liang Zheng, Liyue Shen, Lu Tian, Shengjin Wang, Jingdong Wang, and Qi Tian. Scalable person re-identification: A benchmark. In Proceedings of the IEEE international conference on computer vision, pages 1116–1124, 2015. 6 +[43] Zhedong Zheng, Xiaodong Yang, Zhiding Yu, Liang Zheng, Yi Yang, and Jan Kautz. Joint discriminative and generative learning for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2138–2147, 2019. 6 +[44] Zhedong Zheng, Liang Zheng, and Yi Yang. Unlabeled samples generated by gan improve the person re-identification baseline in vitro. In Proceedings of the IEEE International Conference on Computer Vision, pages 3754–3762, 2017. 2, 6 +[45] Zhedong Zheng, Liang Zheng, and Yi Yang. A discriminatively learned cnn embedding for person reidentification. ACM Transactions on Multimedia Computing, Communications, and Applications (TOMM), 14(1):13, 2018. 6 +[46] Yaoyao Zhong, Weihong Deng, Mei Wang, Jiani Hu, Jianteng Peng, Xunqiang Tao, and Yaohai Huang. Unequaltraining for deep face recognition with long-tailed noisy data. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7812-7821, 2019. 4 +[47] Zhun Zhong, Liang Zheng, Zhedong Zheng, Shaozi Li, and Yi Yang. Camera style adaptation for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5157–5166, 2018. 6 \ No newline at end of file diff --git a/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/images.zip b/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ef1e66288c03811ccce8e391b55281f0bc47c892 --- /dev/null +++ b/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d833b1a7b8d2672a9a8b89b19832570d5cf945f017df0134cab468ee06ed94d +size 618350 diff --git a/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/layout.json b/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..62d2af2c3715ee131dc48610a4d9de136b393d63 --- /dev/null +++ b/deeprepresentationlearningonlongtaileddataalearnableembeddingaugmentationperspective/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36e1fd07832d391b34b29ca4a721c8e7dfa95365d3048e23a587d36f02de6de8 +size 493044 diff --git a/deepresidualflowforoutofdistributiondetection/9fc518e6-c5f5-4ef1-a8ac-95c95f3d78a3_content_list.json b/deepresidualflowforoutofdistributiondetection/9fc518e6-c5f5-4ef1-a8ac-95c95f3d78a3_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f9004aaa2069e65dbe621d06a56e48c51e1fdaaa --- /dev/null +++ b/deepresidualflowforoutofdistributiondetection/9fc518e6-c5f5-4ef1-a8ac-95c95f3d78a3_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6c7e350a55012b3d76cfabd646d89d261ea96a530cb4a5faaa1cb7f88f3316e +size 84897 diff --git a/deepresidualflowforoutofdistributiondetection/9fc518e6-c5f5-4ef1-a8ac-95c95f3d78a3_model.json b/deepresidualflowforoutofdistributiondetection/9fc518e6-c5f5-4ef1-a8ac-95c95f3d78a3_model.json new file mode 100644 index 0000000000000000000000000000000000000000..0ac1b5d60903b8693eef3d924c04a1bb45badb42 --- /dev/null +++ b/deepresidualflowforoutofdistributiondetection/9fc518e6-c5f5-4ef1-a8ac-95c95f3d78a3_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:094e9c76cc0e292df312455a4c066dda397b2cc32f7b51d6c60d5287966ba37c +size 102971 diff --git a/deepresidualflowforoutofdistributiondetection/9fc518e6-c5f5-4ef1-a8ac-95c95f3d78a3_origin.pdf b/deepresidualflowforoutofdistributiondetection/9fc518e6-c5f5-4ef1-a8ac-95c95f3d78a3_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2aa6bb16a48a936eb476d1a7b72351373102abd6 --- /dev/null +++ b/deepresidualflowforoutofdistributiondetection/9fc518e6-c5f5-4ef1-a8ac-95c95f3d78a3_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec3c918db588170817f038ff10cbef1872584b6d7012cc291fb9a4b67a54e064 +size 325018 diff --git a/deepresidualflowforoutofdistributiondetection/full.md b/deepresidualflowforoutofdistributiondetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..12bb2ff66e52caf851cf5ab178154e9cc1aaec50 --- /dev/null +++ b/deepresidualflowforoutofdistributiondetection/full.md @@ -0,0 +1,345 @@ +# Deep Residual Flow for Out of Distribution Detection + +Ev Zisselman + +Department of Electrical Engineering Technion + +ev_zis@campus.technion.ac.il + +Aviv Tamar + +Department of Electrical Engineering Technion + +avivt@technion.ac.il + +# Abstract + +The effective application of neural networks in the real-world relies on proficiently detecting out-of-distribution examples. Contemporary methods seek to model the distribution of feature activations in the training data for adequately distinguishing abnormalities, and the state-of-the-art method uses Gaussian distribution models. In this work, we present a novel approach that improves upon the state-of-the-art by leveraging an expressive density model based on normalizing flows. We introduce the residual flow, a novel flow architecture that learns the residual distribution from a base Gaussian distribution. Our model is general, and can be applied to any data that is approximately Gaussian. For out of distribution detection in image datasets, our approach provides a principled improvement over the state-of-the-art. Specifically, we demonstrate the effectiveness of our method in ResNet and DenseNet architectures trained on various image datasets. For example, on a ResNet trained on CIFAR-100 and evaluated on detection of out-of-distribution samples from the ImageNet dataset, holding the true positive rate (TPR) at $95\%$ , we improve the true negative rate (TNR) from $56.7\%$ (current state-of-the-art) to $77.5\%$ (ours). + +# 1. Introduction + +Deep neural networks (DNNs) are powerful models that achieve high performance in various tasks in computer vision [26], speech and audio recognition [21], and language processing [7]. Leading DNN architectures are known to generalize well and achieve impressive performance when evaluated on samples drawn from the distribution observed at the training phase [7, 19, 22, 26, 37]. However, DNNs tend to behave unexpectedly when encountering input taken from an unfamiliar distribution. In such instances, an out-of-distribution (OOD) input causes the majority of models to mispredict, often with high confidence [18, 27, 29, 31, 40]. This behaviour poses a severe concern about the reliability of predictions made by DNNs and + +hinders their applicability to real-world scenarios [1]. + +Contemporary work aimed at predicting classification uncertainty adopt an approach of constructing a confidence score based on characteristics of the feature space of trained neural networks. In [20], Hendrycks and Gimpel propose a baseline method, which taps into features of the penultimate layer and uses the soft-max score as the confidence score. Their method is further improved by Liang et al. [28], who incorporate the soft-max score with temperature scaling, alongside input pre-processing that emphasizes the score difference between in- and out-of-distribution samples. The current state-of-the-art is the method of Lee et al. [27], which models the feature distribution in different layers of a trained network by a Gaussian distribution under the LDA assumption (i.e., different mean but same covariance for different classes), and forms a confidence score for each layer based on the posterior distribution of the LDA model, averaged over different layers. Lee's method shows superior performance compared with previous methods; in some cases surpassing by a large margin [27]. + +Building on the observation that a Gaussian model of network activations is an effective confidence measure, in this work we ask: can we improve OOD detection performance by using more expressive distributions of network activations? In particular, there is no reason to expect that features in mid-layers of the network follow an exact Gaussian distribution, and we expect that a more expressive model should capture their distribution more accurately. + +We present a new approach for OOD detection and propose a more expressive density function, based on deep normalizing flow, for modeling the distribution of the feature space of trained neural networks. As a prelude, we posit that training a linear flow on the feature space of neural networks is equal to fitting a Gaussian distribution, as proposed in [27]. Then, we leverage this property to propose a novel flow architecture that adds a non-linear residual to the linear flow to produce a more expressive mapping. The residual flow model is of independent interest, and should be effective for any data that is approximately Gaussian distributed. For out-of-distribution de + +tection in image classification, modeling the network activations as a residual from Gaussian distribution allows us a principled improvement over the state-of-the-art, and in some cases yields superior performance by a large margin. Furthermore, the proposed residual flow model enables class-conditional density learning that improves performance, even in cases of limited training examples from each class (as in CIFAR100). Lastly, to make in- and out-of-distribution samples more separable, we extend the input preprocessing ideas of [28, 27] to our flow-based model, and perturb test samples to increase their likelihood under our model. We show that this perturbation can increase the contrast between in- and out-of-distribution samples, leading to further performance improvement. + +We demonstrate the effectiveness of our method using trained convolution neural networks such as DenseNet [22] and ResNet [19], trained on various datasets, and tested on various out-of-distribution examples. Our method outperforms the state-of-the-art method [27] for detecting out-of-distribution samples in all tested cases. For example, for a ResNet trained on CIFAR-100, we improve the true negative rate (TNR) of detecting samples from the LSUN dataset at a true positive rate (TPR) of $95\%$ (i.e. $95\%$ of the CIFAR-100 test images were correctly classified) from $38.4\%$ [27] to $70.4\%$ (ours), with all hyper-parameters tuned strictly from the training dataset. Our results demonstrate that the feature space of neural networks does not necessarily conform with a Gaussian distribution, and a more accurate model can significantly improve confidence estimates. + +# 2. Background + +We present preliminaries on normalizing flows and OOD detection. + +# 2.1. Normalizing Flows for Density Estimation + +Normalizing flows are an effective model for high-dimensional data distributions, originally studied in classical statistics [41, 42], and recently popularized in the deep learning community (e.g., NICE [11], RealNVP [12], and GLOW [24]). Let $x \in X$ denote data sampled from an unknown distribution $x \sim p_X(x)$ . The main idea in normalizing flows is to represent $p_X(x)$ as a transformation of a Gaussian distribution $z \sim p_Z(z) = \mathcal{N}(0, I)$ , i.e. $x = g(z)$ . Moreover, we assume the mapping to be bijective $x = g(z) = f^{-1}(z)$ . As such, the data log-likelihood is given by the change of variable formula: + +$$ +\begin{array}{l} \log \left(p _ {X} (x)\right) = \log \left(p _ {Z} (f (x))\right) \tag {1} \\ + \log \left(\left| \det \left(\frac {\partial f (x)}{\partial x ^ {T}}\right) \right|\right), \\ \end{array} +$$ + +where $\frac{\partial f(x)}{\partial x^T}$ is the Jacobian of the map $f(x)$ at $x$ . The functions $f, g$ can be learned by maximum likelihood, where the + +bijectivity assumption allows to train expressive mappings, such as deep neural networks by backpropagation. Further, given a sample $x$ , its likelihood can be inferred from (1). + +To achieve a tractable, yet flexible Jacobian for the map $f(x)$ , the authors of NICE [11] and RealNVP [12] proposed to stack a sequence of simple bijective transformations, such that their Jacobian is a triangular matrix. This way, its log-determinant is simply determined by the sum of its diagonal elements. In NICE [11], the authors proposed the additive coupling layer for each transformation. This was further improved in RealNVP [12] which proposed the affine coupling layer. In each affine coupling transformation, the input vector $x \in \mathbb{R}^d$ is split into upper and lower halves, $x_1, x_2 \in \mathbb{R}^{d/2}$ . These are plugged into the following transformation, referred to as a single flow-block $f_i$ : + +$$ +z _ {1} = x _ {1}, \quad z _ {2} = x _ {2} \circ \exp \left(s _ {i} \left(x _ {1}\right)\right) + t _ {i} \left(x _ {1}\right), \tag {2} +$$ + +where $\circ$ denotes element-wise multiplication, and $s_i$ and $t_i$ are non-linear mappings (e.g., deep neural networks) that need not be invertible. Given the output $z_1$ and $z_2$ , this affine transformation is trivially invertible by: + +$$ +x _ {1} = z _ {1}, \quad x _ {2} = \left(z _ {2} - t _ {i} \left(z _ {1}\right)\right) \circ \exp \left(- s _ {i} \left(z _ {1}\right)\right). +$$ + +Let $r$ denote a switch-permutation, which permutes the order of $x_{1}$ and $x_{2}$ . A RealNVP flow comprises $k$ reversible flow-blocks interleaved with switch-permutations, $^{1}$ + +$$ +f _ {R e a l N V P} = f _ {k} \cdot r \dots f _ {2} \cdot r \cdot f _ {1}. +$$ + +According to the chain rule, the log-determinant of the Jacobian of the whole transformation $f$ is computed by summing the log-determinant of the Jacobian of each $f_{i}$ , making the likelihood computation (1) tractable. + +In GLOW [24], additional permutations between flow-blocks are added, to reduce the structural constraint of separating the input into two halves: + +$$ +f _ {G L O W} = f _ {k} \cdot p _ {k - 1} \dots f _ {3} \cdot p _ {2} \cdot f _ {2} \cdot p _ {1} \cdot f _ {1}, +$$ + +where $p_i$ are either fixed (random) or learned permutation matrices. Since permutations are easily inverted and $|\operatorname{det}(p_i)| = 1$ , the log-likelihood (1) remains tractable. + +# 2.2. Out of Distribution detection + +Consider a deep neural network classifier trained in the standard supervised learning setting (via labeled data). The OOD detection problem seeks to assign a confidence score to the classifier predictions, such that classification of OOD data would be given a lower score than in-distribution data. + +Liang et al. [28] applied temperature-scaling to the network's soft-max output as the confidence score. Let $\sigma_{i}(x)$ denote the network's logit output for class $i$ and input $x$ . Then the temperature-scaled (TS) score is: + +$$ +S _ {T S} (x; T) = \max _ {i} \left(\frac {\exp (\sigma_ {i} (x) / T)}{\sum_ {j = 1} ^ {N} \exp (\sigma_ {j} (x) / T)}\right), +$$ + +where $T$ is the temperature. In addition, Liang et al. [28] proposed to pre-process the input $x$ by modifying it in a direction that increases the soft-max score: + +$$ +\tilde {x} _ {T S} (x) = x - \epsilon \cdot \operatorname {s i g n} \left(- \nabla_ {x} \log S _ {T S} (x; T)\right), +$$ + +where the intuition is that in-distribution samples would be more susceptible to an informative pre-processing, leading to better discrimination between in- and out-of-distribution samples. The final method, termed ODIN is given by: + +$$ +S _ {O D I N} (x; T) = S _ {T S} (\tilde {x} _ {T S} (x); T). +$$ + +Lee et al. [27] improve on the ODIN method by considering different layers of the network, and measuring the Mahalanobis distance from the average network activations. For some network layer $l$ and class label $c$ , let $\phi_l(x)$ denote the feature activations at layer $l$ for input $x$ . Let $\hat{\mu}_{l,c}$ denote the empirical mean of feature activations for training data from class $c$ , and let $\hat{\Sigma}_l$ denote the empirical covariance matrix of feature activations, calculated across all classes. Given a test example $x$ , Lee et al. [27] calculate the score as the weighted Mahalanobis distance: + +$$ +S _ {M} (x) = \sum_ {l} w _ {l} \cdot \max _ {c} \{- (\phi_ {l} (x) - \hat {\mu} _ {l, c}) ^ {T} \hat {\Sigma} _ {l} ^ {- 1} (\phi_ {l} (x) - \hat {\mu} _ {l, c}) \}, +$$ + +where $w_{l}$ are weights. Using the Mahalanobis distance as a score is equivalent to modeling the feature space of every layer as a $C$ class-conditional Gaussian distribution with a tied covariance $\hat{\Sigma}$ , i.e., $P(\phi_l(x)|y = c) = \mathcal{N}(\phi_l(x)|\hat{\mu}_{l,c},\hat{\Sigma})$ and measuring the score as the likelihood of the features (under the most likely class, and averaging over all layers). + +Lee et al. [27] motivate the Mahalanobis score from a connection between the softmax output of the final layer and a generative classifier with a class-conditional Gaussian distribution model with tied covariance. This generative model is a special case of Gaussian discriminant analysis (GDA), also known as linear discriminant analysis (LDA). + +Lee et al. [27] also propose a pre-processing method similar to ODIN, where + +$$ +\tilde {x} _ {M} (x) = x - \epsilon \cdot \mathrm {s i g n} \left(\nabla_ {x} (\phi_ {l} (x) - \hat {\mu} _ {l, \hat {c}}) ^ {T} \hat {\Sigma} _ {l} ^ {- 1} (\phi_ {l} (x) - \hat {\mu} _ {l, \hat {c}})\right). +$$ + +# 3. Residual Flow for OOD Detection + +Our aim is to detect out of distribution (OOD) examples, equipped with an already trained neural network classifier at our disposal. This is achieved by learning the distribution of the feature space of various layers of the network, given valid, in-distribution inputs that were observed during the training phase. Motivated by the empirical success of the Gaussian distribution model of Lee et al. [27], in this section we propose a normalizing flow architecture that allows for a principled extension of the Gaussian model to non-Gaussian distributions. We hypothesize that the activations of general neural network layers do not necessarily follow a Gaussian distribution, and thus a more expressive model should allow for better OOD detection performance. Our model is composed of a linear component, which we show is equivalent to a Gaussian model, and a non-linear residual component, which allows to fit more expressive distributions using deep neural network flow architecture. + +# 3.1. Linear Flow Model + +We start by establishing a simple relation between the maximum-likelihood estimate of a Gaussian model (as in GDA) and linear flow. The next proposition shows that for a linear flow model, the maximum likelihood parameters are equivalent to the empirical mean and covariance of the data. + +Proposition 1. Let $X = \{x_{1}, x_{2}, \dots, x_{N}\}$ be a dataset of vectors in $\mathbb{R}^d$ , i.e. $\forall i: x_i \in \mathbb{R}^d$ . Consider a linear normalizing flow, i.e. $X = AZ + b$ , where $Z \sim \mathcal{N}(0, I)$ , $A \in \mathbb{R}^{d \times d}$ and $b \in \mathbb{R}^d$ . Let $p_{A,b}(x_i)$ denote the probability of $x_i$ under this flow model. The parameters $A, b$ that maximize the likelihood of the dataset $X$ under this model satisfy: $b = \frac{1}{N} \sum_{n=1}^{N} x_i = \hat{\mu}$ , the empirical mean and $AA^T = \frac{1}{N} \sum_{n=1}^{N} (x_i - \hat{\mu})(x_i - \hat{\mu})^T = \hat{\Sigma}$ , the empirical covariance of the data $X$ . + +Proof. Since $X$ is a linear transformation of $Z \sim \mathcal{N}(0, I)$ , the probability of $X$ under this model is given by: + +$$ +p _ {A, b} \left(x _ {i}\right) \sim \mathcal {N} \left(b, A A ^ {T}\right). \tag {3} +$$ + +On the other hand, the maximum likelihood (ML) estimators $\tilde{\mu},\tilde{\Sigma}$ for $X$ under Gaussian distribution assumption are known to be the empirical mean and covariance [13]: + +$$ +\tilde {\mu} = \frac {1}{N} \sum_ {n = 1} ^ {N} x _ {i} = \hat {\mu}, \tilde {\Sigma} = \frac {1}{N} \sum_ {n = 1} ^ {N} \left(x _ {i} - \hat {\mu}\right) \left(x _ {i} - \hat {\mu}\right) ^ {T} = \hat {\Sigma}. \tag {4} +$$ + +By combining (3) and (4) we get the desired results. + +![](images/67e424f9a0b2b15e1f2924f0877f42c1cbdc37fa962f75a8ef41877fd5f66b97.jpg) + +The linear flow transformation $A$ can be obtained analytically by exploiting the spectral decomposition for the symmetric positive semi-definite (PSD) matrix $\hat{\Sigma} = QDQ^T$ , where $Q$ is an orthogonal matrix whose columns are the + +eigen-vectors of $\hat{\Sigma}$ and $D$ is a diagonal matrix whose entries are its eigen-values. The resulting invertible linear flow transformation for data $X$ can be written as: + +$$ +X = A Z + b, \quad Z = A ^ {- 1} (X - b), +$$ + +where $b = \hat{\mu}$ , $A = QD^{\frac{1}{2}}$ , $A^{-1} = D^{-\frac{1}{2}}Q^{T}$ . In the sequel, we propose an extension of the linear flow that adds nonlinear components, which we term a residual flow model. + +# 3.2. Residual Flow Model + +In this section, we describe how to extend the linear flow model to include non-linear components. Rather than directly using a fully non-linear model like RealNVP or GLOW, as described in Section 2, we would like a model that can be viewed and trained as an extension to the linear model. This approach will allow a principled improvement over the Gaussian model of Lee et al. [27], which we already know to perform well. + +We begin by composing a linear flow with a residual flow model: + +$$ +f ^ {r e s} = p _ {k} \cdot f _ {k} ^ {n o n - l i n} \cdot p _ {k - 1} \dots p _ {2} \cdot f _ {2} ^ {n o n - l i n} p _ {1} \cdot f _ {1} ^ {n o n - l i n} \cdot A ^ {- 1}, +$$ + +with the following log determinant: + +$$ +\begin{array}{l} \log \left(\left| \det \left(\frac {\partial f (x)}{\partial x ^ {T}}\right) \right|\right) = \log \left(\left| \det \left(A ^ {- 1}\right) \right|\right) \\ + \sum_ {i} \log \left(\left| \det \left(\frac {\partial f _ {i} ^ {n o n - l i n} (x)}{\partial x ^ {T}}\right) \right|\right). \\ \end{array} +$$ + +Note that, from Eq. (2), when $s_i$ and $t_i$ are set to zero, the non-linear terms $f_i^{non - lin}$ are reduced to the identity map. In this case, the permutation terms have no effect, as the components of $z$ have identical and independent distributions. Thus, in this case, the residual flow $f^{\text{res}}$ is equivalent to the linear flow $f^{\text{lin}} = A^{-1}$ . Therefore, we can initialize the residual flow by fixing the networks $s_i$ and $t_i$ to be zero, and calculating $A$ as described in Section 3.1, which is equivalent to fitting a Gaussian distribution model to our data. Subsequently, we can fine-tune the non-linear components in the model to obtain a better fit to the data. In practice, setting only the last layer of the networks $s_i$ and $t_i$ to zero is sufficient for the initialization step. $^4$ + +Similar to the GLOW model [24], we found that the permutation terms $p_i$ have an important contribution, by diversifying the inputs of the non-linear components. In our implementation, we alternate between fixed, initially random, $^5$ + +![](images/c65d433e86a2daa10b23ab2ad439349cead1047a9c03b817717d6ecbfa0821b2.jpg) +(a) Residual Flow blocks during initialization and training. + +![](images/5b8d81af46a21a5a896b26f9390529c409b9c9ee284c8486ec713d959eb8940e.jpg) + +![](images/7dd2e00dcd06fb1a670a872312ef3bef961217fd72037529dd5f3e243bf728c9.jpg) +(b) The complete Residual Flow architecture $Z = f(X)$ . +Figure 1. Residual Flow architecture. + +permutation matrices and switch permutation matrices to mediate the non-linear flow blocks. Concretely, $p_i$ stands for a random permutation for odd $i$ and switch permutation for even $i$ . Figure 1 illustrates the proposed architecture, and the full implementation is described in Section 3.3. + +# 3.2.1 Degenerate case + +If the covariance matrix $\hat{\Sigma}$ is not full rank, then the multivariate normal distribution is degenerate: its vector elements are linearly dependent, and the covariance matrix does not correspond to a density over the $d$ -dimensional space. In this case, Lee et al. [27] propose to use $\hat{\Sigma}^{\dagger}$ , the pseudo-inverse of $\hat{\Sigma}$ , to calculate the Mahalanobis distance: + +$$ +- (X - \hat {\mu}) ^ {T} \hat {\Sigma} ^ {\dagger} (X - \hat {\mu}), +$$ + +which is equivalent to restricting attention to a subset of $k = \text{rank}(\hat{\Sigma})$ of the coordinates of $X$ , such that the covariance matrix of this subset is positive definite (PS); the remaining coordinates are regarded as an affine function of the selected coordinates. In our model we handle degenerate distributions with a similar approach: We set $Z = A^{\dagger}X$ to be a $k$ -dimensional vector with a $k$ -dimensional Gaussian distribution, using a dimensionality reduction transformation $A^{\dagger} \in \mathbb{R}^{k \times d}$ . We construct $A^{\dagger} = D^{-\frac{1}{2}}Q^{T}$ with $D^{-\frac{1}{2}} \in \mathbb{R}^{k \times k}$ and $Q^{T} \in \mathbb{R}^{k \times d}$ , by considering the inverse root of the $k$ non-zero eigen-values of $\hat{\Sigma}$ in $D^{-\frac{1}{2}}$ diagonal and their corresponding eigen-vectors in $Q^{T}$ rows. Note that using $A^{\dagger}$ for degenerated vectors $X$ yields the same Gaussian distribution as the pseudo-inverse used in [27]. In the rest of this paper we consider $A^{\dagger}$ as the linear flow transformation for degenerated vectors $X$ . After this linear dimensionality reduction, we apply the residual flow model on the resulting $k$ -dimensional vector $Z$ as presented in Section 3.2. As a remark, the aforementioned treatment removes only linear dependencies among feature elements, and does not address non-linear dependencies. Practically, + +however, we found that this approach is sufficient for all the experiments we conducted. + +Our residual flow model is a general normalizing flow architecture, and we expect it to work well when the data approximately fits a Gaussian distribution. + +# 3.3. Residual Flow Applied to OOD Detection + +We now describe an application of the residual flow that extends the Gaussian model of [27] for OOD detection. First, for each network layer $l$ , we extract the mean activation in the training data for each class label $\mu_{l,c}$ . Then, for each sample $x$ in our training data, we extract the network activation in layer $l$ , $\phi_l(x)$ , and subtract from it the mean $\mu_{l,c}$ for the corresponding class, to obtain a centered feature training set $\hat{\phi}_l(x)$ . Next, we fit a Gaussian distribution to the centered data by constructing a linear flow model for each layer as described in Section 3.1. We construct a single linear model for all classes, similar to the single covariance matrix in [27]. Finally, for each layer $l$ , and for each class $c$ , we train a residual flow model by training the non-linear flow blocks $f_{i}^{\text{non - lin}}$ , as described in 3.2, and freeze the network weights in the linear block $f_{i}^{lin}$ . As a stopping criteria for training the residual flow blocks, we use a separate validation set, and validate on the log-likelihood of the data. We found this approach to be effective for preventing overfitting in our experiments. This model, applied for OOD detection, already has good performance at the outset, leading to a better fit to the data distribution as training progresses. + +Implementation details: We implement the model as a single linear flow block $f^{lin} = A^{-1}$ , followed by 10 nonlinear flow blocks $f^{non - lin}$ , producing a map $f^{res}$ totalling 11 flow blocks. As for the layers $p_i$ , which interconnect the blocks $f^{non - lin}$ , we alternate between switch and random permutation matrices. We use three fully connected layers per non-linear block (in each $s_i$ and $t_i$ ) with leaky ReLU activation functions in the intermediate layers. We use a batch size of 256 and Adam [23] optimizer for learning the nonlinear blocks with a learning rate of $10^{-5} - 10^{-6}$ , chosen via a separate validation set of 10K examples. + +# 3.4. Input pre-processing + +Motivated by the success of input pre-processing in ODIN [28] and Mahalanobis [27], we propose an extension of this idea to our approach. Since the Mahalanobis preprocessing can be seen as maximizing the likelihood of the input under the Gaussian model, we similarly introduce the following input pre-processing stage for our flow model: + +$$ +\tilde {x} = x + \epsilon \cdot \operatorname {s i g n} \left(\nabla_ {x} \log p \left(\phi_ {l} (x); \hat {c}\right)\right), \tag {5} +$$ + +where $\hat{c} = \underset {c\in C}{\arg \max}p(\phi_l(x);c)$ and $p(\phi_l(x);\hat{c})$ is the probability distribution of the feature space of the $l$ -th layer of class $\hat{c}$ , learned by our flow model. Note that this score aims to increase the probability of the in-distribution data. + +Algorithm 1 Computing the Residual-Flow score $S_{l}$ . +Input: Test sample $x$ , weights of logistic regression detector $\alpha_{l}$ , noise $\varepsilon$ and $C$ residual-flow for each layer: $\{f_{l,c}^{res}:\forall l,c\}$ +Initialize score vectors: $\mathbf{S}_{RF}(x) = [S_{l,c}:\forall l,c]$ +for each layer $l\in 1,\dots ,L$ do + Find the most probable class: + $\widehat{c} = \arg \max_c p_c(\phi_l(x) - \widehat{\mu}_{l,c})$ + Add small noise to test sample: + $\tilde{x} = x + \varepsilon \mathrm{sign} \nabla_x p_{\hat{c}} (\phi_l(x) - \widehat{\mu}_{l,\hat{c}})$ + Computing confidence score: + $S_{l} = \max_{c}p_{c}(\phi_{l}(\tilde{x}) - \widehat{\mu}_{l,c})$ +end for +return Confidence score for test sample $\sum_{l}\alpha_{l}S_{l}$ + +# 3.5. OOD Detection Algorithm + +In this section we describe the proposed procedure for OOD detection. Using the training set, we first train a collection of residual flows for each layer and each class $\{f_{l,c}^{res}:\forall l,c\}$ according to Section 3.2. Given a test example $x$ , we extract the layers' activations for this example $\{\phi_l(x):\forall l\}$ , and calculate the most probable class for each layer $\hat{c}_l$ . Using $\hat{c}_l$ we calculate the pre-processed input $\tilde{x}$ according to Eq. (5), and re-calculate the layers' activations $\{\phi_l(\tilde{x}):\forall l\}$ . The probability of the most probable class serves as a score of the layer $S_{l} = \max_{c}p_{c}\left(\phi_{l}(\tilde{x}) - \widehat{\mu}_{l,c}\right)$ . Finally, the effective score is a weighted average of layers' scores $\sum_{l}\alpha_{l}S_{l}$ . The weights are obtained using a similar strategy as in [27], where the weights of the layers $\alpha_{l}$ are computed by training a logistic regression detector on a validation set. The full algorithm is detailed in Algorithm 1. + +# 3.6. Computational Overhead + +It is important to evaluate the computational overhead of using a more expressive model for network activations. We compare our method to [27], and consider two cases: (i) During training: our initialization step is equivalent to the method of [27]. Thus, performance improvement comes at a cost of additional training time. Figure 2(b) shows the tradeoff between additional training iterations and performance gain. Note that the improvement monotonically increases with training iterations. (ii) During testing: In the test phase, both methods first calculate a forward pass of the test image through the classification network for feature extraction. Then, [27] calculates the Mahalanobis distance, while our method runs another forward pass of the residual flow networks. In our experiments, the forward pass of the classification network was the dominant complexity factor. This may change with a larger flow model, but in our experiments we did not require such. Thus, our performance advantage does not incur significant overhead. + +# 4. Related Work + +OD detection has mostly been studied in the unlabelled setting, where the data contains only samples (e.g., images) but not class labels. Classical methods include one-class SVM [36] and support vector data description [43], and more recently, deep learning methods have become popular [5]. Methods such as [14, 3, 4, 6] extract features using unsupervised learning techniques, and feed them to classical OOD detection methods. Deep SVDD [33] learns a neural-network encoding that minimizes the volume of data around a predetermined point in feature space. Recently, Golan and El-Yaniv [17] proposed to learn features by applying a fixed set of geometric transformations to images, and training a deep network to classify which transformation was applied. Density estimation methods for detecting OOD examples have originally been studied in low dimensional space [32, 8, 16]. Recently, deep generative models such as generative adversarial networks, variational autoencoders, and deep energy-based models have been proposed for OOD detection in high-dimensional spaces [2, 39, 35, 44, 47, 38]. + +Our work focuses on the labelled setting, where a network trained for image classification is provided, along with the training data and labels. Hendrycks and Gimpel [20] proposes the soft-max output as a confidence score for OOD examples, and [15] compared this approach with the Monte-Carlo dropout ensemble method. Liang et al. [28] proposed ODIN, which combines temperature scaling and input pre-processing. The geometric transformations method of Golan and El-Yaniv [17] can also be applied to the labelled setting. The state-of-the-art is the method of Lee et al. [27] that uses the Mahalanobis distance in feature space. In our work we show that providing a better density model, leads to a marked improvement over Lee et al.'s results. + +Concurrent with our work, several OpenReview postings suggested improvements to the method of [27]. Sastry et al. [34] propose a scoring function for OOD detection based on the correlation between different features of the same layer, using higher-order Gram matrices, which can be seen as a different form of incorporating higher-order statistics beyond the Gaussian model. Yu et al. [46] investigate the benefit of combining the global average of the feature maps with their spatial pattern information, while using the Gaussian model assumption. In principle, their approach can be combined with our improved flow-based density model. + +# 5. Experiments + +In our experiments, we aim to answer the following questions: (1) How does the residual flow model compare with conventional flow and Gaussian models? (2) How does our OOD detection method compare with state-of-the-art? + +Our OOD detection evaluation follows the data sets and + +experiments in [27], and consists of 3 training data sets: CIFAR10, CIFAR100, and SVHN, and 4 out-of-distribution (OOD) data sets: CIFAR10, Tiny ImageNet, SVHN, and LSUN. In the supplementary material we provide additional experiments, which draw a comparison between residual flow, LDA (Mahalanobis) and the GDA model. The full residual flow implementation is available online.7 + +# 5.1. Residual Flow vs. Regular Flow + +In this section we compare the performance of learning a residual flow model over learning regular non-linear flow model. First, we inspect the performance of the proposed approach on the task of distinguishing in- and out-of-distribution examples based on the first layer of ResNet, trained on CIFAR-100, where Tiny/ImageNet is used as OOD. In our comparison, we evaluate residual flow against regular non-linear flow and linear-flow/Mahalanobis density modeling. Figure 2(a) presents a receiver operating characteristic (ROC) curve [9] comparison of the three methods, demonstrating the superiority of the residual flow model in modeling feature layer distribution of a neural network. Next, in Figure 2(b), we evaluate the area under the ROC (AUROC) curve as a function of training iterations. Note that the linear flow, as expected, converges to the same AUROC as the baseline Gaussian density model. The residual flow, however, starts at baseline performance (equivalent to the Gaussian model), and steadily improves upon it, as the non-linear components allow for better modelling of the data. The conventional non-linear flow, on the other hand, starts from a low AUROC score, rises erratically, and is not guaranteed to improve upon the baseline. The erratic behavior also makes it difficult to decide when to stop training. Indeed, we found this model to be much less stable in our evaluation. + +# 5.2. OOD Detection Evaluation + +We conduct a series of experiments to evaluate the performance in detecting out-of-distribution examples. These tests are used by contemporary state-of-the-art methods [20, 28, 27] to benchmark the efficacy of an algorithm in distinguishing abnormalities. We follow the practices presented in [27], in which already-trained neural networks are used in conjunction with conventional datasets. The experiments use DenseNet with 100 layers [22] and ResNet with 34 layers [19] as target networks, trained on one of the following datasets: CIFAR-10, CIFAR-100 [25] and SVHN [30]. Feature extraction is performed as proposed by Lee et al. [27]: At the outset, we extract the output of specific + +![](images/f178203a791b0994af11a388f3f98687629a8db7333e699ee31fa61769722d32.jpg) +(a) ROC curve ResNet - first layer + +![](images/76a558608bfdfecf5928a5ac1363f9e6ae9c9759096ecf9d6933a11ca46ce427.jpg) +(b) AUROC vs. Iterations +Figure 2. (a) and (b) OOD detection using features taken from the first layer of ResNet trained on CIFAR-100, with TinyImageNet as OOD. (a) ROC curve comparison of Residual flow $(\mathrm{AUROC} = 98.4)$ , Non-linear flow $(\mathrm{AUROC} = 97.0)$ and Mahalanobis $(\mathrm{AUROC} = 97.0)$ [27]. (b) AUROC comparison as a function of training iterations for different models. Note that by our initialization method, the residual flow starts at baseline performance of Mahalanobis. (c) ROC comparison of Mahalanobis $(\mathrm{AUROC} = 94.6)$ and Residual flow $(\mathrm{AUROC} = 98.9)$ , using a weighted average of the features taken from layers of DenseNet trained on CIFAR-100, with LSUN as OOD. + +![](images/1977c481bf0b13b864596c5b64449203d610dd64f95a2c72b8fec2a2fc542767.jpg) +(c) ROC curve DenseNet - all layers + +layers from the target network and average over the spatial domain to produce a set of 1-dimensional feature vectors, whose size matches the number of feature maps in the corresponding layer. The selected layers are the terminal layers of every dense-block (or residual-block) of DenseNet (or ResNet). Next, we train a set of residual flow networks, each observing a different output layer of the target network (e.g. DenseNet) activated by an entire class of examples from its original dataset. A portion of the training set, $10\mathrm{K}$ in total, is set aside as a validation set, to prevent overfit during training. The process repeats for all classes and for all end-block layers of the target network, yielding a set of trained residual flows. At the test phase, a score is calculated for every layer of the target network and the final confidence score is obtained using weights produced by training a logistic regression detector (see Algorithm 1). + +The weights of the logistic regression decoder and the input pre-processing parameter, $\epsilon$ , are the hyperparameters of our model, tuned using a separate validation set of in- (positive class) and out-of-distribution (negative class) pairs, consisting of 1,000 images of each class. Similarly to Lee et al. [27], we also investigate performance when a validation set of OOD samples is not available, and in this case we tune the hyperparameters using validation sets of both in-distribution samples and corresponding adversarial samples generated by FGSM [18] as out-of-distribution samples. + +The networks are tested using their original test set, with the introduction of OOD samples from either LSUN [45], CIFAR-10 [25], Tiny-ImageNet [10] or SVHN [30]. The following performance measures are evaluated: true negative rate (TNR) at $95\%$ true positive rate (TPR), area under the receiver operating characteristic curve (AUROC), area under the precision-recall curve (AUPR), and detection accuracy. We compare our method to the state-of-the-art, which employs Mahalanobis score as a confidence score [27]. Note that to accommodate a fair comparison, we adopt the hyperparameter selection procedure presented in [27]. + +Table 1 aggregates the performance of our method compared to Mahalanobis for the task of OOD detection across all in- and out-of-distribution dataset pairs, when an OOD validation set is available. Table 2 compares the performance when the validation set is produced using FGSM, as described above. We present the detection performance measures of our method with and without input preprocessing (right and middle columns respectively), and compare it to Mahalanobis score method with input preprocessing (left column). Tables 1 and 2 demonstrably show that our method surpasses the current state-of-the-art, significantly outperforming the Mahalanobis approach in some cases - even without input pre-processing. For example, applying our method on ResNet trained on CIFAR-100 samples, when LSUN is used as OOD dataset, improves the AUROC from $66.2\%$ to $82.0\%$ (without input pre-processing) and $87.2\%$ (with input pre-processing). In summary, the results in tables 1 and 2 demonstrate that better modeling of feature activations leads to better OOD detection. Figure 2(c) further demonstrates the contribution of our method compared to Mahalanobis [27]. We produce a ROC curve using ResNet trained on CIFAR-100, with LSUN dataset used as OOD. Note that the performance in Figure 2(c) was obtained without any pre-processing of the data. As seen from Figure 2(c), our method significantly outperforms the Mahalanobis score method. + +# 6. Conclusions + +We proposed an efficient method for detecting out-of-distribution inputs for trained neural networks, without retraining the network or modifying its underlying architecture, nor compromising its classification accuracy on in-distribution data. Key to our approach is a novel deep generative model – the residual flow, which is a principled extension of a Gaussian distribution model using a non-linear normalizing flow. This model, which is of independent interest, is most suitable for modelling distributions that + +
In-dist (model)Out-of-distTNR at TPR 95%AUROCDetection accuracyAUPR inAUPR out
Mahalanobis [27]/ Res-Flow without pre-processing / Res-Flow with pre-processing
CIFAR-10 (DenseNet)SVHN85.8 / 94.9 / 94.996.6 / 98.9 / 98.991.9 / 95.3 / 95.398.7 / 99.5 / 99.588.8 / 97.5 / 97.5
ImageNet95.3 / 96.4 / 96.498.9 / 99.2 / 99.295.2 / 96.0 / 96.098.9 / 99.2 / 99.298.7 / 99.2 / 99.2
LSUN97.9 / 98.2 / 98.299.3 / 99.5 / 99.596.8 / 97.1 / 97.199.3 / 99.6 / 99.698.2 / 99.5 / 99.5
CIFAR-100 (DenseNet)SVHN82.9 / 73.0 / 84.996.1 / 95.2 / 97.590.9 / 88.7 / 91.998.5 / 97.5 / 99.089.0 / 91.1 / 95.1
TinyImageNet85.8 / 93.0/ 93.096.6 / 98.5 / 98.591.2 / 94.1 / 94.196.9 / 98.5 / 98.595.5 / 98.5 / 98.5
LSUN83.6 / 96.3 / 96.394.9 / 98.9 / 98.989.9 / 95.7 / 95.795.7 / 99.0 / 99.093.0/ 98.8 / 98.8
SVHN (DenseNet)CIFAR-1096.5 / 99.0 / 99.098.9 / 99.5 / 99.595.9 / 97.4 / 97.495.6 / 97.8 / 97.899.6 / 99.8 / 99.8
TinyImageNet99.8 / 100.0 / 100.099.9 / 100.0 / 100.098.8 / 99.4 / 99.499.6 / 99.8 / 99.8100.0 / 100.0 / 100.0
LSUN100.0/ 100.00 / 100.0099.9 / 100.0 / 100.099.3 / 99.7 / 99.799.7 / 99.9 / 99.9100.0 / 100.0 / 100.0
CIFAR-10 (ResNet)SVHN96.4 / 94.5 / 96.599.1 / 98.9 / 99.195.8 / 94.9 / 95.899.6 / 99.6 / 99.698.3 / 97.6 / 98.3
TinyImageNet97.1 / 97.8 / 97.899.5 / 99.6 / 99.696.3 / 96.9 / 96.999.5 / 99.6 / 99.699.5 / 99.6 / 99.6
LSUN98.9 / 99.0 / 99.099.7 / 99.8 / 99.897.7 / 97.8 / 97.899.7 / 99.8 / 99.899.7 / 99.8 / 99.8
CIFAR-100 (ResNet)SVHN92.0 / 88.8 / 93.098.4 / 97.8 / 98.593.7 / 92.6 / 94.599.3 / 99.1 / 99.396.4 / 95.3 / 97.1
TinyImageNet90.8 / 95.0 / 94.698.2 / 98.9 / 98.993.3 / 95.0 / 95.098.1 / 98.9 / 98.998.2 / 98.9 / 98.8
LSUN90.9 / 96.7 / 96.298.2 / 99.1 / 99.093.5 / 96.0 / 95.797.8 / 99.0 / 98.998.4 / 98.8 / 98.6
SVHN (ResNet)CIFAR-1098.5 / 99.3 / 99.499.3 / 99.6 / 99.696.9 / 97.7 / 97.797.0 / 98.3 / 98.399.7 / 99.9 / 99.9
TinyImageNet99.9 / 100.0 / 100.099.9 / 100.0 / 99.999.1 / 99.5 / 99.399.1 / 99.8 / 99.799.9 / 100.0 / 100.0
LSUN99.9 / 100.0 / 100.099.9 / 100.0 / 100.099.5 / 99.7 / 99.799.2 / 99.8 / 99.899.9 / 100.0 / 100.0
+ +Table 1. A comparison between our method and Mahalanobis [27] on the task of out-of-distribution detection for image classification of various in- and out-of-distribution data sets. The hyper-parameters were tuned using a validation set of in- and out-of-distribution datasets. The values presented here are percentages and the best results are indicated in bold. + +
In-dist (model)Out-of-distTNR at TPR 95%AUROCDetection accuracyAUPR inAUPR out
Mahalanobis [27]/ Res-Flow without pre-processing / Res-Flow with pre-processing
CIFAR-10 (DenseNet)SVHN88.7 / 91.3/ 86.197.6 / 98.3 / 97.392.4 / 93.8 / 91.694.7 / 96.6 / 94.399.0 / 99.3 / 99.0
TinyImageNet88.6 / 96.0 / 96.197.5 / 99.1 / 99.192.2 / 95.6 / 95.697.4 / 99.1 / 99.197.7 / 99.2 / 99.2
LSUN92.4 / 98.0 / 98.198.3 / 99.5 / 99.593.9 / 96.7 / 96.998.4 / 99.5 / 99.598.2 / 99.4 / 99.5
CIFAR-100 (DenseNet)SVHN48.7 / 59.8 / 48.985.6 / 91.4 / 87.980.0 / 83.7 / 80.063.7 / 82.9 / 74.993.3 / 96.1 / 94.3
TinyImageNet80.4 / 91.7 / 91.592.7 / 98.3 / 98.188.0 / 93.6 / 93.487.4 / 98.3 / 98.094.5 / 98.4 / 98.3
LSUN83.8 / 95.4 / 95.895.0 / 98.9 / 98.990.0 / 95.3 / 95.493.0 / 99.0 / 98.995.7 / 98.8 / 98.8
SVHN (DenseNet)CIFAR-1092.5 / 95.1 / 90.096.7 / 98.7 / 98.093.8 / 95.3 / 93.497.9 / 99.6 / 99.793.5 / 95.2 / 93.6
TinyImageNet99.1 / 99.7 / 99.999.5 / 99.9 / 99.998.7 / 99.2 / 99.099.6 / 100.0 / 100.099.2 / 99.8 / 99.6
LSUN99.7 / 100.0 / 100.099.8 / 100.0 / 99.999.1 / 99.5 / 99.499.9 / 100.0 / 100.099.6 / 99.8 / 99.7
CIFAR-10 (ResNet)SVHN87.5 / 91.0 / 91.097.4 / 98.2 / 98.291.8 / 93.8 / 93.893.8 / 96.6 / 96.698.9 / 99.1 / 99.1
TinyImageNet93.1 / 98.0 / 98.097.9 / 99.6 / 99.694.1 / 97.0 / 97.095.4 / 99.6 / 99.698.4 / 99.6 / 99.6
LSUN97.0 / 99.1 / 99.199.2 / 99.8 / 99.896.3 / 98.0 / 98.098.6 / 99.8 / 99.899.3 / 99.8 / 99.8
CIFAR-100 (ResNet)SVHN66.5 / 57.2 / 74.193.2 / 90.7 / 95.185.9 / 83.8 / 88.786.4 / 80.5 / 90.496.6 / 95.4 / 97.5
TinyImageNet56.7 / 71.6 / 77.576.9 / 86.8 / 90.177.6 / 84.3 / 87.163.0 / 74.8 / 79.683.7 / 90.4 / 93.1
LSUN38.4 / 61.1 / 70.466.2 / 82.0 / 87.269.5 / 80.1 / 84.154.6 / 70.0 / 75.973.9 / 86.5 / 90.5
SVHN (ResNet)CIFAR-1095.2 / 97.1 / 96.698.1 / 99.1 / 99.095.2 / 96.1 / 95.898.5 / 99.7 / 99.795.2 / 96.7 / 96.5
TinyImageNet99.3 / 99.9 / 99.999.4 / 99.9 / 99.998.9 / 99.3 / 99.298.9 / 99.9 / 99.998.3 / 99.7 / 99.7
LSUN99.9 / 100.0 / 100.099.9 / 100.0 / 100.099.5 / 99.7 / 99.699.9 / 100.0 / 100.098.8 / 99.7 / 99.7
+ +Table 2. A comparison between our method and Mahalanobis [27] on the task of out-of-distribution detection for image classification of various in- and out-of-distribution data sets. The hyper-parameters were tuned using strictly in-distribution and adversarial (FGSM) samples. The values presented here are percentages and the best results are indicated in bold. + +are approximately Gaussian. Our method is general, and in principle can be applied to various data such as speech recognition and natural language processing. On deep networks trained for image classification, we obtain state-of-the-art out-of-distribution detection performance. + +# 7. Acknowledgments + +This work is partly funded by the Israel Science Foundation (ISF-759/19) and the Open Philanthropy Project Fund, an advised fund of Silicon Valley Community Foundation. + +# References + +[1] Dario Amodei, Chris Olah, Jacob Steinhardt, Paul Christiano, John Schulman, and Dan Mané. Concrete problems in ai safety. arXiv preprint arXiv:1606.06565, 2016. 1 +[2] Jinwon An and Sungzoon Cho. Variational autoencoder based anomaly detection using reconstruction probability. Special Lecture on IE, 2(1), 2015. 6 +[3] Jerone Andrews, Edward Morton, and Lewis Griffin. Detecting anomalous data using auto-encoders. International Journal of Machine Learning and Computing, 6:21, 01 2016. 6 +[4] Van Loi Cao, Miguel Nicolau, and James Mcdermott. A hybrid autoencoder and density estimation model for anomaly detection. In PPSN, volume 9921, pages 717-726, 09 2016. 6 +[5] Raghavendra Chalapathy and Sanjay Chawla. Deep learning for anomaly detection: A survey. CoRR, abs/1901.03407, 2019. 6 +[6] Jinghui Chen, Saket Sathe, Charu Aggarwal, and Deepak Turaga. Outlier detection with autoencoder ensembles. In Proceedings of the 2017 SIAM International Conference on Data Mining, pages 90-98. SIAM, 2017. 6 +[7] Kyunghyun Cho, Caglar Gulcehre, Universite 'De Montreal, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. In EMNLP, 2014. 1 +[8] C Chow. On optimum recognition error and reject tradeoff. IEEE Transactions on information theory, 16(1):41-46, 1970. 6 +[9] Jesse Davis and Mark Goadrich. The relationship between precision-recall and roc curves. In Proceedings of the 23rd international conference on Machine learning, pages 233-240. ACM, 2006. 6 +[10] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248-255. IEEE, 2009. 7 +[11] Laurent Dinh, David Krueger, and Yoshua Bengio. Nice: Non-linear independent components estimation. CoRR, abs/1410.8516, 2014. 2, 11 +[12] Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real nvp. ArXiv, abs/1605.08803, 2016. 2 +[13] Scott R Eliason. Maximum likelihood estimation: Logic and practice. Number 96. Sage, 1993. 3 +[14] Sarah M. Erfani, Sutharshan Rajasegarar, Shanika Karunasekera, and Christopher Leckie. High-dimensional and large-scale anomaly detection using a linear one-classsvm with deep learning. Pattern Recogn., 58(C):121-134, Oct. 2016. 6 +[15] Yonatan Geifman and Ran El-Yaniv. Selective classification for deep neural networks. In Advances in neural information processing systems, pages 4878-4887, 2017. 6 +[16] Amol Ghoting, Srinivasan Parthasarathy, and Matthew Eric Otey. Fast mining of distance-based outliers in high-dimensional datasets. Data Mining and Knowledge Discovery, 16(3):349-364, 2008. 6 + +[17] Izhak Golan and Ran El-Yaniv. Deep anomaly detection using geometric transformations. In Advances in Neural Information Processing Systems, pages 9758-9769, 2018. 6 +[18] Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. CoRR, abs/1412.6572, 2014. 1, 7 +[19] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 1, 2, 6 +[20] Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribution examples in neural networks. ICLR, 2017. 1, 6 +[21] Geoffrey Hinton, Li Deng, Dong Yu, George Dahl, Abdelrahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Brian Kingsbury, et al. Deep neural networks for acoustic modeling in speech recognition. IEEE Signal processing magazine, 29, 2012. 1 +[22] Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. 1, 2, 6 +[23] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. 5 +[24] Durk P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible 1x1 convolutions. In Advances in Neural Information Processing Systems, pages 10215-10224, 2018. 2, 4 +[25] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. Technical report, Cite-seer, 2009. 6, 7 +[26] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097-1105, 2012. 1 +[27] Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detecting out-of-distribution samples and adversarial attacks. In Advances in Neural Information Processing Systems, pages 7167-7177, 2018. 1, 2, 3, 4, 5, 6, 7, 8, 13, 14 +[28] Shiyu Liang, Yixuan Li, and R Srikant. Principled detection of out-of-distribution examples in neural networks. ICLR, 2018. 1, 2, 3, 5, 6 +[29] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1765–1773, 2017. 1 +[30] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. 2011. 6, 7 +[31] Anh Nguyen, Jason Yosinski, and Jeff Clune. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 427-436, 2015. 1 +[32] Marco AF Pimentel, David A Clifton, Lei Clifton, and Lionel Tarassenko. A review of novelty detection. Signal Processing, 99:215-249, 2014. 6 + +[33] Lukas Ruff, Robert A. Vandermeulen, Nico Gornitz, Lucas Deecke, Shoaib A. Siddiqui, Alexander Binder, Emmanuel Müller, and Marius Kloft. Deep one-class classification. In Proceedings of the 35th International Conference on Machine Learning, volume 80, pages 4393-4402, 2018. 6 +[34] Chandramouli S Sastry and Sageev Oore. Zero-shot out-of-distribution detection with feature correlations, 2020. 6 +[35] Thomas Schlegl, Philipp Seebock, Sebastian M Waldstein, Ursula Schmidt-Erfurth, and Georg Langs. Unsupervised anomaly detection with generative adversarial networks to guide marker discovery. In International Conference on Information Processing in Medical Imaging, pages 146-157. Springer, 2017. 6 +[36] Bernhard Scholkopf, John C. Platt, John C. Shawe-Taylor, Alex J. Smola, and Robert C. Williamson. Estimating the support of a high-dimensional distribution. Neural Comput., 13(7):1443-1471, July 2001. 6 +[37] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. *ICLR*, 2015. 1 +[38] Yunfu Song and Zhijian Ou. Learning neural random fields with inclusive auxiliary generators. ArXiv, abs/1806.00271, 2018. 6 +[39] Suwon Suh, Daniel H Chae, Hyon-Goo Kang, and Seungjin Choi. Echo-state conditional variational autoencoder for anomaly detection. In 2016 International Joint Conference on Neural Networks (IJCNN), pages 1015-1022. IEEE, 2016. 6 +[40] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian J. Goodfellow, and Rob Fergus. Intriguing properties of neural networks. CoRR, abs/1312.6199, 2013. 1 +[41] Esteban G Tabak and Cristina V Turner. A family of nonparametric density estimation algorithms. Communications on Pure and Applied Mathematics, 66(2):145-164, 2013. 2 +[42] Esteban G Tabak, Eric Vanden-Eijnden, et al. Density estimation by dual ascent of the log-likelihood. Communications in Mathematical Sciences, 8(1):217–233, 2010. 2 +[43] David M. J. Tax and Robert P. W. Duin. Support vector data description. Mach. Learn., 54(1):45-66, Jan. 2004. 6 +[44] William Wang, Angelina Wang, Aviv Tamar, Xi Chen, and Pieter Abbeel. Safer classification by synthesis. CoRR, abs/1711.08534, 2017. 6 +[45] Fisher Yu, Ari Seff, Yinda Zhang, Shuran Song, Thomas Funkhouser, and Jianxiong Xiao. Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop. arXiv preprint arXiv:1506.03365, 2015. 7 +[46] Sehun Yu, Donga Lee, and Hwanjo Yu. Out-of-distribution image detection using the normalized compression distance, 2020. 6 +[47] Shuangfei Zhai, Yu Cheng, Weining Lu, and Zhongfei Zhang. Deep structured energy based models for anomaly detection. CoRR, abs/1605.07717, 2016. 6 \ No newline at end of file diff --git a/deepresidualflowforoutofdistributiondetection/images.zip b/deepresidualflowforoutofdistributiondetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..0cc50233108e205621763fdc4148e596df733ff8 --- /dev/null +++ b/deepresidualflowforoutofdistributiondetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84b45382f61530a08dbeedb1bcbda453eed88deadc215b8f156dde4951ea5348 +size 592737 diff --git a/deepresidualflowforoutofdistributiondetection/layout.json b/deepresidualflowforoutofdistributiondetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a18f261d670cc07af8536cb95c83701496a24de3 --- /dev/null +++ b/deepresidualflowforoutofdistributiondetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc900c84b05f869e7752a7e403b51832934519032ffce69dd227deada317eda5 +size 468280 diff --git a/deepsemanticclusteringbypartitionconfidencemaximisation/e60c21e7-2ca4-4b39-90e9-fa17e4f85608_content_list.json b/deepsemanticclusteringbypartitionconfidencemaximisation/e60c21e7-2ca4-4b39-90e9-fa17e4f85608_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..72904d3464ec67ba60cb29c4f5393171fa48b0c6 --- /dev/null +++ b/deepsemanticclusteringbypartitionconfidencemaximisation/e60c21e7-2ca4-4b39-90e9-fa17e4f85608_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab5ff7cedd43358f2c75e27410a9731cc46f5fcb2276a918145d336ad2bb25bc +size 83605 diff --git a/deepsemanticclusteringbypartitionconfidencemaximisation/e60c21e7-2ca4-4b39-90e9-fa17e4f85608_model.json b/deepsemanticclusteringbypartitionconfidencemaximisation/e60c21e7-2ca4-4b39-90e9-fa17e4f85608_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7f69a3f8758a141e29381fcfca46c853ecf8f75d --- /dev/null +++ b/deepsemanticclusteringbypartitionconfidencemaximisation/e60c21e7-2ca4-4b39-90e9-fa17e4f85608_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9feac875b7711e6c4abb7637b9ffbb5d5f22ba0be24b45a81d77f6fa78544e63 +size 102831 diff --git a/deepsemanticclusteringbypartitionconfidencemaximisation/e60c21e7-2ca4-4b39-90e9-fa17e4f85608_origin.pdf b/deepsemanticclusteringbypartitionconfidencemaximisation/e60c21e7-2ca4-4b39-90e9-fa17e4f85608_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0b2a4bcf4b640b2063bfe62182c7c9cad1ed09f7 --- /dev/null +++ b/deepsemanticclusteringbypartitionconfidencemaximisation/e60c21e7-2ca4-4b39-90e9-fa17e4f85608_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25955dfa2bd47bdf2c3da7ac5fe48f762c0a0b6d7fbc1d31e43d9734905f0dc0 +size 2178292 diff --git a/deepsemanticclusteringbypartitionconfidencemaximisation/full.md b/deepsemanticclusteringbypartitionconfidencemaximisation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5d729cdd25f526335c182478bba8aa05f5d7ccfd --- /dev/null +++ b/deepsemanticclusteringbypartitionconfidencemaximisation/full.md @@ -0,0 +1,362 @@ +# Deep Semantic Clustering by Partition Confidence Maximisation + +Jiabo Huang Queen Mary University of London + +jiabo.huang@qmul.ac.uk + +Shaogang Gong Queen Mary University of London + +s.gong@qmul.ac.uk + +Xiatian Zhu University of Surrey + +xiatian.zhu@surrey.ac.uk + +# Abstract + +By simultaneously learning visual features and data grouping, deep clustering has shown impressive ability to deal with unsupervised learning for structure analysis of high-dimensional visual data. Existing deep clustering methods typically rely on local learning constraints based on inter-sample relations and/or self-estimated pseudo labels. This is susceptible to the inevitable errors distributed in the neighbourhoods and suffers from error-propagation during training. In this work, we propose to solve this problem by learning the most confident clustering solution from all the possible separations, based on the observation that assigning samples from the same semantic categories into different clusters will reduce both the intra-cluster compactness and inter-cluster diversity, i.e. lower partition confidence. Specifically, we introduce a novel deep clustering method named PartItion Confidence mAxiimisation (PICA). It is established on the idea of learning the most semantically plausible data separation, in which all clusters can be mapped to the ground-truth classes one-to-one, by maximising the "global" partition confidence of clustering solution. This is realised by introducing a differentiable partition uncertainty index and its stochastic approximation as well as a principled objective loss function that minimises such index, all of which together enables a direct adoption of the conventional deep networks and mini-batch based model training. Extensive experiments on six widely-adopted clustering benchmarks demonstrate our model's performance superiority over a wide range of the state-of-the-art approaches. The code is available online. + +# 1. Introduction + +As one of the most fundamental problems in machine learning, clustering has drawn extensive attention in a wide range of computer vision fields [5, 1, 25, 31] where the + +ground-truth labels are hard to acquire. Earlier clustering algorithms [32, 43, 38] are usually limited when dealing with high-dimensional imagery data due to the absence of discriminative visual representations [21, 22]. As a recent effort to solve this problem, deep clustering [19] is proposed to jointly optimise the objectives of representation learning and clustering with the help of the deep learning techniques [12, 30]. Although conducting cluster analysis with learnable representations holds the potential to benefit clustering on unlabelled data, how to improve the semantic plausibility of these clusters remains an open problem. + +Recent deep clustering models either iteratively estimate cluster assignment and/or inter-sample relations which are then used as hypotheses in supervising the learning of deep neural networks [44, 6, 7, 50], or used in conjunction with clustering constraints [24, 16, 23]. In ideal cases, such alternation-learning methods can approach the performance of supervised models not the least benefiting from their robustness against noisy labels [18]. Nevertheless, they are susceptible to error-propagation as the process of alternating cluster assignment and representation learning is staged between two learning objectives and any error in local neighbourhoods is accumulated during this alternation (Fig. 1(a)). On the other hand, there are a few simultaneous learning methods that learn both the representation and clusters at the same time without explicit stages of cluster assignment and/or inter-sample relations estimation [24, 23]. They usually train with some pretext tasks that lead to unsatisfying solutions. Although such methods can avoid mostly the problem of error-propagation, they suffer from ambiguous learning constraints due to vague connection between the training supervision and clustering objective. Without global solution-level guidance to select from all the possible separations, the resulted clusters are usually semantically less plausible. + +In this work, we propose a deep clustering method called Partition Confidence mAximisation (PICA). Whilst + +![](images/5b45dcb1acdb7588948fe80457287b90c31408806bbdf24590723b5bf9d859b5.jpg) +(a) Local Constraint +Figure 1. (a) Local vs. (b) global learning constraints in deep clustering. Ground-truth classes are depicted by coloured backgrounds, decision boundaries and margins are indicated by grey solid lines and greyish shadow areas respectively. Arrow means learning supervision. With local learning constraints, a model is more likely to propagate errors in the neighbourhood due to lacking global structural guidance at the solution level as in (b). + +![](images/f2de4aa0a5689c27ae2218035fbd17128c76945d4431e0a2e52933880bff9e3e.jpg) +(b) Global Constraint + +the existence of intra-class visual discrepancy and interclass affinity are common in most natural images, the majority of samples from the same semantic classes are still expected to share a high proportion of visual information. In this case, although a set of data can be separated in numerous ways according to various criteria, assigning samples from the same semantic categories to different clusters will reduce the resulted intra-cluster compactness and inter-cluster diversity [45] and lead to lower partition confidence. Based on this insight, PICA is designed specifically to encourage the model to learn the most confident clusters from all the possible solutions in order to find the most semantically plausible inter-class separation. This is in spirit of traditional maximal margin clustering [47, 9] which also seeks for most separable clustering solutions with shallow models (e.g. SVM), but differs notably in that both the feature representations and decision boundaries are end-to-end learned in our deep learning model. Specifically, we propose a partition uncertainty index that quantifies how confidently a deep model can make sense and separate a set of target images when performing both feature representation learning and cluster assignment concurrently. To fit the standard mini-batch based model learning, a stochastic approximation of the partition uncertainty index is introduced. We further formulate a novel objective loss function based on the stochastic partition uncertainty index to enable deep clustering with any off-the-shelf networks. + +Our contributions are threefold: (1) We propose the idea of learning the most semantically plausible clustering solution by maximising partition confidence, which extends the + +classical maximal margin clustering idea [47, 9] to the deep learning paradigm. The proposed method makes no strong hypothesis on local inter-sample relations and/or cluster assignment which usually leads to error-propagation and inferior clustering solutions. (2) We introduce a novel deep clustering method, called Partition Confidence mAximisation (PICA). PICA is built upon a newly introduced partition uncertainty index that is designed elegantly to quantify the global confidence of the clustering solution. To enable formulating a deep learning objective loss function, a novel transformation of the partition uncertainty index is further proposed. PICA can be trained end-to-end using a single objective loss function without whistles and bells (e.g. complex multi-stage alternation and multiple loss functions) to simultaneously learn a deep neural network and cluster assignment that can be mapped to the semantic category one-to-one. (3) A stochastic approximation of the partition uncertainty index is introduced to decouple it from the whole set of target images, therefore, enabling a ready adoption of the standard mini-batch model training. + +The advantages of PICA over a wide range of the state-of-the-art deep clustering approaches have been demonstrated by extensive experiments on six challenging objects recognition benchmarks, including CIFAR-10/100 [28], STL-10 [8], ImageNet-10/Dogs [7] and TinyImageNet [29]. + +# 2. Related Work + +Existing deep clustering approaches generally fall into two categories according to the training strategy: (1) Alternate training [49, 46, 7, 44, 6, 50, 15] and (2) Simultaneous training [23, 36, 35, 16] + +Alternate training strategy usually estimates the ground-truth membership according to the pretrained or up-to-date model and in return supervises the network training by the estimated information. DEC [46] initialises cluster centroids by conducting K-means [32] on pretrained image features and then fine-tunes the model to learn from the confident cluster assignments to sharpen the resulted prediction distribution. IDEC [15] shares a similar spirit and improves by a local structure preservation mechanism. JULE [50] combines the hierarchical agglomerative clustering idea with deep learning by a recurrent framework which merges the clusters that are close to each other. The method in [49] jointly optimises the objectives of Auto-Encoder [2] and K-means [32] and alternately estimates cluster assignment to learn a "clustering-friendly" latent space. DAC [7], DDC [6] and DCCM [44] exploit the inter-samples relations according to the pairwise distance between the latest sample features and train the model accordingly. Whilst explicit local learning constraints on cluster assignment computed from either the pretrained or up-to-date models usually lead + +to a deterministic clustering solution, these approaches suffer from the problem of more severe error-propagation from the inconsistent estimations in the neighbourhoods during training. Comparing with them, our method makes no hard assumption on neither the cluster assignment nor the intersamples relation so that it can refrain better from incorrectness accumulation. + +Simultaneous training strategy often integrates deep representation learning [2, 42] with conventional cluster analysis [32, 10, 13] or other pretext objectives. These approaches do not explicitly learn from estimated cluster assignment but usually require good cluster structure to fulfil the training objectives. Methods in [23, 36, 35] train to optimise the objective of cluster analysis and use the reconstruction constraint from Auto-Encoder to avoid trivial solutions. ADC [16] formulates the optimisation objective to encourage consistent association cycles among cluster centroids and sample embeddings, while IIC [24] trains a model to maximise the mutual information between the predictions of positive sample pairs. Both of them randomly perturb the data distribution as a cue of positive relationships to improve model's robustness to visual transformations. Although the methods from this category alleviate the negative impact of inaccurate supervision from estimated information, their objectives are usually more ambiguous than that of the alternate approaches as they can be met by multiple different separations. Due to vague connection between the training supervision and clustering objective, this type of approaches tend to yield semantically less plausible clusters solutions when global solution-level guidance is absent. Our PICA model addresses this limitation by introducing a partition uncertainty index to quantify the global confidence of the clustering solution so as to select the most semantically plausible separation. Besides, it can also be trained in a concise and simultaneous manner without any ad-hoc strategy for pretraining or alternation. + +# 3. Methodology + +Problem Definition Given a set of $N$ unlabelled target images $\mathcal{I} = \{I_1, I_2, \dots, I_N\}$ drawn from $K$ semantic classes $\mathcal{V} = \{Y_1, Y_2, \dots, Y_K\}$ , the objective of deep clustering is learning to separate $\mathcal{I}$ into $K$ clusters in an unsupervised manner by a convolutional neural network (CNN) model. There are typically two components learned jointly end-to-end: (1) feature extractor $f_{\theta}(\cdot)$ that maps the target images into vector representations: $\boldsymbol{x} = f_{\theta}(\boldsymbol{I})$ , and (2) classifier $g_{\phi}(\cdot)$ that assigns each feature representation $\boldsymbol{x}$ with a cluster membership distribution: $\boldsymbol{p} = g_{\phi}(\boldsymbol{x}) = \{p_1; p_2; \dots; p_K\}$ . + +Once the CNN model is trained, the cluster assignment can be predicted in a maximum likelihood manner as: + +$$ +k ^ {*} = \arg \max _ {k} (p _ {k}), k \in \{1, 2, \dots , K \}. \tag {1} +$$ + +Ideally, all the samples of a cluster would share the same target class labels. That being said, we aim to discover the underlying semantic class decision boundary directly from the raw data samples. + +Approach Overview In general, image clustering is not a well-defined problem as multiple different solutions can all make sense of the input data [48]. This makes deep clustering extremely challenging due to totally lacking high-level guidance knowledge. Given this, in this work, we assume that the most confident data partition is the most promising and semantically plausible solution we are seeking for, as interpreted earlier. + +Motivated by this consideration, we formulate a novel deep clustering method, called PartItion Confidence mAxi-misation (PICA). PICA is based on a partition uncertainty index (PUI) that measures how a deep CNN is capable of interpreting and partitioning the target image data. It is therefore a global clustering solution measurement (Fig. 1 (b)), fundamentally different to most existing deep clustering methods that leverage some local constraints on individual samples or sample pairs (Fig. 1 (a)) without global solution-wise learning guidance. This index is differentiable, hence, PICA simply needs to optimise it without whistles and bells using any off-the-shelf CNN models. An overview of PICA is depicted in Fig. 2. + +# 3.1. Partition Uncertainty Index + +We start by formulating a partition uncertainty index, a key element of our PICA. Given an input image $I_{i}$ , suppose the cluster prediction of a CNN model is denoted as: + +$$ +\boldsymbol {p} _ {i} = \left[ \begin{array}{l} \boldsymbol {p} _ {i, 1} \\ \dots \\ \boldsymbol {p} _ {i, K} \end{array} \right] \in \mathbb {R} ^ {K \times 1} \tag {2} +$$ + +where $p_{i,j}$ specifies the predicted probability of the $i$ -th image assigned to the $j$ -th cluster, and there are a total of $K$ clusters ( $j \in [1,2,\dots,K]$ ). We then obtain the cluster prediction matrix of all the $N$ target images as + +$$ +P = \left[ \boldsymbol {p} _ {1}, \boldsymbol {p} _ {2}, \dots , \boldsymbol {p} _ {N} \right] \in \mathbb {R} ^ {K \times N} \tag {3} +$$ + +For presentation ease, we denote the $j$ -th row of $P$ as: + +$$ +\boldsymbol {q} _ {j} = \left[ p _ {1, j}, p _ {2, j}, \dots , p _ {N, j} \right] \in \mathbb {R} ^ {1 \times N}, \quad j \in [ 1, 2, \dots , K ]. \tag {4} +$$ + +Clearly, $\mathbf{q}_j$ collects the probability values of all the images for the $j$ -th cluster, which summarises the assignment statistics of that cluster over the whole target data. Hence, we call it as a cluster-wise Assignment Statistics Vector (ASV). + +Ideally, each image is assigned to only one cluster, i.e. each $\pmb{p}$ is a one-hot vector (same as the ground-truth label vectors in supervised image classification). It is intuitive that this corresponds to the most confident clustering + +![](images/2b5959960d64e773930f79b6e09b8eb2c8456c0d835f1cadaebdaf0edba6ef8a.jpg) +Figure 2. Overview of the proposed Partition Confidence mAximisation (PICA) method for unsupervised deep clustering. (a) Given the input data and the decision boundaries determined by the CNN model, (b) PICA computes the cluster-wise Assignment Statistics Vector (ASV) in the forward pass using a mini-batch data and its randomly perturbed copy. (c) To minimise the partition uncertainty index (PUI), (d) PICA is trained to discriminate the ASV of all clusters on the hypersphere through a dedicated objective loss function, so as to learn the most confident and potentially promising clustering solution. + +case which is the objective that PICA aims to achieve. For enabling the learning process of a deep clustering model towards this ideal (most confident) case, an objective loss function is typically needed. To that end, we design a partition uncertainty index as the learning target. Specifically, we observe that in the ideal case above, the ASV quantities of any two clusters, $\mathbf{q}_{j_1}$ and $\mathbf{q}_{j_2}$ , are orthogonal to each other. Mathematically, this means that their cosine similarity (Eq. (5)) is 0 (due to not negative values in $\mathbf{q}_{j_1}$ and $\mathbf{q}_{j_2}$ ). + +$$ +\cos \left(\boldsymbol {q} _ {j _ {1}}, \boldsymbol {q} _ {j _ {2}}\right) = \frac {\boldsymbol {q} _ {j _ {1}} \cdot \boldsymbol {q} _ {j _ {2}}}{\| \boldsymbol {q} _ {j _ {1}} \| _ {2} \| \boldsymbol {q} _ {j _ {2}} \| _ {2}}, j _ {1}, j _ {2} \in [ 1, \dots , K ] \tag {5} +$$ + +In the worst clustering cases where all the cluster prediction $\pmb{p}$ are the same (e.g. the uniform distribution vector), we also have a constant value: $\cos (\pmb{q}_{j_1},\pmb{q}_{j_2}) = 1$ since all the ASV quantities are the same. For any case in-between, the ASV cosine similarity of two clusters will range from 0 (most confident) to 1 (least confident). + +In light of the above analysis, we formulate a partition uncertainty index (PUI) as the ASV cosine similarity set of all the cluster pairs as: + +$$ +\mathcal {M} _ {\mathrm {P U I}} \left(j _ {1}, j _ {2}\right) = \cos \left(\boldsymbol {q} _ {j _ {1}}, \boldsymbol {q} _ {j _ {2}}\right), \quad j _ {1}, j _ {2} \in [ 1, \dots , K ] \tag {6} +$$ + +In form, $\mathcal{M}_{\mathrm{PUI}}$ is a $K\times K$ matrix. By doing so, the learning objective of PICA is then to minimise the PUI (except the diagonal elements), which is supposed to provide the most confident clustering solution at its minimum. + +A Stochastic Approximation The PUI as formulated in Eq. (6) requires using the entire target data which is often at large scale. This renders it unsuited to stochastic mini-batch based deep learning. To address this problem, we propose a + +stochastic approximation of PUI. Specifically, instead of using all the images (which is deterministic), at each training iteration we use a random subset $\mathcal{I}^t$ of them. In probability theory and statistics, this is sampling from a discrete uniform distribution in the whole target data space [20]. We call this approximation as Stochastic PUI. In practice, this allows to fit easily the mini-batch training of the standard deep learning, e.g. simply setting $\mathcal{I}^t$ as a mini-batch. + +Formally, at the $t$ -th training iteration, we have a minibatch $B$ of $N_{b}$ samples to train the model and set $\mathcal{I}^t = B$ . Let us denote the cluster prediction matrix of $\mathcal{I}^t$ made by the up-to-date model as: + +$$ +P ^ {t} = \left[ \begin{array}{l} \boldsymbol {q} _ {1} ^ {t} \\ \dots \\ \boldsymbol {q} _ {K} ^ {t} \end{array} \right] \in \mathbb {R} ^ {K \times N _ {b}} \tag {7} +$$ + +where $\pmb{q}_j^t \in \mathbb{R}^{1 \times N_b}$ is the ASV of $j$ -th cluster on mini-batch $\mathcal{I}^t$ . As Eq. (6), we obtain the Stochastic PUI: + +$$ +\mathcal {M} _ {\mathrm {S - P U I}} \left(j _ {1}, j _ {2}\right) = \cos \left(\boldsymbol {q} _ {j _ {1}} ^ {t}, \boldsymbol {q} _ {j _ {2}} ^ {t}\right), \quad j _ {1}, j _ {2} \in [ 1, \dots , K ]. \tag {8} +$$ + +The Stochastic PUI is in a spirit of dropout [40]. Instead of neurons, we randomly drop data samples in this case and realised in the standard mini-batch sampling process. + +# 3.2. Learning Objective Function + +Given the Stochastic PUI $\mathcal{M}_{\mathrm{S - PUI}}$ , as discussed earlier PICA is then trained to minimise it excluding the diagonal elements. To derive a typical objective loss function, we usually need a scalar measure. However, $\mathcal{M}_{\mathrm{S - PUI}}$ is a $K\times K$ matrix. There is hence a need to transform it. + +Recall that for any two different clusters, we want to minimise their ASV cosine similarity. This is actually reinforcing self-attention [41] by treating each cluster as a + +data sample and suppressing all the inter-sample attention. Hence, we apply a softmax operation as self-attention to each cluster $j$ and obtain a probabilistic measurement as: + +$$ +m _ {j, j ^ {\prime}} = \frac {\exp \left(\mathcal {M} _ {\mathrm {S - P U I}} \left(j , j ^ {\prime}\right)\right)}{\sum_ {k = 1} ^ {K} \exp \left(\mathcal {M} _ {\mathrm {S - P U I}} (j , k)\right)}, j ^ {\prime} \in [ 1, \dots , K ] \tag {9} +$$ + +With this transformation, the learning objective is further simplified into maximising $\{m_{j,j}\}_{j = 1}^{K}$ . + +By further treating $m_{j,j}$ as the model prediction probability on the ground-truth class of a training sample (a cluster $j$ in this context), a natural choice is then to exploit the common cross-entropy loss function: + +$$ +\mathcal {L} _ {\mathrm {c e}} = \frac {1}{K} \sum_ {j = 1} ^ {K} - \log \left(m _ {j, j}\right) \tag {10} +$$ + +As such, we formulate a scalar objective loss function $\mathcal{L}_{\mathrm{ce}}$ that minimises effectively the matrix $\mathcal{M}_{\mathrm{S - PUI}}$ . + +In clustering, there are algorithm-agnostic trivial solutions that assign a majority of samples into a minority of clusters. To avoid this, we introduce an extra constraint that minimises negative entropy of the cluster size distribution: + +$$ +\mathcal {L} _ {\mathrm {n e}} = \log (K) - H (\mathcal {Z}), \text {w i t h} \mathcal {Z} = \left[ z _ {1}, z _ {2}, \dots , z _ {K} \right] \tag {11} +$$ + +where $H(\cdot)$ is the entropy of a distribution, and $\mathcal{Z}$ is $L_{1}$ normalised soft cluster size distribution with each element computed as $z_{j} = \frac{\sum(q_{j}^{t})}{\sum_{k=1}^{K}\sum(q_{k}^{t})}$ . Using $\log(K)$ is to ensure non-negative loss values. + +The overall objective function of PICA is formulated as: + +$$ +\mathcal {L} = \mathcal {L} _ {\mathrm {c e}} + \lambda \mathcal {L} _ {\mathrm {n e}} \tag {12} +$$ + +where $\lambda$ is a weight parameter. + +# 3.3. Model Training + +The objective function (Eq. (12)) of PICA is differentiable end-to-end, enabling the conventional stochastic gradient descent algorithm for model training. To improve the model robustness to visual transformations we use data augmentation to randomly perturb the training data distribution. We enforce the clustering invariance against image perturbations at the global solution level. More specifically, we use the original data to compute $\boldsymbol{q}_{j_1}^t$ and the transformed data to compute $\boldsymbol{q}_{j_2}^t$ in Eq. (8) at each iteration. The training procedure is summarised in Algorithm 1. + +# 4. Experiments + +Datasets In evaluation, we used six object recognition datasets. (1) CIFAR-10(/100) [28]: A natural image dataset with 50,000/10,000 samples from 10(/100) classes for training and testing respectively. (2) STL-10 [8]: An ImageNet [39] sourced dataset containing 500/800 training/test + +# Algorithm 1 Deep clustering by PICA. + +Input: Training data $\mathcal{I}$ , training epochs $N_{\mathrm{ep}}$ , iterations per epoch $N_{\mathrm{it}}$ , target cluster number $K$ ; + +Output: A deep clustering model; + +for epoch $= 1$ to $N_{ep}$ do + +for iter $= 1$ to $N_{it}$ do + +Sampling a random mini-batch of images; + +Feeding the mini-batch into the deep model; + +Computing per-cluster ASV (Eq. (4)); + +Computing the Stochastic PUI matrix (Eq. (8)); + +Computing the objective loss (Eq. (12)); + +Model weights update by back-propagation. + +# end for + +# end for + +images from each of 10 classes and additional 100,000 samples from several unknown categories. (3) ImageNet-10 and ImageNet-Dogs [7]: Two subsets of ImageNet: the former with 10 random selected subjects and the latter with 15 dog breeds. (4) Tiny-ImageNet [29]: A subset of ImageNet with 200 classes. There are 100,000/10,000 training/test images evenly distributed in each category. + +We adopted the clustering setup same as [24, 44, 7]: Using both the training and test sets (without labels) for CIFAR10/100 and STL-10, and only the training set for ImageNet-10, ImageNet-Dogs and Tiny-ImageNet; Taking the 20 super-classes of CIFAR-100 as the ground-truth. + +Evaluation Metrics We used three standard clustering performance metrics: (a) Accuracy (ACC) is computed by assigning each cluster with the dominating class label and taking the average correct classification rate as the final score, (b) Normalised Mutual Information (NMI) quantifies the normalised mutual dependence between the predicted labels and the ground-truth, and (c) Adjusted Rand Index (ARI) evaluates the clustering result as a series of decisions and measures its quality according to how many positive/negative sample pairs are correctly assigned to the same/different clusters. All of these metrics scale from 0 to 1 and higher values indicate better performance. + +Implementation Details For fair comparisons with previous works, we followed the same settings and most of the implementation choices as [24]. Specifically, we conducted all the experiments with a ResNet-like backbone. We used the auxiliary over-clustering strategy in a separate clustering head to exploit the additional data from irrelevant classes if available. For the over-clustering head, we set 700 clusters for Tiny-ImageNet (due to more ground-truth classes) and 70 clusters for all the others. The over-clustering head, discarded finally in test, was trained alternatively with the primary head. In case of no auxiliary data, we used the target data in over-clustering head, which plays a role of auxiliary learning. For training, we used Adam optimiser [26] + +
DatasetCIFAR-10CIFAR-100STL-10ImageNet-10ImageNet-DogsTiny-ImageNet
MetricsNMIACCARINMIACCARINMIACCARINMIACCARINMIACCARINMIACCARI
K-means0.0870.2290.0490.0840.1300.0280.1250.1920.0610.1190.2410.0570.0550.1050.0200.0650.0250.005
SC [52]0.1030.2470.0850.0900.1360.0220.0980.1590.0480.1510.2740.0760.0380.1110.0130.0630.0220.004
AC [14]0.1050.2280.0650.0980.1380.0340.2390.3320.1400.1380.2420.0670.0370.1390.0210.0690.0270.005
NMF [4]0.0810.1900.0340.0790.1180.0260.0960.1800.0460.1320.2300.0650.0440.1180.0160.0720.0290.005
AE [2]0.2390.3140.1690.1000.1650.0480.2500.3030.1610.2100.3170.1520.1040.1850.0730.1310.0410.007
DAE [42]0.2510.2970.1630.1110.1510.0460.2240.3020.1520.2060.3040.1380.1040.1900.0780.1270.0390.007
DCGAN [37]0.2650.3150.1760.1200.1510.0450.2100.2980.1390.2250.3460.1570.1210.1740.0780.1350.0410.007
DeCNN [51]0.2400.2820.1740.0920.1330.0380.2270.2990.1620.1860.3130.1420.0980.1750.0730.1110.0350.006
VAE [27]0.2450.2910.1670.1080.1520.0400.2000.2820.1460.1930.3340.1680.1070.1790.0790.1130.0360.006
JULE [50]0.1920.2720.1380.1030.1370.0330.1820.2770.1640.1750.3000.1380.0540.1380.0280.1020.0330.006
DEC [46]0.2570.3010.1610.1360.1850.0500.2760.3590.1860.2820.3810.2030.1220.1950.0790.1150.0370.007
DAC [7]0.3960.5220.3060.1850.2380.0880.3660.4700.2570.3940.5270.3020.2190.2750.1110.1900.0660.017
ADC [16]†-0.325--0.160--0.530---------
DDC [6]0.4240.5240.329---0.3710.4890.2670.4330.5770.345-----
DCCM [44]0.4960.6230.4080.2850.3270.1730.3760.4820.2620.6080.7100.5550.3210.3830.1820.2240.1080.038
IIC [24]†-0.617--0.257--0.610---------
PICA: (Mean)0.5610.6450.4670.2960.3220.1590.5920.6930.5040.7820.8500.7330.3360.3240.1790.2770.0940.016
PICA: (Best)†0.5910.6960.5120.3100.3370.1710.6110.7130.5310.8020.8700.7610.3520.3520.2010.2770.0980.040
+ +Table 1. The clustering performance on six challenging object image benchmarks. The $1^{\mathrm{st}}/2^{\mathrm{nd}}$ best results are indicated in red/blue. The results of previous methods are taken from [44, 24]. $\dagger$ : The best result among multiple trials. + +with a fixed learning rate 0.0001. All the models were randomly initialised and trained with 200 epochs. Considering no generalisation to test data in clustering, the regularisation penalties to model weights were deprecated. We set the batch size to 256 and repeated each in-batch sample 3 times. Three operations, including random rescale, horizontal flip and colour jitters, were adopted for data perturbations and augmentation. We applied the sobel filter for restraining the model from capturing meaningless patterns of trivial colour cues. The weight of entropy regularisation in Eq (12) was set to 2 empirically. We used the same hyper-parameters for all the experiments without exhaustive per-dataset tuning (which is unscalable, inconvenient nor unfriendly in deployment). To reflect the performance stability, we tested our model with 5 trials and reported the average and best results separately. + +# 4.1. Comparisons to State-of-the-Art Methods + +Table 1 compares the object image clustering performance of the proposed PICA method with a wide range of the state-of-the-art clustering approaches. We have the following observations: (1) PICA surpasses all the strong competitors in most cases, sometimes by a large margin. Taking the clustering accuracy (ACC) for example, $\mathrm{PICA}^{\dagger}$ outperforms the best competitor [44] on CIFAR-10 and ImageNet-10 with $7.3\%$ and $16.0\%$ respectively while the performance gain over IIC [24] on STL-10 is $10.3\%$ . This demonstrates the overall remarkable ability of our PICA for image clustering. (2) DCCM [44] serves as a strong state-of-the-art model on most datasets except for STL-10, on which it is outperformed by both IIC [24] and our PICA by more significant margins. We attribute this to the ca + +pability of exploiting auxiliary data of both winner methods. Also, PICA is clearly superior to IIC for clustering the images of STL-10, suggesting the outstanding potential of our method for capitalising extra data during deep clustering. (3) The absolute margins obtained by PICA over existing methods on the more challenging CIFAR-100 and ImageNet-Dogs benchmarks are relatively smaller. This is not surprised, since these datasets present fine-grained object classes which give very subtle differences in-between; Without rich knowledge, even humans may make mistakes when differentiating such classes. The relative performance improvements of our method is more consistent. + +# 4.2. Ablation Study + +We conducted ablation studies to investigate the effect of different design choices in PICA with a fixed random seed. + +Partition Confidence Dynamics We started with examining the clustering confidence dynamics during training, which underpins the key idea of our PICA. In this examination, we used the maximum prediction probability (Eq. (1)) of every image to measure the clustering confidence, and summarised their 50-bins histogram statistics. We performed this test on CIFAR-10 at four accuracy performance milestones: 0.10 (random guess), 0.30, 0.50 and 0.70. As shown in Fig. 3, (a) the model started with random clustering close to a uniform prediction; (b,c) Along with the training process, an increasing number of samples get more confident cluster assignment; (d) At the end of training, a majority of samples can be assigned into clusters with $0.98+$ probability confidence, nearly one-hot predictions. + +Avoiding under-clustering We examined how important PICA needs to solve the generic "under-clustering" prob + +![](images/97f13ab108d72c8f43e9f0fb2fc766c22df62fe08dec8deb40c3a2ad6d3d0a59.jpg) +(a) Accuracy $= 0.1$ + +![](images/034cf28d2c213d0e0bc3149f0f6f62af312133cdaa419e10c38843b5ad11e27a.jpg) +(b) Accuracy $= 0.3$ + +![](images/751cae1fe0e5bd55fc3e157a8f17013e31fe7556aee43281a374ccc77aed919e.jpg) +(c) Accuracy $= 0.5$ + +![](images/95d35b2216bcacb6a5ca8c5f48c9c142be7ac4c3dedb7173ffd7970815fd0f9b.jpg) +(d) Accuracy $= 0.7$ +Figure 3. Partition confidence evolution in training on CIFAR-10. + +lem (assigning most samples to a few clusters, i.e. trivial solutions) in our context. The results in Table 2 indicate that it is highly necessary to take into account this problem in model design otherwise the model will be trivially guided to such undesired solutions. This also verifies that the proposed PICA idea is compatible well with the entropy regularisation of the cluster size distribution (Eq. (11)), enabling to eliminate simply trivial results without resorting to complex designs or tricks. + +
EntropyCIFAR-10CIFAR-100ImageNet-10
X0.2460.1680.650
✓0.6960.3300.829
+ +Effect of over-clustering We examined the performance contribution of over-clustering in PICA which serves two purposes: (1) Leveraging extra auxiliary data from irrelevant classes for mining more information (e.g. on STL-10); (2) In case of no auxiliary data, playing a role of ensemble learning (e.g. on CIFAR-10). The results are given in Table 3. It is clear that over-clustering helps in both cases, and interestingly the margin on CIFAR-10 is even bigger than that on STL-10. Also note that without using over-clustering, our PICA can still achieve competitive performances (cf. Table 1). + +Table 2. Necessity of avoiding under-clustering using the entropy regularisation of the cluster size distribution. Metric: ACC. + +
Over-clusteringCIFAR-10STL-10
X0.5820.633
✓0.6960.687
+ +Robustness to data perturbation We tested the cluster + +ing robustness against image perturbation in PICA. Unlike existing methods typically using data augmentation by random perturbation at the local sample level, we exploit it at the global clustering solution level. The results in Table 4 show that our PICA requires data augmentation for offering strong performances. While seemingly surprised, this is also rational/sensitive since our method performs the robustness enhance in a solution-wise manner; This effectively accumulate the augmentation effect of individual samples and potentially resulting in amplified effects eventually. However, this does not affect the use of PICA in general since data augmentation is just a standard necessary element of almost all deep learning methods. + +Table 3. Effect of over-clustering. STL-10 has auxiliary data whilst CIFAR-10 does not. Metric: ACC. + +
PermutationCIFAR-10CIFAR-100ImageNet-10
X0.3100.1470.734
✓0.6960.3300.829
+ +Sensitivity to model initialisation Model initialisation is an important part of both deep neural networks and clustering [2, 3]. We tested its sensitivity in our PICA w.r.t. model performance on CIFAR-10. Apart from the default initialisation of ResNet as delivered in PyTorch [34], we evaluated three more initialisation ways: Gaussian, Xavier [11], Kaiming [17]. Table 5 shows that PICA can work stably without clear variation in the overall performance when using different initialisation methods. This verifies that our method is insensitive to network initialisation. + +Table 4. Robustness to data perturbation in PICA. Metric: ACC. + +
InitialisationNMIACCARI
Default0.5910.6960.512
Gaussian0.6030.6810.511
Xavier0.6100.6760.511
Kaiming0.6170.6800.525
+ +Table 5. Model performance sensitivity to network initialisation. + +# 4.3. Qualitative Study + +Evolution of cluster assignment To provide a better understanding of how does PICA work, we analysed it qualitatively by visualising the evolution of cluster assignment across the whole training process. This enables us to find out how does our model gradually attain the final result. We tracked the model status during the whole training process on CIFAR-10 and evaluated at four accuracy performance milestones: 0.10 (random guess), 0.30, 0.50 and 0.70. Using t-SNE [33], we plotted the predictions of 6,000 randomly selected samples with the ground-truth classes colour encoded. Fig. 4 shows that, (a) the model started from a chaotic status where all the samples were assigned into each cluster with similar probabilities; (b) With the supervision from the proposed objective, easy samples with + +![](images/bfa64199b016ded874b4f46b97d548ca44fc57354a2bc5777057b123aa54e302.jpg) +(a) Accuracy $= 0.1$ + +![](images/6f66b052bb992e24380993e42c412a1c6fe4d173c593d809d5b4600142a9185c.jpg) +(b) Accuracy=0.3 + +![](images/cd77e199a606bcd170febe982b75fd6b3d852726f62bc74db9c5e7334b95734b.jpg) +(c) Accuracy=0.5 + +![](images/b09e71c53cf83d669487317639cbf28dbae5e81370acc90168d8fcb0eaa4a749.jpg) +(d) Accuracy=0.7 + +![](images/68618278630788ed4f408808d0aaf8b77905ce19c4bf68048d580f363f99372b.jpg) +Figure 4. Prediction dynamics of PICA across the training process on CIFAR-10. A total of 6,000 randomly sampled images were used. Ground-truth classes are colour coded. +Figure 5. Cases studies of 5 classes on STL-10. (Left) Successful cases; (Middle) False negative and (Right) false positive failure cases. + +![](images/c229c9a7714ed8a96fb809b34e58c33b79f41536002f7161f11547ecc3f2076e.jpg) + +![](images/36c6e3556120b05aa372adfcd157f981b3a3baa35a54c7eaec297a2d99b47235.jpg) + +most salient observations were separated gradually while the remaining were still indecisive; (c) As the training proceeded, easy samples served as references for the others and attracted those with high visual similarities; (d) Finally, the model converged to a stable clustering solution which separated samples from different classes with some confusion around decision boundaries. + +Success vs. failure cases Investigating both success and failure cases would offer extra insights into our method. We studied three cases for each one of 5 categories from STL-10: (1) Success cases: samples are correctly assigned to a target class, (2) False negative failure cases: samples of a target class are mis-assigned to other classes with high probability and (3) False positive failure cases: in terms of a target class, samples of other classes are wrongly assigned to it with high probability. As shown in Fig. 5, PICA can group together images of the same class with unconstrained variations. It also made mistakes in distinguishing the samples with high similarity in foreground or background. An explanation is that at the absence of ground-truth labels, the positive cluster pairs constructed by PICA are purely based on visual transformations without any information on either visual discrepancy within classes or affinity across classes. How to distinguish fine-grained classes remains unsolved, particularly for unsupervised learning and clustering. + +# 5. Conclusion + +We proposed a novel deep semantic clustering method, *Partition Confidence mAxiimisation* (PICA). Specifically, we introduced a novel idea of learning the most promising and semantically plausible clustering solution from the partition confidence perspective, and formulated an elegant objective loss function based on a partition uncertainty index. This extends the idea of maximal margin clustering used in previous shallow models to the stronger deep learning paradigm with significant loss function formulation. PICA can be introduced in standard deep network models and end-to-end trainable without bells and whistles. Extensive experiments on six challenging datasets demonstrated the performance superiority of the proposed PICA method over a wide range of the state-of-the-art deep clustering methods. + +# Acknowledgements + +This work was supported by the China Scholarship Council, Vision Semantics Limited, the Alan Turing Institute Turing Fellowship, and the Innovate UK Industrial Challenge Project on Developing and Commercialising Intelligent Video Analytics Solutions for Public Safety (98111-571149) + +# References + +[1] Radhakrishna Achanta and Sabine Susstrunk. Superpixels and polygons using simple non-iterative clustering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4651–4660, 2017. 1 +[2] Yoshua Bengio, Pascal Lamblin, Dan Popovici, and Hugo Larochelle. Greedy layer-wise training of deep networks. In Proceedings of the Conference on Neural Information Processing Systems (NeurIPS), pages 153-160, 2007. 2, 3, 6, 7 +[3] Paul S Bradley and Usama M Fayyad. Refining initial points for k-means clustering. In Proceedings of the International Conference on machine learning (ICML), volume 98, pages 91-99. CiteSeer, 1998. 7 +[4] Deng Cai, Xiaofei He, Xuanhui Wang, Hujun Bao, and Jiawei Han. Locality preserving nonnegative matrix factorization. 2009. 6 +[5] Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze. Deep clustering for unsupervised learning of visual features. In Proceedings of the European Conference on Computer Vision (ECCV), pages 1-18, 2018. 1 +[6] Jianlong Chang, Yiwen Guo, Lingfeng Wang, Gaofeng Meng, Shiming Xiang, and Chunhong Pan. Deep discriminative clustering analysis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1-11, 2019. 1, 2, 6 +[7] Jianlong Chang, Lingfeng Wang, Gaofeng Meng, Shiming Xiang, and Chunhong Pan. Deep adaptive image clustering. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 5879-5887, 2017. 1, 2, 5, 6 +[8] Adam Coates, Andrew Ng, and Honglak Lee. An analysis of single-layer networks in unsupervised feature learning. In Proceedings of the International Conference on Artificial Intelligence and Statistics (AIStats), pages 215-223, 2011. 2, 5 +[9] Corinna Cortes and Vladimir Vapnik. Support-vector networks. Machine learning, 20(3):273-297, 1995. 2 +[10] Ehsan Elhamifar and Rene Vidal. Sparse subspace clustering: Algorithm, theory, and applications. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 35(11):2765-2781, 2013. 3 +[11] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the thirteenth international conference on artificial intelligence and statistics, pages 249-256, 2010. 7 +[12] Ian Goodfellow, *Yoshua Bengio*, and Aaron Courville. *Deep learning*. MIT press, 2016. 1 +[13] K Chidananda Gowda and G Krishna. Agglomerative clustering using the concept of mutual nearest neighbourhood. Pattern Recognition (PR), 10(2):105-112, 1978. 3 +[14] K Chidananda Gowda and G Krishna. Agglomerative clustering using the concept of mutual nearest neighbourhood. Pattern Recognition (PR), 10(2):105-112, 1978. 6 +[15] Xifeng Guo, Long Gao, Xinwang Liu, and Jianping Yin. Improved deep embedded clustering with local structure preservation. pages 1753-1759, 2017. 2 + +[16] Philip Haeusser, Johannes Plapp, Vladimir Golkov, Elie Aljalbout, and Daniel Cremers. Associative deep clustering: Training a classification network with no labels. In Proceedings of the German Conference on Pattern Recognition (GCPR), pages 18-32. Springer, 2018. 1, 2, 3, 6 +[17] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 1026-1034, 2015. 7 +[18] Dan Hendrycks, Mantas Mazeika, Duncan Wilson, and Kevin Gimpel. Using trusted data to train deep networks on labels corrupted by severe noise. In Proceedings of the Conference on Neural Information Processing Systems (NeurIPS), pages 10456-10465, 2018. 1 +[19] John R Hershey, Zhuo Chen, Jonathan Le Roux, and Shinji Watanabe. Deep clustering: Discriminative embeddings for segmentation and separation. In 2016 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 31-35. IEEE, 2016. 1 +[20] Robert V Hogg, Joseph McKean, and Allen T Craig. Introduction to mathematical statistics. Pearson Education, 2005. 4 +[21] Jiabo Huang, Qi Dong, Shaogang Gong, and Xiatian Zhu. Unsupervised deep learning by neighbourhood discovery. In Proceedings of the International Conference on machine learning (ICML), 2019. 1 +[22] Jiabo Huang, Qi Dong, Shaogang Gong, and Xiatian Zhu. Unsupervised deep learning via affinity diffusion. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), 2020. 1 +[23] Pan Ji, Tong Zhang, Hongdong Li, Mathieu Salzmann, and Ian Reid. Deep subspace clustering networks. In Proceedings of the Conference on Neural Information Processing Systems (NeurIPS), pages 24-33, 2017. 1, 2, 3 +[24] Xu Ji, João F Henriques, and Andrea Vedaldi. Invariant information distillation for unsupervised image segmentation and clustering. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 1-10, 2019. 1, 3, 5, 6 +[25] Armand Joulin, Francis Bach, and Jean Ponce. Discriminative clustering for image co-segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1943-1950. IEEE, 2010. 1 +[26] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.5 +[27] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. 6 +[28] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Cite-seer, 2009. 2, 5 +[29] Ya Le and Xuan Yang. Tiny imagenet visual recognition challenge. CS 231N, 2015. 2, 5 +[30] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. nature, 521(7553):436, 2015. 1 + +[31] Zichuan Liu, Guosheng Lin, Sheng Yang, Jiashi Feng, Weisi Lin, and Wang Ling Goh. Learning markov clustering networks for scene text detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1-11. IEEE, 2018. 1 +[32] Stuart Lloyd. Least squares quantization in lcm. IEEE transactions on information theory, 28(2):129-137, 1982. 1, 2, 3 +[33] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 9(Nov):2579-2605, 2008. 7 +[34] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in PyTorch. In NIPS Autodiff Workshop, 2017. 7 +[35] Xi Peng, Jiashi Feng, Jiwen Lu, Wei-Yun Yau, and Zhang Yi. Cascade subspace clustering. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), 2017. 2, 3 +[36] Xi Peng, Shijie Xiao, Jiashi Feng, Wei-Yun Yau, and Zhang Yi. Deep subspace clustering with sparsity prior. pages 1925-1931, 2016. 2, 3 +[37] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In Proceedings of the International Conference on Learning Representations (ICLR), 2016. 6 +[38] Lior Rokach and Oded Maimon. Clustering methods. In Data mining and knowledge discovery handbook, pages 321-352. Springer, 2005. 1 +[39] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision (IJCV), 115(3):211-252, 2015. 5 +[40] Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. The journal of machine learning research, 15(1):1929-1958, 2014. 4 +[41] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008, 2017. 4 +[42] Pascal Vincent, Hugo Larochelle, Isabelle Lajoie, Yoshua Bengio, and Pierre-Antoine Manzagol. Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion. Journal of Machine Learning Research (JMLR), 11(Dec):3371-3408, 2010. 3, 6 +[43] Ulrike Von Luxburg. A tutorial on spectral clustering. Statistics and computing, 17(4):395-416, 2007. 1 +[44] Jianlong Wu, Keyu Long, Fei Wang, Chen Qian, Cheng Li, Zhouchen Lin, and Hongbin Zha. Deep comprehensive correlation mining for image clustering. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 1-12, 2019. 1, 2, 5, 6 +[45] Zhirong Wu, Yuanjun Xiong, X Yu Stella, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2 + +[46] Junyuan Xie, Ross Girshick, and Ali Farhadi. Unsupervised deep embedding for clustering analysis. In Proceedings of the International Conference on machine learning (ICML), pages 478-487, 2016. 2, 6 +[47] Linli Xu, James Neufeld, Bryce Larson, and Dale Schuurmans. Maximum margin clustering. In Proceedings of the Conference on Neural Information Processing Systems (NeurIPS), pages 1537-1544, 2005. 2 +[48] Rui Xu and Donald C Wunsch. Survey of clustering algorithms. 2005. 3 +[49] Bo Yang, Xiao Fu, Nicholas D Sidiropoulos, and Mingyi Hong. Towards k-means-friendly spaces: Simultaneous deep learning and clustering. In Proceedings of the International Conference on machine learning (ICML), pages 3861-3870. JMLR.org, 2017. 2 +[50] Jianwei Yang, Devi Parikh, and Dhruv Batra. Joint unsupervised learning of deep representations and image clusters. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5147-5156, 2016. 1, 2, 6 +[51] Matthew D Zeiler, Dilip Krishnan, Graham W Taylor, and Rob Fergus. Deconvolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2528-2535. IEEE, 2010. 6 +[52] Lihi Zelnik-Manor and Pietro Perona. Self-tuning spectral clustering. In Proceedings of the Conference on Neural Information Processing Systems (NeurIPS), pages 1601-1608, 2005. 6 \ No newline at end of file diff --git a/deepsemanticclusteringbypartitionconfidencemaximisation/images.zip b/deepsemanticclusteringbypartitionconfidencemaximisation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b1b2e07963dec88d27c9f674900a78c3f6fb5f47 --- /dev/null +++ b/deepsemanticclusteringbypartitionconfidencemaximisation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23fd6a63c1c49db3af5d06c181db114e3b788c06ac0f6bb02dd0e0cffab66e15 +size 632235 diff --git a/deepsemanticclusteringbypartitionconfidencemaximisation/layout.json b/deepsemanticclusteringbypartitionconfidencemaximisation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..b4eac8a41f0bbf730568cf12d8b6a845f7510c54 --- /dev/null +++ b/deepsemanticclusteringbypartitionconfidencemaximisation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f754cf9915c7d1e809fd4697903efce814e9257b1a446797689960d56c627eba +size 397042 diff --git a/deepshutterunrollingnetwork/67cbd21b-4797-4810-82c4-8676e1709ecf_content_list.json b/deepshutterunrollingnetwork/67cbd21b-4797-4810-82c4-8676e1709ecf_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a5cade61f1599a6fa60e267145046856dc568451 --- /dev/null +++ b/deepshutterunrollingnetwork/67cbd21b-4797-4810-82c4-8676e1709ecf_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33d3cd471e158b85d17b19a32b1046c74aa9e557ec4eb96a503ecd47b41a73d9 +size 70440 diff --git a/deepshutterunrollingnetwork/67cbd21b-4797-4810-82c4-8676e1709ecf_model.json b/deepshutterunrollingnetwork/67cbd21b-4797-4810-82c4-8676e1709ecf_model.json new file mode 100644 index 0000000000000000000000000000000000000000..582c3f268212dccffba228d42b6fb4c540e980d4 --- /dev/null +++ b/deepshutterunrollingnetwork/67cbd21b-4797-4810-82c4-8676e1709ecf_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a48debff3b2a6ac901cd94efe17b212233c7d9d831d9fc42f52db1af9ada8ece +size 83661 diff --git a/deepshutterunrollingnetwork/67cbd21b-4797-4810-82c4-8676e1709ecf_origin.pdf b/deepshutterunrollingnetwork/67cbd21b-4797-4810-82c4-8676e1709ecf_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2c08465d02da2981f39110ba4c1695ea2e63ad5f --- /dev/null +++ b/deepshutterunrollingnetwork/67cbd21b-4797-4810-82c4-8676e1709ecf_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d261a55e019c877426d246b738bd0ea89f40ece21e8ba81f265632578443652b +size 1937322 diff --git a/deepshutterunrollingnetwork/full.md b/deepshutterunrollingnetwork/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f1fb82882f41a9905b6124b1bb4c04ad8d524687 --- /dev/null +++ b/deepshutterunrollingnetwork/full.md @@ -0,0 +1,286 @@ +# Deep Shutter Unrolling Network + +Peidong Liu1 Zhaopeng Cui1 Viktor Larsson1 Marc Pollefeys1,2 + +1Computer Vision and Geometry Group, ETH Zürich, Switzerland +2Microsoft Artificial Intelligence and Mixed Reality Lab, Zürich, Switzerland + +{peidong.liu, zhaopeng.cui, vlarsson, marc.pollefeys}@inf.ethz.ch + +mapoll@microsoft.com + +# Abstract + +We present a novel network for rolling shutter effect correction. Our network takes two consecutive rolling shutter images and estimates the corresponding global shutter image of the latest frame. The dense displacement field from a rolling shutter image to its corresponding global shutter image is estimated via a motion estimation network. The learned feature representation of a rolling shutter image is then warped, via the displacement field, to its global shutter representation by a differentiable forward warping block. An image decoder recovers the global shutter image based on the warped feature representation. Our network can be trained end-to-end and only requires the global shutter image for supervision. Since there is no public dataset available, we also propose two large datasets: the Carla-RS dataset and the Fastec-RS dataset. Experimental results demonstrate that our network outperforms the state-of-the-art methods. We make both our code and datasets available at https://github.com/ethliup/DeepUnrollNet. + +# 1. Introduction + +CMOS imaging sensors are widely used in many consumer products. Most CMOS sensors capture images with a rolling shutter mechanism. In contrast to a global shutter camera, which captures all pixels at the same time, a rolling shutter camera sequentially captures the image pixels row by row. Therefore, different types of distortions, e.g. skew, smear or wobble, will appear if the camera is moving during the image capture. It is well known that many vision tasks (e.g. structure from motion, visual odometry, pose estimation or depth prediction) suffer from rolling shutter distortions [1, 11, 15, 16, 26, 27]. The rolling shutter effect correction problem has thus received considerable attention in the past [24, 30, 32]. + +Existing works on rolling shutter effect correction can be categorized into classical approaches and single image based deep learning approaches. The classical approaches + +![](images/247758c9ed2acb115b24f252c55041308b5dfb2a1801761b225808f0e600ca0f.jpg) + +![](images/4144fbbed6a1df98e5203189069b803f2430b1585d36813e45b4df72fc82cf91.jpg) +Figure 1: Deep shutter unrolling network. Top left: Ground truth global shutter image. Top right: Input rolling shutter image. Bottom left: Predicted global shutter image by our network. Bottom right: Absolute difference between our predicted image and the ground truth global shutter image. + +![](images/36be255b081feaa94d264bb09392befd903d56dabec898f02a0888a9efbbeb2e.jpg) + +can be further categorized into single image based methods and methods which use multiple images. Single image based rolling shutter effect correction is an ill-posed problem and relies heavily on prior assumptions (e.g. straight lines must remain straight), either formulated explicitly or learned implicitly by a deep network, which limit their applicability to real scenarios. Classical multi-image based approaches are more general and instead rely on geometric constraints from multiple views to perform the rectification. However, they usually formulate it as a computationally expensive optimization problem for 6 DoF camera motions, which prevents the algorithm from being used in time constrained applications. + +Inspired by the recent success of deep neural networks on image-to-image translation problems, such as optical flow estimation [29], dense depth prediction [6], motion deblurring [21] and image super-resolution [19], we propose + +an efficient end-to-end deep neural network for rolling shutter effect correction. Our method solves a generic rectification problem from two consecutive frames. It is able to take advantage of the parallel computational power of a graphic card and runs in near real time. Furthermore, benefiting from the representational power of a deep network, our network is also able to learn good image priors to further boost the quality of the rectified image. Different from the above image-to-image translation problems, in which the estimations usually rely on its local neighborhood pixels of the input image, the rolling shutter effect correction problem is more challenging. A pixel of the rectified image might lie far away from its corresponding pixel of the input rolling shutter image, depending on the types of motion, 3D scene structure as well as its capturing time. To resolve these challenges, we propose a novel network architecture for rolling shutter image correction. + +Our network takes two consecutive rolling shutter images as input and predicts the corresponding global shutter image of the latest frame. It consists of four main parts: an image encoder, a motion estimator, a differentiable forward warping block and an image decoder. The motion estimator estimates the dense per-pixel displacement field from a rolling shutter image to its corresponding global shutter image, given the learned feature representation from the image encoder. The differentiable forward warping block warps the learned feature representation to its corresponding global shutter representation, given the estimated displacement field. The global shutter image is then recovered by the image decoder from the warped feature representation. Our network can be trained end-to-end and only requires the ground truth global shutter image for supervision, which is easy to obtain by using a high-speed camera to synthesize the training data. Experimental results demonstrate that our method outperforms the state-of-the-art methods [31, 32]. Fig. 1 presents qualitative results from our network. + +Since there is no public dataset available, we also propose two novel datasets: the Fastec-RS dataset and the Carla-RS dataset, as our second contribution. The Fastec-RS dataset has 2584 image pairs. It is generated via a professional high-speed camera (with a framerate of 2400 FPS) and captured in real environments. Since the camera is mounted on a ground vehicle which undergoes limited motion, we also create the Carla-RS dataset with general six degree of freedom (DoF) motions. This dataset is generated from a virtual 3D environment and has 2500 image pairs. To further research in this area we make both our code and the datasets public. + +# 2. Related Work + +We categorize the related work into classical approaches and deep learning based approaches. The classical ap + +proaches can be further classified into single image based and multiple image based approaches. + +Classical single image based approaches: Rengarajan et al. [25] proposes to take advantage of the "straight lines must remain straight" assumption to rectify a single rolling shutter image. The camera motion is assumed to be purely rotational. Curves are extracted and the motion is iteratively estimated by enforcing the transformed curves to be straight. Purkait et al. [23] assumes the 3D scene captured by the camera obeys Manhattan world assumption [4]. The distortion is corrected by jointly aligning the vanishing directions. Lao and Ait-Aider [17] propose a minimal solver to estimate the camera motion based on four straight lines from a single image. The motion is parameterized by pure rotations. The RANSAC algorithm [7] is used to remove outliers such that the camera motion can be estimated robustly. The rolling shutter effects can then be removed given the estimated motion. + +Classical multiple image based approaches: Liang et al. [18] estimates per-pixel motion vector to rectify a rolling shutter image. Block matching is used to find correspondences between two consecutive frames, such that the motion can be estimated. Forssén and Ringaby [8] assumes the camera has either pure rotation or in-plane translational motion. The camera motion is estimated by minimizing the re-projection errors between sparse corresponding points. A KLT tracker [20] is used to establish the sparse correspondences. Karpenko et al. [14] extends the work of [8] by using inertial measurements. They model the camera motion by pure rotations. The rolling shutter effect is removed by solving an optimization problem, which jointly stabilizes the video and calibrates the gyroscope. Baker et al. [2] estimates the per-pixel motion vector from a video sequence to correct the rolling shutter distortion. The motion is estimated via a constant affine or translational distortion model, and is estimated in up to 30 row blocks. Grundmann et al. [10] relaxes the constraints that a calibrated camera is required for rolling shutter effect removal. They model the motion between two neighbouring frames as a mixture of homography matrices. The mixture of homographies is estimated by minimizing the re-projection errors of corresponding points. Zhuang et al. [31] proposes to solve a dense SfM problem given two consecutive rolling shutter images. They estimate both the camera motion and dense depth map from dense correspondences. A minimal solver is proposed to estimate the camera motion. Both the depth map and motion are further estimated/refined by minimizing the re-projection errors. Vasu et al. [30] propose to solve occlusion aware rolling shutter correction problem using multiple consecutive frames. They model the 3D geometry as a layer of planar scenes. The depth, camera motion, latent layer mask and latent layer intensities are jointly estimated. The global shutter image is recovered by the pro + +![](images/56dc9fd7dd32f3ecbfd893e73b9b919e57a8d7f7d294f8c5e70fb2f2a37fc549.jpg) +Global shutter + +![](images/d5388d4fd08de2654943a02dfa745520dc7634bfd9647edee5fa1c8ea33168c0.jpg) +Rolling shutter +Figure 2: Image formation models. The difference between a rolling shutter camera and a global shutter camera is that the rows of a rolling shutter image are captured at different timestamps with a constant time offset $t_d$ . For simplicity, we assume the exposure time $t_e$ is infinitesimal throughout the paper. + +posed image formation model given all above estimations. + +Deep learning based approaches: Rengarajan et al. [24] propose to estimate the camera motion from a single rolling shutter image by using a deep network. They assume a simple affine motion model. The global shutter image is then recovered given the estimated motion. They train the network with synthetic data, which is generated by using the proposed motion model. Zhuang et al. [32] extends [24] for depth aware rolling shutter effect correction from a single image. Two independent networks are used to predict the dense depth map and camera motion respectively. The global shutter image is then recovered as a post-processing step, given the estimated dense depth map and camera motion. + +# 3. Method + +The main concept of our method is to learn a dense per-pixel displacement field, which is used to warp the learned features from the rolling shutter image to its global shutter counterpart. The global shutter image is then recovered by an image decoder which decodes the warped features to an image. Our network can be trained end-to-end and only requires the global shutter image for supervision. Fig. 3 presents the details of our network architecture. + +Rolling shutter image formation model: The difference between a rolling shutter camera and a global shutter camera is that every scanline of the rolling shutter camera is exposed at different timestamps, as shown in Fig. 2. Without loss of generality, we assume the read-out direction is from top to bottom. We further assume all pixels from the same row are captured at the same timestamp. We can thus obtain the image formation model of a rolling shutter image as follows: + +$$ +\left[ \mathbf {I} ^ {r} (\mathbf {x}) \right] _ {i} = \left[ \mathbf {I} _ {i} ^ {g} (\mathbf {x}) \right] _ {i}, \tag {1} +$$ + +where $\mathbf{I}_i^g (\mathbf{x})$ is the virtual global shutter image captured at timestamp $i\cdot t_d$ , $t_d$ is the time to read out a single row, + +$[\mathbf{I}_i^g (\mathbf{x})]_i$ is an operator to extract the $i^{th}$ row from an image $\mathbf{I}_i^g (\mathbf{x})$ + +As the whole image readout time (i.e., $N t_{d}$ where $N$ is the height of the image) is typically small (<50 ms), we can assume that during the time of capture the image content is primarily affected by image motion and not by other changes like object appearance or illumination. We can thus model the virtual global shutter image $\mathbf{I}_i^g (\mathbf{x})$ as the result of the first virtual global shutter image $\mathbf{I}_0^g (\mathbf{x})$ warped by a displacement vector $\mathbf{u}_{i\rightarrow 0}$ : + +$$ +\mathbf {I} _ {i} ^ {g} (\mathbf {x}) = \mathbf {I} _ {0} ^ {g} (\mathbf {x} + \mathbf {u} _ {i \rightarrow 0}), \tag {2} +$$ + +where $\mathbf{u}_{i\rightarrow 0}\in \mathbb{R}^2$ denotes the displacement vector of pixel $\mathbf{x}$ from the $i^{th}$ virtual global shutter image $\mathbf{I}_i^g$ to the reference image $\mathbf{I}_0^g$ , which corresponds to the virtual global shutter image captured at timestamp 0. Thus, we can reformulate Eq. (1) to + +$$ +\left[ \mathbf {I} ^ {r} (\mathbf {x}) \right] _ {i} = \left[ \mathbf {I} _ {0} ^ {g} \left(\mathbf {x} + \mathbf {u} _ {i \rightarrow 0}\right)\right] _ {i}. \tag {3} +$$ + +We can further have + +$$ +\mathbf {I} ^ {r} (\mathbf {x}) = \mathbf {I} _ {0} ^ {g} (\mathbf {x} + \mathbf {u} _ {r \rightarrow g}), \tag {4} +$$ + +where $\mathbf{u}_{r\to g}\in \mathbb{R}^2$ denotes the displacement vector of pixel $\mathbf{x}$ from the rolling shutter image to the first virtual global shutter image. If we stack $\mathbf{u}_{r\to g}$ for all pixels, it has following form + +$$ +[ \mathbf {U} _ {r \rightarrow g} ] _ {i} = [ \mathbf {U} _ {i \rightarrow 0} ] _ {i}, \tag {5} +$$ + +where both $\mathbf{U}_{r\rightarrow g}$ and $\mathbf{U}_{i\rightarrow 0}$ are the dense displacement field for all pixels, in matrix form. + +As a special case, if the rolling shutter camera is stationary during image capture, the displacement field $\mathbf{U}_{r\to g}$ is zero. The captured rolling shutter image equals to the global shutter image. + +Rolling shutter effect removal: Rolling shutter effect removal is an operation to reverse the above image formation model, i.e., Eq. (4). In particular, it is to estimate the global shutter image $\mathbf{I}_0^g (\mathbf{x})$ given the captured rolling shutter image $\mathbf{I}^r (\mathbf{x})$ . It is an ill-posed problem for single image rolling shutter effect removal, since the displacement field $\mathbf{U}_{r\rightarrow g}$ is difficult to recover from a single image. Existing works typically take advantage of prior assumptions (e.g. straight lines should remain straight) to estimate the displacement field [25,32]. The prior assumption can be either explicitly formulated [25] or implicitly learned by a deep network [32]. Thus, single image rolling shutter correction methods cannot generalize to scenarios where the prior assumption is not satisfied. Therefore, we propose to use two frames to solve a more general rectification problem. + +To recover $\mathbf{I}_0^g$ from $\mathbf{I}^r$ , it is more convenient to have displacement field $\mathbf{U}_{g\to r}$ instead of $\mathbf{U}_{r\to g}$ . The global shutter image can then be simply recovered by + +$$ +\mathbf {I} _ {0} ^ {g} (\mathbf {x}) = \mathbf {I} ^ {r} (\mathbf {x} + \mathbf {u} _ {g \rightarrow r}), \tag {6} +$$ + +![](images/a1be27faa6a7e0b4a690862a40898955b6cd38680828ae0e93f38a4a3c148c16.jpg) +Figure 3: Deep shutter unrolling network. Our network takes two consecutive rolling shutter images as input and predicts a global shutter image. It consists of four main parts: an image encoder network, a motion estimation network, a differentiable forward warping block and an image decoder network. The motion estimation network estimates the dense pixel-wise velocity field from the rolling shutter image to the global shutter image. The displacement field is recovered by multiplying the velocity field with the respective time offset of each pixel to that of the estimated global shutter image (i.e., $\mathbf{T}_0$ , $\mathbf{T}_1$ and $\mathbf{T}_2$ ). The forward warping block warps the learned feature representation of the current rolling shutter image to its global shutter representation, given the estimated displacement field. The image decoder network then transforms the warped feature representation to a global shutter image. The dashed arrow represents the corresponding feature representation from the current input image $\mathbf{I}_{cur}^r$ . + +where bilinear interpolation can be used for pixels which have non-integer positions. However, we are only given rolling shutter images as input. It is more difficult for us to estimate $\mathbf{U}_{g\rightarrow r}$ compared to $\mathbf{U}_{r\rightarrow g}$ . Thus, we design a motion estimation network to estimate $\mathbf{U}_{r\rightarrow g}$ for rolling shutter image rectification. It is not trivial to recover the global shutter image given the displacement field $\mathbf{U}_{r\rightarrow g}$ and the rolling shutter image, since we cannot find the pixel correspondences from the global shutter image to the rolling shutter image. Thus, we propose to employ a forward warping block [8] to resolve this challenge. We derive and implement the derivatives of the forward warping block, to make it differentiable such that we can incorporate it into our deep network for end-to-end training. For compactness, we denote $\mathbf{I}_0^g$ as $\mathbf{I}^g$ for future sections. + +Differentiable forward warping block: As shown in Fig. 4, we can approximate the intensity of a particular pixel from the global shutter image, as a weighted average of its neighboring pixel intensities from the rolling shutter image, which was previously used in [8]. Formally, this can be defined as + +$$ +\mathbf {I} ^ {g} (\mathbf {x}) = \frac {\sum_ {\hat {\mathbf {x}} \in \Omega (\mathbf {x})} \omega_ {\hat {\mathbf {x}}} \mathbf {I} ^ {r} (\hat {\mathbf {x}})}{\sum_ {\hat {\mathbf {x}} \in \Omega (\mathbf {x})} \omega_ {\hat {\mathbf {x}}}}, \tag {7} +$$ + +where $\Omega (\mathbf{x})$ is the set of all pixels $\hat{\mathbf{x}}$ from the rolling shutter image, which satisfy + +$$ +\left\| \hat {\mathbf {x}} + \mathbf {u} _ {r \rightarrow g} - \mathbf {x} \right\| _ {2} < r, \tag {8} +$$ + +![](images/1975e9b13b11aef105b05229b6c76de5986cdcb8f2aee532f56de4580a353a97.jpg) +Figure 4: Differentiable forward warping. The rolling shutter image (i.e., green pixels) is warped to the image grid of the global shutter image (i.e., black pixels and the red pixel) by the estimated displacement field $\mathbf{U}_{r\rightarrow g}$ . To recover the intensities of the red pixel, we can compute the weighted average of its four neighboring pixels (i.e., the green pixels covered by the red circle with a radius $r$ ) from the rolling shutter image. + +where $r$ is a pre-defined threshold with unit in pixels. We can further define + +$$ +\omega_ {\hat {\mathbf {x}}} = e ^ {- \frac {d (\mathbf {x} , \hat {\mathbf {x}}) ^ {2}}{2 \sigma^ {2}}}, \tag {9} +$$ + +where + +$$ +d (\mathbf {x}, \hat {\mathbf {x}}) = \| \hat {\mathbf {x}} + \mathbf {u} _ {r \rightarrow g} - \mathbf {x} \| _ {2}, \tag {10} +$$ + +and $\sigma$ is a pre-defined width of the kernel function. We derive all the derivatives (i.e., $\frac{\partial\mathbf{I}^g(\mathbf{x})}{\partial\mathbf{I}^r(\mathbf{x})}$ and $\frac{\partial\mathbf{I}^g(\mathbf{x})}{\partial\mathbf{u}_{r\rightarrow g}}$ ) that are required for gradient back-propagation, which is necessary for network training. Both the forward and backward pass can be implemented efficiently by parallelizing the compu + +tations on a graphic card. The derivations and implementation details can be found in our supplementary material. + +Network architecture: In this section, we explain how to design a deep network to estimate $\mathbf{U}_{r\rightarrow g}$ and recover the global shutter image. Everything presented in the previous sections can be directly generalized from pixels to learned feature representations. Fig. 3 presents the architecture of our network. + +Our network accepts two consecutive rolling shutter images and outputs a global shutter image corresponding to the latest frame. It consists of four main parts, i.e., an encoder network, a motion estimation network, a differentiable forward warping block and an image decoder network. The encoder network consists of three pyramid levels. Each level has a convolutional layer followed by three residual blocks. To recover the latent global shutter image, it would be easier for the image decoder network to operate on the feature representation which corresponds to the global shutter image. We therefore use the differentiable forward warping block to transform the learned feature representation of the latest rolling shutter image to its global shutter counterpart. The displacement field $\mathbf{U}_{r\to g}$ used by the forward warping block is estimated by the motion estimation network. + +Besides the camera motion and 3D scene geometry, $\mathbf{U}_{r\rightarrow g}$ also depends on the time when a particular pixel is being captured, i.e., the displacement vector of a pixel nearer to the first row is usually smaller than those are further away. During our ablation study, we find that the motion estimation network has difficulty to learn/model this implicitly. We thus model this dependency explicitly and design the network to learn the dense velocity field instead, as shown in Fig. 3. Our motion estimation network computes the cost volumes between both frames by a correlation layer [12], based on the learned feature representation. The velocity field is then estimated by a dense network block, given the computed cost volumes as input. To recover the displacement field $\mathbf{U}_{r\rightarrow g}$ , we multiply the estimated velocity field with the time offset (i.e., $\mathbf{T}_0$ , $\mathbf{T}_1$ and $\mathbf{T}_2$ as shown in Fig. 3) between the captured pixel and that of the first row. $\mathbf{T}_0$ , $\mathbf{T}_1$ and $\mathbf{T}_2$ represent the time-offset for different pyramid levels and they have the same resolutions as the feature representations of the corresponding pyramid levels. Without calibrating the camera, we simply set the row read-out time (i.e., $t_d$ as shown in Fig. 2) as 1 for simplicity. The image decoder then predicts the global shutter image given the warped feature representation. The decoder network also consists of three pyramid levels. Each level has three residual blocks followed by a deconvolution layer. The details of the network architecture can be found in our supplementary material. + +Loss functions: To train our network, only the corresponding ground truth global shutter image $\mathbf{I}_{gt}^{g}$ is required. Empirically, we find a linear combination of the pixel-wise + +$\mathcal{L}_1$ loss, the perceptual loss $\mathcal{L}_p$ [13] and a total variation loss $\mathcal{L}_{tv}$ to encourage piecewise smoothness in the estimated displacement field $\mathbf{U}_{r\rightarrow g}$ , can give satisfactory performance. If the perceptual loss is omitted, the estimated image tends to be blurry. In summary, our loss function can be formulated as + +$$ +\mathcal {L} = \mathcal {L} _ {p} \left(\mathbf {I} ^ {g}, \mathbf {I} _ {g t} ^ {g}\right) + \lambda_ {1} \mathcal {L} _ {1} \left(\mathbf {I} ^ {g}, \mathbf {I} _ {g t} ^ {g}\right) + \lambda_ {2} \mathcal {L} _ {t v} \left(\mathbf {U} _ {r \rightarrow g}\right), \tag {11} +$$ + +where both $\lambda_{1}$ and $\lambda_{2}$ are hyper-parameters and determined empirically, $\mathbf{I}^{g}$ is the estimated global shutter image and $\mathbf{I}_{gt}^{g}$ is the ground truth global shutter image. + +# 4. Datasets + +Both Rengarajan et al. [24] and Zhuang et al. [32] propose individual datasets to train their networks respectively. However, their datasets are not released to the community. Furthermore, both datasets simplify the real formation process of a rolling shutter image. For example, Rengarajan et al. [24] generate the synthetic image by applying simple affine image warping and does not consider the 3D geometry. Zhuang et al. [32] do consider the effect of the 3D geometry. They warp a single global shutter image from the KITTI dataset [9] to generate a synthetic rolling shutter image, given the corresponding dense depth map and camera motion. The dense depth map is estimated from a stereo camera by a depth prediction network [3]. The 6 DoF camera motion is randomly sampled from a pre-defined interval. However, it still simplifies the real image formation process, e.g. their dataset does not model occlusions, which are common in real-world scenarios. Furthermore, the estimated dense depth map is not the true 3D scene geometry either. + +Thus, we propose two datasets: the Carla-RS dataset and the Fastec-RS dataset. Our datasets are synthesized via high speed cameras and simulate the real image formation process. The Carla-RS dataset is generated from a virtual 3D environment provided by the Carla simulator [5]. Carla simulator is an open-source platform for autonomous driving research and it provides seven photorealistic 3D virtual towns. We implement a rolling shutter camera model since the original simulator does not support it. We also relax the constraint that the camera is mounted on a ground vehicle, such that we can freely move our rolling shutter camera in six DoF. 250 sequences are randomly sampled and each sequence has 10 consecutive frames. Both a constant translational velocity model and a constant angular rate model are used for the sequence generation, which is typically hold in real scenarios due to the short time interval (i.e., $< 50\mathrm{ms}$ ) between two consecutive frames. In total, we generate 2500 rolling shutter images at a resolution of $640\times 448$ pixels. + +Since the Carla-RS dataset is generated from a virtual environment, we also propose another dataset, the Fastec-RS + +dataset which is created using real images in the wild. The Fastec-RS dataset is synthesized using a professional Fastec TS51 high speed global shutter camera with a framerate of 2400 FPS. We mount the camera on a ground vehicle and collect 76 image sequences at a resolution of $640 \times 480$ pixels in mainly urban environment. Each sequence synthesizes 34 rolling shutter images. In total, we have 2584 image pairs. The rolling shutter image is synthesized by sequentially copying a row of pixels from the captured global shutter images. + +# 5. Experimental Evaluation + +Datasets: We evaluate our algorithm with both the Carla-RS dataset and Fastec-RS dataset. We split the Carla-RS dataset into training data and test data. The training data has 210 sequences and the test data has 40 sequences. Similarly, we split the Fastec-RS dataset into 56 sequences for training and 20 sequences for test. Both the training data and test data have no overlapping scenes. Since the ground truth occlusion masks can be obtained and are also provided by the Carla-RS dataset, we thus compute two quantitative metrics for better evaluation, i.e., one without using the occlusion mask and the other one using the occlusion mask. For compactness, we denote the Carla-RS dataset with masks, the Carla-RS dataset without masks and the Fastec-RS dataset as CRM, CR and FR respectively for quantitative evaluations. + +Implementation details: We implemented our network in PyTorch [22]. The differentiable forward warping is implemented in CUDA with PyTorch wrappers. The hyperparameters are set empirically to $r = 2$ , $\sigma = 0.5$ , $\lambda_1 = 10$ and $\lambda_2 = 0.1$ unless stated otherwise. For better convergence, we train our network in three pyramid levels. The network is trained in 200 epochs with a learning rate $10^{-4}$ . We use a batch size of 3 and use uniform random crop at a resolution of $320 \times 256$ pixels for data augmentation. + +State-of-the-art methods: We compare our network against two state-of-the-art methods from [31] and [32], which are the two most related works to our approach. The method from [31] is a classical two image based approach and we use the implementation provided by the authors. The method from [32] is a single image based deep learning approach. Since the authors did not release their implementations, we reimplemented their network and trained it on our datasets for fair comparisons. To ensure our implementation is correct, we generated the same dataset as described by [32] and trained our implemented network with it. In our experiments, the test performance is similar to what was reported in [32], in terms of both quantitative and qualitative metrics on their dataset. Since the dataset from [32] is for + +
NetworksPSNR↑ (dB)SSIM↑
CRMCRFRCRFR
Net-autoenc-119.0418.9623.410.600.70
Net-autoenc-221.3921.3326.070.670.75
Net-disp21.2421.1025.740.670.73
Net-vel-self27.3126.8726.770.820.76
Ours27.7827.3027.040.840.77
+ +Table 1: Ablation study on the network architectures and loss function. + +single image based method, we cannot evaluate our algorithm with that dataset. + +Evaluation metrics: We use the peak signal-to-noise ratio (PSNR) and the structural similarity index (SSIM) for quantitative comparisons. Both PSNR and SSIM metrics are commonly used to measure the similarity between images (see e.g. [19, 21]). Larger PSNR/SSIM values indicate better image quality. + +Ablation study on the network architectures: We implemented several baseline networks to justify the design of our network architecture. We remove the motion estimation network and differentiable forward warping block to have a vanilla auto-encoder network. We also modify the image encoder such that it can accept a single rolling shutter image as input. In total, we have two auto-encoder networks for comparison. We denote them with Net-autoenc-1 and Net-autoenc-2 respectively. We also study the performance if we learn the displacement field directly, instead of the velocity field as described in Section 3. It is achieved by setting $\mathbf{T}_0$ , $\mathbf{T}_1$ and $\mathbf{T}_2$ all equal to 1, such that the estimated velocity field equals to the displacement field. We denote the network as Net-disp. + +Table 1 presents the quantitative performances of the networks. It demonstrates that a vanilla auto-encoder network has difficulties to learn a good representation for rolling shutter effect removal. A possible reason is that the rectification problem involves non-local operations, which challenge the representation power of a vanilla auto-encoder network. Besides the dependencies of $\mathbf{U}_{r\rightarrow g}$ on the camera motion and 3D scene geometry, it also depends on the capture time of a particular pixel. We find it challenges the motion estimation network to estimate the displacement field directly. It is well explained by our experimental results, i.e., our network outperforms Net-disp. Furthermore, the experimental results also demonstrate that Net-autoenc-2 network performs better than Net-autoenc-1 network with around 2.37 dB improvement on the Carla-RS dataset and 2.66 dB improvement on the Fastec-RS dataset. It demonstrates that it is more difficult to learn a good representation with a single rolling shutter image compared to multiple images, due to the ill-posed nature of single image based method. + +![](images/0151896094d83be65d8b1690a4a07a2e77b490518d1d211044d6433c9f1acea7.jpg) +Input RS image +Ours +Zhuang et al. [31] +Zhuang et al. [32] + +![](images/4f0b57e0ea039fdf01c2aaa8ad5a4adc2934c5cc2a38a4e35398194fdf7fbb23.jpg) +Figure 5: Qualitative comparisons against state-of-the-art methods on the Carla-RS dataset. Second row: Residual image, which is defined as the absolute difference between the corresponding image and the ground truth global shutter image $\mathbf{I}_{qt}^{g}$ . + +![](images/5bfdbffbae0a53b56b6645d8a5ea3f68f8336208998eece5cc7483600cb98c06.jpg) +Figure 6: Generalization performance on real data. Left: Reconstructed 3D model with input rolling shutter images. Middle: Reconstructed 3D model with predicted global shutter images. Right: Reconstructed 3D model with real global shutter images. + +Ablation study on the loss function: We did an ablation study to justify the loss functions that we used for network training, i.e., Eq. (11). We focus our attention on the explicitly supervision of the dense displacement field estimation. To achieve this, we introduce an additional loss function $\mathcal{L}_d$ + +$$ +\mathcal {L} _ {d} = \left\| \mathbf {I} ^ {r} - \mathcal {W} _ {g \rightarrow r} \circ \mathbf {I} _ {g t} ^ {g} \right\| _ {1}, \tag {12} +$$ + +where $\mathbf{I}^r$ is the latest input rolling shutter image, $\mathbf{I}_{gt}^g$ is the corresponding ground truth global shutter image, $\mathcal{W}_{g\rightarrow r}$ is an operator which warps the global shutter image to its corresponding rolling shutter image and it depends on the estimated dense displacement field $\mathbf{U}_{r\to g}$ . The warping is achieved by bilinear interpolations. The final loss function used to train the network can be formulated as + +$$ +\mathcal {L} _ {f} = \mathcal {L} + \lambda_ {1} \mathcal {L} _ {d}, \tag {13} +$$ + +where $\mathcal{L}$ represents the original loss function as shown in Eq. (11), $\lambda_{1}$ is a hyper-parameter and is empirically selected as 10. We represent the network trained with the loss function $\mathcal{L}_f$ as Net-vel-self. + +We train Net-vel-self with the same parameter configurations as other networks. Experimental results presented in + +Table 1 demonstrate that our network which is trained with only $\mathcal{L}$ performs better than Net-vel-self. The introduction of the self-supervision loss $\mathcal{L}_d$ for the dense displacement field $\mathbf{U}_{r\rightarrow g}$ does not help improve the performance of global shutter image estimation. A possible explanation is that the occlusions between $\mathbf{I}^r$ and $\mathbf{I}_{gt}^g$ , which are used to supervise the learning of $\mathbf{U}_{r\rightarrow g}$ , degrades the prediction of $\mathbf{U}_{r\rightarrow g}$ since we cannot do bi-directional occlusion detection. The forward feature warping for global shutter image recovery would thus be affected by the degraded $\mathbf{U}_{r\rightarrow g}$ and it further affects the final global shutter image prediction. It demonstrates that the loss function $\mathcal{L}$ presented in Eq. (11) is sufficient to implicitly supervise the learning of $\mathbf{U}_{r\rightarrow g}$ . + +Quantitative and qualitative evaluations against baseline methods: We compare our network with two state-of-the-art baseline methods. Both the quantitative and qualitative comparisons are presented in Table 2 and Fig. 5 respectively. The experimental results demonstrate that our method performs better than the other two state-of-the-art approaches. The work from Zhuang et al. [32] is a single image learning based approach. We find that it has limited generalization performance on our test data. The reason is that the scene content of our test data is quite different from + +![](images/914054db7a0438e18b55ea29ec452c0f94cf7c0babccca015aa61b76d7e91eea.jpg) + +![](images/d5441cdc559af5fa795e47c617a09142aa4589652e94bd06d1c463b8ee0c009b.jpg) + +![](images/3c836ceb4b2cc6bbb1fd96ff96ef14425d5d529bb76ba2c67018c97e191f94ff.jpg) + +![](images/0319aba92231e44063bce36edb6d35bbac22139864beadff8d9ca486cd1dc4ed.jpg) +Figure 7: Qualitative comparisons against conventional methods with dataset of [31]. It demonstrates that our network predicts a plausible rectification and also inpaints the occluded regions with the learned image priors. + +![](images/1afd22aa49c7f059372d5c84e0dfa3484b6dad745a8d5e85509a935b107ab97e.jpg) + +![](images/f187fed7597e5a821b37f1f9993438b931c15421766cd261b88442524d6fb2ca.jpg) + +that of our training data. The learned geometric priors from training data do not hold to the test data. In contrast, our network can be generalized well as we solve a generic rectification problem with two input frames. Zhuang et al. [31] is a classical approach with two input frames. We find it can work well if the input images have good textures. However, as shown in Fig. 5, it does not perform well for input frames with poorly textured regions, which results in visually unpleasing global shutter images. In contrast, our network predicts a plausible rectification with better image quality. Furthermore, our network can also take advantage of the learned image priors to fill in the occluded regions, from which the classical approach (i.e., Zhuang et al. [31]) is unable to reconstruct. This is also visible in the quantitative results, shown in Table 2, i.e., the PSNR metrics for Zhuang et al. [31] on Carla-RS dataset are $25.93\mathrm{dB}$ and $22.88\mathrm{dB}$ for the evaluations with occlusion masks and without masks respectively; The difference is $3.05\mathrm{dB}$ , however, ours is only $0.48\mathrm{dB}$ . It demonstrates our method handles occlusion better, since our network is able to inpaint the occluded regions from the learned image priors. Furthermore, our network is also orders of magnitude faster than Zhuang et al. [31]. It takes around 0.43 second to process a VGA resolution image (i.e., $640\times 480$ pixels) with an Nvidia GTX 1080Ti graphic card, while Zhuang et al. [31] takes around 467.26 seconds on an Intel Core i7-7700K CPU. More qualitative results can be found from our supplementary material. + +Generalization performance to real data: To evaluate the generalization performance of our network, we also collect a sequence of real rolling shutter images with a Logitech C210 webcam. The camera is mounted on the side of a ground vehicle which moves forward. For comparison, we also collect global shutter images with the same + +
MethodsPSNR↑ (dB)SSIM↑
CRMCRFRCRFR
Zhuang et al. [31]25.9322.8821.440.770.71
Zhuang et al. [32]18.7018.47N.A.0.58N.A.
Ours27.7827.3027.040.840.77
+ +Table 2: Quantitative comparisons against the state-of-the-art methods. Since the Fastec-RS dataset does not have ground truth depth and motion, we cannot evaluate Zhuang et al. [32] with it. + +camera (i.e., the camera is stationary while capture). The rolling shutter images are then rectified with our pretrained network. We run a SfM pipeline (i.e., COLMAP [28]) to process the rolling shutter images, the rectified rolling shutter images, and the global shutter images respectively. Fig. 6 demonstrates that our pretrained network corrects the distortion and results in a more accurate 3D model as the ground truth model. We also evaluate the generalization performance of our network against conventional methods with the dataset from Zhuang et al. [31]. The results presented in Fig. 7 demonstrate that our network predicts a plausible rectification and also inpaints the occluded regions with the learned image priors. + +# 6. Conclusion + +We propose an efficient end-to-end deep neural network for generic rolling shutter image correction. Our network takes two consecutive frames and estimates the global shutter image corresponding to the latest frame. It is able to take advantage of the representational power of a deep network and outperforms existing state-of-the-art methods. We also present two large datasets, which simulate the real image formation process of a rolling shutter image. + +# References + +[1] Cenek Albl, Zuzana Kukelova, Viktor Larsson, and Tomas Pajdla. Rolling shutter camera absolute pose. In IEEE Trans. on Pattern Analysis and Machine Intelligence (PAMI), 2019. 1 +[2] Simon Baker, Eric Bennett, Sing Bing Kang, and Richard Szeliski. Removing rolling shutter wobble. In CVPR, 2010. 2 +[3] Jia-Ren Chang and Yong-Sheng Chen. Pyramid stereo matching network. In CVPR, 2018. 5 +[4] James M. Coughlan and Alan L Yuille. The manhattan world assumption: Regularities in scene statistics which enable bayesian inference. In Advances in Neural Information Processing Systems (NIPS), 2000. 2 +[5] Alexey Dosovitskiy, German Ros, Felipe Codevilla, Antonio Lopez, and Vladlen Koltun. CARLA: An open urban driving simulator. In Proc. Conf. on Robot Learning (CoRL), 2017. 5 +[6] David Eigen, Christian Puhrsch, and Rob Fergus. Depth map prediction from a single image using a multi-scale deep network. In Advances in Neural Information Processing Systems (NIPS), 2014. 1 +[7] Martin A. Fischler and Robert C. Bolles. Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography. Communications of the ACM, 24:381-395, 1981. 2 +[8] Per Erik Forssen and Erik Ringaby. Rectifying rolling shutter video from hand-held devices. In CVPR, 2010. 2, 4 +[9] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? The KITTI vision benchmark suite. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2012. 5 +[10] Matthias Grundmann, Vivek Kwatra, Daniel Castro, and Irfan Essa. Calibration free rolling shutter removal. In Proc. of the IEEE International Conf. on Computational Photography (ICCP), 2012. 2 +[11] Johan Hedborg, Per-Erik Forssén, Michael Felsberg, and Erik Ringaby. Rolling shutter bundle adjustment. In CVPR, 2012. 1 +[12] Eddy Ilg, Nikolaus Mayer, Tonmoy Saikia, Margret Keuper, Alexey Dosovitskiy, and Thomas Brox. Flownet 2.0: Evolution of optical flow estimation with deep networks. Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2017. 5 +[13] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In Proc. of the European Conf. on Computer Vision (ECCV), 2016. 5 +[14] Alexandre Karpenko, David Jacobs, Jongmin Baek, and Marc Levoy. Digital video stabilization and rolling shutter correction using gyroscopes. In Technical report, Stanford, 2011. 2 +[15] Jae-Hak Kim, Yasir Latif, and Ian Reid. Rrd-slam: Radial-distorted rolling-shutter direct slam. In Proc. IEEE International Conf. on Robotics and Automation (ICRA), 2017. 1 +[16] Bryan Klingner, David Martin, and James Roseborough. Street view motion-from-structure-from-motion. In Proc. of + +the IEEE International Conf. on Computer Vision (ICCV), 2013. 1 +[17] Yizhen Lao and Omar Ait-Aider. A robust method for strong rolling shutter effects correction using lines with automatic feature selection. In CVPR, 2018. 2 +[18] Chia-Kai Liang, Li-Wen Chang, and Homer H. Chen. Analysis and compensation of rolling shutter effect. In Proc. of the IEEE Transactions on Image Processing (ITIP), 2008. 2 +[19] Bee Lim, Sanghyun Son, Heewon Kim, Seungjun Nah, and Young Mu Lee. Enhanced deep residual networks for single image super-resolution. In CVPR Workshops, 2017. 1, 6 +[20] Bruce D. Lucas and Takeo Kanade. An iterative image registration technique with an application to stereo vision. In Proc. of the International Joint Conf. on Artificial Intelligence (IJCAI), 1981. 2 +[21] Seungjun Nah, Tae Hyun Kim, and Kyoung Mu Lee. Deep multi-scale convolutional neural network for dynamic scene deblurring. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2017. 1, 6 +[22] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in PyTorch. In Advances in Neural Information Processing Systems (NIPS), 2017. 6 +[23] Pulak Purkait, Christopher Zach, and Ales Leonardis. Rolling shutter correction in Manhattan world. In ICCV, 2017. 2 +[24] Vijay Rengarajan, Yogesh Balaji, and A.N. Rajagopalan. Unrolling the shutter: Cnn to correct motion distortions. In CVPR, 2017. 1, 3, 5 +[25] Vijay Rengarajan, A.N. Rajagopalan, and R. Aravind. From bows to arrows: rolling shutter rectification of urban scenes. In CVPR, 2016. 2, 3 +[26] Olivier Saurer, Kevin Köser, Jean-Yves Bouguet, and Marc Pollefeys. Rolling shutter stereo. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2013. 1 +[27] Olivier Saurer, Marc Pollefeys, and Gim Hee Lee. Sparse to dense 3d reconstruction from rolling shutter images. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2016. 1 +[28] Johannes Lutz Schonberger and Jan-Michael Frahm. Structure-from-motion revisited. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2016. 8 +[29] Deqing Sun, Xiaodong Yang, Ming-Yu Liu, and Jan Kautz. Pwc-net: Cnns for optical flow using pyramid, warping, and cost volume. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2018. 1 +[30] Subeesh Vasu, Mahesh Mohan, and A.N. Rajagopalan. Occlusion aware rolling shutter rectification of 3d scenes. In CVPR, 2018. 1, 2 +[31] Bingbing Zhuang, Loong Fah Cheong, and Gim Hee Lee. Rolling shutter aware differential sfm and image rectification. In ICCV, 2017. 2, 6, 7, 8 +[32] Bingbing Zhuang, Quoc-Huy Tran, Pan Ji, Loong-Fah Cheong, and Manmohan Chandraker. Learning structure-and-motion-aware rolling shutter correction. In CVPR, 2019. 1, 2, 3, 5, 6, 7, 8 \ No newline at end of file diff --git a/deepshutterunrollingnetwork/images.zip b/deepshutterunrollingnetwork/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..52c24a959ac227f2f683e6c573cbe7df7bc2367a --- /dev/null +++ b/deepshutterunrollingnetwork/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd6d6c7c7d520fe52ef977ef5a7214fbda0ee9d3d395d1761b538279c0070968 +size 577982 diff --git a/deepshutterunrollingnetwork/layout.json b/deepshutterunrollingnetwork/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..93bc27cc9b4ae1f4ca25ba6714aed7fde1a68e24 --- /dev/null +++ b/deepshutterunrollingnetwork/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e42135f4e725379c9df516204022c2f4b5855a89eb9a4c7e099df90adc78e572 +size 352019 diff --git a/deepsnakeforrealtimeinstancesegmentation/df67017e-1439-4d1d-b5c0-caa2a93e1fd3_content_list.json b/deepsnakeforrealtimeinstancesegmentation/df67017e-1439-4d1d-b5c0-caa2a93e1fd3_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..1668fea683acbe211230f7e6b74e9669f2c40359 --- /dev/null +++ b/deepsnakeforrealtimeinstancesegmentation/df67017e-1439-4d1d-b5c0-caa2a93e1fd3_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b130ec4103c9632b2c75cb501df266e365c989bc3604853d205fca8449a673c0 +size 79325 diff --git a/deepsnakeforrealtimeinstancesegmentation/df67017e-1439-4d1d-b5c0-caa2a93e1fd3_model.json b/deepsnakeforrealtimeinstancesegmentation/df67017e-1439-4d1d-b5c0-caa2a93e1fd3_model.json new file mode 100644 index 0000000000000000000000000000000000000000..52414ea43a51570fd3292323bd9f78fafb9c532d --- /dev/null +++ b/deepsnakeforrealtimeinstancesegmentation/df67017e-1439-4d1d-b5c0-caa2a93e1fd3_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba6bea7a8adea4b00971583a223f4a82c55aa720a9e936d536afe3fd2c9b873f +size 93668 diff --git a/deepsnakeforrealtimeinstancesegmentation/df67017e-1439-4d1d-b5c0-caa2a93e1fd3_origin.pdf b/deepsnakeforrealtimeinstancesegmentation/df67017e-1439-4d1d-b5c0-caa2a93e1fd3_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..280cb1319c071061a54b48bdff28fecf95e34160 --- /dev/null +++ b/deepsnakeforrealtimeinstancesegmentation/df67017e-1439-4d1d-b5c0-caa2a93e1fd3_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3fce7d7f684c16edfd201b5d891109ea3306eefb53428dd99177ca03f38028a4 +size 1386386 diff --git a/deepsnakeforrealtimeinstancesegmentation/full.md b/deepsnakeforrealtimeinstancesegmentation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f925bbc8e800e74a4b1e00918601719bea90e36d --- /dev/null +++ b/deepsnakeforrealtimeinstancesegmentation/full.md @@ -0,0 +1,335 @@ +# Deep Snake for Real-Time Instance Segmentation + +Sida Peng1 + +Wen Jiang1 + +Huaijin Pi + +Xiuli Li2 + +Hujun Bao + +Xiaowei Zhou $^{1*}$ + +1Zhejiang University + +$^{2}$ Deepwise AI Lab + +# Abstract + +This paper introduces a novel contour-based approach named deep snake for real-time instance segmentation. Unlike some recent methods that directly regress the coordinates of the object boundary points from an image, deep snake uses a neural network to iteratively deform an initial contour to match the object boundary, which implements the classic idea of snake algorithms with a learning-based approach. For structured feature learning on the contour, we propose to use circular convolution in deep snake, which better exploits the cycle-graph structure of a contour compared against generic graph convolution. Based on deep snake, we develop a two-stage pipeline for instance segmentation: initial contour proposal and contour deformation, which can handle errors in object localization. Experiments show that the proposed approach achieves competitive performances on the Cityscapes, KINS, SBD and COCO datasets while being efficient for real-time applications with a speed of 32.3 fps for $512 \times 512$ images on a 1080Ti GPU. The code is available at https://github.com/zju3dv/snake/. + +# 1. Introduction + +Instance segmentation is the cornerstone of many computer vision tasks, such as video analysis, autonomous driving, and robotic grasping, which require both accuracy and efficiency. Most of the state-of-the-art instance segmentation methods [18, 27, 5, 19] perform pixel-wise segmentation within a bounding box given by an object detector [36], which may be sensitive to the inaccurate bounding box. Moreover, representing an object shape as dense binary pixels generally results in costly post-processing. + +An alternative shape representation is the object contour, which is a set of vertices along the object silhouette. In contrast to pixel-based representation, a contour is not limited within a bounding box and has fewer parameters. Such a contour-based representation has long been used in image segmentation since the seminal work by Kass et al. [21], + +![](images/82ec7bbff7f8726e76b977236dd1540e805782d2e96f7ff9845e858fc3bf6650.jpg) +(a) Initial contour +(b) Feature learning on the contour +(c) Offsets +Figure 1. The basic idea of deep snake. Given an initial contour, image features are extracted at each vertex (a). Since the contour is a cycle graph, circular convolution is applied for feature learning on the contour (b). The blue, yellow and green nodes denote the input features, the kernel of circular convolution, and the output features, respectively. Finally, offsets are regressed at each vertex to deform the contour to match the object boundary (c). + +which is well known as snakes or active contours. Given an initial contour, the snake algorithm iteratively deforms it to match the object boundary by optimizing an energy functional defined with low-level features, such as image intensity or gradient. While many variants [6, 7, 15] have been developed in literature, these methods are prone to local optima as the objective functions are handcrafted and typically nonconvex. + +Some recent learning-based segmentation methods [20, 42, 41] also represent objects as contours and try to directly regress the coordinates of contour vertices from an RGB image. Although such methods are fast, most of them do not perform as well as pixel-based methods. Instead, Ling et al. [25] adopt the deformation pipeline of traditional snake algorithms and train a neural network to evolve an initial contour to match the object boundary. Given a contour with image features, it regards the input contour as a graph and uses a graph convolutional network (GCN) to predict vertex-wise offsets between contour points and the target boundary points. It achieves competitive accuracy compared with pixel-based methods while being much faster. However, the method proposed in [25] is designed to help annotation and lacks a complete pipeline for automatic instance segmentation. Moreover, treating the contour as a general graph with a generic GCN does not fully exploit the special topology of a contour. + +In this paper, we propose a learning-based snake algorithm, named deep snake, for real-time instance segmentation. Inspired by previous methods [21, 25], deep snake takes an initial contour as input and deforms it by regressing vertex-wise offsets. Our innovation is introducing the circular convolution for efficient feature learning on a contour, as illustrated in Figure 1. We observe that the contour is a cycle graph that consists of a sequence of vertices connected in a closed cycle. Since every vertex has the same degree equal to two, we can apply the standard 1D convolution on the vertex features. Considering that the contour is periodic, deep snake introduces the circular convolution, which indicates that an aperiodic function (1D kernel) is convolved in the standard way with a periodic function (features defined on the contour). The kernel of circular convolution encodes not only the feature of each vertex but also the relationship among neighboring vertices. In contrast, the generic GCN performs pooling to aggregate information from neighboring vertices. The kernel function in our circular convolution amounts to a learnable aggregation function, which is more expressive and results in better performance than using a generic GCN, as demonstrated by our experimental results in Section 5.2. + +Based on deep snake, we develop a pipeline for instance segmentation. Given an initial contour, deep snake can iteratively deform it to match the object boundary and obtain the object shape. The remaining question is how to initialize a contour, whose importance has been demonstrated in classic snake algorithms. Inspired by [32, 29, 45], we propose to generate an octagon formed by object extreme points as the initial contour, which generally encloses the object tightly. Specifically, we integrate deep snake with an object detector. The detected bounding box initializes a diamond contour defined by four center points on the edges. Then, deep snake takes the diamond as input and outputs offsets that point from diamond vertices to object extreme points, which are used to construct an octagon following [45]. Finally, deep snake deforms the octagon contour to match the object boundary. + +Our approach exhibits competitive performances on Cityscapes [8], KINS [35], SBD [16] and COCO [24] datasets, while being efficient for real-time instance segmentation, 32.3 fps for $512 \times 512$ images on a GTX 1080ti GPU. The following two facts make learning-based snake fast and accurate. First, our approach can deal with errors in the object localization stage and thus allows a light detector. Second, the contour representation has fewer parameters than the pixel-based representation and does not require costly post-processing, e.g., mask upsampling. + +In summary, this work has the following contributions: + +- We propose a learning-based snake algorithm for real-time instance segmentation and introduce the circular convolution for feature learning on the contour. + +- We propose a two-stage pipeline for instance segmentation: initial contour proposal and contour deformation. Both stages can deal with errors in the initial object localization. + +- We demonstrate state-of-the-art performances of our approach on Cityscapes, KINS, SBD and COCO datasets. For $512 \times 512$ images, our algorithm runs at 32.3 fps, which is efficient for real-time applications. + +# 2. Related work + +Pixel-based methods. Most methods [9, 23, 18, 27] perform instance segmentation on the pixel level within a region proposal, which works particularly well with standard CNNs. A representative instantiation is Mask R-CNN [18]. It first detects objects and then uses a mask predictor to segment instances within the proposed boxes. To better exploit the spatial information inside the box, PANet [27] fuses mask predictions from fully-connected layers and convolutional layers. Such proposal-based approaches achieve state-of-the-art performance. One limitation of these methods is that they cannot resolve errors in localization, such as too small or shifted boxes. In contrast, our approach deforms the detected boxes to the object boundaries, so the spatial extension of object shapes will not be limited. + +There exist some pixel-based methods [2, 31, 28, 12, 43] that are free of region proposals. In these methods, every pixel produces the auxiliary information, and then a clustering algorithm groups pixels into object instances based on their information. The auxiliary information and grouping algorithms could be various. [2] predicts the boundary-aware energy for each pixel and uses the watershed transform algorithm for grouping. [31] differentiates instances by learning instance-level embeddings. [28, 12] consider the input image as a graph and regress pixel affinities, which are then processed by a graph merge algorithm. Since the mask is composed of dense pixels, the post-clustering algorithms tend to be time-consuming. + +Contour-based methods. In these methods, the object shape comprises a sequence of vertices along the object boundary. Traditional snake algorithms [21, 6, 7, 15] first introduced the contour-based representation for image segmentation. They deform an initial contour to the object boundary by optimizing a handcrafted energy with respect to the contour coordinates. To improve the robustness of these methods, [30] proposed to learn the energy function in a data-driven manner. Instead of iteratively optimizing the contour, some recent learning-based methods [20, 42] try to regress the coordinates of contour points from an RGB image, which is much faster. However, their reported accuracy is not on par with state-of-the-art pixel-based methods. + +In the field of semi-automatic annotation, [4, 1, 25] have tried to perform the contour labeling using other networks instead of standard CNNs. [4, 1] predict the contour points sequentially using a recurrent neural network. To avoid sequential inference, [25] follows the pipeline of snake algorithms and uses a graph convolutional network to predict vertex-wise offsets for contour deformation. This strategy significantly improves the annotation speed while being as accurate as pixel-based methods. However, [25] lacks a pipeline for instance segmentation and does not fully exploit the special topology of a contour. Instead of treating the contour as a general graph, deep snake leverages the cycle graph topology and introduces the circular convolution for efficient feature learning on a contour. + +# 3. Proposed approach + +Inspired by [21, 25], we perform object segmentation by deforming an initial contour to match object boundary. Specifically, deep snake takes a contour as input and predicts per-vertex offsets pointing to the object boundary. Features on contour vertices are extracted from the input image with a CNN backbone. To fully exploit the contour topology, we propose the circular convolution for efficient feature learning on the contour, which facilitates deep snake to learn the deformation. Based on deep snake, we also develop a pipeline for instance segmentation. + +# 3.1. Learning-based snake algorithm + +Given an initial contour, traditional snake algorithms treat the coordinates of the vertices as a set of variables and optimize an energy functional with respect to these variables. By designing proper forces at the contour coordinates, the algorithms could drive the contour to the object boundary. However, since the energy functional is typically nonconvex and handcrafted based on low-level image features, the optimization tends to find local optimal solutions. + +In contrast, deep snake directly learns to evolve the contour in an end-to-end manner. Given a contour with $N$ vertices $\{\mathbf{x}_i|i = 1,\dots,N\}$ , we first construct feature vectors for each vertex. The input feature $f_{i}$ for a vertex $\mathbf{x}_i$ is a concatenation of learning-based features and the vertex coordinate: $[F(\mathbf{x}_i);\mathbf{x}_i]$ , where $F$ denotes the feature maps. The feature maps $F$ are obtained by applying a CNN backbone on the input image. The CNN backbone is shared with the detector in our instance segmentation pipeline, which will be discussed later. The image feature $F(\mathbf{x}_i)$ is computed using the bilinear interpolation at the vertex coordinate $\mathbf{x}_i$ . The appended vertex coordinate is used to encode the spatial relationship among contour vertices. Since the deformation should not be affected by the translation of the contour in the image, we subtract each dimension of $\mathbf{x}_i$ by the minimum value over all vertices. + +![](images/3de4e031b2b9062a10781937bd37a123d051ff8f27021bec27e5e0937cb876b0.jpg) +Figure 2. Circular Convolution. The blue nodes are the input features defined on a contour, the yellow nodes represent the kernel function, and the green nodes are the output features. The highlighted green node is the inner product between the kernel function and the highlighted blue nodes, which is the same as the standard convolution. The output features of circular convolution have the same length as the input features. + +Given the input features defined on a contour, deep snake introduces the circular convolution for the feature learning, as illustrated in Figure 2. In general, the features of contour vertices can be treated as a 1-D discrete signal $f: \mathbb{Z} \to \mathbb{R}^D$ and processed by the standard convolution. But this breaks the topology of the contour. Therefore, we extend $f$ to be a periodic signal defined as: + +$$ +\left(f _ {N}\right) _ {i} \triangleq \sum_ {j = - \infty} ^ {\infty} f _ {i - j N}, \tag {1} +$$ + +and propose to encode the periodic features by the circular convolution defined as: + +$$ +\left(f _ {N} * k\right) _ {i} = \sum_ {j = - r} ^ {r} \left(f _ {N}\right) _ {i + j} k _ {j}, \tag {2} +$$ + +where $k:[-r,r]\to \mathbb{R}^D$ is a learnable kernel function and the operator $\ast$ is the standard convolution. + +Similar to the standard convolution, we can construct a network layer based on the circular convolution for feature learning, which is easy to be integrated into a modern network architecture. After the feature learning, deep snake applies three $1 \times 1$ convolution layers to the output features for each vertex and predicts vertex-wise offsets between contour points and the target points, which are used to deform the contour. In all experiments, the kernel size of circular convolution is fixed to be nine. + +As discussed in the introduction, the proposed circular convolution better exploits the circular structure of the contour than the generic graph convolution. We will show the experimental comparison in Section 5.2. An alternative method is to use standard CNNs to regress a pixel-wise vector field from the input image to guide the evolution of the initial contour [37, 33, 40]. We argue that an important advantage of deep snake over the standard CNNs is the object-level structured prediction, i.e., the offset prediction at a vertex depends on other vertices of the same contour. Therefore, deep snake will predict a more reasonable offset for a vertex located far from the object. Standard CNNs may have difficulty in this case, as the regressed vector field may drive this vertex to another object which is closer. + +![](images/9c5e891d009a884a54430814c5aa0221b40f18b18208c4f05ad70d1e00ae7ccb.jpg) +Figure 3. Proposed contour-based model for instance segmentation. (a) Deep snake consists of three parts: a backbone, a fusion block, and a prediction head. It takes a contour as input and outputs vertex-wise offsets to deform the contour. (b) Based on deep snake, we propose a two-stage pipeline for instance segmentation: initial contour proposal and contour deformation. The box proposed by the detector gives a diamond contour, whose four vertices are then shifted to object extreme points by deep snake. An octagon is constructed based on the extreme points. Taking the octagon as the initial contour, deep snake iteratively deforms it to match the object boundary. + +![](images/19324e4a2f16c37ec9fe17034f45d0c0370b632156bfd3a4ea7f53140c589485.jpg) + +Network architecture. Figure 3(a) shows the detailed schematic. Following ideas from [34, 39, 22], deep snake consists of three parts: a backbone, a fusion block, and a prediction head. The backbone is comprised of 8 "CirConv-Bn-ReLU" layers and uses residual skip connections for all layers, where "CirConv" means circular convolution. The fusion block aims to fuse the information across all contour points at multiple scales. It concatenates features from all layers in the backbone and forwards them through a $1 \times 1$ convolution layer followed by max pooling. The fused feature is then concatenated with the feature of each vertex. The prediction head applies three $1 \times 1$ convolution layers to the vertex features and output vertex-wise offsets. + +# 3.2. Deep snake for instance segmentation + +Figure 3(b) overviews the proposed pipeline for instance segmentation. We combine deep snake with an object detector. The detector first produces object bounding boxes that are used to construct diamond contours. Then deep snake shifts the diamond vertices to object extreme points, which are used to construct octagon contours. Finally, deep snake takes octagons as initial contours and performs iterative contour deformation to obtain the object shape. + +Initial contour proposal. Most active contour models require precise initial contours. Since the octagon proposed in [45] tightly encloses the object, we choose it as the initial contour, as shown in Figure 3(b). This octagon is formed by four extreme points, which are top, leftmost, bottom, rightmost pixels in an object, respectively, denoted by $\{\mathbf{x}_i^{ex}|i = 1,2,3,4\}$ . Given a detected object box, we extract four center points at the top, left, bottom, right box edges, denoted by $\{\mathbf{x}_i^{bb}|i = 1,2,3,4\}$ , and then connect them to get a diamond contour. Deep snake takes this contour as input and outputs four offsets that point from each vertex $\mathbf{x}_i^{bb}$ to the extreme point $\mathbf{x}_i^{ex}$ , namely $\mathbf{x}_i^{ex} - \mathbf{x}_i^{bb}$ . + +In practice, to consider more context information, the diamond contour is uniformly upsampled to 40 points, and deep snake correspondingly outputs 40 offsets. The loss function only supervises the offsets at $\mathbf{x}_i^{bb}$ . + +We construct the octagon by generating four line segments based on extreme points and connecting their endpoints. Specifically, the four extreme points define a new bounding box. From each extreme point, a line is extended along the corresponding box edge in both directions by 1/4 of the edge length and truncated if it meets the box corner. Then, the endpoints of the four line segments are connected to form the octagon. + +Contour deformation. We first uniformly sample $N$ points along the octagon contour starting from the top extreme points $\mathbf{x}_1^{ex}$ . Similarly, the ground-truth contour is generated by uniformly sampling $N$ vertices along the object boundary and defining the first vertex as the one nearest to $\mathbf{x}_1^{ex}$ . Deep snake takes the initial contour as input and outputs $N$ offsets that point from each vertex to the target boundary point. We set $N$ as 128 in all experiments, which can uniformly cover most object shapes. + +However, regressing the offsets in one pass is challenging, especially for vertices far away from the object. Inspired by [21, 25, 38], we deal with this problem in an iterative optimization fashion. Specifically, our approach first predicts $N$ offsets based on the current contour and then deforms this contour by vertex-wise adding the offsets to its vertex coordinates. The deformed contour can be used for the next iteration. In experiments, the number of inference iteration is set as 3 unless otherwise stated. + +Note that the contour is an alternative representation for the spatial extension of an object. By deforming the initial contour to match the object boundary, deep snake could address the localization errors from the detector. + +![](images/bc8ce31b720fa7dd6aeb9b40476d9b219bc4667faaa4e7841ac40a97bbd92f0d.jpg) +Figure 4. Multi-component detection. Given an object box, we perform RoIAlign to obtain the feature map and use a detector to detect the component boxes. + +Multi-component detection. Some objects are split into several components due to occlusions, as shown in Figure 4. However, a contour can only outline one component. To overcome this problem, we propose to use another detector to find the object components within the object box. Figure 4 shows the basic idea. Specifically, using the detected box, our approach performs RoIAlign [18] to extract a feature map and adds a detector branch on the feature map to produce the component boxes. For the detected components, we use deep snake to segment each of them and then merge the segmentation results. + +# 4. Implementation details + +Training strategy. For the training of deep snake, we use the smooth $\ell_1$ loss proposed in [14] to learn the two deformation processes. The loss function for extreme point prediction is defined as + +$$ +L _ {e x} = \frac {1}{4} \sum_ {i = 1} ^ {4} \ell_ {1} \left(\tilde {\mathbf {x}} _ {i} ^ {e x} - \mathbf {x} _ {i} ^ {e x}\right), \tag {3} +$$ + +where $\tilde{\mathbf{x}}_i^{ex}$ is the predicted extreme point. And the loss function for iterative contour deformation is defined as + +$$ +L _ {i t e r} = \frac {1}{N} \sum_ {i = 1} ^ {N} \ell_ {1} \left(\tilde {\mathbf {x}} _ {i} - \mathbf {x} _ {i} ^ {g t}\right), \tag {4} +$$ + +where $\tilde{\mathbf{x}}_i$ is the deformed contour point and $\mathbf{x}_i^{gt}$ is the ground-truth boundary point. For the detection part, we adopt the same loss function as the original detection model. The training details change with datasets, which will be described in Section 5.3. + +Detector. We adopt CenterNet [44] as the detector for all experiments. CenterNet reformulates the detection task as a keypoint detection problem and achieves an impressive trade-off between speed and accuracy. For the object box detector, we adopt the same setting as [44], which outputs class-specific boxes. For the component box detector, a class-agnostic CenterNet is adopted. Specifically, given an $H \times W \times C$ feature map, the class-agnostic CenterNet outputs an $H \times W \times 1$ tensor representing the component center and an $H \times W \times 2$ tensor representing the box size. + +# 5. Experiments + +# 5.1. Datasets and Metrics + +Cityscapes [8] contains 2,975 training, 500 validation and 1,525 testing images with high quality annotations. Besides, it has 20k images with coarse annotations. The performance is evaluated in terms of the average precision (AP) metric averaged over eight semantic classes of the dataset. + +KINS [35] was created by additionally annotating Kitti [13] dataset with instance-level semantic annotation. This dataset is used for amodal instance segmentation, which aims to recover complete instance shapes even under occlusion. KINS consists of 7,474 training images and 7,517 testing images. Following its setting, we evaluate our approach on seven object categories in terms of the AP metric. + +SBD [16] re-annotates 11,355 images from the PASCAL VOC [10] dataset with instance-level boundaries. The reason that we don't evaluate on PASCAL VOC is that its annotations contain holes, which is not suitable for contour-based methods. SBD is split into 5,623 training images and 5,732 testing images. We report our results in terms of 2010 VOC $\mathrm{AP}_{vol}$ [17], $\mathrm{AP}_{50}$ , $\mathrm{AP}_{70}$ metrics. $\mathrm{AP}_{vol}$ is the average of AP with nine thresholds from 0.1 to 0.9. + +COCO [24] is one of the most challenging datasets for instance segmentation. It consists of 115k training, 5k validation and 20k testing images. We report our results in terms of the AP metric. + +# 5.2. Ablation studies + +We conduct ablation studies on the SBD dataset as it has 20 semantic categories which could fully evaluate the ability to handle various object shapes. The three proposed components are evaluated, including our network architecture, initial contour proposal, and circular convolution. In these experiments, the detector and deep snake are trained end-to-end for 160 epochs with multi-scale data augmentation. The learning rate starts from $1e^{-4}$ and decays by half at 80 and 120 epochs. + +Table 1 summarizes the results of ablation studies. The row "Baseline" lists the result of a direct combination of Curve-gcn [25] with CenterNet [44]. Specifically, the detector produces object boxes, which gives ellipses around objects. Then ellipses are deformed towards object boundaries through Graph-ResNet. Note that, this baseline method represents the contour as a graph and uses a graph convolution network for contour deformation. + +To validate the advantages of our network, the model in the second row keeps the convolution operator as graph convolution and replaces Graph-ResNet with our proposed architecture, which yields $1.4\mathrm{AP}_{vol}$ improvement. The main + +
APvolAP50AP70
Baseline50.958.843.5
+ Architecture52.359.746.0
+ Initial proposal53.661.147.6
+ Circular convolution54.462.148.3
+ +Table 1. Ablation studies on SBD val set. The baseline is a direct combination of Curve-gcn [25] and CenterNet [44]. The second model reserves the graph convolution and replaces the network architecture with our proposed one, which yields $1.4\mathrm{AP}_{vol}$ improvement. Then we add the initial contour proposal before contour deformation, which improves $\mathrm{AP}_{vol}$ by 1.3. The fourth row shows that replacing graph convolution with circular convolution further yields $0.8\mathrm{AP}_{vol}$ improvement. + +
Iter. 1Iter. 2Iter. 3Iter. 4Iter. 5
Graph conv50.251.553.652.251.6
Circular conv50.654.254.454.053.2
+ +Table 2. Results of models with different convolution operators and different iterations on SBD in terms of the $\mathrm{AP}_{vol}$ metric. Circular convolution outperforms graph convolution across all inference iterations. Furthermore, circular convolution with two iterations outperforms graph convolution with three iterations by 0.6 AP, indicating a stronger deforming ability. We also find that adding more iterations does not necessarily improve the performance, which shows that it might be harder to train the network with more iterations. + +difference between the two networks is that our architecture appends a global fusion block before the prediction head. + +When exploring the influence of the contour initialization, we add the initial contour proposal before the contour deformation. Instead of directly using the ellipse, the proposal step generates an octagon initialization by predicting four object extreme points, which not only compensates for the detection errors but also encloses the object more tightly. The comparison between the second and the third row shows a 1.3 improvement in terms of $\mathrm{AP}_{vol}$ . + +Finally, the graph convolution is replaced with the circular convolution, which achieves $0.8\mathrm{AP}_{vol}$ improvement. To fully validate the importance of circular convolution, we further compare models with different convolution operators and different inference iterations, as shown in table 2. Circular convolution outperforms graph convolution across all inference iterations. Circular convolution with two iterations outperforms graph convolution with three iterations by $0.6\mathrm{AP}_{vol}$ . Figure 5 shows qualitative results of graph and circular convolution on SBD, where circular convolution gives a sharper boundary. Both the quantitative and qualitative results indicate that models with the circular convolution have a stronger ability to deform contours. + +# 5.3. Comparison with the state-of-the-art methods + +Performance on Cityscapes. Since fragmented instances are very common in Cityscapes, the proposed multi-component detection strategy is adopted. Our network is trained with multi-scale data augmentation and tested at a + +![](images/8cd10528984c0494731eb22c759fee3f83806d58d3db0c281dc4458d107cdf62.jpg) +Figure 5. Comparison between graph convolution (top) and circular convolution (bottom) on SBD. The result of circular convolution with two iterations is visually better than that of graph convolution with three iterations. + +single resolution of $1216 \times 2432$ . No testing tricks are used. The detector is first trained alone for 140 epochs, and the learning rate starts from $1e^{-4}$ and drops by half at 80, 120 epochs. Then the detection and snake branches are trained end-to-end for 200 epochs, and the learning rate starts from $1e^{-4}$ and drops by half at 80, 120, 150 epochs. We choose a model that performs best on the validation set. + +Table 3 compares our results with other state-of-the-art methods on the Cityscapes validation and test sets. All methods are tested without tricks. Using only the fine annotations, our approach achieves state-of-the-art performances on both validation and test sets. We outperform PANet by 0.9 AP on the validation set and $1.3\mathrm{AP}_{50}$ on the test set. Our approach achieves 28.2 AP on the test set when the strategy of handling fragmented instances is not adopted. Visual results are shown in Figure 6. + +Performance on KINS. The KINS dataset is for amodal instance segmentation, where objects are all annotated as single-component, so the multi-component detection strategy is not adopted. We train the detector and snake end-to-end for 150 epochs. The learning rate starts from $1e^{-4}$ and decays with 0.5 and 0.1 at 80 and 120 epochs, respectively. We perform multi-scale training and test the model at a single resolution of $768 \times 2496$ . + +Table 4 shows the comparison with [9, 23, 11, 18, 27] on the KINS dataset in terms of the AP metric. Our approach achieves the best performance across all methods. We find that the snake branch can improve the detection performance. When CenterNet is trained alone, it obtains 30.5 AP on detection. When trained with the snake branch, its performance improves by 2.3 AP. For an image resolution of $768 \times 2496$ on the KINS dataset, our approach runs at 7.6 fps on a 1080 Ti GPU. Figure 6 shows some qualitative results on KINS. + +![](images/9734045b6114082d2b548d5eae6de7495bb4a79f1dde0585f9de807d7c76412c.jpg) + +![](images/92a518bb950a55651baa1df49bd7583f256dba449e3bb31c4a78c340ef6daf33.jpg) + +![](images/60478ca8b583d795acc88ea837ab47c7ac82ba5f0d558e4abc4f875dec1aa630.jpg) + +![](images/ae40b254fc437504eaa3b2d9de56477fdda9d217ab86cee0f7785a29e7a095f3.jpg) + +![](images/1ff1016dd7c65e8eff6bef11f514301d425ab2f478d4cf08cfc41fb73c356158.jpg) + +![](images/fa0644a55459882008109f51d69cbaaf194ee2bca04e8a0cae13659cf7cb97b5.jpg) +Figure 6. Qualitative results on Cityscapes test and KINS test sets. The first two rows show the results on Cityscapes, and the last row lists the results on KINS. Note that the results on KINS are for amodal instance segmentation. + +![](images/44ea2198374e214fa1a1f8fe59e01f6fac129a8b487941143ac3a8db6dd83a8f.jpg) + +![](images/daf906dfc7a89c7c8294297f9f62ac1cc8ba08f1b9ef414da6eaf3d5b815a780.jpg) + +
training datafpsAP [val]AP\( AP_{50} \)personridercartruckbustrainmcyclebicycle
SGN [26]fine + coarse0.629.225.044.921.820.139.424.833.230.817.712.4
PolygonRNN++ [1]fine--25.545.529.421.848.321.132.323.713.613.6
Mask R-CNN [18]fine2.231.526.249.930.523.746.922.832.218.619.116.0
GMIS [28]fine + coarse--27.649.629.324.142.725.437.232.917.611.9
Spatial [31]fine11-27.650.934.526.152.421.731.216.420.118.9
PANet [27]fine<136.531.857.136.830.454.827.036.325.522.620.8
Deep snakefine4.637.431.758.437.227.056.029.540.528.219.016.4
+ +Table 3. Results on Cityscapes val ("AP [val]" column) and test (remaining columns) sets. Our approach achieves the state-of-the-art performance, which outperforms PANet [27] by 0.9 AP on the val set and $1.3\mathrm{AP}_{50}$ on the test set. In terms of the inference speed, our approach is approximately five times faster than PANet. The timing results of other methods were obtained from [31]. + +
detectionamodal seginmodal seg
MNC [9]20.918.516.1
FCIS [23]25.623.520.8
ORCNN [11]30.929.026.4
Mask R-CNN [18]31.129.2×
Mask R-CNN [18]31.329.326.6
PANet [27]32.330.427.6
Deep snake32.831.3×
+ +Table 4. Results on KINS test set in terms of the AP metric. The amodal bounding box is used as the ground truth in the detection task. $\times$ means no such output in the corresponding method. + +Performance on SBD. Since annotations of objects on SBD are mostly single-component, the multi-component detection strategy is not adopted. For fragmented instances, our approach detects their components separately instead of detecting the whole object. We train the detection and snake branches end-to-end for 150 epochs with multi-scale data augmentation. The learning rate starts from $1e^{-4}$ and drops by half at 80 and 120 epochs. The network is tested at a single scale of $512 \times 512$ . + +
APvolAP50AP70
STS [20]29.030.06.5
ESE-50 [42]32.639.110.5
ESE-20 [42]35.340.712.1
Deep snake54.462.148.3
+ +Table 5. Results on SBD val set. Our approach outperforms other contour-based methods by a large margin. The improvement increases with the IoU threshold: 21.4 in $\mathrm{AP}_{50}$ and 36.2 in $\mathrm{AP}_{70}$ . + +In Table 5, we compare with other contour-based methods [20, 42] on the SBD dataset in terms of the VOC AP metrics. [20, 42] predict the object contours by regressing shape vectors. STS [20] defines the object contour as a radial vector, and ESE [42] approximates object contour with the Chebyshev polynomial. We outperform these methods by a large margin of at least $19.1\mathrm{AP}_{vol}$ . Note that, our approach yields $21.4\mathrm{AP}_{50}$ and $36.2\mathrm{AP}_{70}$ improvements, demonstrating that the improvement increases as the IoU threshold gets smaller. This indicates that our method outlines object boundaries more precisely. For $512\times 512$ im + +![](images/181263d856978638b4b8fbe6676a10be3025b6673946396e246cb46965a89de0.jpg) + +![](images/13672c36e0c8393d56d102288d7d9d9991c66d9107461c266c7702601130b564.jpg) + +![](images/949870fb300e2a360c44f9060776daa1ac6795cfa87a22af35b656e6f525f3b4.jpg) + +![](images/9373500192340f39a16a681572af9142dbf4e24137c85af7d6fd74689e0b1bd5.jpg) + +![](images/fd2c8c75843446fb97d3b4d9ea3ffde28673fc5d2e4508bb3d14405b18a87ea4.jpg) + +![](images/eef8ced2bbfabef1b3f89622dbcaeb416d5a7229e45a710c3d852f954885073f.jpg) + +![](images/d23c087f7e8b4b3345ae02bbdbd1559f5b0f637d7399072a4a3b391ff90186d9.jpg) + +![](images/779464779234e8e1103f7cb755f23379e7c6fad2527ef5eb40a97f4696e09e50.jpg) + +![](images/247d12078dfba4f70883e31accdf5e6e1669d6d00c7ccf52f74bd19158f700bb.jpg) + +![](images/8d14d24dd13e350d9f8b433fdcb395d674b2eb983df29012685cf02b5d27c85b.jpg) + +![](images/47570ef581428905711a45ac0876f50d760482523c40b32b0ae53d279f601e9c.jpg) + +![](images/269a8c736cdd3c78b3f46c2b46068426c6fa2ea824aa2abf419355ccb5701b61.jpg) + +![](images/cd990172a6aeb531c4384ae273c86fdb4e453c763d8aed114c38e110f98d14d8.jpg) + +![](images/9dbe265d18f202cfa04c74f01eb4108ab7f4331f0b2290dadf6c489586ee9ae4.jpg) +Figure 7. Qualitative results on SBD val set. Our approach handles errors in object localization in most cases. For example, in the first image, although the detected box doesn't fully enclose the car, our approach recovers the complete car shape. Zoom in for details. + +![](images/af55ac02bb6eabcc9da5e605ea5b7ca63ace7c5ead6f5549f78ff9d8cfe8bfec.jpg) + +![](images/887a2d53008d10a894974ea5b3c2bf132001865bf6eb52d65b451ff8ca03756c.jpg) + +![](images/530411e68c23fe5d7b9406c1c9b0ad9f40551f4ec05f5af1214f7acc534436cf.jpg) + +![](images/fffa372c91d88cbf8c607896d7d8ec2f8138acb3543a3c6734554adb8e85bb9d.jpg) + +![](images/578aef219b26759fa51326af139e721ae8c0b499e53888f5ace4e641f44139dc.jpg) + +
YOLACT [3]ESE [42]OURS
val (segm AP)29.921.630.5
test-dev (segm AP)29.8-30.3
+ +ages on the SBD dataset, our approach runs at 32.3 fps on a 1080 Ti. Some qualitative results are illustrated in Figure 7. + +Performance on COCO. Similar to the experiment on SBD, the multi-component detection strategy is not adopted. The network is trained with multi-scale data augmentation and tested at the original image resolution without tricks (e.g., flip augmentation). The detection and snake branches are trained end-to-end for 160 epochs, where the detector is initialized with the pretrained model released by [44]. The learning rate starts from $1e^{-4}$ and drops by half at 80 and 120 epochs. We choose a model that performs best on the validation set. Table 6 compares our method with other real-time methods. Our method achieves 30.3 segm AP and 33.2 bbox AP on COCO test-dev set with 27.2 fps. + +# 5.4. Running time + +Table 7 compares our approach with other methods [9, 23, 18, 20, 42] in terms of running time on the PASCAL VOC dataset. Since the SBD dataset shares images with PASCAL VOC, the running time on the SBD dataset is technically the same as the one on PASCAL VOC. We obtain the running time of other methods from [42]. + +For $512 \times 512$ images on the SBD dataset, our algorithm runs at 32.3 fps on a desktop with an Intel i7 3.7GHz and a GTX 1080 Ti GPU, which is efficient for real-time instance segmentation. Specifically, CenterNet takes $18.4\mathrm{ms}$ , the initial contour proposal takes $3.1\mathrm{ms}$ , and each iteration + +Table 6. Comparison with other real-time methods on COCO. + +
methodMNCFCISMSSTSESEOURS
time (ms)360160180272631
fps2.86.35.637.038.532.3
+ +Table 7. Running time on the PASCAL VOC dataset. "MS" represents Mask R-CNN [18] and "OURS" represents our approach. The last three methods are contour-based methods. + +of contour deformation takes $3.3\mathrm{ms}$ . Since our approach outputs the object boundary, no post-processing like upsampling is required. If the multi-component detection strategy is adopted, the detector additionally takes $3.6\mathrm{ms}$ . + +# 6. Conclusion + +We proposed a learning-based snake algorithm for real-time instance segmentation, which introduces the circular convolution for efficient feature learning on the contour and regresses vertex-wise offsets for the contour deformation. Based on deep snake, we developed a two-stage pipeline for instance segmentation: initial contour proposal and contour deformation. We showed that this pipeline gained a superior performance than direct regression of the coordinates of the object boundary points. To overcome the limitation of the contour representation that it can only outline one connected component, we proposed the multi-component detection strategy and demonstrated the effectiveness of this strategy on Cityscapes. The proposed model achieved competitive results on the Cityscapes, Kins, Sbd and COCO datasets with a real-time performance. + +Acknowledgements: The authors would like to acknowledge support from NSFC (No. 61806176) and Fundamental Research Funds for the Central Universities (2019QNA5022). + +# References + +[1] David Acuna, Huan Ling, Amlan Kar, and Sanja Fidler. Efficient interactive annotation of segmentation datasets with polygon-rnn++. In CVPR, 2018. 3, 7 +[2] Min Bai and Raquel Urtasun. Deep watershed transform for instance segmentation. In CVPR, 2017. 2 +[3] Daniel Bolya, Chong Zhou, Fanyi Xiao, and Yong Jae Lee. Yolact: real-time instance segmentation. In ICCV, 2019. 8 +[4] Lluis Castrejon, Kaustav Kundu, Raquel Urtasun, and Sanja Fidler. Annotating object instances with a polygon-rnn. In CVPR, 2017. 3 +[5] Kai Chen, Jiangmiao Pang, Jiaqi Wang, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jianping Shi, Wanli Ouyang, et al. Hybrid task cascade for instance segmentation. In CVPR, 2019. 1 +[6] Laurent D Cohen. On active contour models and balloons. CVGIP: Image understanding, 53(2):211-218, 1991. 1, 2 +[7] Timothy F Cootes, Christopher J Taylor, David H Cooper, and Jim Graham. Active shape models-their training and application. CVU, 61(1):38-59, 1995. 1, 2 +[8] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In CVPR, 2016. 2, 5 +[9] Jifeng Dai, Kaiming He, and Jian Sun. Instance-aware semantic segmentation via multi-task network cascades. In CVPR, 2016. 2, 6, 7, 8 +[10] Mark Everingham, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The pascal visual object classes (voc) challenge. *IJCV*, 88(2):303–338, 2010. 5 +[11] Patrick Follmann, Rebecca Kö Nig, Philipp Hä Rtinger, Michael Klostermann, and Tobias Bö Ttger. Learning to see the invisible: End-to-end trainable amodal instance segmentation. In WACV, 2019. 6, 7 +[12] Naiyu Gao, Yanhu Shan, Yupei Wang, Xin Zhao, Yinan Yu, Ming Yang, and Kaiqi Huang. Ssap: Single-shot instance segmentation with affinity pyramid. In ICCV, 2019. 2 +[13] Andreas Geiger, Philip Lenz, Christoph Stiller, and Raquel Urtasun. Vision meets robotics: The kitti dataset. *IJRR*, 32(11):1231-1237, 2013. 5 +[14] Ross Girshick. Fast r-cnn. In ICCV, 2015. 5 +[15] Steve R Gunn and Mark S Nixon. A robust snake implementation; a dual active contour. PAMI, 19(1):63-68, 1997. 1, 2 +[16] Bharath Hariharan, Pablo Arbeláez, Lubomir Bourdev, Subhransu Maji, and Jitendra Malik. Semantic contours from inverse detectors. In ICCV, 2011. 2, 5 +[17] Bharath Hariharan, Pablo Arbeláez, Ross Girshick, and Jitendra Malik. Simultaneous detection and segmentation. In ECCV, 2014. 5 +[18] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In ICCV, 2017. 1, 2, 5, 6, 7, 8 +[19] Zhaojin Huang, Lichao Huang, Yongchao Gong, Chang Huang, and Xinggang Wang. Mask scoring r-cnn. In CVPR, 2019. 1 + +[20] Saumya Jetley, Michael Sapienza, Stuart Golodetz, and Philip HS Torr. Straight to shapes: Real-time detection of encoded shapes. In CVPR, 2017. 1, 2, 7, 8 +[21] Michael Kass, Andrew Witkin, and Demetri Terzopoulos. Snakes: Active contour models. IJCV, 1(4):321-331, 1988. 1, 2, 3, 4 +[22] Guohao Li, Matthias Müller, Ali Thabet, and Bernard Ghanem. Can GCNs go as deep as cnns? In ICCV, 2019. 4 +[23] Yi Li, Haozhi Qi, Jifeng Dai, Xiangyang Ji, and Yichen Wei. Fully convolutional instance-aware semantic segmentation. In CVPR, 2017. 2, 6, 7, 8 +[24] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ECCV, 2014. 2, 5 +[25] Huan Ling, Jun Gao, Amlan Kar, Wenzheng Chen, and Sanja Fidler. Fast interactive object annotation with curve-gcn. In CVPR, 2019. 1, 2, 3, 4, 5, 6 +[26] Shu Liu, Jiaya Jia, Sanja Fidler, and Raquel Urtasun. Sgn: Sequential grouping networks for instance segmentation. In ICCV, 2017. 7 +[27] Shu Liu, Lu Qi, Haifang Qin, Jianping Shi, and Jiaya Jia. Path aggregation network for instance segmentation. In CVPR, 2018. 1, 2, 6, 7 +[28] Yiding Liu, Siyu Yang, Bin Li, Wengang Zhou, Jizheng Xu, Houqiang Li, and Yan Lu. Affinity derivation and graph merge for instance segmentation. In ECCV, 2018. 2, 7 +[29] Kevis-Kokitsi Maninis, Sergi Caelles, Jordi Pont-Tuset, and Luc Van Gool. Deep extreme cut: From extreme points to object segmentation. In CVPR, 2018. 2 +[30] Diego Marcos, Devis Tuia, Benjamin Kellenberger, Lisa Zhang, Min Bai, Renjie Liao, and Raquel Urtasun. Learning deep structured active contours end-to-end. In CVPR, 2018. 2 +[31] Davy Neven, Bert De Brabandere, Marc Proesmans, and Luc Van Gool. Instance segmentation by jointly optimizing spatial embeddings and clustering bandwidth. In CVPR, 2019. 2, 7 +[32] Dim P Papadopoulos, Jasper RR Uijlings, Frank Keller, and Vittorio Ferrari. Extreme clicking for efficient object annotation. In ICCV, 2017. 2 +[33] Sida Peng, Yuan Liu, Qixing Huang, Xiaowei Zhou, and Hujun Bao. Pvnet: Pixel-wise voting network for 6dof pose estimation. In CVPR, 2019. 3 +[34] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In CVPR, 2017. 4 +[35] Lu Qi, Li Jiang, Shu Liu, Xiaoyong Shen, and Jiaya Jia. Amodal instance segmentation with kins dataset. In CVPR, 2019. 2, 5 +[36] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NeurIPS, 2015. 1 +[37] Christian Rupprecht, Elizabeth Huaroc, Maximilian Baust, and Nassir Navab. Deep active contours. arXiv preprint arXiv:1607.05074, 2016. 3 + +[38] Nanyang Wang, Yinda Zhang, Zhuwen Li, Yanwei Fu, Wei Liu, and Yu-Gang Jiang. Pixel2mesh: Generating 3d mesh models from single rgb images. In ECCV, 2018. 4 +[39] Yue Wang, Yongbin Sun, Ziwei Liu, Sanjay E Sarma, Michael M Bronstein, and Justin M Solomon. Dynamic graph cnn for learning on point clouds. TOG, 2018. 4 +[40] Zian Wang, David Acuna, Huan Ling, Amlan Kar, and Sanja Fidler. Object instance annotation with deep extreme level set evolution. In CVPR, 2019. 3 +[41] Enze Xie, Peize Sun, Xiaoge Song, Wenhai Wang, Xuebo Liu, Ding Liang, Chunhua Shen, and Ping Luo. Polarmask: Single shot instance segmentation with polar representation. In CVPR, 2020. 1 +[42] Wenqiang Xu, Haiyang Wang, Fubo Qi, and Cewu Lu. Explicit shape encoding for real-time instance segmentation. In ICCV, 2019. 1, 2, 7, 8 +[43] Ze Yang, Yinghao Xu, Han Xue, Zheng Zhang, Raquel Urtasun, Liwei Wang, Stephen Lin, and Han Hu. Dense repoints: Representing visual objects with dense point sets. arXiv preprint arXiv:1912.11473, 2019. 2 +[44] Xingyi Zhou, Dequan Wang, and Philipp Krahenbuhl. Objects as points. arXiv preprint arXiv:1904.07850, 2019. 5, 6, 8 +[45] Xingyi Zhou, Jiacheng Zhuo, and Philipp Krahenbuhl. Bottom-up object detection by grouping extreme and center points. In CVPR, 2019. 2, 4 \ No newline at end of file diff --git a/deepsnakeforrealtimeinstancesegmentation/images.zip b/deepsnakeforrealtimeinstancesegmentation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..db1f4421200cbca2ef71ed0aa985e19f45e5f8b0 --- /dev/null +++ b/deepsnakeforrealtimeinstancesegmentation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d5c58925f50617956afd0f536a0e8c066ce76317ffc2ad610b642ec7c29dd5b +size 732336 diff --git a/deepsnakeforrealtimeinstancesegmentation/layout.json b/deepsnakeforrealtimeinstancesegmentation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..28376b86a609c5528f4b2f1f5cd42cf4b40f7847 --- /dev/null +++ b/deepsnakeforrealtimeinstancesegmentation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9381c21477794d474f5b1c720b97ef40cf8b85a708560d3285ad24a94d770303 +size 390506 diff --git a/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/2d6ac6bd-8006-4be1-8f26-afb80f2a973b_content_list.json b/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/2d6ac6bd-8006-4be1-8f26-afb80f2a973b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2afc50ef06cf29e3eaa6d139718e49cbcf267ced --- /dev/null +++ b/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/2d6ac6bd-8006-4be1-8f26-afb80f2a973b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:863a20888b5d7ca5edb85cf7971ef796d8fe3b14634c5bd736e5ab6f9dbc3851 +size 82900 diff --git a/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/2d6ac6bd-8006-4be1-8f26-afb80f2a973b_model.json b/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/2d6ac6bd-8006-4be1-8f26-afb80f2a973b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..197bf200d871747570f65ad28568d0f0e911bbb4 --- /dev/null +++ b/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/2d6ac6bd-8006-4be1-8f26-afb80f2a973b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ebc859900052b58c3da8781b2e2ecc21b6706a8988f1e7fd59e9db3681a9f2f +size 104066 diff --git a/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/2d6ac6bd-8006-4be1-8f26-afb80f2a973b_origin.pdf b/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/2d6ac6bd-8006-4be1-8f26-afb80f2a973b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bdc9e9cf4a62ff779ef1b0a128ac75973215f7a8 --- /dev/null +++ b/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/2d6ac6bd-8006-4be1-8f26-afb80f2a973b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49348464eab3c6bca5fd87ca4ec7a5dc938bb230df51f23de986ea38780ab6dc +size 3891795 diff --git a/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/full.md b/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/full.md new file mode 100644 index 0000000000000000000000000000000000000000..c7c69a09358691ea44fbd853d943f00ad26531c4 --- /dev/null +++ b/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/full.md @@ -0,0 +1,380 @@ +# Deep Spatial Gradient and Temporal Depth Learning for Face Anti-spoofing + +Zezheng Wang $^{1}$ Zitong Yu $^{2}$ Chenxu Zhao $^{3,*}$ Xiangyu Zhu $^{4}$ Yunxiao Qin $^{5}$ Qiusheng Zhou $^{6}$ Feng Zhou $^{1}$ Zhen Lei $^{4}$ + +$^{1}$ AIBEE $^{2}$ CMVS, University of Oulu $^{3}$ Academy of Sciences, Mininglamp Technology $^{4}$ CBSR&NLPR, CASIA $^{5}$ Northwestern Polytechnical University $^{6}$ JD Digits + +{zezhengwang, fzhou}@aibee.com zitong.yu@oulu.fi zhaochenxu@mininglamp.com +{xiangyu.zhu, zlei}@nlpr.ia.ac.cn qyxqyx@mail.nwpu.edu.cn zhouqiusheng3@jd.com + +# Abstract + +Face anti-spoofing is critical to the security of face recognition systems. Depth supervised learning has been proven as one of the most effective methods for face anti-spoofing. Despite the great success, most previous works still formulate the problem as a single-frame multi-task one by simply augmenting the loss with depth, while neglecting the detailed fine-grained information and the interplay between facial depths and moving patterns. In contrast, we design a new approach to detect presentation attacks from multiple frames based on two insights: 1) detailed discriminative clues (e.g., spatial gradient magnitude) between living and spoofing face may be discarded through stacked vanilla convolutions, and 2) the dynamics of 3D moving faces provide important clues in detecting the spoofing faces. The proposed method is able to capture discriminative details via Residual Spatial Gradient Block (RSGB) and encode spatio-temporal information from Spatio-Temporal Propagation Module (STPM) efficiently. Moreover, a novel Contrastive Depth Loss is presented for more accurate depth supervision. To assess the efficacy of our method, we also collect a Double-modal Anti-spoofing Dataset (DMAD) which provides actual depth for each sample. The experiments demonstrate that the proposed approach achieves state-of-the-art results on five benchmark datasets including OULU-NPU, SiW, CASIA-MFSD, Replay-Attack, and the new DMAD. Codes will be available at https://github.com/clks-wzz/ FAS-SGTD. + +# 1. Introduction + +Face recognition technology has become the most indispensable component in many interactive AI systems for + +![](images/f09aa27024965927c58a82fa54aae3be6cd4251cc2873dfbd62e14353b5cd0d2.jpg) +Living +(a) +Figure 1. Spatial gradient magnitude difference between living (a) and spoofing (b) face. Notice that the large difference in gradient maps despite their similarities in the original RGB images. + +![](images/97fff078b2478291c25b17dcf23edef8b74360b32b50e8bc6ba2e02a10e56422.jpg) + +![](images/a3b3ad602186b1e05c835d83a67dbdd97ae6e1042798e76028c9aeeca738f81b.jpg) +Spoofing +(b) + +![](images/0b38efef050626cda789372b75b38f3093cc780ca8961363c0c2b87bf020d8dc.jpg) + +their convenience and human-level accuracy. However, most of existing face recognition systems are easily to be spoofed through presentation attacks (PAs) ranging from printing a face on paper (print attack) to replaying a face on a digital device (replay attack) or bringing a 3D-mask (3D-mask attack). Therefore, not only the research community but also the industry has recognized face anti-spoofing [18, 19, 4, 33, 39, 11, 23, 55, 1, 29, 12, 49, 45, 54, 21] as a critical role in securing the face recognition system. + +In the past few years, both traditional methods [14, 42, 9] and CNN-based methods [35, 38, 20, 24, 46] have shown effectiveness in discriminating between the living and spoofing face. They often formalize face anti-spoofing as a binary classification between spoofing and living images. However, these approaches are challenging to explore the nature of spoofing patterns, such as the loss of skin details, color distortion, moiré pattern, and spoofing artifacts. + +In order to overcome this issue, many auxiliary depth supervised face anti-spoofing methods have been developed. Intuitively, the images of living faces contain face-like depth, whereas the images of spoofing faces in print and by replaying carriers only have planar depth. Thus, Atoum et al. [2] and Liu et al. [34] propose single-frame depth supervised CNN architectures, and improve the presentation attack detection (PAD) accuracy. + +By surveying the past face anti-spoofing methods, we + +![](images/ec39ce010553c3df703807d37da03e1b64f9f8111a8cc7bb9ed37ce4e7e44dd4.jpg) +Figure 2. Temporal depth difference between live and spoof (print attack here) scenes. The change in camera viewpoint can result in facial motion among different keypoints. In the living scene (a), the angle $\alpha$ between nose and right ear is getting smaller, while the angle $\beta_{1}$ between left ear and nose is getting larger. However, in the spoofing scene (b), the observation could be different $\alpha' < \beta_{2}'$ and $\beta_{1}' > \gamma'$ . + +notice there are two problems that have not yet been fully solved: 1) Traditional methods usually design local descriptors for solving PAD while modern deep learning methods can learn to extract relatively high-level semantic features instead. Despite their effectiveness, we argue that low-level fine-grained patterns can also play a vital role in distinguishing living and spoofing faces, e.g. the spatial gradient magnitude shown in Fig. 1. So how to aggregate local fine-grained information into convolutional networks is still unexplored for face anti-spoofing task. 2) Recent depth supervised face anti-spoofing methods [2, 34] estimate facial depth based on a single frame and leverage depth as dense pixel-wise supervision in a direct manner. We argue that the virtual discrimination of depth between living and spoofing faces can be explored more adequately by multiple frames. A vivid and exaggerated example with assumed micro motion is illustrated in Fig. 2. + +To address the problems, we present a novel depth supervised spatio-temporal network with Residual Spatial Gradient Block (RSGB) and Spatio-Temporal Propagation Module (STPM). Inspired by ResNet [22], our RSGB aggregates learnable convolutional features with spatial gradient magnitude via shortcut connection. As a result, both local fine-grained patterns and traditional convolution features can be captured via stacked RSGB. To better utilize the information from multiple frames, STPM is designed for propagating short-term and long-term spatio-temporal features into depth reconstruction. To supervise the models with facial depth more effectively, we propose a Contrastive Depth Loss (CDL) to learn the topography of facial points. + +We believe that the accuracy of facial depth directly affects the establishment of the relationship between temporal motion and facial depth. So we collect a double-modal anti-spoofing dataset named Double-modal Anti-spoofing Dataset (DMAD) which provides actual depth map for each sample. Extensive experiments are conducted to show that actual depth is more appropriate for monocular PAD than the generated depth. Note that this paper mainly focuses on + +the planar attack, which is the most common in practice. We summarize the main contributions below. + +- We propose a novel depth supervised architecture to capture discriminative details via Residual Spatial Gradient Block (RSGB) and encode spatio-temporal information from Spatio-Temporal Propagation Module (STPM) efficiently from monocular frame sequences. +- We develop a Contrastive Depth Loss to learn the topography of facial points for depth supervised PAD. +- We collect a double-modal dataset to verify that the actual depth is more appropriate for monocular PAD than the generated depth. This indicates an insight that collecting corresponding depth image to the RGB image brings benefit to the progress of the monocular PAD. +- We demonstrate the state-of-the-art performance by our method on widely used face anti-spoofing benchmarks. + +# 2. Related Work + +Roughly speaking, previous face anti-spoofing works generally fall into three categories: binary supervised, depth supervised, and temporal-based methods. + +Binary supervised Methods Since face anti-spoofing is essentially a binary classification problem, most of previous anti-spoofing methods train a classifier under binary supervision, e.g., spoofing face as 0 and living face as 1. The early works usually rely on hand-crafted features, such as LBP [14, 15, 37], SIFT [42], SURF [9], HoG [28, 52], DoG [43, 48], and traditional classifiers, such as SVM and Random Forests. Because of the sensitiveness of manually-engineered features, traditional methods often generalize poorly across varied conditions such as camera devices, lighting conditions and presentation attack instruments (PAIs). Recently, CNN has emerged as a powerful tool in face anti-spoofing tasks with the help of hardware advancement and data abundance. For instance, in early works like [30, 41], pre-trained VGG-face model is finetuned to extract features in a binary-classification setting. However, most of them consider face anti-spoofing as a binary classification problem with cross-entropy loss, which easily learns the arbitrary patterns such as screen bezel. + +Depth supervised Methods Compared with the binary setting, depth supervised methods aim to learn more faithful patterns. In [2], the depth map of a face is utilized as a supervisory signal for the first time. They propose a two-stream CNN-based approach for face anti-spoofing, by extracting both the patch features and holistic depth maps from the face images. It shows that depth estimation is beneficial for modeling face anti-spoofing to obtain promising results, especially on higher-resolution images. In another work [34], the authors propose a face anti-spoofing method by augmenting spatial facial depth as an auxiliary supervi + +![](images/a24fbcf0f4ebd3f2185502727dc0139fd1181fc9ad61dd37a9f271902c5edd71.jpg) +Figure 3. Illustration of the overall framework. The inputs are consecutive frames with a fixed interval. Each frame is processed by cascaded RSGB with a shared backbone which generates a corresponding coarse depth map. The number in RSGB cubes denotes the output channel number of RSGB. STPM is plugged between frames for estimating the temporal depth, which is used for refining the corresponding coarse depth map. The framework works well by learning with the overall loss functions. + +sion along with temporal rPPG signals. More recently, [26] attempts to learn spoof noise and depth for generalized face anti-spoofing. However, these methods take stacked vanilla convolutional networks as the backbone and fail to capture the rich detailed patterns for depth estimation. + +Temporal-based Methods Temporal information plays a vital role in face anti-spoofing tasks. Most of the prior works focus on the movement of key parts of the face. For example in [40, 41], the eye-blinking fact is used to predict spoofing. However, these methods are vulnerable to replay attacks since they heavily rely on some heuristic assumptions about the nature of these attacks. More general approaches like 3D convolution [20] or LSTM [50, 53] have recently been used to distinguish the live from spoof images. In addition, optical flow magnitude map and Shearlet feature have been taken as inputs in [16] to the CNN due to the obvious difference in flow patterns between living and spoofing faces. Based on the different color changes between the living and spoofing face videos, rPPG [31, 34, 32] features are also explored for PAD. To the best of our knowledge, no depth supervised temporal-based methods has ever been proposed for face anti-spoofing task. + +# 3. The Proposed Approach + +In this section, we first present our advanced depth-supervised spatio-temporal network structure, including Residual Spatial Gradient Block (RSGB) and Spatio-Temporal Propagation Module (STPM). Then our proposed novel Contrastive Depth Loss (CDL) and the overall loss would be demonstrated. + +# 3.1. Network Structure + +Designed in an end-to-end depth supervised fashion, our proposed framework takes $N_{f}$ -frame face images as input and predicts the corresponding depth map directly. As + +![](images/a2150206fb7e41685431431282dbf47b8d1d33ef7012ef4830daff5adbde2a63.jpg) +Figure 4. Residual spatial gradient block. + +shown in Fig. 3, the backbone is composed of cascaded RSGB followed by pooling layers, intending to extract fine-grained spatial features in low-level, mid-level and high-level, respectively. Then these multi-level features are concatenated to predict coarse depth map for each frame. + +In order to capture rich dynamic information, STPM is plugged between frames. Short-term Spatio-Temporal Block (STSTB) picks up spatio-temporal features from adjacent frames while ConvGRU propagates these short-term features in a multi-frame long-term view. Finally, the temporal depth maps estimated from STPM are used to refine the coarse depth from the backbone. + +# 3.1.1 Residual Spatial Gradient Block + +Fine-grained spatial details are vital for distinguishing the bona fide and attack presentations. As illustrated in Fig. 1, the gradient magnitude response between the living (Fig. 1(a)) and spoofing (Fig. 1(b)) face is quite different, which gives the insight to design a residual spatial gradient block (RSGB) for capturing such discriminative clues. In this paper, we take the well-known Sobel [27] operation to compute gradient magnitude. In a nutshell, the horizontal and vertical gradients can be derived from the following + +convolutions respectively: + +$$ +F _ {h o r} (x) = \left[ \begin{array}{l l l} - 1 & 0 & + 1 \\ - 2 & 0 & + 2 \\ - 1 & 0 & + 1 \end{array} \right] \odot x, F _ {v e r} (x) = \left[ \begin{array}{l l l} - 1 & - 2 & - 1 \\ 0 & 0 & 0 \\ + 1 & + 2 & + 1 \end{array} \right] \odot x, \tag {1} +$$ + +where $\odot$ denotes the depthwise convolution operation, and $x$ represents the input feature maps. As shown in Fig. 4, our RSGB adopts the advanced shortcut connection structure to aggregate the learnable convolutional features with gradient magnitude information, which intends to enhance representation ability of fine-grained spatial details. It can be formulated as + +$$ +y = \phi \left(\mathcal {N} \left(F \left(x, \left\{W _ {i} \right\}\right) + \mathcal {N} \left(F _ {\text {h o r}} \left(x ^ {\prime}\right) ^ {2} + F _ {\text {v e r}} \left(x ^ {\prime}\right) ^ {2}\right)\right)\right), \tag {2} +$$ + +where $x$ represents the input features maps while $x'$ denotes the feature maps altered through 1x1 convolution, which intends to keep the consistent channel numbers for subsequent residual addition. $y$ denotes the output feature maps. $\mathcal{N}$ and $\phi$ denote the normalization and Relu layer, respectively. The function $F(x, \{W_i\})$ represents the residual gradient magnitude mapping to be learned. Note that the proposed RSGB is able to plug in both image and feature levels, extracting rich spatial context for depth regression task. + +# 3.1.2 Spatio-Temporal Propagation Module + +Virtual discrimination of depth between living and spoofing faces can be explored adequately by multiple frames. Therefore, we design STPM to extract multi-frame spatiotemporal features for depth estimation, via Short-term Spatio-Temporal Block (STSTB) and ConvGRU. + +STSTB. As illustrated in Fig. 3, STSTB extracts the generalized short-term spatio-temporal information by fusing five kinds of features: the current compressed features $F_{l}(t)$ , the current spatial gradient features $F_{l}^{S}(t)$ , the future spatial gradient features $F_{l}^{S}(t + \triangle t)$ , the temporal gradient features $F_{l}^{T}(t)$ , and the STSTB features from the previous level $STSTB_{l-1}(t)$ . The fused features can provide weighted spatial and temporal information in a learnable/adaptive way. In this paper, the spatial and temporal gradients are implemented with Sobel-based depthwise convolution (similar to Eq. 1) and element-wise subtraction of temporal features, respectively. Note that the 1x1 convolutions intend to compress the channel number with more efficiency. + +Different from the related OFF [47] work, we consider both spatial gradient of the current compressed features $F_{l}^{S}(t)$ and future spatial gradient features $F_{l}^{S}(t + \triangle t)$ while OFF only considers $F_{l}^{S}(t)$ . Moreover, current compressed feature $F_{l}(t)$ itself also plays an important role in recovering the fine depth map, which is concatenated in STSTB as well. The detailed comparison between STSTB and OFF will be studied in Sec. 5.3, which shows the advancement of + +STSTB especially for depth-supervised face anti-spoofing task. + +ConvGRU. As short-term information between two consecutive frames from STSTB has limited representation ability, it is natural to use the recurrent neural network to capture long-range spatio-temporal context. However, the classical LSTM and GRU [13] neglect the spatial information in hidden units. In consideration of the spatial neighbor relationship in the hidden layers, ConvGRU is conducted for propagating the long-range spatio-temporal information. ConvGRU can be described as below: + +$$ +R _ {t} = \sigma \left(K _ {r} \otimes \left[ H _ {t - 1}, X _ {t} \right]\right), U _ {t} = \sigma \left(K _ {u} \otimes \left[ H _ {t - 1}, X _ {t} \right]\right), +$$ + +$$ +\hat {H} _ {t} = \tanh (K _ {\hat {h}} \otimes [ R _ {t} * H _ {t - 1}, X _ {t} ]), +$$ + +$$ +H _ {t} = \left(1 - U _ {t}\right) * H _ {t - 1} + U _ {t} * \hat {H} _ {t}, \tag {3} +$$ + +where $X_{t}, H_{t}, U_{t}$ and $R_{t}$ are the matrix of input, output, update gate and reset gate, $K_{r}, K_{u}, K_{\hat{h}}$ are the kernels in the convolution layer, $\otimes$ is convolution operation, * denotes element wise product, and $\sigma$ denotes the sigmoid activation function. + +# 3.1.3 Depth Map Refinement + +Forwarding the RSGB based backbone and STPM for a given $N_{f}$ -frame input, we could obtain the corresponding coarse depth maps $\mathbf{D}_{single}^{t}$ and temporal depth maps $\mathbf{D}_{multi}^{t}$ , respectively, where $t \in [1, N_{f} - 1]$ denotes the $t$ -th frame. Then $\mathbf{D}_{multi}^{t}$ is utilized to refine $\mathbf{D}_{single}^{t}$ in a weighted summation manner: + +$$ +\mathrm {D} _ {\text {r e f i n e d}} ^ {t} = (1 - \alpha) \cdot \mathrm {D} _ {\text {s i n g l e}} ^ {t} + \alpha \cdot \mathrm {D} _ {\text {m u l t i}} ^ {t}, \alpha \in [ 0, 1 ], \tag {4} +$$ + +where $\alpha$ is the trade-off weight between $\mathbf{D}_{\text{single}}^{t}$ and $\mathbf{D}_{\text{multi}}^{t}$ . The higher value of $\alpha$ indicates the more importance about the multi-frame spatio-temporal features. Finally, $N_{f} - 1$ refined depth maps $\{\mathbf{D}_{\text{refined}}^{t}\}_{t=1}^{N_{f}-1}$ are obtained. + +# 3.2. Loss Function + +Besides designing the network architecture, we also need an appropriate loss function to guide the network training. One major step-forward of the current study is that we design a novel Contrastive Detph Loss, which is able to combine with classical loss, further boosting performance. + +# 3.2.1 Contrastive Detph Loss + +In the classical depth-based face anti-spoofing, Euclidean Distance Loss (EDL) is usually used for pixel-wise supervision, which is formulated: + +$$ +L _ {E D L} = \left\| \mathrm {D} _ {P} - \mathrm {D} _ {G} \right\| _ {2} ^ {2}, \tag {5} +$$ + +![](images/4c01f42bb669f34bd102c0e8347151aa73bda92b40a7a002b1b476c4d0f4d446.jpg) +Figure 5. Contrastive Depth Loss. The purple, yellow, and white pieces indicate 1, -1, and 0, respectively. There are totally eight contrastive convolution kernels in CDL. + +where $\mathrm{D}_P$ and $\mathrm{D}_G$ are the predicted depth and groundtruth depth, respectively. EDL applies supervision on the predicted depth based on pixel one by one, ignoring the depth difference among adjacent pixels. Intuitively, EDL merely assists the network to learn the absolute distance between the objects to the camera. However, the distance relationship of different objects is also important to be supervised for the depth learning. Therefore, as shown in Fig. 5, we propose the Contrastive Depth Loss (CDL) to offer extra strong supervision, which improves the generality of the depth-based face anti-spoofing model: + +$$ +L _ {C D L} = \sum_ {i} \left\| \mathrm {K} _ {i} ^ {C D L} \odot \mathrm {D} _ {P} - \mathrm {K} _ {i} ^ {C D L} \odot \mathrm {D} _ {G} \right\| _ {2} ^ {2}, \tag {6} +$$ + +where $\mathbf{K}_i^{CDL}$ is the $i$ th contrastive convolution kernel, $i\in [0,7]$ . The details of the kernels can be found in Fig. 5. + +# 3.2.2 Overall Loss + +In view of the potentially unclear depth map, we hereby consider a binary loss when looking for the difference between living and spoofing depth map. Note that the depth supervision is decisive, whereas the binary supervision takes an assistant role to discriminate the different kinds of depth maps. + +$$ +L _ {\text {b i n a r y}} = - \mathrm {B} _ {G} * \log (f c s (\mathrm {D} _ {\text {a v g}})), \tag {7} +$$ + +$$ +L _ {\text {o v e r a l l}} = \beta \cdot L _ {\text {b i n a r y}} + (1 - \beta) \cdot \left(L _ {E D L} + L _ {C D L}\right), \tag {8} +$$ + +where $\mathrm{B}_G$ is the binary groundtruth label, $\mathrm{D}_{avg}$ is the pool averaged map of $\{\mathrm{D}_{refined}^t\}_{t=1}^{N_f-1}$ , and $fcs$ denotes two fully connected layers and one softmax layer after the element-wise averaged depth maps, which outputs the logits of two classes, $\beta$ is the hyper-parameter to trade-off binary loss and depth loss in the final overall loss $L_{overall}$ . + +# 4. Double-modal Anti-spoofing Dataset + +In this work, we collect a real double-modal dataset (RGB and Depth). There are three kinds of display materials in replay attack: AMOLED screen, OLED screen, IPS/TFT screen. Meanwhile, three kinds of paper materials in print attacks are adopted: high-quality A4 paper, coated + +![](images/a0342e931aa6f240ac71d34765544b98bcc560e5147d4a06d1ccf809d861def1.jpg) +Figure 6. Some examples of DMAD. The actual depth is more precise than the generated depth. + +Table 1. The details of our collected DMAD. This protocol of splitting subsets aims to evaluate the generalization of methods under unseen presentation materials. + +
SubsetSubjectSessionModal TypesPresentation Material# of live/attack vid.
Train1~1001~3RGB, DepthA4 Paper, AMOLED900
101~2001~3RGB, DepthCoated Paper, OLED900
Test201~3001~3RGB, DepthPoster Paper, IPS/TFT900
+ +paper, and poster paper. The capture camera is RealSense SR300, which can offer corresponding RGB and Depth images. There are 300 subjects, each of which is recorded in three sessions and contains one real category and two attack categories (print and replay). Totally, we obtain 2700 samples (4~12 seconds videos) in less than two months with two human workers. Tab. 1 demonstrates the details of DMAD, and Fig. 6 shows some corresponding examples. + +# 5. Experiments + +# 5.1. Databases and Metrics + +# 5.1.1 Databases + +Five databases - OULU-NPU [10, 5], SiW [34], CASIA-MFSD [56], Replay-Attack [12], DMAD are used in our experiment. OULU-NPU [10] is a high-resolution database, consisting of 4950 real access and spoofing videos and containing four protocols to validate the generalization of models. SiW [34] contains more live subjects and three protocols are used for testing. CASIA-MFSD [56] and ReplayAttack [12] both contain low-resolution videos. + +# 5.1.2 Performance Metrics + +In OULU-NPU and SiW dataset, we follow the original protocols and metrics for a fair comparison. OULU-NPU, SiW and DMAD utilize 1) Attack Presentation Classification Error Rate $APCER$ , which evaluates the highest error among all PAIs (e.g. print or display), 2) Bona Fide Presentation Classification Error Rate $BPCER$ , which evaluates the error of real access data, and 3) $ACER$ [25], which evaluates the mean of $APCER$ and $BPCER$ : + +$$ +A C E R = \frac {A P C E R + B P C E R}{2}. \tag {9} +$$ + +HTER is adopted in the cross-database testing between CASIA-MFSD and Replay-Attack, evaluating the mean of False Rejection Rate (FRR) and False Acceptance Rate (FAR): + +$$ +H T E R = \frac {F R R + F A R}{2}. \tag {10} +$$ + +# 5.2. Implementation Details + +# 5.2.1 Depth Generation + +Dense face alignment method PRNet [17] is adopted to estimate the 3D shape of the living face and generate the facial depth map $\mathrm{D}_G \in \mathbb{R}^{32 \times 32}$ . A typical sample can be found in the third row of Fig. 6. To distinguish living faces from spoofing faces, at the training stage, we normalize living depth map in a range of [0, 1], while setting spoofing depth map to 0, which is similar to [34]. + +# 5.2.2 Training Strategy + +The proposed method is trained with a two-stage strategy: Stage 1: We train the backbone with cascaded RSGB by the depth loss $L_{EDL}$ and $L_{CDL}$ , in order to learn a fundamental representation to predict coarse depth maps. Stage 2: We fix the parameters of the backbone, and train the STPM part by the overall loss $L_{overall}$ for refining depth maps. Our networks are fed by $N_f$ frames, which are sampled by an interval of three frames. This sampling interval makes sampled frames maintain enough temporal information in the limited GPU memory. + +# 5.2.3 Testing Strategy + +For the final classification score, we feed the sequential frames into the network and obtain depth maps $\{\mathbf{D}_{\text{refined}}^t\}_{t=1}^{N_f-1}$ and the living logits $\hat{b}$ in $fcs(\mathbf{D}_{avg})$ . The final living score can be obtained by: + +$$ +\operatorname {s c o r e} = \beta \cdot \hat {b} + (1 - \beta) \cdot \frac {\sum_ {t = 1} ^ {N _ {f} - 1} \left| \left| \mathbf {D} _ {\text {r e f i n e d}} ^ {t} * \mathbf {M} ^ {t} \right| \right| _ {1}}{N _ {f} - 1}, \tag {11} +$$ + +where $\beta$ is the same as that in equation 8, $\mathbf{M}^t$ is the mask of face at frame $t$ , which can be generated by the dense face landmarks in PRNet [17], and the second module denotes that we compute the mean of depth values in the facial areas as one part of the score. + +# 5.2.4 Hyper-parameter Setting + +Our proposed method is implemented in TensorFlow, with a learning rate of 1e-4 for single-frame part and 1e-2 for multi-frame part. The batch size of single-frame part is 48, and that of multi-frame part is 2 with $N_f$ being 5 in our + +![](images/e70c7750bf87ef31579214a747b6678cdeae203ab8e3831d2825c6a9e9b38043.jpg) +Figure 7. Ablation study of $\alpha$ in Eq. 4 on OULU-NPU Protocol 3. The red line denotes the mean $\mathrm{ACER}(\%)$ value while the orange/blue area denotes the range of standard deviation. + +Table 2. The results of ablation study on OULU-NPU Protocol 3. + +
ModuleLCDLRSGBSTSTBOFFConvGRULbinaryACER(%)
Model 16.25±3.20
Model 2✓5.07±1.83
Model 3✓✓3.19±0.90
Model 4✓✓✓2.99±0.72
Model 5✓✓✓✓2.85±0.49
Model 6✓✓✓✓✓3.20±1.00
Model 7✓✓✓✓✓2.71±0.63
+ +experiment. Adadelta optimizer is used in our training procedure, with $\rho$ as 0.95 and $\epsilon$ as 1e-8. We set $\alpha = 0.6$ and $\beta = 0.8$ by our experimental experience. + +# 5.3. Experimental Comparison + +# 5.3.1 Ablation Study + +Seven architectures are implemented to demonstrate the efficacy of vital parts (i.e., RSGB, STPM and loss functions) in the proposed method. As shown in Tab. 2, Model 1 can be treated as a raw baseline, consisting of a backbone network with stacked vanilla convolutions. Model 2 is supervised with extra contrastive depth loss. Based on Model 2, vanilla convolutions are replaced by RSGB in Model 3. Moreover, Model 4 and Model 5 are designed for validating the effectiveness of STSTB and ConvGRU. In Model 6, STSTB is replaced by normal OFF [47]. Model 7 is our complete architecture with all modules and losses. + +Efficacy of the Modules and Loss Functions. It can be seen from Tab. 2 that Model 2 outperforms Model 1, which means our proposed CDL helps to estimate more accurate depth maps. With the progressive lower ACER of Model 3, Model 4 and Model 5, it is clear that RSGB, STSTB and ConvGRU contribute to extract effective discriminative features respectively. Finally, in comparison between Model 5 and Model 7, binary supervision indeed assists to distinguish live vs. spoof. + +STSTB vs. OFF. As illustrated in Tab. 2, Model 7 with STSTB surpasses Model 6 with OFF for a large margin, which implies that the current and future gradient information is valuable for spatio-temporal face anti-spoofing task. Model 6 even achieves inferior result compared with Model 3, indicating that it is challenging to design an effective temporal module for depth regression task. + +Table 3. The results of intra-database testing on four protocols of OULU-NPU. For a fair comparison, here the results STASN [53] trained without extra private dataset are reported. + +
Prot.MethodAPCER(%)BPCER(%)ACER(%)
1CPqD [6]2.910.86.9
GRADIANT [6]1.312.56.9
STASN [53]1.22.51.9
Auxiliary [34]1.61.61.6
FaceDs [26]1.21.71.5
OURs2.00.01.0
2MixedFASNet [6]9.72.56.1
FaceDs [26]4.24.44.3
Auxiliary [34]2.72.72.7
GRADIANT [6]3.11.92.5
STASN [53]4.20.32.2
OURs2.51.31.9
3MixedFASNet [6]5.3±6.77.8±5.56.5±4.6
GRADIANT [6]2.6±3.95.0±5.33.8±2.4
FaceDs [26]4.0±1.83.8±1.23.6±1.6
Auxiliary [34]2.7±1.33.1±1.72.9±1.5
STASN [53]4.7±3.90.9±1.22.8±1.6
OURs3.2±2.02.2±1.42.7±0.6
4Massy_HNU [6]35.8±35.38.3±4.122.1±17.6
GRADIANT [6]5.0±4.515.0±7.110.0±5.0
Auxiliary [34]9.3±5.610.4±6.09.5±6.0
STASN [53]6.7±10.68.3±8.47.5±4.7
FaceDs [26]1.2±6.36.1±5.15.6±5.7
OURs6.7±7.53.3±4.15.0±2.2
+ +Importance of Spatio-temporal Information for Depth Refinement. It can be seen from Eq. 4 that the depth map refinement is conducted in a weighted summation manner and hyperparameter $\alpha$ controls the contribution of the temporal depth maps predicted by STPM. As shown in Fig. 7, with appropriate value of $\alpha$ , the model can be benefited from spatio-temporal information and achieves better performance than that using only spatial information ( $\alpha = 0.0$ ). And the best performance can be obtained when $\alpha = 0.6$ . + +Influence of Sampling Interval in Spatio-temporal Architecture. We conduct experiments on one subprotocol of Protocol 3 with various sampling intervals $(\triangle t)$ . When $\triangle t$ equals to 1, 3, 5, and 7 frame(s), the ACER is $3.347\%$ , $2.927\%$ , $4.223\%$ , and $2.934\%$ , respectively. The ACER is the lowest when $\triangle t = 3$ , which is used as the default setting for the following intra- and cross-database testing. + +# 5.3.2 Intra-database Testing + +We compare the performance of intra-database testing on OULU-NPU, SiW and DMAD datasets. There are four protocols in OULU-NPU for evaluating the generalization of the developed face presentation attack detection (PAD) methods. Protocol 1 and Protocol 2 are designed to evaluate the generalization of PAD methods under previously unseen illumination scene and under unseen attack medium (e.g., unseen printers or displays), respectively. Protocol 3 utilizes a Leave One Camera Out (LOCO) protocol, in or- + +Table 4. The results of intra-database testing on three protocols of SiW [34]. + +
Prot.MethodAPCER(%)BPCER(%)ACER(%)
1Auxiliary [34]3.583.583.58
STASN [53]--1.00
OURs0.640.170.40
2Auxiliary [34]0.57±0.690.57±0.690.57±0.69
STASN [53]--0.28±0.05
OURs0.00±0.000.04±0.080.02±0.04
3STASN [53]--12.10±1.50
Auxiliary [34]8.31±3.818.31±3.808.31±3.81
OURs2.63±3.722.92±3.422.78±3.57
+ +Table 5. The results of intra-database testing on DMAD. + +
MethodDepth MapAPCER(%)BPCER(%)ACER(%)
Model 7Generated9.173.486.33
Actual6.362.754.55
+ +der to study the effect of the input camera variation. Protocol 4 considers all the above factors and integrates all the constraints from protocols 1 to 3, so protocol 4 is the most challenging. + +Results on OULU-NPU. As shown in Tab. 3, our proposed method ranks first on all 4 protocols, which indicates the proposed method performs well at the generalization of the external environment, attack mediums and input camera variation. It's worth noting that our model has the lowest mean and std of ACER in protocol 3 and 4, indicating its good accuracy and stability. + +Results on SiW. Tab. 4 compares the performance of our method with two state-of-the-art methods Auxiliary [34] and STASN [53] on SiW dataset. According to the purposes of three protocols on SiW and the results in Tab. 4, we can see that our method performs great advantages on the generalization of (a) variations of face pose and expression, (b) variations of different spoof mediums, (c) cross presentation attack instruments. + +Results on DMAD. The results of intra-database testing on DMAD are shown in Tab. 5. In this experiment, we still set spoofing depth map to zero when training the actual depth model. Tab. 5 shows that the ACER(\%) of multi-frame model (Model 7) supervised by actual depth obtains 1.78 lower than that supervised by generated depth. This demonstrates the actual depth map brings benefit to the improvement of monocular face anti-spoofing. + +# 5.3.3 Cross-database Testing + +We utilize four datasets (CASIA-MFSD, Replay-Attack, SiW and OULU-NPU) to perform cross-database testing for measuring the generalization potential of the models. + +Results on CASIA-MFSD and Replay-Attack. In this experiment, there are two cross-database testing protocols. One is training on the CASIA-MFSD and testing on Replay-Attack, which we name protocol CR; the other is training on the Replay-Attack and testing on CASIA + +Table 6. The results of cross-database testing between CASIA-MFSD and Replay-Attack. The evaluation metric is HTER(%) + +
MethodTrainTestTrainTest
CASIA-MFSDReplay-AttackReplay-AttackCASIA-MFSD
Motion [15]50.247.9
LBP-1 [15]55.957.6
LBP-TOP [15]49.760.6
Motion-Mag [3]50.147.0
Spectral cubes [44]34.450.0
CNN [51]48.545.5
LBP-2 [7]47.039.6
STASN [53]31.530.9
Colour Texture [8]30.337.7
FaceDs [26]28.541.1
Auxiliary [34]27.628.4
OURs17.022.8
+ +Table 7. The results of cross-database testing from SiW to OULUNPU dataset. + +
Prot.MethodAPCER(%)BPCER(%)ACER(%)
1Auxiliary [34] OURs--10.0
1.713.37.5
2Auxiliary [34] OURs--14.1
9.714.211.9
3Auxiliary [34] OURs--13.8±5.7
17.5±4.611.7±12.014.6±4.8
4Auxiliary [34] OURs--10.0±8.8
0.8±1.910.0±11.65.4±5.7
+ +MFSD, which we name protocol RC. In Tab. 6, it is shown that $\mathrm{HTER}(\%)$ of our proposed method is 17.0 on protocol CR and 22.8 on protocol RC, reducing $38.4\%$ and $19.7\%$ respectively compared with the previous state of the art. The improvement of performance on cross-database testing demonstrates the good generalization of proposed method. + +Results from SiW to OULU-NPU. Here, It is shown that the cross-database testing results trained on SiW and tested on OULU-NPU in Tab. 7. It can be seen that our method outperforms Auxiliary [34] on three protocols (decrease $2.5\%$ , $2.2\%$ and $4.6\%$ of ACER on protocol 1, protocol 2 and protocol 4, respectively). In protocol 3, ACER of our method is $14.6 \pm 4.8\%$ and slightly higher than that of Auxiliary. Considering the rPPG used in Auxiliary method, it may also be a good choice combined with proposed method. + +# 5.3.4 Visualization and Analysis + +The predicted depth maps of hard samples in OULU-NPU Protocol 3 are partly visualized in Fig. 8. It can be seen that some samples are difficult for the single-frame PAD to be detected. In contrary, our multi-frame methods with STPM can estimate more precise depth maps than those of single-frame method. The difference of depth images from real and attack samples in third row is also more significant, indicating the good discriminative information with the results of STPM. + +![](images/727bb5d4b6f87d42aaf9856dd923c4de4d622367d204092c96b56a5b24055711.jpg) +Figure 8. The generated results of hard samples in OULU-NPU. The predicted coarse depth maps from stacked RSGB backbone and temporal depth maps from STPM are illustrated in the second and third row, respectively. + +![](images/f3091f8b25db43931934c0bfc977cd419685d892830dceedab6073fc984d387f.jpg) +Figure 9. Feature distribution visualization of the testing videos on OULU-NPU Protocol 1 using t-SNE [36]. Left: features w/o RSGB, Right: features w/ RSGB. Color indicates red=live, green=primer1, blue=primer2, orange=display1, black=display2. + +Feature distribution of the testing videos on OULU-NPU Protocol 1 is shown in Fig. 9. The right image (w/ RSGB) presents more well-clustered behavior than the left image (w/o RSGB), which demonstrates the excellent discrimination ability of our proposed RSGB for distinguishing the living and spoofing faces. + +# 6. Conclusions + +In this paper, we propose a novel face anti-spoofing method, which exploits fine-grained spatio-temporal information for facial depth estimation. In our method, Residual Spatial Gradient Block (RSGB) is utilized to detect more discriminative details while Spatio-Temporal Propagation Module (STPM) to encode spatio-temporal information. An extra Contrastive Depth Loss (CDL) is designed to improve the generality of depth-supervised PAD. We also investigate the effectiveness of actual depth map in face anti-spoofing. Extensive experiments demonstrate the superiority of our method. + +# Acknowledgment + +This work has been partially supported by the Chinese National Natural Science Foundation Projects #61876178, #61806196, #61976229. + +# References + +[1] Akshay Agarwal, Richa Singh, and Mayank Vatsa. Face anti-spoofing using haralick features. In BTAS, 2016. +[2] Yousef Atoum, Yaojie Liu, Amin Jourabloo, and Xiaoming Liu. Face anti-spoofing using patch and depth-based cnns. In IJCB, pages 319-328, 2017. +[3] Samarth Bharadwaj, Tejas I Dhamecha, Mayank Vatsa, and Richa Singh. Computationally efficient face spoofing detection with motion magnification. In CVPRW, pages 105-110, 2013. +[4] Samarth Bharadwaj, Tejas I. Dhamecha, Mayank Vatsa, and Richa Singh. Face anti-spoofing via motion magnification and multifeature videolet aggregation. 2014. +[5] Zinelabinde Boulkenafet. A competition on generalized software based face presentation attack detection in mobile scenarios. In IJCB, 2017. +[6] Zinelabdine Boulkenafet, Jukka Komulainen, Zahid Akhtar, Azeddine Benlamoudi, Djamel Samai, Salah Eddine Bekhouche, Abdelkrim Ouafi, Fadi Dornaika, Abdel Malik Taleb-Ahmed, Le Qin, et al. A competition on generalized software-based face presentation attack detection in mobile scenarios. In 2017 IEEE International Joint Conference on Biometrics (IJCB), pages 688-696. IEEE, 2017. +[7] Zinelabidine Boulkenafet, Jukka Komulainen, and Abdenour Hadid. Face anti-spoofing based on color texture analysis. In ICIP, pages 2636-2640, 2015. +[8] Zinelabidine Boulkenafet, Jukka Komulainen, and Abdenour Hadid. Face spoofing detection using colour texture analysis. IEEE Transactions on Information Forensics and Security, 11(8):1818-1830, 2016. +[9] Zinelabidine Boulkenafet, Jukka Komulainen, and Abdenour Hadid. Face antispoofing using speeded-up robust features and fisher vector encoding. IEEE Signal Processing Letters, 24(2):141-145, 2017. +[10] Zinelabinde Boulkenafet, Jurka Komulainen, Lei Li, Xiaoyi Feng, and Abdenour Hadid. Oulu-npu: A mobile face presentation attack database with real-world variations. In FGR, pages 612-618, 2017. +[11] Girija Chetty and Michael Wagner. Multi-level liveness verification for face-voice biometric authentication. CB, 2006. +[12] Ivana Chingovska, André Anjos, and Sébastien Marcel. On the effectiveness of local binary patterns in face antispoofing. In Biometrics Special Interest Group, pages 1-7, 2012. +[13] Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014. +[14] Tiago de Freitas Pereira, André Anjos, José Mario De Martino, and Sébastien Marcel. Lbp- top based countermeasure against face spoofing attacks. In ACCV, pages 121-132, 2012. +[15] Tiago de Freitas Pereira, André Anjos, José Mario De Martino, and Sébastien Marcel. Can face anti-spoofing counter-measures work in a real world scenario? In ICB, pages 1-8, 2013. + +[16] Litong Feng, Lai-Man Po, Yuming Li, Xuyuan Xu, Fang Yuan, Terence Chun-Ho Cheung, and Kwok-Wai Cheung. Integration of image quality and motion cues for face antispoofing: A neural network approach. Journal of Visual Communication and Image Representation, 38:451-460, 2016. +[17] Yao Feng, Fan Wu, Xiaohu Shao, Yanfeng Wang, and Xi Zhou. Joint 3d face reconstruction and dense alignment with position map regression network. In CVPR, 2017. +[18] Robert W. Frischholz and Ulrich Dieckmann. Biold: a multimodal biometric identification system. Computer, 33(2):64-68, 2000. +[19] Robert W Frischholz and Alexander Werner. Avoiding replay-attacks in a face recognition system using head-pose estimation. AMFGW, pages 234–235, 2003. +[20] Junying Gan, Shanlu Li, Yikui Zhai, and Chengyun Liu. 3d convolutional neural network based on face anti-spoofing. In ICMIP, pages 1-5, 2017. +[21] Jianzhu Guo, Xiangyu Zhu, Jinchuan Xiao, Zhen Lei, Genxun Wan, and Stan Z. Li. Improving face anti-spoofing by 3d virtual synthesis. In ICB, 2019. +[22] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. +[23] Wei Hu, Gusi Te, Ju He, Dong Chen, and Zongming Guo. Exploring hypergraph representation on face anti-spoofing beyond 2d attacks. arXiv preprint arXiv: 1811.11594v1, 2018. +[24] Wei Hu, Gusi Te, Ju He, Dong Chen, and Zongming Guo. Aurora guard: Real-time face anti-spoofing via light reflection. arXiv preprint arXiv: 1902.10311, 2019. +[25] international organization for standardization. Iso/iec jtc 1/sc 37 biometrics: Information technology biometric presentation attack detection part 1: Framework. In https://www.iso.org/obp/pii/iso, 2016. +[26] Amin Jourabloo, Yaojie Liu, and Xiaoming Liu. Face spoofing: Anti-spoofing via noise modeling. In Proceedings of the European Conference on Computer Vision (ECCV), pages 290-306, 2018. +[27] Nick Kanopoulos, Nagesh Vasanthavada, and Robert L. Baker. Design of an image edge detection filter using the sobel operator. IEEE Journal of solid-state circuits, 23(2):358-367, 1988. +[28] Jukka Komulainen, Abdenour Hadid, and Matti Pietikainen. Context based face anti-spoofing. In BTAS, pages 1-8, 2013. +[29] Jiangwei Li, Yunhong Wang, Tieniu Tan, and Anil K Jain. Live face detection based on the analysis of fourier spectra. SPIE (BTHI), 5404:296-304, 2004. +[30] Lei Li, Xiaoyi Feng, Zinelabidine Boulkenafet, Zhaoqiang Xia, Mingming Li, and Abdenour Hadid. An original face anti-spoofing approach using partial convolutional neural network. In IPTA, pages 1-6, 2016. +[31] Xiaobai Li, Jukka Komulainen, Guoying Zhao, Pong-Chi Yuen, and Matti Pietikainen. Generalized face anti-spoofing by detecting pulse from face videos. In 2016 23rd International Conference on Pattern Recognition (ICPR), pages 4244-4249. IEEE, 2016. + +[32] Bofan Lin, Xiaobai Li, Zitong Yu, and Guoying Zhao. Face liveness detection by rppg features and contextual patch-based cnn. In Proceedings of the 2019 3rd International Conference on Biometric Engineering and Applications, pages 61-68. ACM, 2019. +[33] Siqi Liu, Pong Chi Yuen, Shengping Zhang, and Guoying Zhao. 3d mask face anti-spoofing with remote photoplethysmography. 2016. +[34] Yaojie Liu, Amin Jourabloo, and Xiaoming Liu. Learning deep models for face anti-spoofing: Binary or auxiliary supervision. In CVPR, pages 389-398, 2018. +[35] Oeslle Lucena, Amadeu Junior, Vitor Moia, Roberto Souza, Eduardo Valle, and Roberto Lotufo. Transfer learning using convolutional neural networks for face anti-spoofing. In International Conference Image Analysis and Recognition, pages 27-34, 2017. +[36] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 9(Nov):2579-2605, 2008. +[37] Jukka Määttra, Abdenour Hadid, and Matti Pietikainen. Face spoofing detection from single images using micro-texture analysis. In IJCB, pages 1-7, 2011. +[38] Chaitanya Nagpal and Shiv Ram Dubey. A performance evaluation of convolutional neural networks for face anti spoofing. arXiv preprint arXiv:1805.04176, 2018. +[39] Ewa Magdalena Nowara, Ashutosh Sabharwal, and Ashok Veeraraghavan. Ppgsecure: Biometric presentation attack detection using photopletysmograms. 2017. +[40] Gang Pan, Lin Sun, Zhaohui Wu, and Shihong Lao. Eyeblink-based anti-spoofing in face recognition from a generic webcam. In ICCV, pages 1-8, 2007. +[41] Keyurkumar Patel, Hu Han, and Anil K Jain. Cross-database face antispoofing with robust feature representation. In Chinese Conference on Biometric Recognition, pages 611-619, 2016. +[42] Keyurkumar Patel, Hu Han, and Anil K Jain. Secure face unlock: Spoof detection on smartphones. IEEE transactions on information forensics and security, 11(10):2268-2283, 2016. +[43] Bruno Peixoto, Carolina Michelassi, and Anderson Rocha. Face liveness detection under bad illumination conditions. In ICIP, pages 3557-3560. IEEE, 2011. +[44] Allan Pinto, Helio Pedrini, William Robson Schwartz, and Anderson Rocha. Face spoofing detection through visual codebooks of spectral temporal cubes. IEEE Transactions on Image Processing, 24(12):4726-4740, 2015. +[45] Yunxiao Qin, Chenxu Zhao, Xiangyu Zhu, Zezheng Wang, Zitong Yu, Tianyu Fu, Feng Zhou, Jingping Shi, and Zhen Lei. Learning meta model for zero- and few-shot face anti-spoofing. AAAI, 2020. +[46] Xiao Song, Xu Zhao, Liangji Fang, and Tianwei Lin. Discriminative representation combinations for accurate face spoofing detection. Pattern Recognition, 85:220-231, 2019. +[47] Shuyang Sun, Zhanghui Kuang, Lu Sheng, Wanli Ouyang, and Wei Zhang. Optical flow guided feature: A fast and robust motion representation for video action recognition. In CVPR, pages 1390-1399, 2018. + +[48] Xiaoyang Tan, Yi Li, Jun Liu, and Lin Jiang. Face liveness detection from a single image with sparse low rank bilinear discriminative model. In ECCV, pages 504-517, 2010. +[49] Di Wen, Hu Han, and Anil K Jain. Face spoof detection with image distortion analysis. IEEE Transactions on Information Forensics and Security, 10(4):746-761, 2015. +[50] Zhenqi Xu, Shan Li, and Weihong Deng. Learning temporal features using lstm-cnn architecture for face anti-spoofing. In ACPR, pages 141-145, 2015. +[51] Jianwei Yang, Zhen Lei, and Stan Z. Li. Learn convolutional neural network for face anti-spoofing. Computer Science, 9218:373-384, 2014. +[52] Jianwei Yang, Zhen Lei, Shengcai Liao, and Stan Z Li. Face liveness detection with component dependent descriptor. In ICB, page 2, 2013. +[53] Xiao Yang, Wenhan Luo, Linchao Bao, Yuan Gao, Dihong Gong, Shibao Zheng, Zhifeng Li, and Wei Liu. Face anti-spoofing: Model matters, so does data. In CVPR, 2019. +[54] Zitong Yu, Yunxiao Qin, Xiaqing Xu, Chenxu Zhao, Zezheng Wang, Zhen Lei, and Guoying Zhao. Autofas: Searching lightweight networks for face anti-spoofing. ICASSP, 2020. +[55] Shifeng Zhang, Xiaobo Wang, Ajian Liu, Chenxu Zhao, Jun Wan, Sergio Escalera, Hailin Shi, Zezheng Wang, and Stan Z. Li. A dataset and benchmark for large-scale multimodal face anti-spoofing. In CVPR, 2019. +[56] Zhiwei Zhang, Junjie Yan, Sifei Liu, Zhen Lei, Dong Yi, and Stan Z Li. A face antispoofing database with diverse attacks. In ICB, pages 26-31, 2012. \ No newline at end of file diff --git a/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/images.zip b/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..216f27dacc94b3e1ee170cdb3b541acf2212bd67 --- /dev/null +++ b/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4420ad970fad206608751df789c56dd5ed232cbd6d2cd9dd242de514ed85eb17 +size 570979 diff --git a/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/layout.json b/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2113e35ee6692d5ae97d1cde80b9c88eb5ab5f18 --- /dev/null +++ b/deepspatialgradientandtemporaldepthlearningforfaceantispoofing/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f68b30757434d431fce9a725fd68c2b3f5e9298a7054c0d80cd053cb62b6f3be +size 439393 diff --git a/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/a5b1c44d-6749-4101-a9f3-461aaf129164_content_list.json b/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/a5b1c44d-6749-4101-a9f3-461aaf129164_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..25f4e7034b1d15efa19595d45463aec94e794674 --- /dev/null +++ b/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/a5b1c44d-6749-4101-a9f3-461aaf129164_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b7a90c7267b24a26c53a1d30bc0032dee723c118c634c6c3fa26ce6f338ac65 +size 77791 diff --git a/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/a5b1c44d-6749-4101-a9f3-461aaf129164_model.json b/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/a5b1c44d-6749-4101-a9f3-461aaf129164_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b99e7e74a8718af2f75f48087b5132da8ffe22fd --- /dev/null +++ b/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/a5b1c44d-6749-4101-a9f3-461aaf129164_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ac1eac9b1eaf592cf0b2f2f65aad5af93445d27a3cfdbe8c502cb23eaeb3c5a +size 96420 diff --git a/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/a5b1c44d-6749-4101-a9f3-461aaf129164_origin.pdf b/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/a5b1c44d-6749-4101-a9f3-461aaf129164_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d527d231ef165ebd4a1578f63d4e53d612880fc0 --- /dev/null +++ b/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/a5b1c44d-6749-4101-a9f3-461aaf129164_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc8d1d6cbee45de7f83335401373de3b8ee9ca5f91973623b5681f58f02a8243 +size 7056539 diff --git a/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/full.md b/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ab3b51e3357932f13f8d9f250dfec6d973794083 --- /dev/null +++ b/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/full.md @@ -0,0 +1,269 @@ +# Deep Stereo using Adaptive Thin Volume Representation with Uncertainty Awareness + +Shuo Cheng $^{1*}$ Zexiang Xu $^{1*}$ Shilin Zhu $^{1}$ + +Zhuwen Li² Li Erran Li3,4 Ravi Ramamoorthi1 Hao Su1 + +1University of California, San Diego 2Nuro Inc. 3Scale AI 4Columbia University + +# Abstract + +We present Uncertainty-aware Cascaded Stereo Network (UCS-Net) for 3D reconstruction from multiple RGB images. Multi-view stereo (MVS) aims to reconstruct fine-grained scene geometry from multi-view images. Previous learning-based MVS methods estimate per-view depth using plane sweep volumes (PSVs) with a fixed depth hypothesis at each plane; this requires densely sampled planes for high accuracy, which is impractical for high-resolution depth because of limited memory. In contrast, we propose adaptive thin volumes (ATVs); in an ATV, the depth hypothesis of each plane is spatially varying, which adapts to the uncertainties of previous per-pixel depth predictions. Our UCS-Net has three stages: the first stage processes a small PSV to predict low-resolution depth; two ATVs are then used in the following stages to refine the depth with higher resolution and higher accuracy. Our ATV consists of only a small number of planes with low memory and computation costs; yet, it efficiently partitions local depth ranges within learned small uncertainty intervals. We propose to use variance-based uncertainty estimates to adaptively construct ATVs; this differentiable process leads to reasonable and fine-grained spatial partitioning. Our multi-stage framework progressively sub-divides the vast scene space with increasing depth resolution and precision, which enables reconstruction with high completeness and accuracy in a coarse-to-fine fashion. We demonstrate that our method achieves superior performance compared with other learning-based MVS methods on various challenging datasets. + +# 1. Introduction + +Inferring 3D scene geometry from captured images is a core problem in computer vision and graphics with applications in 3D visualization, scene understanding, robotics and autonomous driving. Multi-view stereo (MVS) aims to reconstruct dense 3D representations from multiple images + +![](images/0d51ab59f5f4904d7fd9ce04eef2703bbec2aca9e60a1267a539973d0ec58fb2.jpg) +Figure 1: Our UCS-Net leverages adaptive thin volumes (ATVs) to progressively reconstruct a highly accurate high-resolution depth map through multiple stages. We show the input RGB image, depth predictions with increasing sizes from three stages, and our final point cloud reconstruction obtained by fusing multiple depth maps. We also illustrate a local slice (red) from our depth prediction with the corresponding ATV boundaries that reflect pixel-wise uncertainty intervals. Our ATVs become thinner after a stage with reduced uncertainty, which enables higher accuracy. + +with calibrated cameras. Inspired by the success of deep convolutional neural networks (CNN), several learning-based MVS methods have been presented [23, 27, 54, 20, 47]; the most recent work leverages cost volumes in a learning pipeline [58, 21], and outperforms many traditional MVS methods [13]. + +At the core of the recent success on MVS [58, 21] is the application of 3D CNNs on plane sweep cost volumes to effectively infer multi-view correspondence. However, such 3D CNNs involve massive memory usage for depth estimation with high accuracy and completeness. In particular, for a large scene, high accuracy requires sampling a large number of sweeping planes and high completeness requires reconstructing high-resolution depth maps. In general, given limited memory, there is an undesired trade-off between accuracy (more planes) and completeness (more pixels) in previous work [58, 21]. + +Our goal is to achieve highly accurate and highly complete reconstruction with low memory and computation consumption at the same time. To do so, we propose a novel learning-based uncertainty-aware multi-view stereo framework, which utilizes multiple small volumes, instead of a large standard plane sweep volume, to progressively regress high-quality depth in a coarse-to-fine fashion. A key in our method is that we propose novel adaptive thin volumes (ATVs, see Fig. 1) to achieve efficient spatial partitioning. + +Specifically, we propose a novel cascaded network with three stages (see Fig. 2): each stage of the cascade predicts a depth map with a different size; each following stage constructs an ATV to refine the predicted depth from the previous stage with higher pixel resolution and finer depth partitioning. The first stage uses a small standard plane sweep volume with low image resolution and relatively sparse depth planes - 64 planes that are fewer than the number of planes (256 or 512) in previous work [58, 59]; the following two stages use ATVs with higher image resolutions and significantly fewer depth planes - only 32 and 8 planes. While consisting of a very small number of planes, our ATVs are constructed within learned local depth ranges, which enables efficient and fine-grained spatial partitioning for accurate and complete depth reconstruction. + +This is made possible by the novel uncertainty-aware construction of an ATV. In particular, we leverage the variances of the predicted per-pixel depth probabilities, and infer the uncertainty intervals (as shown in Fig. 1) by calculating variance-based confidence intervals of the per-pixel probability distributions for the ATV construction. Specifically, we apply the previously predicted depth map as a central curved plane, and construct an ATV around the central plane within local per-pixel uncertainty intervals. In this way, we explicitly express the uncertainty of the depth prediction at one stage, and embed this knowledge into the input volume for the next stage. + +Our variance-based uncertainty estimation is differentiable and we train our UCSNet from end to end with depth supervision for the predicted depths from all three stages. Our network can thus learn to optimize the estimated uncertainty intervals, to make sure that an ATV is constructed with proper depth coverage that is both large enough – to try to cover ground truth depth – and small enough – to enable accurate reconstruction for the following stages. Overall, our multi-stage framework can progressively sub-divide the local space at a finer scale in a reasonable way, which leads to high-quality depth reconstruction. We demonstrate that our novel UCS-Net outperforms the state-of-the-art learning-based MVS methods on various datasets. + +# 2. Related Work + +Multi-view stereo is a long-studied vision problem with many traditional approaches [44, 39, 33, 32, 26, 10, 8, 13, + +[43]. Our learning-based framework leverages the novel spatial representation, ATV to reconstruct high-quality depth for fine-grain scene reconstruction. In this work, we mainly discuss spatial representation for 3D reconstruction and deep learning based multi-view stereo. + +Spatial Representation for 3D Reconstruction. Existing methods can be categorized based on learned 3D representations. Volumetric based approaches partition the space into a regular 3D volume with millions of small voxels [23, 27, 54, 55, 60, 40], and the network predicts if a voxel is on the surface or not. Ray tracing can be incorporated into this voxelized structure [49, 38, 50]. The main drawback of these methods is computation and memory inefficiency, given that most voxels are not on the surface. Researchers have also tried to reconstruct point clouds [22, 13, 35, 52, 36, 2], however the high dimensionality of a point cloud often results in noisy outliers since a point cloud does not efficiently encode connectivity between points. Some recent works utilize single or multiple images to reconstruct a point cloud given strong shape priors [11, 22, 36], which cannot be directly extended to large-scale scene reconstruction. Recent work also tried to directly reconstruct surface meshes [34, 25, 53, 19, 46, 28], deformable shapes [24, 25], and some learned implicit distance functions [7, 41, 37, 6]. These reconstructed surfaces often look smoother than point-cloud-based approaches, but often lack high-frequency details. A depth map represents dense 3D information that is perfectly aligned with a reference view; depth reconstruction has been demonstrated in many previous works on reconstruction with both single view [9, 51, 16, 17, 62] and multiple views [4, 48, 18, 14, 43, 57, 43]. Some of them leverage normal information as well [14, 15]. In this paper, we present ATV, a novel spatial representation for depth estimation; we use two ATVs to progressively partition local space, which is the key to achieve coarse-to-fine reconstruction. + +Deep Multi-View Stereo (MVS). The traditional MVS pipeline mainly relies on photo-consistency constraints to infer the underlying 3D geometry, but usually performs poorly on texture-less or occluded areas, or under complex lighting environments. To overcome such limitations, many deep learning-based MVS methods have emerged in the last two years, including regression-based approaches [58, 21], classification-based approaches [20] and approaches based on recurrent- or iterative- style architectures [59, 61, 5] and many other approaches [30, 38, 3, 45]. Most of these methods build a single cost volume with uniformly sampled depth hypotheses by projecting 2D image features into 3D space, and then use a stack of either 2D or 3D CNNs to infer the final depth [58, 12, 56]. However, a single cost volume often requires a large number of depth planes to achieve enough reconstruction accuracy, and it is difficult to reconstruct high-resolution depth, limited by the memory bottle + +![](images/e9ec13febd16857cd42d28bedbcd37a19cea1915e9421bba3f3e161f6278810e.jpg) +Figure 2: Overview of our UCS-Net. Our UCS-Net leverages multi-scale cost volumes to achieve coarse-to-fine depth prediction with three cascade stages. The cost volumes are constructed using multi-scale deep image features from a multiscale feature extractor. The last two stages utilize the uncertainty of the previous depth prediction to build adaptive thin volumes (ATVs) for depth reconstruction at a finer scale. We mark different parts of the network in different colors. Please refer to Sec 3 and the corresponding subsections for more details. + +neck. R-MVSNet [59] leverages recurrent networks to sequentially build a cost volume with a high depth-wise sampling rate (512 planes). In contrast, we apply an adaptive sampling strategy with ATVs, which enables more efficient spatial partitioning with a higher depth-wise sampling rate using fewer depth planes (104 planes in total, see Tab. 3), and our method achieves significantly better reconstruction than R-MVSNet (see Tab. 1 and Tab. 2). On the other hand, Point-MVSNet [5] densifies a coarse reconstruction within a predefined local spatial range for better reconstruction with learning-based refinement. We propose to refine depth in a learned local space with adaptive thin volumes to obtain accurate high-resolution depth, which leads to better reconstruction than Point-MVSNet and other state-of-the-art methods (see Tab. 1 and Tab. 2). + +# 3. Method + +Some recent works aim to improve learning-based MVS methods. Recurrent networks [59] have been utilized to achieve fine depth-wise partitioning for high accuracy; a PointNet-based method [5] is also presented to densify the reconstruction for high completeness. Our goal is to reconstruct high-quality 3D geometry with both high accuracy and high completeness. To this end, we propose a novel uncertainty-aware cascaded network (UCS-Net) to reconstruct highly accurate per-view depth with high resolution. + +Given a reference image $\mathbf{I}_1$ and $N - 1$ source images $\{\mathbf{I}_i\}_{i = 2}^N$ , our UCS-Net progressively regresses a fine-grained depth map at the same resolution as the refer + +ence image. We show the architecture of the UCS-Net in Fig. 2. Our UCS-Net first leverages a 2D CNN to extract multi-scale deep image features at three resolutions (Sec. 3.1). Our depth prediction is achieved through three stages, which leverage multi-scale image features to predict multi-resolution depth maps. In these stages, we construct multi-scale cost volumes (Sec. 3.2), where each volume is a plane sweep volume or an adaptive thin volume (ATV). We then apply 3D CNNs to process the cost volumes to predict per-pixel depth probability distributions, and a depth map is reconstructed from the expectations of the distributions (Sec. 3.3). To achieve efficient spatial partitioning, we utilize the uncertainty of the depth prediction to construct ATVs as cost volumes for the last two stages (Sec. 3.4). Our multi-stage network effectively reconstructs depth in a coarse-to-fine fashion (Sec. 3.5). + +# 3.1. Multi-scale feature extractor + +Previous methods use downsampling layers [58, 59] or a UNet [56] to extract deep features and build a plane sweep volume at a single resolution. To reconstruct high-resolution depth, we introduce a multi-scale feature extractor, which enables constructing multiple cost volumes at different scales for multi-resolution depth prediction. As schematically shown in Fig. 2, our feature extractor is a small 2D UNet [42], which has an encoder and a decoder with skip connections. The encoder consists of a set of convolutional layers followed by BN (batch normalization) and ReLu activation layers; we use stride $= 2$ convolutions to + +downsample the original image size twice. The decoder upsamples the feature maps, convolves the upsampled features and the concatenated features from skip links, and also applies BN and Relu layers. Given each input image $\mathbf{I}_i$ , the feature extractor provides three scale feature maps, $F_{i,1}$ , $F_{i,2}$ , $F_{i,3}$ , from the decoder for the following cost volume construction. We represent the original image size as $W\times H$ , where $W$ and $H$ denote the image width and height; correspondingly, $F_{i,1}$ , $F_{i,2}$ and $F_{i,3}$ have resolutions of $\frac{W}{4}\times \frac{H}{4}$ , $\frac{W}{2}\times \frac{H}{2}$ and $W\times H$ , and their numbers of channels are 32, 16 and 8 respectively. Our multi-scale feature extractor allows for the high-resolution features to properly incorporate the information at lower resolutions through the learned upsampling process; thus in the multi-stage depth prediction, each stage is aware of the meaningful feature knowledge used in previous stages, which leads to reasonable high-frequency feature extraction. + +# 3.2. Cost volume construction + +We construct multiple cost volumes at multiple scales by warping the extracted feature maps, $F_{i,1}$ , $F_{i,2}$ , $F_{i,3}$ from source views to a reference view. Similar to previous work, this process is achieved through differentiable unprojection and projection. In particular, given camera intrinsic and extrinsic matrices $\{K_i,T_i\}$ for each view $i$ , the $4\times 4$ warping matrix at depth $d$ at the reference view is given by: + +$$ +H _ {i} (d) = K _ {i} T _ {i} T _ {1} ^ {- 1} K _ {1} ^ {- 1}. \tag {1} +$$ + +In particular, when warping to a pixel in the reference image $\mathbf{I}_1$ at location $(x,y)$ and depth $d$ , $H_{i}(d)$ multiplies the homogeneous vector $(xd,yd,d,1)$ to find its corresponding pixel location in each $\mathbf{I}_i$ in homogeneous coordinates. + +Each cost volume consists of multiple planes; we use $\mathbf{L}_{k,j}$ to denote the depth hypothesis of the $j$ th plane at the $k$ th stage, and $\mathbf{L}_{k,j}(x)$ represents its value at pixel $x$ . At stage $k$ , once we warp per-view feature maps $F_{i,k}$ at all depth planes with corresponding hypotheses $\mathbf{L}_{k,j}$ , we calculate the variance of the warped feature maps across views at each plane to construct a cost volume. We use $D_{k}$ to represent the number of planes for stage $k$ . For the first stage, we build a standard plane sweep volume, whose depth hypotheses are of constant values, i.e. $\mathbf{L}_{1,j}(x) = d_j$ . We uniformly sample $\{d_j\}_{j=1}^{D_1}$ from a pre-defined depth interval $[d_{min}, d_{max}]$ to construct the volume, in which each plane is constructed using $H_{i}(d_j)$ to warp multi-view images. For the second and third stages, we build novel adaptive thin volumes, whose depth hypotheses have spatially-varying depth values according to pixel-wise uncertainty estimates of the previous depth prediction. In this case, we calculate per-pixel per-plane warping matrices by setting $d = \mathbf{L}_{k,j}(x)$ in Eqn. 1 to warp images and construct cost volumes. Please refer to Sec. 3.4 for uncertainty estimation. + +# 3.3. Depth prediction and probability distribution + +At each stage, we apply a 3D CNN to process the cost volume, infer multi-view correspondence and predict depth probability distributions. In particular, we use a 3D UNet similar to [58], which has multiple downsampling and upsampling 3D convolutional layers to reason about scene geometry at multiple scales. We apply depth-wise softmax at the end of the 3D CNNs to predict per-pixel depth probabilities. Our three stages use the same network architecture without sharing weights, so that each stage learns to process its information at a different scale. Please refer to the supplemental material for details of our 3D CNN architecture. + +The 3D CNN at each stage predicts a depth probability volume that consists of $D_{k}$ depth probability maps $\mathbf{P}_{k,j}$ associated with the depth hypotheses $\mathbf{L}_{k,j}$ . $\mathbf{P}_{k,j}$ expresses per-pixel depth probability distributions, where $\mathbf{P}_{k,j}(x)$ represents how probable the depth at pixel $x$ is $\mathbf{L}_{k,j}(x)$ . A depth map $\hat{\mathbf{L}}_k$ at stage $k$ is reconstructed by weighted sum: + +$$ +\hat {\mathbf {L}} _ {k} (x) = \sum_ {j = 1} ^ {D _ {k}} \mathbf {L} _ {k, j} (x) \cdot \mathbf {P} _ {k, j} (x). \tag {2} +$$ + +# 3.4. Uncertainty estimation and ATV + +The key for our framework is to progressively subpartition the local space and refine the depth prediction with increasing resolution and accuracy. To do so, we construct novel ATVs for the last two stages, which have curved sweeping planes with spatially-varying depth hypotheses (as illustrated in Fig. 1 and Fig. 2), based on uncertainty inference of the predicted depth in its previous stage. + +Given a set of depth probability maps, previous work only utilizes the expectation of the per-pixel distributions (using Eqn. (2)) to determine an estimated depth map. For the first time, we leverage the variance of the distribution for uncertainty estimation, and construct ATVs using the uncertainty. In particular, the variance $\hat{\mathbf{V}}_k(x)$ of the probability distribution at pixel $x$ and stage $k$ is calculated as: + +$$ +\hat {\mathbf {V}} _ {k} (x) = \sum_ {j = 1} ^ {D _ {k}} \mathbf {P} _ {k, j} (x) \cdot \left(\mathbf {L} _ {k, j} (x) - \hat {\mathbf {L}} _ {k} (x)\right) ^ {2}, \tag {3} +$$ + +and the corresponding standard deviation is $\hat{\sigma}_k(x) = \sqrt{\hat{\mathbf{V}}_k}$ . Given the depth prediction $\hat{\mathbf{L}}_k(x)$ and its variance $\hat{\sigma}_k(x)^2$ at pixel $x$ , we propose to use a variance-based confidence interval to measure the uncertainty of the prediction: + +$$ +\mathbf {C} _ {k} (x) = \left[ \hat {\mathbf {L}} _ {k} (x) - \lambda \hat {\sigma} _ {k} (x), \hat {\mathbf {L}} _ {k} (x) + \lambda \hat {\sigma} _ {k} (x) \right], \tag {4} +$$ + +where $\lambda$ is a scalar parameter that determines how large the confidence interval is. For each pixel $x$ , we uniformly sample $D_{k + 1}$ depth values from $\mathbf{C}_k(x)$ of the $k$ th stage, to get its depth values $\mathbf{L}_{k + 1,1}(x), \mathbf{L}_{k + 1,2}(x), \dots, \mathbf{L}_{k + 1,D_{k + 1}}(x)$ + +![](images/b5ccef9546ddb28839f30f6bca48b9447ad98acf251d8f2c73a18dced764315a.jpg) +Figure 3: We illustrate detailed depth and uncertainty estimation of two examples. On the top, we show the RGB image crops, predicted depth and ground truth depth. On the bottom, we show the details of two pixels (red points in the images) with predicted depth probabilities (connected blue dots), depth prediction (red dash line), the ground truth depth (black dash line) and uncertainty intervals (purple) in the three stages. + +of the depth planes for stage $(k + 1)$ . In this way, we construct $D_{k + 1}$ spatially-varying depth hypotheses $\mathbf{L}_{k + 1,j}$ , which form the ATV for stage $(k + 1)$ . + +The estimated $\mathbf{C}_k(x)$ expresses the uncertainty interval of the prediction $\hat{\mathbf{L}}_k(x)$ , which determines the physical thickness of an ATV at each pixel. In Fig. 3, we show two actual examples with two pixels and their estimated uncertainty intervals $\mathbf{C}_k(x)$ around the predictions (red dash line). The $\mathbf{C}_k$ essentially depicts a probabilistic local space around the ground truth surface, and the ground truth depth is located in the uncertainty interval with a very high confidence. Note that, our variance-based uncertainty estimation is differentiable, which enables our UCS-Net to learn to adjust the probability prediction at each stage to achieve optimized intervals and corresponding ATVs for following stages in an end-to-end training process. As a result, the spatially varying depth hypotheses in ATVs naturally adapt to the uncertainty of depth predictions, which leads to highly efficient spatial partitioning. + +# 3.5. Coarse-to-fine prediction + +Our UCS-Net leverages three stages to reconstruct depth at multiple scales from coarse to fine, which generally supports different numbers $(D_{k})$ of planes in each stage. In practice, we use $D_{1} = 64$ , $D_{2} = 32$ and $D_{3} = 8$ to construct a plane sweep volume and two ATVs with sizes of $\frac{W}{4} \times \frac{H}{4} \times 64$ , $\frac{W}{2} \times \frac{H}{2} \times 32$ and $H \times W \times 8$ to estimate depth at corresponding resolutions. While our two ATVs have small numbers (32 and 8) of depth planes, they in fact partition local depth ranges at finer scales than the first stage volume; this is achieved by our novel uncertainty-aware volume construction process which adaptively controls local depth intervals. This efficient usage of a small + +
MethodAcc.Comp.Overall
Camp [4]0.8350.5540.695
Furu [13]0.6130.9410.777
Tola [48]0.3421.1900.766
Gipuma [14]0.2830.8730.578
SurfaceNet [46]0.4501.0400.745
MVSNet [58]0.3960.5270.462
R-MVSNet [59]0.3830.4520.417
Point-MVSNet [5]0.3420.4110.376
Our 1st stage0.5480.5290.539
Our 2nd stage0.4010.3970.399
Our full model0.3380.3490.344
+ +Table 1: Quantitative results of accuracy, completeness and overall on the DTU testing set. Numbers represent distances in millimeters and smaller means better. + +number of depth planes enables the last two stages to deal with higher pixel-wise resolutions given the limited memory, which makes fine-grained depth reconstruction possible. Our novel ATV effectively expresses the locality and uncertainty in the depth prediction, which enables state-of-the-art depth reconstruction results with high accuracy and high completeness through a coarse-to-fine framework. + +# 3.6. Training details + +Training set. We train our network on the DTU dataset [1]. We split the dataset into training, validate and testing set, and create ground truth depth similar to [58]. In particular, we apply Poisson reconstruction [29] on the point clouds in DTU, and render the surface at the captured views with three resolutions, $\frac{W}{4} \times \frac{H}{4}$ , $\frac{W}{2} \times \frac{H}{2}$ and the original $W \times H$ . In particular, we use $W \times H = 640 \times 512$ for training. + +Loss function. Our UCS-Net predicts depth at three resolutions; we apply $L1$ loss on depth prediction at each resolution with the rendered ground truth at the same resolution. Our final loss is the combination of the three $L1$ losses. + +Training policy. We train our full three-stage network from end to end for 60 epochs. We use Adam optimizer with an initial learning rate of 0.0016. We use 8 NVIDIA GTX 1080Ti GPUs to train the network with a batch size of 16 (mini-batch size of 2 per GPU). + +# 4. Experiments + +We now evaluate our UCS-Net. We do benchmarking on the DTU and Tanks and Temple datasets. We then justify the effectiveness of the designs of our network, in terms of uncertainty estimation and multi-stage prediction. + +Evaluation on the DTU dataset [1]. We evaluate our method on the DTU testing set. To reconstruct the final point cloud, we follow [14] to fuse the depth from multiple views; we use this fusion method for all our experi + +
MethodMeanFamilyFrancisHorseLighthouse M60PantherPlayground Train
MVSNet[58]43.4855.9928.5525.0750.7953.9650.8647.9034.69
R-MVSNet[59]48.4069.9646.6532.5942.9551.8848.8052.0042.38
Dense-R-MVSNet[59]50.5573.0154.4643.4243.8846.8046.6950.8745.25
Point-MVSNet[5]48.2761.7941.1534.2050.7951.9750.8552.3843.06
Our full model54.8376.0953.1643.0354.0055.6051.4957.3847.89
+ +Table 2: Quantitative results of F-scores (higher means better) on Tanks and Temples. + +![](images/05f2b3369fe4daf5840710c519cefe6eebe2a496d3c328b6a3d14a0c6ebeb5aa.jpg) +Figure 4: Comparisons with R-MVSNet on an example in the DTU dataset. We show rendered images of the point clouds of our method, R-MVSNet and the ground truth. In this example, the ground truth from scanning is incomplete. We also show insets for detailed comparisons marked as a blue box in the ground truth. Note that our result is smoother and has fewer outliers than R-MVSNet's result. + +periments. For fair comparisons, we use the same view selection, image size and initial depth range as in [58] with $N = 5$ , $W = 1600$ , $H = 1184$ , $d_{\mathrm{min}} = 425mm$ and $d_{\mathrm{max}} = 933.8mm$ ; similar settings are also used in other learning-based MVS methods [5, 59]. We use a NVIDIA GTX 1080 Ti GPU to run the evaluation. + +We compare the accuracy and the completeness of the final reconstructions using the distance metric in [1]. We compare against both traditional methods and learning-based methods, and the average quantitative results are shown in Tab. 1. While Gipuma [14] (a traditional method) achieves the best accuracy among all methods, our method has significantly better completeness and overall scores. Besides, our method outperforms all state-of-the-art baseline methods in terms of both accuracy and completeness. Note that with the same input, MVSNet and R-MVSNet predict depth maps with a size of only $\frac{W}{4} \times \frac{H}{4}$ ; our final depth maps are estimated at the original image size, which are of much higher resolution and lead to significantly better completeness. Meanwhile, such high completeness is + +obtained without losing accuracy; our accuracy is also significantly better thanks to our uncertainty-aware progressive reconstruction. Point-MVSNet [5] densifies low-resolution depth within a predefined local depth range, which also reconstructs depth at the original image resolution; in contrast, our UCS-Net leverages learned adaptive local depth ranges and achieves better accuracy and completeness. + +We also show results from our intermediate low-resolution depth of the first and the second stages in Tab. 1. Note that, because of sparser depth planes, our first-stage results (64 planes) are worse than MVSNet (256 planes) and R-MVSNet (512 planes) that reconstruct depth at the same low resolution. Nevertheless, our novel uncertainty-aware network introduces highly efficient spatial partitioning with ATVs in the following stages, so that our intermediate second-stage reconstruction is already much better than the two previous methods, and our third stage further improves the quality and achieves the best reconstruction. + +We show qualitative comparisons between our method and R-MVSNet [59] in Fig. 4, in which we use the released point cloud reconstruction on R-MVSNet's website for the comparison. While both methods achieve comparable completeness in this example, it is very hard for R-MVSNet to achieve high accuracy at the same time, which introduces obvious outliers and noise on the surface. In contrast, our method is able to obtain high completeness and high accuracy simultaneously as reflected by the smooth complete geometry in the image. + +Evaluation on Tanks and Temple dataset [31]. We now evaluate the generalization of our model by testing our network trained with the DTU dataset on complex outdoor scenes in the Tanks and Temple intermediate dataset. We use $N = 5$ and $W \times H = 1920 \times 1056$ for this experiment. Our method outperforms most published methods, and to the best of our knowledge, when comparing with all published learning-based methods, we achieve the best average F-score (54.83) as shown in Tab. 2. In particular, our method obtains higher F-scores than MVSNet [58] and Point-MVSNet [5] in all nine testing scenes. Dense-R-MVSNet leverages a well-designed post-processing method and achieves slightly better performance than ours on two of the scenes, whereas our work is focused on high-quality per-view depth reconstruction, and we use a traditional fu + +
RatioIntervalDkUnit
PSV100%508.8mm647.95mm
1st ATV94.72%13.88mm320.43mm
2st ATV85.22%3.83mm80.48mm
+ +sion technique for post-processing. Nonetheless, thanks to our high-quality depth, our method still outperforms Dense-R-MVSNet on most of the testing scenes and achieves the best overall performance. + +Evaluation of uncertainty estimation. One key design of our UCS-Net is leveraging differentiable uncertainty estimation for the ATV construction. We now evaluate our uncertainty estimation on the DTU validate set. In Tab. 3, we show the average length of our estimated uncertainty intervals, the corresponding average sampling distances between planes, and the ratio of the pixels whose estimated uncertainty intervals cover the ground truth depth in the ATVs; we also show the corresponding values of the standard plane sweep volume (PSV) used in the first stage, which has an interval length of $d_{\mathrm{max}} - d_{\mathrm{min}} = 508.8mm$ and covers the ground truth depth with certainty. + +We can see that our method is able to construct efficient ATVs that cover very local depth ranges. The first ATV significantly reduces the initial depth range from $508.8\mathrm{mm}$ to only $13.88\mathrm{mm}$ in average, and the second ATV further reduces it to only $3.83\mathrm{mm}$ . Our ATV enables efficient depth sampling in an adaptive way, and obtains about $0.48\mathrm{mm}$ sampling distance with only 32 or 8 depth planes. Note that, MVSNet and R-MVSNet sample the same large depth range $(508.8\mathrm{mm})$ in a uniform way with a large number of planes (256 and 512); yet, the uniform sampling merely obtains volumes with sampling distances of $1.99\mathrm{mm}$ and $0.99\mathrm{mm}$ along depth. In contrast, our UCS-Net achieves a higher actual depth-wise sampling rate with a small number of planes; this allows for the focus of the cost volumes to be changed from sampling the depth to sampling the image plane with dense pixels in ATVs given the limited memory, which enables high-resolution depth reconstruction. + +Besides, our adaptive thin volumes achieve high ratios (94.72% and 85.22%) of covering the ground truth depth in the validate set, as shown in Tab. 3; this justifies that our estimated uncertainty intervals are of high confidence. Our variance-based uncertainty estimation is equivalent to ap + +Table 3: Evaluation of uncertainty estimation. The PSV is the first-stage plane sweep volume; the 1st ATV is constructed after the first stage and used in the second stage; the 2nd ATV is used in the third stage. We show the percentages of uncertainty intervals that cover the ground truth depth. We also show the average length of the intervals, the number of depth planes and the unit sampling distance. + +
StageScaleSizeAcc.Comp.Overall
1×1400x2960.5480.5290.539
1×2800x5920.4110.5350.473
2×1800x5920.4010.3970.399
2×21600x11840.3420.3860.364
3×11600x11840.3380.3490.344
+ +Table 4: Ablation study on the DTU testing set with different stages and upsampling scales (a scale of 1 represents the original result at the stage). The quantitative results represent average distances in mm (lower is better). + +proximating a depth probability distribution as a Gaussian distribution and then computing its confidence interval with a specified scale on its standard deviation as in Eqn. 4. + +We note that our variance-based uncertainty estimation is not only valid for single-mode Gaussian-like distributions as in Fig. 3.a, but also valid for many multi-mode cases as in Fig. 3.b, which shows a challenging example near object boundary. In Fig. 3.b, the predicted first-stage depth distribution has multiple modes; yet, it correspondingly has large variance and a large enough uncertainty interval. Our network predicts reasonable uncertainty intervals that are able to cover the ground truth depth in most cases, which allows for increasingly accurate reconstruction in the following stages at finer local spatial scales. This is made possible by the differentiable uncertainty estimation and the end-to-end training process, from which the network learns to control per-stage probability estimation to obtain proper uncertainty intervals for ATV construction. Because of this, we observe that our network is not very sensitive to different $\lambda$ , and learns to predict similar uncertainty. Our uncertainty-aware volume construction process enables highly efficient spatial partitioning, which further allows for the final reconstruction to be of high accuracy and high completeness. + +Evaluation of multi-stage depth prediction. We have quantitatively demonstrated that our multi-stage framework reconstructs scene geometry with increasing accuracy and completeness in every stage (see Fig. 1). We now further evaluate our network and do ablation studies about different stages on the DTU testing set with detailed quantitative and qualitative comparisons. We compare with naive upsampling to justify the effectiveness of our uncertainty-aware coarse-to-fine framework. In particular, we compare the results from our full model and the results from the first two stages with naive bilinear upsampling using a scale of 2 (for both height and width) in Tab. 4. We can see that upsampling does improve the reconstruction, which benefits from denser geometry and using our high-quality low-resolution results as input. However, the improvement made by naive upsampling is very limited, which is much lower than our improvement from our ATV-based upsampling. Our UCSNet makes use of the ATV - a learned local spatial repre + +![](images/a5c19ec2d258e46bfed20c68a6848e854f5dde472dfa91e560d7e6d70fd8d4da.jpg) +Figure 5: Qualitative comparisons between multi-stage point clouds and the ground truth point cloud on a scene in the DTU validate set. We show zoom-out (top) and zoom-in (bottom) rendered point clouds; the corresponding zoom-in region is marked in the ground truth as a green box. Our UCS-Net achieves increasingly dense and accurate reconstruction through the multiple stages. Note that, the ground truth point cloud is obtained by scanning, which is even of lower quality than our reconstructions in this example. + +![](images/e481f06c66002110ca60e64abbefbf8704578ae55b13fe2f13a63aa15c4af84b.jpg) + +![](images/bd90895bc96f4ed0f3a0a69e2addad91dc4badc52631000e862f3663dca124dd.jpg) + +![](images/9abfc6a0c314b9e8a3d517a632ecedd9fd413af456b717ab92680d1ca6471584.jpg) + +
MethodRunning time (s)Memory (MB)Input sizePrediction size
One stage0.0651309160x120
Two stages0.1141607640x480320x240
Our full model0.2571647640x480
MVSNet [58]1.0494511640x480160x120
R-MVSNet [59]1.4214261640x480160x120
+ +Table 5: Performance comparisons. We show the running time and memory of our method by running the first stage, the first two stages and our full model. + +sentation that is constructed in an uncertainty-aware way – to reasonably densify the map with a significant increase of both completeness and accuracy at the same time. + +Figure. 5 shows qualitative comparisons between our reconstructed point clouds and the ground truth point cloud. Our UCS-Net is able to effectively refine and densify the reconstruction through multiple stages. Note that, our MVS-based reconstruction is even more complete than the ground truth point cloud that is obtained by scanning, which shows the high quality of our reconstruction. + +Comparing runtime performance. We now evaluate the timing and memory usage of our method. We run our model on the DTU validate set with an input image resolution of $W \times H = 640 \times 480$ ; We compare performance with MVSNet and R-MVSNet with 256 depth planes using the same inputs. Table 5 shows the performance comparisons including running time and memory. Note that, our full model is the only one that reconstructs the depth at the original image resolution that is much higher than the comparison methods. However, this hasn't introduced any higher computation or memory consumption. In fact, our method requires signif + +icantly less memory and shorter running time, which are only about a quarter of the memory and time used in other methods. This demonstrates the benefits of our coarse-to-fine framework with fewer depth planes (104 in total), in terms of system resource usage. Our UCS-Net with ATVs achieves high-quality reconstruction with high computation and memory efficiency. + +# 5. Conclusion + +In this paper, we present a novel deep learning-based approach for multi-view stereo. We propose the novel uncertainty-aware cascaded stereo network (UCS-Net), which utilizes the adaptive thin volume (ATV), a novel spatial representation. For the first time, we make use of the uncertainty of the prediction in a learning-based MVS system. Specifically, we leverage variance-based uncertainty intervals at one cascade stage to construct an ATV for its following stage. The ATVs are able to progressively subpartition the local space at a finer scale, and ensure that the smaller volume still surrounds the actual surface with a high probability. Our novel UCS-Net achieves highly accurate and highly complete scene reconstruction in a coarse-to-fine fashion. We compare our method with various state-of-the-art benchmarks; we demonstrate that our method is able to achieve the qualitatively and quantitatively best performance with high computation- and memory-efficiency. Our novel UCS-Net takes a step towards making the learning-based MVS method more reliable and efficient. + +Acknowledgements This work was funded in part by Kuaishou Technology, NSF grant IIS-1764078, NSF grant 1703957, the Ronald L. Graham chair and the UC San Diego Center for Visual Computing. + +# References + +[1] Henrik Aanaes, Rasmus Ramsbøl Jensen, George Vogiatzis, Engin Tola, and Anders Bjorholm Dahl. Large-scale data for multiple-view stereopsis. International Journal of Computer Vision, 120(2):153-168, 2016. 5, 6 +[2] Panos Achlioptas, Olga Diamanti, Ioannis Mitliagkas, and Leonidas Guibas. Learning representations and generative models for 3d point clouds. In International Conference on Machine Learning, pages 40-49, 2018. 2 +[3] Konstantinos Batsos, Changjiang Cai, and Philippos Mordohai. Cbmv: A coalesced bidirectional matching volume for disparity estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2060–2069, 2018. 2 +[4] Neill DF Campbell, George Vogiatzis, Carlos Hernandez, and Roberto Cipolla. Using multiple hypotheses to improve depth-maps for multi-view stereo. In European Conference on Computer Vision, pages 766-779. Springer, 2008. 2, 5 +[5] Rui Chen, Songfang Han, Jing Xu, and Hao Su. Point-based multi-view stereo network. In Proceedings of the IEEE International Conference on Computer Vision, pages 1538-1547, 2019. 2, 3, 5, 6 +[6] Zhiqin Chen and Hao Zhang. Learning implicit fields for generative shape modeling. Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2 +[7] Angela Dai, Charles Ruizhongtai Qi, and Matthias Nießner. Shape completion using 3d-encoder-predictor cnns and shape synthesis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5868–5877, 2017. 2 +[8] Jeremy S De Bonet and Paul Viola. Poxels: Probabilistic voxelized volume reconstruction. In Proceedings of International Conference on Computer Vision (ICCV), pages 418-425, 1999. 2 +[9] David Eigen and Rob Fergus. Predicting depth, surface normals and semantic labels with a common multi-scale convolutional architecture. In Proceedings of the IEEE international conference on computer vision, pages 2650-2658, 2015. 2 +[10] Carlos Hernández Esteban and Francis Schmitt. Silhouette and stereo fusion for 3d object modeling. Computer Vision and Image Understanding, 96(3):367-392, 2004. 2 +[11] Haoqiang Fan, Hao Su, and Leonidas J Guibas. A point set generation network for 3d object reconstruction from a single image. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 605-613, 2017. 2 +[12] John Flynn, Ivan Neulander, James Philbin, and Noah Snavely. Deepstereo: Learning to predict new views from the world's imagery. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5515-5524, 2016. 2 +[13] Yasutaka Furukawa and Jean Ponce. Accurate, dense, and robust multiview stereopsis. IEEE transactions on pattern analysis and machine intelligence, 32(8):1362-1376, 2010. 1, 2, 5 + +[14] Silvano Galliani, Katrin Lasinger, and Konrad Schindler. Massively parallel multiview stereopsis by surface normal diffusion. In Proceedings of the IEEE International Conference on Computer Vision, pages 873-881, 2015. 2, 5, 6 +[15] Silvano Galliani and Konrad Schindler. Just look at the image: viewpoint-specific surface normal prediction for improved multi-view reconstruction. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5479-5487, 2016. 2 +[16] Ravi Garg, Vijay Kumar BG, Gustavo Carneiro, and Ian Reid. Unsupervised cnn for single view depth estimation: Geometry to the rescue. In European Conference on Computer Vision, pages 740-756. Springer, 2016. 2 +[17] Clément Godard, Oisin Mac Aodha, and Gabriel J Brostow. Unsupervised monocular depth estimation with left-right consistency. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 270-279, 2017. 2 +[18] Wilfried Hartmann, Silvano Galliani, Michal Havlena, Luc Van Gool, and Konrad Schindler. Learned multi-patch similarity. In Proceedings of the IEEE International Conference on Computer Vision, pages 1586-1594, 2017. 2 +[19] Paul Henderson and Vittorio Ferrari. Learning single-image 3d reconstruction by generative modelling of shape, pose and shading. International Journal of Computer Vision, pages 1-20, 2019. 2 +[20] Po-Han Huang, Kevin Matzen, Johannes Kopf, Narendra Ahuja, and Jia-Bin Huang. Deepmvs: Learning multi-view stereopsis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2821-2830, 2018. 1, 2 +[21] Sunghoon Im, Hae-Gon Jeon, Stephen Lin, and In-So Kweon. Dpsnet: End-to-end deep plane sweep stereo. In 7th International Conference on Learning Representations, ICLR 2019. International Conference on Learning Representations, ICLR, 2019. 1, 2 +[22] Eldar Insafutdinov and Alexey Dosovitskiy. Unsupervised learning of shape and pose with differentiable point clouds. In Advances in Neural Information Processing Systems, pages 2807-2817, 2018. 2 +[23] Mengqi Ji, Juergen Gall, Haitian Zheng, Yebin Liu, and Lu Fang. Surfacenet: An end-to-end 3d neural network for multiview stereopsis. In Proceedings of the IEEE International Conference on Computer Vision, pages 2307-2315, 2017. 1, 2 +[24] Angjoo Kanazawa, Michael J Black, David W Jacobs, and Jitendra Malik. End-to-end recovery of human shape and pose. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7122-7131, 2018. 2 +[25] Angjoo Kanazawa, Shubham Tulsiani, Alexei A Efros, and Jitendra Malik. Learning category-specific mesh reconstruction from image collections. In Proceedings of the European Conference on Computer Vision (ECCV), pages 371-386, 2018. 2 +[26] Sing Bing Kang, Richard Szeliski, and Jinxiang Chai. Handling occlusions in dense multi-view stereo. In Proceedings of the 2001 IEEE Computer Society Conference on Com + +puter Vision and Pattern Recognition. CVPR 2001, volume 1, pages I-I. IEEE, 2001. 2 +[27] Abhishek Kar, Christian Häne, and Jitendra Malik. Learning a multi-view stereo machine. In Advances in neural information processing systems, pages 365-376, 2017. 1, 2 +[28] Hiroharu Kato, Yoshitaka Ushiku, and Tatsuya Harada. Neural 3d mesh renderer. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3907-3916, 2018. 2 +[29] Michael Kazhdan and Hugues Hoppe. Screened poisson surface reconstruction. ACM Transactions on Graphics (ToG), 32(3):29, 2013. 5 +[30] Alex Kendall, Hayk Martirosyan, Saumitro Dasgupta, Peter Henry, Ryan Kennedy, Abraham Bachrach, and Adam Bry. End-to-end learning of geometry and context for deep stereo regression. In Proceedings of the IEEE International Conference on Computer Vision, pages 66-75, 2017. 2 +[31] Arno Knapitsch, Jaesik Park, Qian-Yi Zhou, and Vladlen Koltun. Tanks and temples: Benchmarking large-scale scene reconstruction. ACM Transactions on Graphics (ToG), 36(4):78, 2017. 6 +[32] Vladimir Kolmogorov and Ramin Zabih. Multi-camera scene reconstruction via graph cuts. In European conference on computer vision, pages 82-96. Springer, 2002. 2 +[33] Kiriakos N Kutulakos and Steven M Seitz. A theory of shape by space carving. International journal of computer vision, 38(3):199-218, 2000. 2 +[34] Lubor Ladicky, Olivier Saurer, SoHyeon Jeong, Fabio Man-inchedda, and Marc Pollefeys. From point clouds to mesh using regression. In Proceedings of the IEEE International Conference on Computer Vision, pages 3893-3902, 2017. 2 +[35] Maxime Lhuillier and Long Quan. A quasi-dense approach to surface reconstruction from uncalibrated images. IEEE transactions on pattern analysis and machine intelligence, 27(3):418-433, 2005. 2 +[36] Chen-Hsuan Lin, Chen Kong, and Simon Lucey. Learning efficient point cloud generation for dense 3d object reconstruction. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. 2 +[37] Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3d reconstruction in function space. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4460-4470, 2019. 2 +[38] Despoina Paschalidou, Osman Ulusoy, Carolin Schmitt, Luc Van Gool, and Andreas Geiger. Raynet: Learning volumetric 3d reconstruction with ray potentials. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3897-3906, 2018. 2 +[39] J-P Pons, Renaud Keriven, O Faugeras, and Gerardo Hermosillo. Variational stereovision and 3d scene flow estimation with statistical similarity measures. In IEEE 9th International Conference on Computer Vision, page 597. IEEE, 2003. 2 +[40] Stephan R Richter and Stefan Roth. Matryoshka networks: Predicting 3d geometry via nested shape layers. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1936-1944, 2018. 2 + +[41] Gernot Riegler, Ali Osman Ulusoy, Horst Bischof, and Andreas Geiger. Octnetfusion: Learning depth fusion from data. In 2017 International Conference on 3D Vision (3DV), pages 57-66. IEEE, 2017. 2 +[42] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pages 234-241. Springer, 2015. 3 +[43] Johannes L Schonberger, Enliang Zheng, Jan-Michael Frahm, and Marc Pollefeys. Pixelwise view selection for unstructured multi-view stereo. In European Conference on Computer Vision, pages 501-518. Springer, 2016. 2 +[44] Steven M Seitz, Brian Curless, James Diebel, Daniel Scharstein, and Richard Szeliski. A comparison and evaluation of multi-view stereo reconstruction algorithms. In 2006 IEEE computer society conference on computer vision and pattern recognition (CVPR'06), volume 1, pages 519-528. IEEE, 2006. 2 +[45] Daeyun Shin, Zhile Ren, Erik B Sudderth, and Charless C Fowlkes. 3d scene reconstruction with multi-layer depth and epipolar transformers. In Proceedings of the IEEE International Conference on Computer Vision, pages 2172-2182, 2019. 2 +[46] Ayan Sinha, Asim Unmesh, Qixing Huang, and Karthik Ramani. Surfnet: Generating 3d shape surfaces using deep residual networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6040-6049, 2017. 2, 5 +[47] Chengzhou Tang and Ping Tan. Ba-net: Dense bundle adjustment network. arXiv preprint arXiv:1806.04807, 2018. 1 +[48] Engin Tola, Christoph Strecha, and Pascal Fua. Efficient large-scale multi-view stereo for ultra high-resolution image sets. Machine Vision and Applications, 23(5):903-920, 2012. 2, 5 +[49] Shubham Tulsiani, Tinghui Zhou, Alexei A Efros, and Jitendra Malik. Multi-view supervision for single-view reconstruction via differentiable ray consistency. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2626-2634, 2017. 2 +[50] Ali Osman Ulusoy, Andreas Geiger, and Michael J Black. Towards probabilistic volumetric reconstruction using ray potentials. In 2015 International Conference on 3D Vision, pages 10-18. IEEE, 2015. 2 +[51] Benjamin Ummenhofer, Huizhong Zhou, Jonas Uhrig, Nikolaus Mayer, Eddy Ilg, Alexey Dosovitskiy, and Thomas Brox. Demon: Depth and motion network for learning monocular stereo. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5038-5047, 2017. 2 +[52] Jinglu Wang, Bo Sun, and Yan Lu. Mvpnet: Multi-view point regression networks for 3d object reconstruction from a single image. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 8949-8956, 2019. 2 +[53] Nanyang Wang, Yinda Zhang, Zhuwen Li, Yanwei Fu, Wei Liu, and Yu-Gang Jiang. Pixel2mesh: Generating 3d mesh + +models from single rgb images. In Proceedings of the European Conference on Computer Vision (ECCV), pages 52-67, 2018. 2 +[54] Jiajun Wu, Yifan Wang, Tianfan Xue, Xingyuan Sun, Bill Freeman, and Josh Tenenbaum. Marrnet: 3d shape reconstruction via 2.5 d sketches. In Advances in neural information processing systems, pages 540-550, 2017. 1, 2 +[55] Jiajun Wu, Chengkai Zhang, Xiuming Zhang, Zhoutong Zhang, William T Freeman, and Joshua B Tenenbaum. Learning shape priors for single-view 3d completion and reconstruction. In Proceedings of the European Conference on Computer Vision (ECCV), pages 646-662, 2018. 2 +[56] Zexiang Xu, Sai Bi, Kalyan Sunkavalli, Sunil Hadap, Hao Su, and Ravi Ramamoorthi. Deep view synthesis from sparse photometric images. ACM Transactions on Graphics (TOG), 38(4):1-13, 2019. 2, 3 +[57] Yao Yao, Shiwei Li, Siyu Zhu, Hanyu Deng, Tian Fang, and Long Quan. Relative camera refinement for accurate dense reconstruction. In 2017 International Conference on 3D Vision (3DV), pages 185-194. IEEE, 2017. 2 +[58] Yao Yao, Zixin Luo, Shiwei Li, Tian Fang, and Long Quan. Mvsnet: Depth inference for unstructured multi-view stereo. In Proceedings of the European Conference on Computer Vision (ECCV), pages 767-783, 2018. 1, 2, 3, 4, 5, 6, 8 +[59] Yao Yao, Zixin Luo, Shiwei Li, Tianwei Shen, Tian Fang, and Long Quan. Recurrent mvsnet for high-resolution multiview stereo depth inference. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5525-5534, 2019. 2, 3, 5, 6, 8 +[60] Xiuming Zhang, Zhoutong Zhang, Chengkai Zhang, Josh Tenenbaum, Bill Freeman, and Jiajun Wu. Learning to reconstruct shapes from unseen classes. In Advances in Neural Information Processing Systems, pages 2263-2274, 2018. 2 +[61] Huizhong Zhou, Benjamin Ummenhofer, and Thomas Brox. Deeptrack: Deep tracking and mapping. In Proceedings of the European Conference on Computer Vision (ECCV), pages 822-838, 2018. 2 +[62] Tinghui Zhou, Matthew Brown, Noah Snavely, and David G Lowe. Unsupervised learning of depth and ego-motion from video. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1851-1858, 2017. 2 \ No newline at end of file diff --git a/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/images.zip b/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..361454f9d52ec8da7c5d7e467f63cc3268e59a8c --- /dev/null +++ b/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c96131600ef768f580a6b2b8a89683f009f90bc1394ce1a43886d27b2261884 +size 587445 diff --git a/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/layout.json b/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..fb5b5aab2123acf31fa585209fbcdca2ef49e344 --- /dev/null +++ b/deepstereousingadaptivethinvolumerepresentationwithuncertaintyawareness/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c13a894c0222c88554570ec30f58e73912f506b0c4f6c0fbd878415f7938bfa6 +size 381361 diff --git a/deepstriphighresolutionboundaryrefinement/cc017d6c-0140-4ca3-8438-b8c3266983e1_content_list.json b/deepstriphighresolutionboundaryrefinement/cc017d6c-0140-4ca3-8438-b8c3266983e1_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..9a647ba6c08c889713499ac96cc768acceffb539 --- /dev/null +++ b/deepstriphighresolutionboundaryrefinement/cc017d6c-0140-4ca3-8438-b8c3266983e1_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1af292c5382119b357b9986da1c33ddb06e241b693864ea2683af7bf61a8e86 +size 80383 diff --git a/deepstriphighresolutionboundaryrefinement/cc017d6c-0140-4ca3-8438-b8c3266983e1_model.json b/deepstriphighresolutionboundaryrefinement/cc017d6c-0140-4ca3-8438-b8c3266983e1_model.json new file mode 100644 index 0000000000000000000000000000000000000000..09e55aceeda443723c9b8918f0701524be4f721c --- /dev/null +++ b/deepstriphighresolutionboundaryrefinement/cc017d6c-0140-4ca3-8438-b8c3266983e1_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c0697ad9bee34eb7c39426fa3466baf5b8cec1c2fd6e0214fb9ee71e9d82ff6 +size 97648 diff --git a/deepstriphighresolutionboundaryrefinement/cc017d6c-0140-4ca3-8438-b8c3266983e1_origin.pdf b/deepstriphighresolutionboundaryrefinement/cc017d6c-0140-4ca3-8438-b8c3266983e1_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ba9c6052c2859b48ba626000a2ca3e3c0a0d647d --- /dev/null +++ b/deepstriphighresolutionboundaryrefinement/cc017d6c-0140-4ca3-8438-b8c3266983e1_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61167abdd3069030d6958897828a6bf7ec409cfbb709b0c087ec0da984a034ce +size 2241449 diff --git a/deepstriphighresolutionboundaryrefinement/full.md b/deepstriphighresolutionboundaryrefinement/full.md new file mode 100644 index 0000000000000000000000000000000000000000..cee41c8ec34c36b76d298e443c6bcfea861c7b3b --- /dev/null +++ b/deepstriphighresolutionboundaryrefinement/full.md @@ -0,0 +1,370 @@ +# DeepStrip: High Resolution Boundary Refinement + +Peng Zhou1 Brian Price2 Scott Cohen2 +1University of Maryland, College Park + +Gregg Wilensky $^{2}$ Larry S. Davis $^{1}$ \ + $^{2}$ Adobe Research, San Jose + +# Abstract + +In this paper, we target refining the boundaries in high resolution images given low resolution masks. For memory and computation efficiency, we propose to convert the regions of interest into strip images and compute a boundary prediction in the strip domain. To detect the target boundary, we present a framework with two prediction layers. First, all potential boundaries are predicted as an initial prediction and then a selection layer is used to pick the target boundary and smooth the result. To encourage accurate prediction, a loss which measures the boundary distance in the strip domain is introduced. In addition, we enforce a matching consistency and C0 continuity regularization to the network to reduce false alarms. Extensive experiments on both public and a newly created high resolution dataset strongly validate our approach. + +# 1. Introduction + +Boundary detection is a well-studied problem and fundamental for human recognition [29, 9]. Recent decades have witnessed considerable effort to improve the boundary quality of an object that has been detected [42, 36, 33, 19, 38, 49, 16, 23, 43] or segmented [11, 35, 25, 7, 18]. Consequently, it is not difficult to separate object of interests from backgrounds with precise boundaries utilizing these methods. While current learning based boundary detection algorithms are usually computed on low resolution (LR) images (0.04-0.25 million pixels), most photos taken these days are much larger, ranging from cell phone size (8-16 million pixels) to professional camera size (16-400 million pixels). Most methods are not designed for images of this size and the excessive computation they require, and most machine learning based methods cannot process them due to memory constraints. Given a precise low resolution prediction, a workaround would be to directly apply upsampling to reach high resolution (HR). Nevertheless, this usually yields poor quality results because the semantic contents in the HR image are not considered. (See Figure 1.) + +Most research in boundary detection focuses on improving the boundary quality in LR through introducing + +![](images/d548c23898ef7b43e6453bbff336974a6fe9a8935b6c231815beb3c6eb893e3e.jpg) +Figure 1. Concept overview. The example is from the newly created PixaHR dataset. Given low resolution mask and high resolution image on the left, a bilinear upsampling with scale factor $16\times$ would results in boundary misalignment in high resolution image, as is shown in the enlarged boundary region on the right. Also, the new details in high resolution would be missed. + +more semantic information [2, 46, 27] or human interaction [23, 26, 44, 25, 7]. While there has been some work on HR semantic segmentation [12, 48] and upsampling [41, 47], there is less focus on accurately capturing the boundary detail in HR. Instead of treating this problem as an upsampling problem, we treat it as boundary detection and harness the contents in HR images for prediction. + +To this end, we propose a novel approach to handle boundary refinement in HR images. (See Figure 2.) Our key idea is to allow the power of deep learning methods to be applied to HR images in a time and memory efficient manner by operating on narrow images made up of pixels near the boundary. Given an accurate LR mask, the boundary in HR is likely in proximity to the upsampled LR boundary. (See Figure 1.) Therefore, to save memory and computation, we propose to search for the target boundary in a strip region near the boundary of the upsampled mask. The strip image is formed by sampling pixels along and normal to the upsampled mask boundary. Since the normals may not be smooth due to inaccurate boundaries in the upsampled mask, we represent the LR boundary with a spline approximation and directly treat the orthogonal derivatives of the upsampled spline as the normal directions. Feeding as input the generated strip images, we train a network to firstly predict all potential boundaries. Based on the initial prediction, an additional selection layer is included to predict the target boundary more accurately. To encourage closer prediction and reduce false positives, we propose loss functions to minimize the boundary distance between the pre + +![](images/13a235d48ad057923bd4c25e23a3abe8c89a131b23c2f228a2ec9daf196e28d4.jpg) +Figure 2. Framework. To save memory and computation, we predict the boundary in a strip image instead of the whole image. First, the strip image is extracted from the HR image and corresponding LR mask. Feeding the strip image as input, the network predicts all potential boundaries (denoted as “x”) and passes the initial prediction to a selection layer (denoted as “m”) to pursue more accurate prediction on the target boundary (denoted as “s”). The numbers are indicator to the losses displayed on the right. Orange and green curves denote the ground truth and prediction, respectively. Note that the strip image and prediction are rotated 90 degree for visualization. + +diction and ground truth in the strip image and to encourage C0 continuity in the prediction. Lastly, we pursue consistent results through matching the prediction under different strip sizes to further boost the performance. + +To validate our approach, we create a new PixaHR dataset (see Figure 1 for image example) consisting of 100 photos with average resolution $7k \times 7k$ and evaluate our approach up to scale factor $32 \times$ . Results on DAVIS 2016 and COCO coarse annotations also show our ability to refine coarse boundary annotations. + +In a nutshell, our contribution is three-fold. 1) We propose an approach to predict the boundary in a strip image which converts potential boundary regions into a strip space. This approach allows us to apply neural networks in a computationally and memory efficient manner. 2) To improve performance and encourage closer prediction, we propose novel losses including boundary distance, matching and C0 continuity loss. 3) We create a high resolution dataset for evaluation. To the best of our knowledge, we are the first learning based approach to make HR dense boundary refinement with resolution up to $10k \times 10k$ . Extensive experiments on both public and the new PixaHR dataset strongly highlight our effectiveness. + +# 2. Related Work + +Boundary Refinement. Multiple attempts have been made to improve boundary quality through extracting better features [42, 45, 27, 2, 14]. Xie et al. [42] utilize features from multiple layers and fuse both low and high level features to detect edges. Liu et al. [27] explore rich convolutional features to boost the performance. More related, attention has been taken to refine coarse boundary predictions or annotations [46, 2]. Conventional methods like dense Conditional Random Fields (CRF) [22], Graph Cuts [8] model the re + +relationship between nearby pixels and thus can be applied to refine LR masks [24]. However, these are segmentation based and only low-level features have been utilized. With more supervision, Yu et al. [46] propose to simultaneously learn and align edges to refine misaligned boundaries directly. Acuna et al. [2] further improve the performance by introducing a thinning layer and active alignment strategy to obtain refined boundary. These methods mainly explore edge detection in LR images. In contrast, we tackle HR boundary refinement and apply detection only on regions around upsampled LR boundary splines and thus is more memory and computation efficient. + +Active Contours. Active contour models like Snakes [19] have been introduced to refine boundaries from coarse ones. Various approaches have been explored to handle the limitation of Snakes through, e.g., better initialization, morphological operation [4] or user interaction [23]. Since our method also refines the curve upsampled from LR mask, we can benefit from these methods and refine the boundary further. Instead of taking the whole image as input, deep active contour [34] learns to predict the flow of boundary pixels in a patch by patch fashion. However, it cannot guarantee a continuous boundary prediction. Instead, our approach directly extracts a consecutive boundary region and thus contains more global information. Rather than predict the entire curve, other works have explored predicting control points [10, 3, 26] through recurrent neural networks or Graph Convolutional Networks (GCN) [20] and then fit a curve as the final prediction. However, boundary details are smoothed in the spline representation. In contrast, our approach predicts precise edge information directly. Another line of work implicitly represents boundary curves. For example, deep level set methods [30] evolve boundary curves by minimizing the level energy function. Other learning based approaches [28, 13, 39] have proposed to provide + +useful features, including texture, color or shape, for better optimization. However, these learning based approaches suffer from computation and memory issues when the resolution increases because they process the entire image while our approach only focuses on the regions around upsampled LR boundaries, and thus requires less computation and memory overhead. + +High Resolution Up-sampling. With the information of low resolution masks, researchers have focused on achieving high quality HR segmentation masks. Conventional methods [21, 6] reach HR by applying upsampling jointly with the LR mask reference. However, the fixed filter structures have difficulty capturing new HR boundary details. He et al. [17] propose guided filtering to smooth while preserving edge information when upsampling. Wu et al. [41] make the guided filter faster and learnable. For HR segmentation approaches, Zhao et al. [48] propose to aggregate LR features for HR segmentation and Chen et al. [12] align both global and local features to avoid heavy GPU consumption for HR segmentation. Even though these methods can be potentially adapted to boundary refinement, our method mainly focuses on boundary regions and is designed to detect boundaries in HR directly. Therefore, our approach learns new HR boundaries better, especially when LR boundaries are coarsely annotated. + +# 3. Approach + +Our goal lies in refining boundaries in HR images given LR precise masks. To achieve this purpose efficiently, we propose to predict on a strip image that captures the potential boundary region rather than the entire HR image. Figure 2 illustrates our framework. Our approach consists of strip image creation, which converts HR RGB image into strip image, strip boundary prediction, which refines the edges on the strip image using a network and strip reconstruction which reconstructs the prediction in the original image from the strip boundary prediction during testing. + +# 3.1. Strip Image Creation + +Figure 3 describes the procedure of strip image creation. Due to the interpolation introduced by upsampling, a directly upsampled boundary from the LR image is likely to be shifted from the ground truth boundary in HR. To localize the real HR boundary pixels, searching around the upsampled boundary is more necessary than searching the whole image. Therefore, we extract pixels near the upsampled boundary to create a strip image. To create the strip image, we step along the boundary and sample points along the normal direction at each point on the curve. To obtain smoothly varying normal directions along the coarse boundary, we represent the LR boundary by B-spline and upsample the LR spline to HR. + +![](images/9472a043acfce5644dc411f958249b6b24c3af519694f594cf9ae6b5e13f636e.jpg) +Figure 3. Strip image creation. To generate strip image, B-spline representation of the contour in the LR mask is upsampled to HR as a coarse boundary. The HR region along the normal direction (e.g., red and green arrows) of the contour is then extracted. Finally, the strip image and corresponding boundary ground truth is obtained by flattening the extracted region in both the HR image and mask. Note that the final boundary filters out noisy boundaries (e.g., the red box region) from the initial boundary. The strip image and boundaries are rotated 90 degree for visualization. + +Given the HR image $I(p,q)$ and the upsampled spline representation $C = (p(k),q(k))$ of the boundary contour, where $(p(k),q(k))$ denotes the HR image coordinates parameterized by arclength $k$ along the curve, the continuous strip image $J_{I,C}$ is defined by + +$$ +J _ {I, C} (k, t + H / 2) = I (p (k) + t \times n _ {p} (k), q (k) + t \times n _ {q} (k)), \tag {1} +$$ + +where $t$ denotes the distance in the normal direction, $H$ denotes the height of the strip image, and $(n_p(k), n_q(k))$ is the unit normal to the curve at arclength $k$ . Accordingly, the strip image $J_{I,C}(j,i)$ with dimension $H \times W$ is obtained by sampling $k = j \times dk$ , $t = i \times dt$ , where tangential step size $dk = \lfloor |C| / W \rfloor$ and normal step size $dt$ is set to 1 for simplicity. $|C|$ denotes the length of C, $j = 0,1,\dots,W$ and $i = -H/2,\dots,0,\dots,H/2$ . Also, bilinear interpolation is applied in the high resolution image to evaluate $I(p,q)$ for non-pixel coordinates $(p,q)$ . + +The corresponding HR strip boundary ground truth is obtained similarly with two adaptations. First, for large sampling scale factors, the ground truth boundary is likely to be outside the range of the strip if the strip height is small, making the boundary in strip image not continuous. We add labels at the border of strip if no boundary pixel is included to maintain the C0 continuity of the boundary pixels in the strip image. Second, if the strip height is large, multiple boundary pixels might be included in each column in regions where the boundaries are closer than the strip height. In this case, we filter out the extraneous boundaries that are not connected to the current boundary. (See Figure 3.) + +# 3.2. Strip Boundary Prediction + +Provided the HR strip image as input, we train a network to predict the corresponding boundaries within the strip domain. For memory efficiency, we adapt light-weighted encoder-decoder based structure nested U-Net [32, 50] for boundary prediction. Given the fact that proper dimension + +of strip image varies for different resolutions, we use instance normalization [37] during training so that the mean and variance are approximated per image. + +As is shown in Figure 2, two prediction layers are proposed to learn the target boundary in strip image to account for the fact that multiple true boundaries may be present in a single column of the strip image. Firstly, we extract the last upsampling layer to predict all potential boundaries. This encourages the network to learn boundary features within the strip image. To predict the target boundary, we add a learnable selection layer to pick up the target boundary from potential boundaries. The input to the selection layer is the initial prediction, and we apply column-wise softmax to the output of the selection layer as a confidence score for the initial prediction. Finally, the target boundary is computed by the multiplication between the initial prediction and the selection score. The selection layer also smooths the initial prediction, analogous to the non-maximum suppression in Canny edge detection [9]. Formally, + +$$ +s = x \odot m, \tag {2} +$$ + +where $\odot$ denotes pixel-wise multiplication, $s$ denotes the final prediction, $x$ denotes the initial prediction which applies Sigmoid activation to the output of the last upsampling layer and $m$ is the softmax activated output of the selection layer. + +# 3.3. Loss Function + +Our basic loss function for the initial and final boundary prediction is a weighted $l_{1}$ loss to differentiate the boundary from non-boundary pixels. Formally, + +$$ +L _ {\mathrm {e}} = \beta \sum_ {(i, j) \in Y _ {+}} | y _ {i j} - s _ {i j} | + (1 - \beta) \sum_ {(i, j) \in Y _ {-}} | y _ {i j} - s _ {i j} |, \tag {3} +$$ + +where $Y_{+}$ and $Y_{-}$ denote boundary and non-boundary pixels, respectively. $\beta = |Y_{-}| / |Y|$ denotes the weight to balance the label and $|Y|$ denotes the total number of pixels in strip mask. $s_{ij}$ denotes the prediction and $y_{ij}$ denotes the binary ground truth at position $(i,j)$ in the strip image. + +In addition, we adapt Dice loss [40] to boundary prediction to encourage intersection between prediction and ground truth: + +$$ +L _ {\mathrm {d i c e}} = 1 - \frac {2 \sum s _ {i j} \times y _ {i j} + \epsilon}{\sum s _ {i j} + \sum y _ {i j} + \epsilon}, \tag {4} +$$ + +where $\epsilon$ denotes a small constant to avoid zero division. The loss aims to maximize the intersection over union between the prediction and ground truth. + +# 3.3.1 Boundary Distance Loss + +For boundary prediction, a closer prediction to the boundary ground truth is preferred. However, both weighted $l_{1}$ + +and dice loss are not sensitive to the distance from prediction to ground truth. Therefore, we introduce a boundary distance loss to measure the average distance between the predicted boundary and the ground truth to encourage closer prediction. Thanks to the strip domain which maps the regions along the normal direction in every column, the boundary distance can be calculated directly through the difference between the prediction and ground truth. Given the prior that only one boundary pixel exists in each column in the final strip mask, the boundary distance at every column can be measured by calculating the argmax difference at every column between the prediction and ground truth. Since argmax function is not differentiable, we approximate it through soft argmax before calculating the boundary distance and formulate the loss as + +$$ +L _ {\mathrm {d}} = \frac {1}{W} \sum_ {j = 1} ^ {W} | \operatorname {s o f t a r g} _ {i} \left(s _ {i j}\right) - \arg \max _ {i} \left(y _ {i j}\right) |, \tag {5} +$$ + +where $W$ is the width of strip mask and the soft argmax in each column (normal direction) is computed as + +$$ +\operatorname {s o f t a r g} _ {i} \left(s _ {i j}\right) = \sum_ {i = 1} ^ {H} \left(\frac {\left| s _ {i j} \right|}{\left| \left| S _ {j} \right| \right| _ {1}} \times i\right), \tag {6} +$$ + +where $||S_j||_1$ is the $l_{1}$ normalization of $s_{ij}$ at column $j$ . Since the final prediction $s_{ij}$ encourages a unimodal distribution according to Equation 2, this loss enforces the column-wise maximum activation of the final prediction to match with that in ground truth. + +# 3.3.2 Matching Loss + +Since the strip height is fixed during training, to introduce variance and avoid overfitting on specific strip height, we augment the data through cropping the strip height. Starting from a large height, we crop the strip to a shorter one and make a new prediction. For consistency, the overlapped regions between original and the cropped strip should have the same initial prediction since all potential boundaries are predicted. Formally, we take a $l_{1}$ loss between the cropped and original initial prediction to calculate the matching loss, + +$$ +L _ {\mathrm {m}} = \frac {1}{\left| Y _ {c r o p} \right|} \sum_ {(i, j) \in Y _ {c r o p}} \left| x _ {i j} ^ {\prime} - x _ {i j} \right|, \tag {7} +$$ + +where $Y_{crop}$ is the cropped region of original mask $Y$ and $x_{ij}'$ is the new initial prediction for the cropped strip image. In addition, this loss also helps the network learn to ignore spurious edges detected near the border of the strip. + +# 3.3.3 C0 Continuity Regularization + +Additionally, we add a C0 continuity regularization to the final prediction to enforce a continuous prediction. Ideally, + +at most one boundary pixel is allowed at every column in the final prediction, so the prediction is C0 continuous if the maximum activated position of every column is C0 continuous. Specifically, we compute the soft argmax of every column, calculate a marginal difference between nearby argmax columns and penalize the position within a window size where prediction becomes discontinuous. Formally, + +$$ +L _ {\mathrm {C} 0} = \frac {1}{W} \sum_ {j = 1} ^ {W} P \left(\max \left(0, \mid \operatorname {s o f t a r g} _ {i} \left(s _ {i j}\right) - \operatorname {s o f t a r g} _ {i} \left(s _ {i, j + 1}\right) \mid - v\right)\right), \tag {8} +$$ + +where $v$ denotes the margin value and $P$ denotes the max-pooling with a fixed kernel size so that all pixels within the range get penalized. $s_{iW + 1}$ is replicated by $s_{i1}$ for calculation. This loss serves as a self regularization as no ground truth label is required. + +The total loss function is therefore, + +$$ +L _ {\text {t o t a l}} = L _ {e} + L _ {d i c e} + \lambda_ {1} L _ {d} + \lambda_ {2} L _ {m} + \lambda_ {3} L _ {C 0}, \tag {9} +$$ + +where $\lambda_1, \lambda_2, \lambda_3$ are hyper-parameters to adjust the weight of each loss. $L_{e}$ is applied to both the initial and final prediction. $L_{m}$ is only applied to the initial prediction and $L_{dice}, L_{d}, L_{C0}$ are applied only to the final prediction. With the total loss function, a closer prediction is preferred and the network draws attention to the target boundaries. + +# 3.4. Strip Reconstruction + +To make a prediction on the HR image, a mapping between the predicted strip boundaries and the full HR mask is required at inference. For every pixel in the strip image, the corresponding coordinates in the HR image are recorded for reconstruction. Given the raw prediction, we optimize the path with a dynamic programming similar to seam carving [5] and find the path with minimum energy. We minimize the function + +$$ +E _ {i j} = - s _ {i j} - \frac {| \partial I (i , j) |}{\operatorname* {m a x} (| \partial I |)}, \tag {10} +$$ + +where $|\partial I(i,j)|$ denotes the magnitude of the image gradients at $(i,j)$ . The algorithm searches for the energy cost for neighborhood pixels and finds the path with a minimum energy cost, which indicates the boundary path with the highest probability. We then connect the original coordinates of the final path in the full mask to form the full prediction. + +At inference, the flexible input dimension of our framework enables different strip sizes for different images. Benefiting from it, we determine the width of strip, which reflects the number of sampling points along the boundary, by multiplying the LR boundary length with the scale factor. We fix the height of strip with the assumption that all target boundaries are involved, and an adaptive height adjustment strategy is also discussed in Section 4.6. For objects containing multiple contours due to complex topology, the prediction is made on each contour separately. + +# 3.5. Implementation Details + +We generate the spline curve efficiently from the binary mask using the scipy function 'splprep' after extracting contours. To guarantee a consistent sign for the normals, we extract strip images from closed contours. The starting point of strip is not deterministic so that no bias is introduced in training. The final ground truth strip boundary mask is obtained by taking the gradient of the ground truth segmentation mask after removing any isolated noisy boundaries. Additionally, we randomly add small shifts to the spline representation to introduce position variation of the target boundary in strip image during training. Our framework is implemented in Pytorch. The encoder consists of $43 \times 3$ convolutional layers and the decoder consists of 4 upsampling layers. The selection layer consists of another convolutional layer with $3 \times 3$ kernel size. The activation function is ReLU [15] for all encoder and decoder layers. We use instance normalization for all normalization layers to enable flexible input size at inference. During training, the input strip dimension is fixed as $80 \times 4096$ . We train the network for 70 epochs with batch size 6 on an NVIDIA GeForce TITAN P6000. We use Stochastic Gradient Descent (SGD) as optimizer and the initial learning rate is 0.1. The learning rate decays by a factor of 10 after every 20 epochs. The momentum is set to 0.9 and weight decay is set to 0.0005. $\lambda_{1}$ , $\lambda_{2}$ and $\lambda_{3}$ are set to be 0.1, 20 and 1 empirically. We crop strip image by half to obtain $Y_{crop}$ for matching loss and the maxpooling kernel size for C0 continuity regularization is 11. The margin in C0 continuity regularization is set to 1. Horizontal flipping is applied as data augmentation. + +# 4. Experiments + +We evaluate our approach on two HR datasets which provide both low and high resolution ground truth in Section 4.2, and then analyze the importance of each components in our framework in Section 4.3. We also provide memory and speed comparison in Section 4.4. + +# 4.1. Datasets and Metrics + +For our experiments, we need a dataset with highly accurate pixel-level HR annotation. Unfortunately, most current datasets are low resolution and many provide inaccurate polygon boundaries as ground truth annotations. We found DAVIS [31] to provide accurate enough results with a resolution that is usable for our needs. To better evaluate the results at large scaling factors, we introduce a new dataset—PixaHR. We describe these datasets below. + +DAVIS 2016 [31]: A benchmark for video segmentation which consists of 50 classes with precise annotations in both 480P and 1080P. To enlarge the scale factor, we down sample the 480P mask by a factor of 2, train our approach on the 30-class 1080P training set with 240P LR masks and test on + +
DatasetDAVIS 2016 [31] 4×PixaHR 8×PixaHR 16×PixaHR 32×
MetricsF(0 pix)F(1 pix)F(1 pix)F(2 pix)F(1 pix)F(2 pix)F(1 pix)F(2 pix)
Bilinear Upsampling0.1710.5210.1160.1940.150.1870.070.106
Grabcut [33]0.2320.5410.0630.1210.0200.0530.00.0
Dense CRF [22]0.2680.7020.2780.4340.2450.3890.1420.227
Bilateral Solver [6]0.2740.5690.2070.2770.1850.2470.1560.216
Curve-GCN [26]0.0760.1600.0210.0330.0180.0280.0120.028
DELSE [39]0.2710.5310.0960.1330.0860.1320.0800.130
STEAL [2]0.1710.3480.2820.4570.1510.2550.090.144
JBU [21]0.1750.4470.1400.2310.1170.1840.0550.090
Guided Filtering [17]0.1290.3490.1210.1950.0920.1450.0600.097
Deep GF [41]0.1930.4610.2860.4200.1750.2690.090.141
U-Net boundary0.3200.6560.1700.2970.1390.1970.0680.108
U-Net strip (baseline)0.3030.7100.3340.4550.3030.4250.2670.357
Ours0.4230.7880.4160.5080.3960.4980.3300.447
+ +Table 1. Boundary-based $F$ score comparison. The scale factor between low and high resolution image is 4 on DAVIS 2016 and 8, 16, 32 on PixaHR. For DAVIS 2016, the pixel dilation is 0 and 1 and for PixaHR is 1 and 2 instead. + +20-class 1080P testing set. The scale factor is 4.5 for this experiment. The results are evaluated frame by frame. + +PixaHR: To evaluate more realistic scenarios, we create a PixaHR dataset. It contains 100 images with average resolution $7k \times 7k$ (ranging from $5k \times 5k$ to $10k \times 10k$ ) collected from public photograph website Pixabay [1]. We manually annotate the object boundary in the HR images, downsample the HR mask by $8 \times$ , $16 \times$ and $32 \times$ and obtain binary LR mask for evaluation. The photos were uploaded by public users and have diverse contents. We apply our model that was trained on DAVIS to this dataset for evaluation. + +Metrics: We use boundary-based F score introduced by Perazzi et al. [31] for evaluation, which is designed to evaluate the boundary quality of segmentation. As it allows changing pixel tolerance by dilation, we set 0 and 1 pixel dilation on DAVIS, and 1 and 2 pixel on PixaHR dataset to measure how close the prediction is to the ground truth. + +# 4.2. Main Results + +For upsampling based approaches, we compare our approach with Bilinear Upsampling, Bilateral Solver [6], Joint Bilateral Upsampling [21] (JBU), Guided Filtering [17] and Deep GF [41]. The boundary is obtained by taking the gradient of the upsampled mask. For boundary refinement approaches, we compare with Grabcut [33], Dense CRF [22] and STEAL [2] using upsampled mask as initialization. For active contour methods, the baselines are Curve-GCN [26] and DELSE [39], and predictions on PixaHR are made in LR and upsampled to original resolution since the whole boundary region is required at inference. Learning based approaches are trained or fine-tuned on the training set of DAVIS and evaluated directly on all datasets. More details about baselines are provided in supplementary material. In addition, we also compare our own im + +pletedbaldelinesasbelow: + +- U-Net boundary: We train U-Net directly on the full resolution images on DAVIS for boundary prediction. We concatenate both the full resolution image and upsampled masks as input so that the network learns to refine the coarse masks. The loss function is a weighted binary cross entropy following Xie et al. [42]. Similarly, we also add deep supervision and fuse all intermediate layers to obtain the final prediction. The prediction is made patch-by-patch with patch size $1920 \times 1080$ on PixaHR dataset. + +- U-Net strip (baseline): Our baseline method which learns to directly predict the target boundary on strip image. Only weighted $l1$ loss is used as loss function. + +- Ours: Our full model which applies selection layer to predict the boundary in strip images with our boundary distance loss, matching loss and C0 continuity regularization. + +Table 1 exhibits our advantage over the baselines. For the DAVIS dataset, a simple upsampling yields a boundary shift from the ground truth and thus performs poorly. Grab-cut and dense CRF are segmentation based and thus yield worse performance than ours. Even though other methods including bilateral solver, JBU and Deep GF leverage the low resolution mask, they are designed for general upsampling instead of for boundary refinement and prediction. Curve-GCN fits the curve from the predicted control points which cannot generate as precise a boundary as ours. DELSE moves the contour along the gradient of its energy function, but is less robust than our approach which predicts the target boundary pixels. Additionally, our approach outperforms STEAL as the scale factor increases, indicating the active alignment in STEAL may not be accurate enough for pixel-level boundary prediction. Compared with U-Net boundary, predicting the boundary in strip image (U-Net strip) yields a slightly better performance, per + +
DatasetDAVIS 2016PixaHR 16×
MetricsF(0 pix)F(1 pix)
U-Net strip0.3030.303
U-Net strip dice0.3230.320
U-Net strip dice+ selection0.3720.328
U-Net strip dice+selection+BD0.3900.342
Our w/o matching0.4050.365
Ours0.4230.396
+ +Table 2. Ablation analysis on two datasets. Each entry is the boundary-based F score tested on individual dataset. + +
MethodsMemory (MB)Speed (s/image)
Bilinear Upsampling-0.01/0.02
Grabcut [33]-5.17/320
Dense CRF [22]-3.22/310
Bilateral Solver [6]-4.18/158
JBU [21]-0.08/5.71
Guided filtering [17]-0.08/16.1
Deep GF [41]-0.07/3.95
STEAL [2]7775/795943.1/4231
Curve-GCN [26]17330/173300.93/75.2
DELSE [39]17771/177711.02/20.4
U-net boundary17000/170000.31/24.5
Ours3300/33000.28/2.51
+ +haps because the strip image narrows down the search space for target boundary. As expected, with our selection layer and proposed losses, we boost the performance further by better determining the target boundaries from other potential boundaries. A similar tendency is observed on PixaHR dataset. Note that in large scale factor 32, most of the methods fail to make close predictions to the ground truth while our method still has a relatively stable performance. + +# 4.3. Ablation Analysis + +We analyze the importance of each component in our framework as listed below: + +- U-Net strip dice: Adding dice loss to the baseline. +- U-Net strip dice + selection: Adding dice loss and selection layer to the baseline. +- U-Net strip dice + selection + BD: Adding dice, boundary distance loss and selection layer to the baseline. +- Ours w/o matching: Adding additional C0 regularization. It is our full model without the matching loss. + +Table 2 summarizes the comparison result. Starting from our baseline U-Net strip, adding dice loss encourages more intersection with the ground truth boundary and thus yields better performance. Comparing U-Net strip + dice with U-Net strip + dice + selection, the selection layer boosts the performance on DAVIS by a large margin, indicating it effectiveness in suppressing the noisy boundaries and + +Table 3. Memory and speed comparison. Each entry is the memory or speed on DAVIS 2016/PixaHR dataset. We only compare the memory usage among learning-based approaches. + +
DatasetPixaHR 32×
MetricsF(1 pix)
Ours0.330
Ours adaptive 1 segment0.353
Ours adaptive 2 segments0.365
+ +Table 4. Strip height selection comparison on PixaHR ${32} \times$ . + +smoothing the final prediction. Also, with the boundary distance loss the network learns to have closer prediction. With C0 regularization (Ours w/o matching), the network filters out false positive boundaries by making a continuous prediction. Finally, the performance further improves with the matching loss because the network makes a consistent prediction over different strip heights to avoid overfitting. + +# 4.4. Memory and Speed Comparison + +Since we only extract a strip image for prediction, our approach is efficient in both memory and computation. Table 3 compares our memory overhead and speed performance with baselines. Over all, our computation and memory requirement is relatively small. Our memory requirement is smaller than other learning based approaches. Note that for U-Net boundary and STEAL, the prediction on PixaHR is made patch-by-patch due to the high resolution. + +More specifically, the main computation in our approach lies in strip reconstruction. e.g., for a $1920 \times 1080$ DAVIS image with around 3200 pixels along the boundary, our strip image creation takes 0.08s, prediction process takes 0.06s and the strip reconstruction takes 0.14s. A similar computation percentage is observed on PixaHR also. + +# 4.5. Qualitative Results + +We show visualization comparisons in Figure 4. It is clear that our approach produces more accurate boundaries than the other methods. To further show the effectiveness of our approach on refining the boundaries given LR or coarse masks, we provide qualitative results on COCO where only polygonal boundary ground truth is provided. We directly extract strip image using the coarse annotation on COCO, and visualize the prediction in Figure 5. Comparing with other approaches, our method provides more accurate boundaries, indicating the potential application of our approach to help refine the coarse boundaries. For more visualization results, please see supplementary material. + +# 4.6. Strip Height Adaptation + +We predict the target boundary in the strip image under the assumption that the target boundary exists within the pre-defined height range, however, it might not hold true especially for a large scale factor. While one solution is to predefine a larger height for strip image creation, we propose to progressively increase the height and regenerate strip image + +![](images/1c3d370a5f1508e00d7f4d8ad83d67eab33abb1618e48101261e614c4a2b98eb.jpg) +Dense CRF + +![](images/2d4cf71298a779abeb34a93e76de76647fa3f1b83a27ffe2e335f2e368bedb48.jpg) + +![](images/87ac56efecf48443fc8a087670296ea825e729fbb0fc7b651ec8b47e67926c41.jpg) + +![](images/58f0a05f203e065132482ad340688f75c00bf56c6271a7fd99b11b233c454649.jpg) + +![](images/bc91df4e990409d595ba86c0d098bfcffa3296f42ff53da8c74c16bf7f61ec94.jpg) +STEAL + +![](images/44283b5f68a989692ec2248b8fcbeadccc9ac4eebbceddae8bf7d5518a662952.jpg) + +![](images/0dcae279290071a8902b623fd61291749b56e60d38aa0dde679b670e0436be12.jpg) + +![](images/6c70bf384320afbdb674cfb452fa1c47eb4401b43eef6a1ef82da8ff17613572.jpg) + +![](images/2770dcf3fc5f8bcf5f835657c525177975d9cb91a2bfda43621f7a97ce3a2cd2.jpg) +Ours + +![](images/818dee3d1b97341d2f03749f2f6c23c627fae5df7c961395ca3829f1edfe02b8.jpg) + +![](images/da9e50983bf9e0bd0c556f9cabd2dd670df39a86ae417d6e00608c7bbc947697.jpg) + +![](images/5946831e589a4cf51bf1477fb0a9c7b722a5facf1af9d2849f13718257d8a026.jpg) + +![](images/3939c897f954971964032eebfe9a4149c4ec2ed3cfca04c8358e5335d56f397f.jpg) +Ground truth +Figure 4. Qualitative results on PixaHR $32 \times$ . Rows from top to down are the results of Dense CRF, STEAL, Ours and the Ground truth. We show the entire boundary (green color) result first and enlarge the blue bounding box region for comparison (boundaries are whitened). + +![](images/90dc9df854d06230d37c0f75f4c0ef306023075051cd70e8fcb9ea9f9335942c.jpg) + +![](images/28a4c7a7fc35baca6a11c052fcd5da43797ab87297c6e45f90b11f18d4e88437.jpg) + +![](images/7e8d84320d1f5ed9217a553a4722c0b357d2baf887ff5e04f5caf87d320a52f8.jpg) + +![](images/83c979939fa8955967e2440afd2eb65356bc5eed51b1286abb7ed1d2ad481d6e.jpg) +Coarse annotation + +![](images/615fa989eb50e56f72cec49ee91dd9269f45262db3039babcc0b0b8724a3e4ce.jpg) + +![](images/88e21e7d9b543c8c17db9d7a6d186dfd5595a99e5158b309aa898169df07b051.jpg) + +![](images/eedfdff8f86d70bedbc69aafda8109222e76816ed037759baf37817c33655a8c.jpg) +DELSE + +![](images/2b1f88cb0cd7ccf15514e4dc442c3064529e4f177b7e66f34ebd1bb1d93dd4fa.jpg) + +![](images/9b56287e4fe9c5226530e305157cf45aa1072311604989c736734648548ff836.jpg) + +![](images/63709e409c68a428a0b91c190b91c3381cd351f29f296216ea390dd2fdc0e387.jpg) +STEAL + +![](images/056c87fdf1a37edeaf38c788b2fb8893e28e804f44a64ce4d23b8aec6672c007.jpg) + +![](images/6e27bc105a602798bb5fe4bca08fe83d8b0c65e29099f7e52cd06ae959dffb73.jpg) +Figure 5. Qualitative results on COCO. Columns from left to right are coarse annotation, DELSE [39], STEAL [2] and Ours. + +![](images/5a7e5c8e41b8b9b8529048a41da7c407183bf4fd7af82c38b4b248cc080ae520.jpg) +Ours + +![](images/ec06e20415af3f8545a5cff3b47e9be609b64f5d29777785f6012656832eb9ca.jpg) + +![](images/4e6d88bc4f4c60f7fdd4821ac33c7538773b5704077a2606ee52f3a03bf5d0b8.jpg) + +to make new predictions at inference. Specifically, we increase the height of strip image until the summation of the final prediction score decreases. Furthermore, height adjustment is more flexible by dividing the whole contour into several segments and adjusting them independently. The results are shown in Table 4. The comparison between Ours and Ours adaptive 1 segment indicates the effectiveness to have a flexible height. The performance increases further when dividing the whole contour into 2 segments which al- + +lows variable height for different regions. + +# 5. Conclusion + +In summary, this paper presents a novel strategy to handle HR boundary refinement computationally and memory efficiently given LR precise masks. To save memory, we propose to extract boundary regions along the upsampled boundary spline to form a strip image and make prediction within this strip image. To focus on the target boundaries in strip image, boundary distance, matching loss and C0 continuity regularization have been proposed. Extensive experiments on both public and our newly created dataset demonstrate the effectiveness of the proposed approach. However, the current approach still has difficulty predicting complicated topology and soft boundary regions. A smarter adaptive strip height adjustment for every pixel might be a potential solution, which is left for future research. + +# Acknowledgement + +This work was partly funded by Adobe. The authors acknowledge the Maryland Advanced Research Computing Center (MARCC) for providing computing resources. + +# References + +[1] Pixabay. https://pixabay.com.6 +[2] David Acuna, Amlan Kar, and Sanja Fidler. Devil is in the edges: Learning semantic boundaries from noisy annotations. In CVPR, 2019. 1, 2, 6, 7, 8 +[3] David Acuna, Huan Ling, Amlan Kar, and Sanja Fidler. Efficient interactive annotation of segmentation datasets with polygon-rnn++. In CVPR, 2018. 2 +[4] Luis Álvarez, Luis Baumela, Pedro Henríguez, and Pablo Márquez-Neila. Morphological snakes. In CVPR, 2010. 2 +[5] Shai Avidan and Ariel Shamir. Seam carving for content-aware image resizing. In TOG, 2007. 5 +[6] Jonathan T Barron and Ben Poole. The fast bilateral solver. In ECCV, 2016. 3, 6, 7 +[7] Rodrigo Benenson, Stefan Popov, and Vittorio Ferrari. Large-scale interactive object segmentation with human annotators. In CVPR, 2019. 1 +[8] Yuri Y Boykov and M-P Jolly. Interactive graph cuts for optimal boundary & region segmentation of objects in nd images. In ICCV, 2001. 2 +[9] John Canny. A computational approach to edge detection. TPAMI, 1986. 1, 4 +[10] Lluis Castrejon, Kaustav Kundu, Raquel Urtasun, and Sanja Fidler. Annotating object instances with a polygon-rnn. In CVPR, 2017. 2 +[11] Liang-Chieh Chen, Yukun Zhu, George Papandreou, Florian Schroff, and Hartwig Adam. Encoder-decoder with atrous separable convolution for semantic image segmentation. In ECCV, 2018. 1 +[12] Wuyang Chen, Ziyu Jiang, Zhangyang Wang, Kexin Cui, and Xiaoning Qian. Collaborative global-local networks for memory-efficient segmentation of ultra-high resolution images. In CVPR, 2019. 1, 3 +[13] Dominic Cheng, Renjie Liao, Sanja Fidler, and Raquel Urtasun. Darnet: Deep active ray network for building segmentation. In CVPR, 2019. 2 +[14] Ruoxi Deng, Chunhua Shen, Shengjun Liu, Huibing Wang, and Xinru Liu. Learning to predict crisp boundaries. In ECCV, 2018. 2 +[15] Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Deep sparse rectifier neural networks. In AISTATS, 2011. 5 +[16] Jianzhong He, Shiliang Zhang, Ming Yang, Yanhu Shan, and Tiejun Huang. Bi-directional cascade network for perceptual edge detection. In CVPR, 2019. 1 +[17] Kaiming He, Jian Sun, and Xiaou Tang. Guided image filtering. TPAMI, 2012. 3, 6, 7 +[18] Hexiang Hu, Shiyi Lan, Yuning Jiang, Zhimin Cao, and Fei Sha. Fastmask: Segment multi-scale object candidates in one shot. In CVPR, 2017. 1 +[19] Michael Kass, Andrew Witkin, and Demetri Terzopoulos. Snakes: Active contour models. IJCV, 1988. 1, 2 +[20] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. *ICLR*, 2017. 2 +[21] Johannes Kopf, Michael F Cohen, Dani Lischinski, and Matt Uytendaele. Joint bilateral upsampling. In ToG, 2007. 3, 6, 7 + +[22] Philipp Krahenbuhl and Vladlen Koltun. Efficient inference in fully connected crfs with gaussian edge potentials. In NeurIPS, 2011. 2, 6, 7 +[23] Hoang Le, Long Mai, Brian Price, Scott Cohen, Hailin Jin, and Feng Liu. Interactive boundary prediction for object selection. In ECCV, 2018. 1, 2 +[24] Yin Li, Jian Sun, Chi-Keung Tang, and Heung-Yeung Shum. Lazy snapping. ToG, 2004. 2 +[25] Zhuwen Li, Qifeng Chen, and Vladlen Koltun. Interactive image segmentation with latent diversity. In CVPR, 2018. 1 +[26] Huan Ling, Jun Gao, Amlan Kar, Wenzheng Chen, and Sanja Fidler. Fast interactive object annotation with curve-gcn. In CVPR, 2019. 1, 2, 6, 7 +[27] Yun Liu, Ming-Ming Cheng, Xiaowei Hu, Kai Wang, and Xiang Bai. Richer convolutional features for edge detection. In CVPR, 2017. 1, 2 +[28] Diego Marcos, Devis Tuia, Benjamin Kellenberger, Lisa Zhang, Min Bai, Renjie Liao, and Raquel Urtasun. Learning deep structured active contours end-to-end. In CVPR, 2018. 2 +[29] Andreas Opelt, Axel Pinz, and Andrew Zisserman. A boundary-fragment-model for object detection. In ECCV, 2006. 1 +[30] Stanley Osher and James A Sethian. Fronts propagating with curvature-dependent speed: algorithms based on hamilton-jacobi formulations. JCP, 1988. 2 +[31] Federico Perazzi, Jordi Pont-Tuset, Brian McWilliams, Luc Van Gool, Markus Gross, and Alexander Sorkine-Hornung. A benchmark dataset and evaluation methodology for video object segmentation. In CVPR, 2016. 5, 6 +[32] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In MICCAI, 2015. 3 +[33] Carsten Rother, Vladimir Kolmogorov, and Andrew Blake. Grabcut: Interactive foreground extraction using iterated graph cuts. In TOG, 2004. 1, 6, 7 +[34] Christian Rupprecht, Elizabeth Huaroc, Maximilian Baust, and Nassir Navab. Deep active contours. arXiv preprint arXiv:1607.05074, 2016. 2 +[35] Ke Sun, Bin Xiao, Dong Liu, and Jingdong Wang. Deep high-resolution representation learning for human pose estimation. In CVPR, 2019. 1 +[36] Meng Tang, Lena Gorelick, Olga Veksler, and Yuri Boykov. Grabcut in one cut. In ICCV, 2013. 1 +[37] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Instance normalization: The missing ingredient for fast stylization. CoRR, 2016. 4 +[38] Tiantian Wang, Lihe Zhang, Shuo Wang, Huchuan Lu, Gang Yang, Xiang Ruan, and Ali Borji. Detect globally, refine locally: A novel approach to saliency detection. In CVPR, 2018. 1 +[39] Zian Wang, David Acuna, Huan Ling, Amlan Kar, and Sanja Fidler. Object instance annotation with deep extreme level set evolution. In CVPR, 2019. 2, 6, 7, 8 +[40] Ken CL Wong, Mehdi Moradi, Hui Tang, and Tanveer Syeda-Mahmood. 3d segmentation with exponential logarithmic loss for highly unbalanced object sizes. In MICCAI, 2018. 4 + +[41] Huikai Wu, Shuai Zheng, Junge Zhang, and Kaiqi Huang. Fast end-to-end trainable guided filter. In CVPR, 2018. 1, 3, 6, 7 +[42] Saining Xie and Zhuowen Tu. Holistically-nested edge detection. In CVPR, 2015. 1, 2, 6 +[43] Hongyu Xu, Xutao Lv, Xiaoyu Wang, Zhou Ren, Navaneeth Bodla, and Rama Chellappa. Deep regionlets for object detection. In ECCV, 2018. 1 +[44] Ning Xu, Brian Price, Scott Cohen, Jimei Yang, and Thomas S Huang. Deep interactive object selection. In CVPR, 2016. 1 +[45] Jimei Yang, Brian Price, Scott Cohen, Honglak Lee, and Ming-Hsuan Yang. Object contour detection with a fully convolutional encoder-decoder network. In CVPR, 2016. 2 +[46] Zhiding Yu, Weiyang Liu, Yang Zou, Chen Feng, Srikumar Ramalingam, BVK Vijaya Kumar, and Jan Kautz. Simultaneous edge alignment and learning. In ECCV, 2018. 1, 2 +[47] Yulun Zhang, Yapeng Tian, Yu Kong, Bineng Zhong, and Yun Fu. Residual dense network for image super-resolution. In CVPR, 2018. 1 +[48] Hengshuang Zhao, Xiaojuan Qi, Xiaoyong Shen, Jianping Shi, and Jiaya Jia. Icnet for real-time semantic segmentation on high-resolution images. In ECCV, 2018. 1, 3 +[49] Ting Zhao and Xiangqian Wu. Pyramid feature attention network for saliency detection. In CVPR, 2019. 1 +[50] Zongwei Zhou, Md Mahfuzur Rahman Siddiquee, Nima Tajbakhsh, and Jianming Liang. Unet++: A nested u-net architecture for medical image segmentation. In DLMIA. 2018. 3 \ No newline at end of file diff --git a/deepstriphighresolutionboundaryrefinement/images.zip b/deepstriphighresolutionboundaryrefinement/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..2f5d54e7e1ad49a75eba139f906839f751bfb2b5 --- /dev/null +++ b/deepstriphighresolutionboundaryrefinement/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b04db53e4d99ef8929c47963b0f406a632b2c687b9c3cb96aa9d57ff2441c89 +size 587334 diff --git a/deepstriphighresolutionboundaryrefinement/layout.json b/deepstriphighresolutionboundaryrefinement/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2c64a4d17b1b9fd358737a36ea4c9cc5bf9bbff0 --- /dev/null +++ b/deepstriphighresolutionboundaryrefinement/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d81dfc220c50f08208cbdc4ae7d259abb2e838ca5c8ddb929337b09f71ee436 +size 410276 diff --git a/deepstructurerevealednetworkfortexturerecognition/b9746b63-b179-49ee-8e40-aa24b6fbcf4d_content_list.json b/deepstructurerevealednetworkfortexturerecognition/b9746b63-b179-49ee-8e40-aa24b6fbcf4d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..326d50a63316a54e079f907d5f6da3df9891fe80 --- /dev/null +++ b/deepstructurerevealednetworkfortexturerecognition/b9746b63-b179-49ee-8e40-aa24b6fbcf4d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a00355aeea899e47753ad860effdd3e077df6c14e7de899d3f6978ef34cd4641 +size 69684 diff --git a/deepstructurerevealednetworkfortexturerecognition/b9746b63-b179-49ee-8e40-aa24b6fbcf4d_model.json b/deepstructurerevealednetworkfortexturerecognition/b9746b63-b179-49ee-8e40-aa24b6fbcf4d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a227ee9139e9d7e0c780875d46cfc1fcf11e548d --- /dev/null +++ b/deepstructurerevealednetworkfortexturerecognition/b9746b63-b179-49ee-8e40-aa24b6fbcf4d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d0c999b17a59920b5dc6c56479bac7a49f71682bce0150e41a3e7129798b458 +size 84274 diff --git a/deepstructurerevealednetworkfortexturerecognition/b9746b63-b179-49ee-8e40-aa24b6fbcf4d_origin.pdf b/deepstructurerevealednetworkfortexturerecognition/b9746b63-b179-49ee-8e40-aa24b6fbcf4d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f0989703916284d4150bacf59dc143b7a7322dd4 --- /dev/null +++ b/deepstructurerevealednetworkfortexturerecognition/b9746b63-b179-49ee-8e40-aa24b6fbcf4d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6022d87bcc050dcc54a804a055ddaa85a9420cfbe5e3f1ede843f5e60b2b30ca +size 8162777 diff --git a/deepstructurerevealednetworkfortexturerecognition/full.md b/deepstructurerevealednetworkfortexturerecognition/full.md new file mode 100644 index 0000000000000000000000000000000000000000..fcc7086ff7789688b936cc78bb972f426d47296e --- /dev/null +++ b/deepstructurerevealednetworkfortexturerecognition/full.md @@ -0,0 +1,273 @@ +# Deep Structure-Revealed Network for Texture Recognition + +Wei Zhai*, Yang Cao*, Zheng-Jun Zha†, HaiYong Xie, Feng Wu University of Science and Technology of China + +wzhai056@mail.ustc.edu.cn, forrest,zhazj,hxie,fengwu@ustc.edu.cn + +# Abstract + +Texture recognition is a challenging visual task since various primitives along with their arrangements can be recognized from a same texture image when perceiving with different contexts. Some recent work building on CNNs exploits orderless aggregating to provide invariance to spatial arrangements. However, these methods ignore the inherent structural property of textures, which is a critical cue for distinguishing and describing texture images in the wild. To address this problem, we propose a novel Deep Structure-Revealed Network (DSR-Net) that leverages spatial dependency among the captured primitives as structural representation for texture recognition. Specifically, a primitive capturing module (PCM) is devised to generate multiple primitives from eight directional spatial contexts, in which deep features are firstly extracted under the constraints of direction map and then encoded based on the similarities of neighborhood. Next, these primitives are associated with a dependence learning module (DLM) to generate structural representation, in which a two-way collaborative relationship strategy is introduced to perceive the spatial dependencies among multiple primitives. At last, the structure-revealed texture representations are integrated with spatial ordered information to achieve real-world texture recognition. Evaluation on the five most challenging texture recognition datasets has demonstrated the superiority of the proposed model against state-of-the-art methods. The structure-revealed performances of DSR-Net are further verified on some extensive experiments, including fine-grained classification and semantic segmentation. + +# 1. Introduction + +As texture is the fundamental microstructure of natural images and the preattentive human visual cue for perceiving natural scene, it serves as a significant mid-level feature representation for a wide variety of applications, such as + +![](images/21235c742527265bafd0aac02bb2e814b53ab02a07ae678cdad25ff17d5e2d92.jpg) + +![](images/9845224bc85fd1198735ec3bb819b80e51e8b6e4002521abe0051b0f318826c6.jpg) +Figure 1. The part $(A)$ shows that textures usually have several probable primitives. The part $(B)$ shows there is an inherent spatial dependency between them several probable primitives. + +medical image analysis, industrial visual inspection, image classification/retrieval [14, 27, 21, 20, 34, 30]. + +Texture refers to spatial organization of a set of basic primitives (i.e. textons) [11]. Therefore, a textured region usually conforms to some statistical properties, exhibiting periodically recurrent textons [14]. Some methods exploit the statistical property and incorporate an orderless component to obtain global compact feature representation. Recently, the methods building upon convolutional neural networks (CNNs) inherit this property and utilize an orderless aggregation of local texture features to achieve state-of-the-art performance on texture recognition. For example, Zhang et al. present Deep Texture Encoding Network [33] that integrates dictionary learning and residual encoding into CNN to form an end-to-end texture recognition network. Leveraging DeepTEN as a texture encoding layer, J. Xue et al. [27] further present a Deep Encoding Pooling Network (DEP) to capture the orderless texture details together with local spatial information for ground terrain recognition. + +Although the existing texture recognition methods excel at providing invariance to spatial arrangement, they are typically limited in capturing the inherent structure of texture primitives, resulting in incomplete description and in + +accurate recognition. In this paper, we propose a Deep Structure-Revealed Network (DSR-Net) that performs texture recognition by learning the inherent spatial dependency of multiple primitives. Our method is based on the observation that, though various texture primitives can be perceived with different spatial contexts (e.g. principal directions), there exists a spatial dependency among these primitives, which is invariant to spatial layout and reveals the inherent structural properties of texture. For example, as shown in Fig. 1 (a), multiple primitives can be identified from the same texture image, which will bring interference to texture recognition. However, we can also find that there is inherent spatial dependency among these primitives, which is invariant to spatial transformation and brightness change. It implies that this dependency is robust to the variability in primitive appearance and spatial organizations, and can serve as a structural representation of texture image. + +Specifically, to leverage the dependency among primitives for texture recognition, the proposed DSR-Net is devised to consist of two modules, which are primitive capturing module (PCM) and dependence learning module (DLM). PCM first generates deep features under the guidance and constraints of eight principal directional maps, and then encodes them based on the similarities of neighborhood to capture the robust representations for candidate primitives. DLM associates these representations and perceives the spatial dependencies among them by a two-way collaborative relationship strategy. Inspired by the success of DEP method, the dependency-based representations are then integrated with spatial ordered information to achieve texture recognition for images in the wild. The resultant network shows excellent performance not only for texture recognition, but also for general visual tasks, such as semantic segmentation and fine-grained classification. + +Our contributions are summarized as follows: + +(1) This paper presents a Deep Structure-Revealed Network (DSR-Net), which perceives spatial dependency among multiple texture primitives and leverages it as inherent structural property for texture recognition. +(2) This paper proposes a novel primitives dependency learning method, in which multiple primitives are first generated from eight directional contexts by introducing a similarity encoding scheme, and then associated together to generate structural dependencies by a two-way collaborative relation modeling strategy. +(3) Extension evaluations show that the proposed network not only excels at texture recognition, but also works well on general visual tasks, such as fine-grained classification and semantic segmentation. + +# 2. Related Work + +Texture representation is an important area of research in computer vision for potential applications in classification, + +segmentation and synthesis. Although the traditional goal is to represent texture based on their perceptual differences or material types, texture also has other characteristics that reflect from the structure, such as the inherent structure of primitives and structural dependence among primitives (As shown in Fig. 1). Structural-related characteristics play a crucial role in texture analysis, since they reflect the local primitive characteristics along with its spatial layout. + +The research of texture representation is mainly divided into two classes: traditional methods and CNN-based method (deep learning period method). In traditional methods, feature extraction are usually realized by methods like gray level co-occurrence matrix [8], LBP [18], filter banks method [25], SIFT [15] and HOG [6]. To get a compact global representation, some studies such as BoWs [4], VLAD [10], and FV [19] are presented to encode and aggregate local features. Finally, some machine learning methods (e.g. SVM) are used to generate global representations. + +In deep learning period, previous methods such as FVCNN [3] combine the deep network feature extraction with the BoWs method, LFV [24] directly use the FV method to encode features extracted by deep network. DeepTEN [33] uses the classic idea of residual dictionary learning to encode features, embedding the coding layer into the network for end-to-end training. To generate invariance to spatial layout, orderless bilinear pooling [13, 5] is introduced to polarize strong response and weak response features. DEP [27] further integrates orderless texture details and local spatial information to achieve recognition for texture in the wild. The advance of these existing methods is the powerful basic feature representation (CNN and SIFT) and the ability to features encoding (FV method). + +One of the main challenges of texture recognition is that various primitives along with their arrangements can be recognized from a same texture image when perceiving with different context. To eliminate this variability, most of the existing methods use the orderless component to obtain the invariance for the spatial arrangement of multiple primitives. Unlike them, this paper aims to exploits the spatial dependency among the recognized primitives, and leverage it as inherent structural representation for texture recognition. + +# 3. Deep Structure-Revealed Network + +# 3.1. Architecture + +In this paper, we propose a novel Deep Structure-Revealed Network (DSR-Net) to capture and represent the most probable structure of primitives by exploiting their inherent spatial dependency. The overall architecture of our proposed method is illustrated in Fig. 2 (a). Our network consists of two branches: structure revealed branch and spatial ordered Branch. Similar to [33, 27, 31], we also use + +![](images/23d096ec8822f451be63813aac470ff89457a816389ad2628e9787fcc70a82a4.jpg) +(a) + +![](images/2f86e8b8bd4c29f5c966605c8ec8468b00acd980fe0b6414e27f537b85b93bad.jpg) +(b) + +resnet50 as our feature extractor. To comprehensively capture the local spacial features, we concatenate features of different level together as a feature pool. Different feature maps are then upsampled to obtain the same resolution as the original feature map via bilinear interpolation. To decrease the computation cost, a $1 \times 1$ convolution layer is used to reduce the number of channels to 2048. Similar to [31], an adaptive average pooling is exploited to adapt to local features with different sizes, resulting in an orderless aggregation. Texture images in the wild are rarely filled by a single homogeneous surface but instead contain both orderless and ordered components. To address this problem, we refer to the method in DEP [27] and apply a global average pooling operation to balance the orderless representations with spatial ordered information. In the last, to deal with the nature texture without filling all in the image, the structure-revealed features are merged with spatial ordered features through an element-sum operation, just like [27]. + +# 3.2. Deep Structure-Revealed Module + +For DSR module, a primitive capturing module (PCM) is devised to generate the candidate primitives with eight principal directional contexts, in which deep features are firstly extracted under the constraint of directional map and then encoded by the similarities of neighborhood. Next, these candidates are associated by a dependence learning module (DLM) to generate the structural representation, in which a two-way collaborative relation modeling strategy is introduced to perceive the spatial dependencies among candidate primitives. Our proposed Deep Structure-Revealed Module is illustrated in Fig. 2 (b). + +Primitive Capturing Module. For primitives, elements + +![](images/913bd503080af88cee97437e4413d2c08ad03349593e69880ff55e396ca03ff2.jpg) +Figure 2. (a) The architecture of our proposed DSR-Net. Our network consists of two branches: Structure Revealed Branch and Spatial Ordered Branch. (b) The details of the Structure-Revealed module. +Figure 3. Primitive Capturing Module. We use directional map as directional context guidance to capture candidate primitives and improve the robustness of captured primitives by composition weight. PCM is a new convolutional computing layer. 'For each position' means every step in the PCM calculation process. + +in texture images, we need to capture them locally under the guidance of different spatial context. Therefore, a new primitive capturing module is devised to generate candidate primitives with provided spatial context constraints. Specifically, we mainly consider the contexts in eight directions (up, down, left, right, left top, right upper, left bottom, right bottom). A directional map with the same size as the convolution kernel is provided as the local context guidance in the convolution process. In the experiment, to facilitate the network convergence, we apply a final linear scaling of directional map values to make it falls in the range of $[-1, 1]$ . However, there is a gap between directional map and original feature space. Therefore, we devise a small convolution network to map the direction information to the original fea + +![](images/2f3d7a9d4cce8ca1e082f7e5d00a00edf12af65b8e29208b54b7c00f05c56cf1.jpg) +Figure 4. Dependence Learning Module. DLM is a new convolutional computing layer. 'For each position' means every step in the DLM calculation process. + +ture space. It can be expressed as follows: + +$$ +x _ {\mathbf {p}} ^ {D} = c a t \big (x _ {\mathbf {p}}, f _ {D} (D _ {\mathbf {p}}) \big), \tag {1} +$$ + +where $cat$ is the concatenation operation, $x$ is the input feature, $D$ is the directional map, $\mathbf{p} = (w,h)$ , $x_{\mathbf{p}}$ is the feature with the size same as kernel, and $f_{D}$ is a embedding function. To increase robustness to illumination change and spatial distortion, a composition operation referred in [9] is adopted, which is expressed as follows: + +$$ +\begin{array}{l} F \left(x _ {p} ^ {D}, x _ {p _ {\text {c e n t e r}}} ^ {D}\right) = \tag {2} \\ s i g m o i d (\Phi (f _ {p} (x _ {p} ^ {D}), f _ {p _ {c e n t e r}} (x _ {p _ {c e n t e r}} ^ {D}))) \\ \end{array} +$$ + +where $p_{center}$ is the center of $\mathbf{p}$ , sigmoid works as a normalization operation, and $\Phi$ is a measure of composability between $p$ and $p_{center}$ . In this paper, $\Phi(p, p_{center}) = -(p - p_{center})^2$ . $f_p$ and $f_{p_{center}}$ are the transformation function. The primitives capturing process can be expressed as follows: + +$$ +y _ {p r i m i t i v e s} = \frac {1}{k _ {w} \times k _ {h}} \sum F \left(x _ {p} ^ {D}, x _ {p _ {c e n t e r}} ^ {D}\right) \cdot x _ {\mathbf {p}}, \tag {3} +$$ + +where $y$ is the output of one position in the convolution process, $(k_w,k_h)$ is the size of $\mathbf{p}$ . The complete PCM is illustrated in Fig. 3. + +Dependence Learning Module. The dependency learning module is used to establish the dependency relationship among multiple candidate primitives in the local scope (as shown in Fig. 4). In dependence learning module, we consider the feature $x_{\mathbf{p}}$ of local region as a set of feature vectors $\mathbf{V} \in \mathbb{R}^{c \times \theta \times 1}$ , we first feed it into a transformation to generate two new features $\mathbf{V}^1$ and $\mathbf{V}^2$ respectively, where $\{\mathbf{V}^1, \mathbf{V}^2\} \in \mathbb{R}^{c \times \theta \times 1}$ . Then we perform a matrix multiplication between the transpose of $\mathbf{V}^2$ and $\mathbf{V}^1$ , and apply a softmax layer to calculate the dependence matrix $\mathbf{R} \in \mathbb{R}^{\theta \times \theta}$ : + +$$ +r _ {i j} = \frac {\exp \left(V _ {i} ^ {1} , V _ {j} ^ {2}\right)}{\sum_ {i = 1} ^ {\theta} \exp \left(V _ {i} ^ {1} , V _ {j} ^ {2}\right)}, \tag {4} +$$ + +where $r_{ij}$ measures the $i^{th}$ position's impact on $j^{th}$ position, $\theta = k_w \times k_h$ (Fig. 5 (a)). The more similar feature + +![](images/2211d2d434fbf37ef8cb72d393512e151570386dc984f957eb49da243f2f4457.jpg) +Figure 5. (a) The calculation process of the dependence learning module. (b) There is a coupling between the two-way connections of primitives. (c) The implementation process of a two-way collaborative relationship strategy. + +![](images/44fd5198a25e780807939043bfb2c10cafb73eeef58855cd1bdc6bd0906301ed.jpg) + +representations of the two elements are, the greater the correlation between them is. It can be seen that the current approach is equivalent to establishing a two-way relationship between two elements. Furthermore, to capture the correlation between the two-way relationships as shown in Fig. 5 (b), we propose a two-way collaborative strategy as shown in Fig. 5 (c), to improve the dependence modeling ability by introducing correlations between the two-way relation. The two-way collaborative strategy can be expressed as follows: + +$$ +r _ {i j} ^ {-} = \frac {\exp \left(r _ {i j}\right)}{\exp \left(r _ {i j}\right) \cdot \exp \left(r _ {j i}\right)}, \tag {5} +$$ + +$$ +\bar {r _ {j i}} = \frac {\exp (r _ {j i})}{\exp (r _ {i j}) \cdot \exp (r _ {j i})}, \tag {6} +$$ + +where $r_{ij}$ and $r_{ji}$ are a pair of two-way relationship in $\mathbf{R}$ , which are processed before the two-way collaborative operation. The $r_{ij}^{-}$ and $r_{ji}^{-}$ are a pair of two-way relation, which are processed after the two-way collaborative operation. + +Meanwhile, we feed feature $\mathbf{V}$ into a convolution layer to generate a new feature $\mathbf{V}^3\in \mathbb{R}^{c\times \theta \times 1}$ . Then we perform a matrix multiplication between $\mathbf{V}^3$ and the transpose of $\mathbf{R}$ . Finally, we apply an element-wise sum operation on the features $\mathbf{V}$ to obtain the final output $\mathbf{E}\in \mathbb{R}^{c\times \theta \times 1}$ , expressed as follows: + +$$ +\mathbf {E} _ {i} = \sum_ {j = 1} ^ {\theta} \left(r _ {i j} \mathbf {V} _ {j} ^ {3}\right) + \mathbf {V} _ {i}, \tag {7} +$$ + +It can be inferred from Eq. (7) that each element at the resulting feature $\mathbf{E}$ is a weighted sum of the features across all elements and original features. Finally, the dependency feature at each local scope can be expressed as follows: + +$$ +y _ {\text {d e p e n d e n c e}} = \frac {1}{\theta} \sum E _ {i}. \tag {8} +$$ + +# 4. Experiments + +In this section, we evaluate the proposed method on five texture/material datasets and then analyze the effectiveness of the method. Furthermore, we also present the testing results of applying our DSR module to fine-grained recognition and semantic segmentation tasks. + +# 4.1. Datasets and implementation + +Experimental data. We evaluate our model on five challenging texture/material recognition datasets. Describable Texture Database (DTD) [2] is considered as the most widely used benchmark for texture reconnaissance which contains 47 texture categories with a total of 5640 images. Flickr Material Dataset (FMD) [23, 22] consists of 10 material categories, each of which contains 100 images. KTH-TISP2b (KTH) [1, 17] dataset contains 11 material categories with a total of 4752 images. Ground Terrain in Outdoor Scenes (GTOS) [28] is a dataset of ground materials in outdoor scene with 40 categories. GTOS-mobile [33] is collected from GTOS dataset by mobile phone, which consists of 31 material classes. For DTD, FMD and KTH datasets, we randomly divide each dataset into 10 splits and report the mean accuracy across splits. For GTOS and GTOS-mobile datasets, the evaluation is based on provided train-test splits. Similar to [33], the result accuracy mean $\pm$ std\% are reported. The results on DTD, FMD, KTH and GTOS datasets are based on 5-time statistics, and the results on GTOS-mobile datasets are averaged over 2 runs. + +Implementation details. We implement our model with PyTorch, and two TITAN Xp GPUs are used for training. Similar to [31], Resnet-50 is used as feature extractor, in which $res3$ , $res4$ and $res5$ are used as the source of feature pool, the feature maps channels from feature pool are reduced to 2048 with 1 convolutional layer. We adopt a similar training and data augmentation strategy to [31]. At the testing phase, we use the resolution of $224 \times 224$ for all datasets. + +# 4.2. Ablation study + +To evaluate DSR-Net, we conduct experiments with several settings, including Feature Pool (FP), Primitives Capturing Module (PCM), Dependence Learning Module (DLM) and Spatial Order (SO). + +Primitives Capturing module. In this section, we explore the effectiveness of primitives capturing module for DSR-Net. The primitive capturing module is devised to generate the candidate primitives under the constraints of spatial contexts. As shown in Table 1, it outperforms the baseline with an improvement of $3.1\% /4.7\%$ (Baseline $\rightarrow$ Baseline+PCM) in terms of mean accuracy on DTD and GTOS. We also conducted experiments on the number of directions. In detail, we conducted experiments on two directions (up and down), four directions (up, down, right + +
ModelFPPCMDLMSODTDGTOS
Resnet50✓68.9±1.276.0±2.8
70.2±1.377.6±2.8
✓72.0±0.980.7±2.5
✓✓*74.3±0.983.2±2.3
✓✓✓*75.7±0.883.6±2.3
✓✓✓*✓76.3±0.784.2±2.2
DSR-Net✓✓✓✓77.6±0.685.3±2.0
+ +Table 1. Ablation study on DTD and GTOS datasets. 'FP' is Feature Pool. 'PCM' is Primitives Capturing Module. 'DLM' is Dependence Learning Module. 'SO' is Spatial Order. '\* is when 'DLM' doesn't use the two-way collaborative strategy. (Acc %) + +
Number of directionsDTDGTOS
None (Baseline)68.9±1.276.0±2.8
Two74.9±0.883.1±2.0
Four76.1±0.684.2±2.0
Eight77.6±0.685.3±2.0
+ +Table 2. Effectiveness of the number of directions on DTD and GTOS. (Acc %) + +
Kernel sizeDTDGTOS
3 × 376.7±0.684.6±2.0
5 × 577.3±0.785.3±2.0
7 × 777.6±0.684.3±2.1
9 × 977.1±0.683.7±2.1
Full image75.7±0.782.1±2.5
+ +Table 3. The effectiveness of kernel size in DLM. 'Full image' represents the kernel size is the same size as the input feature maps. (Acc %) + +and left), eight directions (up, down, right, left, up left, down left, up right and down right) and none directions (only Resnet50), respectively. The effectiveness of the number of directions is shown in Table 2. On the whole, the growth rate of the final result decreases with the number of directions increasing. It can be seen that multiple directional context guidances are helpful to extract more complete potential primitives, and it can help successive DLM learn more discriminative representations of structure dependency. We find that $3 \times 3$ is the best choice for the size of the kernel in PCM, which may be due to the fact that too large kernel will extract the structure information irrelevant to primitives. For the details on the selection of the kernel size in PCM, please refer to our supplementary materials. + +Dependence Learning module. In this part, we study the effect of dependence learning module which is proposed to model local structures and their relationships. To improve dependence modeling, a two-way collaborative rela + +
Texture DatasetConferenceBackboneDTDKTH-T2bFMDGTOSGTOS-mobile
Methodmeanstdmeanstdmeanstdmeanstdmeanstd
FV-VGGVD [3]CVPR2015VGGVD72.31.075.41.579.81.877.1------
FC-VGGVD [3]CVPR2015VGGVD62.90.881.82.577.41.8--------
B-CNN [13]CVPR2016VGGVD69.60.75.12.877.81.9--------
B-CNN [27]CVPR2016Resnet18----------------75.43--
LFV [24]ICCV2017VGGVD73.81.082.62.682.11.9--------
FASON [5]CVPR2017VGGVD72.30.676.52.3------------
DeepTEN [33]CVPR2017Resnet5069.6--82.03.380.20.984.52.9----
DeepTEN [27]CVPR2017Resnet18----------------76.12--
DEP [27]CVPR2018Resnet5073.2------------------
DEP [27]CVPR2018Resnet18----------------82.18--
MAP-net [31]ICCV2019VGGVD74.10.682.71.582.90.980.82.582.01.6
MAP-net [31]ICCV2019Resnet1869.50.880.91.880.81.080.32.682.981.6
MAP-net [31]ICCV2019Resnet5076.10.684.51.385.20.784.72.286.641.5
DSR-Net (ours)VGGVD74.90.783.51.584.00.881.82.282.941.6
DSR-Net (ours)Resnet1871.20.781.81.681.30.881.02.183.651.5
DSR-Net (ours)Resnet5077.60.685.91.386.00.885.32.087.031.5
+ +Table 4. Comparing our method (DSR-Net) with state-of-the-arts methods on DTD, KTH-T2b, FMD, GTOS and GTOS-mobile. Here 'VGGVD' is VGG-19. (Acc %) + +
MethodCUBCar
Resnet5085.491.7
RAM86.0--
DFL-CNN87.493.1
NTS-Net87.5--
Resnet50 + DSR (ours)87.693.3
+ +tionship strategy is adopted to improve dependence learning. As shown in Table 1, the performance is improved by $2.3\% / 2.5\%$ (Baseline + PCM → Baseline + PCM + DLM*) and $1.3\% / 1.1\%$ (Baseline + FP + PCM + DLM * → DSR-Net). It demonstrates that the two-way collaborative strategy effectively improves the performance of dependence learning module, leading to better performance on perceiving local structural properties. We also conducted experiments to evaluate effectiveness of kernel size in DLM, which determines the scope to establish local structural dependence. We set the kernel size from 3 to full image and show the results in Table 3. For DTD dataset, when kernel size is $7 \times 7$ , the result is the best. For GTOS dataset, when kernel size is $5 \times 5$ , the result is the best. We also find that, when kernel size is equal to the size of whole input feature map, the result is not ideal. The reason for this may be that modeling structure dependence on a large scope is inevitably affected by the structure of the non-textured region. + +Feature Pool and Spatial Order. Here, we evaluate the effectiveness of feature pool and spatial order. As shown in Table 1, the performance is improved by $1.4\% /0.4\%$ (Base + +Table 5. Fine-grained recognition results on CUB and Stanford Car196. 'Resnet ${50} +$ DSR' is our DSR-Net without spatial ordered pathway. (Acc %) + +
MethodpixAcc %mIoU %
FCN71.3229.39
SegNet71.0021.64
DilatedNet74.5234.90
FCN (Resnet50)74.5734.38
EncNet (resnet50)79.7341.11
PSP (Resnet50)80.0441.68
EncNet (Resnet50) + DSR (ours)80.1341.85
PSP (Resnet50) + DSR (ours)80.6442.35
+ +Table 6. Semantic segmentation results on the ADE20K validation set. 'EncNet + DSR' is EncNet with a DSR module. 'PSPNet + DSR' is PSPNet with a DSR module. + +line+PCM+DLM\* $\rightarrow$ Baseline+FP+PCM+DLM\*). The feature pool provides a better foundation representation to the successive tasks. Furthermore, the performance is improved by $0.6\% / 0.6\%$ (Baseline+FP+PCM+DLM\* $\rightarrow$ Baseline+FP+PCM+DLM\*+SO). It shows that the spatial ordered provides important cue for the spatial layout of textured region and the other regions. + +# 4.3. Comparisons against state-of-the-arts. + +We compare the performance of our method with several texture/material recognition methods on DTD, KTH-T2b, FMD, GTOS and GTOS-mobile datasets. All the methods are listed as follows: FV-VGGVD: Fisher Vector CNN [3]. FC-VGGVD: General VGG-19 [3]. B-CNN: BilinearCNN [13]. FASON: First And Second Order information fusion Network [5]. DeepTEN: Deep Texture Encoding Network [33]. LFV: Locally-Transferred Fisher Vectors [24]. DEP: Deep Encoding Pooling Network [27]. MAP + +![](images/a6e5fca4ff0fe867a0a9429fc19049389d7702d617c9dd55fea065318d89f8b0.jpg) +Figure 6. Qualitative segmentation results from the ADE20K [36] validation set for PSPNet with and without the DSR module. Differences are highlighted with red boxes. PSPNet with DSR module produces more accurate predictions. + +Net: Multiple-Attribute-Perceived Network for real-world texture recognition [31]. + +For a fair comparison, the texture/material reconnection results of other methods are obtained either directly from results provided by the authors, or by generating them using implementations provided by the authors with recommended parameter setting. Moreover, we perform experiment on DSR-Net using different backbones (VGG-19, Resnet-18 and Resnet-50). For Resnet-18 and Resnet-50, res4 and res5 are combined as feature pool. The channels of feature maps from feature pool are transformed to 512 and 2048 with $1 \times 1$ convolutional layer, respectively. For VGGVD, conv4_4 and conv5_4 are combined as feature pool. The channels of feature maps from feature pool are transformed to 512 with $1 \times 1$ convolutional layer. Table 4 reports the comparison results, where we can see that our method is $1.5\% / 1.4\% / 0.8\% / 0.6\% / 0.49\%$ higher than the state-of-the-art in mean acc for five benchmark datasets. Note that our DSR-Net improves most significantly on DTD in which the appearance and arrangement of primitives vary the most. It demonstrates that the structural properties revealed by DSR-Net can provide robustness to the variability of texture primitives. + +# 4.4. Application. + +To demonstrate the structure-revealed ability of our method in general visual tasks, we conduct extend Deep Structure-Revealed module into fine-grained recognition and scene parsing tasks. + +Fine-Grained Recognition. Recognizing fine-grained cat + +egories by computer vision techniques has attracted extensive attention. Texture can serve as an important mid-level representation for fine-grained recognition. We comprehensively evaluate our DSR module on Caltech-UCSD Birds (CUB-200-2011) [26] and Stanford Cars [12] datasets, which are widely used benchmark for fine-grained image classification. Note that we do not use any bounding box/part annotations in all our experiments. CUB-200-2011 is a bird classification task with 11788 images from 200 wild bird species. The ratio of train data and test data is roughly $1:1$ . It is generally considered one of the most competitive datasets since each species has only 30 images for training. Stanford Cars dataset contains 16185 images over 196 classes, and each class has a roughly $50f i50$ split. The DSR-Net without Spatial ordered branch is adopted as the model of this experiment. We adopt a similar parameter setting as [29]. Please refer to supplementary material for more implementation details. As shown in Table 5, our proposed method that uses Resnet50 as backbone can achieve better accuracy $(87.6\% / 93.3\%)$ than main-stream methods. It indicates that the structure-revealed ability of our DSR module is also beneficial for fine-grained recognition. + +Scene Parsing. In the next, we extend DSR module into the scene parsing, in which texture and material in the scene are also important cues. Therefore, we introduce the proposed DSR module to capture the structural property of textures for scene parsing. We report the performances on ADE20k [36] validation set. ADE20K dataset is a recent scene parsing benchmark containing denese labels of 150 stuff/object category labels. The dataset includes + +![](images/b7d4bc80c4cde5b1bb0a12ce98a2eefff8a71ca7845e7000003f9b825f600e53.jpg) +Figure 7. Visualization of features after dimension reduction by t-SNE [16]. We trained DSR-Net and Resnet on DTD dataset and used the vector output from AvgPooling layer as the feature representation. + +![](images/525a557f55ba46a2f6d4f6685ac3f3a53ad765296d3a3c3bd44db817a89cb61d.jpg) +Figure 8. Comparison of texture synthesis results using different models. Our texture templates come from natural images. + +$20K / 2K / 3K$ images for training, and validation. We insert DSR module into the popular model [35, 32] of scene parsing task for this experiment. Please refer to supplementary material for implementation details. We adopt a similar training setting to [35]. As shown in Table 6, the baseline networks (encnet and pspnet) with DSR module have achieved $0.40\% / 0.74\%$ and $0.60\% / 0.77\%$ improvement compared with the previous. As shown in Fig. 6, after inserting into DSR module, the texture/material regions can be better distinguished as one category, leading to more visual consistent segmentation results. + +# 4.5. Performance Analysis. + +To verify the ability of DSR-Net to represent texture features, we compared the distribution of the representations learned from Resnet and DSR-Net in the feature space. Fig. 7 shown the visualization of features after dimension reduction by t-SNE [16]. Compared with Resnet, DSR-Net shows a better feature distribution that exhibits smaller intra-class differences and larger interclass variations. More discriminative representation is obtained by using the inherent structure dependence of texture by our DSR module. + +To explicitly demonstrate the performance on structure revealing, we apply our DSR module into texture synthesis. We train our DSR-Net on DTD dataset by using the convolutional layers of VGG-19 as the feature extraction + +![](images/4681e0be78b47e3e10bd4a86ffaf4cb7a70fafc1acda572968ded8585f89facc.jpg) +Figure 9. Failure cases of our method. The red font represents the ground truth label, and the blue font represents the prediction result of our method. + +component. For fair comparison, we use the convolutional layers of VGG-19 as the feature extraction network in DSR-Net. We train it on DTD dataset. At the test stage, conv1_1, conv2_1, conv3_1 and conv4_1 layers are used for texture synthesis. And we run L-BFGS for 512 iterations in all experiments with learning rate 0.1. Fig. 8 shows the result of texture synthesis comparing with the work of Gatys et al. [7]. On the whole, our synthetic results are more delicate, in which local structure of texture is more complete, and texture arrangement is more regular. It shows that the convolutional layers of VGG-19 learn a detailed representation under the constraint of DSR module. + +Here we show some failure cases in Fig. 9. As can be seen, our method fails in some extreme scenes: (a) When the local structure is hard to be identified, the features in deep layers lose the detail information for structural dependence. (b) When there are multiple effective structures in texture images, it is not possible to model structure attributes well without semantic guidance. One feasible solution for these cases is to introduce high-level semantic information as a guidance, just like [31]. + +# 5. Conclusion + +The variability of multiple primitives bring a great interference to texture recognition. This paper proposes a new solution to utilize spatial dependency among the perceived primitives as texture representation. Since the dependency of primitives reveals the inherent structural properties of texture, the generated texture representation shows good robustness to spatial deformations and brightness change. Extensive experiment results suggest that our proposed DSR-Net approach is not only an effective solution for texture recognition, but also shows great potential in many visual applications. Incorporating with visual texture attributes perceiving method, such as [31], will be our future work. + +# Acknowledgment + +This work was supported by the National Key R&D Program of China under Grant 2017YFB1300201, the National Natural Science Foundation of China (NSFC) under Grants 61872327, 61622211, U19B2038 and 61620106009 as well as the Fundamental Research Funds for the Central Universities under Grant WK2380000001 and WK2100100030. + +# References + +[1] Barbara Caputo, Eric Hayman, and P Mallikarjuna. Class-specific material categorisation. In IEEE International Conference on Computer Vision (ICCV), pages 1597-1604, 2005. +[2] Mircea Cimpoi, Subhransu Maji, Iasonas Kokkinos, Sammy Mohamed, and Andrea Vedaldi. Describing textures in the wild. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3606-3613, 2014. +[3] Mircea Cimpoi, Subhransu Maji, and Andrea Vedaldi. Deep filter banks for texture recognition and segmentation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3828-3836, 2015. +[4] Gabriella Csurka, Christopher Dance, Lixin Fan, Jutta Willamowski, and Cedric Bray. Visual categorization with bags of keypoints. In Workshop on statistical learning in computer vision, ECCV, pages 1-2, 2004. +[5] Xiyang Dai, Joe Yue-Hei Ng, and Larry S Davis. Fason: First and second order information fusion network for texture recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 7352-7360, 2017. +[6] Dalal, Navneet, Triggs, and Bill. Histograms of oriented gradients for human detection. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 886-893, 2005. +[7] Leon A Gatys, Alexander S Ecker, and Matthias Bethge. A neural algorithm of artistic style. arXiv preprint arXiv:1508.06576, 2015. +[8] Robert M Haralick, Karthikeyan Shanmugam, et al. Textural features for image classification. IEEE Transactions on systems, man, and cybernetics, pages 610-621, 1973. +[9] Han Hu, Zheng Zhang, Zhenda Xie, and Stephen Lin. Local relation networks for image recognition. arXiv preprint arXiv:1904.11491, 2019. +[10] Hervé Jégou, Matthijs Douze, Cordelia Schmid, and Patrick Pérez. Aggregating local descriptors into a compact image representation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3304-3311, 2010. +[11] Bela Julesz. Textons, the elements of texture perception, and their interactions. Nature, 290(5802):91, 1981. +[12] Jonathan Krause, Michael Stark, Jia Deng, and Li Fei-Fei. 3d object representations for fine-grained categorization. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pages 554–561, 2013. +[13] Tsung-Yu Lin and Subhransu Maji. Visualizing and understanding deep texture representations. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2791-2799, 2016. +[14] Li Liu, Jie Chen, Paul Fieguth, Guoying Zhao, Rama Chellappa, and Matti Pietikainen. From bow to cnn: Two decades of texture representation for texture classification. International Journal of Computer Vision (IJCV), pages 1-36, 2018. +[15] David G Lowe. Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision (IJCV), pages 91-110, 2004. + +[16] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research (JMLR), pages 2579-2605, 2008. +[17] P Mallikarjuna, Alireza Tavakoli Targhi, Mario Fritz, Eric Hayman, Barbara Caputo, and Jan-Olof Eklundh. The kth-tips2 database. Computational Vision and Active Perception Laboratory (CVAP), Stockholm, Sweden, 2006. +[18] Timo Ojala, Pietik, Matti Inen, and Topi. Multiresolution Gray-Scale and Rotation Invariant Texture Classification with Local Binary Patterns. Springer Berlin Heidelberg, 2000. +[19] Florent Perronnin, Jorge Sánchez, and Thomas Mensink. Improving the fisher kernel for large-scale image classification. In European Conference on Computer Vision (ECCV), pages 143-156, 2010. +[20] Tingting Qiao, Jing Zhang, Duanqing Xu, and Dacheng Tao. Mirrorgan: Learning text-to-image generation by redescription. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1505-1514, 2019. +[21] Yong Rui, Thomas S Huang, and Shih-Fu Chang. Image retrieval: Current techniques, promising directions, and open issues. Journal of Visual Communication and Image Representation (JVCIR), pages 39-62, 1999. +[22] Lavanya Sharan, Ce Liu, Ruth Rosenholtz, and Edward H Adelson. Recognizing materials using perceptually inspired features. International Journal of Computer Vision (IJCV), pages 348-371, 2013. +[23] Lavanya Sharan, Ruth Rosenholtz, and Edward Adelson. Material perception: What can you see in a brief glance? Journal of Vision, pages 784-784, 2009. +[24] Yang Song, Fan Zhang, Qing Li, Heng Huang, Lauren J O'Donnell, and Weidong Cai. Locally-transferred fisher vectors for texture classification. In IEEE International Conference on Computer Vision (ICCV), pages 4922-4930, 2017. +[25] Manik Varma and Andrew Zisserman. Texture classification: Are filter banks necessary? In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages II-691, 2003. +[26] Catherine Wah, Steve Branson, Peter Welinder, Pietro Perona, and Serge Belongie. The caltech-ucsd birds-200-2011 dataset. 2011. +[27] Jia Xue, Hang Zhang, and Kristin Dana. Deep texture manifold for ground terrain recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 558-567, 2018. +[28] Jia Xue, Hang Zhang, Kristin J Dana, and Ko Nishino. Differential angular imaging for material recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 6940-6949, 2017. +[29] Ze Yang, Tiange Luo, Dong Wang, Zhiqiang Hu, Jun Gao, and Liwei Wang. Learning to navigate for fine-grained classification. In Proceedings of the European Conference on Computer Vision (ECCV), pages 420-435, 2018. +[30] Zheng-Jun Zha, Xian-Sheng Hua, Tao Mei, Jingdong Wang, Guo-Jun Qi, and Zengfu Wang. Joint multi-label multi-instance learning for image classification. In 2008 IEEE conference on computer vision and pattern recognition, pages 1-8. IEEE, 2008. + +[31] Wei Zhai, Cao Yang, Zhang Jing, and Zheng-Jun Zha. Deep multiple-attribute-perceived network for real-world texture recognition. In IEEE International Conference on Computer Vision (ICCV), 2019. +[32] Hang Zhang, Kristin Dana, Jianping Shi, Zhongyue Zhang, Xiaogang Wang, Ambrish Tyagi, and Amit Agrawal. Context encoding for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7151-7160, 2018. +[33] Hang Zhang, Jia Xue, and Kristin Dana. Deep ten: Texture encoding network. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 708-717, 2017. +[34] Hanwang Zhang, Zheng-Jun Zha, Yang Yang, Shuicheng Yan, and Tat-Seng Chua. Robust (semi) nonnegative graph embedding. IEEE transactions on image processing, 23(7):2996-3012, 2014. +[35] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid scene parsing network. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2881-2890, 2017. +[36] Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Scene parsing through ade20k dataset. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 633-641, 2017. \ No newline at end of file diff --git a/deepstructurerevealednetworkfortexturerecognition/images.zip b/deepstructurerevealednetworkfortexturerecognition/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f0896701751e9788db0a54b5782cde0c8207a0a9 --- /dev/null +++ b/deepstructurerevealednetworkfortexturerecognition/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59c360b71728f87be4cb8bb023baec3169c87a193c76c164a61d9635cc61f19a +size 780170 diff --git a/deepstructurerevealednetworkfortexturerecognition/layout.json b/deepstructurerevealednetworkfortexturerecognition/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6a56709627ef22848fa380b3c431beeb6aa5ed42 --- /dev/null +++ b/deepstructurerevealednetworkfortexturerecognition/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9481e00eadf583493bcc4f6eead4c9474cbb40d0bdf7fc4af35e42989eacdfdb +size 326296 diff --git a/deepunfoldingnetworkforimagesuperresolution/21ebeb67-397a-4712-b4b5-61be4ae08b2c_content_list.json b/deepunfoldingnetworkforimagesuperresolution/21ebeb67-397a-4712-b4b5-61be4ae08b2c_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..728bd16d11e4433be297f5b5ba7ee505381d3bf3 --- /dev/null +++ b/deepunfoldingnetworkforimagesuperresolution/21ebeb67-397a-4712-b4b5-61be4ae08b2c_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2fe95e05d1d4a26f7178c0054af9f078fddc6178f508693fd2d37142c3e4973b +size 89684 diff --git a/deepunfoldingnetworkforimagesuperresolution/21ebeb67-397a-4712-b4b5-61be4ae08b2c_model.json b/deepunfoldingnetworkforimagesuperresolution/21ebeb67-397a-4712-b4b5-61be4ae08b2c_model.json new file mode 100644 index 0000000000000000000000000000000000000000..00b703a296387b926e8552b1a0a2cb226d6902bf --- /dev/null +++ b/deepunfoldingnetworkforimagesuperresolution/21ebeb67-397a-4712-b4b5-61be4ae08b2c_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ee5ba87396f70b934218c1ad0dace7fc9320aace5027276cfe34f760a69f581 +size 116535 diff --git a/deepunfoldingnetworkforimagesuperresolution/21ebeb67-397a-4712-b4b5-61be4ae08b2c_origin.pdf b/deepunfoldingnetworkforimagesuperresolution/21ebeb67-397a-4712-b4b5-61be4ae08b2c_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7a0ef215108fef095b0961e5e054d3e144545209 --- /dev/null +++ b/deepunfoldingnetworkforimagesuperresolution/21ebeb67-397a-4712-b4b5-61be4ae08b2c_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45528ef037bc5bed9f9d8d9f5d64b78533a050acf56857215ad898c62d4d34dc +size 975844 diff --git a/deepunfoldingnetworkforimagesuperresolution/full.md b/deepunfoldingnetworkforimagesuperresolution/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8ba383034ea28e2b2e9bd29b008778f4e8a6538c --- /dev/null +++ b/deepunfoldingnetworkforimagesuperresolution/full.md @@ -0,0 +1,414 @@ +# Deep Unfolding Network for Image Super-Resolution + +Kai Zhang Luc Van Gool Radu Timofte + +Computer Vision Lab, ETH Zurich, Switzerland + +{kai.zhang, vangool, timofter}@vision.ee.ethz.ch + +https://github.com/cszn/USRNet + +# Abstract + +Learning-based single image super-resolution (SISR) methods are continuously showing superior effectiveness and efficiency over traditional model-based methods, largely due to the end-to-end training. However, different from model-based methods that can handle the SISR problem with different scale factors, blur kernels and noise levels under a unified MAP (maximum a posteriori) framework, learning-based methods generally lack such flexibility. To address this issue, this paper proposes an end-to-end trainable unfolding network which leverages both learning-based methods and model-based methods. Specifically, by unfolding the MAP inference via a half-quadratic splitting algorithm, a fixed number of iterations consisting of alternately solving a data subproblem and a prior subproblem can be obtained. The two subproblems then can be solved with neural modules, resulting in an end-to-end trainable, iterative network. As a result, the proposed network inherits the flexibility of model-based methods to super-resolve blurry, noisy images for different scale factors via a single model, while maintaining the advantages of learning-based methods. Extensive experiments demonstrate the superiority of the proposed deep unfolding network in terms of flexibility, effectiveness and also generalizability. + +# 1. Introduction + +Single image super-resolution (SISR) refers to the process of recovering the natural and sharp detailed high-resolution (HR) counterpart from a low-resolution (LR) image. It is one of the classical ill-posed inverse problems in low-level computer vision and has a wide range of real-world applications, such as enhancing the image visual quality on high-definition displays [42, 53] and improving the performance of other high-level vision tasks [13]. + +Despite decades of studies, SISR still requires further study for academic and industrial purposes [35, 64]. The difficulty is mainly caused by the inconsistency between the + +![](images/1a3dabe1fd82ffc5b14d638cc2bb6a4d35d3669a15963246a144a97bfb86e307.jpg) +Figure 1. While a single degradation model (i.e., Eq. (1)) can result in various LR images for an HR image, with different blur kernels, scale factors and noise, the study of learning a single deep model to invert all such LR images to HR image is still lacking. + +simplistic degradation assumption of existing SISR methods and the complex degradations of real images [16]. Actually, for a scale factor of $s$ , the classical (traditional) degradation model of SISR [17, 18, 37] assumes the LR image $y$ is a blurred, decimated, and noisy version of an HR image $x$ . Mathematically, it can be expressed by + +$$ +\mathbf {y} = (\mathbf {x} \otimes \mathbf {k}) \downarrow_ {\mathbf {s}} + \mathbf {n}, \tag {1} +$$ + +where $\otimes$ represents two-dimensional convolution of $\mathbf{x}$ with blur kernel $\mathbf{k}$ , $\downarrow_{\mathbf{s}}$ denotes the standard s-fold downsampler, i.e., keeping the upper-left pixel for each distinct $\mathbf{s} \times \mathbf{s}$ patch and discarding the others, and $\mathbf{n}$ is usually assumed to be additive, white Gaussian noise (AWGN) specified by standard deviation (or noise level) $\sigma$ [71]. With a clear physical meaning, Eq. (1) can approximate a variety of LR images by setting proper blur kernels, scale factors and noises for an underlying HR images. In particular, Eq. (1) has been extensively studied in model-based methods which solve a combination of a data term and a prior term under the MAP framework. + +Though model-based methods are usually algorithmically interpretable, they typically lack a standard criterion for their evaluation because, apart from the scale factor, Eq. (1) additionally involves a blur kernel and added noise. For convenience, researchers resort to bicubic degradation without consideration of blur kernel and noise level [14, + +56, 60]. However, bicubic degradation is mathematically complicated [25], which in turn hinders the development of model-based methods. For this reason, recently proposed SISR solutions are dominated by learning-based methods that learn a mapping function from a bicubicly downsampled LR image to its HR estimation. Indeed, significant progress on improving PSNR [26, 70] and perceptual quality [31, 47, 58] for the bicubic degradation has been achieved by learning-based methods, among which convolutional neural network (CNN) based methods are the most popular, due to their powerful learning capacity and the speed of parallel computing. Nevertheless, little work has been done on applying CNNs to tackle Eq. (1) via a single model. Unlike model-based methods, CNNs usually lack flexibility to super-resolve blurry, noisy LR images for different scale factors via a single end-to-end trained model (see Fig. 1). + +In this paper, we propose a deep unfolding super-resolution network (USRNet) to bridge the gap between learning-based methods and model-based methods. On one hand, similar to model-based methods, USRNet can effectively handle the classical degradation model (i.e., Eq. (1)) with different blur kernels, scale factors and noise levels via a single model. On the other hand, similar to learning-based methods, USRNet can be trained in an end-to-end fashion to guarantee effectiveness and efficiency. To achieve this, we first unfold the model-based energy function via a half-quadratic splitting algorithm. Correspondingly, we can obtain an inference which iteratively alternates between solving two subproblems, one related to a data term and the other to a prior term. We then treat the inference as a deep network, by replacing the solutions to the two subproblems with neural modules. Since the two subproblems correspond respectively to enforcing degradation consistency knowledge and guaranteeing denoiser prior knowledge, USRNet is well-principled with explicit degradation and prior constraints, which is a distinctive advantage over existing learning-based SISR methods. It is worth noting that since USRNet involves a hyper-parameter for each subproblem, the network contains an additional module for hyper-parameter generation. Moreover, in order to reduce the number of parameters, all the prior modules share the same architecture and same parameters. + +The main contributions of this work are as follows: + +1) An end-to-end trainable unfolding super-resolution network (USRNet) is proposed. USRNet is the first attempt to handle the classical degradation model with different scale factors, blur kernels and noise levels via a single end-to-end trained model. +2) USRNet integrates the flexibility of model-based methods and the advantages of learning-based methods, providing an avenue to bridge the gap between model-based and learning-based methods. + +3) USRNet intrinsically imposes a degradation constraint (i.e., the estimated HR image should accord with the degradation process) and a prior constraint (i.e., the estimated HR image should have natural characteristics) on the solution. +4) USRNet performs favorably on LR images with different degradation settings, showing great potential for practical applications. + +# 2. Related work + +# 2.1. Degradation models + +Knowledge of the degradation model is crucial for the success of SISR [16, 59] because it defines how the LR image is degraded from an HR image. Apart from the classical degradation model and bicubic degradation model, several others have also been proposed in the SISR literature. + +In some early works, the degradation model assumes the LR image is directly downsampled from the HR image without blurring, which corresponds to the problem of image interpolation [8]. In [34, 52], the bicubicly downsampled image is further assumed to be corrupted by Gaussian noise or JPEG compression noise. In [15, 42], the degradation model focuses on Gaussian blurring and a subsequent downsampling with scale factor 3. Note that, different from Eq. (1), their downsampling keeps the center rather than upper-left pixel for each distinct $3 \times 3$ patch. In [67], the degradation model assumes the LR image is the blurred, bicubicly downsampled HR image with some Gaussian noise. By assuming the bicubicly downsampled clean HR image is also clean, [68] treats the degradation model as a composition of deblurring on the LR image and SISR with bicubic degradation. + +While many degradation models have been proposed, CNN-based SISR for the classical degradation model has received little attention and deserves further study. + +# 2.2. Flexible SISR methods + +Although CNN-based SISR methods have achieved impressive success to handle bicubic degradation, applying them to deal with other more practical degradation models is not straightforward. For the sake of practicability, it is preferable to design a flexible super-resolver that takes the three key factors, i.e., scale factor, blur kernel and noise level, into consideration. + +Several methods have been proposed to tackle bicubic degradation with different scale factors via a single model, such as LapSR [30] with progressive upsampling, MDSR [36] with scales-specific branches, Meta-SR [23] with meta-upscale module. To flexibly deal with a blurry LR image, the methods proposed in [44, 67] take the PCA dimension reduced blur kernel as input. However, these methods are limited to Gaussian blur kernels. Perhaps the + +most flexible CNN-based works which can handle various blur kernels, scale factors and noise levels, are the deep plug-and-play methods [65, 68]. The main idea of such methods is to plug the learned CNN prior into the iterative solution under the MAP framework. Unfortunately, these are essentially model-based methods which suffer from a high computational burden and they involve manually selected hyper-parameters. How to design an end-to-end trainable model so that better results can be achieved with fewer iterations remains uninvestigated. + +While learning-based blind image restoration has recently received considerable attention [12, 39, 43, 50, 62], we note that this work focuses on non-blind SISR which assumes the LR image, blur kernel and noise level are known beforehand. In fact, non-blind SISR is still an active research direction. First, the blur kernel and noise level can be estimated, or are known based on other information (e.g., camera setting). Second, users can control the preference of sharpness and smoothness by tuning the blur kernel and noise level. Third, non-blind SISR can be an intermediate step towards solving blind SISR. + +# 2.3. Deep unfolding image restoration + +Apart from the deep plug-and-play methods (see, e.g., [7, 10, 22, 57]), deep unfolding methods can also integrate model-based methods and learning-based methods. Their main difference is that the latter optimize the parameters in an end-to-end manner by minimizing the loss function over a large training set, and thus generally produce better results even with fewer iterations. The early deep unfolding methods can be traced back to [4, 48, 54] where a compact MAP inference based on gradient descent algorithm is proposed for image denoising. Since then, a flurry of deep unfolding methods based on certain optimization algorithms (e.g., half-quadratic splitting [2], alternating direction method of multipliers [6] and primal-dual [1, 9]) have been proposed to solve different image restoration tasks, such as image denoising [11, 32], image deblurring [29, 49], image compressive sensing [61, 63], and image demosaicking [28]. + +Compared to plain learning-based methods, deep unfolding methods are interpretable and can fuse the degradation constraint into the learning model. However, most of them suffer from one or several of the following drawbacks. (i) The solution of the prior subproblem without using a deep CNN is not powerful enough for good performance. (ii) The data subproblem is not solved by a closed-form solution, which may hinder convergence. (iii) The whole inference is trained via a stage-wise and fine-tuning manner rather than a complete end-to-end manner. Furthermore, given that there exists no deep unfolding SISR method to handle the classical degradation model, it is of particular interest to propose such a method that overcomes the above mentioned drawbacks. + +# 3. Method + +# 3.1. Degradation model: classical vs. bicubic + +Since bicubic degradation is well-studied, it is interesting to investigate its relationship to the classical degradation model. Actually, the bicubic degradation can be approximated by setting a proper blur kernel in Eq. (1). To achieve this, we adopt the data-driven method to solve the following kernel estimation problem by minimizing the reconstruction error over a large HR/bicubic-LR pairs $\{(\mathbf{x},\mathbf{y})\}$ + +$$ +\mathbf {k} _ {b i c u b i c} ^ {\times \mathbf {s}} = \arg \min _ {\mathbf {k}} \| (\mathbf {x} \otimes \mathbf {k}) \downarrow_ {\mathbf {s}} - \mathbf {y} \|. \tag {2} +$$ + +Fig. 2 shows the approximated bicubic kernels for scale factors 2, 3 and 4. It should be noted that since the downsampling operation selects the upper-left pixel for each distinct $\mathbf{s} \times \mathbf{s}$ patch, the bicubic kernels for scale factors 2, 3 and 4 have a center shift of 0.5, 1 and 1.5 pixels to the upper-left direction, respectively. + +![](images/e82163a8e8dc2fc86c6c1f747cfbfa117b180bcedf5df7ef532cc4307f7f6632.jpg) + +![](images/b41e16b4d80c4ff7077cee7ee091221bef9172193284abbc0235b4ae6c9b24a8.jpg) + +![](images/8fecbd20c2730b064fa241933917febd401a2707ada2276e74ef559111d0ab03.jpg) + +![](images/a6126c6522df075e2f22e70156a412fd89dcb83de91dc267438c28c93db9abc1.jpg) +(a) $\mathbf{k}_{bicubic}^{X^2}$ + +![](images/77216c43c55fd32fbda70e75b26546ef016b9abcad116d9fd905e5f24923019a.jpg) +(b) $\mathbf{k}_{bicubic}^{3}$ + +![](images/43963839ade71300a8b88275f74c276d81320121a0071bc8dfa18fbb07589961.jpg) +(c) $\mathbf{k}_{bicubic}^{4}$ +Figure 2. Approximated bicubic kernels for scale factors 2, 3 and 4 under the classical SISR degradation model assumption. Note that these kernels contain negative values. + +# 3.2. Unfolding optimization + +According to the MAP framework, the HR image could be estimated by minimizing the following energy function + +$$ +E (\mathbf {x}) = \frac {1}{2 \sigma^ {2}} \| \mathbf {y} - (\mathbf {x} \otimes \mathbf {k}) \downarrow_ {\mathbf {s}} \| ^ {2} + \lambda \Phi (\mathbf {x}), \tag {3} +$$ + +where $\frac{1}{2\sigma^2}\| \mathbf{y} - (\mathbf{x}\otimes \mathbf{k})\downarrow_{\mathbf{s}})\| ^2$ is the data term, $\Phi (\mathbf{x})$ is the prior term, and $\lambda$ is a trade-off parameter. In order to obtain an unfolding inference for Eq. (3), the half-quadratic splitting (HQS) algorithm is selected due to its simplicity and fast convergence in many applications. HQS tackles Eq. (3) by introducing an auxiliary variable $\mathbf{z}$ , leading to the following approximate equivalence + +$$ +E _ {\mu} (\mathbf {x}, \mathbf {z}) = \frac {1}{2 \sigma^ {2}} \| \mathbf {y} - (\mathbf {z} \otimes \mathbf {k}) \downarrow_ {\mathbf {s}} \| ^ {2} + \lambda \Phi (\mathbf {x}) + \frac {\mu}{2} \| \mathbf {z} - \mathbf {x} \| ^ {2}, \tag {4} +$$ + +where $\mu$ is the penalty parameter. Such problem can be addressed by iteratively solving subproblems for $\mathbf{x}$ and $\mathbf{z}$ + +$$ +\left\{ \begin{array}{l} \mathbf {z} _ {k} = \arg \min _ {\mathbf {z}} \| \mathbf {y} - (\mathbf {z} \otimes \mathbf {k}) \downarrow_ {\mathbf {s}} \| ^ {2} + \mu \sigma^ {2} \| \mathbf {z} - \mathbf {x} _ {k - 1} \| ^ {2}, \\ \mathbf {x} _ {k} = \arg \min _ {\mathbf {x}} \frac {\mu}{2} \| \mathbf {z} _ {k} - \mathbf {x} \| ^ {2} + \lambda \Phi (\mathbf {x}). \end{array} \right. \tag {6} +$$ + +According to Eq. (5), $\mu$ should be large enough so that $\mathbf{x}$ and $\mathbf{z}$ are approximately equal to the fixed point. However, this would also result in slow convergence. Therefore, a good rule of thumb is to iteratively increase $\mu$ . For convenience, the $\mu$ in the $k$ -th iteration is denoted by $\mu_{k}$ . + +It can be observed that the data term and the prior term are decoupled into Eq. (5) and Eq. (6), respectively. For the solution of Eq. (5), the fast Fourier transform (FFT) can be utilized by assuming the convolution is carried out with circular boundary conditions. Notably, it has a closed-form expression [71] + +$$ +\mathbf {z} _ {k} = \mathcal {F} ^ {- 1} \left(\frac {1}{\alpha_ {k}} \left(\mathbf {d} - \overline {{\mathcal {F} (\mathbf {k})}} \odot_ {\mathbf {s}} \frac {(\mathcal {F} (\mathbf {k}) \mathbf {d}) \Downarrow_ {\mathbf {s}}}{(\overline {{\mathcal {F} (\mathbf {k})}} \mathcal {F} (\mathbf {k})) \Downarrow_ {\mathbf {s}} + \alpha_ {k}}\right)\right) \tag {7} +$$ + +where $\mathbf{d}$ is defined as + +$$ +\mathbf {d} = \overline {{\mathcal {F} (\mathbf {k})}} \mathcal {F} (\mathbf {y} \uparrow_ {\mathbf {s}}) + \alpha_ {k} \mathcal {F} (\mathbf {x} _ {k - 1}) +$$ + +with $\alpha_{k} \triangleq \mu_{k}\sigma^{2}$ and where the $\mathcal{F}(\cdot)$ and $\mathcal{F}^{-1}(\cdot)$ denote FFT and inverse FFT, $\overline{\mathcal{F}(\cdot)}$ denotes complex conjugate of $\mathcal{F}(\cdot)$ , $\odot_{\mathbf{s}}$ denotes the distinct block processing operator with element-wise multiplication, i.e., applying elementwise multiplication to the $\mathbf{s} \times \mathbf{s}$ distinct blocks of $\overline{\mathcal{F}(\mathbf{k})}$ , $\Downarrow_{\mathbf{s}}$ denotes the distinct block downsampler, i.e., averaging the $\mathbf{s} \times \mathbf{s}$ distinct blocks, $\uparrow_{\mathbf{s}}$ denotes the standard s-fold upsampler, i.e., upsampling the spatial size by filling the new entries with zeros. It is especially noteworthy that Eq. (7) also works for the special case of deblurring when $\mathbf{s} = 1$ . For the solution of Eq. (6), it is known that, from a Bayesian perspective, it actually corresponds to a denoising problem with noise level $\beta_{k} \triangleq \sqrt{\lambda / \mu_{k}}$ [10]. + +# 3.3. Deep unfolding network + +Once the unfolding optimization is determined, the next step is to design the unfolding super-resolution network (USRNet). Because the unfolding optimization mainly consists of iteratively solving a data subproblem (i.e., Eq. (5)) and a prior subproblem (i.e., Eq. (6)), USRNet should alternate between a data module $\mathcal{D}$ and a prior module $\mathcal{P}$ . In addition, as the solutions of the subproblems also take the hyper-parameters $\alpha_{k}$ and $\beta_{k}$ as input, respectively, a hyper-parameter module $\mathcal{H}$ is further introduced into USRNet. Fig. 3 illustrates the overall architecture of USRNet with $K$ iterations, where $K$ is empirically set to 8 for the speed-accuracy trade-off. Next, more details on $\mathcal{D}$ , $\mathcal{P}$ and $\mathcal{H}$ are provided. + +Data module $\mathcal{D}$ The data module plays the role of Eq. (7) which is the closed-form solution of the data subproblem. Intuitively, it aims to find a clearer HR image which minimizes a weighted combination of the data term $\| \mathbf{y} - (\mathbf{z} \otimes \mathbf{k}) \downarrow_{\mathbf{s}} \|^{2}$ and the quadratic regularization term $\| \mathbf{z} - \mathbf{x}_{k-1} \|^{2}$ with trade-off hyper-parameter $\alpha_{k}$ . Because the data term corresponds to the degradation model, the data module thus not only has the advantage of taking the scale factor $\mathbf{s}$ and blur kernel $\mathbf{k}$ as input but also imposes a degradation constraint on the solution. Actually, it is difficult to manually design such a simple but useful multiple-input module. For brevity, Eq. (7) is rewritten as + +$$ +\mathbf {z} _ {k} = \mathcal {D} \left(\mathbf {x} _ {k - 1}, \mathbf {s}, \mathbf {k}, \mathbf {y}, \alpha_ {k}\right). \tag {8} +$$ + +Note that $\mathbf{x}_0$ is initialized by interpolating $\mathbf{y}$ with scale factor s via the simplest nearest neighbor interpolation. It should be noted that Eq. (8) contains no trainable parameters, which in turn results in better generalizability due to the complete decoupling between data term and prior term. For the implementation, we use PyTorch where the main FFT and inverse FFT operators can be implemented by torch.rfft and torch.irfft, respectively. + +Prior module $\mathcal{P}$ The prior module aims to obtain a cleaner HR image $\mathbf{x}_k$ by passing $\mathbf{z}_k$ through a denoiser with noise level $\beta_k$ . Inspired by [66], we propose a deep CNN denoiser that takes the noise level as input + +$$ +\mathbf {x} _ {k} = \mathcal {P} \left(\mathbf {z} _ {k}, \beta_ {k}\right). \tag {9} +$$ + +The proposed denoiser, namely ResUNet, integrates residual blocks [21] into U-Net [45]. U-Net is widely used for image-to-image mapping, while ResNet owes its popularity to fast training and its large capacity with many residual blocks. ResUNet takes the concatenated $\mathbf{z}_k$ and noise level map as input and outputs the denoised image $\mathbf{x}_k$ . By doing so, ResUNet can handle various noise levels via a single model, which significantly reduces the total number of parameters. Following the common setting of U-Net, ResUNet involves four scales, each of which has an identity skip connection between downscaling and upscaling operations. Specifically, the number of channels in each layer from the first scale to the fourth scale are set to 64, 128, 256 and 512, respectively. For the downscaling and upscaling operations, $2\times 2$ strided convolution (SConv) and $2\times 2$ transposed convolution (TConv) are adopted, respectively. Note that no activation function is followed by SConv and TConv layers, as well as the first and the last convolutional layers. For the sake of inheriting the merits of ResNet, a group of 2 residual blocks are adopted in the downscaling and upscaling of each scale. As suggested in [36], each residual block is composed of two $3\times 3$ convolution layers with ReLU activation in the middle and an identity skip connection summed to its output. + +![](images/3d78c766a0194e3853cb0d703e4fa5dec2dad1ffad8a538df8e4bd7f20acaf21.jpg) +Figure 3. The overall architecture of the proposed USRNet with $K = 8$ iterations. USRNet can flexibly handle the classical degradation (i.e., Eq. (1)) via a single model as it takes the LR image $\mathbf{y}$ , scale factor $s$ , blur kernel $\mathbf{k}$ and noise level $\sigma$ as input. Specifically, USRNet consists of three main modules, including the data module $\mathcal{D}$ that makes HR estimation clearer, the prior module $\mathcal{P}$ that makes HR estimation cleaner, and the hyper-parameter module $\mathcal{H}$ that controls the outputs of $\mathcal{D}$ and $\mathcal{P}$ . + +Hyper-parameter module $\mathcal{H}$ The hyper-parameter module acts as a 'slide bar' to control the outputs of the data module and prior module. For example, the solution $\mathbf{z}_k$ would gradually approach $\mathbf{x}_{k - 1}$ as $\alpha_{k}$ increases. According to the definition of $\alpha_{k}$ and $\beta_{k}$ , $\alpha_{k}$ is determined by $\sigma$ and $\mu_{k}$ , while $\beta_{k}$ depends on $\lambda$ and $\mu_{k}$ . Although it is possible to learn a fixed $\lambda$ and $\mu_{k}$ , we argue that a performance gain can be obtained if $\lambda$ and $\mu_{k}$ vary with two key elements, i.e., scale factor s and noise level $\sigma$ , that influence the degree of ill-posedness. Let $\pmb{\alpha} = [\alpha_{1},\alpha_{2},\dots,\alpha_{K}]$ and $\pmb {\beta} = [\beta_{1},\beta_{2},\dots,\beta_{K}]$ , we use a single module to predict $\pmb{\alpha}$ and $\pmb{\beta}$ + +$$ +[ \alpha , \beta ] = \mathcal {H} (\sigma , \mathrm {s}). \tag {10} +$$ + +The hyper-parameter module consists of three fully connected layers with ReLU as the first two activation functions and Softplus [19] as the last. The number of hidden nodes in each layer is 64. Considering the fact that $\alpha_{k}$ and $\beta_{k}$ should be positive, and Eq. (7) should avoid division by extremely small $\alpha_{k}$ , the output Softplus layer is followed by an extra addition of $1\mathrm{e} - 6$ . We will show how the scale factor and noise level affect the hyper-parameters in Sec. 4.4. + +# 3.4. End-to-end training + +The end-to-end training aims to learn the trainable parameters of USRNet by minimizing a loss function over a large training data set. Thus, this section mainly describes the training data, loss function and training settings. Following [58], we use DIV2K [3] and Flickr2K [55] as the HR training dataset. The LR images are synthesized via Eq. (1). Although USRNet focuses on SISR, it is also applicable to the case of deblurring with $s = 1$ . Hence, the scale factors are chosen from $\{1,2,3,4\}$ . However, due to limited space, this paper does not consider the deblurring experiments. For the blur kernels, we use anisotropic Gaussian kernels as in [44, 51, 67] and motion kernels as in [5]. We fix the kernel size to $25 \times 25$ . For the noise level, we set its range to $[0,25]$ . + +With regard to the loss function, we adopt the L1 loss for PSNR performance. Following [58], once the model is obtained, we further adopt a weighted combination of L1 loss, VGG perceptual loss and relativistic adversarial loss [24] with weights 1, 1 and 0.005 for perceptual quality performance. We refer to such fine-tuned model as USRGAN. As usual, USRGAN only considers scale factor 4. We do not use additional losses to constrain the intermediate outputs since the above losses work well. One possible reason is that the prior module shares parameters across iterations. + +To optimize the parameters of USRNet, we adopt the Adam solver [27] with mini-batch size 128. The learning rate starts from $1 \times 10^{-4}$ and decays by a factor of 0.5 every $4 \times 10^{4}$ iterations and finally ends with $3 \times 10^{-6}$ . It is worth pointing out that due to the infeasibility of parallel computing for different scale factors, each min-batch only involves one random scale factor. For USRGAN, its learning rate is fixed to $1 \times 10^{-5}$ . The patch size of the HR image for both USRNet and USRGAN is set to $96 \times 96$ . We train the models with PyTorch on 4 Nvidia Tesla V100 GPUs in Amazon AWS cloud. It takes about two days to obtain the USRNet model. + +# 4. Experiments + +We choose the widely-used color BSD68 dataset [40, 46] to quantitatively evaluate different methods. The dataset consists of 68 images with tiny structures and fine textures and thus is challenging to improve the quantitative metrics, such as PSNR. For the sake of synthesizing the corresponding testing LR images via Eq. (1), blur kernels and noise levels should be provided. Generally, it would be helpful to employ a large variety of blur kernels and noise levels for a thorough evaluation, however, it would also give rise to burdensome evaluation process. For this reason, as shown in Table 1, we only consider 12 representative and diverse blur kernels, including 4 isotropic Gaussian kernels with different widths (i.e., 0.7, 1.2, 1.6 and 2.0), 4 anisotropic + +Table 1. Average PSNR(dB) results of different methods for different combinations of scale factors, blur kernels and noise levels. The best two results are highlighted in red and blue colors, respectively. + +
MethodScale FactorNoise LevelBlur Kernel
···········
RCAN [70]×2029.4826.7625.3124.3724.3824.1024.2523.6320.3120.4520.5722.04
×3024.9327.3025.7924.6124.5724.3824.5523.7420.1520.2520.3921.68
×4022.6825.3125.5924.6324.3724.2324.4323.7420.0620.0520.3321.47
ZSSR [51]×2029.4429.4828.5727.4227.1526.8127.0926.2514.2214.2216.0219.39
×3025.1325.8025.9425.7725.6125.2325.6825.4116.3715.9517.3520.45
×4023.5024.3324.5624.6524.5224.2024.5624.5516.9416.4318.0120.68
IKC [20]×4022.6925.2625.6325.2124.7124.2024.3924.7720.0520.0320.3521.58
IRCNN [65]×2029.6030.1629.5028.3728.0727.9528.2127.1928.5826.7929.0228.96
×3025.9726.8927.0727.0126.8326.7626.8826.6726.2225.5926.1426.05
×32.5525.7026.1325.7225.3325.2825.1825.3424.9725.0024.6424.9024.73
×37.6524.5824.6824.5924.3924.2424.2024.2724.0223.9423.7723.7523.69
×4023.9925.0125.3225.4525.3625.2625.3425.4724.6924.3924.4424.57
USRNet×2030.5530.9630.5629.4929.1329.1229.2828.2830.9030.6530.6030.75
×3027.1627.7627.9027.8827.7127.6827.7427.5727.6927.5027.5027.41
×32.5526.9927.4027.2326.7826.5526.6026.7226.1426.9026.8026.6926.49
×37.6526.4526.5226.1025.5725.4625.4025.4925.0025.3925.4725.2025.01
×4025.3025.9626.1826.2926.2026.1526.1726.3025.9125.5725.7625.70
+ +![](images/c5259d02bf1632eb57d051cda1cd0c299f4d69c81feb691cce08bf5cf2707a90.jpg) + +![](images/eff25286e6baf73cf0fe7c4ff481fa2e8ba300aabcf922c1364fc3704913dc5e.jpg) + +![](images/13e00109e92901a6189dd8ec15de6fa11ca1750beadeb63f834005ed8318fb91.jpg) +PSNR(dB) +Zoomed LR $(\times 4)$ +Figure 4. Visual results of different methods on super-resolving noise-free LR image with scale factor 4. The blur kernel is shown on the upper-right corner of the LR image. Note that RankSRGAN and our USRGAN aim for perceptual quality rather than PSNR value. + +![](images/ef9171d16d5b2447b98023b2b8dc1d6a63d0a14317cccd01443ce660dcbf6be9.jpg) + +![](images/db8a7dc690beda08d0a4590921537fa3a45a2107bf4cd65d1a41a0dbba8aa6e9.jpg) + +![](images/8f9ce6e52803d9a39697cebbcf45b7e92384020cc1864bcaf051a8e4e79562bb.jpg) +24.92/22.53/21.88 +RCAN [70] + +![](images/687f73e4f3770c26faab330b668ab7f83627001ae15b5ed0f73bfd080598f897.jpg) + +![](images/b52087d2e025fc18876c8d17a0531cd2883b2d7fdd5473e9f5ded840301e9a14.jpg) + +![](images/a704941fc1c6419aca38e64714ef0691e38a31211476ea69acfdd21e0a5eff67.jpg) +25.24/23.75/21.92 +IKC [20] + +![](images/e3d29bdc3caa1b3427f6f3bfe6f6ba022180f81ff3d05378b53048d21ff54a9e.jpg) + +![](images/de4aa2575bcec77c9bb0f6019319923f937e8da151fa7c07764b3943f69cc537.jpg) + +![](images/6d85e09dd80c5e596a09aed986577e00676b442e05c556b63f77e976ba17a4c8.jpg) +25.42/23.55/26.45 +IRCNN [65] + +![](images/74b67023e62d02a02d7bedf24227fc233728592f1eefee53348448323bcd1b9c.jpg) + +![](images/51a4a37bffbb4ebfdaaafb2297cf1c0a2376493df8725905d76355b85dc1abd4.jpg) + +![](images/a9ca91d8e8886ba02a5653f3c89b45292d24b42a742a98b319bfd283bc82af5f.jpg) +25.82/24.80/27.39 +USRNet (ours) + +![](images/95b660efa8803ea0806d4ffd5ee45c408938dcc717afc188b41e1399cda6b081.jpg) + +![](images/2c94db71e7cc8a0f79bf12a6a33536decb9df64e81cf98c8cb1315604befc0b7.jpg) + +![](images/4ff442a0877a79ee4b95518b1d714c345bebc65eba92827662be30ad12c60e42.jpg) +24.80/22.44/21.51 +RankSRGAN [69] + +![](images/6d70a6379c7d227328b1f14302151c62c154845f4e8a0112f574fa68b5133b5f.jpg) + +![](images/e639c120a3009f30990f3a26f1475d1d1faf80291f5b305ac7ca0fea9dfa45d0.jpg) + +![](images/34e86dbec567053398af8ba61384ff41ff50218c7ea6824258577bebb8859786.jpg) +24.26/23.25/25.00 +USRGAN (ours) + +Gaussian kernels from [67], and 4 motion blur kernels from [5, 33]. While it has been pointed out that anisotropic Gaussian kernels are enough for SISR task [44, 51], the SISR method that can handle more complex blur kernels would be a preferred choice in real applications. Therefore, it is necessary to further analyze the kernel robustness of different methods, we will thus separately report the PSNR results for each blur kernel rather than for each type of blur kernels. Although it has been pointed out that the proper blur kernel should vary with scale factor [64], we argue that the 12 blur kernels are diverse enough to cover a large kernel space. For the noise levels, we choose 2.55 (1%) and 7.65 (3%). + +# 4.1. PSNR results + +The average PSNR results of different methods for different degradation settings are reported in Table 1. The compared methods include RCAN [70], ZSSR [51], IKC [20] and IRCNN [65]. Specifically, RCAN is state-of-the-art PSNR oriented method for bicubic degradation; ZSSR is a non-blind zero-shot learning method with the ability to handle Eq. (1) for anisotropic Gaussian kernels; IKC is a blind iterative kernel correction method for isotropic Gaussian kernels; IRCNN a non-blind deep denoiser based plug-and-play method. For a fair comparison, we modified IRCNN to handle Eq. (1) by replacing its data + +![](images/d9e95eec943147046a28bffd00e20a3d45cc6495147e201e9cf0b69f2e66401c.jpg) +$\mathbf{x}_0$ (Top); $\mathbf{x}$ (Bottom) + +![](images/18aa14408edb308c55ac81a8d1f9dde7ff6c37be74da7e0d55c6b895c1fc82d2.jpg) +z1 + +![](images/4adb8f5ea9e8566e85efba42db1803c9def43782a929c9e15621b4a7994a2b65.jpg) +x1 + +![](images/1cb5574ca27804a4196548d41f3ddb33c0aaac031b22f51a38e8f53e56d5fbeb.jpg) +Z2 +Figure 5. HR estimations in different iterations of USRNet (top row) and USRGAN (bottom row). The initial HR estimation $\mathbf{x}_0$ is the nearest neighbor interpolated version of LR image. The scale factor is 4, the noise level of LR image is 2.55 (1%), the blur kernel is shown on the upper-right corner of $\mathbf{x}_0$ . + +![](images/bdab07372075d4d3d997567c32186cad07b858f27266736589a8dc369725fd5b.jpg) +X7 + +![](images/ffb61280ea8100100b8a846aea81f0e88e8a952e1c3e10df9eb658079b020340.jpg) +z8 +$\longrightarrow$ + +![](images/8542c335cd6d1add936bfe0d69192764835dcb32c041f0e0d6cdb67fc62fd9dc.jpg) +x8 + +solution with Eq. (7). Note that following [37], we fix the pixel shift issue before calculating PSNR if necessary. + +According to Table 1, we can have the following observations. First, our USRNet with a single model significantly outperforms the other competitive methods on different scale factors, blur kernels and noise levels. In particular, with much fewer iterations, USRNet has at least an average PSNR gain of 1dB over IRCNN with 30 iterations due to the end-to-end training. Second, RCAN can achieve good performance on the degradation setting similar to bicubic degradation but would deteriorate seriously when the degradation deviates from bicubic degradation. Such a phenomenon has been well studied in [16]. Third, ZSSR performs well on both isotropic and anisotropic Gaussian blur kernels for small scale factors but loses effectiveness on motion blur kernel and large scale factors. Actually, ZSSR has difficulty in capturing natural image characteristic on severely degraded image due to the single image learning strategy. Fourth, IKC does not generalize well to anisotropic Gaussian kernels and motion kernels. + +Although USRNet is not designed for bicubic degradation, it is interesting to test its results by taking the approximated bicubic kernels in Fig. 2 as input. From Table 2, one can see that USRNet still performs favorably without training on the bicubic kernels. + +Table 2. The average PSNR(dB) results of USRNet for bicubic degradation on commonly-used testing datasets. + +
Scale FactorSet5Set14BSD100Urban100
×237.7233.4932.1031.79
×334.4530.5129.1828.38
×432.4228.8327.6926.44
+ +# 4.2. Visual results + +The visual results of different methods on super-resolving noise-free LR image with scale factor 4 are shown + +in Fig. 4. Apart from RCAN, IKC and IRCNN, we also include RankSRGAN [69] for comparison with our USRGAN. Note that the visual results of ZSSR are omitted due to the inferior performance on scale factor 4. It can be observed from Fig. 4 that USRNet and IRCNN produce much better visual results than RCAN and IKC on the LR image with motion blur kernel. While USRNet can recover shaper edges than IRCNN, both of them fail to produce realistic textures. As expected, USRGAN can yield much better visually pleasant results than USRNet. On the other hand, RankSRGAN does not perform well if the degradation largely deviates from the bicubic degradation. In contrast, USRGAN is flexible to handle various LR images. + +# 4.3. Analysis on $\mathcal{D}$ and $\mathcal{P}$ + +Because the proposed USRNet is an iterative method, it is interesting to investigate the HR estimations of data module $\mathcal{D}$ and prior module $\mathcal{P}$ in different iterations. Fig. 5 shows the results of USRNet and USRGAN in different iterations for an LR image with scale factor 4. As one can see, $\mathcal{D}$ and $\mathcal{P}$ can facilitate each other for iterative and alternating blur removal and detail recovery. Interestingly, $\mathcal{P}$ can also act as a detail enhancer for high-frequency recovery due to the task-specific training. In addition, it does not reduce blur kernel induced degradation which verifies the decoupling between $\mathcal{D}$ and $\mathcal{P}$ . As a result, the end-to-end trained USRNet has a task-specific advantage over Gaussian denoiser based plug-and-play SISR. To quantitatively analyze the role of $\mathcal{D}$ , we have trained an USRNet model with 5 iterations, it turns out that the average PSNR value will decreases about $0.1\mathrm{dB}$ on Gaussian blur kernels and $0.3\mathrm{dB}$ on motion blur kernels. This further indicates that $\mathcal{D}$ aims to eliminate blur kernel induced degradation. In addition, one can see that USRGAN has similar results with USRNet in the first few iterations, but will instead recover tiny structures and fine textures in last few iterations. + +# 4.4. Analysis on $\mathcal{H}$ + +Fig. 6 shows outputs of the hyper-parameter module for different combinations of scale factor $\mathbf{s}$ and noise level $\sigma$ . It can be observed from Fig. 6(a) that $\alpha$ is positively correlated with $\sigma$ and varies with $\mathbf{s}$ . This actually accords with the definition of $\alpha_{k}$ in Sec. 3.2 and our analysis in Sec. 3.3. From Fig. 6(b), one can see that $\beta$ has a decreasing tendency with the number of iterations and increases with scale factor and noise level. This implies that the noise level of HR estimation is gradually reduced across iterations and complex degradation requires a large $\beta_{k}$ to tackle with the illposeness. It should be pointed out that the learned hyperparameter setting is in accordance with that of IRCNN [65]. In summary, the learned $\mathcal{H}$ is meaningful as it plays the proper role. + +![](images/4d758f92d217b9f91c10234961b8be16b549d747fec400f20377492c917286d9.jpg) +(a) $\alpha$ + +![](images/679718c1c32575541ee79a292ec3440956b67d7aa022b901fceee841571b7cec.jpg) +(b) $\beta$ +Figure 6. Outputs of the hyper-parameter module $\mathcal{H}$ , i.e., (a) $\alpha$ and (b) $\beta$ , with respect to different combinations of $\mathbf{s}$ and $\sigma$ . + +# 4.5. Generalizability + +![](images/409d4b28edea6f8676164fb442be8e06999b7a0838e6d9bad30fe8866fc6affe.jpg) + +![](images/3c97f03230f9390484ef603093d90575aa64a352b400740f16cad13353bafecb.jpg) +(b) USRNet + +![](images/a64cc48ae11db4112c7acbbe76df7ced99fb0d56e3b156121a59ccdc655ea7d5.jpg) +(a) Zoomed LR $(\times 3)$ +(c) Zoomed LR $(\times 3)$ +Figure 7. An illustration to show the generalizability of USRNet and USRGAN. The sizes of the kernels in (a) and (c) are $67 \times 67$ and $70 \times 70$ , respectively. The two kernels are chosen from [41]. + +![](images/7cca517b5f0fd3937e4d0fc39803ef692150de0a1b907153eb8d8e5319fea5ff.jpg) +(d) USRGAN + +As mentioned earlier, the proposed method enjoys good generalizability due to the decoupling of data term and prior term. To demonstrate such an advantage, Fig. 7 shows the visual results of USRNet and USRGAN on LR image with a kernel of much larger size than training size of $25 \times 25$ . It can be seen that both USRNet and USRGAN can produce visually pleasant results, which can be attributed to the trainable parameter-free data module. It is worth point + +ing out that USRGAN is trained on scale factor 4, while Fig. 7(b) shows its visual result on scale factor 3. This further indicates that the prior module of USRGAN can generalize to other scale factors. In summary, the proposed deep unfolding architecture has superiority in generalizability. + +# 4.6. Real image super-resolution + +Because Eq. (7) is based on the assumption of circular boundary condition, a proper boundary handling for the real LR image is generally required. We use the following three steps to do such pre-processing. First, the LR image is interpolated to the desired size. Second, the boundary handling method proposed in [38] is adopted on the interpolated image with the blur kernel. Last, the downsampled boundaries are padded to the original LR image. Fig. 8 shows the visual result of USRNet on real LR image with scale factor 4. The blur kernel is manually selected as isotropic Gaussian kernel with width 2.2 based on user preference. One can see from Fig. 8 that the proposed USRNet can reconstruct the HR image with improved visual quality. + +![](images/9109a7babfe5edafdf8d83b16a05e6d3a7c9cf7d17db41eaffcd55a9ae115f92.jpg) +(a) Zoomed LR $(\times 4)$ +Figure 8. Visual result of USRNet $(\times 4)$ on a real LR image. + +![](images/3473ff326e928a4687c82a3d221d33d51798f16a969555a0f4b6e36e765a35b7.jpg) +(b) USRNet + +# 5. Conclusion + +In this paper, we focus on the classical SISR degradation model and propose a deep unfolding super-resolution network. Inspired by the unfolding optimization of traditional model-based method, we design an end-to-end trainable deep network which integrates the flexibility of model-based methods and the advantages of learning-based methods. The main novelty of the proposed network is that it can handle the classical degradation model via a single model. Specifically, the proposed network consists of three interpretable modules, including the data module that makes HR estimation clearer, the prior module that makes HR estimation cleaner, and the hyper-parameter module that controls the outputs of the other two modules. As a result, the proposed method can impose both degradation constrain and prior constrain on the solution. Extensive experimental results demonstrated the flexibility, effectiveness and generalizability of the proposed method for super-resolving various degraded LR images. We believe that our work can benefit to image restoration research community. + +Acknowledgments: This work was partly supported by the ETH Zürich Fund (OK), a Huawei Technologies Oy (Finland) project, an Amazon AWS grant, and an Nvidia grant. + +# References + +[1] Jonas Adler and Ozan Öktem. Learned primal-dual reconstruction. IEEE TMI, 37(6):1322-1332, 2018. 3 +[2] Manya V Afonso, José M Bioucas-Dias, and Mário AT Figueiredo. Fast image recovery using variable splitting and constrained optimization. IEEE TIP, 19(9):2345-2356, 2010. 3 +[3] Eirikur Agustsson and Radu Timofte. Ntire 2017 challenge on single image super-resolution: Dataset and study. In CVPRW, volume 3, pages 126-135, July 2017. 5 +[4] Adrian Barbu. Training an active random field for real-time image denoising. IEEE TIP, 18(11):2451-2462, 2009. 3 +[5] Giacomo Boracchi and Alessandro Foi. Modeling the performance of image restoration from motion blur. IEEE TIP, 21(8):3502-3517, 2012. 5, 6 +[6] Stephen Boyd, Neal Parikh, Eric Chu, Borja Peleato, and Jonathan Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends in Machine Learning, 3(1):1-122, 2011. 3 +[7] Alon Brifman, Yaniv Romano, and Michael Elad. Unified single-image and video super-resolution via denoising algorithms. IEEE TIP, 28(12):6063-6076, 2019. 3 +[8] Vicent Caselles, J-M Morel, and Catalina Sbert. An axiomatic approach to image interpolation. IEEE TIP, 7(3):376-386, 1998. 2 +[9] Antonin Chambolle and Thomas Pock. A first-order primal-dual algorithm for convex problems with applications to imaging. Journal of Mathematical Imaging and Vision, 40(1):120-145, 2011. 3 +[10] Stanley H Chan, Xiran Wang, and Omar A Elgendy. Plug-and-Play ADMM for image restoration: Fixed-point convergence and applications. IEEE Transactions on Computational Imaging, 3(1):84-98, 2017. 3, 4 +[11] Yunjin Chen and Thomas Pock. Trainable nonlinear reaction diffusion: A flexible framework for fast and effective image restoration. IEEE TPAMI, 2016. 3 +[12] Yu Chen, Ying Tai, Xiaoming Liu, Chunhua Shen, and Jian Yang. Fsrnet: End-to-end learning face super-resolution with facial priors. In CVPR, pages 2492-2501, 2018. 3 +[13] Dengxin Dai, Yujuan Wang, Yuhua Chen, and Luc Van Gool. Is image super-resolution helpful for other vision tasks? In WACV, pages 1-9, 2016. 1 +[14] Chao Dong, C. C. Loy, Kaiming He, and Xiaou Tang. Image super-resolution using deep convolutional networks. IEEE TPAMI, 38(2):295-307, 2016. 1 +[15] Weisheng Dong, Lei Zhang, Guangming Shi, and Xin Li. Nonlocally centralized sparse representation for image restoration. IEEE TIP, 22(4):1620-1630, 2013. 2 +[16] Netalee Efrat, Daniel Glasner, Alexander Apartsin, Boaz Nadler, and Anat Levin. Accurate blur models vs. image priors in single image super-resolution. In ICCV, pages 2832-2839, 2013. 1, 2, 7 +[17] Michael Elad and Arie Feuer. Restoration of a single superresolution image from several blurred, noisy, and undersampled measured images. IEEE TIP, 6(12):1646-1658, 1997. 1 +[18] Sina Farsiu, Dirk Robinson, Michael Elad, and Peyman Milanfar. Advances and challenges in super-resolution. In- + +ternational Journal of Imaging Systems and Technology, 14(2):47-57, 2004. 1 +[19] Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Deep sparse rectifier neural networks. In ICAIS, pages 315-323, 2011. 5 +[20] Jinjin Gu, Hannan Lu, Wangmeng Zuo, and Chao Dong. Blind super-resolution with iterative kernel correction. In CVPR, pages 1604-1613, 2019. 6 +[21] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. 4 +[22] Felix Heide, Steven Diamond, Matthias Niener, Jonathan Ragan-Kelley, Wolfgang Heidrich, and Gordon Wetzstein. Proximal: Efficient image optimization using proximal algorithms. ACM TOG, 35(4):84, 2016. 3 +[23] Xuecai Hu, Haoyuan Mu, Xiangyu Zhang, Zilei Wang, Ti-niu Tan, and Jian Sun. Meta-SR: A magnification-arbitrary network for super-resolution. In CVPR, pages 1575-1584, 2019. 2 +[24] Alexia Jolicoeur-Martineau. The relativistic discriminator: a key element missing from standard GAN. arXiv:1807.00734, 2018. 5 +[25] Robert Keys. Cubic convolution interpolation for digital image processing. IEEE Transactions on Acoustics, Speech, and Signal Processing, 29(6):1153-1160, 1981. 2 +[26] Jiwon Kim, Jung Kwon Lee, and Kyoung Mu Lee. Accurate image super-resolution using very deep convolutional networks. In CVPR, pages 1646-1654, 2016. 2 +[27] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. 5 +[28] Filippos Kokkinos and Stamatios Lefkimmiatis. Deep image demosaicking using a cascade of convolutional residual denoising networks. In ECCV, pages 303-319, 2018. 3 +[29] Jakob Kruse, Carsten Rother, and Uwe Schmidt. Learning to push the limits of efficient FFT-based image deconvolution. In ICCV, pages 4586-4594, 2017. 3 +[30] Wei-Sheng Lai, Jia-Bin Huang, Narendra Ahuja, and Ming-Hsuan Yang. Deep laplacian pyramid networks for fast and accurate super-resolution. In CVPR, pages 624-632, July 2017. 2 +[31] Christian Ledig, Lucas Theis, Ferenc Huszar, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, et al. Photorealistic single image super-resolution using a generative adversarial network. In CVPR, pages 4681-4690, July 2017. 2 +[32] Stamatios Lefkimmiatis. Non-local color image denoising with convolutional neural networks. In CVPR, pages 3587-3596, 2017. 3 +[33] Anat Levin, Yair Weiss, Fredo Durand, and William T Freeman. Understanding and evaluating blind deconvolution algorithms. In CVPR, pages 1964-1971, 2009. 6 +[34] Tao Li, Xiaohai He, Linbo Qing, Qizhi Teng, and Honggang Chen. An iterative framework of cascaded deblocking and superresolution for compressed images. IEEE Transactions on Multimedia, 20(6):1305-1320, 2017. 2 +[35] Yawei Li, Shuhang Gu, Christoph Mayer, Luc Van Gool, and Radu Timofte. Group sparsity: The hinge between filter pruning and decomposition for network compression. In + +CVPR, 2020.1 +[36] Bee Lim, Sanghyun Son, Heewon Kim, Seungjun Nah, and Young Mu Lee. Enhanced deep residual networks for single image super-resolution. In CVPRW, pages 136-144, July 2017. 2, 4 +[37] Ce Liu and Deqing Sun. On bayesian adaptive video superresolution. IEEE TPAMI, 36(2):346-360, 2013. 1, 7 +[38] Renting Liu and Jiaya Jia. Reducing boundary artifacts in image deconvolution. In ICIP, pages 505-508, 2008. 8 +[39] Andreas Lugmayr, Martin Danelljan, and Radu Timofte. Unsupervised learning for real-world super-resolution. In IC-CVW, pages 3408-3416, 2019. 3 +[40] D. Martin, C. Fowlkes, D. Tal, and J. Malik. A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In ICCV, pages 416-423, 2001. 5 +[41] Jinshan Pan, Deqing Sun, Hanspeter Pfister, and Ming-Hsuan Yang. Blind image deblurring using dark channel prior. In CVPR, pages 1628-1636, 2016. 8 +[42] Tomer Peleg and Michael Elad. A statistical prediction model based on sparse representations for single image super-resolution. IEEE TIP, 23(6):2569-2582, 2014. 1, 2 +[43] Dongwei Ren, Kai Zhang, Qilong Wang, Qinghua Hu, and Wangmeng Zuo. Neural blind deconvolution using deep priors. In CVPR, pages 1628-1636, 2020. 3 +[44] Gernot Riegler, Samuel Schulter, Matthias Ruther, and Horst Bischof. Conditioned regression models for non-blind single image super-resolution. In ICCV, pages 522-530, 2015. 2, 5, 6 +[45] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pages 234-241. Springer, 2015. 4 +[46] Stefan Roth and Michael J Black. Fields of experts. IJCV, 82(2):205-229, 2009. 5 +[47] Mehdi SM Sajjadi, Bernhard Scholkopf, and Michael Hirsch. Enhancenet: Single image super-resolution through automated texture synthesis. In ICCV, pages 4501-4510, 2017. 2 +[48] Kegan GG Samuel and Marshall F Tappen. Learning optimized MAP estimates in continuously-valued MRF models. In CVPR, pages 477-484, 2009. 3 +[49] Uwe Schmidt and Stefan Roth. Shrinkage fields for effective image restoration. In CVPR, pages 2774-2781, 2014. 3 +[50] Ziyi Shen, Wei-Sheng Lai, Tingfa Xu, Jan Kautz, and Ming-Hsuan Yang. Deep semantic face deblurring. In CVPR, pages 8260-8269, 2018. 3 +[51] Assaf Shocher, Nadav Cohen, and Michal Irani. “zero-shot” super-resolution using deep internal learning. In ICCV, pages 3118–3126, 2018. 5, 6 +[52] Abhishek Singh, Fatih Porikli, and Narendra Ahuja. Super-resolving noisy images. In CVPR, pages 2846-2853, 2014. 2 +[53] Wan-Chi Siu and Kwok-Wai Hung. Review of image interpolation and super-resolution. In The 2012 Asia Pacific Signal and Information Processing Association Annual Summit and Conference, pages 1-10. IEEE, 2012. 1 +[54] Jian Sun and Marshall F Tappen. Learning non-local range markov random field for image restoration. In CVPR, pages + +2745-2752, 2011.3 +[55] Radu Timofte, Eirikur Agustsson, Luc Van Gool, Ming-Hsuan Yang, and Lei Zhang. Ntire 2017 challenge on single image super-resolution: Methods and results. In CVPRW, pages 114-125, 2017. 5 +[56] Radu Timofte, Vincent De Smet, and Luc Van Gool. A+: Adjusted anchored neighborhood regression for fast superresolution. In ACCV, pages 111-126, 2014. 2 +[57] Singanallur V Venkatakrishnan, Charles A Bouman, and Brendt Wohlberg. Plug-and-play priors for model based reconstruction. In IEEE Global Conference on Signal and Information Processing, pages 945-948, 2013. 3 +[58] Xintao Wang, Ke Yu, Shixiang Wu, Jinjin Gu, Yihao Liu, Chao Dong, Yu Qiao, and Chen Change Loy. ESRGAN: Enhanced super-resolution generative adversarial networks. In The ECCV Workshops, 2018. 2, 5 +[59] Chih-Yuan Yang, Chao Ma, and Ming-Hsuan Yang. Single-image super-resolution: A benchmark. In ECCV, pages 372-386, 2014. 2 +[60] Jianchao Yang, John Wright, Thomas Huang, and Yi Ma. Image super-resolution as sparse representation of raw image patches. In CVPR, pages 1-8, 2008. 2 +[61] Yan Yang, Jian Sun, Huibin Li, and Zongben Xu. Deep ADMM-Net for compressive sensing MRI. In NeurIPS, pages 10–18, 2016. 3 +[62] Rajeev Yasarla, Federico Perazzi, and Vishal M Patel. Deblurring face images using uncertainty guided multi-stream semantic networks. arXiv:1907.13106, 2019. 3 +[63] Jian Zhang and Bernard Ghanem. ISTA-Net: Interpretable optimization-inspired deep network for image compressive sensing. In CVPR, pages 1828–1837, 2018. 3 +[64] Kai Zhang, Xiaoyu Zhou, Hongzhi Zhang, and Wangmeng Zuo. Revisiting single image super-resolution under internet environment: blur kernels and reconstruction algorithms. In PCM, pages 677-687, 2015. 1, 6 +[65] Kai Zhang, Wangmeng Zuo, Shuhang Gu, and Lei Zhang. Learning deep CNN denoiser prior for image restoration. In CVPR, pages 3929-3938, July 2017. 3, 6, 8 +[66] Kai Zhang, Wangmeng Zuo, and Lei Zhang. FFDNet: Toward a fast and flexible solution for CNN-based image denoising. IEEE TIP, 27(9):4608-4622, 2018. 4 +[67] Kai Zhang, Wangmeng Zuo, and Lei Zhang. Learning a single convolutional super-resolution network for multiple degradations. In CVPR, pages 3262-3271, 2018. 2, 5, 6 +[68] Kai Zhang, Wangmeng Zuo, and Lei Zhang. Deep plug-and-play super-resolution for arbitrary blur kernels. In CVPR, pages 1671-1681, 2019. 2, 3 +[69] Wenlong Zhang, Yihao Liu, Chao Dong, and Yu Qiao. Ranksrgan: Generative adversarial networks with ranker for image super-resolution. In ICCV, pages 3096-3105, 2019. 6, 7 +[70] Yulun Zhang, Kunpeng Li, Kai Li, Lichen Wang, Bineng Zhong, and Yun Fu. Image super-resolution using very deep residual channel attention networks. In ECCV, pages 286-301, 2018. 2, 6 +[71] Ningning Zhao, Qi Wei, Adrian Basarab, Nicolas Dobigeon, Denis Kouame, and Jean-Yves Tourneret. Fast single image super-resolution using a new analytical solution for $\ell 2-\ell 2$ problems. IEEE TIP, 25(8):3683-3697, 2016. 1, 4 \ No newline at end of file diff --git a/deepunfoldingnetworkforimagesuperresolution/images.zip b/deepunfoldingnetworkforimagesuperresolution/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..644e7f740034e102cf8e54e26df91bd3cda3751c --- /dev/null +++ b/deepunfoldingnetworkforimagesuperresolution/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02798879c6a76f847294d00dbf944597abb6018b972e63e6ea6045c5e4f2178e +size 633019 diff --git a/deepunfoldingnetworkforimagesuperresolution/layout.json b/deepunfoldingnetworkforimagesuperresolution/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e8e9ace74ca056b97098b4322202126486dc2392 --- /dev/null +++ b/deepunfoldingnetworkforimagesuperresolution/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf9732537d61dbc19efb343f9b1da6e6278887811d1af06f13321ffd830d770f +size 559393 diff --git a/deepwhitebalanceediting/779f8dc2-c683-4ad6-a576-34b4c454df92_content_list.json b/deepwhitebalanceediting/779f8dc2-c683-4ad6-a576-34b4c454df92_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..69de8b93691c748fceea52a7ab0188870f4a1472 --- /dev/null +++ b/deepwhitebalanceediting/779f8dc2-c683-4ad6-a576-34b4c454df92_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3904db381b7604a5d9a50063773b80f775b3d24535396d82ef373dabac1920c1 +size 86485 diff --git a/deepwhitebalanceediting/779f8dc2-c683-4ad6-a576-34b4c454df92_model.json b/deepwhitebalanceediting/779f8dc2-c683-4ad6-a576-34b4c454df92_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2ccd92a9faeeda7a694db63736059cbd21cbc695 --- /dev/null +++ b/deepwhitebalanceediting/779f8dc2-c683-4ad6-a576-34b4c454df92_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ab052505fec9b9272f2ca155c58d0900ceb90189d3f646cab8877125a2d771b +size 104916 diff --git a/deepwhitebalanceediting/779f8dc2-c683-4ad6-a576-34b4c454df92_origin.pdf b/deepwhitebalanceediting/779f8dc2-c683-4ad6-a576-34b4c454df92_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..06d9b5d773b3029d91e8d87a2f3d59d7a6c5e1ce --- /dev/null +++ b/deepwhitebalanceediting/779f8dc2-c683-4ad6-a576-34b4c454df92_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e8cf94767d2f96a9c73c4b8186a426d1c99b890c74bd5ae5720ebcbf2760f0e7 +size 7213987 diff --git a/deepwhitebalanceediting/full.md b/deepwhitebalanceediting/full.md new file mode 100644 index 0000000000000000000000000000000000000000..909cbc8c4119c7bd3e841511ffa6fd310bc29126 --- /dev/null +++ b/deepwhitebalanceediting/full.md @@ -0,0 +1,425 @@ +# Deep White-Balance Editing + +Mahmoud Afifi $^{1,2*}$ Michael S. Brown + +$^{1}$ Samsung AI Center (SAIC) - Toronto $^{2}$ York University + +{mafifi,mbrown}@eecs.yorku.ca + +# Abstract + +We introduce a deep learning approach to realistically edit an sRGB image's white balance. Cameras capture sensor images that are rendered by their integrated signal processor (ISP) to a standard RGB (sRGB) color space encoding. The ISP rendering begins with a white-balance procedure that is used to remove the color cast of the scene's illumination. The ISP then applies a series of nonlinear color manipulations to enhance the visual quality of the final sRGB image. Recent work by [3] showed that sRGB images that were rendered with the incorrect white balance cannot be easily corrected due to the ISP's nonlinear rendering. The work in [3] proposed a $k$ -nearest neighbor (KNN) solution based on tens of thousands of image pairs. We propose to solve this problem with a deep neural network (DNN) architecture trained in an end-to-end manner to learn the correct white balance. Our DNN maps an input image to two additional white-balance settings corresponding to indoor and outdoor illuminations. Our solution not only is more accurate than the KNN approach in terms of correcting a wrong white-balance setting but also provides the user the freedom to edit the white balance in the sRGB image to other illumination settings. + +# 1. Introduction and related work + +White balance (WB) is a fundamental low-level computer vision task applied to all camera images. WB is performed to ensure that scene objects appear as the same color even when imaged under different illumination conditions. Conceptually, WB is intended to normalize the effect of the captured scene's illumination such that all objects appear as if they were captured under ideal "white light". WB is one of the first color manipulation steps applied to the sensor's unprocessed raw-RGB image by the camera's onboard integrated signal processor (ISP). After WB is performed, a number of additional color rendering steps are applied by the ISP to further process the raw-RGB image to its final + +![](images/7b2351d451af855409d28df13e6f247551ca32b05d56750290025e0414095cf3.jpg) +(A) Incorrect AWB + +![](images/cb38090cb4857943ef4251efa8e57980f660d9830e2df80c6a566a931d4d630e.jpg) +(B) Correct AWB + +![](images/e8ee74181949b69709f2f99b96439da3137bb63bd20b369b52307060f0589203.jpg) + +![](images/07fb7bf5144142a710ea8b632d5ede1b89e7347d385c6af99d91b3d9158d0646.jpg) +(D) KNN-WB [3] result applied to (A) +Figure 1: Top row: (A)-(C) are sRGB images produced by a camera's ISP with different WB settings. (A) An incorrect WB representing a failed AWB. (B) A correct AWB for the scene. (C) Results of the camera's manual presets. Bottom row: (D)-(F) are post-capture edits of sRGB image (A)'s WB. (D) Result from the recent KNN-WB correction method [3]. (E) Our result to correct the WB in (A). (F) Our results to produce different outputs corresponding to the camera's presets. + +![](images/8ce1306e870232c886171f9d0113640f1ed3d409e92020a235de6c4c3a1c41e0.jpg) +(E) Our deep-WB correction applied to (A) + +![](images/a94e3b052a49de7a8fef97804a6b0474a479d77f82894ad7a41bc950d484c703.jpg) +(C) WB presets +(F) Our deep-WB edits applied to (A) + +standard RGB (sRGB) encoding. While the goal of WB is intended to normalize the effect of the scene's illumination, ISPs often incorporate aesthetic considerations in their color rendering based on photographic preferences. Such preferences do not always conform to the white light assumption and can vary based on different factors, such as cultural preference and scene content [8, 13, 22, 31]. + +Most digital cameras provide an option to adjust the WB settings during image capturing. However, once the WB setting has been selected and the image is fully processed by the ISP to its final sRGB encoding it becomes challenging to perform WB editing without access to the original + +unprocessed raw-RGB image [3]. This problem becomes even more difficult if the WB setting was wrong, which results in a strong color cast in the final sRGB image. + +The ability to edit the WB of an sRGB image not only is useful from a photographic perspective but also can be beneficial for computer vision applications, such as object recognition, scene understanding, and color augmentation [2,6,19]. A recent study in [2] showed that images captured with an incorrect WB setting produce a similar effect of an untargeted adversarial attack for deep neural network (DNN) models. + +In-camera WB procedure To understand the challenge of WB editing in sRGB images it is useful to review how cameras perform WB. WB consists of two steps performed in tandem by the ISP: (1) estimate the camera sensor's response to the scene illumination in the form of a raw-RGB vector; (2) divide each R/G/B color channel in the raw-RGB image by the corresponding channel response in the raw-RGB vector. The first step of estimating the illumination vector constitutes the camera's autowhite-balance (AWB) procedure. Illumination estimation is a well-studied topic in computer vision—representative works include [1, 7-10, 14, 17, 18, 23, 28, 33]. In addition to AWB, most cameras allow the user to manually select among WB presets in which the raw-RGB vector for each preset has been determined by the camera manufacturer. These presets correspond to common scene illuminants (e.g., Daylight, Shade, Incandescent). + +Once the scene's illumination raw-RGB vector is defined, a simple linear scaling is applied to each color channel independently to normalize the illumination. This scaling operation is performed using a $3 \times 3$ diagonal matrix. The white-balanced raw-RGB image is then further processed by camera-specific ISP steps, many nonlinear in nature, to render the final images in an output-referred color space—namely, the sRGB color space. These nonlinear operations make it hard to use the traditional diagonal correction to correct images rendered with strong color casts caused by camera WB errors [3]. + +WB editing in sRGB In order to perform accurate post-capture WB editing, the rendered sRGB values should be properly reversed to obtain the corresponding unprocessed raw-RGB values and then re-rendered. This can be achieved only by accurate radiometric calibration methods (e.g., [12, 24, 34]) that compute the necessary metadata for such color de-rendering. Recent work by Afifi et al. [3] proposed a method to directly correct sRGB images that were captured with the wrong WB setting. This work proposed an exemplar-based framework using a large dataset of over 65,000 sRGB images rendered by a software camera pipeline with the wrong WB setting. Each of these sRGB + +images had a corresponding sRGB image that was rendered with the correct WB setting. Given an input image, their approach used a KNN strategy to find similar images in their dataset and computed a mapping function to the corresponding correct WB images. The work in [3] showed that this computed color mapping constructed from exemplars was effective in correcting an input image. Later Afifi and Brown [2] extended their KNN idea to map a correct WB image to appear incorrect for the purpose of image augmentation for training deep neural networks. Our work is inspired by [2, 3] in their effort to directly edit the WB in an sRGB image. However, in contrast to the KNN frameworks in [2, 3], we cast the problem within a single deep learning framework that can achieve both tasks—namely, WB correction and WB manipulation as shown in Fig. 1. + +Contribution We present a novel deep learning framework that allows realistic post-capture WB editing of sRGB images. Our framework consists of a single encoder network that is coupled with three decoders targeting the following WB settings: (1) a "correct" AWB setting; (2) an indoor WB setting; (3) an outdoor WB setting. The first decoder allows an sRGB image that has been incorrectly white-balanced image to be edited to have the correct WB. This is useful for the task of post-capture WB correction. The additional indoor and outdoor decoders provide users the ability to produce a wide range of different WB appearances by blending between the two outputs. This supports photographic editing tasks to adjust an image's aesthetic WB properties. We provide extensive experiments to demonstrate that our method generalizes well to images outside our training data and achieves state-of-the-art results for both tasks. + +# 2. Deep white-balance editing + +# 2.1. Problem formulation + +Given an sRGB image, $\mathbf{I}_{\mathrm{WB}^{(\mathrm{in})}}$ , rendered through an unknown camera ISP with an arbitrary WB setting $\mathrm{WB}^{(\mathrm{in})}$ , our goal is to edit its colors to appear as if it were re-rendered with a target WB setting $\mathrm{WB}^{(t)}$ . + +As mentioned in Sec. 1, our task can be accomplished accurately if the original unprocessed raw-RGB image is available. If we could recover the unprocessed raw-RGB values, we can change the WB setting $\mathrm{WB}^{(\mathrm{in})}$ to $\mathrm{WB}^{(t)}$ , and then re-render the image back to the sRGB color space with a software-based ISP. This ideal process can be described by the following equation: + +$$ +\mathbf {I} _ {\mathbf {W B} ^ {(t)}} = G \left(F \left(\mathbf {I} _ {\mathbf {W B} ^ {(i n)}}\right)\right), \tag {1} +$$ + +where $F:\mathbf{I}_{\mathrm{WB}^{(\mathrm{in})}}\to \mathbf{D}_{\mathrm{WB}^{(\mathrm{in})}}$ is an unknown reconstruction function that reverses the camera-rendered sRGB image $\mathbf{I}$ + +![](images/5fe2235330e7e176aca1f748b2a8b6b4af8aff384c73d00b5da5ed5f0e8fc3f9.jpg) +(A) +Training patches + +![](images/f510fd3c43005c9c832b8425348e30142a3829d07e0988a6322c8141379e9f84.jpg) +Output of $3 \times 3$ convolutional layers with stride 1 and padding 1 +Output of ReLU layers +Output of $2 \times 2$ max-pooling layers with stride 2 +Output of $2 \times 2$ transposed convolutional layers with stride 2 +Output of depth concatenation layers +Output of $1\times 1$ convolutional layer with stride 1 and padding 1 +*Skip connections for the shade WB decoder not shown to aid visualization. + +(B) +Testing image $\mathbf{I}_{\mathrm{WB}(\mathrm{in})}$ +![](images/89cea2ff84e1373b39e46e630ca6046d7b7a9399961c382434dbdf0acb1ee7b4.jpg) +$\Rightarrow$ Skip connections + +![](images/4a56387798b1c9efbc040e0b80060367aae29d9cfb15c50b03abddd6808f0036.jpg) + +![](images/daa6b209613a2c086973da4bcc3ea919fa1d7584d0a67c4ed04d41b1b853a2fc.jpg) +Auto WB result $\mathbf{I}_{\mathrm{WB}^{(A)}}$ + +![](images/992c5f50fa9fe3623a5c248b7a592785de9b1fad1542da35b66ca4eb8038ef4d.jpg) +Incandescent WB result $\mathbf{I}_{\mathrm{WB}}^{(\mathrm{T})}$ +Figure 2: Proposed multi-decoder framework for sRGB WB editing. (A) Our proposed framework consists of a single encoder and multiple decoders. The training process is performed in an end-to-end manner, such that each decoder "rerenders" the given training patch with a specific WB setting, including AWB. For training, we randomly select image patches from the Rendered WB dataset [3]. (B) Given a testing image, we produce the targeted WB setting by using the corresponding trained decoder. + +![](images/c56e974e23f4c1dae5c6548bcfe1508d8711583dcb9897f9b46b543d79ee63e1.jpg) +Shade WB result $\mathbf{f}_{\mathrm{WB}^{\mathrm{(S)}}}$ + +back to its corresponding raw-RGB image $\mathbf{D}$ with the current $\mathrm{WB}^{(\mathrm{in})}$ setting applied and $G:\mathbf{D}_{\mathrm{WB}^{(\mathrm{in})}}\to \mathbf{I}_{\mathrm{WB}^{(t)}}$ is an unknown camera rendering function that is responsible for editing the WB setting and re-rendering the final image. + +# 2.2. Method overview + +Our goal is to model the functionality of $G(F(\cdot))$ to generate $\mathbf{I}_{\mathrm{WB}^{(t)}}$ . We first analyze how the functions $G$ and $F$ cooperate to produce $\mathbf{I}_{\mathrm{WB}^{(t)}}$ . From Eq. 1, we see that the function $F$ transforms the input image $\mathbf{I}_{\mathrm{WB}^{(\mathrm{in})}}$ into an intermediate representation (i.e., the raw-RGB image with the captured WB setting), while the function $G$ accepts this intermediate representation and renders it with the target WB setting to an sRGB color space encoding. + +Due to the nonlinearities applied by the ISP's rendering chain, we can think of $G$ as a hybrid function that consists of a set of sub-functions, where each sub-function is responsible for rendering the intermediate representation with a specific WB setting. + +Our ultimate goal is not to reconstruct/re-render the original raw-RGB values, but rather to generate the final sRGB image with the target WB setting $\mathrm{WB}^{(t)}$ . Therefore, we can model the functionality of $G(F(\cdot))$ as an encoder/decoder scheme. Our encoder $f$ transfers the input image into a latent representation, while each of our decoders $(g_{1}, g_{2}, \ldots)$ generates the final images with a different WB setting. Similar to Eq. 1, we can formulate our framework as follows: + +$$ +\hat {\mathbf {I}} _ {\mathbf {W B} ^ {(t)}} = g _ {t} \left(f \left(\mathbf {I} _ {\mathbf {W B} ^ {(i n)}}\right)\right), \tag {2} +$$ + +where $f:\mathbf{I}_{\mathrm{WB}^{(\mathrm{in})}}\to \mathcal{Z}$ $g_{t}:\mathcal{Z}\rightarrow \hat{\mathbf{I}}_{\mathrm{WB}^{(\mathrm{t})}}$ , and $\mathcal{Z}$ is an intermediate representation (i.e., latent representation) of the original input image $\mathbf{I}_{\mathrm{WB}^{(\mathrm{in})}}$ + +Our goal is to make the functions $f$ and $g_{t}$ independent, such that changing $g_{t}$ with a new function $g_{y}$ that targets a different WB $y$ does not require any modification in $f$ , as is the case in Eq. 1. + +In our work, we target three different WB settings: (i) $\mathrm{WB}^{(\mathrm{A})}$ : AWB—representing the correct lighting of the captured image's scene; (ii) $\mathrm{WB}^{(\mathrm{T})}$ : Tungsten/Incandescent—representing WB for indoor lighting; and (iii) $\mathrm{WB}^{(\mathrm{S})}$ : Shade—representing WB for outdoor lighting. This gives rise to three different decoders ( $g_{A}$ , $g_{T}$ , and $g_{S}$ ) that are responsible for generating output images that correspond to AWB, Incandescent WB, and Shade WB. + +The Incandescent and Shade WB are specifically selected based on the color properties. This can be understood when considering the illuminations in terms of their correlated color temperatures. For example, Incandescent and Shade WB settings are correlated to 2850 Kelvin $(K)$ and $7500K$ color temperatures, respectively. This wide range of illumination color temperatures considers the range of pleasing illuminations [26, 27]. Moreover, the wide color temperature range between Incandescent and Shade allows the approximation of images with color temperatures within this range by interpolation. The details of this interpolation + +![](images/37c3bf05c171957245c47aaab220ada7574fbcf24e9d64c8d07a046df4ad9670.jpg) +Figure 3: We consider the runtime performance of our method to be able to run on limited computing resources ( $\sim$ 1.5 seconds on a single CPU to process a 12-megapixel image). First, our DNN processes a downsampled version of the input image, and then we apply a global color mapping to produce the output image in its original resolution. The shown input image is rendered from the MIT-Adobe FiveK dataset [11]. + +![](images/af5a82acafe5dba4710b22de71f8a640d7fdf79fa1728fdc7be8b4cd0f48ff1e.jpg) + +![](images/5d529ddd62602a504952d608c3ae161ee692e43adc73cc84e0accbef9804ffb0.jpg) + +![](images/c2ec7ed2bb6854f7cfed47bc6b31e11d98143d092f249a83b978e72b2fb4f79a.jpg) + +![](images/4c72a3db99f3ff0e2ddcb7815a5f531f43e7425b5c8712f1e80f411fadc1f715.jpg) + +process are explained in Sec. 2.5. Note that there is no fixed correlated color temperature for the AWB mode, as it changes based on the input image's lighting conditions. + +# 2.3. Multi-decoder architecture + +An overview of our DNN's architecture is shown in Fig. 2. We use a U-Net architecture [29] with multi-scale skip connections between the encoder and decoders. Our framework consists of two main units: the first is a 4-level encoder unit that is responsible for extracting a multi-scale latent representation of our input image; the second unit includes three 4-level decoders. Each unit has a different bottleneck and transposed convolutional (conv) layers. At the first level of our encoder and each decoder, the conv layers have 24 channels. For each subsequent level, the number of channels is doubled (i.e., the fourth level has 192 channels for each conv layer). + +# 2.4. Training phase + +Training data We adopt the Rendered WB dataset produced by [3] to train and validate our model. This dataset includes $\sim 65\mathrm{K}$ sRGB images rendered by different camera models and with different WB settings, including the Shade and Incandescent settings. For each image, there is also a corresponding ground truth image rendered with the correct WB setting (considered to be the correct AWB result). This dataset consists of two subsets: Set 1 (62,535 images taken by seven different DSLR cameras) and Set 2 (2,881 images taken by a DSLR camera and four mobile phone cameras). The first set (i.e., Set 1) is divided into three equal partitions by [3]. We randomly selected 12,000 training images from the first two partitions of Set 1 to train our model. For each training image, we have three ground truth images rendered with: (i) the correct WB (denoted as AWB), (ii) Shade WB, and (iii) Incandescent WB. The final partition of Set 1 (21,046 images) is used for testing. We refer to this partition as Set 1-Test. Images of Set 2 are not used in training and the entire set is used for testing. + +Data augmentation We also augment the training images by rendering an additional 1,029 raw-RGB images, of the same scenes included in the Rendered WB dataset [3], but + +![](images/066dd5737e433650691b7e13e34d12eb9ac67d61237039958e9792cec4a63451.jpg) +(A) Input image $\mathbf{I}_{\mathrm{WB}(\mathrm{in})}$ + +![](images/d93902f518220ed1773d81a22951d9cecb858e06b102d973af6e76bc338f7556.jpg) +(B) Interpolation for the target color temperature t=3500K + +![](images/32aaee4673e4458c4627d577aa2230b9cad08ec69b7c471242af7e9c2e8cf663.jpg) +(C) Result image $\hat{\mathbf{I}}_{\mathrm{WB}(\mathrm{t} = 3500\mathrm{K})}$ +Figure 4: In addition to our AWB correction, we train our framework to produce two different color temperatures (i.e., Incandescent and Shade WB settings). We interpolate between these settings to produce images with other color temperatures. (A) Input image. (B) Interpolation process. (C) Final result. The shown input image is taken from the rendered version of the MIT-Adobe FiveK dataset [3, 11]. + +with random color temperatures. At each epoch, we randomly select four $128 \times 128$ patches from each training image and their corresponding ground truth images for each decoder and apply geometric augmentation (rotation and flipping) as an additional data augmentation to avoid overfitting. + +Loss function We trained our model to minimize the $\mathsf{L}_1$ -norm loss function between the reconstructed and ground truth patches: + +$$ +\sum_ {i} \sum_ {p = 1} ^ {3 h w} \left| \mathbf {P} _ {\mathrm {W B} ^ {(i)}} (p) - \mathbf {C} _ {\mathrm {W B} ^ {(i)}} (p) \right|, \tag {3} +$$ + +where $h$ and $w$ denote the patch's height and width, and $p$ indexes into each pixel of the training patch $\mathbf{P}$ and the ground truth camera-rendered patch $\mathbf{C}$ , respectively. The index $i \in \{\mathrm{A},\mathrm{T},\mathrm{S}\}$ refers to the three target WB settings. We also have examined the squared $\mathbb{L}_2$ -norm loss function and found that both loss functions work well for our task. See supplemental materials for an ablation study. + +![](images/c1a32447693c70ab54608af7099d337f64736589fbfe66e7e795bdfcba23ecd6.jpg) + +![](images/0addd7444c80ebb39bec96ff29e0be76ebc519d15762aa2b46b127abd63839cf.jpg) + +![](images/32bc2c4f15d2729c8bf3c3f97083a75eede34264c06eccbc1926539a7f8d5a4e.jpg) + +![](images/9efe6b7100f30c80036d19ae14bf5224e7e9ad7834c213d2e7b561cdea48394f.jpg) + +![](images/3632b347b97741b83dbb0caf01e897c9e9e78865292b5d7f72329b52aa988e9b.jpg) + +![](images/70da2e96e46c50b786cfab45c57b0b5ca694225738731412d1b4258f398c0b80.jpg) +(A) Input images + +![](images/6fd1777e1898a27f71f966576c7add06909839d6a4aaee24770bdb3f1169ca61.jpg) +(B) Quasi-U CC results + +![](images/5156692181560baf7faecca299640e75ab543819415caa17ef169d06d2215032.jpg) +(C) KNN-WB results +Figure 5: Qualitative comparison of AWB correction. (A) Input images. (B) Results of quasi-U CC [9]. (C) Results of KNN-WB [3]. (D) Our results. (E) Ground truth images. Shown input images are taken from the Rendered WB dataset [3] and the rendered version of Cube+ dataset [3,5]. + +![](images/2143960cbb234d92a5aba5d599d556e333166e038b05d75e0c4fbde108297ce5.jpg) +(D) Our deep-WB results + +![](images/7d1b8028a7f6318d5e7a072c0c7a8c75c47d422a573feeec015f71e17c09f50a.jpg) +(E) Ground truth images + +Training parameters We initialized the weights of the conv layers using He's initialization [20]. The training process is performed for 165,000 iterations using the adaptive moment estimation (Adam) optimizer [25], with a decay rate of gradient moving average $\beta_{1} = 0.9$ and a decay rate of squared gradient moving average $\beta_{2} = 0.999$ . We used a learning rate of $10^{-4}$ and reduced it by 0.5 every 25 epochs. The mini-batch size was 32 training patches per iteration. + +# 2.5. Testing phase + +Color mapping procedure Our DNN model is a fully convolutional network and is able to process input images in their original dimensions with the restriction that the dimensions should be multiples of $2^{4}$ , as we use 4-level encoder/decoders with $2 \times 2$ max-pooling and transposed conv layers. However, to ensure a consistent run time for any sized input images, we resize all input images to a maximum dimension of 656 pixels. Our DNN is applied on this resized image to produce image $\hat{\mathbf{I}}_{\mathrm{WB}^{(i)}\downarrow}$ with the target WB setting $i \in \{\mathrm{A}, \mathrm{T}, \mathrm{S}\}$ . + +We then compute a color mapping function between our resized input and output image. Work in [16, 21] evaluated several types of polynomial mapping functions and showed their effectiveness to achieve nonlinear color mapping. Accordingly, we computed a polynomial mapping matrix $\mathbf{M}$ that globally maps values of $\psi\left(\mathbf{I}_{\mathrm{WB}^{(\mathrm{in})}\downarrow}\right)$ to the colors of our generated image $\hat{\mathbf{I}}_{\mathrm{WB}^{(i)}\downarrow}$ , where $\psi(\cdot)$ is a polynomial kernel function that maps the image's RGB vectors to a higher 11-dimensional space—see supplemental materials for an evaluation of different kernel functions. This mapping matrix $\mathbf{M}$ can be computed in a closed-form solution, as demonstrated in [2, 3]. + +Once $\mathbf{M}$ is computed, we obtain our final result in the same input image resolution using the following equation [3]: + +$$ +\hat {\mathbf {I}} _ {\mathrm {W B} ^ {(\mathrm {i})}} = \mathbf {M} \psi \left(\mathbf {I} _ {\mathrm {W B} ^ {(\mathrm {i n})}}\right). \tag {4} +$$ + +Fig. 3 illustrates our color mapping procedure. Our method requires $\sim 1.5$ seconds on an Intel Xeon E5-1607 @ 3.10GHz machine with 32 GB RAM to process a 12-megapixel image for a selected WB setting. + +We note that an alternative strategy is to compute the color polynomial mapping matrix directly [30]. We conducted preliminary experiments and found that estimating the polynomial matrix directly was less robust than generating the image itself followed by fitting a global polynomial function. The reason is that having small errors in the estimated polynomial coefficients can lead to noticeable color errors (e.g., out-of-gamut values), whereas small errors in the estimated image were ameliorated by the global fitting. + +Editing by user manipulation Our framework allows the user to choose between generating result images with the three available WB settings (i.e., AWB, Shade WB, and Incandescent WB). Using the Shade and Incandescent WB, the user can edit the image to a specific WB setting in terms of color temperature, as explained in the following. + +To produce the effect of a new target WB setting with a color temperature $t$ that is not produced by our decoders, we can interpolate between our generated images with the Incandescent and Shade WB settings. We found that a simple linear interpolation was sufficient for this purpose. This operation is described by the following equation: + +$$ +\tilde {\mathbf {I}} _ {\mathbf {W B} ^ {(t)}} = b \tilde {\mathbf {I}} _ {\mathbf {W B} ^ {(T)}} + (1 - b) \tilde {\mathbf {I}} _ {\mathbf {W B} ^ {(s)}}, \tag {5} +$$ + +where $\hat{\mathbf{I}}_{\mathrm{WB}^{(\mathrm{T})}}$ and $\hat{\mathbf{I}}_{\mathrm{WB}^{(\mathrm{S})}}$ are our produced images with In-candescent and Shade WB settings, respectively, and $b$ is the interpolation ratio that is given by $\frac{1 / t - 1 / t(S)}{1 / t(T) - 1 / t(S)}$ . Fig. 4 shows an example. + +# 3. Results + +Our method targets two different tasks: post-capture WB correction and manipulation of the sRGB rendered images + +Table 1: AWB results using the Rendered WB dataset [3] and the rendered version of the Cube+ dataset [3,5]. We report the mean, first, second (median), and third quartile (Q1, Q2, and Q3) of mean square error (MSE), mean angular error (MAE), and $\triangle$ E 2000 [32]. For all diagonal-based methods, gamma linearization [4,15] is applied. The top results are indicated with yellow and boldface. + +
MethodMSEMAE△E 2000
MeanQ1Q2Q3MeanQ1Q2Q3MeanQ1Q2Q3
Rendered WB dataset: Set 1-Test (21,046 images) [3]
FC4 [23]179.5533.89100.09246.506.14°2.62°4.73°8.40°6.553.545.908.94
Quasi-U CC [9]172.4333.5397.9237.266.00°2.79°4.85°8.15°6.043.245.278.11
KNN-WB [3]77.7913.7439.6294.013.06°1.74°2.54°3.76°3.582.073.094.55
Ours82.5513.1942.77102.093.12°1.88°2.70°3.84°3.772.163.304.86
Rendered WB dataset: Set 2 (2,881 images) [3]
FC4 [23]505.30142.46307.77635.3510.37°5.31°9.26°14.15°10.827.3910.6413.77
Quasi-U CC [9]553.54146.85332.42717.6110.47°5.94°9.42°14.04°10.667.0310.5213.94
KNN-WB [3]171.0937.0487.04190.884.48°2.26°3.64°5.95°5.603.434.907.06
Ours124.9730.1376.32154.443.75°2.02°3.08°4.72°4.903.134.356.08
Rendered Cube+ dataset with different WB settings (10,242 images) [3,5]
FC4 [23]371.979.15213.41467.336.49°3.34°5.59°8.59°10.386.69.7613.26
Quasi-U CC [9]292.1815.5755.41261.586.12°1.95°3.88°8.83°7.252.895.2110.37
KNN-WB [3]194.9827.4357.08118.214.12°1.96°3.17°5.04°5.683.224.616.70
Ours80.4615.4333.8874.423.45°1.87°2.82°4.26°4.592.683.815.53
+ +to a specific WB color temperature. We achieve state-of-the-art results for several different datasets for both tasks. We first describe the datasets used to evaluate our method in Sec. 3.1. We then discuss our quantitative and qualitative results in Sec. 3.2 and Sec. 3.3, respectively. We also perform an ablation study to validate our problem formulation and the proposed framework. + +![](images/0d7f2abf3387c1da7b5a02482c0e1c5a7eed70decb054140ec4aec9e978de84e.jpg) + +![](images/48903f82a64f5a6fe265336d4cf5e3066a3e3075db2067fb490c3a952b6b55a6.jpg) + +![](images/c3d6a65a912ca9de2b4d2853a97535671e72d14b51da33296623ac84e396fb7c.jpg) + +![](images/2ec438afde611b57742064bdd39b128e2b3326f300fe98724d21d9db77a00864.jpg) +(A) Input images + +![](images/6c2c9afae4b7140db4f11a1b0730f7048d0735ad1bacf3729b97f58c07be46b1.jpg) + +![](images/300ca46b57f64d955defab98da50cf1343dcae608c3e562a12bf4cdd0a9b8a09.jpg) + +![](images/256ad6096e46cdf2eff15eefe5d010289bae35d9e9c3a7ab7837d68d533a1fbc.jpg) + +![](images/b013653914de4a3b61e5fd111fc9512388dd8b1507392414e87e59853ad782cc.jpg) +(B) KNN-WB emulator results + +![](images/7edbc93851b25b3cafed253a29e9521f423f7382f7b2df81a5f1003f5dadf98f.jpg) + +![](images/8b4a82dc988ce02bfdfff9eaf3ff6123f39eee2f7c7dfef251c6022140ef29ea.jpg) + +![](images/9b42e46650028a96e69a4c03610d92c4807fbe24bf8b4134d1c1f2940f98b313.jpg) + +![](images/4b927e4e2580ec08ce1b09bb99acac509937a3ac3c09b0e57b59e819ca6b8e14.jpg) +(C) Our deep-WB results + +![](images/3463bc64325ac2a2b578f7ca5af7846c5e6ffccb6793ecf3c6e37fe8a0c3c5a9.jpg) + +![](images/7d2792447688deb68b0d7448c4aaba779927b82a962f93fd4a28d56a78e81f65.jpg) + +![](images/c4e5ca23a6a753a97a4e138571f9c29260fc3dd87c0240b514f3b6ccfd06dd87.jpg) + +![](images/e36f02706325b5c0b23daa54f07ae6135fb937c9d82006737be61a06bdb8d1fb.jpg) +(D) Target camera WB +Figure 6: Qualitative comparison of WB manipulation. (A) Input images. (B) Results of KNN-WB emulator [2]. (C) Our results. (D) Ground truth camera-rendered images with the target WB settings. In this figure, the target WB settings are Incandescent, Daylight, Shade, and Fluorescent. Shown input images are taken from the rendered version of the MIT-Adobe FiveK dataset [3, 11]. + +# 3.1. Datasets + +As previously mentioned, we used randomly selected images from the two partitions of Set 1 in the Rendered WB dataset [3] for training. For testing, we used the third partition of Set 1, termed Set 1-Test, and three additional datasets not part of training. Two of these additional datasets are as follows: (1) Set 2 of the Rendered WB dataset (2,881 images) [3], and (2) the sRGB rendered version of the Cube+ dataset (10,242 images) [5]. Datasets (1) and (2) are used to evaluate the task of AWB correction. For the WB manipulation task, we used the rendered Cube+ dataset and (3) a rendered version of the MIT-Adobe FiveK dataset (29,980 images) [11]. The rendered version of each dataset of these datasets is available from the project page associated with [3]. These latter datasets represent raw-RGB images that have been rendered to the sRGB color space with different WB settings. This allows us to evaluate how well we can mimic different WB settings. + +# 3.2. Quantitative results + +For both tasks, we follow the same evaluation metrics used by the most recent work in [3]. Specifically, we used the following metrics to evaluate our results: mean square error (MSE), mean angular error (MAE), and $\triangle$ E 2000 [32]. We also report $\triangle$ E 76 in the supplemental materials. For each evaluation metric, we report the mean, lower quartile (Q1), median (Q2), and the upper quartile (Q3) of the error. + +WB correction We compared the proposed method with the KNN-WB approach in [3]. We also compared our + +![](images/b5e0314dfd4f7a21d42f0641811d6dc1732c8384d22dcf2e057ed23e46eaf23a.jpg) + +![](images/3bda2713b4ab5f2a7c6d97e494f38b65ae954d5234ed161bcd8d6520e2491990.jpg) + +![](images/05e5e1588b71dc508629ab2c21a4216f818bdb724902051933a925f2100e49c8.jpg) + +![](images/00333672a91375e5f29c1ff6ba187b99e745cccfcd1b9e46e9e41c038169c6dd.jpg) + +![](images/fb2cfc70972934c62a9691c15124d7b3bf1e003f92898a0642db5b5c84617f31.jpg) + +![](images/7e6cc39cb1939fa6e98b3c86e42e4064b9ca284d4460675e6536888aa79d76cf.jpg) + +![](images/f7e7f28268358002b83b4c98633226b7d2354a18c79921716105d64916570f39.jpg) + +![](images/5931ead39a73c5debcfcb8c3482c66a4f22ba6a11e35dd467263170243937f3a.jpg) + +![](images/8b89860bc6ea4b914b0afbb5324119cc585bc8f927f1359e52f2a1588b0bd04d.jpg) + +![](images/6ca6ff00179e2e8ca6fb088179689fe85b1fd8b3d60f5748a1495acee5d634f2.jpg) + +![](images/ff17f1e43609e208326e8d9f9b8a55b31830e661b938953d1b604081e6f6a698.jpg) +(A) Input images + +![](images/e6274a43cb2c4ba95eb7a1d51f4b6746748361b56234cb25f787c84dae8d45fc.jpg) +(B) AWB results + +![](images/5d0c08b29240ca2a2225c9cb0c28389826df5f21caf8c88dad1a9846b4ab3e97.jpg) +(C) Incandescent WB results + +![](images/1ce78a9bd0409b9c817aaf987f425152bcf79402faaea5d5b1558a76f2d959a2.jpg) +(D) Fluorescent WB results + +![](images/27ac72cb6472bb278724e7d7cb9164dd00e9e5797dbaa59260eb6321ea160de8.jpg) +(E) Shade WB results + +![](images/30b4c2178b353ab7e7cf6b5204e7a4783606d8229fb5bc1b95986f232cfd91c1.jpg) +Figure 7: Qualitative results of our method. (A) Input images. (B) AWB results. (C) Incandescent WB results. (D) Fluorescent WB results. (E) Shade WB Results. Shown input images are rendered from the MIT-Adobe FiveK dataset [11]. +(A) Input image +Figure 8: (A) Input image. (B) Result of quasi-U CC [9]. (C) Result of KNN-WB [3]. (D)-(F) Our deep-WB editing results. Photo credit: Duncan Yoyos Flickr-CC BY-NC 2.0. + +![](images/c8f412ff3946309cdc8cef92e04fbdb2c15e3f0fa0e55efde92073a5fe3f8add.jpg) +(B) Quasi-U CC + +![](images/b796122c0bd6cf4ab829f6321aea8831b56494253b648e02e7ee4f17ac4328b0.jpg) +(C) KNN-WB + +![](images/73e3ac234fc322d57f5da44025e4dc66a96003e239646261a4dafe62aa1b331a.jpg) +(D) Our AWB correction + +![](images/e8a842894db6de912460c9e31988beafc8dcd5874c9bfdd3e13b4e7cca8f400e.jpg) +(E) Our Incandescent WB + +![](images/6e12ce1ab5a2edcdcda25fc3f4fe298d22c26287bd21384219bddc98cb88831f.jpg) +(F) Our Shade WB + +results against the traditional WB diagonal-correction using recent illuminant estimation methods [9, 23]. We note that methods [9, 23] were not designed to correct nonlinear sRGB images. These methods are included, because it is often purported that such methods are effective when the sRGB image has been "linearized" using a decoding gamma. + +Table 1 reports the error between corrected images obtained by each method and the corresponding ground truth images. Table 1 shows results on the Set 1-Test, Set 2, and Cube+ dataset described earlier. This represents a total of 34,169 unseen sRGB images by our DNN-model, each rendered with different camera models and WB settings. For the diagonal-correction results, we pre-processed each testing image by first applying the 2.2 gamma linearization [4, 15], and then we applied the gamma encoding after correction. We have results that are on par with the state-of-the-art method [3] on the Set 1-Test. We achieve state-of-the-art results in all evaluation metrics for additional testing sets (Set 2 and Cube+). + +WB manipulation The goal of this task is to change the input image's colors to appear as they were rendered using a target WB setting. We compare our result with the most + +recent work in [2] that proposed a KNN-WB emulator that mimics WB effects in the sRGB space. We used the same WB settings produced by the KNN-WB emulator. Specifically, we selected the following target WB settings: Incandescent $(2850K)$ , Fluorescent $(3800K)$ , Daylight $(5500K)$ , Cloudy $(6500K)$ , and Shade $(7500K)$ . As our decoders were trained to generate only Incandescent and Shade WB settings, we used Eq. 5 to produce the other WB settings (i.e., Fluorescent, Daylight, and Cloudy WB settings). + +Table 2 shows the obtained results using our method and the KNN-WB emulator. Table 2 demonstrates that our method outperforms the KNN-WB emulator [2] over a total of 40,222 testing images captured with different camera models and WB settings using all evaluation metrics. + +# 3.3. Qualitative results + +In Fig. 5 and Fig. 6, we provide a visual comparison of our results against the most recent work proposed for WB correction [3,9] and WB manipulation [2], respectively. On top of each example, we show the $\triangle$ E 2000 error between the result image and the corresponding ground truth image (i.e., rendered by the camera using the target setting). It is clear that our results have the lower $\triangle$ E 2000 and are the most similar to the ground truth images. + +Table 2: Results of WB manipulation using the rendered version of the Cube+ dataset [3, 5] and the rendered version of the MIT-Adobe FiveK dataset [3, 11]. We report the mean, first, second (median), and third quartile (Q1, Q2, and Q3) of mean square error (MSE), mean angular error (MAE), and $\triangle$ E 2000 [32]. The top results are indicated with yellow and boldface. + +
MethodMSEMAE△E 2000
MeanQ1Q2Q3MeanQ1Q2Q3MeanQ1Q2Q3
Rendered Cube+ dataset (10,242 images) [3,5]
KNN-WB emulator [2]317.2550.47153.33428.327.6°3.56°6.15°10.63°7.864.006.5610.46
Ours199.3832.3063.34142.765.40°2.67°4.04°6.36°5.983.444.787.29
Rendered MIT-Adobe FiveK dataset (29,980 images) [3,11]
KNN-WB emulator [2]249.9541.79109.69283.427.46°3.71°6.09°9.92°6.833.805.768.89
Ours135.7131.2168.63151.495.41°2.96°4.45°6.83°5.243.324.576.41
+ +![](images/d300d2abf0875b99f316a3f2d0621c8b32c2ca94a932bf9ba60260fa6007d040.jpg) +(A) Input image +Figure 9: Strong color casts due to WB errors are hard to correct. (A) Input image rendered with an incorrect WB setting. (B) Result of Photoshop auto-color correction. (C) Result of Samsung S10 auto-WB correction. (D) Result of Google Photos auto-filter. (E) Result of iPhone 8 Plus built-in Photo app auto-correction. (F) Our AWB result using the proposed deep-WB editing framework. Photo credit: OakleyOriginals Flickr-CC BY 2.0. + +![](images/828152d848884c14660264e810928b6f387d7b6f6abe1fd8a95d37060dacc3c4.jpg) +(B) Photoshop auto-color correction + +![](images/1b6ea66ce11d45358d2a82e55b22736095d1843497af7bdf7c5def43ff132531.jpg) +(C) Samsung S10 auto-WB correction + +![](images/c17bc84eae1ed366e10212dc285cbd0af7525d49a871501b1015383b1d51c8b4.jpg) +(D) Google Photos auto-filter + +![](images/e8d8d535fe103e91db3fdb8e1d663e7614d76b72e537605ad36a7ab9c732862f.jpg) +(E) iPhone 8 Plus Photo app auto-correct + +![](images/9c0c59ec2e90e9729b2bd4548db258ca1dc7317bf073886940de68e24a790d96.jpg) +(F) Our deep-WB correction + +Fig. 7 shows additional examples of our results. As shown, our framework accepts input images with arbitrary WB settings and re-renders them with the target WB settings, including the AWB correction. + +We tested our method with several images taken from the Internet to check its ability to generalize to images typically found online. Fig. 8 and Fig. 9 show examples. As is shown, our method produces compelling results compared with other methods and commercial software packages for photo editing, even when input images have strong color casts. We provide additional examples in supplemental materials. + +# 3.4. Comparison with a vanilla U-Net + +As explained earlier, our framework employs a single encoder to encode input images, while each decoder is responsible for producing a specific WB setting. Our architecture aims to model Eq. 1 in the same way cameras would produce colors for different WB settings from the same raw-RGB captured image. + +Intuitively, we can re-implement our framework using a multi-U-Net architecture [29], such that each encoder/decoder model will be trained for a single target of the WB settings. + +In Table 3, we provide a comparison between our proposed framework against vanilla U-Net models. We train our proposed architecture and three U-Net models (each U-Net model targets one of our WB settings) for 88,000 iterations. The results validate our design and make evident that + +Table 3: Average of mean square error and $\triangle \mathbf{E}2000$ [32] obtained by our framework and the traditional U-Net architecture [29]. Shown results on Set 2 of the Rendered WB dataset [3] for AWB and the rendered version of the Cube+ dataset [3,5] for WB manipulation. The top results are indicated with yellow and boldface. + +
MethodAWB [3]WB editing [3,5]
MSE△E 2000MSE△E 2000
Multi-U-Net [29]187.256.23234.776.87
Ours124.474.99206.816.23
+ +our shared encoder not only reduces the required number of parameters but also gives better results. + +# 4. Conclusion + +We have presented a deep learning framework for editing the WB of sRGB camera-rendered images. Specifically, we have proposed a DNN architecture that uses a single encoder and multiple decoders, which are trained in an end-to-end manner. Our framework allows the direct correction of images captured with wrong WB settings. Additionally, our framework produces output images that allow users to manually adjust the sRGB image to appear as if it was rendered with a wide range of WB color temperatures. Quantitative and qualitative results demonstrate the effectiveness of our framework against recent data-driven methods. + +# References + +[1] Mahmoud Affi and Michael S Brown. Sensor-independent illumination estimation for dnn models. In BMVC, 2019. 2 +[2] Mahmoud Affi and Michael S Brown. What else can fool deep learning? Addressing color constancy errors on deep neural network performance. In ICCV, 2019. 2, 5, 6, 7, 8 +[3] Mahmoud Affifi, Brian Price, Scott Cohen, and Michael S Brown. When color constancy goes wrong: Correcting improperly white-balanced images. In CVPR, 2019. 1, 2, 3, 4, 5, 6, 7, 8 +[4] Matthew Anderson, Ricardo Motta, Srinivasan Chandrasekar, and Michael Stokes. Proposal for a standard default color space for the Internet - sRGB. In Color and Imaging Conference, pages 238-245, 1996. 6, 7 +[5] Nikola Banić and Sven Lončarić. Unsupervised learning for color constancy. arXiv preprint arXiv:1712.00436, 2017. 5, 6, 8 +[6] Kobus Barnard, Vlad Cardei, and Brian Funt. A comparison of computational color constancy algorithms: Methodology and experiments with synthesized data. IEEE Transactions on Image Processing, 11(9):972-984, 2002. 2 +[7] Jonathan T Barron. Convolutional color constancy. In ICCV, 2015. 2 +[8] Jonathan T Barron and Yun-Ta Tsai. Fast Fourier color constancy. In CVPR, 2017. 1, 2 +[9] Simone Bianco and Claudio Cusano. Quasi-unsupervised color constancy. In CVPR, 2019. 2, 5, 6, 7 +[10] Gershon Buchsbaum. A spatial processor model for object colour perception. Journal of the Franklin Institute, 310(1):1-26, 1980. 2 +[11] Vladimir Bychkovsky, Sylvain Paris, Eric Chan, and Frédo Durand. Learning photographic global tonal adjustment with a database of input / output image pairs. In CVPR, 2011. 4, 6, 7, 8 +[12] Ayan Chakrabarti, Ying Xiong, Baochen Sun, Trevor Darrell, Daneil Scharstein, Todd Zickler, and Kate Saenko. Modeling radiometric uncertainty for vision with tonemapred color images. IEEE Transactions on Pattern Analysis and Machine Intelligence, 36(11):2185-2198, 2014. 2 +[13] Dongliang Cheng, Abdelrahman Kamel, Brian Price, Scott Cohen, and Michael S Brown. Two illuminant estimation and user correction preference. In CVPR, 2016. 1 +[14] Dongliang Cheng, Dilip K Prasad, and Michael S Brown. Illuminant estimation for color constancy: Why spatial-domain methods work and the role of the color distribution. JOSA A, 31(5):1049-1058, 2014. 2 +[15] Marc Ebner. Color Constancy, volume 6. John Wiley & Sons, 2007. 6, 7 +[16] Graham D Finlayson, Michal Mackiewicz, and Anya Hurlbert. Color correction using root-polynomial regression. IEEE Transactions on Image Processing, 24(5):1460-1470, 2015. 5 +[17] Graham D Finlayson and Elisabetta Trezzi. Shades of gray and colour constancy. In Color and Imaging Conference, 2004. 2 + +[18] Peter V Gehler, Carsten Rother, Andrew Blake, Tom Minka, and Toby Sharp. Bayesian color constancy revisited. In CVPR, 2008. 2 +[19] Arjan Gijsenij, Theo Gevers, and Joost Van De Weijer. Computational color constancy: Survey and experiments. IEEE Transactions on Image Processing, 20(9):2475-2489, 2011. 2 +[20] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In ICCV, 2015. 5 +[21] Guowei Hong, M Ronnier Luo, and Peter A Rhodes. A study of digital camera colorimetric characterisation based on polynomial modelling. Color Research & Application, 26(1):76-84, 2001. 5 +[22] Yuanming Hu, Hao He, Chenxi Xu, Baoyuan Wang, and Stephen Lin. Exposure: A white-box photo post-processing framework. ACM Transactions on Graphics (TOG), 37(2):26:1-26:17, 2018. 1 +[23] Yuanming Hu, Baoyuan Wang, and Stephen Lin. FC4: Fully convolutional color constancy with confidence-weighted pooling. In CVPR, 2017. 2, 6, 7 +[24] Seon Joo Kim, Hai Ting Lin, Zheng Lu, Sabine Süssstrunk, Stephen Lin, and Michael S Brown. A new in-camera imaging model for color computer vision and its application. IEEE Transactions on Pattern Analysis and Machine Intelligence, 34(12):2289-2302, 2012. 2 +[25] Diederik P Kingma and Jimmy Ba. ADAM: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 5 +[26] Arie Andries Kruithof. Tubular luminescence lamps for general illumination. Philips Technical Review, 6:65-96, 1941. 3 +[27] Andrius Petrulis, Linas Petkevicius, Pranciskus Vitta, Rimantas Vaicekauskas, and Arturas Žukauskas. Exploring preferred correlated color temperature in outdoor environments using a smart solid-state light engine. The Journal of the Illuminating Engineering Society, 14(2):95–106, 2018. 3 +[28] Yanlin Qian, Joni-Kristian Kamarainen, Jarno Nikkanen, and Jiri Matas. On finding gray pixels. In CVPR, 2019. 2 +[29] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-Net: Convolutional networks for biomedical image segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention, 2015. 4, 8 +[30] Eli Schwartz, Raja Giryes, and Alex M Bronstein. DeepISP: Toward learning an end-to-end image processing pipeline. IEEE Transactions on Image Processing, 28(2):912-923, 2018. 5 +[31] Michael Scuello, Israel Abramov, James Gordon, and Steven Weintraub. Museum lighting: Why are some illuminants preferred? JOSA A, 21(2):306-311, 2004. 1 +[32] Gaurav Sharma, Wencheng Wu, and Edul N Dalal. The CIEDE2000 color-difference formula: Implementation notes, supplementary test data, and mathematical observations. Color Research & Application, 30(1):21-30, 2005. 6, 8 +[33] Wu Shi, Chen Change Loy, and Xiaou Tang. Deep specialized network for illuminant estimation. In ECCV, 2016. 2 + +[34] Ying Xiong, Kate Saenko, Trevor Darrell, and Todd Zickler. From pixels to physics: Probabilistic color de-rendering. In CVPR, 2012. 2 \ No newline at end of file diff --git a/deepwhitebalanceediting/images.zip b/deepwhitebalanceediting/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..e0cd38c46c859b1d6d467416d7f49ec9caa62c59 --- /dev/null +++ b/deepwhitebalanceediting/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02183f90e01e972d237f3bf0727f7bdd3820fb65887fd6af523ce5dc00982edc +size 979068 diff --git a/deepwhitebalanceediting/layout.json b/deepwhitebalanceediting/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4190cdeb021b2723650f3a60a0259a13bee6d22f --- /dev/null +++ b/deepwhitebalanceediting/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19292c7211c0cf4aba771a1a23dfbd5d0ecb236f20576077915613301d0ea2dc +size 506946 diff --git a/defendingagainstmodelstealingattackswithadaptivemisinformation/8157fc21-b9c2-4c13-914b-7e9fb22d3476_content_list.json b/defendingagainstmodelstealingattackswithadaptivemisinformation/8157fc21-b9c2-4c13-914b-7e9fb22d3476_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..fa5e3c4b94385be4e5a3ca646fd48ed1a036ea75 --- /dev/null +++ b/defendingagainstmodelstealingattackswithadaptivemisinformation/8157fc21-b9c2-4c13-914b-7e9fb22d3476_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7cc5b8cbfdef5aa825cd174d320d56390d1a7eb79adfa0009ddcf779b49d314 +size 73617 diff --git a/defendingagainstmodelstealingattackswithadaptivemisinformation/8157fc21-b9c2-4c13-914b-7e9fb22d3476_model.json b/defendingagainstmodelstealingattackswithadaptivemisinformation/8157fc21-b9c2-4c13-914b-7e9fb22d3476_model.json new file mode 100644 index 0000000000000000000000000000000000000000..30a14fad5aaeabc616fac20c87bdfc6cdacab963 --- /dev/null +++ b/defendingagainstmodelstealingattackswithadaptivemisinformation/8157fc21-b9c2-4c13-914b-7e9fb22d3476_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02eb28e5b7136c1b43a8c4d9df7d6ca054c8d055652fe65682567b6f1b7fc052 +size 88257 diff --git a/defendingagainstmodelstealingattackswithadaptivemisinformation/8157fc21-b9c2-4c13-914b-7e9fb22d3476_origin.pdf b/defendingagainstmodelstealingattackswithadaptivemisinformation/8157fc21-b9c2-4c13-914b-7e9fb22d3476_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..59d5d86063945e498254d22cc7455a760d046959 --- /dev/null +++ b/defendingagainstmodelstealingattackswithadaptivemisinformation/8157fc21-b9c2-4c13-914b-7e9fb22d3476_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a1f304a76d72843db112930cf285c57cca8ed11bf0741f3ddd4283e7647ac96 +size 636006 diff --git a/defendingagainstmodelstealingattackswithadaptivemisinformation/full.md b/defendingagainstmodelstealingattackswithadaptivemisinformation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..567de39c3bf5517498d3f2e417159de9809f5fc4 --- /dev/null +++ b/defendingagainstmodelstealingattackswithadaptivemisinformation/full.md @@ -0,0 +1,321 @@ +# Defending Against Model Stealing Attacks with Adaptive Misinformation + +Sanjay Kariyappa + +Georgia Institute of Technology +Atlanta GA, USA + +sanjaykariyappa@gatech.edu + +# Abstract + +Deep Neural Networks (DNNs) are susceptible to model stealing attacks, which allows a data-limited adversary with no knowledge of the training dataset to clone the functionality of a target model, just by using black-box query access. Such attacks are typically carried out by querying the target model using inputs that are synthetically generated or sampled from a surrogate dataset to construct a labeled dataset. The adversary can use this labeled dataset to train a clone model, which achieves a classification accuracy comparable to that of the target model. We propose "Adaptive Misinformation" to defend against such model stealing attacks. We identify that all existing model stealing attacks invariably query the target model with Out-Of-Distribution (OOD) inputs. By selectively sending incorrect predictions for OOD queries, our defense substantially degrades the accuracy of the attacker's clone model (by up to $40\%$ ), while minimally impacting the accuracy $(< 0.5\%)$ for benign users. Compared to existing defenses, our defense has a significantly better security vs accuracy tradeoff and incurs minimal computational overhead. + +# 1. Introduction + +The ability of Deep Learning models to solve several challenging classification problems in fields like computer vision and natural language processing has proliferated the use of these models in various products and services such as smart cameras, intelligent voice assistants and self-driving cars. In addition, several companies now employ deep learning models to offer classification as a service to end users who may not have the resources to train their own models. In most of these cases, while the model parameters and the architecture are kept hidden from the end-user, the user is allowed to interact with the model to obtain the classification outputs for the user's inputs. The confidentiality of these models is important as the models can be misused in various ways in the hands of an adversary. For instance, an adversary can use the stolen model to offer a compet- + +Moinuddin K Qureshi + +Georgia Institute of Technology + +Atlanta GA, USA + +moin@gatech.edu + +![](images/b7f3b9966250f5afcc96eb0d451714e3b7a6a112556c2187870c545bdb761832.jpg) +(a) + +![](images/4acb9eb451b5d321661392e408e2215e4299a855e2ff7acd7cd9ec6b52c8157c.jpg) +(b) +Figure 1. Model Stealing Attack: (a) An adversary queries the target model (dog-breed classifier) using synthetic/surrogate data (cat images) and constructs a labeled dataset using the predictions of the model (b) The labeled dataset can then be used to train a clone-model that replicates the functionality of the target model. + +ing service which can be detrimental to business. Furthermore, stolen models can be used to craft adversarial examples [20, 5, 17, 22], creating vulnerability for safety-critical applications such as malware detection and can even leak information about the data used to train the model, causing privacy issues [4, 19]. These issues create a need to protect the confidentiality of machine learning models. + +Unfortunately, recent attacks [15, 17] have shown that it is possible for an adversary to carry out model stealing attacks and train a clone model that achieves a classification accuracy that is remarkably close to the accuracy of the target model (up to $0.99 \times$ ). Moreover, these attacks can be performed even when the adversary is constrained in the following ways: + +1. The adversary only has black-box query access to the model i.e. the attacker can query the model with any input and observe the output probabilities. +2. The adversary is data-limited and does not have access to a large number of inputs representative of the training data of the target model. + +Attacks that work under these constraints rely on one of two methods for generating the data necessary for querying the target model: (a) Synthetic Data: [9, 17] produce synthetic data from a small set of in-distribution seed ex + +![](images/9321faa0a83f79414937c83b6de11d5f789353b8d0237dec801e853577bad875.jpg) +CDF of MSP for Queries on ResNet-18 (CIFAR-10) +Figure 2. CDF of Maximum Softmax Probability (MSP) for queries from: (a) Benign User (b) KnockoffNet Attacker (c) Jacobian-Based Dataset Augmentation (JBDA) Attacker. Queries from benign user produce high values of MSP indicating indistribution data while queries generated from attacks produce low values of MSP indicating out-of-distribution data. + +amples by iteratively adding heuristic-based perturbations to the seed examples. (b) Surrogate Data: Several attacks [15, 21] simply use a surrogate dataset to query the target model. For example, a cat dataset can be used as the surrogate dataset to query the dog-breed classifier as shown in Fig 1a. A labeled dataset can be constructed from these queries, which can be used by the adversary to train a clone model that mimics the functionality of the target model (Fig 1b). Such attacks make it viable for an adversary to create a clone of the target model even with limited/no access to the target model's data distribution. The goal of this paper is to propose an effective defense for model stealing attacks carried out by a data-limited adversary with black-box access to the target model. + +We observe that all existing attacks invariably generate Out-Of-Distribution (OOD) queries. One way to check if the data is OOD is by plotting the Maximum Softmax Probability (MSP) of the data produced by the target model. High values of MSP indicate In-Distribution (ID) data and low values indicate OOD data [6]. As an example, we characterize the MSP values using a ResNet-18 network trained on the CIFAR-10 dataset. We plot the CDF of MSP for benign queries sampled from a held-out test set as well as adversarial queries from two representative attacks: 1. Knockoffs nets [15], using surrogate data from CIFAR-100 dataset and 2. Jacobian-Based Data Augmentation (JBDA) [17], which uses synthetic data, in Fig 2. Notice that the CDFs of the queries from both attacks are concentrated towards lower values of MSP, indicating OOD data, compared to the inputs from the benign user which produce high MSP values, implying that the inputs are ID. + +Motivated by this observation, we propose Adaptive Misinformation (AM) to defend against model stealing attacks. AM selectively sends incorrect predictions for queries that + +are deemed OOD, while ID queries are serviced with correct predictions. Since a large fraction of the adversary's queries is OOD, this leads to the mislabeling of a significant portion of the adversary's dataset. Training a model on this mislabeled dataset results in a low-quality clone with poor accuracy, reducing the effectiveness of model stealing attacks. Recent works [12, 16] have used a similar insight of misleading the adversary, by injecting perturbations to the predictions of the model. Compared to these perturbation based defenses, our proposal is more scalable and offers a significantly better trade-off between model accuracy and security due to the following key attributes: + +1. Adaptive Nature: The adaptive nature of our defense allows using incorrect predictions to selectively service suspicious OOD queries, instead of indiscriminately adding perturbations to the probabilities for all inputs. This results in a better trade-off between model accuracy and security against model stealing attacks. + +2. Reduced Correlation through Misinformation: Prior works add perturbations to the original prediction in order to mislead the adversary. However, we find that these perturbed predictions remain correlated with the original predictions, leaking information about the original predictions of the model. In contrast, our defense uses an uncorrelated misinformation function to generate incorrect predictions, which reveals no information about the original predictions, resulting in better security. + +3. Low Computational Overhead: Our proposal only requires a single inference pass with a modest increase in the amount of computation over an undefended model $(< 2\times)$ . In contrast, existing defenses like Prediction Poisoning [16] (PP) requires multiple gradient computations and thus incurs several orders of magnitude increase in computational cost and inference latency. + +Overall, the contributions of our paper are as follows: + +1. We analyze the queries from existing model stealing attacks (KnockoffNets and JBDA) and identify that these attacks produce a large number of OOD queries. We leverage this observation to develop an effective defense. +2. We propose Adaptive Misinformation to defend against model stealing attacks. Our defense involves using an OOD detector to flag "suspicious" inputs, potentially from an adversary, and adaptively servicing these queries with incorrect predictions from an auxiliary "misinformation model" which produces uncorrelated predictions. +3. We perform extensive empirical studies to evaluate our defense against multiple model stealing attacks. We plot the security vs accuracy trade-off curve for various datasets and show that, owing to its adaptive nature, our defense achieves a significantly better trade-off compared to prior art. E.g. for Flowers-17 dataset, AM lowers the clone accuracy to $14.3\%$ , compared to the clone accuracy of $63.6\%$ offered by PP with comparable defender accuracy of $91\%$ . + +# 2. Problem Description + +Our problem setting involves a data-limited adversary who is trying to perform model stealing attack on a defender's model, just using black-box query access. In this section, we outline the attack and defense objectives. We also provide background on various attacks that have been proposed in literature to perform model stealing for a data-limited adversary. + +# 2.1. Attack Objective + +The adversary's goal is to replicate the functionality of the defender's model $f(x; \theta)$ by training a clone model $f'(x; \theta')$ that achieves high classification accuracy on the defender's classification task, as shown in Eqn. 1. Here, $P_{def}(X)$ denotes the distribution of data from the defender's problem domain, $\theta$ represents the parameters of the defender's model, and $\theta'$ represents the parameters of the clone model that the attacker is trying to train. + +$$ +\max _ {\theta^ {\prime}} \mathbb {E} _ {x \sim \mathcal {P} _ {d e f} (X)} A c c \left(f ^ {\prime} \left(x; \theta^ {\prime}\right)\right) \tag {1} +$$ + +If the adversary had access to a labeled dataset of inputs sampled from $P_{def}(X)$ , the adversary could simply use this to train the clone-model $f'$ . However, in a lot of real-world classification problems, the adversary is data-limited and lacks access to a sufficiently large dataset that is representative of $P_{def}(X)$ . + +# 2.2. Model Stealing Attacks under data limitations + +In the absence of a representative dataset, the adversary can use either synthetic or surrogate data to query the defender's model. A labeled dataset can be constructed from the predictions obtained through these queries, which can be used to train the clone model $f'$ . These methods rely on the principle of knowledge distillation [8], where the predictions of a "teacher" model (defender's model) are used to train a "student" model (attacker's clone model). We describe ways in which an attacker can generate synthetic and surrogate data to perform model stealing attacks. + +(a) Synthetic Data: The adversary starts by training a surrogate model $f'$ using a small seed dataset $\mathcal{D}_{seed}$ of ID examples and iteratively augments this dataset with synthetic examples. Jacobian-Based Data Augmentation (JBDA) [17, 9] is one such heuristic for generating synthetic examples. For each input $x \in \mathcal{D}$ , this method generates a synthetic example $x'$ , by perturbing it using the jacobian of the clone model's loss function: $x' = x + \lambda sign(\nabla_x \mathcal{L}(f'(x; \theta'))$ ). These synthetic examples are labeled using the predictions of the defender's model $y' = f(x')$ and the labeled synthetic examples thus generated: $\mathcal{D}_{syn} = \{x', y'\}$ , are used to augment the adversary's dataset: $\mathcal{D}_{seed} = \mathcal{D}_{seed} \cup \mathcal{D}_{syn}$ and retrain $f'$ . + +(b) Surrogate Data: Recent works [15, 21] have shown that it is possible to use a surrogate distribution $P_{sur}(X')$ , which is dissimilar from $P_{def}(X)$ , to steal the functionality of black-box models. The adversary can use inputs $x' \sim P_{sur}(X')$ to query the defender's model and obtain the prediction probabilities $y' = f(x')$ . The labeled data thus obtained: $\mathcal{D}_{sur} = \{x', y'\}$ , can be used as the surrogate dataset to train the clone-model $f'$ . + +Such methods enable model stealing attacks, despite the data limitations of the adversary, posing a threat to the confidentiality of the defender's black-box model. + +# 2.3. Defense Objective + +The defender's aim is to prevent an adversary from being able to replicate the functionality of the model. Thus the defender's objective involves minimizing the accuracy of the cloned model $f'$ trained by the adversary (Eqn. 2). + +$$ +\min _ {x \sim \mathcal {P} _ {d e f} (X)} \mathbb {E} [ A c c \left(f ^ {\prime} \left(x; \theta^ {\prime}\right)\right) ] \tag {2} +$$ + +The defender is also constrained to provide high classification accuracy to benign users of the service in order to retain the utility of the model for the classification task at hand. We formalize this by stating that the classification accuracy of the model for in-distribution examples has to be above a threshold $T$ . + +$$ +\underset {x \sim \mathcal {P} _ {\text {d e f}} (X)} {\mathbb {E}} [ \operatorname {A c c} (f (x; \theta)) ] \geq T \tag {3} +$$ + +Eqn. 2, 3 describe a constrained optimization problem for the defender. This formulation of the problem allows the defense to trade off the accuracy of the model for improved security, as long as the accuracy constraint (Eqn. 3) is satisfied. We term defenses that work within these constraints as accuracy-constrained defenses. Our proposed defense falls under this framework and allows improvement in security at the cost of a reduction in classification accuracy. + +# 3. Related Work + +We discuss the various defenses against model stealing attacks that have been proposed in literature. Existing defenses can broadly be categorized into Stateful Detection Defenses and Perturbation Based Defenses. + +# 3.1. Stateful Detection Defenses + +Several works [9, 1] have proposed analyzing the distribution of queries from individual users to classify the user as adversarial or benign. For instance, [9] uses the $L_{2}$ distance between successive queries to detect adversarial attacks based on the assumption that adversarial users send highly correlated queries. Unfortunately, such methods requires the defender to maintain a history of past queries limiting scalability. Moreover, these defenses are ineffective + +against adaptive attacks, attacks involving multiple colluding adversarial users and attacks that use surrogate datasets, which do not have correlated queries. + +# 3.2. Perturbation-Based Defenses + +In an undefended setting, the attacker has reliable access to the predictions of the target model $f$ for any arbitrary input $x$ . Perturbation-based defenses modify the original prediction of the model $y = f(x; \theta)$ to produce a perturbed prediction $y'$ , preventing the adversary from having reliable access to the target model's predictions. Consequently, training a clone model with the surrogate dataset: $\{x, y'\}$ formed by the adversary results in a low-quality clone model with reduced accuracy. There are several defenses that work under different constraints for generating perturbed predictions. They can be broadly categorized into defenses that preserve the accuracy of the model and defenses that trade-off accuracy for security. We briefly describe each of these works before detailing our solution in the following section. + +# 3.2.1 Accuracy Preserving Defenses + +These defenses ensure that the accuracy of the model on ID examples is unchanged after adding the perturbations. For instance, [12] constrains the perturbation to leave the top-1 class of the perturbed output unchanged i.e $\text{argmax}(y_i') = \text{argmax}(y_i)$ . This preserves the accuracy of the model, while removing the information present in the probabilities outputted by the defender's model. Similarly, [21] avoids exposing the output probabilities by only sending the hard labels of the top-1 or top-K classes while servicing requests. Both these defenses prevent the adversary from accessing the true prediction probabilities either implicitly or explicitly, while retaining the accuracy of the defender's model. Unfortunately, subsequent works have shown that the effectiveness of these defenses are limited as the adversary can still use the top-1 prediction of the model to perform model stealing attacks [16]. + +# 3.2.2 Accuracy-Constrained Defenses + +Unlike accuracy preserving attacks, accuracy-constrained defenses do not require the classification accuracy to be retained after perturbing the predictions of the model. This allows the defender to trade off model accuracy for better security by injecting a larger amount of perturbation to the predictions of the model. However, the amount of perturbation that can be injected is bound by the accuracy constraint (Eqn. 3), which ensures that the accuracy of the model is above a specified threshold for ID examples. Prediction Poisoning [16] (PP) is a recent work that proposes such an accuracy-constrained defense, whereby the defender per + +turbs the prediction of the model as shown in Eqn. 4 + +$$ +y ^ {\prime} = (1 - \alpha) f (x; \theta) + \alpha \eta \tag {4} +$$ + +The perturbed output $y'$ is computed by taking a weighted average between the predictions of the true model $f$ and a poisoning probability distribution $\eta$ . The poisoning distribution $\eta$ is computed with the objective of mis-training the adversary's clone model. This is done by maximizing the angular deviation between the weight gradients of the perturbed prediction with that of the original predictions of the model. $\alpha$ is a tunable parameter that controls the weightage given to the poisoned distribution and the true output of the model. Thus, increasing $\alpha$ allows the defender to trade off the accuracy of the model for increased security against model stealing attacks by increasing the amount of perturbation injected into the model's original predictions. Note that an inherent limitation of such defenses (including our proposed defense) is that they cannot be used in applications where the end-user is reliant on the confidence of the predictions for downstream processing since the predictions are perturbed to improve security. + +# 4. Our Proposal: Adaptive Misinformation + +Our paper proposes Adaptive Misinformation (AM), an accuracy-constrained defense to protect against model stealing attacks. Our defense is based on the observation that existing model stealing attacks generate a large number of OOD examples to query the defender's model. This is because the adversary is data-limited and does not have access to a large dataset representative of the defender's training dataset. AM takes advantage of this observation by adaptively servicing queries that are OOD with misinformation, resulting in most of the attacker's queries being serviced with incorrect predictions. Consequently, a large fraction of the attacker's dataset is mislabeled, degrading the accuracy of the clone model trained on this poisoned dataset. Compared to existing perturbation based defenses like PP, our proposal has the following distinguishing qualities: + +1. AM selectively modifies the predictions only for OOD queries, leaving the predictions unchanged for ID inputs. This is in contrast to prior works, which perturb the predictions indiscriminately for all inputs +2. In existing perturbation based defenses, there is a significant amount of correlation between the perturbed prediction $y'$ and the original prediction $y$ , which leaks information that can be exploited by an adversary (discussed further in Section 5.2.1). In contrast, AM ensures that $y'$ is uncorrelated with $y$ for OOD queries and therefore avoids leaking information about the original predictions. +3. PP requires expensive gradient computations to determine the perturbations. In contrast, AM has low computational overheads and just requires evaluation of an auxiliary misinformation model. + +These advantages allow our defense to achieve a better trade-off between classification accuracy and security compared to existing defenses, with a low computational overhead. Fig. 3 shows the block diagram of our proposed Adaptive Misinformation defense. In addition to the defender's model $f$ , there are three components that make up our defense: (1) An OOD detector (2) A misinformation function $(f')$ (3) A mechanism to gradually switch between the predictions of $f$ and $f'$ depending on the input. + +For an input query $x$ , AM first determines if the input is ID or OOD. If the input is ID, the user is assumed to be benign and AM uses the predictions of $f$ to service the request. On the other hand, if $x$ an OOD input, the user is considered to be malicious and the query is serviced using the incorrect predictions generated from $\hat{f}$ . In the remainder of this section, we explain the different components of our defense in more detail. + +![](images/698bc96137f5ce1e311c54cecd71ee37aa5072c6836f45ca916d26969ad53cbb.jpg) +Figure 3. Adaptive Misinformation: We use an OOD detection mechanism to selectively service OOD inputs with the predictions of the misinformation function $f'$ , while the ID inputs are serviced with the original predictions of the model $f$ . + +# 4.1. Out of Distribution Detector + +Out of Distribution detection is a well-studied problem in deep learning [6, 10, 13, 11, 23, 3], where the objective is to determine if an input received by the model during testing is dissimilar to the inputs seen during training. This can be used to detect and flag anomalous or hard to classify inputs which might require further examination or human intervention. A simple proposal to detect OOD examples [6] involves using the Maximum Softmax Probability (MSP) of the model. For a model that outputs a set of $K$ output probabilities $\{y_{i}\}_{i = 1}^{K}$ for an input $x$ , OOD detection can be done by thresholding the MSP as shown in Eqn. 5. + +$$ +D e t (x) = \left\{ \begin{array}{l l} I D & \text {i f} \max _ {i} \left(y _ {i}\right) > \tau \\ O O D & \text {o t h e r w i s e} \end{array} \right. \tag {5} +$$ + +The idea here is that the model produces confident predictions on ID inputs, similar to the ones seen during training and less confident predictions on OOD examples that are dissimilar to the training dataset. Outlier Exposure [7] is a recent work that improves the performance of the threshold-based detector by exposing the classifier to an auxiliary + +dataset of outliers $\mathcal{D}_{out}$ . The model is trained to produce uniform probability distribution $(\mathcal{U})$ on inputs from $\mathcal{D}_{out}$ by adding an extra term to the loss function during training as shown in Eqn. 6. + +$$ +\mathbb {E} _ {(x, y) \in \mathcal {D} _ {\text {i n}}} [ \mathcal {L} (f (x), y) ] + \lambda \mathbb {E} _ {x ^ {\prime} \in \mathcal {D} _ {\text {o u t}}} [ \mathcal {L} (f (x ^ {\prime}), \mathcal {U}) ] \tag {6} +$$ + +This ensures that the model produces accurate and confident predictions for inputs sampled from $\mathcal{D}_{in}$ , while OOD examples produce less confident predictions, improving the ability of the detector to distinguish them. We train the defender's model with outlier exposure and use a threshold-based detector in our defense to perform OOD detection. + +# 4.2. Misinformation Function + +For queries which are deemed OOD by the detector, we want to provide incorrect predictions that are dissimilar to the predictions of the true model in order to deceive the adversary. We obtain the incorrect predictions by using a misinformation function $\hat{f}$ , which is trained to minimize the probability of the correct class $\hat{f}(x,y)$ . We can use categorical cross entropy to define a loss function to train $\hat{f}$ as described by Eqn. 7 to achieve this objective. + +$$ +l o s s = \mathbb {E} _ {(x, y) \in \mathcal {D} _ {\text {i n}}} \left[ - l o g (1 - \hat {f} (x, y)) \right] \tag {7} +$$ + +This loss term is minimized when the misinformation model produces low probability for the correct class $y$ . We use this model to provide misleading information to OOD queries, making it harder for an adversary to train a clone model that obtains high accuracy on the classification task. + +# 4.3. Adaptively Injecting Misinformation + +Finally, we need a mechanism to gradually switch between the outputs of the defender's model $(f)$ and the misinformation model $(\hat{f})$ , depending on whether the input $x$ is ID or OOD. In order to achieve this, we first pass $x$ through an OOD detector, which simply requires computing the maximum softmax probability $y_{max}$ of all the output classes produced by $f$ . + +$$ +y _ {\max } = \max _ {i} \left(y _ {i}\right) \tag {8} +$$ + +A larger value of $y_{max}$ indicates that the input is ID, while a smaller value indicates an OOD input. We use a threshold $\tau$ to classify between ID and OOD inputs as shown in Eqn. 5. The predictions of $f$ and $\hat{f}$ are combined by using a reverse sigmoid function $S(x)$ to produce the final output probabilities $y'$ as shown in Eqn. 9, 10. + +$$ +y ^ {\prime} = (1 - \alpha) f (x; \theta) + (\alpha) \hat {f} (x; \hat {\theta}) \tag {9} +$$ + +$$ +w h e r e \quad \alpha = S \left(y _ {\max } - \tau\right) \tag {10} +$$ + +$$ +S (z) = \frac {1}{1 + e ^ {\nu z}} \tag {11} +$$ + +Thus for an ID input, with $y_{max} > \tau$ , we obtain $\alpha < 0.5$ with $y' \rightarrow f(x; \theta)$ as $\alpha \rightarrow 0$ . Similarly, for an OOD input with $y_{max} < \tau$ , we obtain $\alpha > 0.5$ with $y' \rightarrow \hat{f}(x; \hat{\theta})$ as $\alpha \rightarrow 1$ . $\nu$ in Eqn. 11 indicates the growth rate of the sigmoid. We set $\nu = 1000$ for all of our experiments. Thus, an adversary accessing the model with OOD inputs obtains the predictions of $f'$ instead of the true predictions of model $f$ , while inputs from benign users of the service sending ID queries would be serviced by $f$ . This results in the adversary's dataset containing examples which have been mislabeled, leading to a degradation in the accuracy of the clone model trained on this data. + +Security vs Accuracy Trade-off: The OOD detector has a trade-off between true and false positive rates. In general, by lowering the value of the detector threshold $\tau$ , we can increase the number of OOD inputs classified correctly (true positive rate), which improves security as more OOD queries are serviced with misinformation. However, this also results in a higher number of ID inputs misclassified as OOD (false positive rate), leading to a greater number of ID inputs being serviced with misinformation, degrading the accuracy of the defender's model for benign ID examples. By appropriately setting the value of $\tau$ , the defender can pick a trade-off point between security and accuracy that satisfies the accuracy-constraint (Eqn. 3). + +# 5. Experiments + +We perform experiments to evaluate our defense against various model stealing attacks. Additionally, we compare AP against existing defenses and show that our defense offers better protection against model stealing compared to prior art. We describe our experimental setup followed by the results in this section. + +# 5.1. Setup + +Our experimental setup involves a defender who hosts a model $f$ , trained for a specific classification task. The attacker aims to produce the clone model $f'$ , which achieves high classification accuracy on the same classification task. We briefly describe the classification tasks as well as the attacks and defenses that we use in our evaluations. + +Datasets and model architecture: We focus on vision based classification tasks using DNNs in our experiments. Table 1 lists the various datasets and model architectures used to train the defender's model $f$ as well as the test accuracy achieved by the models. As mentioned in section 4.1, we train our model with outlier exposure [7] to improve the performance of OOD detection. For this purpose, we use KMNIST [2] for MNIST and FashionMNIST, ImageNet1k for CIFAR-10, and Indoor67 [18] for Flowers-17 [14] as the outlier datasets. + +Attacks: We evaluate our defense against two representative model stealing attacks: + +
DatasetDNN ArchitectureAccuracy(%)
MNISTLeNet99.4
FashionMNISTLeNet91.47
CIFAR-10ResNet-1893.6
Flowers-17ResNet-1898.2
+ +Table 1. Datasets and model architectures used to train the defender's model + +1. KnockoffNets [15]: This attack uses surrogate data to perform model stealing as described in section 2.2. We use EMNISTLetters/EMNIST/CIFAR-100/ImageNet1k as the surrogate datasets to attack the MNIST/FashionMNIST/CIFAR-10/Flowers-17 models respectively. We assume a query budget of 50000 examples and train all clone models for 50 epochs. +2. Jacobian-Based Dataset Augmentation (JBDA) [9, 17]: This attack constructs a synthetic dataset by iteratively augmenting an initial set of seed examples with perturbed examples constructed using the jacobian of the clone model's loss function. We use a seed dataset of 150 examples with 6 rounds of augmentation to construct the adversary's dataset. Between each augmentation round, the clone model is trained for 10 epochs and $\lambda$ is set to 0.1. + +To improve the efficacy of the attacks, we use the same model architecture as the defender's model to train the clone model. Additionally, for the ResNet-18 models, we initialize the weights using a network pre-trained on the ImageNet dataset. We use a learning rate of 0.1 and 0.001 for LeNet and ResNet-18 models respectively. + +Comparison with existing Defenses: Only a small number of defenses currently exist for model stealing attacks. We compare our defense against two recent perturbation-based defenses: + +1. Deceptive Perturbation (DCP): This is a accuracy-preserving defense that adds deceptive perturbations to the predictions of the model but leaves the top-1 class unchanged[12]. Injecting perturbations removes information about prediction probabilities but preserves information about the argmax prediction of the model. +2. Prediction Poisoning (PP): This is an accuracy-constrained defense that perturbs the predictions of the model with an objective of mistraining the adversary's clone model[16]. Increasing the amount of perturbation allows the defender to trade off the model accuracy for increased security, similar to our defense. + +# 5.2. Results + +Our defense allows the defender to trade off the defender's model accuracy for increased security against model stealing attacks by varying the threshold $\tau$ of the OOD detector as described in section 4.3. We measure security by the accuracy of the clone model trained using model stealing attacks, with a lower clone-model accuracy + +![](images/c8e68b34555ab8092e86496cb340b4d306eb1213f2f812cce69e0b73de57243c.jpg) + +![](images/085e83860052311e4c78fdd9e7d8083d361f20f2d3fb04e13d65408cfc5151e6.jpg) +(a) KnockoffNets + +![](images/6152500ccf088ba0959f75fd63a0751335a6d279b87cdf6d0df18feae8466857.jpg) + +![](images/d15dfeaed1a13ceebb0f3cec9b4824aea9bf0ed61e1c347e77ce171575d02e11.jpg) + +Figure 4. Defender Accuracy vs Clone Accuracy trade-off for defenses evaluated against two attacks: (a) KnockoffNets (b) Jacobian Based Dataset Augmentation. Perturbation based defenses can improve security (lower clone model accuracy) at the expense of reduced defender accuracy. Our proposal Adaptive Misinformation offers a better trade-off compared to existing defenses. E.g. in case of Flowers-17 dataset with KnockoffNets attack, PP achieves a clone accuracy of $63.6\%$ with a defender accuracy of $91.1\%$ . In comparison, AM yields a much lower clone accuracy of $14.3\%$ $(-49.3\%)$ for the same defender accuracy, significantly improving the trade-off compared to PP. +![](images/43d7dff3507559c5d4fe6b0eae431a375bcf93118b85ef0ba321f763566e612b.jpg) +$\star$ Ideal Defense Adaptive Misinformation Prediction Poisoning Deceptive Perturbations X Undefended Adaptive Misinformation-argmax . . . Prediction Poisoning-argmax + +![](images/41126f5bfde44b7e9312da50cd6610573c8894d4702753afe59e5ca4498e8df6.jpg) +(b) JBDA + +![](images/04b3242bd46aebf81b84663e9b310ba09e29d7b53b192172f36e66ddab733276.jpg) + +![](images/0dabd0da613fe5f6c134056c59d25eaf8e4e509bc08387e76dc327d33f9edca0.jpg) + +indicating better security. We plot this trade-off curve of defender's model accuracy vs clone model accuracy evaluated against different attacks and show that our defense offers a better trade-off compared to existing defenses for various classification tasks. We also present an ablation study to understand the contribution of different components of our defense in Appendix A. + +# 5.2.1 KnockoffNets Attack + +Figure 4a shows the trade-off curve of Adaptive Misinformation (AM) evaluated against the KnockoffNets attack. Our results show that AM is able to reduce clone model accuracy significantly, with only a small degradation in defender model accuracy. Additionally, we compare our results with the trade-offs offered by two existing defenses: Prediction Poisoning (PP) and Deceptive Perturbations (DCP). Note that PP allows a variable amount of perturbation to be added, leading to a trade-off curve whereas DCP has a fixed perturbation leading to a single trade-off point. We also plot the trade-off points for an ideal defense and an undefended model for reference. + +Comparison with PP: Our results show that for a given defender accuracy, AM has a lower clone accuracy compared to PP for all datasets, offering a better trade-off between security and accuracy. For instance, AM lowers + +clone accuracy by $49.3\%$ compared to PP with comparable defender accuracy $(91.1\%)$ in the case of the Flowers-17 dataset. We highlight and explain two key differences between the trade-off curves of AM and PP: + +1. For PP, as we increase security (reduce clone model accuracy), the accuracy of the defender's model declines sharply to $0\%$ , while AM retains high defender model accuracy. This is because PP indiscriminately perturbs predictions for all queries. As the amount of perturbation is increased, the top-1 class of $y'$ changes to an incorrect class, leading to a steep drop in the accuracy of benign inputs. AM avoids this problem by using an adaptive mechanism that only modifies the probabilities for OOD queries, allowing ID queries to retain a high classification accuracy. + +2. For PP, even as the defender accuracy falls to $0\%$ , the clone accuracy continues to be high (close to $50\%$ for MNIST and Flowers-17). This is because there is a high correlation between the original predictions $y$ and the perturbed predictions $y'$ . We can quantify the correlations between $y$ and $y'$ by using Hellinger distance. We plot the CDF of Hellinger distance for a LeNet model (trained with MNIST) under KnockoffNets attack in Fig 5, comparing AM and PP for the same defender accuracy $(92\%)$ . We find that the predictions of PP have lower Hellinger distance indicating a higher correlation with the true predictions of the defender's model. Sending correlated predictions allows the + +![](images/ba5ebff5aa8f084e2b8b443f65d2ab6a1cb6393b38ceba38294f961bdd3c1292.jpg) +Figure 5. CDF of Hellinger distance comparing true prediction $y$ and poisoned predictions $y'$ , computed for AM and PP for a LeNet model trained on MNIST under KnockoffNets attack, with comparable defender accuracy. The Hellinger distance is larger for AM compared to PP indicating less correlation between $y'$ and $y$ + +adversary to learn a clone model with higher accuracy. In contrast, AM avoids leaking information about the predictions of the original model $f$ by switching to the predictions of the misinformation model $\hat{f}$ when an OOD input is encountered. Therefore, by using uncorrelated probabilities to service OOD queries, AM can offer better security without severely degrading the defender's model accuracy. + +Comparison with DCP: For the DCP defense, since the top-1 class of the model remains unchanged after adding perturbations, the optimal strategy for the adversary is to use argmax labels from the perturbed predictions to train the clone model. Our results show that DCP only marginally improves security compared to an undefended model. In contrast, our defense is able to lower the clone model accuracy significantly. We also evaluate AM and PP with the attacker using an argmax-label strategy. We find this strategy to be less effective for the attacker, as it results in a lower accuracy compared to using the model's predictions to train the clone-model. + +# 5.2.2 Jacobian Based Dataset Augmentation Attack + +Figure 4b shows the trade-off curve for the JBDA attack. We find that this attack produces clones with lower accuracies compared to the KnockoffNets attack. The results for the PP defense show that the defender accuracy quickly drops to $0\%$ , even as the clone accuracy remains high, similar to the KnockoffNets attack. Our defense does not suffer from this problem and offers a better trade-off compared to PP. Additionally, we find that using the argmax labels offers a better clone model accuracy for this attack depending on the trade-off point. In this case, AM has a comparable or slightly better trade-off curve compared to PP. As before, the security offered by the DCP defense is marginally better than the undefended case, provided the attacker uses argmax labels to train the clone model. + +# 6. Discussions on Adaptive Attacks + +In this section, we discuss adaptive attacks against AM and provide simple solutions that can prevent such attacks. + +Can the defense be treated as part of the black box to perform model stealing attack? : In order to train a high accuracy clone model with a limited query budget, the adversary needs to maximize the number of inputs that get serviced by $f$ . Since our defense returns the predictions of $f$ only for in-distribution inputs, just a small fraction of the adversary's queries (which are misclassified as in-distribution by the OOD detector) get serviced by $f$ . In the absence of a way to reliably generate in-distribution inputs, the adversary would require a much larger query budget compared to other defenses to reach the desired level of clone accuracy. Furthermore, this would expose the adversary to other detection mechanisms. E.g. a user sending a large fraction of OOD examples can be blacklisted. + +Can the adversary distinguish when the inputs are being serviced by $f$ vs $\hat{f}$ ?: For an input to be serviced by $f$ , it has to be classified as an ID example producing high MSP on $f$ . Thus, the adversary can potentially use the confidence of the top-1 class as an indication of when the input is serviced by $f$ and only use these inputs to train the clone model. While this can improve the accuracy of the clone model, the adversary would still need a much larger query budget since only a small fraction of the adversary's queries are serviced by $f$ . Additionally, we can easily prevent such detection by smoothing the posterior probabilities of $f$ or sharpening the probabilities of $\hat{f}$ to make the distribution of MSP identical between the outputs of $f$ and $\hat{f}$ . + +# 7. Conclusion + +We propose Adaptive Misinformation to defend against black-box model stealing attacks in the data-limited setting. We identify that existing model stealing attacks invariably use out of distribution data to query the target model. Our defense exploits this observation by identifying out of distribution inputs and selectively servicing such inputs with incorrect predictions (misinformation). Our evaluations against existing attacks show that AM degrades clone model accuracy by up to $40\%$ with a minimal impact on the defender accuracy $(< 0.5\%)$ . In addition, our defense has lower computational overhead $(< 2\times)$ and significantly better security vs accuracy trade-off (up to $49.3\%$ reduction in clone accuracy) compared to existing defenses. + +# 8. Acknowledgements + +We thank our colleagues from the Memory Systems Lab and anonymous reviewers at CVPR internal review at Georgia Tech for their feedback. We also thank NVIDIA for the donation of the Titan V GPU used for this research. + +# References + +[1] Steven Chen, Nicholas Carlini, and David A. Wagner. Stateful detection of black-box adversarial attacks. CoRR, abs/1907.05587, 2019. 3 +[2] Tarin Clanuwat, Mikel Bober-Irizar, Asanobu Kitamoto, Alex Lamb, Kazuaki Yamamoto, and David Ha. Deep Learning for Classical Japanese Literature. arXiv e-prints, page arXiv:1812.01718, Dec 2018. 6 +[3] Akshay Raj Dhamija, Manuel Günther, and Terrance E. Boult. Reducing network agnostophobia. CoRR, abs/1811.04110, 2018. 5 +[4] Matt Fredrikson, Somesh Jha, and Thomas Ristenpart. Model inversion attacks that exploit confidence information and basic countermeasures. In Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security, pages 1322-1333. ACM, 2015. 1 +[5] Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations, 2015. 1 +[6] Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribution examples in neural networks. CoRR, abs/1610.02136, 2016. 2, 5 +[7] Dan Hendrycks, Mantas Mazeika, and Thomas G. Dietterich. Deep anomaly detection with outlier exposure. CoRR, abs/1812.04606, 2018. 5, 6, 10 +[8] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the Knowledge in a Neural Network. arXiv e-prints, page arXiv:1503.02531, Mar 2015. 3 +[9] Mika Juuti, Sebastian Szyller, Alexey Dmitrenko, Samuel Marchal, and N. Asokan. PRADA: protecting against DNN model stealing attacks. CoRR, abs/1805.02628, 2018. 1, 3, 6 +[10] Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and Scalable Predictive Uncertainty Estimation using Deep Ensembles. arXiv e-prints, page arXiv:1612.01474, Dec 2016. 5 +[11] Kimin Lee, Honglak Lee, Kibok Lee, and Jinwoo Shin. Training Confidence-calibrated Classifiers for Detecting Out-of-Distribution Samples. arXiv e-prints, page arXiv:1711.09325, Nov 2017. 5 +[12] Taesung Lee, Benjamin Edwards, Ian Molloy, and Dong Su. Defending against model stealing attacks using deceptive perturbations. CoRR, abs/1806.00054, 2018. 2, 4, 6 +[13] Shiyu Liang, Yixuan Li, and R. Srikant. Principled detection of out-of-distribution examples in neural networks. CoRR, abs/1706.02690, 2017. 5 +[14] M-E Nilsback and Andrew Zisserman. A visual vocabulary for flower classification. In 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06), volume 2, pages 1447-1454. IEEE, 2006. 6 +[15] Tribhuvanesh Orekondy, Bernt Schiele, and Mario Fritz. Knockoff nets: Stealing functionality of black-box models. CoRR, abs/1812.02766, 2018. 1, 2, 3, 6 +[16] Tribhuvanesh Orekondy, Bernt Schiele, and Mario Fritz. Prediction poisoning: Utility-constrained defenses against model stealing attacks. CoRR, abs/1906.10908, 2019. 2, 4, 6 + +[17] Nicolas Papernot, Patrick D. McDaniel, Ian J. Goodfellow, Somesh Jha, Z. Berkay Celik, and Ananthram Swami. Practical black-box attacks against deep learning systems using adversarial examples. CoRR, abs/1602.02697, 2016. 1, 2, 3, 6 +[18] A. Quattoni and A. Torralba. Recognizing indoor scenes. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 413-420, June 2009. 6 +[19] Reza Shokri, Marco Stronati, and Vitaly Shmatikov. Membership inference attacks against machine learning models. CoRR, abs/1610.05820, 2016. 1 +[20] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian J. Goodfellow, and Rob Fergus. Intriguing properties of neural networks. CoRR, abs/1312.6199, 2013. 1 +[21] Florian Tramér, Fan Zhang, Ari Juels, Michael K. Reiter, and Thomas Ristenpart. Stealing machine learning models via prediction apis. CoRR, abs/1609.02943, 2016. 2, 3, 4 +[22] Florian Tramér, Nicolas Papernot, Ian Goodfellow, Dan Boneh, and Patrick McDaniel. The space of transferable adversarial examples. arXiv, 2017. 1 +[23] Apoorv Vyas, Nataraj Jammalamadaka, Xia Zhu, Dipankar Das, Bharat Kaul, and Theodore L. Willke. Out-of-distribution detection using an ensemble of self supervised leave-out classifiers. CoRR, abs/1809.03576, 2018. 5 \ No newline at end of file diff --git a/defendingagainstmodelstealingattackswithadaptivemisinformation/images.zip b/defendingagainstmodelstealingattackswithadaptivemisinformation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..43e38457eca6a87d1e8dfe491b4cc81dce1eb57a --- /dev/null +++ b/defendingagainstmodelstealingattackswithadaptivemisinformation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0eb911a416b3df0fd3e9ef76676c7a5a66401c32007b0ffe5abf4af56147f820 +size 252961 diff --git a/defendingagainstmodelstealingattackswithadaptivemisinformation/layout.json b/defendingagainstmodelstealingattackswithadaptivemisinformation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2f0bdfeede9ceb7d694569c99bf611d752240c96 --- /dev/null +++ b/defendingagainstmodelstealingattackswithadaptivemisinformation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fdde4bede2772bf93277a4c5a8cffeddf5962af060b05853d1240ae4a66cf064 +size 404663 diff --git a/defendingagainstuniversalattacksthroughselectivefeatureregeneration/57dc8cb4-70fb-4a99-87b9-0d3851593dad_content_list.json b/defendingagainstuniversalattacksthroughselectivefeatureregeneration/57dc8cb4-70fb-4a99-87b9-0d3851593dad_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..56f600615b9710643fefc8eff65196bbab59809a --- /dev/null +++ b/defendingagainstuniversalattacksthroughselectivefeatureregeneration/57dc8cb4-70fb-4a99-87b9-0d3851593dad_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fea045d21cf68211796b02cfeb61cef479133ff3167c44a1fa8bc69380b7c1fb +size 86636 diff --git a/defendingagainstuniversalattacksthroughselectivefeatureregeneration/57dc8cb4-70fb-4a99-87b9-0d3851593dad_model.json b/defendingagainstuniversalattacksthroughselectivefeatureregeneration/57dc8cb4-70fb-4a99-87b9-0d3851593dad_model.json new file mode 100644 index 0000000000000000000000000000000000000000..d4ec4cbfbf71f319f0e7f12b58c9e27269fb6449 --- /dev/null +++ b/defendingagainstuniversalattacksthroughselectivefeatureregeneration/57dc8cb4-70fb-4a99-87b9-0d3851593dad_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e9944ae417f6aa71b2c5fa8182b53d323acba23789cab9699cf10ac5b495e18 +size 112132 diff --git a/defendingagainstuniversalattacksthroughselectivefeatureregeneration/57dc8cb4-70fb-4a99-87b9-0d3851593dad_origin.pdf b/defendingagainstuniversalattacksthroughselectivefeatureregeneration/57dc8cb4-70fb-4a99-87b9-0d3851593dad_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d58579b0274d8211998f2c55278c109ae056a162 --- /dev/null +++ b/defendingagainstuniversalattacksthroughselectivefeatureregeneration/57dc8cb4-70fb-4a99-87b9-0d3851593dad_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68cd2731781fc58100e1158126511f86664620f52eb81afe9ebdd41a4664e45e +size 1889156 diff --git a/defendingagainstuniversalattacksthroughselectivefeatureregeneration/full.md b/defendingagainstuniversalattacksthroughselectivefeatureregeneration/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f751899294b674634f37508698ceb67e77ee42ed --- /dev/null +++ b/defendingagainstuniversalattacksthroughselectivefeatureregeneration/full.md @@ -0,0 +1,349 @@ +# Defending Against Universal Attacks Through Selective Feature Regeneration + +Tejas Borkar1 + +Felix Heide2,3 + +Lina Karam1,4 + +$^{1}$ Arizona State University $^{2}$ Princeton University $^{3}$ Algolux $^{4}$ Lebanese American University + +{tsborkar,karam}@asu.edu fheide@princeton.edu + +# Abstract + +Deep neural network (DNN) predictions have been shown to be vulnerable to carefully crafted adversarial perturbations. Specifically, image-agnostic (universal adversarial) perturbations added to any image can fool a target network into making erroneous predictions. Departing from existing defense strategies that work mostly in the image domain, we present a novel defense which operates in the DNN feature domain and effectively defends against such universal perturbations. Our approach identifies pre-trained convolutional features that are most vulnerable to adversarial noise and deploys trainable feature regeneration units which transform these DNN filter activations into resilient features that are robust to universal perturbations. Regenerating only the top $50\%$ adversarially susceptible activations in at most 6 DNN layers and leaving all remaining DNN activations unchanged, we outperform existing defense strategies across different network architectures by more than $10\%$ in restored accuracy. We show that without any additional modification, our defense trained on ImageNet with one type of universal attack examples effectively defends against other types of unseen universal attacks. + +# 1. Introduction + +Despite the continued success and widespread use of DNNs in computer vision tasks [25, 59, 62, 18, 55, 54, 58, 68], these networks make erroneous predictions when a small magnitude, carefully crafted perturbation (adversarial noise) almost visually imperceptible to humans is added to an input image [63, 15, 35, 6, 24, 41, 48, 26, 49]. Furthermore, such perturbations have been successfully placed in a real-world scene via physical adversarial objects [3, 12, 26], thus posing a security risk. + +Most existing adversarial attacks use target network gradients to construct an image-dependent adversarial example [63, 15, 26, 41, 49, 6] that has limited transferability to other networks or images [63, 32, 47]. Other methods to generate image-dependent adversarial samples include accessing only the network predictions [20, 46, 61], us + +![](images/45471a39f8e77830348330ccae1185b95f7d166cc92bfdce0d1fd352ca1861ca.jpg) +UAP + +![](images/28afdcbc22fd8c6d2cd9353c00ca5429e60cc6279d61c2ea36fe485bac905c4f.jpg) +NAG + +![](images/30b8fdf361aa7ce43a7d68d7b83a42c33393b75ba62ff28378c9993656f689ab.jpg) +GAP + +![](images/e404b8202a69b80290ed0eb7317e9fef23135f10e1be066abdae27eeb36e4db7.jpg) +SPGD + +![](images/ebca36771c4c548160b9b54dcc196051fb25ceeb55a5fac9a422c42c3ee036e2.jpg) +PRN: trifle $15\%$ Ours: ice cream + +![](images/bd054d3a40167ad1daf8fb138edefcff9e0e2c4292a9d2ce5440ca6d84a60688.jpg) +PD: croquet ball $77\%$ +Ours: ice cream $83\%$ + +![](images/2651ae074e72dd59f731c21ccee4e9a4333964be74958b8d3189e6a1bc787771.jpg) +HGD: mixing bowl $30\%$ Ours: ice cream $66\%$ +Figure 1. Effectiveness of proposed defense against various universal perturbations: row 1 shows an image (class label: "ice cream") perturbed by different universal attacks (UAP [38], NAG [44], GAP [51] and sPGD [45]) and the second row shows the variability across different universal perturbations. Row 3 shows predictions and confidence score for the proposed defense and the next best defense (PRN [1], PD [52], FD [66] and HGD [31]). Our method effectively defends against each universal attack by correctly classifying (green) the image with high confidence while all the other defenses misclassify it (red). + +![](images/2445ea42075de44e2fd3f4e61c099e017295e3eeb9d99661613aedc6b1594dfa.jpg) +FD: croquet ball $10\%$ Ours: ice cream $41\%$ + +ing surrogate networks [48] and gradient approximation [2]. Although there is significant prior work on adversarial defenses such as adversarial training [63, 15, 35, 66], ensemble training [64], randomized image transformations and denoising [16, 52, 10, 40, 52, 60, 10, 33, 31] and adversarial sample rejection [29, 34, 67, 36, 37], a DNN is still vulnerable to adversarial perturbations added to a non-negligible portion of the input [2, 65]. These defenses mostly focus on making a DNN robust to image-dependent adversarial perturbations which are less likely to be encountered in realistic vision applications [1, 45]. + +Our proposed work focuses on defending against universal adversarial attacks. Unlike the aforementioned image-dependent adversarial attacks, universal adversarial attacks [38, 44, 43, 51, 23, 45, 53, 42, 30] construct a single image-agnostic perturbation that when added to any unseen image fools DNNs into making erroneous predictions with very high confidence. These universal perturbations are also not unique and many adversarial directions may exist in a + +DNN's feature space (Figure 1, row 2) [39, 14, 13]. Furthermore, universal perturbations generated for one DNN can transfer to other DNNs, making them doubly universal [38]. Such image-agnostic perturbations pose a strong realistic threat model [45] for many vision applications as perturbations can easily be pre-computed and then inserted in real-time (in the form of a printed adversarial patch or sticker) into any scene [28, 5]. For example, while performing semantic segmentation, such image-agnostic perturbations can completely hide a target class (i.e., pedestrian) in the resulting segmented scene output and adversely affect the braking action of an autonomous car [19]. + +This work proposes a novel defense against a universal adversarial threat model [38, 43, 44, 51, 23, 45] through the following contributions: + +- We show the existence of a set of vulnerable convolutional filters, that are largely responsible for erroneous predictions made by a DNN in an adversarial setting and the $\ell_1$ -norm of the convolutional filter weights can be used to identify such filters. +- Unlike, existing image-domain defenses, our proposed DNN feature space-based defense uses trainable feature regeneration units, which regenerate activations of the aforementioned vulnerable convolutional filters into resilient features (adversarial noise masking). +- A fast method is proposed to generate strong synthetic adversarial perturbations for training. +- We extensively evaluate the proposed defense on a variety of DNN architectures and show that our proposed defense outperforms all other existing defenses [1, 52, 66, 31, 35, 45] (Figure 1). +- Without any additional attack-specific training, our defense trained on one type of universal attack [38] effectively defends against other different unseen universal attacks [44, 43, 51, 45, 23, 42] (Figure 1) and we are the first to show such broad generalization across different universal attacks. + +# 2. Related Work + +Adversarial training (Adv. tr.) [63, 15, 35] has been shown to improve DNN robustness to image-dependent adversarial attacks through augmentation, in the training stage, with adversarial attack examples, which are computed on-the-fly for each mini-batch using gradient-ascent to maximize the DNN's loss. The robustness of adversarial training to black-box attacks can be improved by using perturbations computed against different target DNNs that are chosen from an ensemble of DNNs [64]. Kannan et al. [22] scale adversarial training to ImageNet [9] by encouraging the adversarial loss to match logits for pairs of adversarial and perturbation-free images (logit pairing) + +but this latter method fails against stronger iterative attacks [11]. In addition to adversarily training the baseline DNN, prior works ([66], [27]) further improved DNN robustness to image-dependent attacks by denoising intermediate DNN feature maps, either through a non-local mean denoiser (feature denoising [66]) or a denoising autoencoder (fortified nets [27]). Although Xie et al. report effective robustness against a strong PGD attack [35] evaluated on ImageNet [9], the additional non-local mean denoisers only add a $4\%$ improvement over a DNN trained using standard adversarial training. Compared to feature denoising (FD) [66], the proposed feature regeneration approach has the following differences: (1) our feature regeneration units are not restricted to only perform denoising, but consists of stacks of trainable convolutional layers that provide our defense the flexibility to learn an appropriate feature-restoration transform that effectively defends against universal attacks, unlike the non-local mean denoiser used in FD; (2) in a selected DNN layer, only a subset of feature maps which are the most susceptible to adversarial noise (identified by our ranking metric) are regenerated leaving all other feature maps unchanged, whereas FD denoises all feature maps, which can result in over-correction or introduce unwanted artifacts in feature maps that admit very low magnitude noise; (3) instead of adversarily training all the parameters of the baseline DNN as in FD, we only train the parameters in the feature renegeration units (up to $90\%$ less parameters than a baseline DNN) and leave all parameters in the baseline DNN unchanged, which can speed up training and reduce the risk of over-fitting. + +Image-domain defenses mitigate the impact of adversarial perturbations by utilizing non-differentiable transformations of the input such as image compression [10, 8, 33], frequency domain denoising [60] and image quilting and reconstruction [16, 40] etc. However, such approaches introduce unnecessary artifacts in clean images resulting in accuracy loss [1][52]. Prakash et al. [52] propose a two-step defense that first performs random local pixel redistribution, followed by a wavelet denoising. Liao et al. [31] append a denoising autoencoder at the input of the baseline DNN and train it using a reconstruction loss that minimizes the error between higher layer representations of the DNN for an input pair of clean and denoised adversarial images (high level guided denoiser). Another popular line of defenses explores the idea of first detecting an adversarily perturbed input and then either abstaining from making a prediction or further pre-processing adversarial input for reliable predictions [29, 34, 67, 36, 37]. + +All of the aforementioned defenses are geared towards image-specific gradient-based attacks and none of them has, as of yet, been shown to defend against image-agnostic attacks. Initial attempts at improving robustness to universal attacks involved modelling the distribution of such pertur + +bations [38, 17, 50], followed by model fine-tuning over this distribution of universal perturbations. However, the robustness offered by these methods has been unsatisfactory [45, 38] as the retrained network ends up overfitting to the small set of perturbations used. Extending adversarial training for image-dependent attacks to universal attacks has been attempted in [45] and [57]. Ruan and Dai [56] use additional shadow classifiers to identify and reject images perturbed by universal perturbations. Akhtar et al. [1] propose a defense against the universal adversarial perturbations attack (UAP) [38], using a detector which identifies adversarial images and then denoises them using a learnable Perturbation Rectifying Network (PRN). + +# 3. Universal threat model + +Let $\mu_c$ represent the distribution of clean (unperturbed) images in $\mathbb{R}^d$ , $\mathcal{F}(\cdot)$ be a classifier that predicts a class label $\mathcal{F}(x)$ for an image $x \in \mathbb{R}^d$ . The universal adversarial perturbation attack seeks a perturbation vector $v \in \mathbb{R}^d$ under the following constraints [38]: + +$$ +\underset {x \sim \mu_ {c}} {P} \left(\mathcal {F} (x + v) \neq \mathcal {F} (x)\right) \geq (1 - \delta) \text {s . t .} \| v \| _ {p} \leq \xi \tag {1} +$$ + +where $P(\cdot)$ denotes probability, $\| \cdot \|_p$ is the $\ell_p$ -norm with $p \in [1, \infty)$ , $(1 - \delta)$ is the target fooling ratio with $\delta \in [0, 1)$ (i.e., the fraction of samples in $\mu_c$ that change labels when perturbed by an adversary), and $\xi$ controls the magnitude of adversarial perturbations. + +# 4. Feature-Domain Adversarial Defense + +# 4.1. Stability of Convolutional Filters + +In this work, we assess the vulnerability of individual convolutional filters and show that, for each layer, certain filter activations are significantly more disrupted than others, especially in the early layers of a DNN. + +For a given layer, let $\phi_m(u)$ be the output (activation map) of the $m^{\mathrm{th}}$ convolutional filter with kernel weights $W_{m}$ for an input $u$ . Let $e_m = \phi_m(u + r) - \phi_m(u)$ be the additive noise (perturbation) that is caused in the output activation map $\phi_m(u)$ as a result of applying an additive perturbation $r$ to the input $u$ . It can be shown (refer to Supplementary Material) that $e_m$ is bounded as follows: + +$$ +\left\| e _ {m} \right\| _ {\infty} \leq \left\| W _ {m} \right\| _ {1} \| r \| _ {p} \tag {2} +$$ + +where as before $\| \cdot \| _p$ is the $\ell_p$ -norm with $p\in [1,\infty)$ . Equation 2 shows that the $\ell_1$ -norm of the filter weights can be used to identify and rank convolutional filter activations in terms of their ability to restrict perturbation in their activation maps. For example, filters with a small weight $\ell_1$ -norm would result in insignificant small perturbations in their output when their input is perturbed, and are thus considered to be less vulnerable to perturbations in the input. For an + +![](images/9c172e4589211668274770fb836adec2835899022bfb73f07aa2b6943dbd8b7f.jpg) +(a) + +![](images/2fc89af1db177a985be0e0cbed52fb57526d232952c09589926143e34a51190c.jpg) +(b) + +![](images/0f283f6f61a9d30a305849e2682678f9347394837b710bdf267ee040568a71f8.jpg) +Figure 2. Observed $\ell_{\infty}$ -norm for universal adversarial noise in the activation maps of ranked convolutional filters (ordered using our $\ell_{1}$ -norm ranking measure, from most to least vulnerable) of the first layer of CaffeNet [25] and GoogLeNet [62]. The $\ell_{\infty}$ -norm attack is used with $\xi \leq 10$ , i.e. $\| \mathbf{r} \|_{\infty} \leq 10$ . (a) Adversarial noise upper-bound (Equation 2) in ranked conv-1 filter activations of DNNs. (b) Observed $\ell_{\infty}$ -norm for adversarial noise in ranked conv-1 filter activations of DNNs. +Figure 3. Effect of masking $\ell_{\infty}$ -norm universal adversarial noise in ranked convolutional filter activations of the first layer in CaffeNet [25], GoogLeNet [62] and VGG-16 [59], evaluated on a 1000-image subset of the ImageNet [9] training set. Top-1 accuracies for perturbation-free images are 0.58, 0.70 and 0.69 for CaffeNet, GoogLeNet and VGG-16, respectively. Similarly, top-1 accuracies for adversarially perturbed images with no noise masking are 0.1, 0.25 and 0.25 for CaffeNet, GoogLeNet and VGG-16, respectively. Masking the noise in just $50\%$ of the ranked filter activations restores most of the lost accuracy for all three DNNs. + +$\ell_{\infty}$ -norm universal adversarial input, Figure 2a shows the upper-bound on the adversarial noise in ranked (using the proposed $\ell_1$ -norm ranking) conv-1 filter activations of CaffeNet [25] and GoogLeNet [62], while Figure 2b shows the corresponding observed $\ell_{\infty}$ -norm for adversarial noise in the respective DNN filter activations. We can see that our $\| W\| _1$ -based ranking correlates well with the degree of perturbation (maximum magnitude of the noise perturbation) that is induced in the filter outputs. Similar observations can be made for other convolutional layers in the network. + +In Figure 3, we evaluate the impact of masking the ad + +![](images/1c148de965bd06f340badd4e17740bdf17a161a01d5f0e138ce49937518a0720.jpg) +Figure 4. Resilient Feature Regeneration Defense: Convolutional filter activations in the baseline DNN (top) are first sorted in order of vulnerability to adversarial noise using their respective filter weight norms (Section 4.1). For each considered layer, we use a feature regeneration unit, consisting of a residual block with a single skip connection (4 layers), to regenerate only the most adversarially susceptible activations into resilient features that restore the lost accuracy of the baseline DNN, while leaving the remaining filter activations unchanged. We train these units on both clean and perturbed images in every mini-batch using the same target loss as the baseline DNN such that all parameters of the baseline DNN are left unchanged during training. + +versarial noise in such ranked filters on the overall top-1 accuracy of CaffeNet [25], VGG-16 [59] and GoogLeNet [62]. Specifically, we randomly choose a subset of 1000 images (1 image per class) from the ImageNet [9] training set and generate adversially perturbed images by adding an $\ell_{\infty}$ -norm universal adversarial perturbation [38]. The top-1 accuracies for perturbation-free images are 0.58, 0.70 and 0.69 for CaffeNet, GoogLeNet and VGG-16, respectively. Similarly, the top-1 accuracies for adversially perturbed images of the same subset are 0.10, 0.25 and 0.25 for CaffeNet, GoogLeNet and VGG-16, respectively. Masking the adversarial perturbations in $50\%$ of the most vulnerable filter activations significantly improves DNN performance, resulting in top-1 accuracies of 0.56, 0.68 and 0.67 for CaffeNet, GoogLeNet and VGG-16, respectively, and validates our proposed selective feature regeneration scheme. See Figure 1 in Supplementary Material for similar experiments for higher layers. + +# 4.2. Resilient Feature Regeneration Defense + +Our proposed defense is illustrated in Figure 4. We learn a task-driven feature restoration transform (i.e., feature regeneration unit) for convolutional filter activations severely disrupted by adversarial input. Our feature regeneration unit does not modify the remaining activations of the baseline DNN. A similar approach of learning corrective transforms for making networks more resilient to image blur and additive white Gaussian noise has been explored in [4]. + +Let $S_{l}$ represent a set consisting of indices for convo + +lutional filters in the $l^{th}$ layer of a DNN. Furthermore, let $S_{l_{reg}}$ be the set of indices for filters we wish to regenerate (Section 4.1) and let $S_{l_{adv}}$ be the set of indices for filters whose activations are not regenerated (i.e., $S_{l} = S_{l_{reg}} \cup S_{l_{adv}}$ ). If $\Phi_{S_{l_{reg}}}$ represents the convolutional filter outputs to be regenerated in the $l^{th}$ layer, then our feature regeneration unit in layer $l$ performs a feature regeneration transform $\mathcal{D}_l(\cdot)$ under the following conditions: + +$$ +\mathscr {D} _ {l} \left(\Phi_ {S _ {l _ {r e g}}} (u + r)\right) \approx \Phi_ {S _ {l _ {r e g}}} (u) \tag {3} +$$ + +and + +$$ +\mathcal {D} _ {l} \left(\Phi_ {S _ {l _ {r e g}}} (u)\right) \approx \Phi_ {S _ {l _ {r e g}}} (u) \tag {4} +$$ + +where $u$ is the unperturbed input to the $l^{th}$ layer of convolutional filters and $r$ is an additive perturbation that acts on $u$ . In Equations 3 and 4, $\approx$ denotes similarity based on classification accuracy in the sense that features are restored to regain the classification accuracy of the original perturbation-free activation map. Equation 3 forces $\mathcal{D}_l(\cdot)$ to pursue task-driven feature regeneration that restores lost accuracy of the DNN while Equation 4 ensures that prediction accuracy on unperturbed activations is not decreased, without any additional adversarial perturbation detector. We implement $\mathcal{D}_l(\cdot)$ (i.e., feature regeneration unit) as a shallow residual block [18], consisting of two stacked $3 \times 3$ convolutional layers sandwiched between a couple of $1 \times 1$ convolutional layers and a single skip connection. $\mathcal{D}_l(\cdot)$ is estimated using a target loss from the baseline network, through backpropagation, see Figure 4, but with significantly fewer trainable parameters compared to the baseline network. + +![](images/ab9cb24545cbcf9332713df883a8a7b465fe0ce33fcd8207da6cdaff86c94caa.jpg) +Figure 5. Effectiveness of feature regeneration units at masking adversarial perturbations in DNN feature maps for images perturbed by universal perturbations (UAP [38], NAG [44], GAP [51] and sPGD [45]). Perturbation-free feature map (clean), different adversially perturbed feature maps (Row 1) and corresponding feature maps regenerated by feature regeneration units (Row 2) are obtained for a single filter channel in conv1_1 layer of VGG-16 [59], along with an enlarged view of a small region in the feature map (yellow box). Feature regeneration units are only trained on UAP [38] attack examples but are very effective at suppressing adversarial artifacts generated by unseen attacks (e.g., NAG [44], GAP [51] and sPGD [45]). + +Given an $L$ layered DNN $\Phi$ , pre-trained for an image classification task, $\Phi$ can be represented as a function that maps network input $x$ to an $N$ -dimensional output label vector $\Phi(x)$ as follows: + +$$ +\Phi = \Phi_ {L} \circ \Phi_ {L - 1} \circ \dots \Phi_ {2} \circ \Phi_ {1} \tag {5} +$$ + +where $\Phi_l$ is a mapping function (set of convolutional filters, typically followed by a non-linearity) representing the $l^{th}$ DNN layer and $N$ is the dimensionality of the DNN's output (i.e., number of classes). Without any loss of generality, the resulting DNN after deploying a feature regeneration unit that operates on the set of filters represented by $S_{l_{reg}}$ in layer $l$ is given by: + +$$ +\Phi_ {r e g} = \Phi_ {L} \circ \Phi_ {L - 1} \circ \dots \Phi_ {l _ {r e g}} \dots \Phi_ {2} \circ \Phi_ {1} \tag {6} +$$ + +where $\Phi_{l_{reg}}$ represents the new mapping function for layer $l$ , such that $\mathcal{D}_l(\cdot)$ regenerates only activations of the filter subset $\Phi_{S_{l_{reg}}}$ and all the remaining filter activations (i.e., $\Phi_{S_{l_{adv}}}$ ) are left unchanged. If $\mathcal{D}_l(\cdot)$ is parameterized by $\theta_l$ , then the feature regeneration unit can be trained by minimizing: + +$$ +\mathcal {J} (\theta_ {l}) = \frac {1}{K} \sum_ {k = 1} ^ {K} \mathcal {L} \left(y _ {k}, \Phi_ {r e g} \left(x _ {k}\right)\right) \tag {7} +$$ + +where $\mathcal{L}$ is the same target loss function of the baseline DNN (e.g., cross-entropy classification loss), $y_{k}$ is the target output label for the $k^{th}$ input image $x_{k}$ , $K$ represents the total number of images in the training set consisting of both clean and perturbed images. As we use both clean and perturbed images during training, $x_{k}$ in Equation 7, represents a clean or an adversarially perturbed image. + +In Figure 5, we visualize DNN feature maps perturbed by various universal perturbations and the corresponding feature maps regenerated by our feature regeneration units, + +which are only trained on UAP [38] attack examples. Compared to the perturbation-free feature map (clean), corresponding feature maps for adversarially perturbed images (Row 1) have distinctly visible artifacts that reflect the universal perturbation pattern in major parts of the image. In comparison, feature maps regenerated by our feature regeneration units (Row 2) effectively suppress these adversarial perturbations, preserve the object discriminative attributes of the clean feature map and are also robust to unseen attacks (e.g., NAG [44], GAP [51] and sPGD [45]), as illustrated in Figure 5 and Table 5. + +# 4.3. Generating Synthetic Perturbations + +Training-based approaches are susceptible to data overfitting, especially when the training data is scarce or does not have adequate diversity. Generating a diverse set of adversarial perturbations $(\geq 100)$ using existing attack algorithms (e.g., [38, 44, 51, 45]), in order to avoid overfitting, can be computationally prohibitive. We propose a fast method (Algorithm 1) to construct synthetic universal adversarial perturbations from a small set of adversarial perturbations, $V \subseteq \mathbb{R}^d$ , that is computed using any existing universal attack generation method ([38, 44, 51, 45]). Starting with the synthetic perturbation $v_{syn}$ set to zero, we iteratively select a random perturbation $v_{new} \in V$ and a random scale factor $\alpha \in [0,1]$ and update $v_{syn}$ as follows: + +$$ +v _ {s y n} (t) = \alpha v _ {n e w} + (1 - \alpha) v _ {s y n} (t - 1) \tag {8} +$$ + +where $t$ is the iteration number. This process is repeated until the $\ell_2$ -norm of $v_{syn}$ exceeds a threshold $\eta$ . We set the threshold $\eta$ to be the minimum $\ell_2$ -norm of perturbations in the set $V$ . + +Unlike the approach of Akhtar et al. [1], which uses an iterative random walk along pre-computed adversarial directions, the proposed algorithm has two distinct advantages: + +# Algorithm 1 Generating Synthetic Adversarial Perturbation + +Input: Set of pre-computed perturbations $V \subseteq \mathbb{R}^d$ such that $v_i \in V$ is the $i^{th}$ perturbation; threshold $\eta$ + +Output: Synthetic perturbation $v_{syn} \in \mathbb{R}^d$ + +1: $v_{syn} = 0$ +2: while $\| \mathbf{v}_{syn}\| _2\leq \eta$ do +3: $\alpha \sim \mathrm{uniform}(0,1)$ +4: $v_{\text{new}} \overset{\text{rand}}{\sim} V$ +5: $v_{syn} = \alpha v_{new} + (1 - \alpha)v_{syn}$ +6: end while +7: return $v_{syn}$ + +1) the same algorithm can be used for different types of attack norms without any modification, and 2) Equation 8 (Step 5 in Algorithm 1) automatically ensures that the $\ell_{\infty}$ -norm of the perturbation does not violate the constraint for an $\ell_{\infty}$ -norm attack (i.e., $\ell_{\infty}$ -norm $\leq \xi$ ) and, therefore, no additional steps, like computing a separate perturbation unit vector and ensuring that the resultant perturbation strength is less than $\xi$ , are needed. + +# 5. Assessment + +We use the ImageNet validation set (ILSVRC2012) [9] with all 50000 images and a single crop evaluation (unless specified otherwise) in our experiments. All our experiments are implemented using Caffe [21] and for each tested attack we use publicly provided code. We report our results in terms of top-1 accuracy and the restoration accuracy proposed by Akhtar et al. [1]. Given a set $I_{c}$ containing clean images and a set $I_{p/c}$ containing clean and perturbed images in equal numbers, the restoration accuracy is given by: + +$$ +\text {R e s t o r a t i o n} = \frac {\operatorname {a c c} \left(I _ {p / c}\right)}{\operatorname {a c c} \left(I _ {c}\right)} \tag {9} +$$ + +where $\mathrm{acc}(\cdot)$ is the top-1 accuracy. We use the universal adversarial perturbation (UAP) attack [38] for evaluation (unless specified otherwise) and compute 5 independent universal adversarial test perturbations per network using a set of 10000 held out images randomly chosen from the ImageNet training set with the fooling ratio for each perturbation lower-bounded to 0.8 on the held out images and the maximum normalized inner product between any two perturbations for the same DNN upper-bounded to 0.15. + +# 5.1. Defense Training Methodology + +In our proposed defense (Figure 4), only the parameters for feature regeneration units have to be trained and these parameters are updated to minimize the cost function given by Equation 7. Although we expect the prediction performance of defended models to improve with higher regeneration ratios (i.e., fraction of convolutional filter activations regenerated), we only regenerate $50\%$ of the convolutional filter activations in a layer and limit the number of deployed feature regeneration units (1 per layer) as + +min(#DNN layers, 6) $^1$ . Using Algorithm 1, we generate 2000 synthetic perturbations from a set $V$ of 25 original perturbations [38] and train feature regeneration units on a single Nvidia Titan-X using a standard SGD optimizer, momentum of 0.9 and a weight decay of 0.0005 for 4 epochs of the ImageNet training set [9]. The learning rate is dropped by a factor of 10 after each epoch with an initial learning rate of 0.1. After a defense model has been trained as outlined above, we can further iterate through the training of our defense with additional adversarial perturbations computed against our defense, which ensures robustness to secondary attacks against our defense (Section 5.2.5). + +# 5.2. Analysis and Comparisons + +# 5.2.1 Robustness across DNN Architectures + +Top-1 accuracy of adversarially perturbed test images for various DNNs (no defense) and our proposed defense for respective DNNs is reported in Table 1 under both white-box (same network used to generate and test attack) and black-box (tested network is different from network used to generate attack) settings. As universal adversarial perturbations can be doubly universal, under a black-box setting, we evaluate a target DNN defense (defense is trained for attacks on target DNN) against a perturbation generated for a different network. Top-1 accuracy for baseline DNNs is severely affected by both white-box and black-box attacks, whereas our proposed defense is not only able to effectively thwart the white-box attacks but is also able to generalize to attacks constructed for other networks without further training (Table 1). Since different DNNs can share common adversarial directions in their feature space, our feature regeneration units learn to regularize such directions against unseen data and, consequently, to defend against black-box attacks. + +# 5.2.2 Robustness across Attack Norms + +Here, we evaluate defense robustness against both $\ell_{\infty}$ -norm and $\ell_{2}$ -norm UAP [38] attacks. Since an effective defense must not only recover the DNN accuracy against adversarial images but must also maintain a high accuracy on clean images, we use restoration accuracy (Equation 9) to measure adversarial defense robustness (Tables 2 and 3). While Akhtar et al. [1] (PRN and PRN+det) only report defense results on the UAP [38] attack, we also compare results with pixel-domain defenses such as Pixel Deflection (PD [52]) and High Level Guided Denoiser (HGD [31]), defenses that use JPEG compression (JPEG comp. [10]) or DNN-based compression like Feature Distillation (Feat. Distill. [33]), + +Table 1. Cross-DNN evaluation on ILSVRC2012: Top-1 accuracy against a $\ell_{\infty}$ -norm UAP [38] attack with $\xi = 10$ and target fooling ratio of 0.8. DNNs in column one are tested with attacks generated for DNNs in row one. + +
CaffeNetVGG-FGoogleNetVGG-16Res152
CaffeNet [25], original accuracy 56.4%
CaffeNet0.1090.2980.4560.4310.405
Ours0.5420.5240.5100.4570.470
VGG-F [7], original accuracy 58.4%
VGG-F0.2990.1500.4610.4170.426
Ours0.5560.5500.5480.4920.513
GoogLeNet [62], original accuracy 68.6%
GoogLeNet0.5190.5390.2600.4720.473
Ours0.6510.6530.6530.6370.642
VGG-16 [59], original accuracy 68.4%
VGG-160.5490.5590.5190.2400.484
Ours0.6150.6220.6460.6550.631
Res152 [18], original accuracy 79%
Res1520.7200.7260.6920.6260.270
Ours0.7640.7690.7690.7630.761
+ +Table 2. Same-norm evaluation on ILSVRC2012: Restoration accuracy of DNNs and defenses against an $\ell_{\infty}$ -norm UAP [38] attack with $\xi = 10$ . + +
MethodsCaffeNetVGG-FGoogLeNetVGG-16Res152
\( \ell_{\infty} \)-norm attack, \( \xi = 10 \)
Baseline0.5960.6280.6910.6810.670
PRN [1]0.9360.9030.9560.6900.834
PRN+det [1]0.9520.9220.9640.6900.834
PD [52]0.8730.8130.8840.8180.845
JPEG comp. [10]0.5540.6970.8300.6930.670
Feat. Distill. [33]0.6710.6890.8510.7170.676
HGD [31]n/an/an/an/a0.739
Adv. tr. [35]n/an/an/an/a0.778
FD [66]n/an/an/an/a0.819
Ours0.9760.9670.9700.9630.982
+ +Table 3. Cross-norm evaluation on ILSVRC2012: Restoration accuracy against an $\ell_2$ -norm UAP [38] attack. Our defense, as well as the other defense models, are trained only on $\ell_{\infty}$ -norm attack examples with $\xi = 10$ . + +
MethodsCaffeNetVGG-FGoogLeNetVGG-16Res152
\( \ell_2 \)-norm attack, \( \xi = 2000 \)
Baseline0.6770.6710.6820.6970.709
PRN [1]0.9220.8800.9710.8340.868
PRN+det [1]0.9360.9000.9750.8350.868
PD [52]0.7820.7840.8570.8090.840
HGD [31]n/an/an/an/a0.730
Adv. tr. [35]n/an/an/an/a0.778
FD [66]n/an/an/an/a0.818
Ours0.9640.9610.9120.8760.926
+ +Table 4. Restoration accuracy on ILSVRC2012 for $\ell_{\infty}$ -norm UAP [38] attack with stronger perturbation strengths ( $\xi$ ) against CaffeNet. Our defense, as well as the other defense models, are trained only on $\ell_{\infty}$ -norm attack examples with $\xi = 10$ . + +
Methodξ = 10ξ = 15ξ = 20ξ = 25
Baseline0.5960.5430.5250.519
PRN [1]0.9360.6030.5550.526
PRN+det [1]0.9520.6040.5550.526
PD [52]0.8730.6160.5490.524
Ours0.9760.9520.8960.854
+ +defenses that use some variation of adversarial training like + +Feature Denoising (FD [66]) and standard Adversarial training (Adv. tr. [35]). + +In Table 2, we report results for an $\ell_{\infty}$ -norm UAP attack [38] against various DNNs and show that our proposed defense outperforms all the other defenses² for all networks with the highest restoration accuracy (98.2%) being achieved for Res152 [18]. Our feature regeneration units are trained on $\ell_{\infty}$ -norm attack examples (same-norm evaluation). Even without a perturbation detector, our defense outperforms the existing defense with a perturbation detector (PRN+det) of Akhtar et al. [1] for all networks. Similarly, for Res152 [18], we outperform adversarily trained defenses (FD [66], Adv. tr. [35]) and pixel denoisers (PD [52], HGD [31]) by more than $10\%$ . In Table 3, we also evaluate how well our defense trained on an $\ell_{\infty}$ -norm attack defends against an $\ell_{2}$ -norm attack (cross-norm evaluation). Our feature regeneration units are able to effectively generalize to even cross-norm attacks and outperform all other defenses for most DNNs. + +# 5.2.3 Stronger Attack Perturbations $(\xi >10)$ + +Although we use an attack perturbation strength $\xi = 10$ during training, in Table 4, we evaluate the robustness of our defense when the adversary violates the attack threat model using a higher perturbation strength. Compared to the baseline DNN (no defense) as well as PRN [1] and PD [52], our proposed defense is much more effective at defending against stronger perturbations, outperforming other defenses by almost $30\%$ even when the attack strength is more than double the value used to train our defense. Although defense robustness decreases for unseen higher perturbation strengths, our defense handles this drop-off much more gracefully and shows much better generalization across attack perturbation strengths, as compared to existing defenses. We also note that adversarial perturbations are no longer visually imperceptible at $\xi = 25$ . + +# 5.2.4 Generalization to Unseen Universal Attacks + +Although the proposed method effectively defends against UAP [38] attacks (Tables1-4), we also assess its robustness to other unseen universal attacks without additional attack-specific training. Note that [1] and [45] do not cover this experimental setting. Since existing attacks in the literature are tailored to specific DNNs, we use CaffeNet [25] and Res152 [18] DNNs for covering a variety of universal attacks like Fast Feature Fool (FFF) [43], Network for adversary generation (NAG) [44], Singular fool (S.Fool) [23], Generative adversarial perturbation (GAP) [51], Generalizable data-free universal adversarial perturbation (GUAP) [42], and stochastic PGD (sPGD) [45]. + +Table 5. Robustness to unseen attacks: Restoration accuracy evaluated on ILSVRC2012, against other unseen universal attacks using our defense trained on just $\ell_{\infty}$ -norm UAP [38] attack examples with a fooling ratio and $\ell_{\infty}$ -norm of 0.8 and 10, respectively. Results for all other defenses are reported using publicly provided defense models. Attacks are constructed for the baseline DNN. + +
CaffeNetRes152
MethodsFFF [43]NAG [44]S.Fool [23]GAP [51]G-UAP [42]sPGD [45]
Baseline0.6450.6700.8150.6400.7260.671
PRN [1]0.7290.6600.7320.7740.7770.823
PD [52]0.8470.7670.8710.7840.8070.890
HGD [31]n/an/an/a0.6630.7820.932
Adv. tr [35]n/an/an/a0.7760.7770.775
FD [66]n/an/an/a0.8150.8130.815
Ours0.9410.8400.9140.9220.9140.976
+ +Our defense trained on just UAP [38] attack examples is able to effectively defend against all other universal attacks and outperforms all other existing defenses (Table 5). Even against stronger universal attacks like NAG [44] and GAP [51], we outperform all other defenses including PRN [1], which is also trained on similar UAP [38] attack examples, by almost $10\%$ . From our results in Table 5, we show that our feature regeneration units learn transformations that generalize effectively across perturbation patterns (Figure 5). Note that we are the first to show such broad generalization across universal attacks. + +# 5.2.5 Robustness to Secondary White-Box Attacks + +Although in practical situations, an attacker may not have full or even partial knowledge of a defense, for completeness, we also evaluate our proposed defense against a white-box attack on the defense (secondary attacks), i.e., adversary has full access to the gradient information of our feature regeneration units. We use the UAP [38] (on CaffeNet) and sPGD [45] (on Res152) attacks for evaluation. + +Figure 6 shows the robustness of our defense to such a secondary UAP [38] attack seeking to achieve a target fooling ratio of 0.85 on our defense for the CaffeNet [25] DNN. Such an attack can easily converge (achieve target fooling ratio) against a baseline DNN in less than 2 attack epochs, eventually achieving a final fooling ratio of 0.9. Similarly, we observe that even PRN [1] is susceptible to a secondary UAP [38] attack, achieving a fooling ratio of 0.87, when the adversary can access gradient information for its Perturbation Rectifying Network. In comparison, using our defense model with iterative adversarial example training (as described in Section 5.1), the white-box adversary can achieve a maximum fooling ratio of only 0.42, which is $48\%$ lower than the fooling ratio achieved against PRN [1], even after attacking our defense for 600 attack epochs. Similarly, in Table 6, using the same attack setup outlined in [45], we evaluate white-box sPGD [45] attacks computed by utilizing gradient-information of both the defense and the baseline DNNs, for Res152 [18]. As shown in Table 6, our defense trained using sPGD attack examples computed against + +![](images/4ab902c4b261766cedb592921281855780426b723d708c03a92045d1e3a13f71.jpg) +Figure 6. Robustness to white-box attacks against defense (secondary attacks): Achieved fooling ratio by attacker vs. attack epochs for an $\ell_{\infty}$ -norm UAP [38] attack ( $\xi = 10$ ) against CaffeNet [25], where the attacker has full knowledge of the baseline DNN and also the defense. The target fooling ratio for attack is set to 0.85. + +Table 6. Top-1 accuracy for white-box $\ell_{\infty}$ -norm sPGD [45] attack against Res152-based $\ell_{\infty}$ -norm defenses ( $\xi = 10$ ), evaluated on ILSVRC2012. Top-1 accuracy for Res152 on clean images is 0.79. + +
BaselineOursFD [66]Adv. tr. [35]HGD [31]Shared tr. [45]3
0.2700.7310.6410.6350.6890.727
+ +both the baseline DNN and our defense, is robust to subsequent sPGD white-box attacks. + +# 6. Conclusion + +We show that masking adversarial noise in a few select DNN activations significantly improves their adversarial robustness. To this end, we propose a novel selective feature regeneration approach that effectively defends against universal perturbations, unlike existing adversarial defenses which either pre-process the input image to remove adversarial noise and/or retrain the entire baseline DNN through adversarial training. We show that the $\ell_1$ -norm of the convolutional filter kernel weights can be effectively used to rank convolutional filters in terms of their susceptibility to adversarial perturbations. Regenerating only the top $50\%$ ranked adversariably susceptible features in a few DNN layers is enough to restore DNN robustness and outperform all existing defenses. We validate the proposed method by comparing against existing state-of-the-art defenses and show better generalization across different DNNs, attack norms and even unseen attack perturbation strengths. In contrast to existing approaches, our defense trained solely on one type of universal adversarial attack examples effectively defends against other unseen universal attacks, without additional attack-specific training. We hope this work encourages researchers to design adversarily robust DNN architectures and training methods which produce convolutional filter kernels that have a small $\ell_1$ -norm. + +# References + +[1] Naveed Akhtar, Jian Liu, and Ajmal Mian. Defense against universal adversarial perturbations. In IEEE Conference on Computer Vision and Pattern Recognition, pages 3389-3398, June 2018. 1, 2, 3, 5, 6, 7, 8 +[2] Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In Proceedings of the International Conference on Machine Learning, (ICML), 2018. 1 +[3] Anish Athalye, Logan Engstrom, Andrew Ilyas, and Kevin Kwok. Synthesizing robust adversarial examples. In Proceedings of the International Conference on Machine Learning (ICML), pages 284-293, 2018. 1 +[4] Tejas S. Borkar and Lina J. Karam. DeepCorrect: Correcting DNN models against image distortions. CoRR, abs/1705.02406, 2017. 4 +[5] Tom B. Brown, Dandelion Mane, Aurko Roy, Martin Abadi, and Justin Gilmer. Adversarial patch. CoRR, abs/1712.09665, 2017. 2 +[6] N. Carlini and D. Wagner. Towards evaluating the robustness of neural networks. In IEEE Symposium on Security and Privacy, pages 39-57, 2017. 1 +[7] Ken Chatfield, Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Return of the devil in the details: Delving deep into convolutional nets. In BMVC, 2014. 7 +[8] Nilaksh Das, Madhuri Shanbhogue, Shang-Tse Chen, Fred Hohman, Siwei Li, Li Chen, Michael E. Kounavis, and Duen Horng Chau. SHIELD: Fast, practical defense and vaccination for deep learning using JPEG compression. In ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 196-204, NY, USA, 2018. ACM. 2 +[9] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. ImageNet: A large-scale hierarchical image database. In IEEE Conference on Computer Vision and Pattern Recognition, pages 248-255, 2009. 2, 3, 4, 6 +[10] Gintare Karolina Dziugaite, Zoubin Ghahramani, and Daniel M. Roy. A study of the effect of JPG compression on adversarial images. CoRR, abs/1608.00853, 2016. 1, 2, 6, 7 +[11] Logan Engstrom, Andrew Ilyas, and Anish Athalye. Evaluating and understanding the robustness of adversarial logit pairing. CoRR, abs/1807.10272, 2018. 2 +[12] Kevin Eykholt, Ivan Evtimov, Earlence Fernandes, Bo Li, Amir Rahmati, Chaowei Xiao, Atul Prakash, Tadayoshi Kohno, and Dawn Song. Robust physical-world attacks on deep learning models. CoRR, abs/1707.08945, 2017. 1 +[13] Alhussein Fawzi, Seyed-Mohsen Moosavi-Dezfooli, and Pascal Frossard. The robustness of deep networks: A geometrical perspective. IEEE Signal Process. Mag., 34(6):50-62, 2017. 2 +[14] Alhussein Fawzi, Seyed-Mohsen Moosavi-Dezfooli, Pascal Frossard, and Stefano Soatto. Classification regions of deep neural networks. CoRR, abs/1705.09552, 2017. 2 +[15] Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014. 1, 2 + +[16] Chuan Guo, Mayank Rana, Moustapha Cissé, and Laurens van der Maaten. Countering adversarial images using input transformations. CoRR, abs/1711.00117, 2017. 1, 2 +[17] Jamie Hayes and George Danezis. Learning universal adversarial perturbations with generative models. CoRR, abs/1708.05207, 2017. 3 +[18] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition, pages 770-778, 2016. 1, 4, 7, 8 +[19] Jan Hendrik Metzen, Mummadi Chaithanya Kumar, Thomas Brox, and Volker Fischer. Universal adversarial perturbations against semantic image segmentation. In IEEE International Conference on Computer Vision, pages 2774-2783, Oct 2017. 2 +[20] Andrew Ilyas, Logan Engstrom, Anish Athalye, and Jessy Lin. Black-box adversarial attacks with limited queries and information. CoRR, abs/1804.08598, 2018. 1 +[21] Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014. 6 +[22] Harini Kannan, Alexey Kurakin, and Ian Goodfellow. Adversarial logit pairing. CoRR, abs/1803.06373, 2018. 2 +[23] Valentin Khrulkov and Ivan Oseledets. Art of singular vectors and universal adversarial perturbations. In IEEE Conference on Computer Vision and Pattern Recognition, pages 8562 - 8570, June 2018. 1, 2, 7, 8 +[24] Jernej Kos, Ian Fischer, and Dawn Song. Adversarial examples for generative models. CoRR, abs/1702.06832, 2017. 1 +[25] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, pages 1097-1105, 2012. 1, 3, 4, 7, 8 +[26] Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. CoRR, abs/1607.02533, 2016. 1 +[27] Alex Lamb, Jonathan Binas, Anirudh Goyal, Dmitriy Serdyuk, Sandeep Subramanian, Ioannis Mitliagkas, and Yoshua Bengio. Fortified networks: Improving the robustness of deep networks by modeling the manifold of hidden representations. CoRR, abs/1804.02485, 2018. 2 +[28] Juncheng Li, Frank R. Schmidt, and J. Zico Kolter. Adversarial camera stickers: A physical camera-based attack on deep learning systems. CoRR, abs/1904.00759, 2019. 2 +[29] Xin Li and Fuxin Li. Adversarial examples detection in deep networks with convolutional filter statistics. In IEEE International Conference on Computer Vision, pages 5775 - 5783, Oct 2017. 1, 2 +[30] Yingwei Li, Song Bai, Cihang Xie, Zhenyu Liao, Xiaohui Shen, and Alan L. Yuille. Regional homogeneity: Towards learning transferable universal adversarial perturbations against defenses. CoRR, abs/1904.00979, 2019. 1 +[31] Fangzhou Liao, Ming Liang, Yinpeng Dong, Tianyu Pang, Xiaolin Hu, and Jun Zhu. Defense against adversarial at + +tacks using high-level representation guided denoiser. CoRR, abs/1712.02976, 2017. 1, 2, 6, 7, 8 +[32] Y Liu, X. Chen, C. Liu, and D. Song. Delving into transferable adversarial samples and black-box attacks. CoRR, abs/1611.02770, 2016. 1 +[33] Zihao Liu, Qi Liu, Tao Liu, Yanzhi Wang, and Wujie Wen. Feature Distillation: DNN-oriented JPEG compression against adversarial examples. International Joint Conference on Artificial Intelligence, 2018. 1, 2, 6, 7 +[34] Jiajun Lu, Theerasit Issaranon, and David Forsyth. Safetynet: Detecting and rejecting adversarial examples robustly. In IEEE International Conference on Computer Vision, pages 446-454, Oct 2017. 1, 2 +[35] Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. CoRR, abs/1706.06083, 2017. 1, 2, 7, 8 +[36] Dongyu Meng and Hao Chen. MagNet: A two-pronged defense against adversarial examples. In ACM SIGSAC Conference on Computer and Communications Security, pages 135–147, NY, USA, 2017. ACM. 1, 2 +[37] Jan Hendrik Metzen, Tim Genewein, Volker Fischer, and Bastian Bischoff. On detecting adversarial perturbations. In International Conference on Learning Representations, 2017. 1, 2 +[38] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In IEEE Conference on Computer Vision and Pattern Recognition, pages 86-94, 2017. 1, 2, 3, 4, 5, 6, 7, 8 +[39] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, Pascal Frossard, and Stefano Soatto. Analysis of universal adversarial perturbations. CoRR, abs/1705.09554, 2017. 2 +[40] Seyed-Mohsen Moosavi-Dezfooli, Ashish Shrivastava, and Oncel Tuzel. Divide, denoise, and defend against adversarial attacks. CoRR, abs/1802.06806, 2018. 1, 2 +[41] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. DeepFool: A simple and accurate method to fool deep neural networks. In IEEE Conference on Computer Vision and Pattern Recognition, pages 2574–2582, June 2016. 1 +[42] Konda Reddy Mopuri, Aditya Ganeshan, and R Venkatesh Babu. Generalizable data-free objective for crafting universal adversarial perturbations. In IEEE Transactions on Pattern Analysis and Machine Intelligence, volume 41, pages 2452-2465, 2019. 1, 2, 7, 8 +[43] Konda Reddy Mopuri, Utsav Garg, and R Venkatesh Babu. Fast feature fool: A data independent approach to universal adversarial perturbations. In Proceedings of the British Machine Vision Conference (BMVC), pages 1-12, 2017. 1, 2, 7, 8 +[44] Konda Reddy Mopuri, Utkarsh Ojha, Utsav Garg, and R Venkatesh Babu. NAG: Network for adversary generation. In Proceedings of the IEEE Computer Vision and Pattern Recognition (CVPR), 2018. 1, 2, 5, 7, 8 +[45] Chaithanya Kumar Mummadi, Thomas Brox, and Jan Hendrik Metzen. Defending against universal perturbations with + +shared adversarial training. In The IEEE International Conference on Computer Vision (ICCV), Oct 2019. 1, 2, 3, 5, 7, 8 +[46] Nina Narodytska and Shiva Prasad Kasiviswanathan. Simple black-box adversarial perturbations for deep networks. CoRR, abs/1612.06299, 2016. 1 +[47] Nicolas Papernot, Patrick McDaniel, and Ian Goodfellow. Transferability in machine learning: from phenomena to black-box attacks using adversarial samples. CoRR, abs/1607.02533, 2016. 1 +[48] Nicolas Papernot, Patrick McDaniel, Ian Goodfellow, Somesh Jha, Z. Berkay Celik, and Ananthram Swami. Practical black-box attacks against machine learning. In ACM Asia Conference on Computer and Communications Security, pages 506-519, 2017. 1 +[49] Nicolas Papernot, Patrick McDaniel, Somesh Jha, Matt Fredrikson, Z. Berkay. Celik, and Ananthram Swami. The limitations of deep learning in adversarial settings. In IEEE European Symposium on Security and Privacy, pages 372-387, 2016. 1 +[50] Julien Perolat, Mateusz Malinowski, Bilal Piot, and Olivier Pietquin. Playing the game of universal adversarial perturbations. CoRR, abs/1809.07802, 2018. 3 +[51] Omid Poursaeed, Isay Katsman, Bicheng Gao, and Serge Belongie. Generative adversarial perturbations. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 1, 2, 5, 7, 8 +[52] Aaditya Prakash, Nick Moran, Solomon Garber, Antonella DiLillo, and James Storer. Deflecting adversarial attacks with pixel deflection. In IEEE Conference on Computer Vision and Pattern Recognition, pages 8571-8580, June 2018. 1, 2, 6, 7, 8 +[53] Konda Reddy Mopuri, Phani Krishna Uppala, and R. Venkatesh Babu. Ask, acquire, and attack: Data-free uap generation using class impressions. In The European Conference on Computer Vision (ECCV), September 2018. 1 +[54] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In IEEE Conference on Computer Vision and Pattern Recognition, pages 779-788, 2016. 1 +[55] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. In Advances in Neural Information Processing Systems, pages 91-99, 2015. 1 +[56] Yibin Ruan and Jiazhu Dai. TwinNet: A double sub-network framework for detecting universal adversarial perturbations. In Future Internet, volume 10, pages 1-13, 2018. 3 +[57] Ali Shafahi, Mahyar Najibi, Zheng Xu, John Dickerson, Larry S. Davis, and Tom Goldstein. Universal adversarial training. CoRR, abs/1811.11304, 2018. 3 +[58] Evan Shelhamer, Jonathan Long, and Trevor Darrell. Fully convolutional networks for semantic segmentation. IEEE Trans. Pattern Anal. Mach. Intell., 39(4):640-651, Apr. 2017. 1 +[59] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. 1, 3, 4, 5, 7 + +[60] Sibo Song, Yueru Chen, Ngai-Man Cheung, and C.-C. Jay Kuo. Defense against adversarial attacks with Saak transform. CoRR, abs/1808.01785, 2018. 1, 2 +[61] Jiawei Su, Danilo Vasconcellos Vargas, and Kouichi Sakurai. One pixel attack for fooling deep neural networks. CoRR, abs/1710.08864, 2017. 1 +[62] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In IEEE Conference on Computer Vision and Pattern Recognition, pages 1-9, 2015. 1, 3, 4, 7 +[63] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013. 1, 2 +[64] Florian Tramér, Alexey Kurakin, Nicolas Papernot, Ian Goodfellow, Dan Boneh, and Patrick McDaniel. Ensemble adversarial training: Attacks and defenses. In International Conference on Learning Representations, 2018. 1, 2 +[65] Jonathan Uesato, Brendan O'Donoghue, Aaron van den Oord, and Pushmeet Kohli. Adversarial risk and the dangers of evaluating against weak attacks. CoRR, abs/1802.05666, 2018. 1 +[66] Cihang Xie, Yuxin Wu, Laurens van der Maaten, Alan L. Yuille, and Kaiming He. Feature denoising for improving adversarial robustness. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 1, 2, 7, 8 +[67] Weilin Xu, David Evans, and Yanjun Qi. Feature squeezing: Detecting adversarial examples in deep neural networks. In Network and Distributed System Security Symposium, 2018. 1, 2 +[68] Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. CoRR, abs/1511.07122, 2015. 1 \ No newline at end of file diff --git a/defendingagainstuniversalattacksthroughselectivefeatureregeneration/images.zip b/defendingagainstuniversalattacksthroughselectivefeatureregeneration/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..bf2d2a2402a2d1c6890511e382fb881d17a03fd0 --- /dev/null +++ b/defendingagainstuniversalattacksthroughselectivefeatureregeneration/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83a15225269aacdf50ec9459d50a5cecbc2dd5c1fd8347fe02535f03ea8a93ab +size 544900 diff --git a/defendingagainstuniversalattacksthroughselectivefeatureregeneration/layout.json b/defendingagainstuniversalattacksthroughselectivefeatureregeneration/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6ab35ffa3d5810ea67ce46d5b3463121707ca337 --- /dev/null +++ b/defendingagainstuniversalattacksthroughselectivefeatureregeneration/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d107e3d1dca9bbf427002af1b735b3d90c5d2e871fcb89f8111aa187c56f2d2 +size 513567 diff --git a/defendingandharnessingthebitflipbasedadversarialweightattack/2db01570-950f-41d2-9bbb-2d614a1ae0f5_content_list.json b/defendingandharnessingthebitflipbasedadversarialweightattack/2db01570-950f-41d2-9bbb-2d614a1ae0f5_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ed159e15c92f9c17a6f617d967607d80d7441986 --- /dev/null +++ b/defendingandharnessingthebitflipbasedadversarialweightattack/2db01570-950f-41d2-9bbb-2d614a1ae0f5_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40046e85aaee75d3ad1458e703e0be7262f2f585cf7c969cd763e2ff853b035e +size 73097 diff --git a/defendingandharnessingthebitflipbasedadversarialweightattack/2db01570-950f-41d2-9bbb-2d614a1ae0f5_model.json b/defendingandharnessingthebitflipbasedadversarialweightattack/2db01570-950f-41d2-9bbb-2d614a1ae0f5_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6a67300fbe4c3466751012a1173284c4cd435fa0 --- /dev/null +++ b/defendingandharnessingthebitflipbasedadversarialweightattack/2db01570-950f-41d2-9bbb-2d614a1ae0f5_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5372d79d8c0a2fbd27ba8ca805d2150455af658d31ca425caf2393a2dafaf5c +size 85553 diff --git a/defendingandharnessingthebitflipbasedadversarialweightattack/2db01570-950f-41d2-9bbb-2d614a1ae0f5_origin.pdf b/defendingandharnessingthebitflipbasedadversarialweightattack/2db01570-950f-41d2-9bbb-2d614a1ae0f5_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..847cfc0e5e36a91cd6c7c251ff971cd9e0004a68 --- /dev/null +++ b/defendingandharnessingthebitflipbasedadversarialweightattack/2db01570-950f-41d2-9bbb-2d614a1ae0f5_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e0579c21d335cb6a6fe3bb2085d51981a623c44acd10e9d382b26f47c7d7e01 +size 773333 diff --git a/defendingandharnessingthebitflipbasedadversarialweightattack/full.md b/defendingandharnessingthebitflipbasedadversarialweightattack/full.md new file mode 100644 index 0000000000000000000000000000000000000000..1171cb2f402c916e9e4216d0f7e3f70a9f3bb575 --- /dev/null +++ b/defendingandharnessingthebitflipbasedadversarialweightattack/full.md @@ -0,0 +1,326 @@ +# Defending and Harnessing the Bit-Flip based Adversarial Weight Attack + +Zhezhi He†, Adnan Siraj Rakin†, Jingtao Li, Chaitali Chakrabarti and Deliang Fan +School of Electrical, Computer and Energy Engineering, Arizona State University, Tempe, AZ 85287 +zhezhihe@asu.edu, dfan@asu.edu + +# Abstract + +Recently, a new paradigm of the adversarial attack on the quantized neural network weights has attracted great attention, namely, the Bit-Flip based adversarial weight attack, aka. Bit-Flip Attack (BFA). BFA has shown extraordinary attacking ability, where the adversary can malfunction a quantized Deep Neural Network (DNN) as a random guess, through malicious bit-flips on a small set of vulnerable weight bits (e.g., 13 out of 93 millions bits of 8-bit quantized ResNet-18). However, there are no effective defensive methods to enhance the fault-tolerance capability of DNN against such BFA. In this work, we conduct comprehensive investigations on BFA and propose to leverage binarization-aware training and its relaxation - piece-wise clustering as simple and effective countermeasures to BFA. The experiments show that, for BFA to achieve the identical prediction accuracy degradation (e.g., below $11\%$ on CIFAR-10), it requires $19.3\times$ and $480.1\times$ more effective malicious bit-flips on ResNet-20 and VGG-11 respectively, compared to defend-free counterparts. + +# 1. Introduction + +As the Deep Neural Networks (DNNs) achieve human-surpassing performance in multiple computer vision related tasks, its applications in the real-world scenarios are growing rapidly. In such a scenario, the fault-tolerance capability of the neural network is of great research interest for developing reliable neural networks against weak random fault and even strong malicious attacks. A significant amount of research effort has focused on DNNs being fooled by human-imperceptible input noise, aka. adversarial example. However, another vulnerable dimension of DNN is model parameters, which has been barely investigated. + +Owing to the enormous model size (hundreds of MBs for state-of-the-art DNNs [9, 24]), modern DNN accelerators (e.g., GPU) normally need to store the model parameters in main memory, namely, Dynamic Random-Access-Memory + +![](images/bf58c93151e2465394c824b8e48c544ed0b7904bc20342312e1b0f3b993d1201.jpg) +(a) Concept illustration of quantized DNN under BFA. + +![](images/dbe163b987d424ae5f1a022f0c4c19bd90c48afe426c6372d4f0c673a7d4c880.jpg) +(b) Accuracy vs. # bit-flips with/without defense. +Figure 1: The fault injection on the identified vulnerable weight bits can be physically conducted by Row-Hammer Attack (RHA) [19]. Meanwhile, the DNN under defense has higher resistance against the malicious bit-flips. + +(DRAM). Recent research advances have brought up the vulnerability issue of data stored in DRAM, where RowHammer Attack (RHA) [19] has been shown to maliciously flip the memory bits in DRAM without being granted any data write privileges, as depicted in Fig. 1. Unfortunately, DNNs stored in DRAM with floating-point representation can be easily hacked to fully malfunction, through single bit-flip (e.g. in an exponential bit of any weight) through RHA [8]. Thanks to the DNN weight quantization technique, DNN is more compact since the weights are represented in a fixed-point format with constrained representation. Such a representation has been proven to significantly enhance the immunity of quantized DNN to such malicious bit-flips in [8]. However, a newly proposed Bit-Flip Attack (BFA) [17] whose progressive bit searching algorithm can + +successfully identify and flip an extremely small number of vulnerable weight bits (e.g., 13 out of 93 millions bits of ResNet-18 on ImageNet) to degrade a large scale 8-bit quantized DNN inference accuracy to as low as a random guess (i.e., from $69.8\%$ to $0.1\%$ ). Up to now, there is still a lack of effective defensive approaches against such BFA, and so we propose a BFA countermeasure based on utilizing weight binarization and its relaxation - piece-wise clustering. The contributions in this work can be summarized as: + +- A comprehensive investigation of bit-flip based adversarial weight attack (i.e., BFA) is conducted, and several insightful observations are obtained for understanding parameter vulnerability to these attacks. +- Weight binarization and its piece-wise clustering relaxation method are proposed as the effective defensive techniques against BFA. +- Additional adversarial attack defense methods (e.g., adversarial training, pruning) and conventional model regularization methods are examined as well. + +# 2. Background and Related Works + +# 2.1. Bit-Flip based Adversarial Weight Attack + +The bit-flip based adversarial weight attack, aka. BitFlip Attack (BFA) [17], is an adversarial attack variant which performs weight fault injection through flipping the bits. For the machine-imperceptible purpose, the BFA only flips the most vulnerable weight bits which are identified by Progressive Bit Search (PBS) algorithm with iterative inter- and intra-layer search. + +Given a $n_{\mathbf{q}}$ -bit quantized DNN parameterized by bits (i.e., quantized weights in binary), define tensor $\{\mathbf{B}_l\}_{l=1}^L$ where $l \in \{1,2,\dots,L\}$ is the layer index. The intra-layer search that identifies the bit with highest gradient ( $\arg \max_{\mathbf{B}_l} |\nabla_{\mathbf{B}_l} \mathcal{L}|$ ) as vulnerable bit candidate, where $\mathcal{L}$ is the inference loss. Then, the inter-layer searching compares the bit candidates selected by the intra-layer search through directly checking the loss increment. Thus, the bit searching in iteration $i$ can be formulated as an optimization process [17]: + +$$ +\max _ {\left\{\hat {\boldsymbol {B}} _ {l} ^ {i} \right\}} \mathcal {L} \left(f \left(\boldsymbol {x}; \left\{\hat {\boldsymbol {B}} _ {l} ^ {i} \right\} _ {l = 1} ^ {L}\right), \tilde {\boldsymbol {t}}\right) \tag {1} +$$ + +$$ +\text {s . t .} \tilde {\boldsymbol {t}} = f (\boldsymbol {x}; \{\boldsymbol {\mathbf {B}} _ {l} \} _ {l = 1} ^ {L}); \sum_ {l = 1} ^ {L} \mathcal {D} \left(\hat {\boldsymbol {\mathbf {B}}} _ {l} ^ {i}, \boldsymbol {\mathbf {B}} _ {l}\right) \in \{0, 1, \dots , N _ {b} \} +$$ + +where $\pmb{x}$ and $\pmb{t}$ denotes the selected input mini-batch and ground-truth labels. $\hat{\mathbf{B}}_l^i$ is the quantized bit tensor of $l$ -th layer perturbed by BFA in $i$ -th iteration. $f(\pmb{x};\{\pmb{B}\}_{l = 1}^{L})$ compute the outputs of DNN parameterized by $\{\mathbf{B}_l\}_{l = 1}^L$ . $\tilde{\pmb{t}}$ is the output of clean model as the soft-label, which replaces + +the ground-truth $t$ to perform the attack. $\mathcal{L}(\cdot, \cdot)$ computes the loss. The attack efficiency is measured by the Hamming distance (i.e., effective bit-flips) between prior- and post-attack model parameters $\{\hat{\mathbf{B}}_l^i\}_{l=1}^L$ and $\{\mathbf{B}_l\}_{l=1}^L$ given by $\sum \mathcal{D}(\hat{\mathbf{B}}_l^i, \mathbf{B}_l)$ . In general, the optimization goal of BFA is to cause the DNN to malfunction with least number of bit-flips (i.e., $\min \sum \mathcal{D}(\hat{\mathbf{B}}_l^i, \mathbf{B}_l)$ ). + +Table 1: Threat model of Bit-Flip Attack (BFA). + +
Access Required✓Access NOT Required×
Model topology & parametersHyper-parameters and other training configurations.
A mini-batch of sample dataComplete train/test datasets.
+ +It is noteworthy that the quantized weight in fixed-point format is magnitude constrained (i.e., $\max (\mathbf{B}) = 2^{n_{\mathrm{q}} - 1}$ ) in comparison to the floating-point counterpart, which is not only more biologically plausible but also practically necessary for the acceleration of modern AI applications. To clarify, we use the same threat model as in prior work [17], which is listed in Table 1. + +# 2.2. Defense against Adversarial Example + +As the BFA is an adversarial attack variant, the popular techniques used to defend adversarial example [5] are investigated to seek potential BFA defense method. + +Adversarial Training. Adversarial training [5, 15] is by far the most successful adversarial example defense method, that optimizes the DNN parameters $\theta$ w.r.t both the clean input $\pmb{x}$ and their adversary examples $\hat{\pmb{x}}$ as: + +$$ +\min _ {\boldsymbol {\theta}} \mathcal {L} (f (\boldsymbol {x}; \boldsymbol {\theta}), \boldsymbol {t}) + \alpha \cdot \mathcal {L} (f (\hat {\boldsymbol {x}}; \boldsymbol {\theta}), \tilde {\boldsymbol {t}}) \tag {2} +$$ + +where $\alpha$ is the hyper-parameter to balance the accuracy of the trained model on clean natural data and adversarial examples. $\tilde{t}$ is the soft-label as in Eq. (1). Such adversarial training is also normally considered as a strong regularization technique. + +Increasing model capacity. Prior works [15, 7] have experimentally confirmed the resistance improvement against the adversarial attack by increasing the model capacity. It is interpreted as that the robust classifiers would require a more complicated decision boundary [15], which is expected to benefit the defense against malicious weight change as well. Further in-depth analysis of model capacity and BFA resistance is discussed in Section 6. + +# 3. DNN under BFA 101 + +To first understand, then to defend and harness the bit-flip based adversarial weight attack, we conducted some preliminary investigations, along with several important observations as described below. + +![](images/d52c65cdc87487dab3114dfcb6b11ca1057b36048635835123150f9b94f43671.jpg) +(a) ResNet-20 [6] with 8-bit weight. Bit-flips $N_{\mathrm{BF}}$ for BFA (mean±std):11.2 ± 1.9, total number of bits of weights: 2 millions. + +![](images/7c8befdbc6ac0ef7ff4aa485980e837c7b490c01a97a6f690d1918d7d7c7aabf.jpg) + +![](images/8ea0626e845b9294311883622d49984548a2d22f7097468c4842166db7189833.jpg) + +![](images/c8c4e598b887a6f8c9dcee9cf2a44514f3db1d397e8b6aebd966aa1eb6750528.jpg) + +![](images/6505f42c05fd155b00ea664ccdada493e68873a0f1adfd944ca19e59221cfebb.jpg) + +![](images/5705ad1584a15650c6c0eb9c3b491c23f06eaba12793317430fbcce71884c239.jpg) +(b) VGG-11 [20] with 8-bit weight. Bit-flips $N_{\mathrm{BF}}$ for BFA (mean±std):56.6 ± 35.2, total number of bits of weights: 78 millions. + +![](images/c97863adc343554a1b38aa2ca70c2af1abfcb2820c57d4adefd9af921ccafa97.jpg) +Figure 2: Weight shift caused by BFA for (a) ResNet-20 [6] and (b) VGG-11 [20] on CIFAR-10 dataset. For both architectures, 5 trials are executed with different random seeds. Each colored dot depicts the weight shift (x-axis: prior-attack weight, y-axis: post-attack weight) w.r.t one iteration of BFA. The color bar indicates the corresponding accuracy (\%) on the CIFAR-10 test data. The vertical distance between dot and the diagonal dashed line (i.e., $y = x$ ) represents the weight shift magnitude. Moreover, results reported in this figure use 8-bit post-training weight quantization [17]. + +![](images/6321062d28c01259ff8d3f96aa3bff9ce72bac3b9d2d073d5677561ff067a326.jpg) + +![](images/c630bbdfce89a13e9e90aa9d2ab7ff01ac378b67cf9c16dd9772ff4c04d9cf0e.jpg) + +![](images/8b2df02383381ea5cc217ce0a3344417859851ef824102898cd39c01d038b002.jpg) + +# Observation 1 BFA is prone to flip bits of close-to-zero weights, and cause large weight shift. + +As depicted in Fig. 2, the progressive bit search proposed in BFA [17] is prone to identify vulnerable bit in the weight whose absolute value has a small magnitude (i.e., $|w| \to 0$ ) then modify it to be a large value (explained in the caption of Fig. 2). Since the BFA performs the attack on the quantized weight encoded in two's complement, the possible weight magnitude shift is discretized as $2^i, i \in \{0,1,\dots,n_{\mathbf{q}}\}$ . Moreover, Fig. 2 also shows the model with larger capacity possesses higher resistance against BFA (i.e., require more bit-flips for same accuracy degradation). + +# Observation 2 BFA is prone to flip the weight bits in the front-end layers of the target neural network. + +Fig. 3 shows the histogram of bit-flips across different modules1 of DNN under BFA. All the trials show that most of the bits found by BFA are mostly in the front-end, along the forward propagation path. Such an observation can be explained as the error introduced by the bit-flips in the front-end can be easily accumulated and amplified during the forward propagation, which is similar to the linear explanation of adversarial example discussed in [5]. + +![](images/0f67b6ba4c6c38d4e2e7ec47637004287bce45835053d8fd8211a60f9d37936e.jpg) + +![](images/cc302f8dced0c4beff1d5fb67691515344e1c5e272e3ef0413204a2ac6485b09.jpg) +Figure 3: Normalized histogram and Kernel Density Estimation (KDE) of #bit-flips versus module index in (top) ResNet-20 and (bottom) VGG-11 on CIFAR-10. + +# Observation 3 BFA forces almost all the inputs to be classified into one particular output group. + +Fig. 4 depicts the top-1 categorization output of DNN on CIFAR-10 test data, at different BFA iterations. The CIFAR-10 test subset includes 1000 samples on 10 output categories (i.e., total 10k samples). The BFA-free clean + +![](images/167fa55285125c3f9218888ab51f4f7848f6c7cbcfd83adeb8aabbb49c8416a0.jpg) +Figure 4: The evolution of ResNet-20 output classification histogram across 10 categories under BFA, on 10k test samples of CIFAR-10. The attack sample size is 128. + +model, at iteration 0, has almost evenly distributed top-1 classification output predictions in each output category. It is intriguing to notice that, with the evolution of BFA, it forces almost all inputs to be classified into one output group. We also find that the dominant output group highly depends on the given attack sample data. + +# 4. Defense against BFA + +To enhance the resistance of DNN against BFA, we propose and investigate two defense techniques, i.e., Binarization-aware training and its relaxation - piece-wise weight clustering, inspired by the observations in Section 3. + +# 4.1. Binarization-aware training + +binarization-aware training is originally proposed as an extreme low bit-width model compression technique, which converts the weights from 32-bit floating-point to $\{-1, +1\}$ binary format encoded by 1-bit [18]. Here, the binarization-aware training is leveraged as a defense technique against BFA, which can be mathematically described as: + +$$ +\text {F o r w a r d}: \quad w _ {l, i} ^ {\mathrm {b}} = \mathbb {E} \left(\left| \mathbf {W} _ {l} ^ {\mathrm {f p}} \right|\right) \cdot \operatorname {s g n} \left(w _ {l, i} ^ {\mathrm {f p}}\right) +$$ + +Backward: $\frac{\partial\mathcal{L}}{\partial w_{l,i}^{\mathrm{b}}} = \frac{\partial\mathcal{L}}{\partial w_{l,i}^{\mathrm{fp}}}$ (3) + +where $\mathrm{sgn}(.)$ is the sign function. $w_{l,i}^{\mathrm{b}}$ denotes the binarized weight from its floating-point counterpart $w_{l,i}^{\mathrm{fp}}$ . In general, weight binarization intrinsically achieves two goals: 1) reducing the bit-width to 1, and 2) clustering the weights to $\pm \mathbb{E}(|\mathbf{W}_l^{\mathrm{fp}}|)$ as in Eq. (3). The Straight Through Estimator (STE) [2] is adopted to address the non-differential problem for the sign function as prior works [10]. Nevertheless, different from STE in [10], the gradient clipping constraint is omitted from the backward path, thanks to the presence of weight scaling coefficient $\mathbb{E}(|\mathbf{W}_l^{\mathrm{fp}}|)$ . + +Our interpretation of the BFA resistance enhancement through binarization-aware training comes in twofold: 1) + +![](images/0377096999a2ff29360b68b4a920a84c75e2d3c74332eaff430f888ce8635d35.jpg) +(a) Vanilla training $\mathbf{W}_{l = 1}$ + +![](images/bd30268e50f00198e61efbf69304e92c23af5e093ccf2027a442ca321b83e520.jpg) +(b) Binarization $\mathbf{W}_{l = 1}^{\mathrm{fp}}$ + +![](images/4d76b2c160d0a5832102b8c3c5f94be061476d2d94a8ed8cdcdc79c0a539c392.jpg) +(c) Binarization $\mathbf{W}_{l = 1}^{\mathrm{b}}$ +(d) Piecewise Clustering $\mathbf{W}_{l = 1}$ +Figure 5: The evolution of weight distribution of ResNet20 (first layer, $l = 1$ ), under various training configurations. x-axis: weight magnitude, y-axis: training epoch. + +![](images/0b67121554df3b29c82e9686a29f1db3a15e3cc6d65d1749553fe2684360bb89.jpg) + +As discussed in observation-1, BFA is prone to attack the close-to-zero weights and cause the large weight shift. The weight binarization eliminates close-to-zero weights by forcing all the weights to $\pm \mathbb{E}(|\mathbf{W}_l^{\mathrm{fp}}|)$ , where the weight distribution of sampled layer is illustrated in Fig. 5c. 2) Binarization-aware training intrinsically acts as training the DNN with bit-flip noise injected. As described in Eq. (3), the floating-point weight base $\{\mathbf{W}_l^{\mathrm{fp}}\}$ are binarized on-the-fly during training. Recalling the optimization using SGD, the weight change $\Delta w^{\mathrm{fp}}$ can be expressed as: + +$$ +\Delta w ^ {\mathrm {f p}} = \eta \cdot \nabla_ {w ^ {\mathrm {f p}}} \mathcal {L} (f (\boldsymbol {x}, \{\boldsymbol {W} ^ {\mathrm {f p}} \}); t) \tag {4} +$$ + +where $\eta$ is the learning rate. Due to the presence of Eq. (3), even small weight update on $w^{\mathrm{fp}}$ (i.e., $w^{\mathrm{fp}} - \Delta w^{\mathrm{fp}}$ ) may directly change the corresponding binarized weight $w^{\mathrm{b}}$ from $-1$ to $+1$ or the opposite as a bit-flip, when the following condition is meet: + +$$ +\operatorname {s g n} \left(w ^ {\mathrm {f p}} - \Delta w ^ {\mathrm {f p}}\right) \neq \operatorname {s g n} \left(w ^ {\mathrm {f p}}\right) \tag {5} +$$ + +Therefore, the binarization-aware training involves massive bit-flips on the binarized weight $W^{\mathrm{fp}}$ , which mimics injecting the bit-flips noise on the weights during training. Fig. 6 depicts the average number of bit-flips caused by the weight update when training a binarized ResNet-20, each iteration may cause around 300 bit-flips on the binarized weights even when the learning rate is 0.001. + +# 4.2. Clustering as relaxation of binarization + +Since weight binarization normally suffers from significant prediction accuracy degradation due to aggressive model capacity reduction, we propose a relaxation to the weight binarization, called Piece-wise Clustering (PC), to emit the fixed single bit-width constraint while retaining + +![](images/9099adab4c66d82b7387d9ad19de95d45ce4a55bc2b2b2d84b2cf282ef1e0c8e.jpg) +Figure 6: Average #Bit-flips (y-axis) per weight update iteration of binarization-aware training vs. epochs (x-axis), with ResNet-20 on CIFAR10. + +similar functionality of clustering, which we believe play an important role in defending BFA. The piece-wise clustering introduces an additional weight penalty to the inference loss $\mathcal{L}$ (e.g., cross-entropy), and the optimization can be formulated as: + +$$ +\underbrace {\underset {\{\mathbf {W} _ {l} \} _ {l = 1} ^ {L}} {\min } \mathbb {E} _ {\boldsymbol {x}} \mathcal {L} \left(f (\boldsymbol {x} , \left\{\mathbf {W} _ {l} \right\} _ {l = 1} ^ {L}) , \boldsymbol {t}\right) +} _ {\text {p i e c e - w i s e c l u s t e r i n g p e n a l t y t e r m}} \tag {6} +$$ + +where $\lambda$ is the clustering coefficient to tune the strength of the weight clustering penalty term. $\mathbf{W}_l^+$ and $\mathbf{W}_l^-$ denote the positive and negative weight subset of $l$ -th layer weight tensor. The DNN model optimized as Eq. (6) leads to a bi-modal weight distribution as depicted in Fig. 5d. The piece-wise clustering proposed above can also be viewed as a variant of group Lasso, where the group is defined as the positive and negative weight subsets in each layer. + +# 5. Experiments + +# 5.1. Experiment Setup + +Dataset and Network Architectures In this work, experiments are focused on visual dataset CIFAR-10 [12], which includes $60\mathrm{k}32\times 32$ RGB images evenly sampled from 10 categories, with $50\mathrm{k}$ and $10\mathrm{k}$ samples for training and test respectively. The data augmentation technique is identical as reported in [6]. The ResNet-20 [6] and VGG-11 [20] are the two networks studied in the work. We use the momentum-based stochastic gradient descent optimizer, with training batch-size and weigh decay as 128 and 3e-4 respectively. The initial learning rate is 0.1 that scaled by 0.1 at 80 and 120 epochs, and the total number of epochs is 160. Note that, all the experiments are conducted using Pytorch [16], running on NVIDIA Titan-XP GPUs. + +![](images/00d6d793ae9f08a3ee724bc1ee93263ed44872a29da61f339af7f01a85b2b469.jpg) + +![](images/c467f73d58c4f12aede5d3a0097e84564eafcf0f8fef9acd65bb7c4318e09a4c.jpg) + +![](images/a173d6c0eac6fdf8f60a4d7a782fae65a3bc31a338131e9617439c62b300be78.jpg) +Figure 7: The BFA-free test accuracy, mean and standard deviation of $N_{\mathrm{BF}}$ for 5-trials under different quantization bit-width $n_q \in \{8,6,4,1\}$ and clustering penalty coefficient $\lambda \in \{0,1e - 4,5e - 4,1e - 3,5e - 3\}$ , with (left column) ResNet-20 and (right column) VGG-11 on CIFAR-10. + +![](images/23fbcdf408515acd4e60a276dcfae00f26b401edaac44032e067ce8e13b09bee.jpg) + +![](images/27286678cc66faa9d09487ceeef8b7e2ac2eb084e514fd3049f24f3844a1992c.jpg) + +![](images/82f452ca6f6b3ef31fce51a5e9055fe1e3584ecd6252734beedba8a3694210b3.jpg) + +BFA Configuration. To evaluate the effectiveness of the proposed defense methods, the code from [17] is utilized with further modification. The number of bit-flips $N_{\mathrm{BF}}$ that degrades the prediction accuracy below $11\%$ is used as the metric to measure the BFA resistance, for CIFAR-10 dataset. Moreover, since BFA requires a set of data to perform the attack, we take 256 sample images from the training subset as the default BFA configuration and report the mean±std of $N_{\mathrm{BF}}$ with 5 BFA trials. Note that, all the quantized DNN reported hereafter still uses the uniform quantizer as in [17], but with quantization-aware training instead of post-training quantization. + +# 5.2. Result Evaluation + +The experiment results with different quantization bitwidth $n_q$ and clustering coefficient $\lambda$ of piecewise clustering are summarized in Fig. 7. It reports the BFA-free test accuracy and number of bit-flips $N_{\mathrm{BF}}$ required for BFA to succeed. Note that, for weight binarization in Fig. 7, we exclude the Piece-wise Clustering (PC) term through setting + +$\lambda = 0$ , since binarization intrinsically performs the clustering as discussed in Section 4.1. + +Effect of quantization bitwidth and clustering coefficient. Based on the results reported in Fig. 7, training the DNN with binarized weights roughly degrade the test accuracy by $\sim 4\%$ and $\sim 2\%$ in comparison to the 8-bit quantized counterpart, for ResNet-20 and VGG-11. As discussed in Section 4.2, our intention of proposing the piecewise clustering as the relaxation to weight binarization is to mitigate such accuracy drop. We do observe that using piece-wise clustering with proper $\lambda$ can mitigate the accuracy degradation while improving the BFA resistance (i.e., requiring more bit-flips $N_{\mathrm{BF}}$ for the same accuracy degradation). For ResNet-20 and VGG-11, the ideal configurations of $\lambda$ are 0.001 and 0.0005 respectively, as the model with larger capacity benefits from relatively smaller $\lambda$ . + +BFA resistance of ResNet-20. The 8-bit quantized ResNet-20 (baseline) requires only an average of 28 bit-flips to hamper the functionality of an accurate DNN, while the weight binarization significantly improves the BFA resistance compared to the baseline. Binarization increases the average value of $N_{\mathrm{BF}}$ to 541.2, which improve the BFA resistance by $\sim 19 \times$ . Nevertheless, considering the inevitable accuracy drop due to the drastic bit-width reduction (32-bit to 1-bit), as an alternative approach we explore the performance of PC on other bit-width configurations as well. With $\lambda = 1e - 3$ , the average value of $N_{\mathrm{BF}}$ was improved by $2.09 \times$ , $2.55 \times$ and $1.73 \times$ for 8, 6 and 4 bit-width respectively. In conclusion, our proposed piece-wise clustering improves the resistance to adversarial weight attack for all the cases of different bit-widths. Still, the binarized network emerges as the most successful defense against BFA. + +BFA resistance of VGG-11. For VGG-11, our observation follows a similar pattern as described in the previous section. The baseline VGG-11 (e.g., $n_q = 8$ ) requires an average $N_{\mathrm{BF}}$ of 16.4. Again, weight binarization improves the network robustness significantly, yielding an average $N_{\mathrm{BF}}$ of 7874; which is $\sim 480 \times$ improvement in comparison to the baseline. In the case of VGG-11, the lower Bit-Width defends BFA even better than ResNet-20; the main reason for this discrepancy can be the difference between the size of the network. For a larger network such as VGG-11, low Bit-Width and PC performs a proper regularization to successfully defend against BFA. The best performance of PC for VGG-11 was achieved for a 4-bit network with $\lambda = 1e - 4$ achieving an average value of $N_{\mathrm{BF}}$ of 82.59. + +In summary, both the binarization-aware training and its piecewise clustering relaxation can improve the BFA resistance of the target neural network, while the binarization-aware training can push the $N_{\mathrm{BF}}$ to an extremely large value + +(e.g., $N_{\mathrm{BF}} > 7000$ on over-parameterized VGG-11). The implication of such large value is noteworthy, as a larger value of $N_{\mathrm{BF}}$ indicates the significant increase in difficulty to carry out a memory fault injection through the feasible cyber-physical attacks. For example, when using the rowhammer attack to perform the fault injection, the increased attack execution time might be detected by the operating system through the data integrity check. + +# 5.3. Comparison of Alternative Defense Methods + +Adversarial weight attack [17] is a recently developed security threat model for modern DNN. Subsequently, the development of defensive approaches in this field has not received much attention. Therefore, for the first time, we investigate an alarming parameter security concern - bit-flip based adversarial weight attack, with corresponding defense method. Owing to the lack of competing methods in this research direction, we attempt to transfer several conventional defense methods of adversarial examples [15, 3, 22], for providing a comprehensive comparison. + +Table 2: Alternative Methods Comparison. In this table, we report the prior- and post-attack test accuracy $(\%)$ and $N_{\mathrm{BF}}$ of BFA. The 8-bit quantization is chosen as the baseline; Binary and PC-8bit is the proposed method. Moreover, comparison with Lasso-based pruning and adversarial weight training (adv. training) is included as well. + +
MethodsPrior-Attack Accuracy (%)Post-Attack Accuracy (%)NBF
8-bit91.8410.4528.0±4.47
PC-8bit90.0210.0758.79±4.14
Binary88.3610.13541.2 ± 49.8
Lasso Pruning88.1110.126.8±0.44
Adv. Training87.7210.099.6±6.58
+ +Weight Pruning. Both the activation and weight pruning have been investigated as the defense against adversarial example [21, 3]. Such pruning techniques involve the stochastic process during the inference which suffers from gradient obfuscation [1] which is a common reason for the failure of adversarial input defenses. Nevertheless, we investigate the effectiveness of network pruning to resist adversarial weight attack as an alternative approach. To achieve this, we train a regular network with Lasso loss function to shrink most of the weights to an extremely low value. Thus, we can rewrite the loss function with additional $L_{1}$ -norm penalty as: + +$$ +\min _ {\{\mathbf {W} \}} \mathcal {L} (f (\boldsymbol {x}, \left\{\mathbf {W} _ {l} \right\}); \boldsymbol {t}) + \beta \cdot \sum_ {l = 1} ^ {L} \left| \left| \mathbf {W} _ {l} \right| \right| _ {1} \tag {7} +$$ + +where $\beta$ is the coefficient to tune the pruning strength. Through training with Eq. (7), we expect the weight tenor + +to be in a highly sparse representation. + +The intuition behind pruning working as an adversarial weight defense can be summarized as: In a sparse network, we consider these zero-valued weights will not have any physical connection (pruned) to conduct a bit-flip attack, thus making them immune from BFA. As a result, the attacker is left with only a few portions of the weights which he/she can alter to perform the BFA. Nevertheless, as shown in Table 2, such a sparse regularized network is even more vulnerable to adversarial weight attack, requiring on average just 6.8 bit-flips to hamper the functionality of target DNN. Since a large portion of the weights was pruned, the remaining weights contain large significance in maintaining accurate network performance. So altering any of the remaining non-zero weights still manages to degrade network performance significantly. + +Adversarial Weight Training. Inspired by the adversarial training [15, 4], we attempt to adopt the same idea and create a BFA-based adversarial training as an alternative approach to compare with our proposed method. We modified the adversarial training objective in Eq. (2) to serve the purpose of adversarial weight training: + +$$ +\min _ {\{\mathbf {B} \}} \mathcal {L} (f (\boldsymbol {x}; \{\mathbf {B} \}), t) + \alpha \mathcal {L} (f (\boldsymbol {x}; \{\mathbf {B} \} + \{\mathbf {B} _ {\mathrm {B F A}} \}), t) \tag {8} +$$ + +$$ +s. t. \left\{\mathbf {B} _ {\mathrm {B F A}} \right\} = \left\{\hat {\mathbf {B}} \right\} - \left\{\mathbf {B} \right\} +$$ + +where $\{\mathbf{B}_{\mathrm{BFA}}\}$ is the different between BFA-perturbed weight bits $\{\hat{\mathbf{B}}\}$ and its BFA-free counterpart $\{\mathbf{B}\}$ . During the model training, $\{\mathbf{B}_{\mathrm{BFA}}\}$ is run-time generated as the additive constant offset on the model weights. + +The result of adversarial training is shown in Table 2, where it does not show the improvement of BFA resistance from such adversarial weight training. Our interpretation of the defense failure is summarized in the following. When performing the adversarial training with the adversarial examples, each natural image owns similar adversarial examples even with a different random seed. However, for the bit-flip based adversarial weight attack, using a single natural image as the attack sample will lead to massive different combinations of vulnerable weight bits, while BFA just provides one combination in a greedy way. Thus, performing the adversarial weight training with all the vulnerable weight bit combinations is not a feasible approach. In the end, through the comparison of all the potential defense methods listed in Table 2, we conclude that the binarization-aware training and the piecewise clustering are the effective defense methods. + +# 6. Analysis + +Effect of Network Width. In prior works [14, 7], enhance the capacity of target DNN via increasing the layer + +width is recognized as an effective method to defend adversarial example. In this work, it is expected that the DNN capacity also plays a positive role in defending against BFA. We summarize the performance of BFA by varying the width of the network in Table 3. + +Table 3: Effect of Network Width. The ResNet-20 [6] with different width configuration $(1 \times, 2 \times$ and $4 \times)$ are reported. All the networks use 8-bit quantization. + +
Baseline (1×)2×4×
ResNet-2028.0 ± 4.4726.2 ± 2.6836.4 ± 12.44
ResNet-20 (PC)58.79 ± 4.1447.2 ± 8.0472 ± 18.79
+ +In the first row of Table 3, we observe that ResNet-20 becomes more resilient to BFA with network width $4 \times$ than the baseline. However, the difference between the performance of the baseline and network with $2 \times$ width is barely distinguishable. In the second row of Table 3, a similar pattern is also observed utilizing our proposed piece-wise clustering method. Our proposed method with $4 \times$ width requires on average 72 bit-flips to cause complete malfunction of ResNet-20 architecture. In conclusion, similar to the observations from adversarial example [15, 7], increasing the network capacity by a large amount will enhance the robustness against BFA. + +Conclusion 1 Increasing the network capacity improves the resistance to bit-flip based adversarial weight attack. + +Effect of Batch-Normalization and Dropout Nowadays, the presence of Batch-Normalization (BN) layer in the deep neural network is customary to accelerate the training of DNN [11], by normalizing the hidden features that forwarded along the inference path. On the other hand, an adversarial weight attack introduces variance in the weight tensor through malicious bit-flips on the weight bits, which changes the hidden features correspondingly. Taken the batch normalization into consideration, we expect the BN layer to stabilize the hidden feature errors caused by the malicious weight bit-flips. As the result listed in Table 4, we remove the BN layer (case 2) from our baseline model (case 1). We observe that once the BN layer was removed from the VGG-11 network, it becomes more vulnerable to a weight attack requiring less than just 10 bit-flips to cause malfunction of DNN. Thus, we conclude Batch-Normalization is able to slightly stabilize the Bit-Flip errors. + +In addition to the batch-normalization, the conventional DNN regularization technique, such as dropout, is also used to enhance the resistance against adversarial example [23]. As shown in Table 4, we increase the dropout rate to 0.7 in + +Table 4: Effect of Dropout and Batch-Normalization (BN): In order to show this effect, we report $N_{\mathrm{BF}}$ for three cases: Case1. With BN and dropout ( $p = 0.2$ , $p$ is the dropout rate); this is the case we used throughout the experiments of other sections. Case 2. Without BN and dropout ( $p = 0.2$ ) to examine the effect of BN layer on BFA. Case 3. With BN and dropout ( $p = 0.7$ ) to examine the effect of dropout regularizer against BFA. For each of the three cases, we report $N_{\mathrm{BF}}$ for both vanilla VGG-11 and VGG-11 with Proposed Piece-wise Clustering (PC). + +
Method:w BN dropout (0.2)w/o BN dropout (0.2)w BN dropout (0.7)
VGG-1116.4 ± 1.149.2 ± 0.4224.6± 3.71
VGG-11 (PC)29.79 ± 11.38.8 ± 0.4432.79 ± 3.49
+ +case 3. The effect of dropout in resisting BFA is more eminent for vanilla VGG-11 architecture. However, for our case of piece-wise clustering dropout does not improve the robustness significantly. Nevertheless, in general, regularization techniques such as dropout are expected to prevent the network from over-fitting [13], subsequently slightly improve network resistance against both adversarial input [23] and weight attacks [17]. + +Conclusion 2 Regularization techniques, such as batch-normalization and dropout, are helpful in improving the resistance against BFA. + +# Will adversarial input defense method improve robustness against adversarial weight attack? or Vice Versa? + +In this section, we want to examine how adversarial input defense and weight parameter defense interplay in increasing the overall robustness of the network. To achieve this, we take the most popular adversarial input attack known as Projected Gradient Descent (PGD) [15]. We conduct PGD attack on our PC weight defense and observe that the network test accuracy after the PGD attack drops to $0.51\%$ in Table 5. Thus, our weight defense completely fails against a strong PGD input attack. Then, we reverse the role by attacking a strong input defense known as PGD Trained adversarial defense [15] with strong weight attack BFA [17]. Again, adversarial input defense fails to defend BFA, requiring even less number of $N_{\mathrm{BF}}$ than the baseline shown in Table 5. + +Conclusion 3 Improvement of network parameter robustness against BFA does not provide any guarantee of improvement of robustness against the vulnerability of input attack, and vice versa. + +Table 5: In this table we report the test accuracy after adversarial input attack (PGD [15]) on both adversarial input defense [15] and adversarial weight defense (proposed PC). Then Report $N_{\mathrm{BF}}$ after conducting BFA on both adversarial weight defense and input defense. + +
Method:Test Accuracy w/o Attack(%)Test Accuracy After PGD attack (%)NBF
Baseline91.840.4128.0 ± 4.47
Adversarial Training85.5140.0716.2 ± 2.95
Piece-wise Clustering90.020.5158.79 ± 4.14
+ +Directions to the Parameter Security of DNNs. Finally, we summarize the findings of this work in Table 6, which provides an enhanced guide of regulation to follow while constructing DNNs with higher BFA-resistance. Our weight binarization and its clustering relaxation provides the best solution so far in achieving network parameter immunity from BFA. Additionally, network width and certain key elements of the DNN architecture also build slight resilience against the BFA. + +Table 6: Checklist of investigations to improve the BFA resistance. + +
Directions to improve the BFA resistanceYesNo
1. Perform Weight Clustering (i.e., Binarization & PC)✓
2. Increase Network Capacity✓
3. Dropout, Batch-Norm Regularization✓
4. Adversarial Weight Training✓
5. Network Pruning✓
+ +# 7. Conclusion + +In this work, we tried to develop a comprehensive investigation of adversarial parameter security enhancement and provide several insightful observations for the future struggle against DNN parameter vulnerability. Based on those observations, we highlight potential successful directions to develop adversarial weight defense. Finally, through the comprehensive experiments, our proposed methods, especially binarization-aware training, are proven to improve the resistance against the emerging bit-flip based adversarial weight attack. + +Acknowledgement. This work is supported in part by the National Science Foundation under Grant No.2005209, No.1931871 and Semiconductor Research Corporation nCORE. + +# References + +[1] A. Athalye, N. Carlini, and D. Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. arXiv preprint arXiv:1802.00420, 2018. 6 +[2] Y. Bengio, N. Léonard, and A. Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432, 2013. 4 +[3] G. S. Dhillon, K. Azizzadenesheli, Z. C. Lipton, J. Bernstein, J. Kossaifi, A. Khanna, and A. Anandkumar. Stochastic activation pruning for robust adversarial defense. arXiv preprint arXiv:1803.01442, 2018. 6 +[4] I. J. Goodfellow, J. Shlens, and C. Szegedy. Explaining and harnessing adversarial examples. CoRR, abs/1412.6572, 2014. 7 +[5] I. J. Goodfellow, J. Shlens, and C. Szegedy. Explaining and harnessing adversarial examples. *ICLR*, 2015. 2, 3 +[6] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 3, 5, 7 +[7] Z. He, A. S. Rakin, and D. Fan. Parametric noise injection: Trainable randomness to improve deep neural network robustness against adversarial attack. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 588-597, 2019. 2, 7 +[8] S. Hong, P. Frigo, Y. Kaya, C. Giuffrida, and T. Dumitras. Terminal brain damage: Exposing the graceless degradation in deep neural networks under hardware fault attacks. arXiv preprint arXiv:1906.01017, 2019. 1 +[9] G. Huang, Z. Liu, K. Q. Weinberger, and L. van der Maaten. Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, volume 1, page 3, 2017. 1 +[10] I. Hubara et al. Binarized neural networks. In Advances in neural information processing systems, pages 4107-4115, 2016. 4 +[11] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International conference on machine learning, pages 448-456, 2015. 7 +[12] A. Krizhevsky, V. Nair, and G. Hinton. Cifar-10 (canadian institute for advanced research). URL http://www.cs.toronto.edu/kriz/cifar.html, 2010. 5 +[13] J. Liang and R. Liu. Stacked denoising autoencoder and dropout together to prevent overfitting in deep neural network. In 2015 8th International Congress on Image and Signal Processing (CISP), pages 697-701. IEEE, 2015. 8 +[14] A. Madry, A. Makelov, L. Schmidt, D. Tsipras, and A. Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017. 7 +[15] A. Madry, A. Makelov, L. Schmidt, D. Tsipras, and A. Vladu. Towards deep learning models resistant to adversarial attacks. In International Conference on Learning Representations, 2018. 2, 6, 7, 8 + +[16] A. Paszke, S. Gross, S. Chintala, G. Chanan, E. Yang, Z. Devito, Z. Lin, A. Desmaison, L. Antiga, and A. Lerer. Automatic differentiation in pytorch. 2017. 5 +[17] A. S. Rakin, Z. He, and D. Fan. Bit-flip attack: Crushing neural network with progressive bit search. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 1211-1220, 2019. 1, 2, 3, 5, 6, 8 +[18] M. Rastegari, V. Ordonez, J. Redmon, and A. Farhadi. Xnornet: Imagenet classification using binary convolutional neural networks. In European Conference on Computer Vision, pages 525-542. Springer, 2016. 4 +[19] K. Razavi, B. Gras, E. Bosman, B. Preneel, C. Giuffrida, and H. Bos. Flip feng shui: Hammering a needle in the software stack. In 25th {USENIX} Security Symposium ( {USENIX} Security 16), pages 1-18, 2016. 1 +[20] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 3, 5 +[21] K. Wang, Z. Liu, Y. Lin, J. Lin, and S. Han. Haq: Hardware-aware automated quantization. arXiv preprint arXiv:1811.08886, 2018. 6 +[22] S. Wang, X. Wang, S. Ye, P. Zhao, and X. Lin. Defending dnn adversarial attacks with pruning and logits augmentation. In 2018 IEEE Global Conference on Signal and Information Processing (GlobalSIP), pages 1144-1148. IEEE, 2018. 6 +[23] S. Wang, X. Wang, P. Zhao, W. Wen, D. Kaeli, P. Chin, and X. Lin. Defensive dropout for hardening deep neural networks under adversarial attacks. In Proceedings of the International Conference on Computer-Aided Design, page 71. ACM, 2018. 7, 8 +[24] Q. Xie, E. Hovy, M.-T. Luong, and Q. V. Le. Self-training with noisy student improves imagenet classification. arXiv preprint arXiv:1911.04252, 2019. 1 \ No newline at end of file diff --git a/defendingandharnessingthebitflipbasedadversarialweightattack/images.zip b/defendingandharnessingthebitflipbasedadversarialweightattack/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..93397396120fc6fd5ba8f47dd58aeabfd9742b56 --- /dev/null +++ b/defendingandharnessingthebitflipbasedadversarialweightattack/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5786d2b719b4d9e5f8c8c6460f4822e7bc114ca541b56e7148078990ece7f02c +size 503887 diff --git a/defendingandharnessingthebitflipbasedadversarialweightattack/layout.json b/defendingandharnessingthebitflipbasedadversarialweightattack/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..bfff08db5801d1c979bff19da22f21510320badc --- /dev/null +++ b/defendingandharnessingthebitflipbasedadversarialweightattack/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fa117b1f9e7576fe4caec04e9d783e79223cd071e5dbaa31c4f8428021d19a8 +size 396217 diff --git a/deformablesiameseattentionnetworksforvisualobjecttracking/c593fc25-65da-462c-8450-cedd11d5c183_content_list.json b/deformablesiameseattentionnetworksforvisualobjecttracking/c593fc25-65da-462c-8450-cedd11d5c183_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e3b4d597fbb659a42c82556be69c3f951c3077c0 --- /dev/null +++ b/deformablesiameseattentionnetworksforvisualobjecttracking/c593fc25-65da-462c-8450-cedd11d5c183_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:460dc06c782522b9ab77bf61120a1210dc822edab0928f6fd10e3da10653de47 +size 71944 diff --git a/deformablesiameseattentionnetworksforvisualobjecttracking/c593fc25-65da-462c-8450-cedd11d5c183_model.json b/deformablesiameseattentionnetworksforvisualobjecttracking/c593fc25-65da-462c-8450-cedd11d5c183_model.json new file mode 100644 index 0000000000000000000000000000000000000000..24d66dbe295de3167efa0b61dc7c05b1df5f91d2 --- /dev/null +++ b/deformablesiameseattentionnetworksforvisualobjecttracking/c593fc25-65da-462c-8450-cedd11d5c183_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ebf4a2ba926aa04a390886002aacf26e0b81f49fe3db6f0181b4fa7606bfe75 +size 89522 diff --git a/deformablesiameseattentionnetworksforvisualobjecttracking/c593fc25-65da-462c-8450-cedd11d5c183_origin.pdf b/deformablesiameseattentionnetworksforvisualobjecttracking/c593fc25-65da-462c-8450-cedd11d5c183_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a2619a2dfb789791a9eda20afa292e59b272f078 --- /dev/null +++ b/deformablesiameseattentionnetworksforvisualobjecttracking/c593fc25-65da-462c-8450-cedd11d5c183_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:194b1c59dd231858049e34f2554873e4fd9393e172f1f9babfa8f6e5a2ad72cd +size 611242 diff --git a/deformablesiameseattentionnetworksforvisualobjecttracking/full.md b/deformablesiameseattentionnetworksforvisualobjecttracking/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4a35e383fb83eebfc86e7dce4524dc8e83bcb970 --- /dev/null +++ b/deformablesiameseattentionnetworksforvisualobjecttracking/full.md @@ -0,0 +1,284 @@ +# Deformable Siamese Attention Networks for Visual Object Tracking + +Yuechen Yu, Yilei Xiong, Weilin Huang†, Matthew R. Scott Malong Technologies + +{rogyu, yilxiong, whuang, mscott}@malong.com + +# Abstract + +Siamese-based trackers have achieved excellent performance on visual object tracking. However, the target template is not updated online, and the features of the target template and search image are computed independently in a Siamese architecture. In this paper, we propose Deformable Siamese Attention Networks, referred to as SiamAttn, by introducing a new Siamese attention mechanism that computes deformable self-attention and cross-attention. The self-attention learns strong context information via spatial attention, and selectively emphasizes interdependent channel-wise features with channel attention. The cross-attention is capable of aggregating rich contextual interdependencies between the target template and the search image, providing an implicit manner to adaptively update the target template. In addition, we design a region refinement module that computes depth-wise cross correlations between the attentional features for more accurate tracking. We conduct experiments on six benchmarks, where our method achieves new state-of-the-art results, outperforming the strong baseline, SiamRPN++ [24], by $0.464 \rightarrow 0.537$ and $0.415 \rightarrow 0.470$ EAO on VOT 2016 and 2018. + +# 1. Introduction + +Visual object tracking aims to track a given target object at each frame over a video sequence. It is a fundamental task in computer vision [17, 16, 20], and has numerous practical applications, such as automatic driving [23], human-computer interaction [28], robot sensing, etc. Recent efforts have been devoted to improving the performance of visual object trackers. However, developing a fast, accurate and robust tracker is still highly challenging due to the vast amount of deformations, motions and occlusions that often occur on video objects with complex background [38, 22, 10]. + +Deep learning technologies have significantly advanced the task of visual object tracking, by providing the strong + +![](images/f5046b6fa105c97250a2f59ca216057d6976493a4a64e5df183849f805678664.jpg) +Figure 1: Tracking results of our deformable Siamese attention networks (SiamAttn) with three state-of-the-art trackers. Our results are more accurate, and are robust to appearance changes, complex background and close distractors with occlusions. Fig. 4 further shows the strong discriminative features learned by our Siamese attention module. + +capacity of learning powerful deep features. For example, Bertinetto et al. [1] first introduced Siamese networks for visual tracking. Since then, object trackers built on Siamese networks and object detection frameworks have achieved the state-of-the-art performance, such as SiamRPN [25], SiamRPN++ [24], and SiamMask [36]. The Siamese-based trackers formulate the problem of visual object tracking as a matching problem by computing cross-correlation similarities between a target template and a search region, which transforms the tracking problem into finding the target object from an image region by computing the highest visual similarity [1, 25, 24, 36, 44]. Therefore, it casts the tracking problem into a Region Proposal Network (RPN) [13] based detection framework by leveraging Siamese networks, which is the key to boost the performance of recent deep trackers. + +Siamese-based trackers are trained completely offline by using massive frame pairs collected from videos, and thus + +the target template can not be updated online. This makes it difficult to precisely track the targets with large appearance variations, significant deformations, or occlusions, which inevitably increase the risk of tracking drift. Furthermore, the convolutional features of the target object and the search image are computed independently in Siamese architecture, where background context information is completely discarded in target features, but is of great importance to distinguish the target from close distractors and complex backgrounds. Recent work attempted to enhance the target representation by integrating the features of previous targets [41, 14], but the discriminative context information from the background is ignored. Alternatively, we introduce a new Siamese attention mechanism that encodes rich background context into the target representation by computing cross-attention in the Siamese networks. + +Recently, the attention mechanism was introduced to visual object tracking in [35, 45], which inspired the current work. However, the attentions and deep features of the target template and the search image are computed separately in [35, 45], which limits the potential performance of the Siamese architecture. In this work, we propose Deformable Siamese Attention Networks, referred as SiamAttn, to improve the feature learning capability of Siamese-based trackers. We present a new deformable Siamese attention which can improve the target representation with strong robustness to large appearance variations, and also enhance the target discriminability against distractors and complex backgrounds, resulting in more accurate and stable tracking, as shown in Fig. 1. The main contributions of this work are: + +- We introduce a new Siamese attention mechanism that computes deformable self-attention and cross-attention jointly. The self-attention captures rich context information via spatial attention, and at the same time, selectively enhances interdependent channel-wise features with channel attention. The cross-attention aggregates meaningful contextual dependencies between the target template and the search image, which are encoded into the target template adaptively to improve discriminability. +- We design a region refinement module by computing depth-wise cross correlations between the attentional features. This further enhances feature representations, leading to more accurate tracking by generating both bounding box and mask of the object. +- Our method achieves new state-of-the-art results on six benchmarks. It outperforms recent strong baselines, such as SiamRPN++ [24] and SiamMask [36], by a large margin. For example, it improves SiamRPN++ by $0.464 \rightarrow 0.537$ and $0.415 \rightarrow 0.470$ (EAO) on VOT 2016 and 2018, while keeping real-time running speed using ResNet-50 [15]. + +# 2. Related Work + +Correlation filter based trackers have been widely used since MOSSE [3], due to their efficiency and expansibility. However, the tracking object can be continuously improved online, which inevitably limits the representation ability of such trackers. Deep learning technologies provide a powerful tool with the ability to learn strong deep representations, and recent work attempted to incorporate the correlation filter framework with such features learning capability, such as MDNet [31], C-COT [8], ECO [7] and GFS-DCF [40]. + +There is another trend to build trackers on Siamese networks, by learning from massive data offline. Bertinetto et al. [1] first introduced SiamFC for visual tracking, by using Siamese networks to measure the similarity between target and search image. Then Li et al. [25] applied a region proposal network (RPN) [13] into Siamese networks, referred as SiamRPN. Zhu et al. [44] extended the SiamRPN by developing distractor-aware training. Recently, SiamDW-RPN [43] and SiamRPN++ [24] were proposed, which allow the Siamese-based trackers to explore deeper networks, while Wang et al. [36] developed a SiamMask that incorporates instance segmentation into tracking. Our work is related to that of [11] where a C-RPN was developed to progressively refine the location of target with a sequence of RPNs, but we design a new module that only refines a single output region, which is particularly lightweight and can be integrated into very deep Siamese networks. + +However, Siamese-based trackers can be affected by distractors with complex backgrounds. Recent work attempted to design various strategies to update the template online, in an effort to improve the target-discriminability of Siamese-based trackers, such as MLT [4], UpdateNet [42] and GradNet [26]. An alternative solution is to extend existing online discriminative framework with deep networks for end-to-end learning, e.g., ATOM [6] and DiMP [2]. In addition, Zhu et al. [45] exploited motion information in Siamese networks to improve the feature representation. + +Recently, the attention mechanism has been widely applied in various tasks. Hu et al. [18] proposed a SENet to enhance the representational power of the networks by modeling channel-wise relationships via attentions. Wang et al. [37] developed a non-local operation in the space-time dimension to guide the aggregation of contextual information. In [12], a self-attention mechanism was introduced to harvest the contextual information for semantic segmentation. Particularly, Wang et al. [35] proposed a RASNet by developing an attention mechanism for Siamese trackers, but it only utilizes the template information, which might limit its representation ability. To better explore the potentials of feature attentions in Siamese networks, we compute both self-attention and cross-branch attention jointly with deformable operations to enhance the discriminative representation of target. + +![](images/f089e6d8b59bace16e2a0cbe67449c2f465e166e8cf0bd72870238104aeb4689.jpg) +Figure 2: An overview of the proposed Deformable Siamese Attention Networks (SiamAttn). It consists of a deformable Siamese attention (DSA) module, Siamese region proposal networks (SiamRPN) and a region refinement module. The features of the last three stages are extracted and then modulated by the DSA module. It generates two-stream attentional features which are fed into SiamRPN blocks to predict a single tracking region, further refined by the refinement module. + +# 3. Deformable Siamese Attention Networks + +We describe the details of our Deformable Siamese Attention Networks (SiamAttn). As shown in Fig. 2, it consists of three main components: a deformable Siamese attention (DSA) module, Siamese region proposal networks (Siamese RPN), and a region refinement module. + +Overview. We use a five-stage ResNet-50 as the backbone of Siamese networks, which computes increasingly high-level features as the layers become deeper. The features of the last three stages on both Siamese branches can be modulated and enhanced by the proposed DSA module, generating two-stream attentional features. Then we apply three Siamese RPN blocks described in [24] to the attentional features, generating dense response maps, which are further processed by a classification head and a bounding box regression head to predict a single tracking region. Finally, the generated tracking region is further refined by a region refinement module, where depth-wise cross correlations are computed on the two-stream attentional features. The correlated features are further fused and enhanced, and then are used for refining the tracking region via joint bounding box regression and target mask prediction. + +# 3.1. Siamese-based Trackers + +Bertinetto et al. [1] introduced Siamese networks for visual object tracking, which formulates visual object tracking as a similarity learning problem. Siamese networks consist of a pair of CNN branches with sharing parameters $\phi$ , + +which are used to project the target image $(z)$ and the search image $(x)$ into a common embedding space, where a similarity metric $g$ can be computed to measure the similarity between them, $g(\phi(x), \phi(z))$ . Li et al. [25] applied region proposal networks (RPN) [13] with Siamese networks for visual object tracking (referred as SiamRPN), where the computed features $\phi(x)$ and $\phi(z)$ are fed into the RPN framework using an up-channel cross-correlation operation. This generates dense response maps where RPN-based detection can be implemented, leading to significant performance improvements. + +SiamRPN++. In [24], SiamRPN++ was introduced to improve the performance of SiamRPN, by exploring the power of deeper networks. A spatial aware sampling strategy was developed to address a key limitation of the Siamese-based trackers, allowing them to benefit from a deeper backbone likes ResNet-50. Furthermore, SiamRPN++ adopts a depth-wise cross correlation to replace the up-channel cross correlation, which reduces the number of parameters and accelerates the training process. Moreover, it aggregates multi-layer features to predict the target more accurately. Similarly, we use ResNet-50 as backbone, with depth-wise cross correlation and multi-layer aggregation strategy, by following SiamRPN++ [24]. But we introduce a new Siamese attention module that enhances the learned discriminative representations of the target object and the search image, which is the key to improve the tracking performance on both accuracy and robustness. + +![](images/7a106d98560f5457f69a6a32a5dd8d1b8c91a020a87c178f0428aec9ad0ad93b.jpg) +Figure 3: The proposed Deformable Siamese Attention (DSA) module, which consists of two sub-modules: self-attention sub-module and cross-attention sub-module. It takes template features and search features as inputs, and computes corresponding attentional features. The self-attention can learn strong context information via spatial attention, and at the same time, selectively emphasizes interdependent channel-wise features with channel attention. The cross-attention aggregates rich contextual interdependencies between the target template and the search image. + +# 3.2. Deformable Siamese Attention Module + +As illustrated in Fig. 3, the proposed DSA module takes a pair of convolutional features computed from Siamese networks as inputs, and outputs the modulated features by applying the Siamese attention mechanism. The DSA module consists of two sub-modules: a self-attention sub-module and a cross-attention sub-module. We denote the feature maps of the target and the search image as $\mathbf{Z}$ and $\mathbf{X}$ , with feature shapes of $C\times h\times w$ and $C\times H\times W$ . + +Self-Attention. Inspired by [12], our self-attention submodule attends to two aspects, namely channels and special positions. Unlike the classification or detection task where object classes are pre-defined, visual object tracking is a class-agnostic task and the class of object is fixed during the whole tracking process. As observed in [24], each channel map of the high-level convolutional features usually responses for a specific object class. Equally treating the features across all channels will hinder the representation ability. Similarly, as limited by receptive fields, the features computed at each spatial position of the maps can only capture the information from a local patch. Therefore, it is crucial to learn the global context from the whole image. + +Specifically, self-attention is computed separately on the target branch and the search branch, and both channel self-attention and spatial self-attention are calculated at each branch. Taking the spatial self-attention for example. Sup + +pose the input features are $\mathbf{X} \in \mathbb{R}^{C \times H \times W}$ , we first apply two separate convolution layers with $1 \times 1$ kernels on $\mathbf{X}$ to generate query features $\mathbf{Q}$ and key features $\mathbf{K}$ respectively, where $\mathbf{Q}, \mathbf{K} \in \mathbb{R}^{C' \times H \times W}$ and $C' = \frac{1}{8} C$ is the reduced channel number. The two features are then reshaped to $\bar{\mathbf{Q}}, \bar{\mathbf{K}} \in \mathbb{R}^{C' \times N}$ where $N = H \times W$ . We can generate a spatial self-attention map $\mathbf{A}_{\mathrm{S}}^{\mathrm{S}} \in \mathbb{R}^{N \times N}$ via matrix multiplication and column-wise softmax operations as, + +$$ +\mathbf {A} _ {\mathrm {S}} ^ {\mathrm {S}} = \operatorname {s o f t m a x} _ {c o l} \left(\bar {\mathbf {Q}} ^ {T} \bar {\mathbf {K}}\right) \in \mathbb {R} ^ {N \times N}. \tag {1} +$$ + +Meanwhile, a $1 \times 1$ convolution layer with a reshape operation is applied to the features $\mathbf{X}$ to generate value features $\bar{\mathbf{V}} \in \mathbb{R}^{C \times N}$ , which are multiplied with the attention map and then are added to the reshaped features $\bar{\mathbf{X}} \in \mathbb{R}^{C \times N}$ with a residual connection as, + +$$ +\bar {\mathbf {X}} _ {\mathrm {S}} ^ {\mathrm {S}} = \alpha \bar {\mathbf {V}} \mathbf {A} _ {\mathrm {S}} ^ {\mathrm {S}} + \bar {\mathbf {X}} \in \mathbb {R} ^ {C \times N}. \tag {2} +$$ + +where $\alpha$ is a scalar parameter. The outputs are then reshaped back to the original size as $\mathbf{X}_{\mathrm{S}}^{\mathrm{S}}\in \mathbb{R}^{C\times H\times W}$ + +We can compute channel self-attention $\mathbf{A}_{\mathrm{C}}^{\mathrm{S}}$ and the channel-wise attentional features $\mathbf{X}_{\mathrm{C}}^{\mathrm{S}}$ in a similar manner. Notice that on computing the channel self-attention and the corresponding attentional features, the query, key and value features are the original convolutional features computed directly from the Siamese networks, without implementing + +![](images/62b90b63ac961d98cb17df52ae07c5e2d3489e029610c7b7f50edc192b58354f.jpg) +Search Image +Figure 4: Visualization of confidence maps. The $1^{st}$ column: search images, the $2^{nd}$ column: confidence maps without our DSA module, and the $3^{rd}$ column: confidence maps with DSA module which enhances target-background discriminability in the computed attentional features. + +![](images/c377c86c35ca11854de1be0719c50b8911c0f0320b68dda72f6025d51c9f2c48.jpg) +w/o DSA Module + +![](images/21f9d1b30e65b7cf64b324ebe4789c24392822cd0ef2fa654189904f38b01aff.jpg) +w/ DSA Module + +$1 \times 1$ convolutions. The final self-attentional features $\mathbf{X}^{\mathrm{S}}$ are generated by simply combining the spatial and channel-wise attentional features using element-wise sum. + +Cross-Attention. Siamese networks usually make predictions in the last stage, while the features from two branches are computed separately, but may compensate each other. It is common that multiple objects appear at the same time, even with occlusions during tracking. Therefore, it is of great importance for the search branch to learn the target information, which enables it to generate a more discriminative representation that helps identify the target more accurately. Meanwhile, the target representation can be more meaningful when the contextual information from the search image is encoded. To this end, we propose a cross-attention sub-module to learn such mutual information from two Siamese branches, which in turn allows the two branches to work more collaboratively. + +Specifically, we use $\mathbf{Z} \in \mathbb{R}^{C \times h \times w}$ and $\mathbf{X} \in \mathbb{R}^{C \times H \times W}$ to denote template features and search features, respectively. Taking the search branch for example, we first reshape the target features $\mathbf{Z}$ to $\bar{\mathbf{Z}} \in \mathbb{R}^{C \times n}$ where $n = h \times w$ . Then we compute the cross-attention from the target branch by performing similar operations as channel self-attention, + +$$ +\mathbf {A} ^ {\mathrm {c}} = \operatorname {s o f t m a x} _ {r o w} \left(\bar {\mathbf {Z}} \bar {\mathbf {Z}} ^ {T}\right) \in \mathbb {R} ^ {C \times C}. \tag {3} +$$ + +where row-wise softmax is implemented on the computed matrix. Then the cross-attention computed from the target + +branch is encoded into the search features $\mathbf{X}$ as, + +$$ +\bar {\mathbf {X}} ^ {\mathcal {C}} = \gamma \mathbf {A} ^ {\mathcal {C}} \bar {\mathbf {X}} + \bar {\mathbf {X}} \in \mathbb {R} ^ {C \times N}. \tag {4} +$$ + +where $\gamma$ is a scalar parameter, and the reshaped features $\mathbf{X}^{\mathbf{C}}\in \mathbb{R}^{C\times H\times W}$ are the output of the sub-module. + +Finally, the self-attentional features $\mathbf{X}^{\mathrm{S}}$ and the cross-attentional features $\mathbf{X}^{\mathrm{C}}$ are simply combined with an element-wise sum, generating the attentional features for the search image. The attentional features for target image can be computed in a similar manner. + +Deformable Attention. The building units in CNNs, such as convolution or pooling units, often have fixed geometric structures, by assuming the objects are rigid. For object tracking, it is of importance to model complex geometric transformations because the tracking objects usually have large deformations due to various factors, such as viewpoint, pose, occlusion and so on. The proposed attention mechanism can handle such challenges to some extent. We further introduce deformable attention to enhance the capability for handling such geometric transformations. + +The deformable attention can sample the input feature maps at variable locations instead of the fixed ones, making them attend to the content of objects with deformations. Therefore, it is particularly suitable for object tracking, where the visual appearance of a target can be changed significantly over time. Specifically, a $3 \times 3$ deformable convolution [5] is further applied to the computed attentional features, generating the final attentional features which are more accurate, discriminative and robust. As shown in Fig. 4, with our DSA module, the confidence maps of the attentional features focus more accurately on the interested objects, making the objects more discriminative against distractors and background. + +Region Proposals. The DSA module outputs Siamese attentional features for both target image and search image. Then we apply three Siamese RPN blocks on the attentional features for generating a set of target proposals, with corresponding bounding boxes and class scores, as shown in Fig. 2. Specifically, a Siamese RPN block is a combination of multiple fully convolutional layers, depth-wise cross correlation, with a regression head and a classification head on top, as described in [25]. It takes a pair of convolutional features computed from the two branches of Siamese networks, and outputs dense prediction maps. By following [24], we apply three Siamese RPN blocks for the Siamese features computed from the last three stages, generating three prediction maps which are further combined by a weighted sum. Each spatial position of the combined maps predicts a set of region proposals, corresponding to the pre-defined anchors. Then the predicted proposal with the highest classification score is selected as the output tracking region. + +# 3.3. Region Refinement Module + +We further develop a region refinement module to improve the localization accuracy of the predicted target region. We first apply depth-wise cross correlations between the two attentional features across multiple stages, generating multiple correlation maps. Then the correlation maps are fed into a fusion block, where the feature maps with different sizes are aligned in both spatial and channel domains, e.g., by using up-sampling or down-sampling, with $1 \times 1$ convolution. Then the aligned features are further fused (with element-wise sum) for predicting both bounding box and mask of the target. Besides, we further perform two additional operations: (1) we combine the convolutional features of the first two-stages into the fused features, which encodes richer local detailed information for mask prediction; (2) a deformable RoI pooling [5] is applied to compute target features more accurately. Bounding box regression and mask prediction often require different levels of convolutional features. Thus we generate the convolutional features with spatial resolutions of $64 \times 64$ for mask prediction and $25 \times 25$ for bounding box regression. + +Notice that the classification head is not applied since visual object tracking is a class-agnostic task. The input resolution for the bounding box head is $4 \times 4$ . By using two fully-connected layers with 512 dimensions, the bounding box head predicts a 4-tuple $t = (t_x, t_y, t_w, t_h)$ . Similarly, the input of mask prediction head has a spatial resolution of $16 \times 16$ . By using four convolutional layers and a de-convolutional layer, the mask head predicts a class-agnostic binary mask with $64 \times 64$ for the tracking object. Compared to ATOM [6] and SiamMask [36] which predict bounding boxes and masks densely, our refinement module uses light-weight convolutional heads to predict a bounding box and a mask for a single tracking region, which is much more computationally efficient. + +# 3.4. Training Loss + +Our model is trained in an end-to-end fashion, where the training loss is a weighted combination of multiple functions from Siamese RPN and region refinement module: + +$$ +\begin{array}{l} L = L _ {\text {r p n - c l s}} + \lambda_ {1} L _ {\text {r p n - r e g}} + \tag {5} \\ \lambda_ {2} L _ {\text {r e f i n e - b o x}} + \lambda_ {3} L _ {\text {r e f i n e - m a s k}}. \\ \end{array} +$$ + +where $L_{\mathrm{rpn-cls}}$ and $L_{\mathrm{rpn-reg}}$ refer to a classification loss and a regression loss in Siamese RPN. We employ a negative log-likelihood loss and a smooth L1 loss correspondingly. Similarly, $L_{\mathrm{refine-box}}$ and $L_{\mathrm{refine-mask}}$ indicate a smooth L1 loss for bounding box regression and a binary cross-entropy loss for mask segmentation in region refinement module. The weight parameters $\lambda_1$ , $\lambda_2$ and $\lambda_3$ are used to balance different tasks, which are empirically set to 0.2, 0.2 and 0.1 in our implementation. + +# 4. Experiments and Results + +We conduct extensive experiments on six benchmark databases: OTB-2015 [38], UAV123 [29], VOT2016 [21], VOT2018 [22], LaSOT [10] and TrackingNet [30] datasets and provide ablation study to verify the effects of each proposed component. + +# 4.1. Datasets + +OTB-2015 [38]. OTB-2015 is one of the most commonly used benchmarks for visual object tracking. It has 100 fully annotated video sequences using two evaluation metrics, a precision score and an area under curve (AUC) of success plot. The precision score is the percentage of frames in which the distance between the center of tracking results and ground-truth is under 20 pixels. The success plot shows the ratios of successfully tracked frames with various thresholds. + +VOT2016 [21] & VOT2018 [22]. VOT2016 and VOT2018 are widely-used benchmarks for visual object tracking. VOT2016 contains 60 sequences with various challenging factors while VOT2018 has 10 different sequences with VOT2016. The two datasets are annotated with the rotated bounding boxes, and a reset-based methodology is applied for evaluation. For both benchmarks, trackers are measured in terms of accuracy (A), robustness (R), and expected average overlap (EAO). + +UAV123 [29]. UAV123 contains 123 sequences captured from low-altitude UAVs. Unlike other tracking datasets, the viewpoint of UAV123 is aerial and the targets to be tracked are usually small. + +LaSOT [10]. LaSOT is a large-scale dataset with 1400 sequences in total, and 280 sequences in test set. high-quality dense annotations are provided, and deformation and occlusion are very common in LaSOT. The average sequence length of LaSOT is 2500 frames, demonstrating long-term performance of the evaluated trackers. + +TrackingNet [30]. TrackingNet contains 30000 sequences with 14 million dense annotations and 511 sequences in the test set. It covers diverse object classes and scenes, requiring trackers to have both discriminative and generative capabilities. + +# 4.2. Implementation Details + +We use ResNet-50, pre-trained on ImageNet [9], as the backbone, and the whole networks are then fine-tuned on the training sets of COCO [27], YouTube-VOS [39], LaSOT [10] and TrackingNet [30]. We apply stochastic gradient descent (SGD) with a momentum of 0.9 and a weight decay of $10^{-5}$ for optimization. By following SiamFC [1], we adopt an exemplar image of $127 \times 127$ and a search image of $255 \times 255$ for training and testing. + +Our model is trained for 20 epochs. By following SiamRPN++ [24], we use a warm-up learning rate of $10^{-3}$ + +![](images/2cff93399c375bb16c3495f5ab5a0c0b161a6871e3a440fbb171333720ce7038.jpg) +(a) Precision Plot +Figure 5: Comparisons with state-of-the-art methods on success and precision plots on OTB-2015 dataset. + +![](images/eaba7c19a2b50a52649103be5f22a6f52f6430c82cfbd6a3f90c948aa8e0c63c.jpg) +(b) Success Plot + +for the first 5 epochs which decays exponentially from $5 \times 10^{-3}$ to $5 \times 10^{-4}$ for the last 15 epochs. The weights of backbone are frozen for the first 10 epochs, then the whole networks are trained end-to-end for the last 10 epochs. In particular, the learning rate of backbone is 20 times smaller than the other parts. Batch size is set to 12. Our anchor boxes have 5 aspect ratios, [0.33, 0.5, 1, 2, 3]. In Siamese-RPN blocks, an anchor box is labelled as positive when it has an IoU $>0.6$ , or as negative when IoU $<0.3$ . Other patches whose IoU overlap falls in between are ignored. In addition, we sample 16 regions from each image with IoU $>0.5$ for training our region refinement module. + +For the backbone networks, we employ dilated convolutions for the last two blocks to increase the receptive fields, and the effective strides at these two blocks are reduced from 16 or 32 pixels to 8 pixels. We also reduce the number of feature channels to 256 for the last three blocks of the backbone networks via a $1 \times 1$ convolution layer. During inference, cosine window penalty, scale change penalty and linear interpolation update strategy [25] are applied. Only one single region with the highest score predicted by Siamese RPN blocks is fed into our region refinement module. Our method is implemented using PyTorch, and we use NVIDIA GeForce RTX 2080Ti GPU. + +# 4.3. Comparisons with the State-of-the-art + +On OTB-2015. Fig. 5 shows quantitative results on OTB-2015 dataset. Our tracker achieves the best AUC and precision score among all methods for this widely studied dataset. Specifically, we obtain a precision of 0.712 and an AUC of 0.926 which surpass that of SiamRPN++ [24] by $1.6\%$ and $1.2\%$ , respectively. + +On VOT2016 & VOT2018. The results on VOT2016 and VOT2018 are compared in Tab. 1. Our tracker achieves 0.68 accuracy, 0.14 robustness and 0.537 EAO on VOT2016, outperforming the state-of-the-art methods under all metrics. Compared with recent SiamRPN++ [24] and SiamMask [36], our method has significant improvements of $7.3\%$ and $9.5\%$ on EAO respectively. On + +
TrackerVOT2016VOT2018
A↑R↓EAO↑A↑R↓EAO↑
SiamFC [1]0.530.460.2350.500.590.188
MDNet [31]0.540.340.257---
C-COT [8]0.540.240.3310.490.320.267
FlowTrack [45]0.580.240.334---
SiamRPN [25]0.560.260.344---
C-RPN [11]0.59-0.363---
ECO [7]0.550.200.3750.480.280.276
DaSiamRPN [44]0.610.220.4110.590.280.383
SPM [34]0.620.210.434---
SiamMask-Opt [36]0.670.230.4420.640.300.387
UpdateNet [42]0.610.210.481--0.393
GFS-DCF [40]---0.510.140.397
ATOM [6]---0.590.200.401
SiamRPN++ [24]0.640.200.4640.600.230.415
Dimp-50 [2]---0.600.150.440
Ours0.680.140.5370.630.160.470
+ +Table 1: Results on VOT2016 and VOT2018, with accuracy (A), robustness (R) and expected average overlap (EAO). + +
ARCF [19]ECO [7]SiamRPN [25]DaSiam- RPN [44]SiamRPN++ [24]ATOM [6]Dimp-50 [2]Ours
AUC0.470.5250.5270.5860.6130.6440.6540.650
Pr0.670.7410.7480.7960.807--0.845
+ +Table 2: Results on UAV123. + +VOT2018, our method achieves the top EAO score while having competitive accuracy and robustness with other state-of-the-art methods. SiamMask-Opt [36] attains the best accuracy by finding the optimal rotated rectangle from a binary mask, which however increases the computational cost significantly, and reduces its fps to 5. Our method only uses a single rotated minimum bounding rectangle from the predicted mask, which achieves a comparable accuracy of 0.63, but has a large improvement on EAO, $0.387 \rightarrow 0.470$ , with a real-time running speed at 33 fps. Compared with SiamRPN++ and recent leading tracker Dimp-50 [2], our tracker obtains a clear performance gain of $5.5\%$ and $3.0\%$ respectively in terms of EAO, demonstrating the efficiency of the proposed Siamese attention and refinement module. + +On UAV123. As shown in Tab. 2, SiamAttn attains the best precision, improving the closest one: SiamRPN++, from 0.807 to 0.845, while having a comparable AUC with DiMP-50 which did not report the precision score. + +On LaSOT. Tab. 3 shows the comparison results on LaSOT with long sequences. Our method attains the best normalized precision, outperforming SiamRPN++ considerably by $56.9\% \rightarrow 64.8\%$ (with $49.5\% \rightarrow 56.0\%$ on success). Again, our method has a comparable success score with DiMP-50, while attaining a higher normalized precision. + +On TrackingNet. We further evaluate SiamAttn on the large-scale TrackingNet. As illustrated in Tab. 4, it outper + +
MLT [4]MDNet [31]DaSiam- RPN [44]Update- Net [42]SiamRPN++ [24]ATOM [6]Dimp-50 [2]Ours
Success(%)34.539.741.547.549.551.556.956.0
Norm.Pr(%)-46.049.656.056.957.664.364.8
+ +Table 3: Results on LaSOT. + +
GFS-DCF [40]DaSiam-RPN [44]Update-Net [42]ATOM [6]SPM [34]SiamRPN++ [24]Dimp-50 Ours [2]
Success(%)60.963.867.770.371.273.374.0
Norm.Pr(%)71.273.375.277.177.880.080.1
+ +Table 4: Results on TrackingNet. + +
MethodA↑R↓EAO↑ΔEAO
Baseline0.640.200.464-
Baseline+ML0.660.210.477+1.3%
Baseline+RR0.670.190.486+2.2%
Baseline+RR+SA0.660.160.511+4.7%
Baseline+RR+CA0.670.150.513+4.9%
+ +Baseline+RR+CA+SA (Ours) 0.68 0.14 0.537 +7.3% +Table 5: Ablation study on VOT2016. SiamRPN++ is baseline. ML: Mask Learning, RR: Region Refinement (including ML), SA: Self-Attention, and CA: Cross-Attention. + +forms all previous methods consistently. Compared with the most recent DiMP-50, SiamAttn has improvements of $1.2\%$ on success, and $1.6\%$ on normalized precision, demonstrating its ability to handle diverse objects over complex scenes. + +# 4.4. Ablation Study + +We study the impact of individual components in SiamAttn, and conduct ablation study on VOT2016. + +Model Architecture. We use SiamRPN++ [24] as baseline. As shown in Tab. 5, SiamRPN++ achieves an EAO of 0.464. By adding mask learning layers to SiamRPN++, the EAO can be improved to 0.477. With our region refinement module, the EAO score is further increased by $+2.2\%$ . Compared with the baseline, the accuracy score improves from 0.64 to 0.67, with comparable robustness. Our Siamese attention consists of both self-attention and cross-attention, each of which can further improve the EAO by $+4.7\%$ or $+4.9\%$ respectively. This suggests that the proposed cross-attention is critical to the tracking results, and even has a more significant impact than the self-attention. Jointly exploring both self-attention and cross-attention makes our method not only robust, but also more accurate. This results in a high EAO of 0.537, surpassing the baseline by a large margin of $7.3\%$ . + +Deformable Layers. In this study, we evaluate the impact of deformable operations by replacing them with a regular convolution. As shown in Tab. 6, this results in slight performance drops, e.g., $0.537 \rightarrow 0.520$ EAO with deformable convolution and $0.537 \rightarrow 0.531$ EAO with + +
Deformable convolutionDeformable PoolingA↑R↓EAO↑
××0.670.150.516
×✓0.670.150.520
✓×0.680.150.531
✓✓0.680.140.537
+ +Table 6: The impact of deformable layers on VOT2016. + +
MethodTraining setA↑R↓EAO↑
SiamAttnVID, YTB-BB, COCO, DET, YTB-VOS0.680.150.525
SiamAttnCOCO, YTB -VOS, LaSOT, TrackingNet0.680.140.537
+ +Table 7: Results on VOT2016 with training sets as listed. + +deformable pooling. By removing all deformable layers, our model can still achieve an EAO of 0.516, compared favorably against SiamRPN++ with 0.464, suggesting that the proposed Siamese attention and refinement modules are the primary contributors to the performance boost. + +On Training Data. In this study, we investigate the impact of training with different training sets. Our current results are achieved by using a combination of multiple training sets from recent LaSOT [10] and TrackingNet [30], with COCO [27] and YouTube-VOS [39], mainly following [6] with an additional YouTube-VOS [39] for providing mask annotations. We also report the results on a different training combination applied by [36], including COCO [27], YouTube-VOS [39], YouTube-BoundingBox [32], ImageNet-VID, and ImageNet-Det [33]. Results are reported in Tab. 7. Using the recent large-scale tracking datasets can improve the results with $1.2\%$ EAO on VOT2016, while our approach can still achieve the state-of-the-art performance using a different choice of the training sets. + +Speed Analysis. On OTB-2015, UAV, LaSOT and TrackingNet benchmarks, our model predicts axis-aligned bounding box, without mask head. It can achieve an inference speed of 45 fps. On VOT benchmarks, our model generates the rotated boxes from the predicted masks, which reduces the inference speed to 33 fps. + +# 5. Conclusion + +We have presented new Deformable Siamese Attention Networks for visual object tracking. We introduce a deformable Siamese attention mechanism consisting of both self-attention and cross-attention. The new Siamese attention can strongly enhance target discriminability, and at the same time, improve the robustness against large appearance variations, complex backgrounds and distractors. Additionally, a region refinement module is designed to further increase the tracking accuracy. Extensive experiments are conducted on six benchmarks, where our method obtains new state-of-the-art results, with real-time running speed. + +# References + +[1] Luca Bertinetto, Jack Valmadre, Joao F Henriques, Andrea Vedaldi, and Philip HS Torr. Fully-convolutional siamese networks for object tracking. In ECCV, 2016. +[2] Goutam Bhat, Martin Danelljan, Luc Van Gool, and Radu Timofte. Learning discriminative model prediction for tracking. In ICCV, 2019. +[3] David S Bolme, J Ross Beveridge, Bruce A Draper, and Yui Man Lui. Visual object tracking using adaptive correlation filters. In CVPR, 2010. +[4] Janghoon Choi, Junseok Kwon, and Kyoung Mu Lee. Deep meta learning for real-time target-aware visual tracking. In ICCV, 2019. +[5] Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable convolutional networks. In ICCV, 2017. +[6] Martin Danelljan, Goutam Bhat, Fahad Shahbaz Khan, and Michael Felsberg. Atom: Accurate tracking by overlap maximization. In CVPR, 2019. +[7] Martin Danelljan, Goutam Bhat, Fahad Shahbaz Khan, and Michael Felsberg. Eco: Efficient convolution operators for tracking. In CVPR, 2017. +[8] Martin Danelljan, Andreas Robinson, Fahad Shahbaz Khan, and Michael Felsberg. Beyond correlation filters: Learning continuous convolution operators for visual tracking. In ECCV, 2016. +[9] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. +[10] Heng Fan, Liting Lin, Fan Yang, Peng Chu, Ge Deng, Sijia Yu, Hexin Bai, Yong Xu, Chunyuan Liao, and Haibin Ling. Lasot: A high-quality benchmark for large-scale single object tracking. In CVPR, 2019. +[11] Heng Fan and Haibin Ling. Siamese cascaded region proposal networks for real-time visual tracking. In CVPR, 2019. +[12] Jun Fu, Jing Liu, Hajjie Tian, Yong Li, Yongjun Bao, Zhiwei Fang, and Hanqing Lu. Dual attention network for scene segmentation. In CVPR, 2019. +[13] Ross Girshick. Fast r-cnn. In ICCV, 2015. +[14] Qing Guo, Wei Feng, Ce Zhou, Rui Huang, Liang Wan, and Song Wang. Learning dynamic siamese network for visual object tracking. In ICCV, 2017. +[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. +[16] David Held, Sebastian Thrun, and Silvio Savarese. Learning to track at 100 fps with deep regression networks. In ECCV, 2016. +[17] João F Henriques, Rui Caseiro, Pedro Martins, and Jorge Batista. High-speed tracking with kernelized correlation filters. IEEE transactions on pattern analysis and machine intelligence, 37(3):583-596, 2014. +[18] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In CVPR, 2018. +[19] Ziyuan Huang, Changhong Fu, Yiming Li, Fuling Lin, and Peng Lu. Learning aberrance repressed correlation filters for real-time uav tracking. In ICCV, 2019. + +[20] Zdenek Kalal, Krystian Mikolajczyk, and Jiri Matas. Tracking-learning-detection. TPAMI, 34(7):1409-1422, 2011. +[21] M Kristan, A Leonardis, J Matas, M Felsberg, R Pflugfelder, L Čehovin, T Vojír, G Häger, A Lukežić, G Fernández, et al. The visual object tracking vot2016 challenge results. Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 9914:777-823, 2016. +[22] Matej Kristan, Ales Leonardis, Jiri Matas, Michael Felsberg, Roman Pflugfelder, Luka Cehovin Zajc, Tomas Vojir, Goutam Bhat, Alan Lukezic, Abdelrahman Eldesokey, et al. The sixth visual object tracking vot2018 challenge results. In ECCV, 2018. +[23] Kuan-Hui Lee and Jenq-Neng Hwang. On-road pedestrian tracking across multiple driving recorders. IEEE Transactions on Multimedia, 17(9):1429-1438, 2015. +[24] Bo Li, Wei Wu, Qiang Wang, Fangyi Zhang, Junliang Xing, and Junjie Yan. Siamrpn++: Evolution of siamese visual tracking with very deep networks. In CVPR, 2019. +[25] Bo Li, Junjie Yan, Wei Wu, Zheng Zhu, and Xiaolin Hu. High performance visual tracking with siamese region proposal network. In CVPR, 2018. +[26] Peixia Li, Boyu Chen, Wanli Ouyang, Dong Wang, Xiaoyun Yang, and Huchuan Lu. Gradnet: Gradient-guided network for visual object tracking. In ICCV, 2019. +[27] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ECCV, 2014. +[28] Liwei Liu, Junliang Xing, Haizhou Ai, and Xiang Ruan. Hand posture recognition using finger geometric feature. In ICPR, 2012. +[29] Matthias Mueller, Neil Smith, and Bernard Ghanem. A benchmark and simulator for uav tracking. In ECCV, 2016. +[30] Matthias Muller, Adel Bibi, Silvio Giancola, Salman Alsubaihi, and Bernard Ghanem. Trackingnet: A large-scale dataset and benchmark for object tracking in the wild. In ECCV, 2018. +[31] Hyeonseob Nam and Bohyung Han. Learning multi-domain convolutional neural networks for visual tracking. In CVPR, 2016. +[32] Esteban Real, Jonathon Shlens, Stefano Mazzocchi, Xin Pan, and Vincent Vanhoucke. Youtube-boundingboxes: A large high-precision human-annotated data set for object detection in video. In CVPR, 2017. +[33] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. IJCV, 115(3):211-252, 2015. +[34] Guangting Wang, Chong Luo, Zhiwei Xiong, and Wenjun Zeng. Spm-tracker: Series-parallel matching for real-time visual object tracking. In CVPR, 2019. +[35] Qiang Wang, Zhu Teng, Junliang Xing, Jin Gao, Weiming Hu, and Stephen Maybank. Learning attentions: residual attentional siamese network for high performance online visual tracking. In CVPR, 2018. + +[36] Qiang Wang, Li Zhang, Luca Bertinetto, Weiming Hu, and Philip HS Torr. Fast online object tracking and segmentation: A unifying approach. In CVPR, 2019. +[37] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, 2018. +[38] Yi Wu, Jongwoo Lim, and Ming-Hsuan Yang. Online object tracking: A benchmark. In CVPR, 2013. +[39] Ning Xu, Linjie Yang, Yuchen Fan, Jianchao Yang, Dingcheng Yue, Yuchen Liang, Brian Price, Scott Cohen, and Thomas Huang. Youtube-vos: Sequence-to-sequence video object segmentation. In ECCV, 2018. +[40] Tianyang Xu, Zhen-Hua Feng, Xiao-Jun Wu, and Josef Kittler. Joint group feature selection and discriminative filter learning for robust visual object tracking. In ICCV, 2019. +[41] Tianyu Yang and Antoni B. Chan. Learning dynamic memory networks for object tracking. In ECCV, 2018. +[42] Lichao Zhang, Abel Gonzalez-Garcia, Joost van de Weijer, Martin Danelljan, and Fahad Shahbaz Khan. Learning the model update for siamese trackers. In ICCV, 2019. +[43] Zhipeng Zhang and Houwen Peng. Deeper and wider siamese networks for real-time visual tracking. In CVPR, 2019. +[44] Zheng Zhu, Qiang Wang, Bo Li, Wei Wu, Junjie Yan, and Weiming Hu. Distractor-aware siamese networks for visual object tracking. In ECCV, 2018. +[45] Zheng Zhu, Wei Wu, Wei Zou, and Junjie Yan. End-to-end flow correlation tracking with spatial-temporal attention. In CVPR, 2018. \ No newline at end of file diff --git a/deformablesiameseattentionnetworksforvisualobjecttracking/images.zip b/deformablesiameseattentionnetworksforvisualobjecttracking/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..3455b3afab143a5d66cf351ec0a46717977f4073 --- /dev/null +++ b/deformablesiameseattentionnetworksforvisualobjecttracking/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c9b2cdbd50f101b1cb4f9fb6d24b686f913f8611c4d31a8913b412eb35dbc2f +size 522259 diff --git a/deformablesiameseattentionnetworksforvisualobjecttracking/layout.json b/deformablesiameseattentionnetworksforvisualobjecttracking/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..75af81c5a9d8a68f7db33a2d13f4b1443b384d51 --- /dev/null +++ b/deformablesiameseattentionnetworksforvisualobjecttracking/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6341f993bd6bf1130e812e2040b928be42d2e5a206d27ce908a1ece2e66ab860 +size 359735 diff --git a/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/279983dd-58c4-4b37-bf58-426eb5c9af0b_content_list.json b/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/279983dd-58c4-4b37-bf58-426eb5c9af0b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..6fb3d9761d9a6abbe583392cc3b5903d42603fc6 --- /dev/null +++ b/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/279983dd-58c4-4b37-bf58-426eb5c9af0b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe09629fb6a7a4f4c1444c14ac5cfe9d80571d1e2241bdbb0f5fc40b60842ae6 +size 75040 diff --git a/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/279983dd-58c4-4b37-bf58-426eb5c9af0b_model.json b/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/279983dd-58c4-4b37-bf58-426eb5c9af0b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ba2c98ed249a70fff58914c5b402adfa06a7da15 --- /dev/null +++ b/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/279983dd-58c4-4b37-bf58-426eb5c9af0b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22ab4f35100bb86426cdb271a07785e8ef52390fb24e74ca4bdbab2050a68dd2 +size 95010 diff --git a/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/279983dd-58c4-4b37-bf58-426eb5c9af0b_origin.pdf b/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/279983dd-58c4-4b37-bf58-426eb5c9af0b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f576ce923dc0e269303aa1a71c0cbde884bcf518 --- /dev/null +++ b/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/279983dd-58c4-4b37-bf58-426eb5c9af0b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3b3e983d82dbd6ab5123db923f86049569f32b567c86e905bbd821af8e7b1a1 +size 1692868 diff --git a/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/full.md b/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5020953402092438c42dcf07b29399be368d039e --- /dev/null +++ b/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/full.md @@ -0,0 +1,299 @@ +# Deformation-aware Unpaired Image Translation for Pose Estimation on Laboratory Animals + +Siyuan Li $^{1}$ , Semih Günel $^{1,3}$ , Mirela Ostrek $^{1}$ , Pavan Ramdya $^{3}$ , Pascal Fua $^{1}$ , and Helge Rhodin $^{1,2}$ + +$^{1}$ CVLAB, EPFL, Lausanne + $^{2}$ Imager Lab, UBC, Vancouver + $^{3}$ Neuroengineering Lab, EPFL, Lausanne + +# Abstract + +Our goal is to capture the pose of real animals using synthetic training examples, without using any manual supervision. Our focus is on neuroscience model organisms, to be able to study how neural circuits orchestrate behaviour. Human pose estimation attains remarkable accuracy when trained on real or simulated datasets consisting of millions of frames. However, for many applications simulated models are unrealistic and real training datasets with comprehensive annotations do not exist. We address this problem with a new sim2real domain transfer method. Our key contribution is the explicit and independent modelling of appearance, shape and pose in an unpaired image translation framework. Our model lets us train a pose estimator on the target domain by transferring readily available body keypoint locations from the source domain to generated target images. We compare our approach with existing domain transfer methods and demonstrate improved pose estimation accuracy on Drosophila melanogaster (fruit fly), Caenorhabditis elegans (worm) and Danio rerio (zebrafish), without requiring any manual annotation on the target domain and despite using simplistic off-the-shelf animal characters for simulation, or simple geometric shapes as models. Our new datasets, code and trained models will be published to support future computer vision and neuroscientific studies. + +# 1. Introduction + +Deep learning-based pose estimation on images has evolved into a practical tool for a wide range of applications, as long as sufficiently large training databases are available. However, in very specialized domains there are rarely large annotation databases. For example, neuroscientists need to accurately capture the poses of all the appendages of + +![](images/4e08940c28d9377785567fce047801eb06141b963b6887afc7802f8744b88e9e.jpg) +Figure 1. Approach. Our most morphologically complex example is the six-legged Drosophila: a) We transfer synthetic images and their keypoint annotations to realistically looking images using only unpaired examples of the two domains. b) Our method enables training of a pose detector that c) can be applied to real images for neuroscientific studies. + +fruit flies, as pose dynamics are crucial for drawing inferences about how neural populations coordinate animal behavior. Publicly available databases for such studies are rare and current annotation techniques available to create such a database are tedious and time consuming, even when semiautomated. Given the existence of motion simulators, an apparently simple workaround would be to synthesize images of flies in various poses and use these synthetic images for training purposes. Although image generation algorithms can now generate very convincing deepfakes, existing image translation algorithms do not preserve pose geometrically when the gap between a synthetic source and a real target is large. This is critical to our application, as creating matching high-fidelity images would be time consuming. + +In this paper, we introduce a novel approach to generate realistic images of different kinds of laboratory animals—flies, fish, and worms—from synthetic renderings for which labels such as keypoint annotations are readily available. + +![](images/9fec60e776ca98ad14d7f3e681c032936ded5e594c2f8b308229870c39b144d9.jpg) +Figure 2. Domain examples with large discrepancy in appearance, shape and pose. Translating from rendering to real images requires bridging the domain gap without having pixel nor pose correspondences. It is particularly challenging in our setting, as even the realistic fly character shows significant differences in shape (body and limb width) as well as pose (legs stretched). + +![](images/857bdde2fb364761b262d59be1bd79f51e53ad687a1d2a88edd6f55de3d090ce.jpg) +Figure 3. Generalization to humans. Our method also applies to human pose transfer undergoing large shape changes. + +The generated realistic images can then be used to train a deep network that operates on real images, as shown in Fig. 1. The challenge is to condition the generated images in such a way that the keypoints (e.g. skeleton joint positions) in the simulated source transfer to the realistic target; despite large differences in shape and pose as well as for small training sets that are practical, see Fig. 2. + +We model the change of 2D pose and shape in terms of a deformation field. This field is then paired with an imaged-to-image translator that synthesizes appearance while preserving geometry, as shown in Fig. 4. Our approach is inspired by earlier approaches modeling human faces [59] and brain scans [6]. We go beyond these studies in two important ways. First, we introduce silhouettes as an intermediate representation that facilitates independent constraints (loss terms) on shape and appearance. It stabilizes training to succeed without reference images and helps to separate explicit geometric deformation from appearance changes. Furthermore, end-to-end training on unpaired examples is enabled with two discriminators and a straight-through estimator for non-differentiable thresholding operation and patch-wise processing. Second, to cope with large-scale as well as small-scale shape discrepancies, we introduce a hierarchical deformation model to separate global scaling, translation, and rotation from local deformation. + +We test our method on flies (Drosophila melanogaster), worms (Caenorhabditis elegans) and larval zebrafish + +(Danio rerio), see Fig. 2, and compare it against state-of-the-art approaches that rely either on circularity constraint or hand-defined factorizations of style and content. We also show the advantage over classical domain adaptation [47], which can not cope with large geometric differences. Not only does our method generate more realistic images, but more importantly, when we use the images it generates to train pose estimators we get more accurate results. Nothing in our approach is specific to the animals we worked with and that could also be applied just as well to limbed vertebrates, including rodents and primates, as shown in Fig. 3 for person to person transfer with large shape differences. + +Our code and fly dataset is available on github. + +# 2. Related Work + +We present a method for spatially consistent image domain adaptation and pose estimation. In the following sections, we discuss recent advances towards this goal. + +Pose Estimation. Deep learning based human pose estimation methods have recently made great progress. This is especially true for capturing human movements for which there is enough annotated data to train deep networks [49, 16, 25, 43, 27, 1]. A large corpus of the literature focuses on prediction of 2D key points from images directly [31, 53, 46, 15, 55, 54]. There is also a wide literature on capturing 3D pose directly from images, or as a function of 2D keypoints instead [35, 29, 39, 32, 61, 44, 33]. Weakly [60] and semi-supervised algorithms [50] can further improve the performance of motion capture systems, for example by using multi-view constraints [38, 56]. + +Approaches designed primarily for human pose have recently been transferred to study large animals, like cheetahs and lab mice [30]. [63] uses a model based algorithm, trains on synthetic renderings, and refines on real zebra photographs. However, their quadruped body model does not translate to animals with a different number of legs and the suggested direct training on synthetic images for initialization did not succeed in our experiments, likely because realistic models are not available for our cases. + +For pose estimation in Drosophila, DeepLabCut provides a user-friendly interface to DeeperCut [30], LEAP [34] tracks limb and appendage landmarks, and DeepFly3D leverages multiple views to capture 3D pose [13]. Nevertheless, all these methods require large amounts of manual labels, which are not available for many animals and cannot be reused when recording the same species in different environments and illumination conditions. + +Paired Image-to-Image Translation. Supervised image-to-image translation methods aim to translate images across domains (e.g., day-to-night, summer-to-winter, photo-topainting), often using adversarial methods [17] to learn a mapping from input to output images. More recent studies + +![](images/56438aa0cb8f496d2582aa3dee61e04e554fe0c861521b96636aaf6216117425.jpg) +Figure 4. Overview of our deformation-based image translation method. Our model has two steps. In the first step, the deformation from source domain A to target domain B is estimated for input image $\mathbf{I}^A$ and it's silhouette $\mathbf{S}^A$ via network $G_{S}$ and a Spatial Transformer Network (STN). Their output is an explicit deformation field parameterized by the global, affine transformation $\theta$ and a local, non-linear warping $\phi$ , using a spatial integral layer (SIL). Then, the deformed silhouette is transformed into the full output image $\hat{\mathbf{I}}^B$ with image generator $G_{I}$ . Discriminators $D_{S}$ and $D_{I}$ enable unpaired training. $D_{S}$ uses the Straight Through Estimator (STE) for backpropagation. + +have aimed to translate edges to images [41] and cascaded networks are used to condition on semantic label maps [5]. However, in our setting, no paired examples are available. + +Style Transfer. Style transfer is an image-to-image translation method that works on unpaired examples, aiming to transfer the input style while preserving the geometry of the target image [11, 20, 9, 48]. Initial deep learning approaches optimized an image with respect to the Gram matrix statistics of deep features of the target image [10, 11]. More recent studies tested other architectures and loss functions [24] and use a contextual loss to transfer the style at the semantic level [28, 19]. Our work differs from style transfer as we support significant changes in pose and shape. + +Unsupervised Image Domain Translation. Another line of work trains neural networks on unpaired examples for domain translation, including sim2real mappings. Early approaches used weight-sharing [26, 62] and sharing of specific content features [4, 42]. The cycle consistency in Cycle-GAN, which assumes bijective mapping between two domains, can map from zebra to horse [62, 23, 14], but bridging large deformations across domains, such as for going from cat to dog and even more in our case (see Fig. 2), requires alternative network architectures [12] or intermediate keypoint representations [52]; However, none of the methods discussed above establish a fine-grained, dense spatial correspondence between source and target, which prevents accurate transfer of desired keypoint locations. + +Deformation networks. Explicit deformation has been used in diverse contexts. The spatial transformer network (STN) made affine and non-parametric spatial deformations popular as a differentiable network layer [18]. These approaches have been used to zoom in on salient objects [37], disentangle shape and appearance variations in an image collection [59], and register (brain scan) images to a common, learned template image [6, 2, 22, 40]. [8] introduced global transformation into the Cycle-GAN framework. While similar in spirit, additional advances beyond these approaches are still required to model deformations faithfully on our unpaired translation task. + +# 3. Method + +Our goal is to translate pose annotations and images from a synthetic domain $A$ to a target domain $B$ for which only unpaired images $\{\mathbf{I}_i^A\}_{i=1}^N$ and $\{\mathbf{I}_i^B\}_{i=1}^K$ exist. In our application scenario, the target examples are frames of video recordings of a living animal and the source domain are simple drawings or computer graphics renderings of a character animated with random deformations of the limbs. Both domains depict images of the same species, but in different pose, shape, and appearance. + +Fig. 4 summarizes our approach. To tackle the problem of translating between domains while preserving pose correspondence, we separately transfer spatially varying shape changes via explicit deformation of the source images via + +an intermediate silhouette representation $\hat{\mathbf{S}}^B$ (Section 3.1). Subsequently, we locally map from silhouette to real appearance (Section 3.2). The final goal is to train a pose estimator on realistic images from synthetic examples (Section 3.3). Our challenge then becomes to train neural networks for each, without requiring any paired examples or keypoint annotation on the target domain. To this end, we set up adversarial networks that discriminate differences with respect to the target domain statistics. Learning of the image translation is performed jointly on the objective + +$$ +\mathcal {L} = \mathcal {L} _ {I} + \mathcal {L} _ {S} + \mathcal {R} _ {\mathcal {D}}, \tag {1} +$$ + +where $\mathcal{L}_I$ and $\mathcal{L}_S$ are the adversarial losses on generated segmentation and image, and $\mathcal{R}_D$ is a regularizer on the deformation grid. Besides images $\mathbf{I}$ , our method operates on segmentation masks $\mathbf{S}$ of the same resolution. The domain origin is denoted with superscripts— $\mathbf{I}^A$ , and the domain target (real images) is denoted $\mathbf{I}^B$ . We use several generator and discriminator networks, which we denote $G$ and $D$ , respectively, with subscripts differentiating the type— $G_I$ . We explain each step in the following section. + +# 3.1. Spatial Deformation + +Our experiments showed that using a single, large discriminator, as done by existing techniques, leads to overfitting and forces the generator to hallucinate, due to the limited and unrealistic pose variability of the simulated source. We model shape explicitly through the intermediate silhouette representation and its changes with a per-pixel deformation field, as shown in Fig. 5. The silhouette lets us setup independent discriminators with varying receptive field; large for capturing global shape and small to fill-in texture. Moreover, the deformation field enables the desired pose transfer while bridging large shape discrepancies. + +The first stage is a generator that takes a synthetic image $\mathbf{I}^A$ and mask $\mathbf{S}^A$ as input, and outputs a deformed segmentation mask $\hat{\mathbf{S}}^B$ that is similar to the shapes in $B$ . To model global deformation, we use a spatial transformer network (STN) [18] that takes the synthetic image $\mathbf{I}^A \in \mathbb{R}^{C,H,W}$ as input, and outputs an affine matrix $\theta \in \mathbb{R}^{3,4}$ , which models global scaling, translation and rotation differences between the source and target domains. It is trained jointly with a fully-convolutional generator network, $G_S$ , which takes the globally transformed image as input and outputs $\phi \in \mathbb{R}^{2,H,W}$ , a per-pixel vector field that models fine-grained differences in pose and shape. The vector at pixel location $x$ in $\phi$ points to the pixel in the source domain that corresponds to $x$ . Overlaying the source pixels of selected rows and columns of $\phi$ leads to the deformed grid visualized in Fig. 5. This hierarchical representation allows us to cope with varying degrees of discrepancies between the two domains. We refer to the combined application of these two networks as $\phi \otimes \theta \otimes \mathbf{S}^A$ , where $\theta = \mathrm{STN}(\mathbf{I}^A)$ , + +![](images/0c765a020b61df7a072a94e3a4bf273a89c8810e2aa625a67d8ce92d8877a8c8.jpg) +Figure 5. Explicit deformation ensures transfer of keypoints. The deformation field is inferred as part of a) source image segmentation to target image segmentation transfer (including global, affine transformation) and b) segmentation to target image translation. c) The same deformation field is applied to transfer known keypoints from source to target. + +$\phi = G_{S}(\theta \otimes \mathbf{I}^{A})$ , and $\otimes$ denotes the transformation by global and local deformation. + +Training the STN and $G_{S}$ requires silhouettes in $A$ and $B$ . Silhouettes $\mathbf{S}^{A}$ in the source domain are trivially obtainable from synthetic characters by rendering them on a black background. It is relatively easy to estimate $\mathbf{S}^{B}$ on a static background for the target domain as datasets are obtained in controlled lab environments. We will later demonstrate that our model is robust to remaining errors in segmentation. + +The difficulty of our task is that all domain examples are unpaired, hence, a constraint can only be set up in the distributional sense. Thus, we train a shape discriminator $D_{S}$ alongside $G_{S}$ and STN and train them alternately to minimize and maximize the adversarial loss + +$$ +\begin{array}{l} \mathcal {L} _ {S} = \mathcal {L} _ {G A N} \left(G _ {\mathbf {S}}, D _ {\mathbf {S}}, \mathbf {S} ^ {A}, \mathbf {S} ^ {B}\right) \tag {2} \\ = \mathbb {E} _ {\mathbf {S} ^ {B}} \left[ \log D _ {S} \left(\mathbf {S} ^ {B}\right) \right] + \mathbb {E} _ {\mathbf {S} ^ {A}} \left[ \log \left(1 - D _ {S} \left(\phi \otimes \theta \otimes \mathbf {S} ^ {A}\right)\right) \right], \\ \end{array} +$$ + +where the expectation is built across the training set of $A$ and $B$ . The adversarial loss is paired with the regularizer + +$$ +\mathcal {R} _ {D} = \alpha \left(\left\| \nabla \phi_ {x} (A) \right\| ^ {2} + \left\| \nabla \phi_ {y} (A) \right\| ^ {2}\right) + \beta \left\| \phi (A) \right\|, (3) +$$ + +to encourage smoothness by penalizing deformation magnitude and the gradients of the deformation field, as in [59]. + +The inputs of the discriminator are binary masks from source domain $A$ and target domain $B$ . However, the deformed masks are no longer binary on the boundary because of the interpolation required for differentiation. Thus, it would be trivial for $D_S$ to discriminate against the real and synthesized masks based on non-binary values. To overcome this issue, we threshold to get a binary mask. Although the threshold operation is not differentiable, we can still estimate the gradients with respect to $G_S$ using + +a straight through estimator (STE) [58], which treats the threshold as the identity function during backpropagation, and therefore passes the gradients on to the previous layer. + +Implementation details. Directly outputting a vector field leads to foldovers that make the training unstable. Instead, we parameterize it as the gradient of the deformation field $\phi$ , and enforce positivity to prevent foldovers as in [59]. $\phi$ can be recovered by summing the gradients across the image. The deformation from $A$ to $B$ is implemented with a spatial transformer layer (STL) that infers the value of deformed pixel locations by bilinear interpolation [18] and is differentiable. In contrast to [59], we use a fully convolutional network to learn the local deformation field. The $G_{S}$ network consists of 3 Resnet blocks between downsampling/upsampling layers. The receptive field of the network is 64 pixels, $1/2$ of the image. + +The STN network consists of 5 convolutional layers and a fully connected stub to output $\theta$ that is preceded by max-pooling and SELU units (this yielded better results in preliminary experiments, compared to ReLU activations). + +# 3.2. Appearance Transfer + +Once the shape discrepancies between the two domains have been estimated by $\phi, \theta$ , we then generate the appearance of the target domain on the deformed silhouettes $\hat{\mathbf{S}}^B = \phi \otimes \theta \otimes \mathbf{S}^A$ . We deploy a generator $G_I$ that is configured to preserve the source shape, only filling in texture details. The input is $\hat{\mathbf{S}}^B$ and the output is a realistic image $\hat{\mathbf{I}}^B$ that matches the appearance of the target domain. We use a discriminator $D_I$ for training, as synthetic and real images are unpaired. In addition, our choice of using the silhouette as an intermediate representation allows us to introduce a supervised loss on silhouette $\mathbf{S}_{\mathbf{I}^B}$ , computed from real images $\mathbf{I}^B$ using background subtraction. The training objective is + +$$ +\mathcal {L} _ {I} = \lambda \mathcal {L} _ {G A N} \left(G _ {I}, D _ {I}, \mathbf {I} ^ {A}, \mathbf {I} ^ {B}\right) + \left\| G _ {I} \left(\mathbf {S} _ {\mathbf {I} ^ {B}}\right) - \mathbf {I} ^ {B} \right\|, \tag {4} +$$ + +where the GAN loss is defined as before and the second part is the supervised loss which stabilizes training. + +Training the supervised loss in isolation without end-to-end training with the adversarial losses leads to artifacts since neither the synthesized nor silhouettes from real images are perfect, see Fig. 6. + +The pose distribution of the simulated character can differ even after local and global deformation as some pose differences cannot be explained by an image deformation. For instance, the occlusion effects of crossing legs on Drosophila cannot be undone as a 2D image transformation. A discriminator with a large receptive field could detect these differences and re-position legs at locations without correspondence in the source. To counteract this issue, we make sure $D_{I}$ has a small receptive field. This is possible without suffering from texture artifacts since the global + +![](images/f00bf7c6ae66f7e0ea2c78d8e99f06477a52d97e819bebb1a84524b9192e5920.jpg) +Figure 6. Texture discriminator influence. Without the adversarial discriminator, the image generator is disturbed by an irregular silhouette boundary. In our model, the adversarial $D_{I}$ creates a link to the deformed silhouettes $\hat{S}^{B}$ enabling end-to-end training. + +![](images/2d3d4d84e7fcd0924d87e56562760438e50d2c38a632276bb7708f9ed72017b8.jpg) + +![](images/97224724198a79eace4885a12f3cf2d3533f0c0460ebc0e3a41e42f5d0d6c45d.jpg) + +shape deformation is already compensated by $G_{S}$ and the texture can be filled in locally. + +Implementation details. We use a 7-layer U-Net generator as our backbone network for image translation with $G_{I}$ . The skip connections in the U-Net help the network preserve the spatial information. For $D_{I}$ , we use a patchwise discriminator, consisting of three 4x4 convolutional layers; the first one with stride two and the second one with instance normalization. All activation functions are leaky ReLU. The small receptive field of the patch discriminator additionally helps to maintain the spatial structure of the object and was sufficient in our experiment to reproduce the real appearances faithfully. + +# 3.3. Pose Estimation + +We use the stacked hourglass network architecture for pose estimation [31]. Stacked hourglass is a fullyconvolutional network with several bottlenecks that takes an image $\mathbf{I}$ and outputs a heatmap $\mathbf{H}$ of the same aspect ratio but at four times lower resolution due to pooling at the initial layers. The heatmaps $\mathbf{H}$ are a stack of 2D probability maps with Gaussian distribution, where the maximum value of each channel in the stack indicates one specific joint location. Because our source images are synthesized from 3D character models, we can use the virtual camera matrix to project 3D keypoints, such as the knee joint, onto the image. + +To obtain annotations in the target domain, we conveniently use the image deformation operation $\hat{\mathbf{H}}^B = \phi \otimes \theta \otimes \mathbf{H}^A$ to compute the deformed heatmap $\hat{\mathbf{H}}^B$ that matches to the synthesized target domain image $\hat{\mathbf{I}}^B = G_I(\phi \otimes \theta \otimes \mathbf{I}^A)$ , with $\phi$ coming from $G_S$ and $\theta$ from the STN. Note, this is only possible due to the explicit handling of deformations. + +Having synthesized realistic examples of the target domain and transferred ground truth heatmaps, it remains to train the pose estimation network in a supervised manner. We use the $L_{2}$ loss between the predicted and ground truth heatmaps. At test time, we estimate the corresponding joint location as the argmax of the predicted heatmap, as usual + +in the pose estimation literature. Implementation details are given in the supplemental document. + +# 4. Evaluation + +In this section, we qualitatively compare our results to canonical baselines and variants of our algorithm, in order to highlight advantages and remaining shortcomings both visually and quantitatively. This includes the task of 2D keypoint localization on the target domain. We test our approach on different neuroscience model organisms in order to demonstrate varying complexity levels of deformation and generality to different conditions. Additional qualitative results and comparisons are given in the supplemental document. + +All input and output images are of dimension (128, 128). We operate on gray-scale images, i.e. channel dimension $C = 1$ , obtained from infrared cameras, which are commonly used in neuroscience experiments in order to avoid inadvertent visual stimulation. Nevertheless, our method extends naturally to color images. + +Datasets. We test on available zebrafish and worm image datasets, by [21] and [57, 45], using 500 and 1000 real images for unpaired training. To quantify pose estimation accuracy, we manually annotate a test set of 200 frames with three keypoints (tail and eyes) for the zebrafish and two points (head and tail) for the worm. In these datasets, the background is monochrome and is removed by color keying to obtain the foreground masks. Because of the simplicity of these models, we use a simple, static stick figure as a source image that is augmented by uniformly random rotation and translation. Fig. 7 gives example images. + +For human examples in Fig. 3, we use two walking sequences from `endlessreference` of a slim and ample man with length 250 and 137 frames, respectively, to train our unpaired image translation model. + +Our most challenging test case is the Drosophila fly. We use the subset of the dataset published alongside [13], which contains transitions between different speeds of walking, grooming and standing captured from a side view and includes annotations for five keypoints for each of the fully-visible legs (four joints and tarsus tip). In this dataset, the fly is tethered to a metal stage of a microscope and the body remains stationary, yet the fly can walk on a freely rotating ball (spherical treadmill), see Fig. 7. To get the target domain segmentation masks, we first crop out the ball and background clutter with a single coarse segmentation mask. This mask is applied to all images due to the static camera setup. The body, including the legs, is then segmented by color keying on the remaining black background. Please note, that at test time, no manual segmentation is used. We use 815 real images for unpaired training and 200 manually annotated images for testing. On the source side, we render + +![](images/20f02edc9250111d9d9abf97f42d41d1c3cd0ed2a8a7ddde256976fafe62bc91.jpg) +Figure 7. Qualitative comparison. Existing unpaired image translation methods can generate realistic images on worm and fish, but exhibit artifacts for the thin legs of the Drosophila and zebrafish examples. Ours succeeds on all three classes. + +1500 synthetic images using an off-the-shelf Maya model from turbosquid.com. The source motion is a single robotic walk cycle from [36] which we augment by adding random Gaussian noise to the character control handles. This increases diversity but may lead to unrealistic poses that our deformation network helps to correct. + +Metrics. The pose estimation accuracy is estimated as the root mean squared error (RMSE) of predicted and ground truth 2D location and percentage of correct keypoints (PCK), the ratio of predicted keypoints below a set threshold. We report results for thresholds ranging from 2 to 45 pixels. We also provide accumulated error histograms and the average PCK difference as the area under the curve (AUC) of the error histogram, to analyze the consistency of the improvements. + +In many cases, it is impossible, even for a human, to uniquely identify the leg identity for Drosophila. As in [13], we therefore only evaluate the three entirely visible legs. Moreover, we find at test time the optimal leg assignment across the three legs and refer to these permutation invariant (PI) metrics PI-RMSE, PI-PCK, and PI-AUC. Because the worm is tail-head symmetric, we compute errors for front-to-back and back-to-front ordering of joints and return the minimum. The pose estimation task lets us quantify the made improvements, both due to more realistically generated images (image quality), as well as the preservation of correspondences (geometric accuracy) since the lack of one would already lead to poor pose estimation. + +To independently quantify the image quality, we use the structural similarity (SSIM) index [51]. We measure the similarity between all generated images $\hat{\mathbf{I}}^B$ (for every $\mathbf{I}^A$ in A) with a pseudo-randomly sampled reference image $\mathbf{I}^B$ . + +
TaskD.M.C.E.D.E.
Fast-Style-Transfer0.39320.05390.6385
Cycle-GAN0.65430.90340.8504
Gc-GAN0.63920.89150.8586
Ours0.67460.90760.8771
+ +Baselines. We compare to Fast-Style-Transfer [7], which combines [10, 20, 48], Cycle-GAN [62] and Gc-GAN [8]. With the latter being a state-of-the-art method for image to image translation and the former used to validate that simpler solutions do not succeed. + +We compare pose estimation with the same architecture, trained directly on the synthetic images, images generated by the above mentioned methods, and on manual annotations of real training images (185 for Drosophila, 100 for worm, and 100 for fish). To also compare to domain adaptation methods, we adopt the pipeline of ADDA [47] for pose estimation. The original ADDA [47] transfers domains in a vector feature space. Instead, we use the hourglass network for feature extraction, replacing the vector space into spatial feature maps which preserves the spatial pose information. The supplemental document provides additional details. + +# 4.1. Quality of Unpaired Image Translation + +The quality of Cycle and Gc-GAN is comparable to ours on the simple worm and fish domains, as reflected visually in Fig. 7 and quantitatively in terms of SSIM in Table 1. For Drosophila, our method improves image quality (0.67 vs. 0.39, 0.63 and 0.65). Albeit the core of explicit deformation was to transfer pose annotations across domains, this analysis shows that an explicit mapping and incorporation of silhouettes regularizes and leads to improved results. For instance, it ensures that thin legs of the fly are completely reconstructed and that exactly six legs are synthesized, while Cycle-GAN and Gc-GAN hallucinate additional partial limbs. + +# 4.2. Pose Domain Transformation + +Fig. 8 shows that our method faithfully transfers 2D keypoints, obtained for free on synthetic characters, to the target domain. The transferred head and tail keypoints on the worm and fish correspond precisely to the respective locations in the synthesized images, despite having a different position and constellation in the source. This transfer works equally well for the more complex Drosophila case. Only occasional failures happen, such as when a leg is behind or in front of the torso, rendering it invisible in the silhouette. Moreover, the eyes of the fish are not well represented in the silhouette and therefore sometimes missed by our silhouette deformation approach. + +![](images/9f8d69c96193d79b251290ffb9192ff3a60b2e606aa2c3dee92b2fbbd6f14d3f.jpg) +Figure 8. Automatic Pose Annotation. Our method faithfully transfers poses across domains, while Cycle-GAN, the best performing baseline, loses correspondence on all three datasets. + +![](images/40ffbe5283d2e8d1b74863b70db54aa2d48fc74428227208f81cbc304d1c9df4.jpg) +Figure 9. Pose estimation accuracy. The accumulated error curves show the accuracy (vertical axis) for different PCK thresholds (horizontal axis). Our method clearly outperforms the baselines and approaches the manually supervised reference. + +Table 1. Structured similarity (SSIM) comparison. The explicit modeling of deformation outperforms baselines, particularly on the complex Drosophila images showing complex poses. + +
Drosophila Melanogaster
MetricPI-PCK ↑ (5 pix)PI-PCK ↑ (15 pix)PI-AUC ↑ (4-45 pix)PI-RMSE ↓ (pix)
Synthetic19.867.975.7513.456
Fast-Style-Transfer15.457.668.917.309
Gc-GAN11.968.776.313.175
Cycle-GAN15.072.978.412.302
Ours40.084.786.08.823
Supervised72.288.890.356.507
+ +Table 2. Pose estimation accuracy comparison on Drosophila Melanogaster. A similar improvement as for Drosophila is attained on the other tested laboratory animals, with a particularly big improvements on the zebrafish. + +By contrast, existing solutions capture the shape shift between the two domains, but only implicitly, thereby loosing the correspondence. Poses that are transferred one-to-one from the source do no longer match with the keypoint location in the image. Keypoints are shifted outside of the body, see last column of Fig. 8. The style transfer maintains the pose of the source, however, an appearance domain mismatch remains. We show in the next section that all of the above artifacts lead to reduced accuracy on the downstream task of pose estimation. + +
Caenorhabditis elegansDanio rerio
MetricPI-PCK ↑(5 pix)PI-AUC ↑(2-20 pix)PI-RMSE ↓(pix)PCK ↑(10 pix)AUC ↑(2-20 pix)RMSE ↓(pix)
Synthetic0.00.967.2929.337.420.15
Fast-Style-Transfer3.125.020.5015.620.819.25
Gc-GAN9.725.027.3868.254.527.38
Cycle-GAN45.363.214.7168.759.19.70
Ours90.387.65.3693.983.14.50
Supervised94.692.33.7799.686.53.91
+ +Table 3. Pose estimation accuracy on C. elegans and D. rerio. Our method significantly outperforms all baselines and approaches the supervised baseline. Units are given in round brackets. + +![](images/9d84ead25b402d2b42832c9f1d755e7a0081a018ae960e7b4f5ce3337dc69fc7.jpg) +Figure 10. Qualitative pose estimation results. The estimator provides decent results across all three animals. Occasional failures (last two rows) happen when legs cross, at occlusions, and for the fine fish tail. Training on Cycle-GAN images does not succeed. + +# 4.3.2D Pose Estimation + +The primary objective of this study is to demonstrate accurate keypoint detection on a target domain for which only annotations on synthetic images with different shape and pose exist. Fig. 10 shows qualitative results. We compare the performance of the same keypoint detector trained on images and keypoints generated by ours and the baseline methods. The absolute errors (tables 2 and 3) and accumulated error histograms (Fig. 9) show significant (PCK 15: 84.7 vs. 72.9 Cycle-GAN) and persistent (AUC 86.0 vs 78.4) improvements for Drosophila and the other domains. Even bigger gains are visible for the simpler worm and zebrafish datasets. Although there remains a gap compared to training on real images with manual labels for small error thresholds, our method comes already close to the supervised reference method in PCK 15 and above and has a large margin on existing unpaired image translation methods. + +Ablation Study on Fly. We compared our full model at PI-PCK-15 (84.7), to not using one of our core contributions: no deformation (64.9), only global affine (57.4), only + +![](images/89e0b27aa5e35c4da0758ed112a821817a652847d21fe90a14172eb80a181663.jpg) +Figure 11. Ablation study. All our contributions are important: removing the global STN reduces local details (bends legs), only global transformation misses pose differences (thinner, straight legs), and predicting the vector field directly produces foldovers. *The reference silhouette is from an unpaired target image. + +local non-linear (79.2), and directly encoding a vector field (69.1). The numbers and Fig. 11 shows that all contributions are important. Also end-to-end training with $D_{I}$ is important, as shown in Fig. 6, and by additional examples in the supplemental document. Moreover, using ADDA (55.5 PI-PCK-15), did not suffice to bridge the large domain gap. + +# 5. Limitations and Future Work + +For some domains the assumption of a target segmentation mask is constraining. For instance, for transferring synthetic humans to real images on cluttered backgrounds. We plan on integrating unsupervised segmentation, as demonstrated by [3] for single-domain image generation. Although we could synthesize a variety of poses for the worm and fish using a single stylized source image, our method was not able to synthesize entirely unseen Drosophila poses, because crossing legs could not be modeled using a 2D image deformation. Moreover, symmetries and self-similarities can lead to flipped limb identities (see bottom of Fig. 10). We plan to use temporal cues and multiple views to find a consistent assignment in the future, following ideas used in [56] for humans and monkeys. + +# 6. Conclusion + +In this paper, we have presented an approach for translating synthetic images to a real domain via explicit shape and pose deformation that consistently outperforms existing image translation methods. Our method allows us to train a pose estimator on synthetic images that generalize to real ones; without requiring manual keypoint labels. + +One of our test cases is on Drosophila tethered to a microscope used to measure neural activity. By combining pose estimation with state-of-the-art microscopy, we anticipate more rapid advances in understanding the relationship between animal behaviour and neural activity. + +# Acknowledgments + +SG, PR, and PF acknowledge support from an EPFL SV iPhD grant + +# References + +[1] Mykhaylo Andriluka, Leonid Pishchulin, Peter Gehler, and Bernt Schiele. 2d human pose estimation: New benchmark and state of the art analysis. In CVPR, pages 3686-3693, 2014. 2 +[2] Guha Balakrishnan, Amy Zhao, Mert Sabuncu, John Guttag, and Adrian V. Dalca. Voxelmorph: A learning framework for deformable medical image registration. IEEE TMI: Transactions on Medical Imaging, 2019. 3 +[3] Adam Bielski and Paolo Favaro. Emergence of object segmentation in perturbed generative models. arXiv preprint arXiv:1905.12663, 2019. 8 +[4] Konstantinos Bousmalis, Nathan Silberman, David Dohan, Dumitru Erhan, and Dilip Krishnan. Unsupervised pixel-level domain adaptation with generative adversarial networks. In CVPR, volume 1, page 7, 2017. 3 +[5] Qifeng Chen and Vladlen Koltun. Photographic image synthesis with cascaded refinement networks. In ICCV, volume 1, page 3, 2017. 3 +[6] Adrian V Dalca, Marianne Rakic, John Guttag, and Mert R Sabuncu. Learning conditional deformable templates with convolutional networks. NeurIPS, 2019. 2, 3 +[7] Logan Engstrom. Fast style transfer. https://github.com/lengthrom/fast-style-transfer/, 2016.7 +[8] Huan Fu, Mingming Gong, Chaohui Wang, Kayhan Batmanghelich, Kun Zhang, and Dacheng Tao. Geometry-Consistent Generative Adversarial Networks for One-Sided Unsupervised Domain Mapping. In CVPR, 2019. 3, 7 +[9] Leon A Gatys, Matthias Bethge, Aaron Hertzmann, and Eli Shechtman. Preserving color in neural artistic style transfer. arXiv preprint arXiv:1606.05897, 2016. 3 +[10] Leon A Gatys, Alexander S Ecker, and Matthias Bethge. A neural algorithm of artistic style. arXiv preprint arXiv:1508.06576, 2015. 3, 7 +[11] Leon A Gatys, Alexander S Ecker, and Matthias Bethge. Image style transfer using convolutional neural networks. In CVPR, pages 2414-2423, 2016. 3 +[12] Aaron Gokaslan, Vivek Ramanujan, Daniel Ritchie, Kwang In Kim, and James Tompkin. Improving shape deformation in unsupervised image to image translation. In ECCV, 2018. 3 +[13] Semih Gunel, Helge Rhodin, Daniel Morales, João Compagnolo, Pavan Ramdya, and Pascal Fua. Deepfly3d, a deep learning-based approach for 3d limb and + +appendage tracking in tethered, adult drosophila. In eLife, 2019. 2, 6 +[14] Di He, Yingce Xia, Tao Qin, Liwei Wang, Nenghai Yu, Tie-Yan Liu, and Wei-Ying Ma. Dual learning for machine translation. In NeurIPS, pages 820-828, 2016. 3 +[15] Eldar Insafutdinov, Leonid Pishchulina, Bjoern Andres, Mykhaylo Andriluka, and Bernt Schiele. Deepercut: A deeper, stronger, and faster multiperson pose estimation model. In ECCV, 2016. 2 +[16] Catalin Ionescu, Dragos Papava, Vlad Olaru, and Cristian Sminchisescu. Human3.6M: Large Scale Datasets and Predictive Methods for 3D Human Sensing in Natural Environments. TPAMI, 2014. 2 +[17] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. CVPR, 2017. 2 +[18] Max Jaderberg, Karen Simonyan, Andrew Zisserman, and Koray Kavukcuoglu. Spatial Transformer Networks. In NeurIPS, pages 2017-2025, 2015. 3, 4, 5 +[19] Yongcheng Jing, Yezhou Yang, Zunlei Feng, Jingwen Ye, Yizhou Yu, and Mingli Song. Neural style transfer: A review. arXiv, 05 2017. 3 +[20] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and superresolution. In ECCV, pages 694–711. Springer, 2016. 3, 7 +[21] Robert Evan Johnson, Scott Linderman, Thomas Panier, Caroline Lei Wee, Erin Song, Kristian Joseph Herrera, Andrew Miller, and Florian Engert. Probabilistic models of larval zebrafish behavior reveal structure on many scales. Current Biology, 30(1):70-82, 2020. 6 +[22] Boah Kim, Jieun Kim, June-Goo Lee, Dong Hwan Kim, Seong Ho Park, and Jong Chul Ye. Unsupervised deformable image registration using cycle-consistent cnn. In MICCAI, pages 166-174. Springer, 2019. 3 +[23] Taeksoo Kim, Moonsu Cha, Hyunsoo Kim, Jung Kwon Lee, and Jiwon Kim. Learning to discover cross-domain relations with generative adversarial networks. ICML, 2017. 3 +[24] Chuan Li and Michael Wand. Combining markov random fields and convolutional neural networks for image synthesis. In CVPR, pages 2479-2486, 2016. 3 +[25] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ECCV, pages 740-755. Springer, 2014. 2 + +[26] Ming-Yu Liu and Oncel Tuzel. Coupled generative adversarial networks. In NeurIPS, pages 469-477, 2016. 3 +[27] Naureen Mahmood, Nima Ghorbani, Nikolaus F. Troje, Gerard Pons-Moll, and Michael J. Black. Amass: Archive of motion capture as surface shapes. In ICCV, Oct 2019. 2 +[28] Roey Mechrez, Itamar Talmi, and Lihi Zelnik-Manor. The contextual loss for image transformation with non-aligned data. ECCV, 2018. 3 +[29] Dushyant Mehta, Srinath Sridhar, Oleksandr Sotnychenko, Helge Rhodin, Mohammad Shafiei, Hans-Peter Seidel, Weipeng Xu, Dan Casas, and Christian Theoballt. Vnect: Real-Time 3D Human Pose Estimation with a Single RGB Camera. In SIGGRAPH, 2017. 2 +[30] Tanmay Nath, Alexander Mathis, An Chi Chen, Amir Patel, Matthias Bethge, and Mackenzie W Mathis. Using deepabcut for 3d markerless pose estimation across species and behaviors. Nature Protocols, 2019. 2 +[31] Alejandro Newell, Kaiyu Yang, and Jia Deng. Stacked Hourglass Networks for Human Pose Estimation. ECCV, pages 483-499, 2016. 2, 5 +[32] Georgios Pavlakos, Xiaowei Zhou, Konstantinos G. Derpanis, and Kostas Daniilidis. Harvesting Multiple Views for Marker-Less 3D Human Pose Annotations. In CVPR, 2017. 2 +[33] Dario Pavllo, Christoph Feichtenhofer, David Grangier, and Michael Auli. 3d human pose estimation in video with temporal convolutions and semi-supervised training. In CVPR, 2019. 2 +[34] Talmo D Pereira, Diego E Aldarondo, Lindsay Willmore, Mikhail Kislin, Samuel S-H Wang, Mala Murthy, and Joshua W Shaevitz. Fast animal pose estimation using deep neural networks. Nature methods, 16(1):117, 2019. 2 +[35] Alin-Ionut Popa, Mihai Zanfir, and Cristian Sminchisescu. Deep Multitask Architecture for Integrated 2D and 3D Human Sensing. In CVPR, 2017. 2 +[36] Pavan Ramdya, Robin Thandiackal, Raphael Cherney, Thibault Asselborn, Richard Benton, Auke Jan Ijspeert, and Dario Floreano. Climbing favours the tripod gait over alternative faster insect gaits. Nature communications, 8:14494, 2017. 6 +[37] Adria Recasens, Petr Kellnhofer, Simon Stent, Wojciech Matusik, and Antonio Torralba. Learning to zoom: a saliency-based sampling layer for neural networks. In ECCV, pages 51-66, 2018. 3 + +[38] Helge Rhodin, Victor Constantin, Isinsu Katircioglu, Mateus Salzmann, and Pascal Fua. Neural Scene Decomposition for Human Motion Capture. In CVPR, 2019. 2 +[39] Grégory Rogez, Philippe Weinzaepfel, and Cordelia Schmid. Lcr-Net: Localization-Classification-Regression for Human Pose. In CVPR, 2017. 2 +[40] Daniel Rueckert, Paul Aljabar, Rolf A Heckemann, Joseph V Hajnal, and Alexander Hammers. Diffeomorphic registration using b-splines. In MICCAI, pages 702-709. Springer, 2006. 3 +[41] Patsorn Sangkloy, Jingwan Lu, Chen Fang, Fisher Yu, and James Hays. Scribbler: Controlling deep image synthesis with sketch and color. In CVPR, volume 2, 2017. 3 +[42] Ashish Shrivastava, Tomas Pfister, Oncel Tuzel, Joshua Susskind, Wenda Wang, and Russell Webb. Learning from simulated and unsupervised images through adversarial training. In CVPR, volume 2, page 5, 2017. 3 +[43] L. Sigal, A. Balan, and M. J. Black. Humaneva: Synchronized Video and Motion Capture Dataset and Baseline Algorithm for Evaluation of Articulated Human Motion. IJCV, 2010. 2 +[44] Xiao Sun, Jiaxiang Shang, Shuang Liang, and Yichen Wei. Compositional Human Pose Regression. In ICCV, 2017. 2 +[45] Balazs Szigeti, Padraig Gleeson, Michael Vella, Sergey Khayrulin, Andrey Palyanov, Jim Hokanson, Michael Currie, Matteo Cantarelli, Giovanni Idili, and Stephen D. Larson. Openworm: an open-science approach to modeling caenorhabditis elegans. Front. Comput. Neurosci., 2014. 6 +[46] Wei Tang and Wu Ying. Deeply learned compositional models for human pose estimation. In ECCV, 2018. 2 +[47] E. Tzeng, J. Hoffman, K. Saenko, and T. Darrell. Adversarial Discriminative Domain Adaptation. In CVPR, pages 7167-7176, 2017. 2, 7 +[48] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Instance normalization: The missing ingredient for fast stylization. arXiv preprint arXiv:1607.08022, 2016. 3, 7 +[49] Gül Varol, Javier Romero, Xavier Martin, Naureen Mahmood, Michael J. Black, and Ivan Laptev an Cordelia Schmid. Learning from Synthetic Humans. In CVPR, 2017. 2 +[50] Bastian Wandt and Bodo Rosenhahn. Repnet: Weakly supervised training of an adversarial reprojection network for 3d human pose estimation. In CVPR, June 2019. 2 + +[51] Zhou Wang, Alan Conrad Bovik, Hamid Rahim Sheikh, Student Member, Eero P. Simoncelli, and Senior Member. Image quality assessment: From error visibility to structural similarity. IEEE Transactions on Image Processing, 13:600-612, 2004. 6 +[52] Wayne Wu, Kaidi Cao, Cheng Li, Chen Qian, and Chen Change Loy. Transgaga: Geometry-aware unsupervised image-to-image translation. In CVPR, 2019. 3 +[53] Bin Xiao, Haiping Wu, and Yichen Wei. Simple baselines for human pose estimation and tracking. In ECCV, pages 466-481, 2018. 2 +[54] Yuliang Xiu, Jiefeng Li, Haoyu Wang, Yinghong Fang, and Cewu Lu. Pose Flow: Efficient online pose tracking. In BMVC, 2018. 2 +[55] W. Yang, S. Li, W. Ouyang, and X. Wang. Learning feature pyramids for human pose estimation. In ICCV, 2017. 2 +[56] Yuan Yao, Yasamin Jafarian, and Hyun Soo Park. Monet: Multiview semi-supervised keypoint detection via epipolar divergence. In ICCV, pages 753-762, 2019. 2, 8 +[57] Eviatar Yemini, Tadas Jucikas, Laura J Grundy, André E X Brown, and William R Schafer. A database of caenorhabditis elegans behavioral phenotypes. In Nature Methods, 2013. 6 +[58] Penghang Yin, Jiancheng Lyu, Shuai Zhang, Stanley J. Osher, Yingyong Qi, and Jack Xin. Understanding straight-through estimator in training activation quantized neural nets. In ICLR, 2019. 5 +[59] Riza Alp Guler Dimitris Samaras Nikos Paragios Zhixin Shu, Mihir Sahasrabudhe and Iasonas Kokkinos. Deforming autoencoders: Unsupervised disentangling of shape and appearance. In ECCV, 2018. 2, 3, 4, 5 +[60] Xingyi Zhou, Qixing Huang, Xiao Sun, Xiangyang Xue, and Yichen Wei. Towards 3d human pose estimation in the wild: a weakly-supervised approach. In ICCV, pages 398-407, 2017. 2 +[61] Xingyi Zhou, Qixing Huang, Xiao Sun, Xiangyang Xue, and Yichen Wei. Weakly-supervised transfer for 3d human pose estimation in the wild. In ICCV, volume 3, page 7, 2017. 2 +[62] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. ICCV, 2017. 3, 7 +[63] Silvia Zuffi, Angjoo Kanazawa, Tanya Berger-Wolf, and Michael J. Black. Three-d safari: Learning to estimate zebra pose, shape, and texture from images "in the wild". In ICCV, 2019. 2 \ No newline at end of file diff --git a/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/images.zip b/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..03b49800674ff68c37feec8170aad75be8b7b6ff --- /dev/null +++ b/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65e09cf984ed76e1e7d84cf982fc57e60de9c8a95099c2879117be4ed5acb011 +size 445581 diff --git a/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/layout.json b/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f6ce4f3fd8841606a067a26392f8c3e0b8554a3c --- /dev/null +++ b/deformationawareunpairedimagetranslationforposeestimationonlaboratoryanimals/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91163aa4a758ddda011a3a8d0e96f18495cf1937e7a40883338dcd0e7dfac11b +size 390679 diff --git a/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/b9b1e851-6ed9-4f30-ad75-6a1563d66bdb_content_list.json b/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/b9b1e851-6ed9-4f30-ad75-6a1563d66bdb_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..907fa744bae9ee22635934ae3cb042939eb848bc --- /dev/null +++ b/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/b9b1e851-6ed9-4f30-ad75-6a1563d66bdb_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:649d1347efdf1b5ea380be29af1865177187aeb343ce9d615fbce70788137f64 +size 72618 diff --git a/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/b9b1e851-6ed9-4f30-ad75-6a1563d66bdb_model.json b/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/b9b1e851-6ed9-4f30-ad75-6a1563d66bdb_model.json new file mode 100644 index 0000000000000000000000000000000000000000..f46e44c80563dd418359dcbcac1ebd5c9f26729e --- /dev/null +++ b/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/b9b1e851-6ed9-4f30-ad75-6a1563d66bdb_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a3aadcea406716e2dbe75ef4c8483a7471864aa1d1516aec2f0aa51b4b5ec57 +size 90337 diff --git a/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/b9b1e851-6ed9-4f30-ad75-6a1563d66bdb_origin.pdf b/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/b9b1e851-6ed9-4f30-ad75-6a1563d66bdb_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c3a1b91d986ec434b40e21a094ea5da6679029c5 --- /dev/null +++ b/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/b9b1e851-6ed9-4f30-ad75-6a1563d66bdb_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca215bc7371b899b7c80c2cdfb15aaaae8c7c1934f639fbae18edbc0d265ea90 +size 1315524 diff --git a/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/full.md b/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/full.md new file mode 100644 index 0000000000000000000000000000000000000000..7433923f3f22ed8adce3f1d0ccb6a2f1d9d2df78 --- /dev/null +++ b/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/full.md @@ -0,0 +1,297 @@ +# Densely Connected Search Space for More Flexible Neural Architecture Search + +Jiemin Fang $^{1\dagger}$ , Yuzhu Sun $^{1\dagger}$ , Qian Zhang $^{2}$ , Yuan Li $^{2}$ , Wenyu Liu $^{1}$ , Xinggang Wang $^{1\dagger}$ $^{1}$ School of EIC, Huazhong University of Science and Technology $^{2}$ Horizon Robotics +{jaminfong, yzsun, liuwy, xgwang}@hust.edu.cn +{qian01.zhang, yuan.li}@horizon.ai + +# Abstract + +Neural architecture search (NAS) has dramatically advanced the development of neural network design. We revisit the search space design in most previous NAS methods and find the number and widths of blocks are set manually. However, block counts and block widths determine the network scale (depth and width) and make a great influence on both the accuracy and the model cost (FLOPs/latency). In this paper, we propose to search block counts and block widths by designing a densely connected search space, i.e., DenseNAS. The new search space is represented as a dense super network, which is built upon our designed routing blocks. In the super network, routing blocks are densely connected and we search for the best path between them to derive the final architecture. We further propose a chained cost estimation algorithm to approximate the model cost during the search. Both the accuracy and model cost are optimized in DenseNAS. For experiments on the MobileNetV2-based search space, DenseNAS achieves $75.3\%$ top-1 accuracy on ImageNet with only 361MB FLOPs and 17.9ms latency on a single Titan-XP. The larger model searched by DenseNAS achieves $76.1\%$ accuracy with only 479M FLOPs. DenseNAS further promotes the ImageNet classification accuracies of ResNet-18, -34 and -50-B by $1.5\%$ , $0.5\%$ and $0.3\%$ with 200M, 600M and 680M FLOPs reduction respectively. The related code is available at https://github.com/JaminFong/DenseNAS. + +# 1. Introduction + +In recent years, neural architecture search (NAS) [48, 49, 34, 36] has demonstrated great successes in designing neural architectures automatically and achieved remarkable performance gains in various tasks such as image classification [49, 34], semantic segmentation [5, 27] and object detection [16, 43]. NAS has been a critically important topic + +![](images/e8442fb43870eb67e734d7671f890a39f87cb43fdfc825d9db2a8c6f4e9b0059.jpg) +Figure 1: Search space comparison between conventional methods and DenseNAS. Upper: Conventional search spaces manually set a fixed number of blocks in each stage. The block widths are set manually as well. Bottom: The search space in DenseNAS allows more blocks with various widths in each stage. Each block is densely connected to its subsequent ones. We search for the best path (the red line) to derive the final architecture, in which the number of blocks in each stage and the widths of blocks are allocated automatically. + +for architecture designing. + +In NAS research, the search space plays a crucial role that constrains the architectures in a prior-based set. The performance of architectures produced by NAS methods is strongly associated with the search space definition. A more flexible search space has the potential to bring in architectures with more novel structures and promoted performance. We revisit and analyze the search space design in most previous works [49, 39, 3, 41]. For a clear illustration, we review the following definitions. Block denotes a set of layers/operations in the network which output feature maps with the same spatial resolution and the same width (number of channels). Stage denotes a set of sequential blocks whose outputs are under the same spatial resolution settings. Different blocks in the same stage are allowed to have various widths. Many recent works [3, 41, 7] stack the inverted residual convolution modules (MBCov) defined in MobileNetV2 [37] to construct the search space. They + +search for different kernel sizes and expansion ratios in each MBConv. The depth is searched in terms of layer numbers in each block. The searched networks with MBConv show high performance with low latency or few FLOPs. + +In this paper, we aim to perform NAS in a more flexible search space. Our motivation and core idea are illustrated in Fig. 1. As the upper part of Fig. 1 shows, the number of blocks in each stage and the width of each block are set manually and fixed during the search process. It means that the depth search is constrained within the block and the width search cannot be performed. It is worth noting that the scale (depth and width) setting is closely related to the performance of a network, which has been demonstrated in many previous theoretical studies [35, 32] and empirical results [17, 40]. Inappropriate width or depth choices usually cause drastic accuracy degradation, significant computation cost, or unsatisfactory model latency. Moreover, we find that recent works [37, 3, 41, 7] manually tune width settings to obtain better performance, which indicates the design of network width demands much prior-based knowledge and trial-and-error. + +We propose a densely connected search space to tackle the above obstacles and name our method as DenseNAS. We show our novelly designed search space schematically in the bottom part of Fig. 1. Different from the search space design principles in the previous works [3, 41], we allow more blocks with various widths in one stage. Specifically, we design the routing blocks to construct the densely connected super network which is the representation of the search space. From the beginning to the end of the search space, the width of the routing block increases gradually to cover more width options. Every routing block is connected to several subsequent ones. This formulation brings in various paths in the search space and we search for the best path to derive the final architecture. As a consequence, the block widths and counts in each stage are allocated automatically. Our method extends the depth search into a more flexible space. Not only the number of layers within one block but also the number of blocks within one stage can be searched. The block width search is enabled as well. Moreover, the positions to conduct spatial down-sampling operations are determined along with the block counts search. + +We integrate our search space into the differentiable NAS framework by relaxing the search space. We assign a probability parameter to each output path of the routing block. During the search process, the distribution of probabilities is optimized. The final block connection paths in the super network are derived based on the probability distribution. To optimize the cost (FLOPs/latency) of the network, we design a chained estimation algorithm targeted at approximating the cost of the model during the search. + +Our contributions can be summarized as follows. + +- We propose a densely connected search space that en + +ables network/block widths search and block counts search. It provides more room for searching better networks and further reduces expert designing efforts. + +- We propose a chained cost estimation algorithm to precisely approximate the computation cost of the model during search, which makes the DenseNAS networks achieve high performance with low computation cost. +- In experiments, we demonstrate the effectiveness of our method by achieving SOTA performance on the MobileNetV2 [37]-based search space. Our searched network achieves $75.3\%$ accuracy on ImageNet [9] with only 361MB FLOPs and 17.9ms latency on a single TITAN-XP. +- DenseNAS can further promote the ImageNet classification accuracies of ResNet-18, -34 and -50-B [18] by $1.5\%$ , $0.5\%$ and $0.3\%$ with 200M, 600M, 680M FLOPs and 1.5ms, 2.4ms, 6.1ms latency reduction respectively. + +# 2. Related Work + +Search Space Design NASNet [49] is the first work to propose a cell-based search space, where the cell is represented as a directed acyclic graph with several nodes inside. NASNet searches for the operation types and the topological connections in the cell and repeat the searched cell to form the whole network architecture. The depth of the architecture (i.e., the number of repetitions of the cell), the widths and the occurrences of down-sampling operations are all manually set. Afterwards, many works [28, 34, 36, 30] adopt a similar cell-based search space. However, architectures generated by cell-based search spaces are not friendly in terms of latency or FLOPs. Then MnasNet [39] stacks MBConv's defined in MobileNetV2 [37] to construct a search space for searching efficient architectures. Some works [3, 13, 41, 8] simplify the search space by searching for the expansion ratios and kernel sizes of MBConv layers. + +Some works study more about the search space. Liu et al. [29] proposes a hierarchical search space that allows flexible network topologies (directed acyclic graphs) at each level of the hierarchies. Auto-DeepLab [27] creatively designs a two-level hierarchical search space for semantic segmentation networks. CAS [46] customizes the search space design for real-time segmentation networks. RandWire [42] explores randomly wired architectures by designing network generators that produce new families of models for searching. Our proposed method designs a densely connected search space beyond conventional search constrains to generate the architecture with a better trade-off between accuracy and model cost. + +![](images/47741643ed7b1097470259519a85aa22ee69684a99da27dc910a8a50964ad81a.jpg) +Figure 2: We define our search space on three levels. Upper right: A basic layer that contains a set of candidate operations. Upper left: The proposed routing block which contains shape-alignment layers, an element-wise sum operation and some basic layers. It takes multiple input tensors and outputs one tensor. Bottom: The proposed dense super network which is constructed with densely connected routing blocks. Routing blocks in the same stage hold the same color. Architectures are searched within various path options in the super network. + +NAS Method Some early works [48, 49, 47] propose to search architectures based on reinforcement learning (RL) methods. Then evolutionary algorithm (EA) based methods [11, 29, 36] achieve great performance. However, RL and EA based methods bear huge computation cost. As a result, ENAS [34] proposes to use weight sharing for reducing the search cost. + +Recently, the emergence of differentiable NAS methods [30, 3, 41] and one-shot methods [2, 1] greatly reduces the search cost and achieves superior results. DARTS [30] is the first work to utilize the gradient-based method to search neural architectures. They relax the architecture representation as a super network by assigning continuous weights to the candidate operations. They first search on a small dataset, e.g., CIFAR-10 [23], and then apply the architecture to a large dataset, e.g., ImageNet [10], with some manual adjustments. ProxylessNAS [3] reduces the memory consumption by adopting a dropping path strategy and conducts search directly on the large scale dataset, i.e., ImageNet. FBNet [41] searches on the subset of ImageNet and uses the Gumbel Softmax function [22, 33] to better optimize the distribution of architecture probabilities. TAS [12] utilizes a differentiable NAS scheme to search and prune the width and depth of the network and uses knowledge distillation (KD) [19] to promote the performance of the pruned network. FNA [14] proposes to adapt the neural network to new tasks with low cost by a parameter remap + +ping mechanism and differentiable NAS. It is challenging for differentiable/one-shot NAS methods to search for more flexible architectures as they need to integrate all subarchitectures into the super network. The proposed DenseNAS tends to solve this problem by integrating a densely connected search space into the differentiable paradigm and explores more flexible search schemes in the network. + +# 3. Method + +In this section, we first introduce how to design the search space targeted at a more flexible search. A routing block is proposed to construct the densely connected super network. Secondly, we describe the method of relaxing the search space into a continuous representation. Then, we propose a chained cost estimation algorithm to approximate the model cost during the search. Finally, we describe the whole search procedure. + +# 3.1. Densely Connected Search Space + +As shown in Fig. 2, we define our search space using the following three terms, i.e., (basic layer, routing block and dense super Network). Firstly, a basic layer is defined as a set of all the candidate operations. Then we propose a novel routing block which can aggregate tensors from different routing blocks and transmit tensors to multiple other routing blocks. Finally, the search space is constructed as a dense super network with many routing blocks where there are + +various paths to transmit tensors. + +# 3.1.1 Basic Layer + +We define the basic layer to be the elementary structure in our search space. One basic layer represents a set of candidate operations which include MBCoNs and the skip connection. MBCoNs are with kernel sizes of $\{3,5,7\}$ and expansion ratios of $\{3,6\}$ . The skip connection is for the depth search. If the skip connection is chosen, the corresponding layer is removed from the resulting architecture. + +# 3.1.2 Routing Block + +For the purpose of establishing various paths in the super network, we propose the routing block with the ability of aggregating tensors from preceding routing blocks and transmit tensors to subsequent ones. We divide the routing block into two parts, shape-alignment layers and basic layers. + +Shape-alignment layers exist in the form of several parallel branches, while every branch is a set of candidate operations. They take input tensors with different shapes (including widths and spatial resolutions) which come from multiple preceding routing blocks and transform them into tensors with the same shape. As shape-alignment layers are required for all routing blocks, we exclude the skip connection in candidate operations of them. Then tensors processed by shape-alignment layers are aggregated and sent to several basic layers. The subsequent basic layers are used for feature extraction whose depth can also be searched. + +# 3.1.3 Dense Super Network + +Many previous works [39, 3, 41] manually set a fixed number of blocks, and retain all the blocks for the final architecture. Benefiting from the aforementioned structures of routing blocks, we introduce more routing blocks with various widths to construct the dense super network which is the representation of the search space. The final searched architecture is allowed to select a subset of the routing blocks and discard the others, giving the search algorithm more room. + +We define the super network as $\mathcal{N}_{\text{sup}}$ and assume it to consist of $N$ routing blocks, $\mathcal{N}_{\text{sup}} = \{B_1, B_2, \dots, B_N\}$ . The network structure is shown in Fig. 2. We partition the entire network into several stages. As Sec. 1 defines, each stage contains routing blocks with various widths and the same spatial resolution. From the beginning to the end of the super network, the widths of routing blocks grow gradually. In the early stage of the network, we set a small growing stride for the width because large width settings in the early network stage will cause huge computational cost. The growing stride becomes larger in the later stages. This design principle of the super network allows more possibilities of block counts and block widths. + +We assume that each routing block in the super network connects to $M$ subsequent ones. We define the connection between the routing block $B_{i}$ and its subsequent routing block $B_{j}$ $(j > i)$ as $C_{ij}$ . The spatial resolutions of $B_{i}$ and $B_{j}$ are $H_{i} \times W_{i}$ and $H_{j} \times W_{j}$ respectively (normally $H_{i} = W_{i}$ and $H_{j} = W_{j}$ ). We set some constraints on the connections to avoid the stride of the spatial down-sampling exceeding 2. Specifically, $C_{ij}$ only exists when $j - i \leq M$ and $H_{i} / H_{j} \leq 2$ . Following the above paradigms, the search space is constructed as a dense super network based on the connected routing blocks. + +# 3.2. Relaxation of Search Space + +We integrate our search space by relaxing the architectures into continuous representations. The relaxation is implemented on both the basic layer and the routing block. We can search for architectures via back-propagation in the relaxed search space. + +# 3.2.1 Relaxation in the Basic Layer + +Let $\mathcal{O}$ be the set of candidate operations described in Sec. 3.1.1. We assign an architecture parameter $\alpha_o^\ell$ to the candidate operation $o\in \mathcal{O}$ in basic layer $\ell$ . We relax the basic layer by defining it as a weighted sum of outputs from all candidate operations. The architecture weight of the operation is computed as a softmax of architecture parameters over all operations in the basic layer: + +$$ +w _ {o} ^ {\ell} = \frac {\exp \left(\alpha_ {o} ^ {\ell}\right)}{\sum_ {o ^ {\prime} \in \mathcal {O}} \exp \left(\alpha_ {o ^ {\prime}} ^ {\ell}\right)}. \tag {1} +$$ + +The output of basic layer $\ell$ can be expressed as + +$$ +x _ {\ell + 1} = \sum_ {o \in \mathcal {O}} w _ {o} ^ {\ell} \cdot o \left(x _ {\ell}\right), \tag {2} +$$ + +where $x_{\ell}$ denotes the input tensor of basic layer $\ell$ + +# 3.2.2 Relaxation in the Routing Block + +We assume that the routing block $B_{i}$ outputs the tensor $b_{i}$ and connects to $m$ subsequent blocks. To relax the block connections as a continuous representation, we assign each output path of the block an architecture parameter. Namely the path from $B_{i}$ to $B_{j}$ has a parameter $\beta_{ij}$ . Similar to how we compute the architecture weight of each operation above, we compute the probability of each path using a softmax function over all paths between the two routing blocks: + +$$ +p _ {i j} = \frac {\exp \left(\beta_ {i j}\right)}{\sum_ {k = 1} ^ {m} \exp \left(\beta_ {i k}\right)}. \tag {3} +$$ + +For routing block $B_{i}$ , we assume it takes input tensors from its $m'$ preceding routing blocks $(B_{i - m'}, B_{i - m' + 1},$ + +$B_{i - m^{\prime} + 2}\ldots B_{i - 1})$ . As shown in Fig. 2, the input tensors from these routing blocks differ in terms of width and spatial resolution. Each input tensor is transformed to a same size by the corresponding branch of shape-alignment layers in $B_{i}$ . Let $H_{ik}$ denotes the $k$ th transformation branch in $B_{i}$ which is applied to the input tensor from $B_{i - k}$ , where $k = 1\dots m^{\prime}$ . Then the input tensors processed by shape-alignment layers are aggregated by a weighted-sum using the path probabilities, + +$$ +x _ {i} = \sum_ {k = 1} ^ {m ^ {\prime}} p _ {i - k, i} \cdot H _ {i k} \left(x _ {i - k}\right). \tag {4} +$$ + +It is worth noting that the path probabilities are normalized on the output dimension but applied on the input dimension (more specifically on the branches of shape-alignment layers). One of the shape-alignment layers is essentially a weighted-sum mixture of the candidate operations. The layer-level parameters $\alpha$ control which operation to be selected, while the outer block-level parameters $\beta$ determine how blocks connect. + +# 3.3. Chained Cost Estimation Algorithm + +We propose to optimize both the accuracy and the cost (latency/FLOPs) of the model. To this end, the model cost needs to be estimated during the search. In conventional cascaded search spaces, the total cost of the whole network can be computed as a sum of all the blocks. Instead, the global effects of connections on the predicted cost need to be taken into consideration in our densely connected search space. We propose a chained cost estimation algorithm to better approximate the model cost. + +We create a lookup table which records the cost of each operation in the search space. The cost of every operation is measured separately. During the search, the cost of one basic layer is estimated as follows, + +$$ +\operatorname {c o s t} ^ {\ell} = \sum_ {o \in \mathcal {O}} w _ {o} ^ {\ell} \cdot \operatorname {c o s t} _ {o} ^ {\ell}, \tag {5} +$$ + +where $\mathrm{cost}_o^\ell$ refers to the pre-measured cost of operation $o\in \mathcal{O}$ in layer $\ell$ . We assume there are $N$ routing blocks in total $(B_{1},\ldots ,B_{N})$ . To estimate the total cost of the whole network in the densely connected search space, we define the chained cost estimation algorithm as follows. + +$$ +\begin{array}{l} \tilde {\mathrm {c o s t}} ^ {N} = \mathrm {c o s t} _ {b} ^ {N} \\ \tilde {\operatorname {c o s t}} ^ {i} = \operatorname {c o s t} _ {b} ^ {i} + \sum_ {j = i + 1} ^ {i + m} p _ {i j} \cdot \left(\operatorname {c o s t} _ {\text {a l i g n}} ^ {i j} + \operatorname {c o s t} _ {b} ^ {j}\right), \tag {6} \\ \end{array} +$$ + +where $\mathrm{cost}_b^i$ denotes the total cost of all the basic layers of $B_{i}$ which can be computed as a sum $\mathrm{cost}_b^i = \sum_\ell \mathrm{cost}_b^{i,\ell}$ , $m$ denotes the number of subsequent routing blocks to + +which $B_{i}$ connects, $p_{ij}$ denotes the path probability between $B_{i}$ and $B_{j}$ , and $\mathrm{cost}_{\mathrm{align}}^{ij}$ denotes the cost of the shape-alignment layer in block $B_{j}$ which processes the data from block $B_{i}$ . + +The cost of the whole architecture can thus be obtained by computing $\mathbf{cost}^1$ with a recursion mechanism, + +$$ +\operatorname {c o s t} = \tilde {\operatorname {c o s t}} ^ {1}. \tag {7} +$$ + +We design a loss function with the cost-based regularization to achieve the multi-objective optimization: + +$$ +\mathcal {L} (w, \alpha , \beta) = \mathcal {L} _ {C E} + \lambda \log_ {\tau} \operatorname {c o s t}, \tag {8} +$$ + +where $\lambda$ and $\tau$ are the hyper-parameters to control the magnitude of the model cost term. + +# 3.4. Search Procedure + +Benefiting from the continuously relaxed representation of the search space, we can search for the architecture by updating the architecture parameters (introduced in Sec. 3.2) using stochastic gradient descent. We find that at the beginning of the search process, all the weights of the operations are under-trained. The operations or architectures which converge faster are more likely to be strengthened, which leads to shallow architectures. To tackle this, we split our search procedure into two stages. In the first stage, we only optimize the weights for enough epochs to get operations sufficiently trained until the accuracy of the model is not too low. In the second stage, we activate the architecture optimization. We alternatively optimize the operation weights by descending $\nabla_w\mathcal{L}_{train}(w,\alpha ,\beta)$ on the training set, and optimize the architecture parameters by descending $\nabla_{\alpha ,\beta}\mathcal{L}_{val}(w,\alpha ,\beta)$ on the validation set. Moreover, a dropping-path training strategy [1, 3] is adopted to decrease memory consumption and decouple different architectures in the super network. + +When the search procedure terminates, we derive the final architecture based on the architecture parameters $\alpha, \beta$ . At the layer level, we select the candidate operation with the maximum architecture weight, i.e., $\arg \max_{o \in \mathcal{O}} \alpha_o^\ell$ . At the network level, we use the Viterbi algorithm [15] to derive the paths connecting the blocks with the highest total transition probability based on the output path probabilities. Every block in the final architecture only connects to the next one. + +# 4. Experiments + +In this section, we first show the performance with the MobileNetV2 [37]-based search space on ImageNet [9] classification. Then we apply the architectures searched on ImageNet to object detection on COCO [25]. We further extend our DenseNAS to the ResNet [18]-based search space. Finally, we conduct some ablation studies and analysis. The implementation details are provided in the appendix. + +Table 1: Our results on the ImageNet classification with the MobileNetV2-based search space compared with other methods. Our models achieve higher accuracies with lower latencies. For GPU latency, we measure all the models with the same setup (on one TITAN-XP with a batch size of 32). + +
ModelFLOPsGPU LatencyTop-1 Acc(%)Search Time (GPU hours)
1.4-MobileNetV2 [37]585M28.0ms74.7-
NASNet-A [49]564M-74.048K
AmoebaNet-A [36]555M-74.576K
DARTS [30]574M36.0ms73.396
RandWire-WS [42]583M-74.7-
DenseNAS-Large479M28.9ms76.164
1.0-MobileNetV1 [21]575M16.8ms70.6-
1.0-MobileNetV2 [37]300M19.5ms72.0-
FBNet-A [41]249M15.8ms73.0216
DenseNAS-A251M13.6ms73.164
MnasNet [39]317M19.7ms74.091K
FBNet-B [41]295M18.9ms74.1216
Proxyless(mobile) [3]320M21.3ms74.6200
DenseNAS-B314M15.4ms74.664
MnasNet-92 [39]388M-74.891K
FBNet-C [41]375M22.1ms74.9216
Proxyless(GPU) [3]465M22.1ms75.1200
DenseNAS-C361M17.9ms75.364
Random Search360M26.9ms74.364
+ +# 4.1. Performance on MobileNetV2-based Search Space + +We implement DenseNAS on the MobileNetV2 [37]-based search space, set the GPU latency as our secondary optimization objective, and search models with different sizes under multiple latency optimization magnitudes (defined in Eq. 8). The ImageNet results are shown in Tab. 1. We divide Tab. 1 into several parts and compare DenseNAS models with both manually designed models [21, 37] and NAS models. DenseNAS achieves higher accuracies with both fewer FLOPs and lower latencies. Note that for FBNet-A, the group convolution in the $1 \times 1$ conv and the channel shuffle operation are used, which do not exist in FBNet-B, -C and Proxyless. In the compared NAS methods [39, 3, 41], the block counts and block widths in the search space are set and adjusted manually. DenseNAS allocates block counts and block widths automatically. We further visualize the results in Fig. 3, which clearly demonstrates that DenseNAS achieves a better trade-off between accuracy and latency. The searched architectures are shown in Fig. 4. + +# 4.2. Generalization Ability on COCO Object Detection + +We apply the searched DenseNAS networks on the COCO [25] object detection task to evaluate the generalization ability of DenseNAS networks and show the results + +![](images/9d85e28defaf5c1f329db1dc562f2882f6f6518150155425e84eaa9cc6dfd04c.jpg) +Figure 3: The comparison of model performance on ImageNet under the MobileNetV2-based search spaces. + +![](images/8fa6d3e5c7516426e4273d192a59f6aa77769760fa6588e81526055dc0d625d7.jpg) +Figure 4: Visualization of the searched architectures. We use rectangles with different colors and widths to denote the layer operations. $KxEy$ denotes the MBConv with kernel size $x \times x$ and expansion ratio $y$ . We label the width in each layer. Layers in the same block are contained in the dashed box. We separate the stages with the green lines. + +in Tab. 2. We choose two commonly used object detection frameworks RetinaNet [26] and SSDLite [31, 37] to conduct our experiments. All the architectures shown in Tab. 2 are utilized as the backbone networks in the detection frameworks. The experiments are performed based on the MMDetection [4] framework. + +We compare our results with both manually designed and NAS models. Results of MobileNetV2 [37], FBNet [41] and ProxylessNAS [3] are obtained by our reimplementation and all models are trained under the same settings and hyper-parameters for fair comparisons. DetNAS [6] is a recent work that aims at searching the backbone architectures directly on object detection. Though DenseNAS searches on the ImageNet classification task and applies the searched architectures on detection tasks, our DenseNAS models still obtain superior detection performance in terms of both accuracy and FLOPs. The superiority over the compared methods demonstrates the great generalization ability of DenseNAS networks. + +Table 2: Object detection results on COCO. The FLOPs are calculated with $1088 \times 800$ input. + +
MethodParamsFLOPsmAP(%)
MobileNetV2 [37]RetinaNet11.49M133.05B32.8
DenseNAS-B12.69M133.09B34.3
DetNAS [6]13.41M133.26B33.3
FBNet-C [41]12.65M134.17B34.9
Proxyless(GPU) [3]14.62M135.81B35
DenseNAS-C13.24M133.91B35.1
MobileNetV2 [37]SSDLite4.3M0.8B22.1
Mnasnet-92 [39]5.3M1.0B22.9
FBNet-C [41]6.27M1.06B22.9
Proxyless(GPU) [3]7.91M1.24B22.8
DenseNAS-C6.87M1.05B23.1
+ +Table 3: ImageNet classification results of ResNets and DenseNAS networks searched on the ResNet-based search spaces. + +
ModelParamsFLOPsGPU LatencyTop-1 Acc(%)
ResNet-18 [18]11.7M1.81B13.5ms72.0
DenseNAS-R111.1M1.61B12.0ms73.5
ResNet-34 [18]21.8M3.66B24.6ms75.3
DenseNAS-R219.5M3.06B22.2ms75.8
ResNet-50-B [18]25.6M4.09B47.8ms77.7
RandWire-WS, C=109 [42]31.9M4.0B-79.0
DenseNAS-R324.7M3.41B41.7ms78.0
+ +# 4.3. Performance on ResNet-based Search Space + +We apply our DenseNAS framework on the ResNet [18]-based search space to further evaluate the generalization ability of our method. It is convenient to implement DenseNAS on ResNet [18] as we set the candidate operations in the basic layer as the basic block defined in ResNet [18] and the skip connection. The ResNet-based search space is also constructed as a densely connected super network. + +We search for several architectures with different FLOPs and compare them with the original ResNet models on the ImageNet [9] classification task in Tab. 3. We further replace all the basic blocks in DenseNAS-R2 with the bottleneck blocks and obtain DenseNAS-R3 to compare with ResNet-50-B and the NAS model RandWire-WS, $C = 109$ [42] (WS, $C = 109$ ). Though WS, $C = 109$ achieves a higher accuracy, the FLOPs increases 600M, which is a great number, $17.6\%$ of DenseNAS-R3. Besides, WS $C = 109$ uses separable convolutions which greatly decrease the FLOPs while DenseNAS-R3 only contains plain convolutions. Moreover, RandWire networks are unfriendly to inference on existing hardware for the complicated connection patterns. Our proposed DenseNAS promotes the accuracy of ResNet-18, -34 and -50-B by $1.5\%$ , $0.5\%$ and $0.3\%$ with 200M, 600M, 680M fewer FLOPs and 1.5ms, 2.4ms, 6.1ms lower latency respectively. We visualize the comparison results in Fig. 5 and the performance on the ResNet + +![](images/30cc0cf0a4b2ab72e224aa107c21b1e61d45f9da4b9696c06631fcf6ac977221.jpg) +Figure 5: Graphical comparisons between ResNets and DenseNAS networks on the ResNet-based search space. + +based search space further demonstrates the great generalization ability and effectiveness of DenseNAS. + +# 4.4. Ablation Study and Analysis + +Comparison with Other Search Spaces To further demonstrate the effectiveness of our proposed densely connected search space, we conduct the same search algorithm used in DenseNAS on the search spaces of FBNet and ProxylessNAS as well as a new search space which is constructed following the settings of block counts and block widths in MobileNetV2. The three search spaces are denoted as FBNet-SS, Proxyless-SS and MBV2-SS respectively. All the search/training settings and hyper-parameters are the same as that we use for DenseNAS. The results are shown in Tab. 4 and DenseNAS achieves the highest accuracy with the lowest latency. + +Table 4: Comparisons with other search spaces on ImageNet. SS: Search Space. MBV2: MobileNetV2. + +
Search SpaceFLOPsGPU LatencyTop-1 Acc(%)
FBNet-SS [41]369M25.6ms74.9
Proxyless-SS [3]398M18.9ms74.8
MBV2-SS [37]383M32.1ms74.7
DenseNAS361M17.9ms75.3
+ +Comparison with Random Search As random search [24, 38] is treated as an important baseline to validate NAS methods. We conduct random search experiments and show the results in Tab. 1. We randomly sample 15 models in our search space whose FLOPs are similar to DenseNAS-C. Then we train every model for 5 epochs on ImageNet. Finally, we select the one with the highest validation accuracy and train it under the same settings as DenseNAS. The total search cost of the random search is the same as DenseNAS. We observe that DenseNAS-C is $1\%$ accuracy higher compared with the randomly searched model, which proves the effectiveness of DenseNAS. + +Table 5: Comparison with different connection number settings on ImageNet. + +
Connect NumGPU LatencyTop-1 Acc(%)Search Epochs
318.9ms74.8150
417.9ms75.3150
519.2ms74.6150
516.7ms74.9200
+ +The Number of Block Connections We explore the effect of the maximum number of connections between routing blocks in the search space. We set the maximum connection number as 4 in DenseNAS. Then we try more options and show the results in Tab. 5. When we set the connection number to 3, the searched model gets worse performance. We attribute this to the search space shrinkage which causes the loss of many possible architectures with good performance. As we set the number to 5 and the search process takes the same number of epochs as DenseNAS, i.e. 150 epochs. The performance of the searched model is not good, even worse than that of the connection number 3. Then we increase the search epochs to 200 and the search process achieves a comparable result with DenseNAS. This phenomenon indicates that larger search spaces need more search cost to achieve comparable/better results with/than smaller search spaces with some added constraints. + +Cost Estimation Method As the super network is densely connected and the final architecture is derived based on the total transition probability, the model cost estimation needs to take the effects of all the path probabilities on the whole network into consideration. We try a local cost estimation strategy that does not involve the global connection effects on the whole super network. Specifically, we compute the cost of the whole network by summing the cost of every routing block during the search as follows, while the transition probability $p_{ji}$ is only used for computing the cost of each individual block rather than the whole network. + +$$ +\operatorname {c o s t} = \sum_ {i} ^ {B} \left(\sum_ {j = i - m} ^ {j = i - 1} p _ {j i} \cdot \operatorname {c o s t} _ {\text {a l i g n}} ^ {j i} + \operatorname {c o s t} _ {b} ^ {i}\right), \tag {9} +$$ + +where all definitions in the equation are the same as that in Eq. 6. We randomly generate the architecture parameters $(\alpha$ and $\beta)$ to derive the architectures. Then we draw the approximated cost values computed by local cost estimation and our proposed chained cost estimation respectively, and compare with the real cost values in Fig. 6. In this experiment, we take FLOPs as the model cost because the FLOPs is easier to measure than latency. 1,500 models are sampled in total. The results show that the predicted cost values computed by our chained cost estimation algorithm has a much stronger correlation with the real values and approximate more to the real ones. As the predicted values are computed based on the randomly generated architecture parameters + +![](images/293118887d85b66a7b383266fcc7b97a9ad947b2295fcbfff9cfec9aedc8647d.jpg) +Figure 6: Predicted values of FLOPs computed by chained cost estimation and local cost estimation algorithm. + +which are not binary parameters, there are still differences between the predicted and real values. + +Architecture Analysis We visualize the searched architectures in Fig. 4. It shows that DenseNAS-B and -C have one more block in the last stage than other architectures, which indicates enlarging the depth in the last stage of the network tends to obtain a better accuracy. Moreover, the smallest architecture DenseNAS-A whose FLOPs is only $251\mathrm{M}$ has one fewer block than DenseNAS-B and -C to decrease the model cost. The structures of the final searched architectures show the great flexibility of DenseNAS. + +# 5. Conclusion + +We propose a densely connected search space for more flexible architecture search, DenseNAS. We tackle the limitations in previous search space design in terms of the block counts and widths. The novelly designed routing blocks are utilized to construct the search space. The proposed chained cost estimation algorithm aims at optimizing both accuracy and model cost. The effectiveness of DenseNAS is demonstrated on both MobileNetV2- and ResNet-based search spaces. We leave more applications, e.g. semantic segmentation, face detection, pose estimation, and more network-based search space implementations, e.g. MobileNetV3 [20], ShuffleNet [45] and VarGNet [44], for future work. + +# Acknowledgement + +This work was supported by National Key R&D Program of China (No. 2018YFB1402600), National Natural Science Foundation of China (NSFC) (No. 61876212, No. 61733007 and No. 61572207), and HUST-Horizon Computer Vision Research Center. We thank Liangchen Song, Kangjian Peng and Yingqing Rao for the discussion and assistance. + +# References + +[1] Gabriel Bender, Pieter-Jan Kindermans, Barret Zoph, Vijay Vasudevan, and Quoc V. Le. Understanding and simplifying one-shot architecture search. In ICML, 2018. 3, 5 +[2] Andrew Brock, Theodore Lim, James M. Ritchie, and Nick Weston. SMASH: one-shot model architecture search through hypernetworks. arXiv:1708.05344, 2017. 3 +[3] Han Cai, Ligeng Zhu, and Song Han. ProxylessNAS: Direct neural architecture search on target task and hardware. In ICLR, 2019. 1, 2, 3, 4, 5, 6, 7 +[4] Kai Chen, Jiaqi Wang, Jiangmiao Pang, Yuhang Cao, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jiarui Xu, Zheng Zhang, Dazhi Cheng, Chenchen Zhu, Tianheng Cheng, Qijie Zhao, Buyu Li, Xin Lu, Rui Zhu, Yue Wu, and Dahua Lin. Mmdetection: Open mmlab detection toolbox and benchmark. arXiv:1906.07155, 2019. 6 +[5] Liang-Chieh Chen, Maxwell D. Collins, Yukun Zhu, George Papandreou, Barret Zoph, Florian Schroff, Hartwig Adam, and Jonathon Shlens. Searching for efficient multi-scale architectures for dense image prediction. In NeurIPS, 2018. 1 +[6] Yukang Chen, Tong Yang, Xiangyu Zhang, Gaofeng Meng, Chunhong Pan, and Jian Sun. Detnas: Neural architecture search on object detection. In NeurIPS, 2019. 6, 7 +[7] Xiangxiang Chu, Bo Zhang, Ruijun Xu, and Jixiang Li. Fairnas: Rethinking evaluation fairness of weight sharing neural architecture search. arXiv:1907.01845, 2019. 1, 2 +[8] Xiaoliang Dai, Peizhao Zhang, Bichen Wu, Hongxu Yin, Fei Sun, Yanghan Wang, Marat Dukhan, Yunqing Hu, Yiming Wu, Yangqing Jia, Peter Vajda, Matt Uyttendaele, and Niraj K. Jha. Chamnet: Towards efficient network design through platform-aware model adaptation. arXiv:1812.08934, 2018. 2 +[9] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Fei-Fei Li. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. 2, 5, 7 +[10] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Fei-Fei Li. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. 3 +[11] Jin-Dong Dong, An-Chieh Cheng, Da-Cheng Juan, Wei Wei, and Min Sun. Dpp-net: Device-aware progressive search for pareto-optimal neural architectures. In ECCV, 2018. 3 +[12] Xuanyi Dong and Yi Yang. Network pruning via transformable architecture search. arXiv:1905.09717, 2019. 3 +[13] Jiemin Fang, Yukang Chen, Xinbang Zhang, Qian Zhang, Chang Huang, Gaofeng Meng, Wenyu Liu, and Xinggang Wang. EAT-NAS: elastic architecture transfer for accelerating large-scale neural architecture search. arXiv:1901.05884, 2019. 2 +[14] Jiemin Fang, Yuzhu Sun, Kangjian Peng, Qian Zhang, Yuan Li, Wenyu Liu, and Xinggang Wang. Fast neural network adaptation via parameter remapping and architecture search. In ICLR, 2020. 3 +[15] G David Forney. The viterbi algorithm. Proceedings of the IEEE, 1973. 5 + +[16] Golnaz Ghiasi, Tsung-Yi Lin, and Quoc V Le. Nas-fpn: Learning scalable feature pyramid architecture for object detection. In CVPR, 2019. 1 +[17] Ariel Gordon, Elad Eban, Ofir Nachum, Bo Chen, Hao Wu, Tien-Ju Yang, and Edward Choi. Morphnet: Fast & simple resource-constrained structure learning of deep networks. In CVPR, 2018. 2 +[18] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 2, 5, 7 +[19] Geoffrey Hinton, Oriol Vinyls, and Jeff Dean. Distilling the knowledge in a neural network. arXiv:1503.02531, 2015. 3 +[20] Andrew Howard, Mark Sandler, Grace Chu, Liang-Chieh Chen, Bo Chen, Mingxing Tan, Weijun Wang, Yukun Zhu, Ruoming Pang, Vijay Vasudevan, et al. Searching for mobilenetv3. arXiv:1905.02244, 2019. 8 +[21] Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andretto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv:1704.04861, 2017. 6 +[22] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. In ICLR, 2017. 3 +[23] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. University of Toronto. 3 +[24] Liam Li and Ameet Talwalkar. Random search and reproducibility for neural architecture search. arXiv:1902.07638, 2019. 7 +[25] Tsung-Yi Lin, Michael Maire, Serge J. Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C. Lawrence Zitnick. Microsoft COCO: common objects in context. In ECCV, 2014. 5, 6 +[26] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólar. Focal loss for dense object detection. In ICCV, 2017. 6 +[27] Chenxi Liu, Liang-Chieh Chen, Florian Schroff, Hartwig Adam, Wei Hua, Alan L Yuille, and Li Fei-Fei. Autodeplab: Hierarchical neural architecture search for semantic image segmentation. In CVPR, 2019. 1, 2 +[28] Chenxi Liu, Barret Zoph, Maxim Neumann, Jonathon Shlens, Wei Hua, Li-Jia Li, Li Fei-Fei, Alan L. Yuille, Jonathan Huang, and Kevin Murphy. Progressive neural architecture search. In ECCV, 2018. 2 +[29] Hanxiao Liu, Karen Simonyan, Oriol Vinyals, Chrisantha Fernando, and Koray Kavukcuoglu. Hierarchical representations for efficient architecture search. In ICLR, 2018. 2, 3 +[30] Hanxiao Liu, Karen Simonyan, and Yiming Yang. DARTS: Differentiable architecture search. In ICLR, 2019. 2, 3, 6 +[31] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C Berg. Ssd: Single shot multibox detector. In ECCV, 2016. 6 +[32] Zhou Lu, Hongming Pu, Feicheng Wang, Zhiqiang Hu, and Liwei Wang. The expressive power of neural networks: A view from the width. In NeurIPS, 2017. 2 +[33] Chris J. Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. In ICLR, 2017. 3 + +[34] Hieu Pham, Melody Y. Guan, Barret Zoph, Quoc V. Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. In ICML, 2018. 1, 2, 3 +[35] Maithra Raghu, Ben Poole, Jon Kleinberg, Surya Ganguli, and Jascha Sohl Dickstein. On the expressive power of deep neural networks. In ICML, 2017. 2 +[36] Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V. Le. Regularized evolution for image classifier architecture search. arXiv:abs/1802.01548, 2018. 1, 2, 3, 6 +[37] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zh-moginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In CVPR, 2018. 1, 2, 5, 6, 7 +[38] Christian Sciuto, Kaicheng Yu, Martin Jaggi, Claudiu Musat, and Mathieu Salzmann. Evaluating the search phase of neural architecture search. arXiv:1902.08142, 2019. 7 +[39] Mingxing Tan, Bo Chen, Ruoming Pang, Vijay Vasudevan, and Quoc V. Le. Mnasnet: Platform-aware neural architecture search for mobile. arXiv:1807.11626, 2018. 1, 2, 4, 6, 7 +[40] Mingxing Tan and Quoc V Le. Efficientnet: Rethinking model scaling for convolutional neural networks. arXiv:1905.11946, 2019. 2 +[41] Bichen Wu, Xiaoliang Dai, Peizhao Zhang, Yanghan Wang, Fei Sun, Yiming Wu, Yuandong Tian, Peter Vajda, Yangqing Jia, and Kurt Keutzer. Fbnet: Hardware-aware efficient convnet design via differentiable neural architecture search. arXiv:1812.03443, 2018. 1, 2, 3, 4, 6, 7 +[42] Saining Xie, Alexander Kirillov, Ross Girshick, and Kaiming He. Exploring randomly wired neural networks for image recognition. In ICCV, 2019. 2, 6, 7 +[43] Hang Xu, Lewei Yao, Wei Zhang, Xiaodan Liang, and Zhenguo Li. Auto-fpn: Automatic network architecture adaptation for object detection beyond classification. In ICCV, 2019. 1 +[44] Qian Zhang, Jianjun Li, Meng Yao, Liangchen Song, Helong Zhou, Zhichao Li, Wenming Meng, Xuezhi Zhang, and Guoli Wang. Vargnet: Variable group convolutional neural network for efficient embedded computing. arXiv:1907.05653, 2019.8 +[45] Xiangyu Zhang, Xinyu Zhou, Mengxiao Lin, and Jian Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. arXiv:1707.01083, 2017. 8 +[46] Yiheng Zhang, Zhaofan Qiu, Jingen Liu, Ting Yao, Dong Liu, and Tao Mei. Customizable architecture search for semantic segmentation. In CVPR, 2019. 2 +[47] Zhao Zhong, Junjie Yan, Wei Wu, Jing Shao, and ChengLin Liu. Practical block-wise neural network architecture generation. In CVPR, 2018. 3 +[48] Barret Zoph and Quoc V. Le. Neural architecture search with reinforcement learning. arXiv:1611.01578, 2016. 1, 3 +[49] Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V. Le. Learning transferable architectures for scalable image recognition. arXiv:1707.07012, 2017. 1, 2, 3, 6 \ No newline at end of file diff --git a/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/images.zip b/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..fae4e011104f2dd89dbcb730d2ca7947680f767f --- /dev/null +++ b/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46a550490752e8395d22b48b62a65dd6cd63234e3f2b9a1654665054632ececf +size 549200 diff --git a/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/layout.json b/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e924f4d7e95915ef28f97b6d7d4fb7d59115bf4a --- /dev/null +++ b/denselyconnectedsearchspaceformoreflexibleneuralarchitecturesearch/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a53ad41b9cd6bfd897ca689503834632968b14f53bed32557c6f2193f8affbc +size 368782 diff --git a/denseregressionnetworkforvideogrounding/e30284df-eb98-4ef3-8efa-0ad22031c922_content_list.json b/denseregressionnetworkforvideogrounding/e30284df-eb98-4ef3-8efa-0ad22031c922_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..61fe7b4f2d69b587582373763cfbf7fb3677f6be --- /dev/null +++ b/denseregressionnetworkforvideogrounding/e30284df-eb98-4ef3-8efa-0ad22031c922_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9ff7fc023956066105b4e6e9db81fc4ce2dd81afe49f3d126d438598b569e72 +size 79746 diff --git a/denseregressionnetworkforvideogrounding/e30284df-eb98-4ef3-8efa-0ad22031c922_model.json b/denseregressionnetworkforvideogrounding/e30284df-eb98-4ef3-8efa-0ad22031c922_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2db0a5a2ee71ba1253bf95624b67d34431bdd74a --- /dev/null +++ b/denseregressionnetworkforvideogrounding/e30284df-eb98-4ef3-8efa-0ad22031c922_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95a3175cb8ecdb772831ec5bd55aadc063e13173d1e947c22b540a9b528735fb +size 97660 diff --git a/denseregressionnetworkforvideogrounding/e30284df-eb98-4ef3-8efa-0ad22031c922_origin.pdf b/denseregressionnetworkforvideogrounding/e30284df-eb98-4ef3-8efa-0ad22031c922_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1dcc6a95ef765d3dc04d84c4da555e9e387d0c07 --- /dev/null +++ b/denseregressionnetworkforvideogrounding/e30284df-eb98-4ef3-8efa-0ad22031c922_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a51fb6438da7b14957ed5e81853820be947de15e04ee7e44fa9f6bdcb1723e1d +size 950185 diff --git a/denseregressionnetworkforvideogrounding/full.md b/denseregressionnetworkforvideogrounding/full.md new file mode 100644 index 0000000000000000000000000000000000000000..2e29d52b7b128b2d8f0bc4ceae939824c568269b --- /dev/null +++ b/denseregressionnetworkforvideogrounding/full.md @@ -0,0 +1,303 @@ +# Dense Regression Network for Video Grounding + +Runhao Zeng $^{1,3*}$ Haoming Xu $^{1}$ Wenbing Huang $^{4}$ Peihao Chen $^{1}$ Mingkui Tan $^{1\dagger}$ Chuang Gan $^{2}$ $^{1}$ School of Software Engineering, South China University of Technology, China + $^{2}$ MIT-IBM Watson AI Lab ${}^{3}$ Peng Cheng Laboratory, Shenzhen, China + $^{4}$ Beijing National Research Center for Information Science and Technology (BNRist), Department of Computer Science and Technology, Tsinghua University + +{runhaozeng.cs, ganchuang1990}@gmail.com, hwenbing@126.com, mingkuitan@scut.edu.cn + +# Abstract + +We address the problem of video grounding from natural language queries. The key challenge in this task is that one training video might only contain a few annotated starting/ending frames that can be used as positive examples for model training. Most conventional approaches directly train a binary classifier using such imbalance data, thus achieving inferior results. The key idea of this paper is to use the distances between the frame within the ground truth and the starting (ending) frame as dense supervisions to improve the video grounding accuracy. Specifically, we design a novel dense regression network (DRN) to regress the distances from each frame to the starting (ending) frame of the video segment described by the query. We also propose a simple but effective IoU regression head module to explicitly consider the localization quality of the grounding results (i.e., the IoU between the predicted location and the ground truth). Experimental results show that our approach significantly outperforms state-of-the-arts on three datasets (i.e., Charades-STA, ActivityNet-Captions, and TACoS). + +# 1. Introduction + +Video grounding is an important yet challenging task in computer vision, which requires the machine to watch a video and localize the starting and ending time of the target video segment that corresponds to the given query, as shown in Figure 1. This task has drawn increasing attention over the past few years due to its vast potential applications in video understanding [38, 3, 45, 44, 6], video retrieval [42, 8], and human-computer interaction [35, 20, 50], etc. + +The task, however, is very challenging due to several reasons: 1) It is nontrivial to build connections between + +![](images/8c2cec2cf977b9039c9f9761a8f8603886156498df296225bc26e513a52077bd.jpg) +Figure 1. An illustrative example of the video grounding task. Given a video and a query in natural language, the video grounding task aims to identify the starting time and the ending time of the video segment described by the query. One key challenge of this task is how to leverage dense supervision upon sparsely annotated starting and ending frames only. + +the query and complex video contents; 2) Localizing actions of interest precisely in a video with complex backgrounds is very difficult. More critically, a video can often contain many thousands of frames, but it may have only a few annotated starting/ending frames (namely the positive training examples), making the problem even more challenging. Previous approaches often adopt a two-stage pipeline [9, 40, 10], where they generate the proposals and rank them according to their similarities with the query. However, this pipeline incurs two issues: 1) One video often contains thousands of proposals, resulting in a heavy computation cost when comparing proposal-query pairs. 2) The performance highly relies on the quality of proposals. To address the above issues, one-stage video grounding methods [5, 43, 11] have been studied. Yuan et al. [43] propose to learn a representation of the video-query pair and use a multi-layer perceptron (MLP) to regress the starting and ending time. Chen et al. [5] and Ghosh et al. [11] attempt to predict two probabilities at each frame, which indicate whether this frame is a starting (or ending) frame of the target video segment. The grounding result is obtained by selecting the frame with the largest starting (or ending) probability. However, the existing two-stage and one-stage methods have one common issue: they neglect the rich information from the frames within the ground truth. + +Recently, anchor-free approaches [21, 31, 36, 26, 24] for one-stage object detection become increasingly popular because of their simplicity and effectiveness. In this vein, Tian et al. [36] propose the FCOS framework to solve object detection in a per-pixel prediction fashion. Specifically, FCOS trains a regression network to directly predict the distance from each pixel in the object to the object's boundary. This idea is helpful for video grounding. If we train a model to predict the distance from each frame to the ground truth boundary, then all the frames within the ground truth can be leveraged as positive training samples. In this way, the number of positive samples is sufficiently increased and thus benefits the training. + +In this paper, we propose a dense regression network for video grounding, which consists of four modules, including a video-query interaction module, a location regression head, a semantic matching head, and an IoU regression head. The main idea is as straightforward as training a regression module to directly regress the ground truth boundary from each frame within the ground truth. In the training, all frames within the ground truth are selected as positive samples. By doing so, the sparse annotation is able to be used to generate more positive training samples sufficiently, which boosts grounding performance eventually. + +For each video-query pair, our model produces dense predictions (i.e., one predicted temporal bounding box for each frame) while we are only interested in the one that matches the query best. To select the best grounding result, we focus on two perspectives: 1) Does the box match the query semantically? 2) Does the box match the temporal boundary of the ground truth? Specifically, we train a semantic matching head to predict a score for each box, which indicates whether the content in the box matches the query semantically. However, this score cannot directly reflect the localization quality (i.e., the IoU with the ground truth), which is of vital importance for video grounding. This motivates us to further consider the localization quality of each prediction. To do so, one may use the "centerness" assumption in FCOS, which, however, is empirically found inapplicable for video grounding (see Table 5). In this paper, we train an IoU regression head to directly estimate the IoU between the predicted box and the ground truth. Last, we combine the matching score and the IoU score to find the best grounding result. It is worth noting that the dense regression network works in a one-stage manner. We evaluate our proposed method on three popular benchmarks for video grounding, i.e., Charades-STA [9], ActivityNet-Captions [25] and TACoS [32]. + +To sum up, our contributions are as follows: + +- We propose a dense regression network for one-stage video grounding. We provide a new perspective to leverage dense supervision from the sparse annotations in video grounding. + +- To explicitly consider the localization quality of the predictions, we propose a simple but effective IoU regression head and integrate it into our one-stage paradigm. +- We verified the effectiveness of our proposed method on three video grounding datasets. On ActivityNetCaptions especially, our method obtains the accuracy of $42.49\%$ , which significantly outperforms the state-of-the-art, i.e., $36.90\%$ by He et al. [16]. + +# 2. Related work + +Video grounding. Recently, great progress has been achieved in deep learning [48, 47, 2, 15, 13, 14, 19, 1, 51], which facilitates the development of video grounding. Existing methods on this task can be grouped into two categories (i.e., two-stage and one-stage). Most two-stage methods [9, 17, 10, 4, 30, 49] resort to a propose-and-rank pipeline, where they first generate proposals and then rank them relying on the similarity between proposal and query. Gao et al. [9] and Hendricks et al. [17] propose to use the sliding windows as proposals and then perform a comparison between each proposal and the input query in a joint multi-modal embedding space. To improve the quality of the proposals, Xu et al. [40] incorporate a query into a neural network to generate the query-guided proposals. Zhang et al. [46] explicitly model temporal relations among proposals using a graph. The two-stage methods are straightforward but have two limitations: 1) Comparing all the proposal-query pairs leads to a heavy computation cost; 2) The performance highly relies on the quality of proposals. Our method is able to avoid the above limitations since the candidate proposals are not required. + +To perform video grounding more efficiently, many methods that go beyond the propose-and-rank pipeline have been studied. He et al. [16] and Wang et al. [39] propose a reinforcement learning method for video grounding task. In the work by He et al. [16], the agent adjusts the boundary of a temporal sliding window according to the learned policy. At the same time, Yuan et al. [43] propose the attention-based grounding approach which directly predicts the temporal coordinates of the video segment that described by the input query. Ghosh et al. [11] and Chen et al. [4] propose to select the starting and ending frames by leveraging cross-modal interactions between text and video. Specifically, they predict two probabilities at each frame, which indicate whether this frame is a starting (or ending) frame of the ground truth video segment. Unlike the previous work by Chen et al. [4] and Ghosh et al. [11] where only the starting and ending frame are selected as positive training samples, our method is able to leverage much more positive training samples, which significantly boosts the grounding performance. + +![](images/d12dc88da11d9139af8a930fce15ddb853189f4f024e76cfe6197f4a46417780.jpg) +Figure 2. Schematic of our dense regression network. We use the video-query interaction module to fuse the features from the video and query. By constructing the feature pyramid, we obtain hierarchical feature maps and forward them to the grounding module. At each location $t$ , the grounding module predicts a temporal bounding box, along with a semantic matching score and an IoU score for ranking. + +![](images/f35b0dfd21ac17d829d35022b1d119a74062bd17ad30237a733b6f493f12f2cf.jpg) + +Anchor-free object detection. Anchor-free object detectors [21, 31, 36, 26, 24] predict bounding boxes and class scores without using predefined anchor boxes. Redmon et al. propose YOLOv1 [31] to predict bounding boxes at the points near the center of objects. Law et al. propose CornerNet [26] to detect an object bounding box as a pair of corners and CornerNet obtains a high recall. Kong et al. propose FoveaBox [24] to predict category-sensitive semantic maps for the object existing possibility and produce a category-agnostic bounding box at each position. Tian et al. devise FCOS [36] to make full use of the pixels in a ground truth bounding box to train the model and propose centerness to suppress the low-quality predictions. Our work is related to FCOS since we also directly predict the distance from each frame to the ground truth boundary. + +# 3. Proposed method + +Notation. Let $V = \{I_t \in \mathbb{R}^{H \times W \times 3}\}_{t=1}^T$ be an untrimmed video, where $I_t$ denotes the frame at time slot $t$ with height $H$ and width $W$ . We denote the query with $N$ words as $Q = \{w_n\}_{n=1}^N$ , where $w_n$ is the $n$ -th word in the query. + +Problem Definition. Given a video $V$ and a query $Q$ , video grounding requires the machine to localize a video segment (i.e., a temporal bounding box $\mathbf{b} = (t_s, t_e)$ ) starting at $t_s$ and ending at $t_e$ , which corresponds to the query. This task is very challenging since it is difficult to localize actions of interest precisely in a video with complex contents. More critically, only a few frames are annotated in one video, making the training samples extremely imbalanced. + +# 3.1. General scheme + +We focus on solving the problem that existing video grounding methods neglect the rich information from the frames within the ground truth, which, however, is able to significantly improve the localization accuracy. To this end, + +we propose a dense regression network to regress the starting (or ending) frame of the video segment described by the query for each frame. In this way, we are able to select every frame within the ground-truth as a positive training sample, which significantly benefits the training of our video grounding model. + +Formally, we forward the video frames $\{I_t\}_{t=1}^T$ and the query $\{w_n\}_{n=1}^N$ to the video-query interaction module $G$ for extracting the multi-scale feature maps. Then, each feature map is processed by the grounding module, which consists of three components, i.e., location regression head $M_{loc}$ , semantic matching head $M_{match}$ and IoU regression head $M_{iou}$ . The location regression head predicts a temporal bounding box $\hat{\mathbf{b}}_t$ at the $t$ -th frame by computing + +$$ +\left\{\hat {\mathbf {b}} _ {t} \right\} _ {t = 1} ^ {T} = \left\{\left(t - \hat {d} _ {t, s}, t + \hat {d} _ {t, e}\right) \right\} _ {t = 1} ^ {T}, \tag {1} +$$ + +$$ +\left\{\left(\hat {d} _ {t, s}, \hat {d} _ {t, e}\right) \right\} _ {t = 1} ^ {T} = M _ {l o c} \left(G \left(\left\{I _ {t} \right\} _ {t = 1} ^ {T}, \left\{w _ {n} \right\} _ {n = 1} ^ {N}\right)\right), +$$ + +where $(\hat{d}_{t,s},\hat{d}_{t,e})$ are the predicted distances to the starting and ending frame. With the predicted boxes $\{\hat{\mathbf{b}}_t\}_{t = 1}^T$ at hand, our target is to select the box that matches the query best. To this end, we propose two heads in the grounding module. The semantic matching head predicts a score $\hat{m}_t$ indicating whether the content in the box $\hat{\mathbf{b}}_t$ matches the query semantically. However, this score cannot directly reflect the localization quality (i.e., the IoU with the ground truth), which, however, is also very important for video grounding. Therefore, we propose the IoU regression head to predict a score $\hat{u}_t$ for directly estimating the IoU between $\hat{\mathbf{b}}_t$ and the corresponding ground truth. The schematic of our approach is shown in Figure 2. For simplicity, we denote our model as dense regression network (DRN). + +Inference details. Given an input video, we forward it through the network and obtain a box $\hat{\mathbf{b}}_t$ , a semantic matching score $\hat{m}_t$ as well as an IoU score $\hat{u}_t$ for each frame $I_t$ . + +The final grounding result is obtained by choosing the box with the highest $\hat{m}_t \times \hat{u}_t$ . + +In the following, we will introduce the details of the video-query interaction module in Section 3.2. Then, we detail the location regression head, the semantic matching head and the IoU regression head in Sections 3.3, 3.4, and 3.5, respectively. Last, we introduce the training details of our model in Section 3.6. + +# 3.2. Multi-level video-query interaction module + +Building connections between vision and language is a crucial step for video grounding. To learn better vision-language representations, we propose a multi-level videoquery interaction module. Given a video with $T$ frames, we use some feature extractor (e.g., C3D [37]) to obtain the video feature $\mathbf{F} \in \mathbb{R}^{T \times c}$ , where $c$ is the channel dimension. Then, the vision-language representations are produced by using multi-level fusion and temporal location embedding. + +Multi-level fusion. The target video segments described by the query often have large scale variance in video grounding. For example on Charades-STA dataset [9], the shortest ground truth is 2.4s while the longest is 180.8s. To handle this issue, we follow Lin et al. [27] to obtain a set of hierarchical feature maps from multiple levels. Since the model may focus on different parts of the input query at each level, we follow [18] to fuse the query and the video features at different levels. Specifically, we encode the query $Q = \{w_{n}\}_{n = 1}^{N}$ into $\{h_n\}_{n = 1}^N$ and a global representation $g$ by using a bi-directional LSTM as: + +$$ +\mathbf {h} _ {1}, \mathbf {h} _ {2}, \dots , \mathbf {h} _ {N} = \operatorname {B i L S T M} (Q) \text {a n d} g = \left[ \mathbf {h} _ {1}; \mathbf {h} _ {N} \right], \tag {2} +$$ + +where $h_n = [\vec{h_n}; \vec{h_n}]$ is the concatenation of the forward and backward hidden states of the LSTM for the $n$ -th word. For the $i$ -th level, a textual attention $\alpha_{i,n}$ is computed over the words, and the query feature $q_i$ is computed as: + +$$ +\begin{array}{l} \boldsymbol {q} _ {i} = \sum_ {n = 1} ^ {N} \alpha_ {i, n} \cdot \boldsymbol {h} _ {n}, \tag {3} \\ \alpha_ {i, n} = \mathrm {S o f t m a x} (W _ {1} (\boldsymbol {h} _ {n} \odot (W _ {2} ^ {(i)} \mathrm {R e L U} (W _ {3} g)))) \\ \end{array} +$$ + +where $\odot$ is element-wise multiplication. $W_{1}$ and $W_{3}$ are the parameters shared across different levels but $W_{2}^{(i)}$ is learned separately for each level $i$ . Given the input visual feature $\mathbf{M}_i \in \mathbb{R}^{T_i \times c}$ of a vision-language fusion module, we first duplicate $\mathbf{q}_i$ for $T_i$ times to obtain a feature map $\mathbf{D}_i \in \mathbb{R}^{T_i \times c}$ , where $T_i$ is the temporal resolution at the $i$ -th level. Then, we perform element-wise multiplication to fuse $\mathbf{M}_i$ and $\mathbf{D}_i$ , leading to a set of feature maps $\{\mathbf{C}_i \in \mathbb{R}^{T_i \times c}\}_{i=1}^L$ , where $L$ is set to 3 in our paper. Last, we obtain the feature maps $\{\mathbf{P}_i \in \mathbb{R}^{T_i \times c}\}_{i=1}^L$ for the grounding module by using FPN. We put more details in the supplementary material. + +Temporal location embedding. We find that the queries often contain some words for referring temporal orders, such as "after" and "before". Therefore, we seek to fuse the temporal information of the video with the visual features. The temporal location of the $t$ -th frame (or segment) is $l_{t} = \left[\frac{t - 0.5}{T}, \frac{t + 0.5}{T}, \frac{1}{T}\right]$ . The location embedding $l_{t}$ is concatenated with the output of the vision-query fusion module that fuses the video feature $\mathbf{F}$ and the query feature. Note that the concatenation is performed along the channel dimension, resulting in the feature map $\mathbf{C}_{1}$ . + +# 3.3. Location regression head + +With the vision-language representation $\mathbf{P}$ (we omit index $i$ for better readability), we propose a location regression head to predict the distance from each frame to the starting (or ending) frame of the video segment that corresponds to the query. We implement it as two 1D convolution layers with two output channels in the last layer. For each location $t$ on the feature map $\mathbf{P}$ , if it falls inside the ground truth, then this location is considered as a training sample. Then, we have a vector $\pmb{d}_t = (d_{t,s}, d_{t,e})$ being the regression target at location $t$ . Here, $d_{t,s}$ and $d_{t,e}$ denote the distance from location $t$ to the corresponding boundary and are computed as + +$$ +d _ {t, s} = t - t _ {s}, d _ {t, e} = t _ {e} - t, \tag {4} +$$ + +where $t_s$ and $t_e$ is the starting and ending frames of the ground truth, respectively. It is worth noting that $d_{t,s}$ and $d_{t,e}$ are all positive real values since the positive location $t$ falls in the ground truth (i.e., $t_s < t < t_e$ ). For those locations fall outside the ground truth, we do not use them to train the location regression head as in [36]. + +It is worth mentioning that the FPN [27] exploited in our video-query interaction module could also help the location regression head. The intuition is that all the positive locations from different feature maps can be used to train the location regression head, which further increases the number of training samples. + +# 3.4. Semantic matching head + +For each video-query pair, the location regression head predicts a temporal bounding box $\hat{\mathbf{b}}_t$ at each location $t$ . Then, how to select the box that matches the query best is the key to perform video grounding. + +Since the target of video grounding is to localize the video segments described by the query, it is straightforward to evaluate whether the content in $\hat{\mathbf{b}}_t$ matches the query semantically. To this end, we devise a semantic matching head to predict a score $\hat{m}_t$ for each predicted box $\hat{\mathbf{b}}_t$ . The semantic matching head is implemented as two 1D convolution layers with one output channel in the last layer. If location $t$ falls in the ground truth, its label is set as $m_t = 1$ . For those + +locations fall outside the ground truth, we consider them as negative training samples, i.e., $m_{t} = 0$ . + +# 3.5. IoU regression head + +The semantic matching score $\hat{m}_t$ indicates whether the content in the box $\hat{\mathbf{b}}_t$ matches the query semantically. However, we also care about whether $\hat{\mathbf{b}}_t$ matches the ground truth temporal boundary, which can be measured by the localization quality (i.e., the IoU with the ground truth). + +To find the box with the best localization quality, one may use the "centerness" technique in FCOS [36]. In short, "centerness" is introduced for object detection to suppress the low-quality detected objects based on a hand-crafted assumption—the location closer to the center of objects will predict a box with higher localization quality (i.e., a larger IoU with the ground truth). However, we empirically found that this assumption is inapplicable to video grounding. Specifically, we conduct an experiment to find out which location predicts the best box (i.e., has the largest IoU with the ground truth). For each video-query pair, we select the predicted box that has the largest IoU with the ground truth. Then, we divide the ground truth into three portions evenly and sum up the number of locations that predicts the best box for each portion. Experimental results show that More than $46\%$ of the predictions are not predicted by the central locations of the ground truth. + +In this paper, we propose to explicitly consider the localization quality of the predicted box $\hat{\mathbf{b}}_t$ in the training and testing. The main idea is as straightforward as predicting a score at each location $t$ to estimate the IoU between $\hat{\mathbf{b}}_t$ and the corresponding ground truth. To do so, we train a three-layer convolution network as the IoU regression head in the grounding module, as shown in Figure 2. Note that the input of the IoU regression head is the concatenation of the feature maps obtained from the first convolution layer of the semantic matching head and the location regression head. The training target $u_t$ is obtained by calculating the IoU between $\hat{\mathbf{b}}_t$ and the corresponding ground truth. + +# 3.6. Training details + +We define the training loss function for the location regression head as follows: + +$$ +L _ {l o c} = \frac {1}{N _ {p o s}} \sum_ {t = 1} ^ {T} \mathbb {1} _ {g t} ^ {t} L _ {1} \left(\boldsymbol {d} _ {t}, \hat {\boldsymbol {d}} _ {t}\right), \tag {5} +$$ + +where we use the IoU regression loss [41] as $L_{1}$ following Tian et al. [36]. $N_{pos}$ is the number of positive samples. $\mathbb{1}_{gt}^{t}$ is the indicator function, being 1 if location $t$ falls in the ground truth and 0 otherwise. The training loss function for the semantic matching head is defined as: + +$$ +L _ {\text {m a t c h}} = \frac {1}{N _ {\text {p o s}}} \sum_ {t = 1} ^ {T} L _ {2} \left(m _ {t}, \hat {m} _ {t}\right), \tag {6} +$$ + +where we adopt the focal loss [28] as $L_{2}$ since it is effective when handling the class imbalance issue. To train the IoU regression head for predicting the IoU between the predicted box and ground truth, we define the training loss function as follows: + +$$ +L _ {i o u} = \sum_ {t = 1} ^ {T} L _ {3} \left(u _ {t}, \hat {u} _ {t}\right), \tag {7} +$$ + +where we choose to use the Smooth-L1 loss [12] as $L_{3}$ because it is less sensitive to outliers. + +With randomly initialized parameters, the location regression head often fails to produce high-quality temporal bounding boxes for training the IoU regression head. Thus, we propose a three-step strategy to train the proposed DRN, which consists of a video-query interaction module $G$ , a semantic matching head $M_{\text{match}}$ , an IoU regression head $M_{\text{iou}}$ and a location regression head $M_{\text{loc}}$ . Specifically, in the first step, we fix the parameters of the IoU regression head and train the DRN by minimizing Equations (5) and (6). In the second step, we fix the parameters in DRN except for the IoU regression head and train the DRN by minimizing Equation (7). In the third step, we fine-tune the whole model in an end-to-end manner1. + +# 4. Experiments + +# 4.1. Datasets + +Charades-STA is a benchmark dataset for the video grounding task, which is built upon the Charades [33] dataset. The Charades dataset is collected for video action recognition and video captioning. Gao et al. [9] adapt the Charades dataset to the video grounding task by collecting the query annotations. The Charades-STA dataset contains 6672 videos and involves 16128 video-query pairs, where 12408 pairs are used for training and 3720 for testing. The duration of the videos is 29.76 seconds on average. Each video has 2.4 annotated moments and the duration of each moment is 8.2 seconds. We follow the same split of the dataset as in Gao et al. [9] for fair comparisons. + +ActivityNet-Captions (ANet-Captions) is collected for the dense video captioning task. It is also a popular benchmark for video grounding since the captions can be used as queries. ANet-Captions consists of 20K videos with 100K queries. The videos are associated with 200 activity classes, where the content is more diverse compared to CharadesSTA. On average, each video contains 3.65 queries, and each query has an average length of 13.48 words. The average duration of the videos is around 2 minutes. The ActivityNet Captions dataset is split into the training set, validation set, testing set with a 2:1:1 ratio, including 37421, 17505 and 17031 video-query pairs separately. The public + +split of the dataset contains a training set and two validation sets val_1 and val_2. The testing set is withheld for competition. We train our model on the training set and evaluate it on val_1 and val_2 separately for fair comparisons. + +TACoS dataset is collected by Regneri et al. [32] for video grounding and dense video captioning tasks. It consists of 127 videos on cooking activities with an average length of 4.79 minutes. For the video grounding task, TACoS dataset contains 18818 video-query pairs. Compared to ActivityNet Captions dataset, TACoS has more temporally annotated video segments with queries per video. Each video has 148 queries on average. Moreover, TACoS dataset is very challenging since the queries in TACoS dataset span over only a few seconds even a few frames. We follow the same split of the dataset as Gao et al. [9] for fair comparisons, which has 10146, 4589, and 4083 video-query pairs for training, validation, and testing respectively. + +# 4.2. Implementation details + +Evaluation metric. For fair comparisons, we follow Gao et al. [9] to compute “ $\mathbf{R} @ n$ , IoU=m” as the evaluation metric. To be specific, it represents the percentage of testing samples that have at least one correct grounding prediction (i.e., the IoU between the prediction and the ground truth is larger than $m$ ) in the top- $n$ predictions. + +Video Feature Extractor. We use the C3D [37] network pre-trained on Sports-1M [22] as the feature extractor. The C3D network takes 16 frames as input and the outputs of the fc6 layer with dimensions of 4096 are used as a feature vector. We also extract the I3D [3] and VGG [34] features to conduct experiments on Charades-STA. More details about the feature extractor are put in the supplementary material. + +Language Feature. We transform each word of language sentences into lowercase. We use pre-trained GloVe word vectors to initialize word embeddings with the dimension of 300. A one-layer bi-directional LSTM with 512 hidden units serves as the query encoder. + +Training settings. The learning rate in the first training step is 0.001 and we decay it by a factor of 100 for the second step. During fine-tuning, we set the learning rate as $10^{-6}$ . We set batch size as 32 and use Adam [23] as the optimizer. + +# 4.3. Comparisons with state-of-the-arts + +Comparisons on Charades-STA. We compare our model with the state-of-the-art methods in Table 1. Our DRN reaches the highest scores over all IoU thresholds. Particularly, when using the same C3D features, our DRN outperforms the previously best method (i.e., R-W-M [16]) by $8.7\%$ absolute improvement, in terms of $\mathsf{R}@\mathsf{I}$ , IoU=0.5. For fair comparisons with MAN [46] and ExCL [11], we perform additional experiments by using the same features (i.e., VGG and I3D) as reported in their papers. Our DRN outperforms them by $1.66\%$ and $8.99\%$ , respectively. + +Table 1. Comparisons with state-of-the-arts on Charades-STA. + +
MethodsFeatureR@1 IoU=0.5R@1 IoU=0.7R@5 IoU=0.5R@5 IoU=0.7
CTRL [9]C3D23.638.8958.9229.52
SMRL [39]C3D24.3611.1761.2532.08
MAC [10]C3D30.4812.2064.8435.13
T-to-C [40]C3D35.6015.8079.4045.40
R-W-M [16]C3D36.70---
DRN (ours)C3D45.4026.4088.0155.38
ExCL [11]I3D44.1022.40--
DRN (ours)I3D53.0931.7589.0660.05
SAP [7]VGG27.4213.3666.3738.15
MAN [46]VGG41.2420.5483.2151.85
DRN (ours)VGG42.9023.6887.8054.87
+ +Table 2. Comparisons on ANet-Captions using C3D features. (*) indicates the method that uses val_2 split as the testing set, while other methods use the val_1 split. + +
MethodsR@1 IoU=0.5R@1 IoU=0.7R@5 IoU=0.5R@5 IoU=0.7
CTRL [9]14.00---
ACRN [29]16.17---
T-to-C[40]27.7013.6059.2038.30
R-W-M [16]36.90---
DRN (ours)42.4922.2571.8545.96
TGN* [4]27.93-44.20-
ABLR* [43]36.79---
CMIN* [49]43.4023.8867.9550.73
DRN* (ours)45.4524.3677.9750.30
+ +Table 3. Comparisons on TACoS using C3D features. + +
MethodsR@1 IoU=0.5R@5 IoU=0.5
ABLR [43]9.40-
CTRL [9]13.3025.42
ACRN [29]14.6224.88
SMRL [39]15.9527.84
CMIN [49]18.0527.02
TGN [4]18.9031.02
MAC [10]20.0130.66
DRN (ours)23.1733.36
+ +Comparisons on ActivityNet-Captions. Table 2 reports the video grounding results of various methods. We follow the previous methods to use C3D features for fair comparisons. Since previous methods use different testing splits, we report the performance of our model on both val_1 and val_2. Regarding R@1, IoU=0.5, our method outperforms R-W-M [16] by $5.59\%$ absolute improvement on val_1 split and exceeds CMIN [49] by $2.05\%$ on val_2 split. + +Comparisons on TACoS. We compare our DRN with state-of-the-art methods with the same C3D features in Table 3. It is worth noting that this dataset is very challenging since each video may correspond to multiple queries (148 queries + +Table 4. Ablation study on the number of positive training samples on Charades, measured by R@1 and R@5 when IoU=0.5. + +
MethodsR@1 IoU=0.5GainR@5 IoU=0.5Gain
DRN-Center38.36-83.36-
DRN-Random40.882.5284.110.75
DRN-Half42.794.4385.882.52
DRN-All45.407.0488.014.65
+ +on average). Despite its difficulty, our method reaches the highest score in terms of both R@1 and R@5 when $IoU = 0.5$ and outperforms previous best result by a large margin (i.e., $23.17\%$ vs. $20.01\%$ ). + +# 5. Ablation studies + +In this section, we will perform complete and in-depth ablation studies to evaluate the effect of each component of our model. More details about the structures and training configurations of the baseline methods (such as DRN-Center) can be found in the supplementary material. + +# 5.1. How does location regression help? + +Compared with other one-stage video grounding methods, the key to our DRN is to leverage more positive samples for the training. Here, we implement three variants of our methods: DRN-Half, DRN-Random and DRN-Center. The three baselines are the same as the original DRN (DRN-All) except that they only select a subset of frames within the ground truth as the positive training samples. Specifically, DRN-Half randomly chooses $50\%$ of the frames within the ground truth to train the model. DRN-Random and DRN-Center are the extreme cases of our location regression settings, where they only randomly select one frame or the center frame within the ground truth as the positive training sample. By comparing the performance of the variants with our DRN, we justify the importance of increasing the number of positive training samples to train a one-stage video grounding model. Table 4 shows that all of these variants decrease the performance significantly. It verifies the effectiveness of our dense regression network, which is able to mine more positive training samples from sparse annotations. + +# 5.2. Does IoU regression help video grounding? + +As discussed in Section 3.5, besides the IoU regression head, using "centerness" technique is another way to assess the localization quality. Here, we implement a variant of our model by replacing the IoU regression head with the centerness head in FCOS [36]. Specifically, the centerness head is trained to predict a centerness score at each frame. The frame closer to the ground truth's center is expected to have a larger centerness value. In the inference, we follow [36] to + +Table 5. Ablation study of the IoU regression head on Charades-STA and ActivityNet-Captions, measured by R@1 when IoU=0.5. + +
DatasetMethodsR@1 IoU=0.5
Charades-STAw/o IoU regression head44.13
w/ Centerness44.02
w/ IoU regression head45.40
ANet-Captionsw/o IoU regression head40.44
w/ Centerness39.83
w/ IoU regression head42.49
+ +Table 6. Ablation study of multi-level fusion (MLF) and location embedding on Charades-STA, measured by R@1 when IoU=0.5. + +
DatasetComponentsR@1 IoU=0.5
MLFlocation
Charades-STA××43.04
✓×43.79
×✓43.47
✓✓45.40
ANet-Captions××39.78
✓×40.61
×✓40.96
✓✓42.49
+ +multiply the centerness score and matching score to obtain the final score for each predicted box. We also implement a baseline by removing the IoU regression head from our model and directly use the matching score to rank the predictions. Table 5 reveals that the IoU regression head consistently improves the performance on both datasets. These results demonstrate that the matching score is not sufficient to evaluate the localization quality. Predicting the IoU between the predicted box and ground truth is straightforward and helpful for video grounding. Using centerness slightly decreases the grounding accuracy since the centerness assumption is not suitable for video grounding. We also visualize the qualitative results in Figure 3. In the top example, the two grounding results are both predicted by the frames within the ground truth, while the IoU regression head helps to select the one that has a larger IoU. In the bottom example, the background context is similar and the query is complex. Despite such difficulty, the IoU regression head still helps to select a better grounding result. More visualization results are shown in the supplementary material. + +# 5.3. Does multi-level fusion help? + +The multi-level fusion (MLF) technique extracts different representations of the same query at different levels and fuses them with the video feature. Here, we implement a baseline by removing MLF from our DRN. Specifically, we only fuse the visual feature and the query feature at the first level (i.e., $C_1$ in Figure 2). From Table 6, applying MLF to our model is able to lift the video grounding performance + +![](images/d9bae169d307498e8ac32c7da75c73ea8b89176052fbeedb971d6004c5ce2533.jpg) +Figure 3. Qualitative results on ActivityNet Captions dataset. + +Table 7. Ablation study of the location embedding on the collected subset of ANet-Captions, measured by R@1 when IoU=0.5. + +
TrainTestMethodsR@1 IoU=0.5
Full-setFull-setw/o location40.61
w/ location42.49
Full-setSub-setw/o location47.38
w/ location48.37
Sub-setSub-setw/o location43.28
w/ location44.97
+ +on both Charades-STA (43.79% vs. 43.04%) and ANet-Captions datasets (40.61% vs. 39.78%). In addition, we implement another baseline MLF-Same by using the same query feature to fuse the video feature at different levels. In our experiments, the MLF-Same baseline performs worse than our DRN on Charades-STA (44.76% vs. 45.40%), revealing that extracting different query features at different levels is able to improve the video-query representations and boost the grounding performance eventually. + +# 5.4. How does the location embedding help? + +To evaluate the effectiveness of the temporal location embedding in our model, we conduct an ablation study by directly forwarding the video features into the network without concatenating with the location embeddings. The results in Table 6 conclude that the location embedding makes the localization more precisely. One possible reason is that the model is able to learn the temporal orders of the video contents through the location embeddings. To further study the effect of the location embedding, we collect a "temporal" subset of samples from the ANet-Captions dataset. In particular, we are interested in the query that contains four commonly used temporal words (i.e., before, + +after, while, then). The subset consists of 7176 training samples and 3620 testing samples. We use two settings to evaluate our model: 1) train on full ANet-Captions dataset and test on the temporal subset; 2) train and test on the temporal subset. From Table 7, using location embedding consistently improves the performance in both settings. Especially when training and testing the model on the temporal subset, the performance gain increases to $1.7\%$ , further verifying the effectiveness of the location embedding. + +# 6. Conclusions + +In this paper, we have proposed a dense regression network for video grounding. By training the model to predict the distance from each frame to the starting (ending) frame of the video segment described by the query, the number of positive training samples is significantly increased, which boosts the performance of video grounding. Moreover, we have devised a simple but effective IoU regression head to explicitly consider the quality of localization results for video grounding. Our DRN outperforms the state-of-the-art methods on three benchmarks, i.e., Charades-STA, ActivithNet-Captions and TACoS. It would be interesting to extend our DRN for temporal action localization and dense video captioning, and we leave it for our future work. + +Acknowledgements. This work was partially supported by Guangdong Provincial Scientific and Technological Funds under Grant 2018B010107001, Grant 2019B010155002, National Natural Science Foundation of China (NSFC) 61836003 (key project), Program for Guangdong Introducing Innovative and Entrepreneurial Teams 2017ZT07X183, Tencent AI Lab Rhino-Bird Focused Research Program (No. JR201902), Fundamental Research Funds for the Central Universities D2191240. + +# References + +[1] Jiezhang Cao, Yong Guo, Qingyao Wu, Chunhua Shen, Junzhou Huang, and Mingkui Tan. Adversarial learning with local coordinate coding. In International Conference on Machine Learning, 2018. 2 +[2] Jiezhang Cao, Langyuan Mo, Yifan Zhang, Kui Jia, Chunhua Shen, and Mingkui Tan. Multi-marginal Wasserstein gan. In Advances in Neural Information Processing Systems, pages 1774-1784, 2019. 2 +[3] Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 6299-6308, 2017. 1, 6 +[4] Jingyuan Chen, Xinpeng Chen, Lin Ma, Zequn Jie, and TatSeng Chua. Temporally grounding natural sentence in video. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 162-171, 2018. 2, 6 +[5] Jingyuan Chen, Lin Ma, Xinpeng Chen, Zequn Jie, and Jiebo Luo. Localizing natural language in videos. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), pages 8175-8182, 2019. 1 +[6] Peihao Chen, Chuang Gan, Guangyao Shen, Wenbing Huang, Runhao Zeng, and Mingkui Tan. Relation attention for temporal action localization. IEEE Transactions on Multimedia, 2019. 1 +[7] Shaoxiang Chen and Yu-Gang Jiang. Semantic proposal for activity localization in videos via sentence query. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), pages 8199-8206, 2019. 6 +[8] Jianfeng Dong, Xirong Li, Chaoxi Xu, Shouling Ji, Yuan He, Gang Yang, and Xun Wang. Dual encoding for zeroexample video retrieval. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 9346-9355, 2019. 1 +[9] Jiyang Gao, Chen Sun, Zhenheng Yang, and Ram Nevatia. Tall: Temporal activity localization via language query. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 5267-5275, 2017. 1, 2, 4, 5, 6 +[10] Runzhou Ge, Jiyang Gao, Kan Chen, and Ram Nevatia. Mac: Mining activity concepts for language-based temporal localization. In 2019 IEEE Winter Conference on Applications of Computer Vision (WACV), pages 245-253. IEEE, 2019. 1, 2, 6 +[11] Soham Ghosh, Anuva Agarwal, Zarana Parekh, and Alexander Hauptmann. Excl: Extractive clip localization using natural language descriptions. In The North American Chapter of the Association for Computational Linguistics (NAACL), 2019. 1, 2, 6 +[12] Ross Girshick. Fast r-cnn. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 1440-1448, 2015. 5 +[13] Yong Guo, Jian Chen, Qing Du, Anton Van Den Hengel, Qinfeng Shi, and Mingkui Tan. Multi-way backpropagation for training compact deep neural networks. Neural networks, 2020. 2 + +[14] Yong Guo, Qi Chen, Jian Chen, Qingyao Wu, Qinfeng Shi, and Mingkui Tan. Auto-embedding generative adversarial networks for high resolution image synthesis. TMM, 2019. 2 +[15] Yong Guo, Yin Zheng, Mingkui Tan, Qi Chen, Jian Chen, Peilin Zhao, and Junzhou Huang. Nat: Neural architecture transformer for accurate and compact architectures. In Advances in Neural Information Processing Systems, pages 735-747, 2019. 2 +[16] Dongliang He, Xiang Zhao, Jizhou Huang, Fu Li, Xiao Liu, and Shilei Wen. Read, watch, and move: Reinforcement learning for temporally grounding natural language descriptions in videos. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), pages 8393-8400, 2019. 2, 6 +[17] Lisa Anne Hendricks, Oliver Wang, Eli Shechtman, Josef Sivic, Trevor Darrell, and Bryan Russell. Localizing moments in video with temporal language. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1380–1390, 2018. 2 +[18] Ronghang Hu, Jacob Andreas, Trevor Darrell, and Kate Saenko. Explainable neural computation via stack neural module networks. In Proceedings of the European Conference on Computer Vision (ECCV), pages 53-69, 2018. 4 +[19] Zhibin Hu, Yongsheng Luo, Jiong Lin, Yan Yan, and Jian Chen. Multi-level visual-semantic alignments with relation-wise dual attention network for image and text matching. 2 +[20] Deng Huang, Peihao Chen, Runhao Zeng, Qing Du, Mingkui Tan, and Chuang Gan. Location-aware graph convolutional networks for video question answering. In The AAAI Conference on Artificial Intelligence (AAAI), 2020. 1 +[21] Lichao Huang, Yi Yang, Yafeng Deng, and Yinan Yu. Densebox: Unifying landmark localization with end to end object detection. CoRR, abs/1509.04874, 2015. 2, 3 +[22] Andrej Karpathy, George Toderici, Sanketh Shetty, Thomas Leung, Rahul Sukthankar, and Li Fei-Fei. Large-scale video classification with convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1725–1732, 2014. 6 +[23] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations (ICLR), 2015. 6 +[24] Tao Kong, Fuchun Sun, Huaping Liu, Yuning Jiang, and Jianbo Shi. Foveabox: Beyond anchor-based object detector. CoRR, abs/1904.03797, 2019. 2, 3 +[25] Ranjay Krishna, Kenji Hata, Frederic Ren, Li Fei-Fei, and Juan Carlos Niebles. Dense-c captioning events in videos. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 706-715, 2017. 2 +[26] Hei Law and Jia Deng. Cornernet: Detecting objects as paired keypoints. In Proceedings of the European Conference on Computer Vision (ECCV), pages 734-750, 2018. 2, 3 +[27] Tsung-Yi Lin, Piotr Dólár, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2117-2125, 2017. 4 + +[28] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólár. Focal loss for dense object detection. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 2980-2988, 2017. 5 +[29] Meng Liu, Xiang Wang, Liqiang Nie, Xiangnan He, Baoquan Chen, and Tat-Seng Chua. Attentive moment retrieval in videos. In The 41st International ACM SIGIR Conference on Research & Development in Information Retrieval, pages 15-24. ACM, 2018. 6 +[30] Meng Liu, Xiang Wang, Liqiang Nie, Qi Tian, Baoquan Chen, and Tat-Seng Chua. Cross-modal moment localization in videos. In 2018 ACM Multimedia Conference on Multimedia Conference, pages 843-851. ACM, 2018. 2 +[31] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 779-788, 2016. 2, 3 +[32] Michaela Regneri, Marcus Rohrbach, Dominikus Wetzel, Stefan Thater, Bernt Schiele, and Manfred Pinkal. Grounding action descriptions in videos. Transactions of the Association for Computational Linguistics (TACL), 1:25-36, 2013. 2, 6 +[33] Gunnar A Sigurdsson, Gül Varol, Xiaolong Wang, Ali Farhadi, Ivan Laptev, and Abhinav Gupta. Hollywood in homes: Crowdsourcing data collection for activity understanding. In Proceedings of European Conference on Computer Vision (ECCV), pages 510-526. Springer, 2016. 5 +[34] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In 3rd International Conference on Learning Representations (ICLR), 2015. 6 +[35] Joyeeta Singha, Amarjit Roy, and Rahul Hussain Laskar. Dynamic hand gesture recognition using vision-based approach for human-computer interaction. Neural Computing and Applications, 29(4):1129-1141, 2018. 1 +[36] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. Fcos: Fully convolutional one-stage object detection. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2019. 2, 3, 4, 5, 7 +[37] Du Tran, Lubomir Bourdev, Rob Fergus, Lorenzo Torresani, and Manohar Paluri. Learning spatiotemporal features with 3d convolutional networks. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 4489-4497, 2015. 4, 6 +[38] Limin Wang, Yuanjun Xiong, Zhe Wang, Yu Qiao, Dahua Lin, Xiaou Tang, and Luc Van Gool. Temporal segment networks: Towards good practices for deep action recognition. In Proceedings of the European Conference on Computer Vision (ECCV), pages 20-36. Springer, 2016. 1 +[39] Weining Wang, Yan Huang, and Liang Wang. Language-driven temporal activity localization: A semantic matching reinforcement learning model. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 334-343, 2019. 2, 6 +[40] Huijuan Xu, Kun He, Bryan A Plummer, Leonid Sigal, Stan Sclaroff, and Kate Saenko. Multilevel language and vision integration for text-to-clip retrieval. In Proceedings of + +the AAAI Conference on Artificial Intelligence (AAAI), volume 33, pages 9062-9069, 2019. 1, 2, 6 +[41] Jiahui Yu, Yuning Jiang, Zhangyang Wang, Zhimin Cao, and Thomas Huang. Unitbox: An advanced object detection network. In Proceedings of the 24th ACM international conference on Multimedia, pages 516-520. ACM, 2016. 5 +[42] Youngjae Yu, Jongseok Kim, and Gunhee Kim. A joint sequence fusion model for video question answering and retrieval. In Proceedings of the European Conference on Computer Vision (ECCV), pages 471-487, 2018. 1 +[43] Yitian Yuan, Tao Mei, and Wenwu Zhu. To find where you talk: Temporal sentence localization in video with attention based location regression. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), volume 33, pages 9159-9166, 2019. 1, 2, 6 +[44] Runhao Zeng, Chuang Gan, Peihao Chen, Wenbing Huang, Qingyao Wu, and Mingkui Tan. Breaking winner-takes-all: Iterative-winners-out networks for weakly supervised temporal action localization. IEEE Transactions on Image Processing, 2019. 1 +[45] Runhao Zeng, Wenbing Huang, Mingkui Tan, Yu Rong, Peilin Zhao, Junzhou Huang, and Chuang Gan. Graph convolutional networks for temporal action localization. In The IEEE International Conference on Computer Vision (ICCV), Oct 2019. 1 +[46] Da Zhang, Xiyang Dai, Xin Wang, Yuan-Fang Wang, and Larry S Davis. Man: Moment alignment network for natural language moment retrieval via iterative graph adjustment. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1247-1257, 2019. 2, 6 +[47] Yifan Zhang, Hanbo Chen, Ying Wei, Peilin Zhao, Jiezhang Cao, et al. From whole slide imaging to microscopy: Deep microscopy adaptation network for histopathology cancer image classification. In International Conference on Medical Image Computing and Computer-Assisted Intervention, page 360?368. Springer, 2019. 2 +[48] Yifan Zhang, Ying Wei, Peilin Zhao, Shuaicheng Niu, et al. Collaborative unsupervised domain adaptation for medical image diagnosis. In Medical Imaging meets NeurIPS, 2019. 2 +[49] Zhu Zhang, Zhijie Lin, Zhou Zhao, and Zhenxin Xiao. Cross-modal interaction networks for query-based moment retrieval in videos. In Proceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR), pages 655-664, 2019. 2, 6 +[50] Fengda Zhu, Yi Zhu, Xiaojun Chang, and Xiaodan Liang. Vision-language navigation with self-supervised auxiliary reasoning tasks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 1 +[51] Zhuangwei Zhuang, Mingkui Tan, Bohan Zhuang, Jing Liu, Yong Guo, Qingyao Wu, Junzhou Huang, and Jinhui Zhu. Discrimination-aware channel pruning for deep neural networks. In Advances in Neural Information Processing Systems, pages 875-886, 2018. 2 \ No newline at end of file diff --git a/denseregressionnetworkforvideogrounding/images.zip b/denseregressionnetworkforvideogrounding/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..427cea0b14ee8bd27094a965974899be8c35e7d3 --- /dev/null +++ b/denseregressionnetworkforvideogrounding/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d43819efe0f53135ce425a39c476c9b95bdf3086686adec0dd7c424712a805b9 +size 470334 diff --git a/denseregressionnetworkforvideogrounding/layout.json b/denseregressionnetworkforvideogrounding/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..42058eeb0ec6296513f262febbe194dd9b3c3d5e --- /dev/null +++ b/denseregressionnetworkforvideogrounding/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01a36c95481655075756bef82885935c12cefbe88e531edb17b68993ef627844 +size 410058 diff --git a/densityawarefeatureembeddingforfaceclustering/ee59943a-2367-4ae6-afff-5f99cc71e020_content_list.json b/densityawarefeatureembeddingforfaceclustering/ee59943a-2367-4ae6-afff-5f99cc71e020_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..33fe513a6c89cf82a1dbe9882eb46016e71937d6 --- /dev/null +++ b/densityawarefeatureembeddingforfaceclustering/ee59943a-2367-4ae6-afff-5f99cc71e020_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed96da0646dc44a387f53b022a8072e30697d1e14acaab79fa4d1810d883d71d +size 67605 diff --git a/densityawarefeatureembeddingforfaceclustering/ee59943a-2367-4ae6-afff-5f99cc71e020_model.json b/densityawarefeatureembeddingforfaceclustering/ee59943a-2367-4ae6-afff-5f99cc71e020_model.json new file mode 100644 index 0000000000000000000000000000000000000000..13a70d45ef2cb78f203f071a581ed28d3529e2e5 --- /dev/null +++ b/densityawarefeatureembeddingforfaceclustering/ee59943a-2367-4ae6-afff-5f99cc71e020_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8cbe2e7b6227b2e3f5a2aef6bc00fc9d14f5f82f47e9e2d8da79493b86aed558 +size 84027 diff --git a/densityawarefeatureembeddingforfaceclustering/ee59943a-2367-4ae6-afff-5f99cc71e020_origin.pdf b/densityawarefeatureembeddingforfaceclustering/ee59943a-2367-4ae6-afff-5f99cc71e020_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9a2816e5933c488429bc5a082e82fd1cc4fa2a52 --- /dev/null +++ b/densityawarefeatureembeddingforfaceclustering/ee59943a-2367-4ae6-afff-5f99cc71e020_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fafb9890feba6a33d8b3708245a5afabd7e457ea25c9ff58a38b88fed7c97370 +size 1479644 diff --git a/densityawarefeatureembeddingforfaceclustering/full.md b/densityawarefeatureembeddingforfaceclustering/full.md new file mode 100644 index 0000000000000000000000000000000000000000..3bf4ab147c1d916288a2935ab0b50158b14ce3d8 --- /dev/null +++ b/densityawarefeatureembeddingforfaceclustering/full.md @@ -0,0 +1,287 @@ +# Density-Aware Feature Embedding for Face Clustering + +Senhui Guo $^{1*}$ Jing Xu $^{1*}$ Dapeng Chen $^{1\dagger}$ Chao Zhang $^{2}$ Xiaogang Wang $^{3}$ Rui Zhao $^{1}$ $^{1}$ SenseTime Group Limited $^{2}$ Samsung Research China - Beijing(SRC-B) $^{3}$ CUHK + +# Abstract + +Clustering has many applications in research and industry. However, traditional clustering methods, such as $K$ -means, DBSCAN and HAC, impose oversimplifying assumptions and thus are not well-suited to face clustering. To adapt to the distribution of realistic problems, a natural approach is to use Graph Convolutional Networks (GCNs) to enhance features for clustering. However, GCNs can only utilize local information, which ignores the overall characteristics of the clusters. In this paper, we propose a Density-Aware Feature Embedding Network (DA-Net) for the task of face clustering, which utilizes both local and non-local information, to learn a robust feature embedding. Specifically, DA-Net uses GCNs to aggregate features locally, and then incorporates non-local information using a density chain, which is a chain of faces from low density to high density. This density chain exploits the non-uniform distribution of face images in the dataset. Then, an LSTM takes the density chain as input to generate the final feature embedding. Once this embedding is generated, traditional clustering methods, such as density-based clustering, can be used to obtain the final clustering results. Extensive experiments verify the effectiveness of the proposed feature embedding method, which can achieve state-of-the-art performance on public benchmarks. + +# 1. Introduction + +Thanks to the advances in face detection and recognition, face images can be conveniently collected from the internet or surveillance cameras and further be represented by robust feature vectors. In this situation, there arises a requirement to analyze the face features automatically, and clustering is a practical tool with a wide range of applications. Previously developed non-deep clustering methods use certain global hyper-parameters to determine clustering behavior. For example, DBSCAN relies on a threshold to determine if two nodes should belong to the same cluster, hierarchical clustering methods also employ some criteria to decide when the cluster splitting or merging should be + +![](images/850af682c690b7eb62d362c9b95874a2be2d7a05db1b17e64efb3380fc1c3774.jpg) +Figure 1. Distribution of face images using Density-Aware Feature Embedding. Circles denote face images of one cluster. Triangles denote face images of another cluster. By establishing density chain from low-density faces to high-density faces, our DA-Net aims to capture relevant information from long-range neighbors for obtaining better feature embedding. + +stopped. However, these methods do not perform well on face image datasets with complex distributions, because the variation of the boundary condition of each person's image distribution makes it impossible to cluster face images well enough at the same time. Therefore, a method that can learn to deal with each cluster individually is required. Existing deep learning-based methods for face clustering mainly focus on classifying inter-sample relationships. For example, the approach in [23, 28] learns to recognize the pair-wise relationship of whether they should belong together, and the approach in [27] learns to classify whether several samples belong to the same cluster. + +Existing non-deep learning and deep learning approaches use visual features from the feature extraction module directly, which introduces a number of issues. Specifically, as the images of one person can be very differ + +ent from the images of another person in terms of variation on pose, illumination, and camera settings, the distributions of intra-class features are usually different for different people, and visual features learned or hand-crafted are still not robust to this variation in distribution, making these clustering approaches easily include outlier samples into clusters. Fig. 1(a) shows an example where the face images of two identities are so close that it is hard to cluster them simply based on the original features. In this paper, we aim to learn context-aware features embedding of an image by using the information from its neighboring images. Better learned features facilitate face clustering by simplifying the inter-class feature distribution. + +Inspired by the success of graph convolutional networks (GCNs) over graph-structured data [9, 22, 7, 20], features of an image can be refined using correlated images, by treating each image as a node in the graph. However, standard GCN usually relies on the affinities between the first order neighbors, and the resulting features still lack the information from features at longer distances. To take features at longer distances into consideration, we have to stack GCN layers, whose number of nodes involved, however, would increase geometrically, and this method is found ineffective in previous literature [11]. For example, suppose a sample has 10 neighbors, then 10 steps of message passing along the edges in the graph may correspond to $10^{10}$ samples/nodes involved in the GCN, which requires too much memory and computation to be practical for training or inference. + +Since it is not a desirable option to include the whole graph in the GCN framework, we need to select the nodes with the most important information as the input for our network. The question now is which nodes should be chosen. Due to photo-taking habits and face detection models, faces captured under good conditions, such as from a front-on angle with suitable lighting and a neutral facial expression, are more likely to be detected and registered to the dataset, which we call model faces. These faces are supposed to be the most favorable faces we want to pick out and contain the most relevant part of non-local information. As shown in Figure 2, we can see that the yaw angle of most faces lies near 0, specifically, the angles of $93.58\%$ of all faces are within 25 degrees. Thus the problem remains of how to find these features with higher probability density. + +Even though it is impractical to estimate the distribution itself, we can still manage to find features with higher densities, and thus we can extract the more important part of the graph to represent the non-local information. Based on the motivations above to locally enhance features and represent non-local information by the model feature, we propose a Density-Aware Feature Embedding Network (DA-Net) to aggregate relevant information from both local and non-local neighbors. To be more specific about the non-local part, we will use the term "long range" to refer to it in the rest of the paper. The DA-Net has two sub-networks. The first sub-network is the local clique network based on + +![](images/29ecbced9e4bb8c8318eeda6de8c9f6278e60136cfccc40ab5d73db00c2cc5e2.jpg) +Figure 2. Distribution of face angle in MS-Celeb-1M dataset + +GCNs, aiming to learn feature embeddings from the contextual information contained in the local neighborhood. The second is the long-range chain network based on CNNs. It aggregates the knowledge along the chain as a learning path, which starts from the considered sample and gradually moves to the nearby density peak/model feature. Examples of density chains are shown in the Fig. 1(c). + +As discussed above, features with higher densities are features of faces with better conditions. Thus, a face image and its nearby higher density face image have a high probability of being the same person. Therefore, the chain tends to describe consistent identities, which is the most important part of the graph for each feature on the chain. Generating the feature embedding on the identity-consistent chain is more likely to improve the representation. Such a method is inspired by the assumption in [16], where cluster centers are characterized by a density peak that has a higher density than their neighbors and is distant from other cluster centers. Considering the nearby density peak for a sample can better discover long-range and density-aware information. By simplifying the relationship from the graph to the chain, this designed network only needs to update the feature along the chain, significantly accelerating the training and inference procedure. + +In summary, (1) different from conventional face clustering methods that focus on classifying inter-sample relationships, we improve the face clustering problem by learning context-aware feature embeddings, which simplifies the inter-class feature distribution and is scalable on large-scale datasets. (2) The feature embedding is based on a density-guided receptive field. It captures both local neighborhood information and long-range cluster-level information. Superior clustering results are achieved on MS-Celeb-1M [6], YouTube Faces DB [26] and IJB-B [24]. + +# 2. Related Work + +Face clustering is a challenging task due to its massive data scale, complex intra-class feature distribution, and the ambiguous feature border of different classes. Traditional clustering methods like K-Means[12], spectral clustering[17], and DBSCAN[3] all rely on certain assumptions on data distribution, such as that the clusters are of convex shape, similar size or the same density, and can achieve optimum results when the actual distribution lines up with the expected one. However, these methods ignore the contextual information for clustering, which are not suitable for real-world face clustering. + +Context-based Face Clustering. Contextual information helps to cluster faces. Shi et al. [18] built a conditional random field in the neighborhood, named Conditional Pairwise Clustering, to facilitate the face clustering. Lin et al. [10] learned the minimal covering spheres of neighborhoods and estimated the inter-sample similarities by a new density-based strategy. Zhan et al. [28] encoded the pairwise relationships in the neighborhood into a feature vector, then learned to determine whether two nodes belong to the same class. Compared with these methods, GCN is a more efficient tool for graph-structured data and can be applied to face clustering. Wang et al. [23] proposed a linkage-based GCN to predict the probability of the connection between a pivot node and its neighbors. Yang et al. [27] learned to cluster in a detection-segmentation paradigm, where GCN-Detection selected high-quality clusters from proposals, and GCN-Segmentation identified the outliers. However, these methods use visual features from the feature extraction module directly and only capture short-range local information. Our approach for updating features is complementary to these approaches. As long-range neighbors may still contain consistent semantic meanings to the concerned sample, we propose two sub-networks to aggregate relevant information from both short-range and long-range neighbors. + +GNN-based Feature Learning. A Graph Neural Network(GCN) naturally makes use of local graph structure and can learn more discriminative features for the task like classification or linkage prediction. Deep Walk [15] is proposed to generate graph embeddings by combining the SkipGram model [13] with graph random walk. Similar approaches like node2vec and LINE [5] also have achieved excellent performance. Hamilton et al. introduced GraphSage [7] to compute node representations in an inductive manner. It sampled a fixed-size neighborhood for each node and then performed simple feature aggregation such as mean pooling, max pooling, and LSTM[8]. In these methods, the nodes involved in the feature learning merely depended on the graph topology, while our method additionally exploits cluster-level feature distribution by defining the density-aware graph, and thus is more effective and efficient for face clustering. + +![](images/882830846c0f7f8f8df09ee4dbeba163ac5884ff4ba600069d9de4fa60db09ab.jpg) +Figure 3. Chain graph. The gray paths, $C(v_{k})$ is the chain from node $v_{k}$ to its nearby density peak. And the chain stops growing once the next nearest higher density neighbor is too far away. + +![](images/7cb2eeabf21a60a6534f0db0d54b22a1902950d8081c8a6c80ba90c0d0fcde27.jpg) +Figure 4. Clique finding. We find a clique for each node in the chain. + +Self-supervised learning. Our method makes use of the distribution of clusters and can be regarded as a self-supervision method[1, 2] that employs density information to improve the general representation power. + +# 3. Methodology + +In our approach, we first build a density-aware local graph for each sample, then utilize the DA-Net (Density-Aware Feature Embedding Network) to exploit the information within the constructed graph for clustering. The DA-Net consists of a local clique sub-network and a long-range chain sub-network and outputs an enhanced feature for each sample. The obtained feature embeddings of all samples are fed to a density-based clustering strategy to produce the final clusters. + +# 3.1. Data Density + +We model the face images in a KNN graph, where each image is represented by a node, and is connected to its $K$ nearest neighbours. For node $v_{i}$ , its $K$ nearest neighbours are represented by $\mathcal{N}(v_i)$ . To utilize non-local information, it is essential to compress the whole graph and extract the most important nodes. Let $f(v_{i})$ be the CNN feature of node $v_{i}$ normalized by its $L^2$ norm, we believe there will be a distribution for each person in feature space. + +Given the probability density function for person $l$ to be $p_l(\cdot)$ , the value $p_l(v_i)$ reflects the probability of the person $l$ 's picture of node $v_i$ being taken. In practice, it is almost impossible to find out the exact distribution. Based on the observation that the feature distributions of different persons are non-overlap at most of the time, we utilize the data density $\rho(v_i)$ , which approximates the probability of the person of interest. With appropriate definition of $\rho$ , we have asymptotic property that + +$$ +\rho \left(v _ {i}\right)\rightarrow p _ {l} \left(v _ {i}\right) \text {f o r} | \mathcal {D} | \rightarrow \infty \tag {1} +$$ + +where $\mathcal{D}$ is the data collected for the person. In this way, the feature with high data density tend to have a high probability to be him, thus it is the feature containing the important facial information of that person. + +Consider the node $v_{i}$ , the data density $\rho(v_{i})$ is computed based on the neighbours of $v_{i}$ on the affinity graph. i.e., $\mathcal{N}(v_{i})$ , which is: + +$$ +\rho \left(v _ {i}\right) = \sum_ {v _ {j} \in \mathcal {N} \left(v _ {i}\right)} \langle f \left(v _ {i}\right), f \left(v _ {j}\right) \rangle , \tag {2} +$$ + +where their inner-product $\langle f(v_i),f(v_j)\rangle$ measures the similarity between the nodes $v_{i}$ and $v_{j}$ + +# 3.2. Density-aware Graph Construction + +The DA-Net utilizes contextual information by constructing a density-aware graph. The graph captures the cluster-level structure, which gradually relates the consider image to its non-local neighbours with higher density. For node $v_{k}$ , we first generate a chain graph from $v_{k}$ to the nearby density peak. The chain graph grows in multiple steps, and each step sequentially adds one node to the chain. For notation clarity, we define the chain as $C(v_{k}) = \{c_{k}^{1}, c_{k}^{2}, \dots, c_{k}^{N}\}$ , where $c_{k}^{i}$ is the node on the chain and $c_{k}^{1}$ is the very node $v_{k}$ . Suppose the added node at step $i$ is $c_{k}^{i}$ , then the node to be added $c_{k}^{i+1}$ is the nearest neighbor with higher density: + +$$ +c _ {k} ^ {i + 1} = \arg \max _ {v} \left\{\langle f \left(c _ {k} ^ {i}\right), f (v) \rangle , v \in \{u \mid \rho (u) > \rho \left(c _ {k} ^ {i}\right) \}. \right. \tag {3} +$$ + +The chain grows until the inner product between the node to be added and the last node is lower than a pre-defined value. As illustrated in Figure 3, the chain gradually moves from the concerned node to the most related density peak. + +As mentioned in Section 3.1, neighboring samples that are similar to $c_k^1$ with a higher density are more likely to be a model feature and correspond to the same person. Therefore, these samples with higher data density are more useful in representing the cluster structure and guiding the update of the features for node $c_k^1$ . + +Given the chain graph $\{c_k^i\}_{i = 1}^N$ , we then extend it by attaching a clique to each node in the chain. The nodes in the clique include $c_{k}^{i}$ and the nearest neighbors $\mathcal{N}(c_k^i)$ of $c_{k}^{i}$ . To alleviate the influence of irrelevant neighbors, we prune the clique by performing a threshold choosing scheme, and the pruned nodes are represented by: + +$$ +\mathcal {N} ^ {\prime} \left(c _ {k} ^ {i}\right) = \{v | \quad \langle f (v), f \left(c _ {k} ^ {i}\right) \rangle > \tau , v \in \mathcal {N} \left(c _ {k} ^ {i}\right) \}, \tag {4} +$$ + +where $\tau$ is an empirical value based on the original features, and $\tau = 0.6$ in our experiments. + +# 3.3. Local Clique Network + +The local clique network is based on GCN, aiming to update the feature of every node in the chain. As shown in Figure 4, for each node, it takes the corresponding clique as input. Given the clique $\mathcal{N}'(c_k^i)$ , we define the affinity matrix $A(c_k^i) \in \mathbb{R}^{|\mathcal{N}'(c_k^i)| \times |\mathcal{N}'(c_k^i)|}$ , whose elements are computed by the inner product. The initial feature matrix concatenates all the original features in the clique, denoted by $F^0(c_k^i) \in \mathbb{R}^{|\mathcal{N}'(c_k^i)| \times d}$ . In each layer of GCN, we update the feature matrix by: + +$$ +\begin{array}{l} F ^ {l + 1} \left(c _ {k} ^ {i}\right) = \sigma \left(\alpha \cdot F ^ {l} \left(c _ {k} ^ {i}\right) \right. \\ + (1 - \alpha) \cdot D ^ {- 1} \left(c _ {k} ^ {i}\right) A \left(c _ {k} ^ {i}\right) F ^ {l} \left(c _ {k} ^ {i}\right) W ^ {l}), \tag {5} \\ \end{array} +$$ + +where $F^{l}(c_{k}^{i})$ is the updated features of the $l$ -th GCN layer for all nodes belonging to the clique of $c_{k}^{i}$ , $D(c_{k}^{i})$ is the diagonal matrix with $D_{i,i}(c_k^i) = \sum_jA_{i,j}(c_k^i)$ , $\sigma$ is the ReLU function, and $\alpha$ is a learnable parameter balancing the importance of the updated features and its contexts. Intuitively, this formula expresses a procedure of taking weighted average of the original features in the clique, transforming them with $W^{l}$ , combining with the previous feature $F^{l}(c_{k}^{i})$ , and then going through a nonlinear activation. This is similar to a CNN module but is operated on a graph with arbitrary topology. Our method significantly accelerates the training and inference by decomposing a large graph into multiple cliques. With $L$ layers of GCN, we obtain the embedded feature of the node $c_{k}^{i}$ from the corresponding row in $F^{L}(c_{k}^{i})$ , which is denoted by $\phi (c_k^i)$ . + +# 3.4. Long-range Chain Network + +The long-range chain network is essentially a CNN-based attention network. For node $v_{k}$ , the chain features yielded by the local clique network are represented by $\{\phi (c_k^1),\phi (c_k^2),\dots,\phi (c_k^N)\}$ . Inspired by the "scaled dot-product attention"[21], we use the transformer architecture to further update the node feature as shown in Figure 5. + +![](images/48ef049f718802fd3b1100c341bbf72ab47b828febc11e740f084bc4e4180f93.jpg) +Figure 5. Long-range chain network. The feature chain is processed by an LSTM network to produce a query feature. The inner product between the query and the key of each node produces a weight for that node. The weights on the chain are normalized by a softmax function and are used to summarize the final feature embedding. + +The transformer uses triplets in the form of query, key, and value. It firstly estimates a query feature, and the query feature usually indicates what we expect to extract from the given samples. The query is then matched against a list of keys where each key has a value. The final value is then returned as the sum of all the values weighted by the affinities between the keys and the query. + +In our method, the query feature should encode the structure of the nearby feature distributions. The constructed chain and the associated features should be robust to the density variations of the neighborhood. We, therefore, apply an LSTM network along the chain from $c_k^1$ to $c_k^N$ , which consists of the following updating procedure: $\pmb{h}^{i + 1} = \mathrm{LSTM}(\phi (c_k^{i + 1}),\pmb {h}^i)$ , where the LSTM unit takes the features $\phi (c_k^{i + 1})$ and $\pmb{h}^i$ as the input and outputs the hidden state $\pmb{h}^{i + 1}$ corresponding to the node $c_k^{i + 1}$ . The hidden state at the last step $\pmb{h}^N$ is used as the query $\pmb{q}(v_{k})$ . The keys and values are associated with each node in the chain, which are projected from the features $\phi (c_k^i)$ for $i = 1,\dots ,N$ . The key and value corresponding to $c_k^i$ are represented by $k(c_k^i)$ and $v(c_k^i)$ respectively, and the key set and the value set for the chain $C(v_{k})$ are respectively denoted by $\mathcal{K}(v_{k})$ and $\mathcal{V}(v_{k})$ . + +For feature aggregation, we obtain $\boldsymbol{w}(c_k^i)$ by computing the inner product between the query and the key. The attention weight $\bar{\boldsymbol{w}}(c_k^i)$ is obtained by normalizing $\boldsymbol{w}(c_k^i)$ within the chain using the softmax operation, i.e., + +$$ +\boldsymbol {\bar {w}} \left(c _ {k} ^ {i}\right) \propto \exp \left(\frac {\boldsymbol {q} \left(v _ {k}\right) ^ {\top} \boldsymbol {k} \left(c _ {k} ^ {i}\right)}{\sqrt {d _ {k}}}\right), \tag {6} +$$ + +where $d_{k}$ is the dimension of $\pmb{k}(c_k^i)$ . The attention weights + +![](images/08f08adc3c60042ad431560c950e71857a577caf8b2159d4f5daa3deb48c1829.jpg) +Figure 6. Function of density-aware chain + +![](images/ced21f9921fddb74c0396a77e769a95313575fa1d4c9a64f62387c11805ed3ee.jpg) + +![](images/37d59900eca1839b72bd14f364b46dec78619e16b093b322dd726671254bef43.jpg) + +are then used to compute the final embedding for node $v_{k}$ : + +$$ +\psi \left(v _ {k}\right) = \sum_ {i = 1} ^ {N} \bar {\boldsymbol {w}} \left(c _ {k} ^ {i}\right) \cdot v \left(c _ {k} ^ {i}\right), \tag {7} +$$ + +which is exactly the proposed density-aware feature embedding for node $v_{k}$ + +Discussion The long-range chain using the density peak essentially connects the samples that are more likely from the same class. In this way, the feature learning over the chain can effectively pull the features of the same class together, which is desired for clustering. Figure 6 illustrates the effects of long-range chain from a boundary sample to the density peak. Figure 6(b) shows that the local clique network can make very similar features closer, forming several clear sub-patterns that might result in wrong clustering results. Our long-range chain associates the samples in different sub-patterns with the local density peak, obtains more compact feature distribution for each class, and facilitates more accurate clustering. + +# 3.5. Connected Graph Generation + +We apply simple density-based clustering method to generate clusters. As shown in Algorithm 1, our clustering method consists of two steps. The first step is to generate edges for adjacent nodes, which has a time complexity of $\mathcal{O}(n\log n)$ . The second step is to find the clusters by connecting edges. It is dependent on the speed of finding the connected graph, and the time complexity of finding cluster is $\mathcal{O}(\log n)$ while using [4]. Moreover, our feature is also compatible with other clustering methods, e.g., K-Means, DBSCAN. + +# 4. Experiments + +Datasets and evaluation metric. Our proposed method is evaluated on three public face clustering benchmarks, MS-Celeb-1M [6], YouTube Faces DB [26] and IJB-B [24]. MS-Celeb-1M consists of 100K identities and about 10M images. We divide it into training and testing sets using the same setting as [27]. YouTube Faces DB contains 3,425 + +Algorithm 1 Density-based Clustering +Output: clusters $\mathbb{C}$ +6: function GENERATING EDGES(Ψ, θ, k) +Input: feature set $\Psi$ , threshold $\theta$ , the number of neighbors $k$ + +1: procedure CLUSTERING +2: $\mathbb{E} =$ GENERATING EDGES( $\Psi ,\theta ,k)$ +3: $\mathbb{C} =$ Use Union-Find Algorithm [4] to find connected graphs on $\mathbb{E}$ +4: return C +5: end procedure + +7: $\mathbb{E} = \emptyset$ +8: for all $\psi(v_i)$ in $\Psi$ do +9: Find its $k$ nearest neighbors $v_{j}\in \mathcal{N}(v_{j})$ +10: if $\langle \psi (v_i),\psi (v_j)\rangle >\theta$ then $\mathbb{E} = \mathbb{E}\cup \{\{v_i,v_j\} \}$ +11: end if +12: end for +13: return E +14: end function + +videos and 1,595 identities, where we use 159 identities for training and the other 1,436 for testing. IJB-B consists of three sets, which include 512, 1,024, 1,845 identities, and 18,171, 36,575, 68,195 samples, respectively, and we use the model trained on MS-Celeb-1M for testing clustering. For a fair comparison, we use the features provided by [27] as the original feature when evaluating on MS-Celeb-1M and YouTube Faces DB, and use IJB-B feature provided by [23]. For MS-Celeb-1M and YouTube Faces DB, we adopted pairwise recall, precision and $F$ -score to measure the clustering performance, as in [27]. For the IJB-B dataset, we follow its official protocol [24] and adopt the B-Cubed F-score for evaluation. + +Implementation Details. In the DA-Net, the local clique network employs a two-layer GCN, and the long-range chain network employs a two-layer LSTM for query feature, two-layer linear transformations for keys and values. We train the DA-Net in an end-to-end fashion. The local clique network takes the density-aware graph as input to update the features on the chain. The long-range chain network summarises the chain to obtain the final density-aware feature embedding. We impose a softmax classification loss over the feature embedding. The network is trained with a learning rate of 0.01 and the SGD optimizer. Most parameters are learnable, except in the long-range chain network, where we use $K = 256$ nearest neighbors to find the local density. + +# 4.1. Ablation Analysis + +Our ablation study is conducted on MS-Celeb-1M. To better evaluate our method, we utilize four kinds of fea + +![](images/853f9a3247259f1edfa73f19b1f9a0622af4941e74b3f16080f431d5ff77984a.jpg) +(a) Ground-truth + +![](images/82bf55e67cd01f74b696a76fa4c35266c5f3959a548ff62ae73da1bc5a2b9a21.jpg) +(b) original + +![](images/47a9b6ef5fcf0375418f2a593be93eddd9c0fe1b898192d18d1b8f146a63e7d9.jpg) +(c) local + +![](images/8901914480a89366ac517eb0debc816d05a57240b8eb2b2aeef2381a68a8cfad.jpg) +(d) long-range + +![](images/6cacd6c2c313435bfa1525f22cca22c6bc84e571bf9abc50f5d43555088f8e04.jpg) +(e) local+long-range +Figure 7. Feature distribution visualization on t-SNE. Several identities are illustrated. Nodes of the same color indicates faces of the same identity in (a) and predicted clusters in (b) (c) (d) and (e). (a) is the ground-truth label for (b). We can observe that most of the samples in (b) are mis-classified into one cluster. After generating local and long-rang network, the features are more compact, thus the predicted result is more accurate. + +tures. Specifically, original indicates original features; the local clique network generates local only features; the long-range chain network outputs long-range only feature when taking the original features as input; and the overall framework produces local+long-range features. + +Local clique network and long-range chain network. We evaluate the main components of our method in two folds: (1) clustering performance; (2) the discriminative power of the feature embedding. + +![](images/66278376c2c3051c06cfe4a66623676db8f9352b7ba105450dd17d96e9802cf7.jpg) +Figure 8. ROC curve of MS-Celeb-1M. Under the same false positive rate, true positive rate of local+long-range feature significantly outperforms the original one. + +Clustering performance. First, we evaluate the clustering performance from different settings of features when the connected graph generation module is used for clustering. As shown in Tables 1 and 2, in the MS-Celeb-1M dataset, we can see that both the short-range and the long-range features outperforms original features by $14.47\%$ and $9.68\%$ in F-score, respectively. Furthermore, combining local neighbor structure with long-range chain structure, the short+long-range features achieve $90.60\%$ in F-score. + +Feature discriminative power. We utilize the ROC curve to illustrate the discriminative power of our feature embedding. As shown in Figure 8, under the same false-positive rate, the true-positive rate of the short+long feature is much higher than that of other features. On the other hand, we visualize the evolution of the data distribution when applying different components. + +Network depth study. As shown in Table 5, the deeper structure the GCN and LSTM they have, the better results their will achieve. We believe a better base network (though not our focus) could further improve the performance. + +Feature distribution analysis. After our DA-Net, the features will be more identity-relevant. In other words, the distribution in the embedding space is more compact and discriminative. To see how the distribution is optimized, we first select 10 identities that are close and put their original features, local only features and local+long-range features all together into the t-SNE mapping training to visualize their distribution shown the Figure 7, the local clique network tends to gather local neighbors together. However, it is unable to recognize long-range relationships, thus combines distinct classes into one cluster. On the other hand, the long-range chain network captures distant neighbors but leaves a + +![](images/ce4f38337798fd7b62eaeab02a8dfd3d315ba1e9f2bf765018f6ec5ee313bea8.jpg) +Figure 9. Sensitivity analysis on MS-Celeb-1M. The vertical line in the middle represents the best threshold for clustering. + +sparse cluster distribution. After utilizing the strengths from both local and long-range relationships, features are more inner-class compact and inter-class discriminative. Experiments on the other two datasets in Tables 2 and 3 also validate our assumption. + +As mentioned, we use a simple labeling scheme that uses a global threshold to decide if two features are from the same class. However, as long as the image distribution remains various, it is impractical to prevent merging different classes and splitting samples of the same class simultaneously. This is reflected by the sensitivity of the clustering performance. As shown in Figure 9, the local+long-range features are more robust to the clustering threshold. This is because of the shrinkage of the intra-class feature distribution, which significantly simplifies the clustering task. + +Compatibility. Our method improves face clustering by learning a density-aware feature embedding. This embedding is compatible with other clustering methods. As shown in Table 4, clustering with local+long-range features outperforms using original features in pairwise precision, recall, and F-score. + +# 4.2. Method Comparison + +We compare our method with two sets of clustering approaches. One is the conventional approaches, including K-Means [12], Density-Based Spatial Clustering of Applications with Noise (DBSCAN) [3], Hierarchical Agglomerative Clustering (HAC) [19], Approximate Rank Order (ARO) [14]. The other is learning based methods, including CDP [28], Learning to Cluster (LearnClust) [27] and linkage-GCN [23]. + +The experimental results are presented in Tables 1 to 3. These show that our method outperforms other approaches on all datasets. Specifically, in MS-Celeb-1M dataset, our + +
MethodsPrecisionRecallF-scoreTime
K-Means [12]52.5270.4560.1813h
DBSCAN [3]72.8842.4653.50100s
HAC [19]66.8470.016.83918h
ARO [14]81.107.3013.34250s
CDP [28]80.1970.4775.01350s
LearnClust [27]98.2475.9385.662200s
original85.6362.1772.0430s
local only93.5080.5086.51178s
long-range only94.9471.7381.72181s
local+long-range95.8885.8790.60329s
+ +Table 1. Comparison on MS-Celeb-1M. + +
MethodsPrecisionRecallF-score
K-Means [12]60.6559.6060.12
DBSCAN [3]72.8842.4653.5
HAC [19]99.6487.3193.07
ARO [14]81.17.313.34
CDP [28]98.3289.8493.89
LearnClust [27]96.7592.2794.46
original98.2586.5792.04
local only99.4789.8694.42
long-range only97.6788.3092.75
local+long-range97.4492.8695.10
+ +Table 2. Comparison on YouTube Faces DB. + +
MethodsF512F1024F1845
K-Means [12]0.6120.6030.600
DBSCAN [3]0.7530.7250.695
ARO [14]0.7630.7580.755
GCN-A [23]0.8330.8330.814
original0.7850.7650.758
local only0.8270.8070.793
long-range only0.8060.7970.802
local+long-range0.8340.8330.828
+ +Table 3. Comparison on IJB-B. $\mathrm{F}_{512}$ , $\mathrm{F}_{1024}$ , $\mathrm{F}_{1845}$ are F-scores of different sets. + +method outperforms the state-of-the-art method LearnClust [27] by $5\%$ , and is substantially better than conventional methods. In YouTube Faces DB and IJB-B-1845, our method outperforms the state-of-the-art by $0.64\%$ and $1.4\%$ respectively. Our approach generates a context-aware feature, which makes it compatible with other clustering methods, such as K-Means and LearnClust. + +Comparison on efficiency and complexity. In our work, the computational complexity arises from three parts: the density-aware graph construction, the network inference, and the cluster generation. The graph construction is + +
MethodsPrecisionRecallF-score
K-Means+original52.5270.4560.18
K-Means+local +long-range89.2889.7889.53
DBSCAN+original72.8842.4653.50
DBSCAN+local +long-range97.1779.7987.63
+ +Table 4. Compatibility analysis. + +
Layer settingsPrecisionRecallF-score
2 layer GCN93.5080.5086.51
2 layer GCN + 2 layer LSTM95.8885.8790.60
4 layer GCN97.1278.4686.80
4 layer GCN + 4 layer LSTM95.9686.7191.10
+ +Table 5. Increase parameters on MS-Celeb-1M. + +the most time-consuming part with a time complexity of $\mathcal{O}(n^2)$ . With approximate nearest neighbor search [25], the searching complexity reduces to $\mathcal{O}(n\log n)$ . Then, the graph is only constructed based on the local neighbors, hence the number of graph grows linearly with the number of data, thus the network inference cost is $\mathcal{O}(n)$ . Besides, the complexity of cluster generation module is $\mathcal{O}(n)$ as mentioned in Section 3.5. Consequently, the overall complexity is $\mathcal{O}(n\log n)$ , which means it is efficient and scalable. + +From Table 1, it is clear that our method is much faster compared to other network-based methods and is even comparable with the fastest traditional methods. Specifically, our approach only costs $15\%$ of the time when compared with related GCN-based method LearnClust [27], because the graph in LearnClust constructed is based on the set of nodes generated by cluster proposal, which may involve much more nodes for GCN than the nodes involved using our density-aware graph construction. + +# 5. Conclusion + +This paper has presented a density-aware feature embedding framework. It uses GCN to obtain local context and uses a density-aware long-range chain to capture cluster-level information effectively. An LSTM network is applied along to the density-aware chain to aggregate different local information to a unified feature embedding for each node. Efficient clustering algorithm is performed over the improved features. Extensive experimental results on three benchmark datasets and different clustering approaches validate the effectiveness of the proposed DA-Net. + +# References + +[1] Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze. Deep clustering for unsupervised learning of visual features. In The European Conference on Computer Vision (ECCV), September 2018. 3 +[2] Mathilde Caron, Piotr Bojanowski, Julien Mairal, and Armand Joulin. Unsupervised pre-training of image features on non-curated data. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 3 +[3] Martin Ester, Hans-Peter Kriegel, Jörg Sander, Xiaowei Xu, et al. A density-based algorithm for discovering clusters in large spatial databases with noise. In Kdd, volume 96, pages 226-231, 1996. 3, 7, 8 +[4] Michael Fredman and Michael Saks. The cell probe complexity of dynamic data structures. In Proceedings of the twenty-first annual ACM symposium on Theory of computing, pages 345-354. ACM, 1989. 5, 6 +[5] Aditya Grover and Jure Leskovec. node2vec: Scalable feature learning for networks. In ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, 2016. 3 +[6] Yandong Guo, Lei Zhang, Yuxiao Hu, Xiaodong He, and Jianfeng Gao. Ms-celeb-1m: A dataset and benchmark for large-scale face recognition. In ECCV, pages 87–102. Springer, 2016. 2, 5 +[7] Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Advances in Neural Information Processing Systems, pages 1024-1034, 2017. 2, 3 +[8] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735-1780, 1997. 3 +[9] Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations (ICLR), 2017. 2 +[10] Wei-An Lin, Jun-Cheng Chen, Carlos D Castillo, and Rama Chellappa. Deep density clustering of unconstrained faces. In CVPR, pages 8128-8137, 2018. 3 +[11] Ziqi Liu, Chaochao Chen, Longfei Li, Jun Zhou, Xiaolong Li, Le Song, and Yuan Qi. Geniepath: Graph neural networks with adaptive receptive paths. In AAAI, 2018. 2 +[12] Stuart Lloyd. Least squares quantization in pcm. IEEE transactions on information theory, 28(2):129-137, 1982. 3, 7, 8 +[13] Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. arXiv preprintarXiv:1301.3781, 2013. 3 +[14] Charles Otto, Dayong Wang, and Anil K Jain. Clustering millions of faces by identity. IEEE transactions on pattern analysis and machine intelligence, 40(2):289-303, 2018. 7, 8 +[15] Bryan Perozzi, Rami Alrfou, and Steven Skiena. Deepwalk: Online learning of social representations. In Acm Sigkdd International Conference on Knowledge Discovery and Data Mining, 2014. 3 +[16] Alex Rodriguez and Alessandro Laio. Clustering by fast search and find of density peaks. Science, 344(6191):1492-1496, 2014. 2 +[17] Jianbo Shi and Jitendra Malik. Normalized cuts and image segmentation. *Departmental Papers (CIS)*, page 107, 2000. 3 + +[18] Yichun Shi, Charles Otto, and Anil K Jain. Face clustering: Representation and pairwise constraints. IEEE Transactions on Information Forensics and Security, 13(7):1626-1640, 2018. 3 +[19] Robin Sibson. Slink: an optimally efficient algorithm for the single-link cluster method. The computer journal, 16(1):30-34, 1973. 7, 8 +[20] Kiran K Thekumparampil, Chong Wang, Sewoong Oh, and Li-Jia Li. Attention-based graph neural network for semi-supervised learning. arXiv preprint arXiv:1803.03735, 2018. 2 +[21] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008, 2017. 4 +[22] Petar Velicković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph attention networks. In International Conference on Learning Representations, 2018. 2 +[23] Zhongdao Wang, Liang Zheng, Yali Li, and Shengjin Wang. Linkage Based Face Clustering via Graph Convolution Network. In CVPR, 2019. 1, 3, 6, 7, 8 +[24] Cameron Whitelam, Emma Taborsky, Austin Blanton, Brianna Maze, Jocelyn Adams, Tim Miller, Nathan Kalka, Anil K Jain, James A Duncan, Kristen Allen, et al. Iarpa janus benchmark-b face dataset. In CVPR Workshops, pages 90-98, 2017. 2, 5, 6 +[25] P. Wieschollek, O. Wang, A. Sorkine-Hornung, and H. P. A. Lensch. Efficient large-scale approximate nearest neighbor search on thegpu. In CVPR, 2016. 8 +[26] Lior Wolf, Tal Hassner, and Itay Maoz. Face recognition in unconstrained videos with matched background similarity. In CVPR. IEEE, 2011. 2, 5 +[27] Lei Yang, Xiaohang Zhan, Dapeng Chen, Junjie Yan, Chen Change Loy, and Dahua Lin. Learning to Cluster Faces on an Affinity Graph. In CVPR, 2019. 1, 3, 5, 6, 7, 8 +[28] Xiaohang Zhan, Ziwei Liu, Junjie Yan, Dahua Lin, and Chen Change Loy. Consensus-driven propagation in massive unlabeled data for face recognition. In ECCV, pages 568-583, 2018. 1, 3, 7, 8 \ No newline at end of file diff --git a/densityawarefeatureembeddingforfaceclustering/images.zip b/densityawarefeatureembeddingforfaceclustering/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..67f7910a561a9ad1018dc5f4d32b57aa09bc7f48 --- /dev/null +++ b/densityawarefeatureembeddingforfaceclustering/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:637ca4e85edd820a805195271310ec97ae2bb9f89356d9bcdab5abd4f0fded2e +size 521859 diff --git a/densityawarefeatureembeddingforfaceclustering/layout.json b/densityawarefeatureembeddingforfaceclustering/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..de5847506e1df6217220d34d1c992427b71341df --- /dev/null +++ b/densityawarefeatureembeddingforfaceclustering/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67e2e95c75bf6e2c1393c457ce573b433fa5ca4335673c9b6629773f0f2b2ab3 +size 388341 diff --git a/densityawaregraphfordeepsemisupervisedvisualrecognition/06e81747-f3b6-4afb-9a6f-5300460ec0a4_content_list.json b/densityawaregraphfordeepsemisupervisedvisualrecognition/06e81747-f3b6-4afb-9a6f-5300460ec0a4_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..05feb69e21310563c21362033b441c5d07bdea38 --- /dev/null +++ b/densityawaregraphfordeepsemisupervisedvisualrecognition/06e81747-f3b6-4afb-9a6f-5300460ec0a4_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f8fd68a2c29ba9f9b216761223d2a978a5bfe6282f7e6d8e9f86f25cebb7d33 +size 73777 diff --git a/densityawaregraphfordeepsemisupervisedvisualrecognition/06e81747-f3b6-4afb-9a6f-5300460ec0a4_model.json b/densityawaregraphfordeepsemisupervisedvisualrecognition/06e81747-f3b6-4afb-9a6f-5300460ec0a4_model.json new file mode 100644 index 0000000000000000000000000000000000000000..29dc0d6ac964ff897a3a13d2e26946ec8faf4b63 --- /dev/null +++ b/densityawaregraphfordeepsemisupervisedvisualrecognition/06e81747-f3b6-4afb-9a6f-5300460ec0a4_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c28a12067c80f7320966e4cd3bd424692b4cfdfbbfc9312cd1e3ee271fac0bb +size 87840 diff --git a/densityawaregraphfordeepsemisupervisedvisualrecognition/06e81747-f3b6-4afb-9a6f-5300460ec0a4_origin.pdf b/densityawaregraphfordeepsemisupervisedvisualrecognition/06e81747-f3b6-4afb-9a6f-5300460ec0a4_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e9456889c150b45b14c0f5b556e4e39594203de7 --- /dev/null +++ b/densityawaregraphfordeepsemisupervisedvisualrecognition/06e81747-f3b6-4afb-9a6f-5300460ec0a4_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f185d4e1d67f0ebf4cc2b270e8f3b0254efa6c4735e8ab3a58313be7bec39d2 +size 2323043 diff --git a/densityawaregraphfordeepsemisupervisedvisualrecognition/full.md b/densityawaregraphfordeepsemisupervisedvisualrecognition/full.md new file mode 100644 index 0000000000000000000000000000000000000000..d6b79f6edc35bdde844f80d9d47d5a6c74535b41 --- /dev/null +++ b/densityawaregraphfordeepsemisupervisedvisualrecognition/full.md @@ -0,0 +1,320 @@ +# Density-Aware Graph for Deep Semi-Supervised Visual Recognition + +Suichan $\mathrm{Li}^{1,2}$ Bin Liu $^{1,2}$ Dongdong Chen $^{3}$ Qi Chu $^{1,2*}$ Lu Yuan $^{3}$ Nenghai Yu $^{1,2}$ + +$^{1}$ School of Information Science and Technology, University of Science and Technology of China $^{2}$ Key Laboratory of Electromagnetic Space Information, the Chinese Academy of Sciences $^{3}$ Microsoft Research + +# Abstract + +Semi-supervised learning (SSL) has been extensively studied to improve the generalization ability of deep neural networks for visual recognition. To involve the unlabeled data, most existing SSL methods are based on common density-based cluster assumption: samples lying in the same high-density region are likely to belong to the same class, including the methods performing consistency regularization or generating pseudo-labels for the unlabeled images. Despite their impressive performance, we argue three limitations exist: 1) Though the density information is demonstrated to be an important clue, they all use it in an implicit way and have not exploited it in depth. 2) For feature learning, they often learn the feature embedding based on the single data sample and ignore the neighborhood information. 3) For label-propagation based pseudo-label generation, it is often done offline and difficult to be end-to-end trained with feature learning. Motivated by these limitations, this paper proposes to solve the SSL problem by building a novel density-aware graph, based on which the neighborhood information can be easily leveraged and the feature learning and label propagation can also be trained in an end-to-end way. Specifically, we first propose a new Density-aware Neighborhood Aggregation(DNA) module to learn more discriminative features by incorporating the neighborhood information in a density-aware manner. Then a novel Density-ascending Path based Label Propagation(DPLP) module is proposed to generate the pseudo-labels for unlabeled samples more efficiently according to the feature distribution characterized by density. Finally, the DNA module and DPLP module evolve and improve each other end-to-end. Extensive experiments demonstrate the effectiveness of the newly proposed density-aware graph based SSL framework and our approach can outperform current state-of-the-art methods by a large margin. + +![](images/607411269a3661b8e22e6dd219ccbcb348a6dc5384206bb984edd68dfc0f7226.jpg) +$\bigcirc$ unlabeled nodes +Figure 1: (a) Density-aware Neighborhood Aggregation(DNA) scheme prefer neighbors with higher density when target sample has equal similarity with the neighbors which belong to different clusters. (b) Density-ascending Path-based Label Propagation(DPLP) constructs a density-ascending path and propagates the labels from labelled samples to unlabelled samples within the path. + +![](images/321f70682ee048a131b09822f750af6bd4eacec2f805fbbbad72c1edd2514f6c.jpg) +(a) Density-aware Neighborhood Aggregation +labeled nodes +(b) Density-ascending Label Propagation + +# 1. Introduction + +Recently, semi-supervised learning (SSL) has been extensively studied to improve the generalization ability of deep neural networks for visual recognition by utilizing limited labelled images and massive unlabeled images. For leveraging the unlabeled data, current SSL methods are usually based on a common density-based cluster assumption, i.e. samples lying in the same high-density region are likely to belong to the same class[4, 26]. Its equivalent one is low-density separation assumption, which states that the decision boundary should not cross high density regions, but instead lies in low density regions. Current methods mainly focus on enforcing the low-density separation assumption by encouraging invariant prediction for perturbations around each unlabeled data point or same predictions for nearby samples, including consistency-regularization based methods [15, 24, 26, 2] and pseudo-label based methods [16, 23, 10]. + +While density-peak assumption [20] states that high-density samples are more likely to be the center of a cluster, thus samples with high density can encode more representative information of the cluster, which are valuable + +clues for semi-supervised learning. However, current methods have not consider such density information explicitly or exploited it in depth. Moreover, as we know, the performance of current SSL frameworks is mainly determined by two aspects: feature learning and pseudo label generation for unlabelled samples. Nevertheless, when learning the feature embedding, current methods mainly leverage the single data sample and ignore the abundant neighborhood information which is helpful to learn more discriminative features. And for pseudo label generation, existing methods often directly choose current model predictions[16] or perform label propagation[10] to generate labels for unlabeled samples, which induce either inaccurate pseudo labels, or high matrix computation cost which is difficult to be end-to-end trained with the feature learning part. + +Motivated by above observations, this paper proposes a novel density-aware graph based SSL framework. By building a density-aware graph, the neighborhood information can be easily utilized for each data sample. More importantly, the feature learning part and the label propagation part can also be end-to-end trained in the newly proposed framework. Further more, to better leverage the density information, we explicitly incorporate it into these two parts respectively. + +Specifically, given the labelled and unlabelled data samples, a density-aware graph will be first built and we define the density for each node in the graph. Then for feature embedding learning, rather than only based on each single data sample, we propose to aggregate the neighborhood features to enhance the target features instead, which is demonstrated to be very useful in modern Graph Neural Networks(GNNs) [22, 13, 17]. However for the current aggregation schemes, the aggregation weights are often only characterized by the feature similarity between target node and its neighbors. In such case, when the target node has equal similarity with two neighbors which belong to two different clusters, it will give the same weight to these two neighbors. Motivated by the aforementioned density-peak assumption, we propose a novel Density aware Neighborhood Aggregation(DNA) scheme. Concretely, besides considering the feature similarity, we take the neighbor density information into account as well when calculating the aggregating weights. Intuitively, we want higher density neighbors to have higher importance. One simple explanation of this strategy is illustrated in Fig. 1(a). + +To generate pseudo-labels for unlabelled samples more efficiently, we follow the basic label-propagation scheme which propagates the labels from labelled samples to unlabelled samples. However, we are not going to perform label propagation through a linear system solver used in [10, 31], which induces high matrix computational cost and works offline while training. Inspired by the aforementioned density assumption again, given one unlabelled sample, we ar + +gue the pseudo-label generated from neighboring samples with higher density is more possibly precise than that from neighbors with lower density. Based on this insight, we further propose a novel Density-ascending Path-based Label Propagation (DPLP) module. Specifically, for each sample, we will construct a density-ascending path where densities of samples are characterized by ascending-order, and perform label propagation within this path, which is efficient and can be online trained with feature learning in an end-to-end fashion. A graphical illustration can be found in Fig. 1(b). + +In summary, the main contributions of this work include: (1) We propose a novel density-aware graph based SSL framework. To the best of our knowledge, this is the first work which exploits the density information explicitly for deep semi-supervised visual recognition; (2) A new Density-aware Neighborhood Aggregation module and Density-ascending Path-based Label Propagation module are designed for better feature learning and pseudo label generation respectively. The two modules are integrated into a unified framework and can be end-to-end trained; (3) Extensive experiments demonstrate the effectiveness of the proposed framework, which significantly outperforms the current state-of-the-art methods. + +# 2. Related Works + +Consistency-regularization for SSL. These methods usually apply a consistency loss on the unlabeled data, which enforce invariant predictions for perturbations of unlabelled data. For example, II-model [15] proposes to use a consistency loss between the outputs of a network on random perturbations of the same image, while Laine et al. [15] apply consistency constraints between the output of the current network and the temporal average of outputs during training. The mean teacher (MT) method [24] replaces output averaging by averaging of network parameters. To utilize the structural information among unlabeled data points, [23] applies a Min-Max Feature regularization loss to encourage networks to learn features with better between-class separability and within-class compactness. Similarly, Luo et al. [18] utilize the contrastive loss to enforce neighboring points to have consistent predictions while the non-neighbors are pushed apart from each other. Although these methods have exploited neighborhood and density information, they are in the form of regularization terms or loss functions. By contrast, our method proposes to aggregate neighborhood features to enhance the target feature in a more explicit density-aware manner. + +Pseudo-labeling for SSL. To leverage unlabelled data, pseudo-label based methods try to assign pseudo labels to the unlabeled samples based on labelled samples, then train the network in a fully supervised way. To generate precise pseudo labels, Lee et al. [16] use the current network + +predictions with high confidence as pseudo-labels for unlabeled examples. Shi et al. [23] use the network class prediction as hard labels for the unlabeled samples and introduce an uncertainty weight. Recently, Iscen et al. [10] employ graph-based label propagation to infer labels for unlabeled samples. However, they perform label propagation through a linear system solver on the training set offline with high computational cost, thus cannot be trained in an end-to-end way. In this work, we propose to construct a density-ascending path and perform label propagation within this path, which is much more efficient and can be end-to-end trained. + +Neighborhood Aggregation in GNNs. Modern GNNs broadly follow a neighborhood aggregation scheme, where each node aggregates feature vectors of its neighbors to get more representative feature vector [28]. Different GNNs can vary in how they perform neighborhood aggregation. For example, Kipf et al. [13] use mean-pooling based neighborhood aggregation and Hamilton et al. [7] propose three aggregator functions: Mean aggregator, MaxPooling aggregator and LSTM aggregator. Recently, inspired by self-attention mechanism, Petar et al. [25] propose an attention-based aggregation architecture by learning adaptive aggregation weights. Li et al. [17] extend the attention-based aggregation by supervising the attention weights with node-wise class relationship. After careful study, we find most of these neighborhood aggregation methods only consider the feature similarity between target sample and its neighbors when defining the aggregating weights. However, density information is shown to be a very important clue for SSL. Therefore, besides feature similarity, this paper also takes the neighborhood density into consideration and proposes a novel density-aware neighborhood aggregation scheme. + +# 3. Preliminary + +In semi-supervised learning, a small amount of labelled training samples $\mathcal{D}_l = \{(x_i,y_i)\}_{i = 1}^l$ and a large set of unlabeled training samples $\mathcal{D}_u = \{x_j\}_{j = 1}^u$ are often given, where $l$ and $u$ are number of labelled and unlabeled samples respectively and usually $l\ll u$ . Then the goal of SSL is to leverage both $\mathcal{D}_l$ and $\mathcal{D}_u$ to train a better and generalized recognition model. Formally, let $m = l + u$ be the total number of training samples, $f_{\theta}$ be the feature extractor and $h_\phi$ be the classifier, current deep SSL methods adopt a similar optimization formulation: + +$$ +\min _ {\theta , \phi} \sum_ {i = 1} ^ {m} \ell \left(h _ {\phi} \left(f _ {\theta} \left(x _ {i}\right), \hat {y} _ {i}\right) + \lambda R (\theta , \phi , \mathcal {D} _ {l}, \mathcal {D} _ {u}) \right. \tag {1} +$$ + +where $\ell$ is the loss function like cross-entropy loss. For labelled data, $\hat{y}$ is the ground-truth label, while for unlabelled data, $\hat{y}$ can be pseudo-label. $R$ is the regularization term, + +which encourages the model to generalize better to unseen data. Inspired by [6, 3], we add regularization term as follow: + +$$ +\begin{array}{l} R = - \frac {1}{m} \sum_ {i = 1} ^ {m} \sum_ {j = 1} ^ {n _ {c}} h _ {j} (x _ {i}; \theta , \phi) l o g h _ {j} (x _ {i}; \theta , \phi) \\ - \frac {1}{n _ {c}} \sum_ {j = 1} ^ {n _ {c}} \log \bar {h} _ {j} (X; \theta , \phi) \\ \end{array} +$$ + +(2) + +where $n_c$ is the number of classes, $\bar{h}_j(X; \theta, \phi)$ represents the mean softmax predictions of the model for category $j$ across current training batch. The first term is the entropy minimization objective defined in [6], which simply encourages the model output to have low entropy; while the second term encourages the model to predict each class with equal frequency on average [3]. + +# 4. Method + +Overview. In this work, we introduce a unified framework for joint feature learning and label propagation on a density-aware graph for semi-supervised visual recognition, which can be trained in an end-to-end fashion. A graphical overview of the proposed framework is depicted in Fig.2. First, we construct a $k$ -nearest neighbor graph and define the density for each node in the graph. Then based on the density-aware graph, we propose to learn the feature embedding and pseudo label generation simultaneously for each node in the graph. Specifically, for each target node, we will sample its neighborhood sub-graph and learn feature embedding on this sub-graph by incorporating the neighborhood information with Density-aware Neighborhood Aggregation(DNA). For pseudo label generation, we propose Density-ascending Path-based Label Propagation (DPLP), i.e., build a density-ascending path for each node in the graph and propagate the labels from labelled nodes to unlabelled nodes within this path. + +# 4.1. Density-Aware Graph + +Given a pre-trained feature extractor and classifier, we first extract the feature vectors and label predictions for all training samples, and organize them as Feature Bank and Label Bank respectively, which can be accessed through index later. Based on the features in the feature bank, we construct the global $k$ -nearest neighbor affinity graph ( $k = 64$ in this work). We then define the density $\rho$ for each node $u$ in the graph as: + +$$ +\rho_ {u} = \frac {1}{\left| \mathcal {N} _ {k} (u) \right|} \sum_ {v \in \mathcal {N} _ {k} (u)} \tilde {\mathbf {f}} _ {u} ^ {T} \tilde {\mathbf {f}} _ {v} \tag {3} +$$ + +where $\mathcal{N}_k(u)$ is the $k$ -nearest neighbors of node $u$ , and $\tilde{\mathbf{f}}_u$ , $\tilde{\mathbf{f}}_v$ are the L2-normalized feature embedding of node $u$ and $v$ . Intuitively, this formula expresses the density of each + +![](images/76612e0e316d6ffcdaffea55495b8f8c9045e2a021d336d2e7cad8ee6aae6fab.jpg) +Figure 2: The overview of the proposed density-aware graph based SSL framework. The red line demonstrates the data flow in training, which includes feature extraction, sub-graph sampling and density-ware neighbourhood aggregation. The grey line shows the flow for density-ascending path-based label propagation. + +node $u$ as the average of the similarities between $u$ and its neighbors. Need to note that other definitions of the density can also be considered, such as the number of neighbors whose similarity with target node is greater than a predefined threshold [20]. But it is not the focus of this work. We refer to the graph equipped with the density as Density-Aware Graph; + +# 4.2. Density-Aware Neighborhood Aggregation + +Current methods mainly focus on regularizing the output to be smooth near a data sample locally but learn the feature embedding only based on each single data sample. That is to say, they have not fully explored the important neighborhood information for feature learning, which is demonstrated to be very useful in other tasks [32, 17, 21, 8, 30]. Motivated by this observation, we propose to enhance the feature embedding of each target sample by aggregating the neighborhood features. Specifically, for each sample in the current training batch, we first pass it through the backbone to get the feature vector, and get corresponding node in the global density-aware graph (referred as target node), then we sample the neighborhood nodes of the target node from the global graph to obtain a sub-graph. + +Sub-Graph Construction For construction of the subgraph, we follow [17] and organize the neighbor nodes as a Tree-Graph. In particular, we take the target node as the root node, then build the tree in an iterative fashion. Each time, we extend all the leaf nodes by adding their $k$ nearest neighbors from global-graph as the new leaf nodes. The tree graph grows until it reaches a predefined depth $h$ . Based on Tree-Graph, we then iteratively perform feature aggregation among connected nodes and gradually propagates information within the sub-graph from leaf nodes to the target node. In the experimental part, we will study the effect of the number of sampling neighbors $k$ and graph depth $h$ . + +Density-aware Neighborhood Aggregation(DNA) After sampling of sub-graph, we propose to improve target fea- + +ture embedding by aggregating its neighbors embedding in the sub-graph. General aggregation strategies like mean-pooling and max-pooling cannot determine which neighbors are more important. Recently, to adaptively aggregate the features, [25, 17] proposed an attention-based architecture to perform neighboring aggregation, whose aggregation weights are characterized by the feature similarity between target node and its neighbors. Formally, the adaptive aggregation can be denoted as: + +$$ +\mathbf {f} _ {u} ^ {\prime} = \mathbf {W} _ {A} \left(\mathbf {f} _ {u} + \sum_ {v \in \mathcal {N} (u)} a _ {u, v} \mathbf {f} _ {v}\right) + \mathbf {b} _ {A} \tag {4} +$$ + +where $\mathbf{W}_A, \mathbf{b}_A$ are extra parameters for feature transformation. And $a_{u,v}$ is the aggregation weight denoting how much neighbor node $v$ contributes to the target node $u$ : + +$$ +a _ {u, v} = \frac {e ^ {p _ {u , v}}}{\sum_ {k \in \mathcal {N} (u)} e ^ {p _ {u , k}}}, \tag {5} +$$ + +$$ +p _ {u, v} = \tilde {\mathbf {f}} _ {u} ^ {T} \tilde {\mathbf {f}} _ {v}, \quad \tilde {\mathbf {f}} _ {u} = \frac {\mathbf {f} _ {u}}{\| \mathbf {f} _ {u} \|}, \quad \tilde {\mathbf {f}} _ {v} = \frac {\mathbf {f} _ {v}}{\| \mathbf {f} _ {v} \|} \tag {6} +$$ + +In details, we first perform feature L2-normalization, then define the similarity $p_{u,v}$ as the inner product of L2-normalized feature, and get the final aggregation weights by normalizing the similarity with the softmax operation. + +However in SSL, we find only considering the aggregation weight with feature similarity is sub-optimal. In this way, if the target node has equal similarity with two neighbors that belong to two different clusters, the same aggregation weights will be assigned to these two neighbors. In fact, based on the density-peak assumption, the nodes with higher density are more closer to the cluster center and more discriminative. Therefore, besides the feature similarity information, we propose to incorporate the density information of each neighbor as well when calculating the aggregation weights. By default, we simply combine feature similarity $\mathbf{p}$ and density $\rho$ with element-wise summation and + +Algorithm 1 Density-Ascending Path-based Label Propagation +Input: Density-Aware Graph $\mathcal{G}$ , Label Bank $\mathcal{B}$ , labeled node indices $\mathcal{I}_l$ , unlabeled node indices $\mathcal{I}_u$ +Output: Updated label Bank $\mathcal{B}^{\prime}$ +1: $\mathcal{I}_u^{\prime} = \mathcal{I}_u,\mathcal{B}^{\prime} = \mathcal{B}$ +2: $\mathcal{I}_l^{\prime} =$ SORTINDENSITYDECENDING $(\mathcal{I}_l,\mathcal{G})$ +3: for $i\in \mathcal{I}_l^\prime$ do +4: $\mathcal{P} =$ CONSTRUCTDENSITYASCENDINGPATH(i, $\mathcal{G}$ 1 +5: for $j\in \mathcal{P}$ do +6: if $j\in \mathcal{I}_u^\prime$ then +7: $\mathcal{B}^{\prime} =$ UPDATELABELBANK( $\mathcal{B}^{\prime},i,j)$ +8: $\mathcal{I}_u^{\prime} = \mathcal{I}_u^{\prime}\setminus \{j\}$ +9: end if +10: end for +11: end for +12: for $i\in \mathcal{I}_u^\prime$ do +13: $\mathcal{P} =$ CONSTRUCTDENSITYASCENDINGPATH(i, $\mathcal{G}$ 1 +14: for $j\in \mathcal{P}$ do +15: if $j\in \mathcal{I}_l^\prime$ then +16: $\mathcal{B}^{\prime} =$ UPDATELABELBANK( $\mathcal{B}^{\prime},j,i)$ +17: end if +18: end for +19: end for +20: return $\mathcal{B}^{\prime}$ + +rewrite Eq. 5 as follows: + +$$ +a _ {u, v} = \frac {e ^ {\left(p _ {u , v} + \rho_ {v}\right)}}{\sum_ {k \in \mathcal {N} (u)} e ^ {\left(p _ {u , k} + \rho_ {k}\right)}}. \tag {7} +$$ + +# 4.3. Density-ascending Path for Label Propagation + +Density-Ascending Path Construction. We construct the density-ascending path for each node in the global density-aware graph. More specifically, for node $u$ , we initialize the density-path as one-element set $\{u\}$ . Then we add one new nearest neighbor node $v$ , whose density is greater than the previous added node. We iteratively perform this process until the distance between the candidate node and the last added node is greater than a predefined threshold. + +For notation clarity, we define the Density-Ascending Path as $\mathcal{P}(u) = \{v_1,v_2,\dots,v_k,\dots\}$ , where $v_{k}$ is the node added to the path at $k$ th step. Supposing the added node at $k$ th step is $v_{k}$ , then node to be added is the neighbor node $v_{k + 1}$ with higher density: + +$$ +v _ {k + 1} = \arg \min _ {v} \Psi \left(\mathbf {f} _ {v _ {k}}, \mathbf {f} _ {v}\right), v \in \{w | \rho_ {w} > \rho_ {v _ {k}} \} \tag {8} +$$ + +where $\Psi(\cdot)$ is a distance metric function, and we choose the L2-Euclidean distance metric in this work by default, i.e., $\Psi(\mathbf{f}_{v_k}, \mathbf{f}_v) = \|\mathbf{f}_v - \mathbf{f}_u\|_2$ To alleviate the influence of irrelevant neighbors, we define a threshold $\sigma$ , to terminate the growth of the density-ascending path, i.e., for each node pair $(v_k, v_{k+1})$ in $\mathcal{P}(u)$ , it satisfies: $\left\| \mathbf{f}_{v_k} - \mathbf{f}_{u_{k+1}} \right\|_2 \leq \sigma$ . + +Algorithm 2 Density-Aware Graph for Deep SSL +Require: Training set $\{\mathcal{X},\mathcal{Y}_l\}$ , training epochs $T$ , training iterations $J$ , initial feature bank $\mathcal{F}^0$ , initial label bank $\mathcal{L}^0$ , labeled indices $\mathcal{I}_l$ , unlabeled indices $\mathcal{I}_u$ +Require: Feature Extractor $f_{\theta}$ , Classifier $g_{\phi}$ +Require: DensityAwareNeighborhoodAggregation DNA( $\cdot |\omega$ +Require: DensityAscendingPathLabelPropagation DPLP(·) +1: for $t\in \{1,\dots ,T\}$ do +2: $\mathcal{F}^t,\mathcal{L}^t = \mathrm{INITIALIZE}(f_\theta ,g_\phi ,\mathcal{X},\mathcal{Y}_l,\mathcal{F}^{t - 1},\mathcal{L}^{t - 1})$ +3: $\mathcal{G}^t = \mathrm{CONSTRUCTDENSITYAWAREGRAPH}(\mathcal{F}^t,\mathcal{L}^t)$ +4: $\mathcal{V} = \mathrm{DPLP}(\mathcal{G}^t,\mathcal{L}^t,\mathcal{I}_l,\mathcal{I}_u)$ ▷ label propagation +5: for $i\in \{1,\ldots ,J\}$ do +6: $X^i,Y^i = \mathrm{GETTRAININGBATCH}(\mathcal{X},\mathcal{Y},i)$ +7: $F^i = f(X^i;\theta)$ +8: $\mathcal{G}_s = \mathrm{SAMPLESUBGRAPH}(F^i,\mathcal{G}^t)$ +9: $F^i = \mathrm{DNA}(F^i,\mathcal{G}_s;\omega)$ ▷ feature aggregation +10: $P^i = g(F^i;\phi)$ ▷ category predictions +11: $\ell = \mathrm{CACULATELOSS}(P^i,Y^i)$ +12: UPDATEPARAMETER( $\ell ,\theta ,\phi ,\omega$ ) ▷ back-propagation +13: end for +14: end for + +Before entering the Density-ascending Path-based Label Propagation, we first introduce the following assumption. + +Assumption: The labelled nodes with higher density in the density-ascending path are more possible to provide correct pseudo labels than the ones with lower density. + +Explanation: As stated in the cluster assumption, samples with the same label are more likely to lie in the high-density region. Meanwhile, the density-peak assumption [20] shows that high-density nodes are more likely to be the center of a cluster. Thus for one unlabelled node, the labelled nodes with higher density are more representative and more likely to provide correct pseudo labels than the ones having lower density in the same density-ascending path. + +Based on density-ascending path, now we introduce our Density-ascending Path-based Label Propagation(DPLP) algorithm. Specifically, we first sort all the labelled nodes based on the density in descending order, then for each labelled node, we construct a density-ascending path and use the label of the max-density labelled node to update the entries of Label Bank corresponding to all the unlabelled nodes in this path. For remaining unlabelled nodes, we also construct a density-ascending path for each of them and update the corresponding entry of Label Bank using the label of labeled node with highest density in the path. The detailed procedures are summarized in Alg. 1. + +# 4.4. Density Aware Graph-based SSL Framework + +The above Density-aware Neighborhood Aggregation and Density-ascending Path-based Label Propagation are integrated into a unified Density Aware Graph-based SSL + +
MethodCIFAR10CIFAR100
No. of labelled images10004000
Baseline10.9643.34
NA w/o density9.4640.76
NA with density9.1840.33
+ +![](images/94bd3479a504f3801a926650f5c81900f2586f7e118f1e8328ef72cd5a981c28.jpg) +(a) Features without Aggregation + +![](images/2b96f84f9ac3042ba0f9b880488293e3a34c8fab5628eb34396f42a954762ed7.jpg) +(b) Features with Aggregation +Figure 3: Visualization of feature embeddings on CIFAR10. Each dot in the figure corresponds to one image, and different colors represent different classes. (Best viewed in color.) + +framework (dubbed as "DAG") and can be trained in an end-to-end fashion. We summarize the whole training process in Alg. 2. Specifically, at the beginning of each epoch, we update the Feature Bank and Label Bank with the latest feature extractor and classifier. Then construct a new global density-aware graph based on current Feature Bank and perform density-ascending path label propagation based on DAG and current Label Bank. Need to note that we always use ground-truth labels for the Label Bank entries of labeled samples. After the above training preparation, we then start to train the framework by sampling batch images and labels. In details, for each batch of images, we feed them into the feature extractor and enhance their output features by density-aware neighborhood aggregation on sub-graphs before feeding them into the classifier. + +# 5. Experiments + +# 5.1. Experimental Setup + +Dataset Setup. To verify the effectiveness, we conduct experiments on three popular datasets, namely CIFAR10 [14], CIFAR100 [14] and Mini-ImageNet [27]. In details, CIFAR10 and CIFAR100 both contain 50k images for training and 10k images for testing with resolution $32 \times 32$ , but coming from 10 and 100 classes respectively. Following the standard SSL setting, for CIFAR10, we perform experiments with 50, 100, 200, and 400 labelled images per classes. And for CIFAR100, we experiment with 40 and 100 labelled images per class. For Mini-ImageNet, it is a subset of ImageNet[5] and consists of 100 classes with + +![](images/ce776befaa72fe225803bc020a90c192587ccea59546f29c56a594d8f86a53e0.jpg) +(a) Number of Neighbors +Figure 4: Influence of number of neighbors on CIFAR10(a) and CIFAR100(b). + +![](images/b78cce13fa9f4b8dbefdbbe317e3b18b01ab75f192b83d4700acd2172a455ee9.jpg) +(b) Number of Neighbors + +Table 1: Effectiveness of Neighborhood Aggregation(NA) on CIFAR10 and CIFAR100. + +
MethodCIFAR10CIFAR100
No. of labelled images10004000
h = 0(baseline)10.9643.34
h = 19.1840.33
h = 29.2039.60
h = 39.2640.28
+ +Table 2: Influence of neighbor-hops for neighborhood aggregation on CIFAR10 and CIFAR100. + +600 images per class of resolution $84 \times 84$ . With the same setting as [10], we randomly assign 500 images from each class to the training set, and 100 images to the test set. The train and test sets therefore contain 50k and 10k images. We then experiment with 40 and 100 labelled images per class for SSL. We perform ablation study on CIFAR10 and CIFAR100 with an independent validation set of 5K instances sampled from the training set as [1, 19] and compare with state-of-the-art methods on the standard test set. + +Implementations. For model architecture, we use the same 13-layer CNN network as in [15, 24, 10] for CIFAR10/100 and ResNet-18 [9] for Mini-ImageNet as [10]. The SGD optimizer is used with the initial learning rate 0.1 and 0.2 for CIFAR10/100 and Mini-ImageNet respectively. We decay the learning rates by 0.1 at 250 and 350 epochs and obtain the final model after 400 epochs. We augment training images with random cropping and horizontal flipping as [15, 24]. Inspired by [29, 26, 2], we also employ Mixup strategy[29] to augment the training samples, which give us a stronger baseline. To build the Feature Bank and Label Bank at the first epoch, we use the model pre-trained only on labelled training samples. And during the testing stage, we directly construct neighborhood sub-graph by retrieving neighbors from the Feature Bank built in the training stage for each test sample. + +# 5.2. Ablation Studies + +# 5.2.1 Density-Aware Neighboring Aggregation + +Effectiveness of Neighborhood Aggregation. We propose to aggregate the neighboring features to enhance the feature of the target instance, thus improving the performance of the semi-supervised image classification. To show the + +effectiveness of neighborhood aggregation, we conduct a baseline experiment without neighborhood aggregation and provide the comparison results in Tab.1. It shows that neighborhood aggregation ("NA w/o density" and "NA with density") can significantly improve the baseline without neighborhood aggregation ("Baseline"). To have a deeper analysis, we further visualize the learned feature embedding of neighborhood aggregation and that of the baseline on the CIFAR10 validation set in Fig. 3, which clearly shows that incorporating neighborhood features can help learn more discriminative feature embeddings. + +Is density improving Neighborhood Aggregation? When learning the aggregation weights, besides considering the feature similarity between target node and its neighbors, we believe incorporating the density information of each neighbor for aggregation weight learning is also very important based on the density-peak assumption. To verify it, we compare the proposed density-aware neighbor aggregation ("NA with density") with the version without considering the density ("NA w/o density"). The results in Tab.1 show that incorporating the density information of neighbors into the learning of aggregation weight can generally achieve superior performance. + +Study about Sub-Graph size. By experiments, we find selecting a good neighbor number $k$ and sub-graph depth $h$ ("hop") is crucial to get the best performance. First to study the influence of $k$ , we only consider different numbers of neighbors in the first hop ( $h = 1$ ). The results in Fig 4 show that a too large or too small number of neighbors will both result in inferior results. This is because a too small number of neighbors will not get sufficient neighboring information while a too large number of neighbors will introduce unrelated neighbors which may weaken the effectiveness of neighborhood aggregation, which is consistent with the results in [17]. We then study if incorporating multi-hop neighbors ( $h > 1$ ) can bring performance gain and show the results in Tab. 2. It can be seen that incorporating two hops of neighbors can bring addition gain on CIFAR100, while yield no addition gain on CIFAR10. On the other hand, sampling the third hop of neighbors will degrade the performance on both datasets. We think it is because more unrelated samples may also be introduced as the neighbors hop increases, thus impairing the target feature. + +# 5.2.2 Density-Ascending Path Label Propagation + +Effectiveness of Density-Ascending Path. In this part, we study the effectiveness of our proposed Density-ascending Path-based Label Propagation(DPLP) which consists of two main sequential steps: first construct a density-ascending path from each labelled sample (denoted as LP-L), then construct a density-ascending path from each remaining unlabelled sample (denoted as LP-LU). Here we study these two steps respectively in Tab. 3. It shows that: (i) Density- + +
MethodCIFAR10CIFAR100
No. of labelled images10004000400010000
Baseline10.967.8543.3437.80
LP-L9.577.3740.9435.94
LP-LU9.147.0340.0834.72
+ +Table 3: Effectiveness of Density-ascending Path-based Label Propagation on CIFAR10 and CIFAR100. + +![](images/48e6738827320c686762a6ccea844b712ff469c21cee7cb926595c3ee144d6be.jpg) + +![](images/b33f565a224c5d51f67ca6b2710cb132a6065b2d893f0c10b34d487321f81ff4.jpg) + +Figure 5: The distribution of length of density-ascending path on CIFAR10 (a) and CIFAR100 (b). + +
MethodCIFAR10CIFAR100
No. of labelled images10004000
Baseline10.9643.34
DNA9.1839.60
DPLP9.1440.08
DAG(Overall framework)8.3538.04
+ +Table 4: Effectiveness of overall framework on CIFAR10 and CIFAR100. + +Ascending Path-based Label Propagation can significantly improve the classification accuracy; (ii) Constructing the density-ascending path only from labelled samples(LP-L) has already significantly improved the baseline; (iii) Constructing the density-ascending path from remaining unlabeled samples(LP-LU) can further bring additional gain. + +Distribution of the length of Density-Ascending Path. As elaborated before, our density-ascending path-based label propagation constructs the path based on the ascending density constraint and terminates according to the feature similarity constraint. Though we have already demonstrated its effectiveness, we are still curious about the distribution of the length of the density-ascending path. In Fig. 5, we show the distribution of the density-ascending path length on CIFAR10(1k labelled samples) and CIFAR100(4k labelled samples) respectively. We can observe that the length of density-ascending path on CIFAR10(1k labelled samples) and CIFAR100(4k labelled samples) have a similar distribution, and is mostly between in 5 and 25. Therefore, it is efficient to online perform label propagation on this density-ascending path during the training stage. + +
MethodCIFAR10CIFAR100
No. of labelled images500100020004000400010000
II model [15]---12.36 ± 0.31-39.19 ± 0.36
TemporalEnsembling [15]---12.16 ± 0.24-38.65 ± 0.51
MeanTeacher [24]-21.55 ± 1.4815.73 ± 0.3112.31 ± 0.28--
SNTG[18]-18.41 ± 0.5213.64 ± 0.329.89 ± 0.34-37.97 ± 0.29
SWA [1]-15.58 ± 0.1211.02 ± 0.239.05 ± 0.21-33.62 ± 0.54
ICT [26]-15.48 ± 0.789.26 ± 0.097.29 ± 0.02--
DualStudent [12]-14.17 ± 0.3810.72 ± 0.198.89 ± 0.09-32.77 ± 0.24
MixMatch[2]9.65 ± 0.947.75 ± 0.327.03 ± 0.156.24 ± 0.06--
TSSDL[23]-18.41 ± 0.9213.54 ± 0.329.30 ± 0.55--
LP[10]24.02 ± 2.4416.93 ± 0.7013.22 ± 0.2910.61 ± 0.2843.73 ± 0.2035.92 ± 0.47
DAG(Ours)9.30 ± 0.737.42 ± 0.417.16 ± 0.386.13 ± 0.1537.38 ± 0.6432.50 ± 0.21
+ +Table 5: Comparison with state-of-the-art methods on CIFAR10 and CIFAR100. Average error rate and standard deviation of 5 runs with different labelled/unlabelled splits are reported. + +
Method400010000
MeanTeacher [24]72.51 ± 0.2257.55 ± 1.11
LP [10]70.29 ± 0.8157.58 ± 1.47
LP + MeanTeacher [10]72.78 ± 0.1557.35 ± 1.66
DAG(Ours)55.97 ± 0.6247.28 ± 0.20
+ +Table 6: Comparison with state-of-the-art methods on MiniImageNet. Average error rate and standard deviation of 3 runs with different labelled/unlabelled splits are reported. + +# 5.2.3 Density Aware Graph-based SSL Framework + +In the previous subsections, we have demonstrated the effectiveness of each individual component, now we will study the effectiveness of the overall framework(DAG), i.e., the combination of Density-aware Neighborhood Aggregation(DNA) and Density-ascending Path-based Label Propagation(DPLP). The results on CIFAR10 and CIFAR100 are displayed in Tab. 4. It can be seen that DNA and DPLP are two complementary modules, and combining them can outperform the baseline by a large margin. For example, DAN and DPLP can reduce the error rate to $39.6\%$ and $40.08\%$ on CIFAR100(4k labelled samples) respectively, and their combination further reduces the error rate to $38.04\%$ . + +Discussions about computational complexity. The main computation of our framework comes from global graph construction which involving kNNs retrieval, yet there already exists many highly efficient nearest neighbour searching algorithms and tools. The default tool we used is Faiss[11], which can perform efficient billion-scale similarity search with GPU. And for testing, we found the overhead of kNNs search is negligible compared to the feature extraction part, our test time is almost identical to the baselines. + +# 5.3. Comparison with state-of-the-arts + +We report the results with the state-of-the-art approaches in Tab. 5 and Tab. 6. To show our superiority, we con + +sider both state-of-the-art consistency-regularization based methods [15, 24, 18, 1, 26, 12, 2] and pseudo-label based methods [23, 10] in Tab. 5 for CIFAR10 and CIFAR100. Among them, ICT [26] and MixMatch [2] both leveraged the Mixup data augmentation strategy [29], which is also used in this work. It can be seen that our method outperforms most state-of-the-art methods on CIFAR10 and CIFAR100 in terms of different numbers of labelled samples. On the more challenging Mini-ImageNet benchmark, our method achieves the best performance and records a new state-of-the-art $55.97\%$ for 4k labelled samples and $47.28\%$ for 10k labelled samples respectively, which beats latest best results [10] by $14.32\%$ and $10.07\%$ . + +# 6. Conclusion + +Although existing SSL methods are based on the common density-based cluster assumption and achieve impressive results, we find three limitations exist: 1) They have not exploited density information explicitly; 2) Neighborhood information is not considered when learning the feature; 3) Existing label propagation scheme can only be done offline and difficult to be end-to-end trained; In this paper, we propose a novel and unified density-aware graph based framework for semi-supervised visual recognition. Specifically, we propose two novel density-aware modules targeting at the two key SSL components respectively, i.e., Density-aware Neighborhood Aggregation and Density-ascending Path-based Label Propagation. These two modules can be jointly trained and work in a complementary way. Experiments demonstrate our superior performance, which beats current state-of-the-art methods by a large margin. + +# Acknowledgement + +This work is supported by the Fundamental Research Funds for the Central Universities (WK2100330002, WK3480000005), National Key Research and Development Program of China(2018YFB0804100). + +# References + +[1] Ben Athiwaratkun, Marc Finzi, Pavel Izmailov, and Andrew Gordon Wilson. There are many consistent explanations of unlabeled data: Why you should average. In International Conference on Learning Representations, 2019. 6, 8 +[2] David Berthelot, Nicholas Carlini, Ian Goodfellow, Nicolas Papernot, Avital Oliver, and Colin Raffel. Mixmatch: A holistic approach to semi-supervised learning. In Advances in Neural Information Processing Systems, 2019. 1, 6, 8 +[3] John S. Bridle, Anthony J. R. Heading, and David J. C. MacKay. Unsupervised classifiers, mutual information and phantom targets'. In Advances in Neural Information Processing Systems, pages 1096-1101, 1992. 3 +[4] Olivier Chapelle and Alexander Zien. Semi-supervised classification by low density separation. In AISTATS, volume 2005, pages 57-64. CiteSeer, 2005. 1 +[5] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248–255. IEEE, 2009. 6 +[6] Yves Grandvalet and Yoshua Bengio. Semi-supervised learning by entropy minimization. In Advances in neural information processing systems, pages 529-536, 2005. 3 +[7] Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Advances in Neural Information Processing Systems, 2017. 3 +[8] Jiangfan Han, Xiaoyi Dong, Ruimao Zhang, Dongdong Chen, Weiming Zhang, Nenghai Yu, Ping Luo, and Xiaogang Wang. Once a man: Towards multi-target attack via learning multi-target adversarial network once. In Proceedings of the IEEE International Conference on Computer Vision, pages 5158-5167, 2019. 4 +[9] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 6 +[10] Ahmet Iscen, Giorgos Tolias, Yannis Avrithis, and Ondrej Chum. Label propagation for deep semi-supervised learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5070-5079, 2019. 1, 2, 3, 6, 8 +[11] Jeff Johnson, Matthijs Douze, and Hervé Jégou. Billionscale similarity search with gpus. arXiv preprint arXiv:1702.08734, 2017. 8 +[12] Zhanghan Ke, Daoye Wang, Qiong Yan, Jimmy Ren, and Rynson WH Lau. Dual student: Breaking the limits of the teacher in semi-supervised learning. In IEEE International Conference on Computer Vision (ICCV), 2019. 8 +[13] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations, 2017. 2, 3 +[14] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. Technical report, Cite-seer, 2009. 6 + +[15] Samuli Laine and Timo Aila. Temporal ensembling for semi-supervised learning. In International Conference On Learning Representations, 2017. 1, 2, 6, 8 +[16] Dong-Hyun Lee. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In Workshop on Challenges in Representation Learning, ICML, volume 3, page 2, 2013. 1, 2 +[17] Suichan Li, Dapeng Chen, Bin Liu, Nenghai Yu, and Rui Zhao. Memory-based neighbourhood embedding for visual recognition. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 2, 3, 4, 7 +[18] Yucen Luo, Jun Zhu, Mengxi Li, Yong Ren, and Bo Zhang. Smooth neighbors on teacher graphs for semi-supervised learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8896-8905, 2018. 2, 8 +[19] Avital Oliver, Augustus Odena, Colin A Raffel, Ekin Dogus Cubuk, and Ian Goodfellow. Realistic evaluation of deep semi-supervised learning algorithms. In Advances in Neural Information Processing Systems, pages 3235-3246, 2018. 6 +[20] Alex Rodriguez and Alessandro Laio. Clustering by fast search and find of density peaks. Science, 344(6191):1492-1496, 2014. 1, 4, 5 +[21] Mohammad Sabokrou, Mohammad Khalooei, and Ehsan Adeli. Self-supervised representation learning via neighborhood-relational encoding. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 4 +[22] Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 20(1):61-80, 2008. 2 +[23] Weiwei Shi, Yihong Gong, Chris Ding, Zhiheng MaXiaoyu Tao, and Nanning Zheng. Transductive semi-supervised deep learning using min-max features. In Proceedings of the European Conference on Computer Vision (ECCV), pages 299-315, 2018. 1, 2, 3, 8 +[24] Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In Advances in neural information processing systems, pages 1195–1204, 2017. 1, 2, 6, 8 +[25] Petar Velicković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph attention networks. In International Conference on Learning Representation, 2018. 3, 4 +[26] Vikas Verma, Alex Lamb, Juho Kannala, Yoshua Bengio, and David Lopez-Paz. Interpolation consistency training for semi-supervised learning. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, 2019. 1, 6, 8 +[27] Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In Advances in neural information processing systems, pages 3630-3638, 2016. 6 +[28] Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In International Conference on Learning Representations, 2019. 3 + +[29] Hongyi Zhang, Moustapha Cisse, Yann N. Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. In International Conference on Learning Representations, 2018. 6, 8 +[30] Hang Zhou, Kejiang Chen, Weiming Zhang, Han Fang, Wenbo Zhou, and Nenghai Yu. Dup-net: Denoiser and upsampler network for 3d adversarial point clouds defense. In Proceedings of the IEEE International Conference on Computer Vision, pages 1961-1970, 2019. 4 +[31] Xiaojin Zhu and Zoubin Ghahramani. Learning from labeled and unlabeled data with label propagation. 2002. 2 +[32] Chengxu Zhuang, Alex Lin Zhai, and Daniel Yamins. Local aggregation for unsupervised learning of visual embeddings. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 4 \ No newline at end of file diff --git a/densityawaregraphfordeepsemisupervisedvisualrecognition/images.zip b/densityawaregraphfordeepsemisupervisedvisualrecognition/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..04fa6f622b10da8e8283bcb287abce94438027b6 --- /dev/null +++ b/densityawaregraphfordeepsemisupervisedvisualrecognition/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e832dee027546e29c58d75061f198dde23949c917daa0c3ea17e07a7c6980d3 +size 380705 diff --git a/densityawaregraphfordeepsemisupervisedvisualrecognition/layout.json b/densityawaregraphfordeepsemisupervisedvisualrecognition/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8abe6aaaea37d21ba46d87f665026ceafb03aec2 --- /dev/null +++ b/densityawaregraphfordeepsemisupervisedvisualrecognition/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a480189c15f88598f92fa80484c7d8be12d894771a212d82f38c3a256c63e3bd +size 383988 diff --git a/densitybasedclusteringfor3dobjectdetectioninpointclouds/5d3c9a62-96b4-473f-b7a0-ca40f7647df8_content_list.json b/densitybasedclusteringfor3dobjectdetectioninpointclouds/5d3c9a62-96b4-473f-b7a0-ca40f7647df8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..cc3f40cde0d80bd6a44e3ba62902ab6014757fd2 --- /dev/null +++ b/densitybasedclusteringfor3dobjectdetectioninpointclouds/5d3c9a62-96b4-473f-b7a0-ca40f7647df8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4517282b64eb456418ae3da5a2988d242cbc883ec9647c67159c26ab001a89c9 +size 73509 diff --git a/densitybasedclusteringfor3dobjectdetectioninpointclouds/5d3c9a62-96b4-473f-b7a0-ca40f7647df8_model.json b/densitybasedclusteringfor3dobjectdetectioninpointclouds/5d3c9a62-96b4-473f-b7a0-ca40f7647df8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..5b79c62f1136c3f9d2b730d2c4e54a921a6def62 --- /dev/null +++ b/densitybasedclusteringfor3dobjectdetectioninpointclouds/5d3c9a62-96b4-473f-b7a0-ca40f7647df8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70c3b3e3eddab16dc2be55cf2356616df27febded70ea59436aa2e67b429df49 +size 87385 diff --git a/densitybasedclusteringfor3dobjectdetectioninpointclouds/5d3c9a62-96b4-473f-b7a0-ca40f7647df8_origin.pdf b/densitybasedclusteringfor3dobjectdetectioninpointclouds/5d3c9a62-96b4-473f-b7a0-ca40f7647df8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..25798b0fcfde8b5a3100e14cb298402408e9c285 --- /dev/null +++ b/densitybasedclusteringfor3dobjectdetectioninpointclouds/5d3c9a62-96b4-473f-b7a0-ca40f7647df8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28c763004ce0f942466900694eb3b4254832ed7a9c866225eba21bba28925475 +size 837279 diff --git a/densitybasedclusteringfor3dobjectdetectioninpointclouds/full.md b/densitybasedclusteringfor3dobjectdetectioninpointclouds/full.md new file mode 100644 index 0000000000000000000000000000000000000000..25f784869ae5e478e2263d0e38e5e49b03de8f83 --- /dev/null +++ b/densitybasedclusteringfor3dobjectdetectioninpointclouds/full.md @@ -0,0 +1,299 @@ +# Density Based Clustering for 3D Object Detection in Point Clouds + +Syeda Mariam Ahmed Chew Chee Meng National University of Singapore + +e0020829@u.nus.edu chewcm@nus.edu.sg + +# Abstract + +Current 3D detection networks either rely on 2D object proposals or try to directly predict bounding box parameters from each point in a scene. While former methods are dependent on performance of 2D detectors, latter approaches are challenging due to the sparsity and occlusion in point clouds, making it difficult to regress accurate parameters. In this work, we introduce a novel approach for 3D object detection that is significant in two main aspects: a) cascaded modular approach that focuses the receptive field of each module on specific points in the point cloud, for improved feature learning and b) a class agnostic instance segmentation module that is initiated using unsupervised clustering. The objective of a cascaded approach is to sequentially minimize the number of points running through the network. While three different modules perform the tasks of background-foreground segmentation, class agnostic instance segmentation and object detection, through individually trained point based networks. We also evaluate bayesian uncertainty in modules, demonstrating the over all level of confidence in our prediction results. Performance of the network is evaluated on the SUN RGB-D benchmark dataset, that demonstrates an improvement as compared to state-of-the-art methods. + +# 1. Introduction + +Despite the recent breakthroughs in 3D object detection, the task of region proposal is heavily dependent on 2D object detectors. Following the conventions of image based detection, candidate 3D proposals are typically generated through sliding windows [35, 16, 31, 4] or by 3D region proposal networks such as [27, 28]. However, the computational complexity of 3D search grows cubically with respect to the resolution and becomes computationally expensive for large scenes or real-time applications. Alternatively, methods that project points to 2D images [3, 35] compromise on geometric and surface properties that may be important in heavily cluttered and occluded environments. + +While few works have attempted to directly learn from + +point features, one of the most successful networks for processing 3D groups of points is PointNet [20, 22] that can be used to perform object detection and semantic segmentation for point clouds. Their initial work for a complete 3D object detection pipeline [19] integrates a 2D region proposal network that generates bounding box proposal from an RGB image and lifts them to a 3D frustum. The pointcloud within the proposed frustum is then segmented using PointNet and is used to regress the amodal bounding box of the object in 3D. While their approach shows improved accuracy, the performance of this method is restricted by the performance of the 2D object detector. + +This approach is recently updated by a 3D network that employs Hough voting to predict probable instances of objects, followed by bounding box detection [18]. While the network directly operates on an input point cloud of 20-40k points, after feature learning, it only samples 1024 points as seeds for voting that generate object locations for unique instances. Since the point density for objects may vary in a point cloud, it is unlikely that smaller or heavily occluded objects are well represented in such a small number of seeds. + +One of the biggest bottlenecks in processing unorganized pointclouds through state-of-the-art networks is the number of points that can be taken as input. This number of points directly affects the size and the computational complexity of the network, impacting the quality of feature learning. Consequently, this paper focuses on an incremental reduction in the size of the pointcloud, achieved through implementation of smaller modules for tasks with varying objectives, where each task outputs a reduced number of points for the subsequent module to process. + +Towards this goal, we introduce a novel cascaded network that proposes individual modules for the following tasks: a) background foreground segmentation and b) class agnostic instance segmentation and c) 3D object detection, as shown in Fig. 1. The proposed network is trained in a modular fashion using PointNet++ [22] as a backbone for segmentation modules, while the segmented clusters are inferred through the recently proposed Edge-Aware PointNet [1] for the task of 3D object detection. + +![](images/7cebbda11dc5330964501a2424810bd5496e894bbee4f2d3f4a75cc947315050.jpg) +Figure 1. Overview of the proposed pipeline for object detection. Given a 3D scene, the point cloud is first segmented into background foreground points. Next, only foreground points are clustered using DBSCAN, an unsupervised density based region growing algorithm. Each point in a cluster is assigned a centroid location that is fine-tuned using the second base network. Output from this module is $K$ clusters that are inferred through Edge-Aware PointNet (EPN) to predict class and regress 3D amodal bounding boxes for each cluster. + +Specifically we make the following contributions: + +- Propose a novel cascaded framework for 3D object detection that can directly achieve class agnostic segmentation of point clouds, followed by amodal bounding box prediction. As opposed to training a network through multi-task learning, we propose to train simpler modules individually and leverage uncertainty predictions to generate confident proposals for the final task. +- The first module performs background foreground segmentation, where the background class consists of walls and floors while foreground consists of all other objects. The objective is to remove all points from the point cloud that may generate false positives in the subsequent tasks. This step automatically reduces the size of the point cloud, without compromising object observability. +- The next module is a novel clustering based instance segmentation module where foreground points from the previous stage are clustered using an unsupervised algorithm, DBSCAN [5]. An encoder-decoder framework jointly predicts instances through regression of offset vector between the proposed cluster centroids and ground truth. Consequently, each point votes for an offset distance that indicates the true location of the instance centroid. +- Finally the last module, Edge-Aware PointNet (EPN) predicts bounding parameters that include size, location and orientation for individual object instances. + +# 2. Related Work + +# 2.1. Instance Segmentation + +Despite concentrated efforts to improve 3D deep learning networks, literature for 3D instance segmentation lags behind its 2D counterpart. The first prominent attempt in this direction was introduction of Similarity Group Proposal Network (SGPN) [32], that generates group proposals of object instances by learning representation in the form of a similarity matrix. Consequently, points that belong to the same instance have similar features in the matrix as opposed to those in different object instances. Another recent approach was 3D Semantic Instance Segmentation (3D-SIS) [9] that employs multi-view RGB images to learn 2D features while backprojecting them on to associated 3D voxels. They leverage 2D feature learning to 3D for the tasks of object detection and instance segmentation. + +Joint Semantic-Instance Segmentation (JSIS) [17] 3D is the only work that addresses panoptic (semantic and instance) segmentation as a joint task for learning from point clouds. Instead of directly processing the complete point cloud, they scan for overlapping 3D windows which are then passed to a point network to predict semantic class labels of the vertices within the window and embedd the vertices into high-dimensional vectors. This is followed by conditional random field for optimization of final results. They define instance segmentation using a push-pull embedding where $L_{\text{pull}}$ attracts embedding towards the centroids, while $L_{\text{push}}$ keeps these centroids away from each other. The regularisation loss $L_{\text{reg}}$ acts as a small force that draws all centroids towards the origin. One of the main issues with this method is the requirement to run the network for all 3D windows generated from the original point cloud. + +Thus this method can become computationally expensive for dense large scale point clouds. + +Inspired by SGPN and JSIS, we address the task of 3D instance segmentation by directly learning from points. However, unlike both methods, we leverage geometric properties of objects in 3D to initiate this task using DBSCAN [5], an unsupervised clustering algorithm. As a result, we start the training of our network with the instance predictions of DBSCAN, while PointNet++ [22] fine-tunes the instances to achieve an improved performance for instance segmentation, while using a shallow network. + +# 2.2. 3D Object Detection + +The three most popular approaches for working with volumetric data are 3D CNNs, 2D multi-view CNNs and point networks. State-of-the-art 3D CNN methods [4, 16, 24, 27, 28, 31, 33] are predominantly volumetric quantization based approaches that are popular because they incorporate the complete point cloud and directly exploit 3D information. Song et al. [28] and Zhou et al. [35] proposed to encode each non-empty voxel with statistical quantities that are derived from points contained within each voxel such as the truncated signed distance or binary encoding [15]. + +Similarly, multi-view CNNs [3, 11, 21, 29, 30] use 2D rendered images of the 3D point cloud, significantly reducing the computational complexity of the network. PointPillars [14] is another method that enables end-to-end learning with only 2D convolutional layers by using a novel encoder that learns features on pillars (vertical columns) of the point cloud to predict 3D oriented boxes for objects. MV3D [3] introduces a multi-view representation for a Li-DAR point cloud by computing a multi-channel feature map in the bird's eye view and the cylindrical coordinates in the frontal view. + +While it is observed that multi-view CNN based recognition [34, 26, 12] is a better approach as the network is trained to recognize 3D objects under occlusion. However, both the bird's view projection and voxelization based methods suffer from information loss due to data quantization, and 3D CNN is both memory and computation inefficient. + +Point based networks were first proposed by [20, 22] that have been used for object classification of full 3D CAD models, semantic segmentation and 3D object detection in scenes [19]. Based on this network, Shi et al [25] proposed PointRCNN, a novel bottom-up point based network which directly generates robust 3D proposals from raw point clouds, which is both efficient and quantization free. The underlying assumption for this network is that the desired objects are naturally well separated, which is true for KITTI dataset but it may not achieve high performance for indoor point clouds due to high level of clutter and occlusion where objects often overlap. + +In this paper we propose to use a cascaded modular approach which allows the flexibility to modify the network architecture for each sub task. As a result, we use PointNet++ for background-foreground and instance segmentation, but Edge-Aware PointNet (EPN) [1] for object detection. EPN integrates PointNet++ with a parallel stream of 2D binary image based convolutional neural network (CNN). The PointNet++ layer of the proposed framework takes as input individual instances of 3D point clouds, while the complimentary CNN layer of the network is provided with 2D binary maps. This approach allows feature learning through the combination of point networks and traditional CNNs, resulting in improved performance. + +# 3. Network Architecture + +We introduce a cascaded modular network that performs background/foreground segmentation followed by class ag- nostic segmentation and 3D object detection, as shown in Figure 1. The primary reason for using multiple cascaded modules for segmentation is a principled reduction of points from the point cloud. This aspect of downsizing the point cloud is critical as the original raw point cloud may contain millions of points while the computational complexity of a point based network is directly affected by the number of points being processed. + +Consequently, we observe that state-of-the-art point based methods [18, 19, 17] typically process 1024-5000 points. Assuming semantic segmentation is directly implemented on the complete point cloud, without foreground-background segmentation, the network can only process $M$ points, as a result fewer points will contribute towards feature learning of each object. Due to the proposed cascaded modules, there is a significant reduction in the size of the point cloud, once background points are dropped from the scene. Thus, the subsequent modules will consist of points that are meaningful for the specific task, resulting in a more focused receptive field. + +# 3.1. Background/Foreground Segmentation + +The segmentation pipeline is initiated with background foreground segmentation, where background consists of walls, floor and ceiling while foreground consists of all other objects. The input point cloud is of size $N \times 6$ , where each point $N$ is associated with a 3D coordinate $\{x,y,z\}$ and RGB $\{R,G,B\}$ values. + +The backbone of segmentation modules is a point based encoder-decoder framework, as proposed by Qi et al [22]. The encoder consists of set abstraction layers (SA) that sample nearest neighboring points from the cloud and learn feature vectors using multi-layered perceptrons (MLPs). The SA layers sub-sample $N_{l + i}$ points from the previous layer $N_{l}$ , where $N_{l + i} \subset N_{l}$ and generate a feature vector for every point in the sub-sampled group. Similarly, the decoder + +![](images/bed811f023fd0f0024f99ce34ae7136f760ca4034a5fb78434da85af19f57c81.jpg) +Figure 2. Details of the instance segmentation module. The module is initialized using initial clusters where each point is associated with a vector $\triangle C_i$ that represents the offset between $C_{i_{DB}}$ and $C_i$ . + +consists of feature propagation layers (FP) that interpolates feature values $f$ of the sub-sampled points $N_{l}$ to $N_{l - i}$ . Interpolation of features from one layer to the next is carried out using the inverse distance weighted average that is defined as [22]: + +$$ +f ^ {(j)} (x) = \frac {\sum_ {i = 1} ^ {k} w _ {i} (x) f _ {i} ^ {(j)}}{\sum_ {i = 1} ^ {k} w _ {i} (x)} \tag {1} +$$ + +where $w_{i}(x) = \frac{1}{d(x,x_{i})^{p}}$ represents the inverse distance weighted average for $k$ nearest neighbors. + +Unlike a sliding window method that is traditionally used to process a complete point cloud [19], we randomly sample $N$ points from the point cloud. While the network processes $N$ points, the original cloud might be much larger, of a size $T \times N$ . To propagate foreground/background semantic labels throughout the point cloud, we propose 'Nearest Neighbor - Upsampling (NN-Ups)', defined as follows. + +$$ +S \left(\hat {y} _ {p}\right) = \arg \max \left\{S \left(y _ {1}\right)... S \left(y _ {k}\right) \right\} \tag {2} +$$ + +where $S(y_{1}), \ldots, S(y_{k})$ are the predicted labels of $k$ nearest neighbors from the points inferred through the network, while $S(\hat{y}_p)$ are points from the original point cloud. Using this approach, we can interpolate semantic labels to the original point cloud. + +# 3.2. Class Agnostic Instance Segmentation + +Once foreground points are obtained, a novel instance segmentation module is introduced, that predicts class ag- nostic instances. To generate individual object instances, direct regression of object centroids is often difficult to converge as there is large variation in object scale, size and density in 3D point clouds. Consequently, we propose to group points into clusters using an unsupervised + +![](images/341a45047e1403a8a84d6b92c0e10456e4824e326d3bcbf9748606d280fcae39.jpg) +Figure 3. Explanation of the concept of density based clustering using DBSCAN. This algorithm is dependent on two parameters, $\epsilon$ that specifies the range of neighborhood for each point and $\mu$ that gives the min number of points that can form a cluster. + +clustering algorithm DBSCAN [5], which results in each point in the cluster being associated with a centroid $C_{i_{DB}}$ for the instance that it belongs to, as shown in Figure 2. Thus the objective of the network is to predict an offset $\triangle C_i = \{\triangle c_{x_i},\triangle c_{y_i},\triangle c_{z_i}\}$ between $C_{i_{DB}}$ and the actual centroid $C_i$ obtained from the ground truth. + +The DBSCAN algorithm is dependent on two parameters, $\epsilon$ that specifies the range of neighborhood for each point and $\mu$ that gives the min number of points that can form a cluster, as shown in Figure 3. The algorithm initially identifies core points in the data, followed by searching for connected components of the core points in the neighbor graph and forming clusters from among these points. Finally, the non-core points are assigned to the nearest cluster if it is an $\epsilon$ neighbor. This approach does not require prior information regarding the number of clusters and is robust to outliers. + +The network architecture uses the same backbone as the foreground/background segmentation module. However the network performs the task of instance regression. The loss function of the network is $L_{ins}$ which is given as: + +$$ +L _ {i n s} = \frac {1}{N} \sum_ {i} ^ {N} \left| \left| \triangle C _ {i} - \triangle C _ {i} ^ {*} \right| \right| \tag {3} +$$ + +where $\triangle C_i$ is the true offset between $C_{iDB}$ and $C_i$ , while $\triangle C_i^*$ is the predicted offset vector for every point $i$ in the point cloud. + +The concept of initial clustering has two fundamental benefits over directly regressing instance centroids, as proposed by Deep Hough Voting [18]. First, the initial clustering of dense point clouds generates a geometry based estimate about objects. This improves sampling of points from the dense point cloud, which will now consider to sample points from all clusters, irrespective of their size and density. Unlike Farthest point sampling algorithm or random sampling, this approach directly ensures that points are being sampled from all important regions that may contain an + +object. + +The second advantage exists in the faster convergence of the training network that is able to predict smaller centroid offsets $\triangle C_i$ with a higher accuracy as opposed to direct regression of centroid locations. This concept is demonstrated in Figure 2 where all points are initially associated with $C_{i_{DB}}$ , shown with red dots, indicating the cluster instance they belong to. Since the ground truth centroid location is $C_i$ , shown with yellow dots, the network is trained to learn the true offset between predicted centroid and true centroid. Once the true instances are predicted, each instance is sampled by the following module to predict amodal bounding boxes and class labels. + +Similar to the previous module, predicted centroids for instances are propagated through all the foreground points using Eqn.(2). + +# 3.3. EPN: Edge-Aware PointNet + +Edge-Aware PointNet (EPN) is a novel deep learning network that we recently proposed [1] for object recognition from 3D point clouds. The architecture of EPN consists of two parallel channels for feature learning, which is an extension to the originally proposed PointNet++ [22]. The novelty of the proposed network is the integration of PointNet++ Feature Extractor and Edge-Aware CNN branch that explicitly uses 3D boundary points as geometric priors to enhance feature learning. + +More formally, the network takes as input a matrix $X \in \mathbb{R}^{N \times 4}$ where $N$ is the fixed number of points randomly sampled from the output of our second module, while the four channels represent Euclidean coordinates and a logical value indicating if the given point is edge or non-edge. The edge detection algorithm used is also based on our previous work [2]. + +The network consists of three main aspects: a) Binary Projection, b) PointNet Feature Extractor and c) ECNN Feature Extractor. The binary projection module uses a mapping function $S$ to convert the 3D matrix $X$ to a series of 2D binary maps [1]. These maps fundamentally represent the geometric shape of the given object, while being low resolution, which prevents the network from being computationally intensive. We use this network as our final module that takes $K$ clusters and predicts class labels and bounding box parameters for each object. + +# 3.4. Loss Function for EPN + +EPN aims to predict object class label and an amodal bounding box through six classification and regression tasks, defined as $\mathbf{y} = \{y_{lc}, y_{ac}, y_{oc}, y_{cen}, y_{\triangle ac}, y_{\triangle oc}\}$ . The classification tasks are $y_{lc}$ which represents label classification, $y_{ac}$ which represents anchor box classification while $y_{oc}$ represents orientation bin classification. Similarly, the regression tasks are $y_{cen}, y_{\triangle ac}, y_{\triangle oc}$ that represent regres + +sion of bounding box centroid and offsets from anchor box and orientation bin. + +We parameterize the 3D bounding box as $BB_{i} = \{x_{i},y_{i},z_{i},l_{i},w_{i},h_{i},\theta_{i}\}$ , where $\{x_i,y_i,z_i\}$ represents the centroid location, $\{l_i,w_i,h_i\}$ are length, width and height of the box, representing its size, and $\theta_{i}$ is the yaw rotation around Z-axis, for a given point cloud instance $i$ . We formulate the bounding box prediction based on [19] where we first pre-define a fixed number of anchor boxes with specific dimensions and then regress the offset of each object from the closest anchor. + +The classification module takes as input the joint feature vector $F = \{F_{PN}, F_{ECNN}\}$ from the PointNet and ECNN branches respectively and are followed through a series of fully connected (FC) and dropout layers. The softmax function is used to generate $C$ class probabilities while the cross-entropy loss function is used for training all classification tasks. + +All regression tasks $\{y_{cen}, y_{\triangle ac}, y_{\triangle oc}\}$ are trained using Huber loss [10], defined as follows. + +$$ +L _ {r} = \left\{ \begin{array}{l l} \frac {1}{2} (y - f (x)) ^ {2} & \text {f o r} | y - f (x) | \leqslant \delta \\ \delta | y - f (x) | - \frac {1}{2} \delta^ {2} & \text {o t h e r w i s e} \end{array} \right. \tag {4} +$$ + +where $y$ is the true value, $f(x)$ is the predicted value from the network and $\delta$ is pre-defined threshold below which the loss becomes quadratic. The combined loss for the EPN network is: + +$$ +\begin{array}{l} L = L _ {c} \left\{\mathrm {l c} \right\} + \lambda_ {1} L _ {c} \left\{\mathrm {a c} \right\} + \lambda_ {2} L _ {c} \left\{\mathrm {o c} \right\} + \lambda_ {3} L _ {r} \left\{\mathrm {c e n} \right\} \\ + \lambda_ {4} L _ {r} \{\triangle a c \} + \lambda_ {5} L _ {r} \{\triangle o c \} \} \tag {5} \\ \end{array} +$$ + +where $\lambda_1, \ldots, \lambda_5$ are variable parameters that describe the weights associated with each task. + +# 3.5. Bayesian Uncertainty Estimation + +Bayesian neural networks replace the deterministic weights with probability distributions over the weights, in a neural network [6]. As a result, the objective is no longer to optimize the weights directly, but to optimize the parameters of the prior distributions. Recently, [7] proposed to compute uncertainty using a Dropout layer, where a prior Bernoulli distribution is placed over weights of the neural network, which when performed during inference, can be used to compute uncertainty in prediction. + +In the proposed network, all PointNet++ modules consist of at least a single Dropout layer, which is used to compute variance for the respective module. This variance in the cloud is used to filter out points associated with uncertain decisions and improve overall prediction accuracy. + +![](images/8df30085b81f30810265735d2ec47261e34aaea010acdd0ded7fba9170d5d193.jpg) + +![](images/6349aa61b35d263d496efe364c80c47a88ab76d238c37daef13f46fb15fa4811.jpg) + +![](images/7d2df58c737ff0715a5e79f7d232312617bfdcfe36e72bb684934b1f0e18535d.jpg) + +![](images/95c2100bb387ea04fce4aee69bf70af6145b4eaeeefebc21faaea575e8cf0d48.jpg) +Figure 4. Precision recall curve for background-foreground segmentation under varying Bayesian Mean threshold. The graphs show that precision and recall values increase when a lower Bayesian Mean threshold is selected to filter out non-decisive point predictions. Consequently, the uncertainty map on the bottom-right image shows that points with higher uncertainty (light colored points) belong to the background class, indicating the erroneous labelling for this class. + +![](images/a79707cf99ad19a4a08caf2036613137441fbe093ae0d48ef6bf52943b3bc397.jpg) + +# 4. Experimental Results + +# 4.1. Implementation Details + +Our network operates on dense indoor pointclouds from the SUN-RGBD dataset that contains above 100k points per scene. The first segmentation module samples 10K points from the point cloud, followed by instance segmentation that samples 5k while the number points sampled by EPN from each of the $S$ object proposals are 1024. The points are randomly sampled on-the-fly while if a point cloud has fewer points, the same points are repeated to achieve the designated number. The backbone network PointNet++ consists of four set abstraction (SA) layers and four feature propagation (FP) layers, for both segmentation modules. The SA layers use a variable radius of $0.1 - 0.8$ for sampling the nearest neighbors. The four FP layers sample the points back to the original number, with 256 dimensions in the first two layers followed by 128 dimensional features. This is followed by two fully connected layers (FC) with a dropout layer of $p = 0.5$ . The PointNet branch in EPN consists of three SA layers where the first two layers perform multi-scale grouping to sub-sample $N = \{512, 128\}$ points with $k = \{64, 64\}$ nearest neighbours, using a radius based search of radius $\{0.2, 0.4\}$ . Each SA layer is followed by PointNet layer with MLP of sizes $\{64, 64, 128\}$ , $\{128, 128, 256\}$ . The last SA layer does not perform sub sampling but accumulates all feature maps, followed by an MLP of size $\{256, 512, 1024\}$ . + +The ECNN branch of the network trains in parallel to the PointNet branch with two CNN layers. The dimensions of + +
ClassAcc
Foreground75.8
Background75.9
mAcc75.8
BM79.1
+ +Table 1. Mean accuracy for background foreground segmentation on the SUN-RGBD dataset. + +the convolutional filters for the two layers are $f = \{64, 128\}$ while the kernel size for convolutions are $k = \{5, 5\}$ . Each 2D CNN layer is followed by a max pooling layer with a kernel size of $k = \{2, 2\}$ and a stride of 2. After the second max pooling layer, the feature maps are converted to a vector following through two fully connected layers of size $\{2048, 1024\}$ where each FC layer is followed by a dropout layer with dropout probability of 0.5. + +# 4.2. Evaluation and Comparison + +We evaluate all three modules on the SUN-RGBD dataset. The first module segments background and foreground from the point clouds. The ground truth is generated using centroids of objects and finding all points within the bounding box, that are labelled as foreground. All the remaining points are labelled as background. The evaluation metric for this segmentation is mean class accuracy (mAcc) and Bayesian Mean (BM). BM is defined as mAcc over points that have low Bayesian variance, evaluated as: + +$$ +V a r (y) = \frac {1}{T} \sum_ {t = 1} ^ {T} f ^ {\tilde {w} _ {i}} (x) f ^ {\tilde {w} _ {i}} \left(x _ {t}\right) - E (y) ^ {T} E (y) \tag {6} +$$ + +BM filters out points that have $\operatorname{Var} > \lambda$ , where $\lambda$ is the threshold that decides the cutoff threshold for discarding points. + +Figures 4, 5 show details of ground truth and prediction from the first segmentation module. It can be seen from the figures that labelling is slightly erroneous. However, using Bayesian uncertainty estimates, incorrect points can be identified with higher variance and can thus be ignored in the final prediction. As a result, instance segmentation only processes points with $\mathrm{Var} < \lambda$ where $\lambda = 0.2$ . The results for this segmentation are tabulated in Table 1 that shows that Bayesian Mean results in an improved accuracy in the overall segmentation task. + +To evaluate results for instance segmentation, we use the standard $AP^r$ [8], which computes the mean average precision (mAP) under different Intersection over Union (IoU) scores between the predicted and ground truth segmentation (in place of IoU between bounding boxes). This module generates an offset $\triangle C_i = \{\triangle c_{x_i},\triangle c_{y_i},\triangle c_{z_i}\}$ between $C_{iDB}$ , the cluster centroids predicted by DBSCAN clustering, and the actual centroid $C_i$ obtained from the ground truth. Once the new centroids are predicted, they are clustered using a distance based method that combines centroids + +![](images/40db72e1d0cf143ec730bae6fb201658043f10e7658efc951b1480a91ff09f23.jpg) + +![](images/7203d1f8fa2d9bd1eb0de41428df883fc7c6720d1b3e79b6b2da8b81a7c58fde.jpg) + +![](images/d9766dbced983fda332dab96641bd8321bb47fa5b52e264f8a411edd56552efe.jpg) +Input +Ground truth Background/Foreground Segmentation + +![](images/96cbf38469395ecff2fd702019676fcdf92b62195c55ef4c67caefea50cbb73c.jpg) + +![](images/13b745a01c028ab51aad1ed9c7063d7cacd5d7e7a9622dc096b8e4d455a40a66.jpg) + +![](images/6caed51afc45213c3a37cb04f697609b8382116f597b2f13a2224240d3e156d5.jpg) +Predicted Background/Foreground Segmentation + +![](images/1e3ef34340a923a1872ebb02d3d3c52fdcaa9b0a2ca03cc423b2cf988c8765a7.jpg) + +![](images/cd6c3d8811a8c28a54b1ca382fba4a86b698b56ee0ebd5b48de083623579f62d.jpg) + +![](images/8e62b1ce525ef0441717040252cfe375dc530c628eb70d957b39eeacd510aca2.jpg) + +![](images/d8b380cbcfd5e6510e28be423675c339f398c8193096dd58d59a294d8b6c347b.jpg) + +![](images/31c0982281a19f9a360930c6137cc8c11f7c15dcaaea41fe6f75dfa35ccb8c84.jpg) + +![](images/f87bc77d537232d6d36fbf72608829c967100d4bc525c94c6bdc302578c4b9b6.jpg) +Uncertainty Prediction +Figure 5. From left to right: Original point cloud, ground truth segmentation, predicted segmentation and uncertainty map. The figures show examples of the module and uncertainty prediction that removes points with high variance, thus achieving improved segmentation results. For predicted uncertainty, a darker color represents minimal variance while lighter colors indicate high variance. + +
MetricBathtubBedBookshelfChairDeskDresserNightstandSofaTableToilet
mAP/0.2568.7153.5559.3424.5831.0464.1738.9152.4644.1393.48
mAP/0.3569.3254.2860.1224.5931.3964.4938.9252.9944.3293.67
mAP/0.4569.3854.8360.4224.6731.7664.7138.1753.7344.7793.86
mAP/0.5568.9056.2061.2324.9132.5665.1538.6054.5845.8993.96
mAP/0.9583.2964.3968.8422.5738.0168.1136.2364.1554.7791.94
+ +Table 2. 3D instance segmentation on scans from SUN-RGBD. We evaluate mAP for varying $\epsilon$ ,with IoU@0.25 threshold over 10 classes. + +that are within a specified range, defined by $\epsilon$ . Table 2 shows instance segmentation results for varying $\epsilon$ . It can be seen that with higher $\epsilon$ , mAP for larger objects increases significantly as compared to lower $\epsilon$ . + +While this module is able to achieve accurate results for larger objects, with higher $\epsilon$ , it is observed that smaller objects like chairs and nightstand have a significantly lower mAP. These results are also verified by Figure 6 where we can see that smaller clusters of chairs are often confused to be part of the table. It is also observed that the DBSCAN algorithm discards disconnected components of same object as noise which often results in an incomplete object at the output. We hypothesize that these issues can be resolved by considering a larger number of points (currently this module processes 5000 points), so that a higher density of objects will reduce objects being labelled as noise. + +We evaluate bayesian uncertainty for the instance segmentation over 10 trials. However, this variance does not + +measure beyond 0.02 which is not significant enough to bring an impact in the overall results. Consequently, the main impact of uncertainty estimation comes from the first segmentation module. The instances predicted by the instance segmentation module serves as input for EPN, where we use $\epsilon = 0.95$ . In addition, we concatenate the original points with predicted instances to determine $K$ clusters, where $K = 15$ . The results for this network are tabulated in Table 3 where EPN is able to achieve mAP comparable with the state-of-the-art methods. While there is significant improvement in some categories, the particular poor performance for the category chair is a reflection of the issues identified in the instance segmentation module. Another factor that impacts the chair category is the fixed number of proposals $K = 15$ , while many scenes consist of up to 35 - 40 instances of chairs. This restriction comes from the GTX 1070 GPU that we use, due to which many clusters are not processed by the network. Thus our results show + +
bathtubbedbookshelfchairdeskdressernightstandsofatabletoiletmAP
DSS [28]44.278.811.961.220.56.415.453.550.378.942.1
COG [23]58.363.731.862.245.215.527.451.051.370.147.6
2D-driven [13]43.564.531.448.327.925.941.950.437.080.445.1
FPN [19]43.381.133.364.224.732.058.161.151.190.954.0
VoteNet [18]74.483.028.875.322.029.862.264.047.390.157.7
Ours (λ=10)79.488.232.117.037.453.750.065.353.395.857.2
Multi-Scale EPN (standalone)72.090.562.266.943.747.062.662.347.294.664.9
+ +Table 3. Average precision for 3D amodal object detection, with IoU threshold 0.25, compared with state-of-the-art algorithms on the SUN-RGBD test dataset. + +![](images/0065fa7737a86321cd945f4c2b54c7313159d49d317acced293880b1a4848d79.jpg) +Figure 6. Qualitative results for class agnostic instance segmentation module. We observe that smaller objects, like chairs, are often incorrectly merged with larger objects, like table, that results in the significantly poor performance. + +that accurate ROI generation and reducing the number of points are still critical factors that limit the performance of 3D object detectors. + +# 4.3. Multi-Scale EPN + +Since the parameter $\lambda$ directly affects EPNs performance, we evaluate a Multi-scale EPN that combines the output from different scales and concatenates the binary maps at the input. However, for this experiment, we use ideal clusters that are directly generated using ground truth. Thus the objective is to evaluate multi-scale EPN as a standalone module and determine the effect it has on prediction accuracy. Consequently, the input tensor for the ECNN branch of the network is now defined as $X\rightarrow \mathbb{R}^{M\times M\times S_{\lambda}\times 3}$ where $M$ is the resolution of a 2D binary map and $S_{\lambda}$ defines the number of different scales used. Thus, the mapping generated by different $\lambda$ is concatenated, while the rest of the architecture remains the same. + +The results of this experiment are tabulated in Table 3, + +where $\lambda = \{5,8,10\}$ . Our results show a performance improvement in the categories of bed, bookshelf, chair, desk and night stand of $\{2.3\%, 30.1\%, 49.9\%, 6.3\%, 12.6\% \}$ , while achieving comparable AP for all other categories. The results of this experiment shows that with correctly clustered objects, EPN can achieve a much higher detection accuracy. + +# 4.4. Execution Time + +The training of every individual module took almost 48 hours on a single GTX 1070 GPU. Inference time for the background foreground segmentation and instance segmentation module took an average of 0.58 and 0.45 seconds for a single point cloud of size $10000 \times 3$ and $5000 \times 3$ respectively. Inference for the EPN network takes 0.21 secs for 15 proposals (belonging to the same scene), with 1024 points and a $32x32x3$ binary image per object proposal. Overall the network takes 1.24 secs for inference on a single point cloud. While the inference time is much larger as compared to Frustum PointNet [19] and VoteNet [18], which take 0.09 and 0.1 secs respectively, a direct comparison is difficult as we use GTX 1070 while the authors in [18, 19] use GTX 1080. + +# 5. Conclusion + +In this paper we propose a cascaded framework of multiple deep networks that perform clustering based instance segmentation followed by 3D amodal object detection. Given that point based networks are limited by the number of points they can process, we propose a modular approach with a primary objective of filtering out irrelevant points so that the subsequent module focuses the receptive field on the desired objects. With this approach we propose a segmentation module that distinguishes foreground from background. This is followed by class agnostic instance segmentation that is initiated by an unsupervised clustering algorithm, learning to predict the offset of each point from the actual centroid to the proposed centroid. Finally all proposals are evaluated using the EPN module for predicting amodal object bounding boxes. We show how uncertainty estimates in the background/foreground segmentation results in improved accuracy for the task. Our results also show that the proposed approach achieves comparable results to the state-of-the-art on the SUN-RGBD dataset. + +# References + +[1] S. M. Ahmed and C. M. Chew. Epn: Edge-aware point-net for object recognition from multi-view 2.5d point clouds. In 2019 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2019. +[2] S. M. Ahmed, Y. Z. Tan, C. M. Chew, A. Al Mamun, and F. S. Wong. Edge and corner detection for unorganized 3d point clouds with application to robotic welding. In 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 7350-7355. IEEE, 2018. +[3] X. Chen, H. Ma, J. Wan, B. Li, and T. Xia. Multi-view 3d object detection network for autonomous driving. In IEEE CVPR, volume 1, page 3, 2017. +[4] M. Engelcke, D. Rao, D. Z. Wang, C. H. Tong, and I. Posner. Vote3deep: Fast object detection in 3d point clouds using efficient convolutional neural networks. In Robotics and Automation (ICRA), 2017 IEEE International Conference on, pages 1355-1361. IEEE, 2017. +[5] M. Ester, H.-P. Kriegel, J. Sander, X. Xu, et al. A density-based algorithm for discovering clusters in large spatial databases with noise. In Kdd, volume 96, pages 226-231, 1996. +[6] Y. Gal. Uncertainty in Deep Learning. PhD thesis, University of Cambridge, 2016. +[7] Y. Gal and Z. Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In international conference on machine learning, pages 1050-1059, 2016. +[8] B. Hariharan, P. Arbeláez, R. Girshick, and J. Malik. Simultaneous detection and segmentation. In European Conference on Computer Vision, pages 297-312. Springer, 2014. +[9] J. Hou, A. Dai, and M. Nießner. 3d-sis: 3d semantic instance segmentation of rgb-d scans. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4421-4430, 2019. +[10] P. J. Huber. Robust estimation of a location parameter. In Breakthroughs in statistics, pages 492-518. Springer, 1992. +[11] A. Kanezaki, Y. Matsushita, and Y. Nishida. Rotationnet: Joint object categorization and pose estimation using multiviews from unsupervised viewpoints. In Proceedings of IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2018. +[12] J. Ku, M. Mozifian, J. Lee, A. Harakeh, and S. L. Waslander. Joint 3d proposal generation and object detection from view aggregation. In 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 1-8. IEEE, 2018. +[13] J. Lahoud and B. Ghanem. 2d-driven 3d object detection in rgb-d images. In Computer Vision (ICCV), 2017 IEEE International Conference on, pages 4632-4640. IEEE, 2017. +[14] A. H. Lang, S. Vora, H. Caesar, L. Zhou, J. Yang, and O. Bei-jbom. Pointpillars: Fast encoders for object detection from point clouds. arXiv preprint arXiv:1812.05784, 2018. +[15] B. Li. 3d fully convolutional network for vehicle detection in point cloud. In 2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 1513-1518. IEEE, 2017. + +[16] D. Maturana and S. Scherer. Voxnet: A 3d convolutional neural network for real-time object recognition. In Intelligent Robots and Systems (IROS), 2015 IEEE/RSJ International Conference on, pages 922-928. IEEE, 2015. +[17] Q.-H. Pham, D. T. Nguyen, B.-S. Hua, G. Roig, and S.-K. Yeung. Jsis3d: Joint semantic-instance segmentation of 3d point clouds with multi-task pointwise networks and multi-value conditional random fields. arXiv preprint arXiv:1904.00699, 2019. +[18] C. R. Qi, O. Litany, K. He, and L. J. Guibas. Deep hough voting for 3d object detection in point clouds. arXiv preprint arXiv:1904.09664, 2019. +[19] C. R. Qi, W. Liu, C. Wu, H. Su, and L. J. Guibas. Frustum pointnets for 3d object detection from rgb-d data. arXiv preprint arXiv:1711.08488, 2017. +[20] C. R. Qi, H. Su, K. Mo, and L. J. Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. Proc. Computer Vision and Pattern Recognition (CVPR), IEEE, 1(2):4, 2017. +[21] C. R. Qi, H. Su, M. Nießner, A. Dai, M. Yan, and L. J. Guibas. Volumetric and multi-view cnns for object classification on 3d data. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5648-5656, 2016. +[22] C. R. Qi, L. Yi, H. Su, and L. J. Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In Advances in Neural Information Processing Systems, pages 5099-5108, 2017. +[23] Z. Ren and E. B. Sudderth. Three-dimensional object detection and layout prediction using clouds of oriented gradients. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1525-1533, 2016. +[24] G. Riegler, A. O. Ulusoy, and A. Geiger. Octnet: Learning deep 3d representations at high resolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, volume 3, 2017. +[25] S. Shi, X. Wang, and H. Li. Pointrcnn: 3d object proposal generation and detection from point cloud. arXiv preprint arXiv:1812.04244, 2018. +[26] M. Simon, S. Milz, K. Amende, and H.-M. Gross. Complex-yolo: An euler-region-proposal for real-time 3d object detection on point clouds. In European Conference on Computer Vision, pages 197-209. Springer, 2018. +[27] S. Song and J. Xiao. Sliding shapes for 3d object detection in depth images. In European conference on computer vision, pages 634-651. Springer, 2014. +[28] S. Song and J. Xiao. Deep sliding shapes for amodal 3d object detection in rgb-d images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 808-816, 2016. +[29] H. Su, S. Maji, E. Kalogerakis, and E. Learned-Miller. Multiview convolutional neural networks for 3d shape recognition. In Proceedings of the IEEE international conference on computer vision, pages 945-953, 2015. +[30] H. Su, C. R. Qi, Y. Li, and L. J. Guibas. Render for cnn: Viewpoint estimation in images using cnns trained with rendered 3d model views. In Proceedings of the IEEE Inter- + +national Conference on Computer Vision, pages 2686-2694, 2015. +[31] D. Z. Wang and I. Posner. Voting for voting in online point cloud object detection. In Robotics: Science and Systems, volume 1, 2015. +[32] W. Wang, R. Yu, Q. Huang, and U. Neumann. Sgpn: Similarity group proposal network for 3d point cloud instance segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2569-2578, 2018. +[33] Z. Wu, S. Song, A. Khosla, F. Yu, L. Zhang, X. Tang, and J. Xiao. 3d shapenets: A deep representation for volumetric shapes. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1912-1920, 2015. +[34] B. Yang, W. Luo, and R. Urtasun. Pixor: Real-time 3d object detection from point clouds. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7652-7660, 2018. +[35] Y. Zhou and O. Tuzel. Voxelnet: End-to-end learning for point cloud based 3d object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4490-4499, 2018. \ No newline at end of file diff --git a/densitybasedclusteringfor3dobjectdetectioninpointclouds/images.zip b/densitybasedclusteringfor3dobjectdetectioninpointclouds/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..d76cbe2cefc1ac6effff7628dfc3cff971834b3d --- /dev/null +++ b/densitybasedclusteringfor3dobjectdetectioninpointclouds/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7330f147dcce5d867ab7cff7696fc3b6527e361979db8ec669eea576f8a6e4c1 +size 480250 diff --git a/densitybasedclusteringfor3dobjectdetectioninpointclouds/layout.json b/densitybasedclusteringfor3dobjectdetectioninpointclouds/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..639a527e7ae99e296ec1045037d0bad61e6c5fd2 --- /dev/null +++ b/densitybasedclusteringfor3dobjectdetectioninpointclouds/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c882c40e3ee0469825daaf41d1d67b5ceac478b396fb82bae44091804d1f687e +size 376041 diff --git a/depthsensingbeyondlidarrange/a66fedaf-ddc6-4880-94d8-dbcef385bd75_content_list.json b/depthsensingbeyondlidarrange/a66fedaf-ddc6-4880-94d8-dbcef385bd75_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..fc708583a3faa08c7ec3b00833459d05da48a04d --- /dev/null +++ b/depthsensingbeyondlidarrange/a66fedaf-ddc6-4880-94d8-dbcef385bd75_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2307c55020d2e90f663be8157c71ae9b13cbb763ced1655b2240be9f1cdccd9 +size 77280 diff --git a/depthsensingbeyondlidarrange/a66fedaf-ddc6-4880-94d8-dbcef385bd75_model.json b/depthsensingbeyondlidarrange/a66fedaf-ddc6-4880-94d8-dbcef385bd75_model.json new file mode 100644 index 0000000000000000000000000000000000000000..9108ea29e958beb6bb7e0b5d6547f933b091cbd5 --- /dev/null +++ b/depthsensingbeyondlidarrange/a66fedaf-ddc6-4880-94d8-dbcef385bd75_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58936bd5cfbdf181273c1623abc62e3c4bb86648518c0eb46106cb5867ce1469 +size 94534 diff --git a/depthsensingbeyondlidarrange/a66fedaf-ddc6-4880-94d8-dbcef385bd75_origin.pdf b/depthsensingbeyondlidarrange/a66fedaf-ddc6-4880-94d8-dbcef385bd75_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..180d5423ee069e6d7c620a3010bdf4c6179b3be4 --- /dev/null +++ b/depthsensingbeyondlidarrange/a66fedaf-ddc6-4880-94d8-dbcef385bd75_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:678b092083cbd224102708893b76106d14e212a62d89256c26b806cb53801b03 +size 1431760 diff --git a/depthsensingbeyondlidarrange/full.md b/depthsensingbeyondlidarrange/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b56c32fff10c9f8d2ea76db460d7a51830446617 --- /dev/null +++ b/depthsensingbeyondlidarrange/full.md @@ -0,0 +1,373 @@ +# Depth Sensing Beyond LiDAR Range + +Kai Zhang1 Jiaxin Xie2 Noah Snavely1 Qifeng Chen2 +1Cornell Tech, Cornell University 2HKUST + +# Abstract + +Depth sensing is a critical component of autonomous driving technologies, but today's LiDAR- or stereo camera-based solutions have limited range. We seek to increase the maximum range of self-driving vehicles' depth perception modules for the sake of better safety. To that end, we propose a novel three-camera system that utilizes small field of view cameras. Our system, along with our novel algorithm for computing metric depth, does not require full pre-calibration and can output dense depth maps with practically acceptable accuracy for scenes and objects at long distances not well covered by most commercial LiDARs. + +# 1. Introduction + +Depth perception is crucial in autonomous driving for obstacle avoidance, route planning, etc. Existing depth-sensing solutions typically rely on LiDAR, stereo cameras, or time-of-flight sensors [2, 7, 9]. To the best of our knowledge, these systems have significant limits on their maximum ranges. For instance, the recent Waymo [2] and nuScenes [7] self-driving car datasets both feature LiDAR ranges of $\sim 80$ meters, while the stereo cameras in KITTI [9] cannot see distant objects in detail because of their wide field of view (FOV) (about $80^{\circ}$ ).1 It takes just 3 seconds for a vehicle to travel 80 meters at a speed of 60 miles/h, which is too short a time window in unforeseen emergency situations. While some high-end LiDARs claim to reach a maximum of 300 meters, e.g., Velodyne's Alpha PuckTM [1], these are not only expensive but also produce very sparse point clouds for distant objects due to power and cost constraints. Such limited range can become a critical issue when a self-driving vehicle is a heavily weighted truck, or moving at high speed. The earlier an autonomous vehicle perceives the depth of obstacles on its driving route, the safer the technology is, as an early defensive response can be made in case of emergency. + +Hence, there is a need for dense, accurate depth perception beyond the LiDAR range. In this work, we seek longer-range dense depth sensing beyond the 200 meter range, + +which is not well covered by most existing commercial LiDARs for autonomous driving. To that end, we propose a cost-effective solution that utilizes three cameras with small fields of view. Equipped with telephoto lenses, these cameras can perceive faraway scenes or objects. Our novel three-camera setup can resolve geometric ambiguities that arise in stereo systems based on only two small-FOV cameras. For small-FOV stereo cameras, such ambiguities are caused by (1) a small baseline/depth ratio, (2) difficulty in calibrating small-FOV cameras, and (3) maintaining the calibration during usage. Surprisingly, we can solve these problems by adding a specific third camera, without requiring a fully accurate calibration of camera parameters, by using a novel depth disambiguation algorithm. Our proposed three-camera system, along with our depth estimation algorithm, can produce dense depth maps without the need to fully pre-calibrate camera intrinsics and extrinsics. Moreover, it is robust to small vibrations in camera orientations that are inevitable for cameras attached to moving vehicles. We demonstrate the effectiveness of our approach with both synthetic and real-world data. Experiments show that our method can achieve a $3\%$ relative error at a distance of 300 meters in terms of depth estimation accuracy. + +In summary, our contributions are three-fold. First, to our knowledge, our approach is the first to address the problem of dense depth map acquisition at a range beyond that of most LiDARs in the domain of autonomous driving. Second, we propose a novel camera setup and depth estimation algorithm that requires only partial camera calibration. Third, we validate the effectiveness of our long-range depth-sensing system on both synthetic and real-world data. + +# 2. Problem setup and related work + +In this section, we formulate our problem setup, review prior work, and analyze the applicability of relevant existing algorithms to our problem. + +For depth estimation at a distance over 200 meters, one seemingly straightforward solution is to construct a stereo + +camera system with two small-FOV cameras and attach it to the vehicle. However, there are several challenges with such a setup that distinguish it from typical stereo camera setups: + +- Because the baseline is restricted by the vehicle width (e.g., 2 meters), the baseline/depth ratio is very small in our problem setup, leading to a narrow triangulation angle for estimating 3D points from image correspondences. Hence the geometric setting of this problem is particularly ill-conditioned. +- Unlike cameras with standard FOVs, small-FOV cameras are near-orthographic when a scene's depth variation is much smaller than its average depth. The absence of strong perspective effects can lead to problems when using standard checkerboard-based calibration of intrinsic and extrinsic stereo camera parameters [27]. +- The reduced FOV increases the system's sensitivity to vibrations. A small perturbation in orientation will lead to a noticeable change in image content. Such vibrations are difficult to avoid in real-world moving-vehicle scenarios, even if the stereo camera is rigidly mounted. + +A practical solution to long-range depth estimation with small-FOV cameras must address these challenges. Note that our problem setup also shares similarities with those explored in areas including structure from motion (SfM), structure from small motion (SfSM), and uncalibrated stereo rectification and calibration of cameras with telephoto lenses. + +SfM. SfM algorithms aim to automatically recover camera poses from image collections [21, 22, 3, 19]. The minimal case is two-view SfM, which is also an important component of multi-view SfM [5]. Two-view SfM often works through the decomposition of an essential matrix obtained from intrinsically-calibrated images [17], followed by bundle adjustment [24]. However, essential matrix estimation is challenging in our case due to its ill-conditioned geometric setup. Another key issue is the bas-relief ambiguity [23, 6] present in SfM when the baseline/depth ratio is small and the camera is near-orthographic. The bas-relief ambiguity can cause unwanted distortions of the reconstructed scene, leading to large depth estimation errors for distant objects. + +SfSM. Structure from small motion refers to the SfM problem under small camera motion. Previous work [26, 16, 10, 15] reconstructs scene geometry from video clips with accidental motion caused by handshake. These methods exploit multi-view redundancies in video clips to overcome the high depth uncertainty arising from the small baseline/depth ratio. However, SfSM requires a video clip as input for the sake of abundant redundant observations, which is not suitable for autonomous driving due to the real-time constraint, as well as the presence of moving objects such as vehicles and pedestrians. Moreover, Ha et al. [11] observe that SfSM is + +![](images/07b24de4bd2dd1fb6a02fd98a9a7e491ae66a01ac68e79c9919a5698c90fb5e9.jpg) +Figure 1: Top-down view of our proposed camera setup. The back camera can be positioned slightly higher than the left and right ones so that its view is not obscured. $C_{lr}$ , $C_{lb} \approx 2\mathrm{m}$ . + +also vulnerable to the bas-relief ambiguity, and try to reduce this ambiguity with a separate rotation estimation step. But they assume pre-calibration of camera intrinsics, which is not trivial for small-FOV cameras. In addition, the errors in their estimated rotations are relatively large, considering the tiny triangulation angles involved, yielding inaccurate depth estimates for distant scenes. + +Uncalibrated stereo rectification. Stereo cameras are often pre-calibrated before deployment, allowing for online rectification using calibrated intrinsics and poses. The case when such calibration is unavailable has also been studied, e.g., by Loop and Zhang [18], and Hartley [13]. However, their methods assume that the fundamental matrix is known. As with two-view SfM, such methods will be brittle in the face of the ill-conditioned fundamental matrix estimation problem and the inherent bas-relief ambiguity. + +Calibration of cameras with telephoto lenses. Huang et al. [14] equip a pan-tilt camera with a telephoto lens to capture biometric features over a long range. They demonstrate the degeneracy of calibrating a long-focal-length camera with the 2D-2D correspondences from a checkerboard because the perspective effect is weak. They also show that 2D-3D correspondences are essential for calibrating such a camera. Our proposed approach, however, does not require full calibration of camera intrinsics and is more practically convenient. We only need to know the focal length, which can be read out from the lens's specification sheet. + +# 3. Method + +Our approach has two major components: the camera setup and the accompanying depth estimation algorithm. Details of both components are provided below. + +Our camera setup requires three small-FOV cameras, placed according to Fig. 1. Two of the cameras form a left-right stereo pair, while a third is placed in the back of these two. The left and right cameras are mounted to a vehicle's front, with the back camera on the vehicle's tail. Each camera faces forward along the driving direction. We assume that the three cameras' focal lengths $f$ are the same and known. Furthermore, the distance between the optical centers of the + +# Algorithm 1: Depth Estimation + +Input :left,right,back images; $f,C_{lr},C_{lb}$ + +Output: depth map for left view + +1 Pseudo-rectify left, right images +2 Estimate disparity +3 Remove ambiguity in the estimated disparity map +4 Convert disparity to depth, and return + +left and right cameras, denoted $C_{lr}$ , is assumed to be known, as well as the distance between left and back cameras $C_{lb}$ along the $z$ -axis. No additional information is required. Like the baseline $C_{lr}$ , the distance $C_{lb}$ should also be as large as possible to benefit subsequent processing. In practice, $C_{lr}$ and $C_{lb}$ are limited by vehicle size. + +Our depth estimation algorithm takes the three images captured by our camera system as input and outputs a dense depth map for the left view. Our algorithm, detailed in Algo. 1, is comprised of three modules: pseudorecification, stereo matching, and ambiguity removal. The pseudo-rectification step transforms the left and right images with affine warps so that they form a pseudo-stereo pair. After pseudo-rectification, a standard stereo matching algorithm can be used to compute a disparity map. This disparity map, however, has an unknown constant offset as a result of pseudo-rectification. This ambiguity is resolved with the help of the back image, and the ambiguity-free disparity map is finally converted to a depth map. + +Step 1: Pseudo-rectification. Standard stereo rectification utilizes the intrinsics and relative poses of two cameras to warp the left and right images with homographies such that the epipolar lines are aligned with image $x$ -axis. Pure 2D methods assuming a known fundamental matrix have also been proposed, e.g., by Loop and Zhang [18]. However, in our problem setup, neither the full intrinsics and relative pose are known accurately, nor can the fundamental matrix be reliably estimated in the case of a small baseline/depth ratio. We propose a pseudo-rectification procedure based upon the observation stated in Prop. 1. Our algorithm approximately rectifies the two images with estimated affine transformations, and only depends on the left and right images. + +Proposition 1. When a small-FOV camera is rotated by a small amount, the homography warping the original image to the rotated view is approximately an affine transformation. + +Proof. Let the 3D rotation be $\mathbf{R} = \mathbf{R}_z(\alpha)\mathbf{R}_y(\beta)\mathbf{R}_x(\gamma)$ where $\alpha, \beta, \gamma$ are Euler angles. Our proof strategy is to show that the three component-wise rotations all result in approximately affine transformations. First, the homography representing $\mathbf{R}_z(\alpha)$ is always affine. Now let's consider $\mathbf{R}_x(\gamma)$ . Let $(x,y,z)$ be a 3D point in the camera coordinate frame, and denote $\frac{y}{z} = \tan \theta$ , where $\theta$ is the angle between the + +# Algorithm 2: Pseudo-rectification + +Input :left and right images + +Output:pseudo-rectified left and right images + +1 Initialize $\mathbf{H}^{(l)} = \mathbf{H}^{(r)} = [\mathbf{I}_{2\times 2},\mathbf{0}_{2\times 1}]$ +2 Detect matches between left and right images +3 for $t = 1:T$ do + +4 | Randomly sample $M$ matches + +5 Solve for candidate $\mathbf{H}_{21}^{(l)},\mathbf{H}_{22}^{(l)},\mathbf{H}_{21}^{(r)},\mathbf{H}_{22}^{(r)},\mathbf{H}_{23}^{(r)}$ +6 If # inliers increases, update the matrix entries + +# 7 end + +8 Update $\mathbf{H}_{11}^{(l)},\mathbf{H}_{12}^{(l)},\mathbf{H}_{11}^{(r)},\mathbf{H}_{12}^{(r)}$ by enforcing the norm and determinant constraints +9 Update $\mathbf{H}_{13}^{(r)}$ by imposing the disparity constraint +10 Warp left and right images by $\mathbf{H}^{(l)},\mathbf{H}^{(r)}$ , respectively + +$z$ -axis and the vector $(0, y, z)$ . Suppose $(x, y, z)$ becomes $(x', y', z')$ after $\mathbf{R}_x(\gamma)$ is applied. We then have + +$$ +x ^ {\prime} = x, \frac {y ^ {\prime}}{z ^ {\prime}} = \tan (\theta - \gamma), z ^ {\prime} = z \frac {\cos (\theta - \gamma)}{\cos \theta}. \tag {1} +$$ + +Because both the camera FOV and the rotation is small, both $|\theta|$ and $|\theta - \gamma|$ are roughly bounded by $\frac{FOV}{2}$ and hence small. We then have the approximations: + +$$ +\frac {x ^ {\prime}}{z ^ {\prime}} \approx \frac {x}{z}, \frac {y}{z} \approx \theta , \frac {y ^ {\prime}}{z ^ {\prime}} \approx \theta - \gamma . \tag {2} +$$ + +We then project the 3D point into image space via $u = f\frac{x}{z} + c_x, v = f\frac{y}{z} + c_y$ , where $f$ is the focal length, $(c_x, c_y)$ is the principal point, and $(u, v)$ are pixel coordinates. This gives us + +$$ +u ^ {\prime} \approx u, v ^ {\prime} \approx v - f \gamma . \tag {3} +$$ + +This indicates that $\mathbf{R}_x(\gamma)$ approximately translates the image along the row axis. By similar logic, one can show that the homography representing $\mathbf{R}_y(\beta)$ is also approximately affine, which completes our proof. + +Algorithmic details of our pseudo-rectification are specified in Algo. 2. We use RANSAC [8] to find a pair of rectifying affine transformations, $\mathbf{H}^{(l)},\mathbf{H}^{(r)}\in \mathcal{R}^{2\times 3}$ , that map corresponding pixels to the same $y$ -coordinates. This $y$ -coordinate constraint only fixes some of the parameters in $\mathbf{H}^{(l)},\mathbf{H}^{(r)}$ . To determine the rest, we need additional constraints. For instance, we choose $\mathbf{H}^{(l)}$ to be rigid, which preserves inter-pixel distances and is important for our disparity disambiguation. Other constraints are also imposed as needed. + +In steps 1-2, we initialize two identity affine transformations, and detect sparse feature matches between the left and right images using SURF keypoints [4]. Let the $N$ detected matches be $\{(\mathbf{x}_i^{(l)},\mathbf{x}_i^{(r)}),i = 1,\ldots ,N\}$ , where + +$\mathbf{x}_i^{(l)}, \mathbf{x}_i^{(r)}$ are homogeneous pixel coordinates in the left and right views, respectively. In steps 3-7, we solve for $\mathbf{H}_{21}^{(l)}, \mathbf{H}_{22}^{(l)}, \mathbf{H}_{21}^{(r)}, \mathbf{H}_{22}^{(r)}, \mathbf{H}_{23}^{(r)}$ with RANSAC, by enforcing that corresponding pixels should have the same $y$ -coordinate in the rectified views. At each RANSAC trial, a subset of $M$ matches is randomly sampled; then we construct a homogeneous linear system of $M$ equations, with each sampled match resulting in one equation, + +$$ +\langle \mathbf {H} _ {2, 1: 3} ^ {(l)}, \mathbf {x} ^ {(l)} \rangle - \langle \mathbf {H} _ {2, 1: 3} ^ {(r)}, \mathbf {x} ^ {(r)} \rangle = 0. ^ {3} \tag {4} +$$ + +Additionally, because it is the difference between $\mathbf{H}_{23}^{(l)}$ and $\mathbf{H}_{23}^{(r)}$ that matters, rather than their absolute values, in Eq. 4, we manually set $\mathbf{H}_{23}^{(l)} = 0$ . The SVD solution to the homogeneous linear system is also scaled such that $\mathbf{H}_{22}^{(l)} > 0$ and $||\mathbf{H}_{2,1:2}^{(l)}|| = 1$ . In step 6, the number of inliers is defined as + +$$ +\sum_ {i = 1} ^ {N} \mathbb {1} \left\{\left| \langle \mathbf {H} _ {2, 1: 3} ^ {(l)}, \mathbf {x} _ {i} ^ {(l)} \rangle - \langle \mathbf {H} _ {2, 1: 3} ^ {(r)}, \mathbf {x} _ {i} ^ {(r)} \rangle \right| < \epsilon \right\}, \tag {5} +$$ + +where $\mathbb{1}\{\cdot\}$ is the indicator function, and $\epsilon$ is a threshold on the residual epipolar errors after rectification. In step 8, we solve for $\mathbf{H}_{11}^{(l)}, \mathbf{H}_{12}^{(l)}$ by further imposing the norm constraint $||\mathbf{H}_{1,1:2}^{(l)}|| = ||\mathbf{H}_{2,1:2}^{(l)}||$ and the determinant constraint $\operatorname*{det}(\mathbf{H}_{1:2,1:2}^{(l)}) > 0$ . Similar constraints are also imposed on $\mathbf{H}^{(r)}$ to get $\mathbf{H}_{11}^{(r)}, \mathbf{H}_{12}^{(r)}$ . Finally, most existing stereo matching algorithms assume the disparity values to be all negative; thus in step 9, we set $\mathbf{H}_{13}^{(r)}$ to the 1-percentile of the set + +$$ +\left\{\langle \mathbf {H} _ {1, 1: 3} ^ {(l)}, \mathbf {x} _ {i} ^ {(l)} \rangle - \langle \mathbf {H} _ {1, 1: 3} ^ {(r)}, \mathbf {x} _ {i} ^ {(r)} \rangle - \phi , i = 1, \dots , N \right\}, (6) +$$ + +where $\phi = 50$ pixels is a protective margin. We then warp the left and right images with $\mathbf{H}^{(l)}$ and $\mathbf{H}^{(r)}$ respectively to obtain the pseudo-rectified stereo pair. + +Step 2: Disparity estimation. In our work, we adopt the state-of-the-art learning-based stereo matching method of Yang et al. using their provided pretrained model [25]. Other stereo matching algorithms can also be substituted into our pipeline. + +Step 3: Ambiguity removal. Because our pseudo-rectification method does not require accurate camera poses, the estimated disparity map is subject to an unknown global shift compared with that from true stereo rectification. The unknown shift is physically linked to the unknown $y$ -axis orientations of the left and right cameras (see the proof of Prop. 1), and mathematically reflected by the freedom to arbitrarily set $\mathbf{H}_{13}^{(l)}$ and $\mathbf{H}_{23}^{(r)}$ in our pseudo-rectification algorithm. This ambiguity prevents us from recovering absolute + +depth from disparity. To resolve it, one needs to know the ambiguity-free disparity value for at least one pixel of the rectified left view. This is equivalent to inferring one or more pixels' depths, because of the depth-to-disparity formula + +$$ +d = f \cdot \frac {C _ {l r}}{z}, \tag {7} +$$ + +where $d$ is a pixel's disparity and $z$ is its depth. Our ambiguity removal method utilizes the back view in our camera setup and is based on Prop. 2 for inference of pixel depths. + +Proposition 2. For two pixels in the left image with the same depth, if they are $m_{l}$ pixels apart, while their corresponding pixels in the back image are $m_{b}$ pixels apart, then the depth of these two pixels in the left camera's coordinate frame is + +$$ +z = \frac {C _ {l b}}{\frac {m _ {l}}{m _ {b}} - 1}. \tag {8} +$$ + +Proof. Denote the two same-depth pixels as $\mathbf{x}_1^{(l)}$ and $\mathbf{x}_2^{(l)}$ in the left image, and their corresponding 3D points as $\mathbf{X}_1^{(l)}$ and $\mathbf{X}_2^{(l)}$ in the camera coordinate frame. Then one can show, + +$$ +m _ {l} = \left\| \mathbf {x} _ {1} ^ {(l)} - \mathbf {x} _ {2} ^ {(l)} \right\| = \frac {f}{z ^ {(l)}} \cdot \left\| \mathbf {X} _ {1} ^ {(l)} - \mathbf {X} _ {2} ^ {(l)} \right\|, \tag {9} +$$ + +where $z^{(l)}$ is the common depth of $\mathbf{x}_1^{(l)}$ and $\mathbf{x}_2^{(l)}$ . By similar logic and notation, for the back view, we have + +$$ +m _ {b} = \frac {f}{z ^ {(b)}} \cdot | | \mathbf {X} _ {1} ^ {(b)} - \mathbf {X} _ {2} ^ {(b)} | |. \tag {10} +$$ + +Because of our special camera setup, we have + +$$ +\mathbf {X} _ {1} ^ {(l)} - \mathbf {X} _ {2} ^ {(l)} = \mathbf {X} _ {1} ^ {(b)} - \mathbf {X} _ {2} ^ {(b)}, z ^ {(b)} = z ^ {(l)} + C _ {l b}. \tag {11} +$$ + +Hence, + +$$ +\frac {m _ {l}}{m _ {b}} = \frac {z ^ {(l)} + C _ {l b}}{z ^ {(l)}}. \tag {12} +$$ + +Rewriting the equation leads to $z = z^{(l)} = \frac{C_{lb}}{\frac{m_l}{m_b} - 1}$ . + +![](images/7c5266e089b8e72267304eb08fd5f802a6488ede41dfb1f1ed0c6090b760dc8c.jpg) + +Details of our ambiguity removal algorithm can be found in Algo. 3. We first detect sparse matches between the left and back images with SURF [4]. Then, in steps 2-7, we estimate the unknown disparity offset for a number of times in order to reduce uncertainty of single measurement, each time with two matches randomly sampled from all the matches. Suppose the sampled two matches are $(\mathbf{x}_1^{(l)},\mathbf{x}_1^{(b)})$ and $(\mathbf{x}_2^{(l)},\mathbf{x}_2^{(b)})$ at each time, in which $\mathbf{x}_1^{(l)} = (u_1^{(l)},v_1^{(l)})$ is a pixel in the left view and similar rule applies to $\mathbf{x}_2^{(l)},\mathbf{x}_1^{(b)},\mathbf{x}_2^{(b)}$ . Let the inter-pixel distances be denoted as $m_l = ||\mathbf{x}_1^{(l)} - \mathbf{x}_2^{(l)}||$ in the left view, $m_b = ||\mathbf{x}_1^{(b)} - \mathbf{x}_2^{(b)}||$ in the back view, and the values of the input disparity map at pixel locations $\mathbf{x}_1^{(l)},\mathbf{x}_2^{(l)}$ are $d_{1},d_{2}$ , respectively. With the + +# Algorithm 3: Ambiguity Removal + +Input :rectified left image, back image, $f,C_{lr},C_{lb}$ and estimated disparity map Output:ambiguity-free disparity map 1 Detect matches between left and back images 2 for $t = 1:T$ do 3 Randomly sample two matches 4 if The two matches are far from each other in the left image, and have similar disparity values in the input disparity map then 5 Estimate the disparity offset, and cache it 6 end 7 end 8 Shift the input disparity map by the median of all the cached disparity offset estimates + +help of Prop. 2 and Eq. 7, the offset $q$ resolving the ambiguity in the estimated disparity map can then be calculated as, + +$$ +q = f \cdot \frac {C _ {l r}}{C _ {l b}} \cdot \left(\frac {m _ {l}}{m _ {b}} - 1\right) - \frac {d _ {1} + d _ {2}}{2}. \tag {13} +$$ + +To suppress uncertainties in Eq. 13, disparity offset estimation is only performed when the conditions (1) $m_{l} > m_{b}$ , (2) $m_{l} > \delta$ , and (3) $|d_{1} - d_{2}| < \eta$ are all satisfied, where $\delta$ and $\eta$ are preset thresholds. Condition (1) serves as a sanity check on whether the two sampled matches are physically valid. Condition (2) ensures that there is a sufficient difference between $m_{l}$ and $m_{b}$ , while Condition (3) aims to guarantee that the two pixels have approximately equal depths. We take the median value of all the candidate disparity offset estimates, then shift the input disparity map to produce the ambiguity-free disparity map in step 8. + +# 4. Experiments + +In this section, we first illustrate what role the bas-relief ambiguity plays in our problem with a toy simulation example, and then show the effectiveness of our approach on both synthetic and real-world data. + +# 4.1. Bas-relief ambiguity + +To give readers a more concrete understanding, we demonstrate the influence of the bas-relief ambiguity on our problem mentioned in Sec. 2 through a simulation. In our simulation, we first generate a Gaussian surface $z = a + b \cdot \exp \left( -\frac{x^2 + y^2}{2\sigma^2} \right)$ , in which $a = b = 300$ and $\sigma = 10$ . We place the left camera at the origin and the right camera at $(2,0,0)$ , and set both cameras' orientation to the identity. The image dimensions are set to $4608 \times 3456$ , and the horizontal FOV to $6^\circ$ , with centered principal points. + +We randomly sample 1,500 points from the Gaussian surface, and project them to the left and right images using the + +ground-truth poses. This yields 1,500 noise-free correspondences. To mimic real-world feature matching, we corrupt the projected pixel locations $(u,v)$ in the right image with random noise $(n_u,n_v)$ according to a 2D Gaussian distribution $\mathcal{N}(0,\mathrm{diag}(1 / \sqrt{2},1 / \sqrt{2}))$ . From these noisy matches, together with ground-truth camera intrinsics, we estimate the essential matrix and perform two-view SfM to recover the right camera's relative pose with respect to the left one. Since SfM has a scale ambiguity, we scale the recovered translation vector such that the estimated distance between the two camera centers is the same as in the ground-truth. Figures 2 and 3 show the reconstructed 3D points and the corresponding recovered relative pose in one of our multiple runs. Despite the translation and $x$ , $z$ -axis rotations are almost perfectly recovered, the rotation about $y$ -axis has a $0.207^{\circ}$ error due to the bas-relief ambiguity, leading to severe distortions in the reconstruction. + +# 4.2. Synthetic data + +Setup. We generate synthetic images, along with ground-truth depth maps, for a set of scenes. The horizontal camera FOV is set to $6^{\circ}$ , with image dimensions $4608 \times 3456$ . The corresponding focal length is 43,963 pixels. For each scene, the left, right, and back images are rendered according to our camera setup in Fig. 1. To determine the cameras' positions, we first create a bounding box for the scene; then the left camera's pose is manually chosen such that the distance between its camera center and the bounding box centroid equals $S / \tan(\frac{FOV}{2})$ , with $S$ being the bounding box's diagonal length. Both $C_{lr}$ and $C_{lb}$ are set to $1/150 \cdot S / \tan(\frac{FOV}{2})$ . Hence the baseline/depth ratio is as small as $\sim 1/150$ ; in other words, the intersection angle for the corresponding rays in the left and right views is just $\sim 0.382^{\circ}$ . The setup is equivalent to that of sensing depth for objects $\sim 300m$ away with a $2m$ baseline. The relative orientations of the right and back cameras with respect to the left one are generated by randomly sampling their $x, y$ Euler angles from $[-1^{\circ}, 1^{\circ}]$ , and $z$ Euler angle from $[-5^{\circ}, 5^{\circ}]$ . + +Pseudo-rectification. We test our proposed pseudorecrtification method on this synthetic data. We set the number of sampled matches $M$ at each RANSAC trial to 10, and the inlier epipolar error threshold $\epsilon$ to 2 pixels. In Fig. 4, we show an example for which both the true rectification with groundtruth poses and our purely image-based pseudo-rectification are performed. To facilitate visual inspection, we show two $160\times 120$ crops of the pseudo-rectified views. Their locations are marked by the red boxes in the uncropped images. In addition to the rectification quality, the horizontal disparity is also visible from the crops. We then process the pseudorectified stereo pair with a stereo matching method [25]. In Fig. 5, we show the estimated disparity map, along with the + +![](images/ab7ca6d2955167783624bc5ce28c6555c51c40d9cef337dc0093b44beccdd18a.jpg) +Figure 2: Ground-truth (blue) and the reconstructed (red) scene points. The unit for $x, y, z$ axes is meter. + +![](images/97744fe20db01e6f8dc923c009cc4443b3bfaaa2441754ab09e2aad81cb0a050.jpg) +Raw left and right views + +![](images/f6043e1a672696b18d490befeff5d57392880272957bcbd7a372141348e65113.jpg) +True-rectified left and right views + +![](images/2ff4bbf63b57f79aac0539b60badd042ba76fba12be95968429ee28c85cff5a8.jpg) + +![](images/464d5fcb9449b12e3436edf42a8295ee5f58b74b312b23384e45fed77d44968a.jpg) +Pseudo-rectified left and right views +Figure 4: Pseudo-rectification on synthetic images. + +ground-truth, to illustrate the existence of an unknown global shift $(\sim 250\mathrm{px})$ + +Ambiguity removal. Next, we evaluate our ambiguity removal algorithm. We set the inter-pixel distance threshold $\delta$ to 300 pixels, and the disparity difference threshold $\eta$ to 3 pixels in our ambiguity removal step. For the synthetic example in Fig. 4, Fig. 5 shows the histogram of all the cached disparity offset estimates produced by step 2-7 of Algo. 3, while Fig. 6 visualizes an example pair of matches that meet our criterion in step 4. The final value taken in step 8 is marked by the red line in the histogram plot; we can see that it is aligned with the mode of the histogram, and also in agreement with the two disparity maps. We finally convert the ambiguity-free disparity map to a depth map via Eq. 7. + +![](images/45c9d2a7a576d36a9214745e711d2ca7957e773985802b8f65a738480f360144.jpg) +Figure 3: Top-down view of ground-truth relative pose (solid) and the recovered one (dashed). $\theta$ is exaggerated for illustration. + +![](images/704732ed30d7c46725490e2aa3ffe8fc08f8e01250800d2bf69ba21db383224e.jpg) + +![](images/1da220768a89a20556625f277cddbb983e30b4468516b284f7fb5b001ef8dfb8.jpg) +Figure 5: Histogram of 5,000 cached disparity offset estimates for the example in Fig. 4. The red line marks the final value we take. + +![](images/87d3a1a5a74729b22dbf834fcbab0a2f7579d847fb879b5eccdc06a9a6fc4572.jpg) +Figure 6: An example pair of matches used to resolve ambiguity for the example in Fig. 4. The two points are $1849.2\mathrm{px}$ apart in the left image, and $1836.7\mathrm{px}$ apart in the back one. Their original estimated disparities are $49.0\mathrm{px}$ and $50.5\mathrm{px}$ , respectively. According to Eq. 13, this yields a disparity offset estimate of $249.4\mathrm{px}$ . + +The estimated depth map, compared with the ground-truth, are presented in the first row of Fig. 7. One can see that our proposed method outputs a depth map with relative errors below $3\%$ at the majority $(95.4\%)$ of pixel locations. Another two synthetic examples can be seen in Fig. 9. + +Loop and Zhang's rectification. As a comparison, we replace our pseudo-rectification with Loop and Zhang's rectification scheme [18], while keeping the other parts of our pipeline unchanged. The fundamental matrix required by their approach is estimated with a RANSAC-based normalized 8-point algorithm [12] from the same set of matches as that in our pseudo-rectification. Their results are shown in the second row of Fig. 7. The relative error map indi + +![](images/fa930b62668642a63bfdae1411eb818995d2e7fd1925468076d7587459b19173.jpg) +Ground-truth depth Estimated depth Relative error $(\%)$ + +![](images/4f0702a14d377d4577dd4d230b0c5f2752a0e33d5dbd4761e878072f042e7339.jpg) +Replacing our pseudo-rectification with Loop and Zhang [18] + +![](images/ea1fc8df14c2e2aa5750e3f0c870e9403c1084683cbb892fcd632e026bcfe6db.jpg) +Figure 7: Comparison among different algorithms. For rectification-based methods, the ground-truth depth map has been warped to align with the rectified view. For SfM, we have used the full ground-truth intrinsic matrix. + +cates that the depth map is strongly distorted when their method is used, for a similar reason to two-view SfM that we demonstrate in Sec. 4.1. In experiments, we also find that fundamental matrix estimation is quite unstable due to the tiny baseline/depth ratio, which causes Loop and Zhang's method to produce inconsistent results in different runs. + +SfM+MVS. One might hypothesize that the back view can also help fix the bas-relief ambiguity in SfM. To test it, we feed the three views into COLMAP [19, 20] to run multiview SfM and MVS. We use the ground-truth camera intrinsics, and initialize the three cameras' orientations to the identity; the left, right, and back camera centers are initialized to their ground-truth locations. The recovered pose and reconstruction are finally scaled such that the distance between the left and right camera centers is the same as in the ground-truth. Fig. 7 shows that even with the additional back view, SfM still suffers from the bas-relief ambiguity as in the case of stereo views. One of the key factors distinguishing SfM/SfSM from our approach is that, their bundle adjustment objective, i.e., average reprojection error, treats all the image-space observations equally, most of which are actually not informative for fixing the ambiguity, while our method only exploits a small carefully-chosen subset of all the observations, i.e., same-depth pixel pairs. Moreover, in practice, the principal points in camera intrinsics are unknown and can be tens of pixels away from the image center; this has no effect on our method, but can further hurt SfM/SfSM. + +
Failure<1%<2%<3%
Ours045.3%80.1%96.9%
Loop and Zhang [18]01.14%2.73%5.99%
SfM+MVS [19, 20]156.71%12.7%19.1%
+ +Table 1: Quantitative results on 40 synthetic scenes for methods in Fig. 7. "Failure" means the number of scenes for which a method fails to output a depth map. The metric is the portion of pixels with relative depth error below certain threshold, i.e., $1\%$ , $2\%$ , $3\%$ , averaged over the successful scenes. + +![](images/6436e79276e701c0be2ac69699ecda571a60b1dd70b907e7b030991d3e82e496.jpg) +Raw left and right views + +![](images/ba7aff69ad50889d8f807df9e6ab2386df25220f593e806a98818259f1445b3e.jpg) +Pseudo-rectified left and right views +Figure 8: Pseudo-rectification on real-world images. + +Tab. 1 quantitatively compares the aforementioned different algorithms on 40 synthetic scenes. Unlike other methods, our approach is not affected by the bas-relief ambiguity and outputs much more accurate depth estimates. + +# 4.3. Real-world data + +We capture real-world data with a Nikon P1000 superzoom camera; the camera is mounted on a tripod and manually moved to three positions in line with our proposed camera setup in order to acquire the left, right, and back images. The captured images are of the same size, $4608 \times 3456$ , as in the synthetic case. The $35\mathrm{mm}$ equivalent focal length is $400\mathrm{mm}$ , which corresponds to a camera FOV of $5.16^{\circ}$ horizontally and $3.44^{\circ}$ vertically. Because groundtruth dense depth maps are difficult to obtain for distant real-world scenes without special equipment, we use a laser rangefinder to acquire a point-wise depth measurement for a point of interest in the captured scene. We can then check if the estimated depth agrees with the measured one. The hyperparameters, i.e., $M, \epsilon, \delta, \eta$ , remain unchanged compared to the synthetic case. + +We first show qualitative results of pseudo-rectification on real-world images in Fig. 8; like before, a $60 \times 45$ sub-area cropped out of the rectified views is presented to ease visual inspection. One can see that our pseudo-rectification generalizes very well to real-world images. In Fig. 10, we show the estimated depth maps; the measured depth from the laser rangefinder and the corresponding estimated value are marked inside the red boxes on the pseudo-rectified left + +![](images/284d178027d6d3d30cdfe9ee0e568414ebd58d1bde2839389ace3cfd48d5a3b9.jpg) +Pseudo-rectified left view + +![](images/256f2f931f9d6404854ec2b7d15b7297dc8f60e5b22171136de0eac43bb01491.jpg) +Ground-truth depth + +![](images/53414590dd0dc03890b74ae14999fe25e9381c421d9b03074ba2e937b6cfebb8.jpg) +Estimated depth + +![](images/adfd5d1bc1a7953b2966991d95cf0691d07021d4267d6e6c87ce8eef83e30eb4.jpg) +Relative error(%) + +![](images/f73940299e7565502fc120119cad0f37e2d04035b8a0488df20136c0dd9cfc76.jpg) +Figure 9: Results on synthetic data. Portion of pixel locations with $<3\%$ relative error (top to bottom): $98.5\%$ , $99.7\%$ . + +![](images/ad0e77dd2e95069693de60f0179e34ffac1ad5f2ee73963e745e9640daacc3c6.jpg) + +![](images/55e4b630ffcd78e16562eee1d4cf55822536dbcda1c7b7e0886645f60bcaf91e.jpg) + +![](images/dae091cc27a1a6a31940e76cbca7e550ee2bfddf38cb14d2d1ed9b1a2ce41ce7.jpg) + +![](images/f0ed6f6cae37d59403f28e7a49c1fc47c336ec8b59c1423e280e5daca5112a8a.jpg) +Pseudo-rectified left view + +![](images/fd531ffe6fc185b4ae14ff8c24b41da5b7123f4baa81c6e6e07fadd24331884c.jpg) +Estimated disparity + +![](images/119ed908d047a45a73348743d3a30c285dfad3142d9c3501f5120b4985b6c8d7.jpg) +Estimated disparity offset + +![](images/22f6e2c9855a0a6e079123cebb4de38b3d6f6671071f18999ede0891070e8fc2.jpg) +Estimated depth (meters) + +![](images/60e253d258356008860e1a7126d1c54b9f6cbf35d75a1678ca3e849758b9afef.jpg) + +![](images/4d81d009e619592a6c41636ed1034b22d5faf1eae2bdba4349f98d415c5f0580.jpg) + +![](images/3687b554e46c8ff4b1da5692f9b647197823bba4761b2b386928129635ac9395.jpg) + +![](images/a01c096aceaf9418c2ce5a028a81a583dcf9129f4e3130e497ae0dc383348d51.jpg) + +![](images/c7429e023ec4b79b685934e95ead5a6082364bb0b15428fb18b23320a4cb42a9.jpg) +30 60 90 120 150 180 210 + +![](images/33e50580b6dece60e1852a7d2256b5bfac7af08985aa98f1d03bba5c3fa7f440.jpg) +Figure 10: Results on real-world data. The depth measurements from a laser rangefinder are marked in the red box on the pseudo-rectified left images; the corresponding estimated values by our method are marked on the estimated depth maps. Laser-measured values (top to bottom): $234.2\mathrm{m}$ , $302\mathrm{m}$ , $291.9\mathrm{m}$ ; our estimated values (top to bottom): $233.6\mathrm{m}$ , $300.8\mathrm{m}$ , $290.2\mathrm{m}$ . + +![](images/5fd437482214e73995ff133b78ab9afe96f6615b13d3581705557e62c0e8d6a9.jpg) + +![](images/31053b2c3fd7e77cadd8f6a36e760861398733352163e2b18e8fdad3fdf1b3e9.jpg) + +view and the estimated depth map, respectively. From a practical perspective, the accuracy of our estimated depths is quite acceptable for applications in autonomous driving, considering the large distances to the scenes. + +# 5. Discussion + +In this work, we propose a novel vision-based solution to the long-range depth sensing problem in autonomous driving. We propose a three-camera system consisting of small-FOV cameras and a corresponding processing pipeline. + +Our end-to-end solution is very practical in that it does not assume full calibration of the camera system, and is robust to small system vibrations. Experiments show that our system enables dense depth acquisition of faraway objects ( $>200\mathrm{m}$ ) that are beyond the range of most commercial LiDARs for self-driving vehicles. This can be particularly helpful for heavily-weighted autonomous trucks moving at high speed. + +As future work, we plan to conduct thorough experiments in real-world driving scenarios by building and testing a road-deployable hardware system. + +# References + +[1] Velodyne Alpha Puck LiDAR, 2019. Available at https://velodynelidar.com/vls-128.html. Accessed: Oct. 18, 2019. 1 +[2] Waymo Open Dataset: An autonomous driving dataset, 2019. Available at https://www.waymo.com/open. Accessed: Oct. 18, 2019. 1 +[3] Sameer Agarwal, Yasutaka Furukawa, Noah Snavely, Ian Simon, Brian Curless, Steven M Seitz, and Richard Szeliski. Building Rome in a Day. Communications of the ACM, 54(10):105-112, 2011. 2 +[4] Herbert Bay, Tinne Tuytelaars, and Luc Van Gool. Surf: Speeded Up Robust Features. In Proc. European Conf. on Computer Vision (ECCV), pages 404-417. Springer, 2006. 3, 4 +[5] Christian Beder and Richard Steffen. Determining an Initial Image Pair for Fixing the Scale of a 3D Reconstruction from an Image Sequence. In Joint Pattern Recognition Symposium, pages 657-666. Springer, 2006. 2 +[6] Peter N Belhumeur, David J Kriegman, and Alan L Yuille. The Bas-Relief Ambiguity. Int. J. of Computer Vision, 35(1):33-44, 1999. 2 +[7] Holger Caesar, Varun Bankiti, Alex H Lang, Sourabh Vora, Venice Erin Liong, Qiang Xu, Anush Krishnan, Yu Pan, Giancarlo Baldan, and Oscar Beijbom. nuScenes: A multimodal dataset for autonomous driving. arXiv preprint arXiv:1903.11027, 2019. 1 +[8] Martin A Fischler and Robert C Bolles. Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography. Communications of the ACM, 24(6):381-395, 1981. 3 +[9] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are We Ready for Autonomous Driving? The KITTI Vision Benchmark Suite. In Proc. Computer Vision and Pattern Recognition (CVPR), 2012. 1 +[10] Hyowon Ha, Sunghoon Im, Jaesik Park, Hae-Gon Jeon, and In So Kweon. High-quality Depth from Uncalibrated Small Motion Clip. In Proc. Computer Vision and Pattern Recognition (CVPR), pages 5413-5421, 2016. 2 +[11] Hyowon Ha, Tae-Hyun Oh, and In So Kweon. A closed-form solution to rotation estimation for structure from small motion. IEEE Signal Processing Letters, 25(3):393-397, 2017. 2 +[12] Richard Hartley and Andrew Zisserman. Multiple View Geometry in Computer Vision. Cambridge university press, 2003. 6 +[13] Richard I Hartley. Theory and Practice of Projective Rectification. Int. J. of Computer Vision, 35(2):115-127, 1999. 2 +[14] Xinyu Huang, Jizhou Gao, and Ruigang Yang. Calibrating Pan-Tilt Cameras with Telephoto Lenses. In Proc. Asian Conf. on Computer Vision (ACCV), pages 127-137. Springer, 2007. 2 +[15] Sunghoon Im, Hyowon Ha, Gyeongmin Choe, Hae-Gon Jeon, Kyungdon Joo, and In So Kweon. Accurate 3D Reconstruction from Small Motion Clip for Rolling Shutter Cameras. Trans. Pattern Analysis and Machine Intelligence, 41:775-787, 2019. 2 + +[16] Sunghoon Im, Hyowon Ha, Gyeongmin Choe, Hae-Gon Jeon, Kyungdon Joo, and In So Kweon. High Quality Structure from Small Motion for Rolling Shutter Cameras. In Proc. Int. Conf. on Computer Vision (ICCV), pages 837-845, 2015. 2 +[17] H Christopher Longuet-Higgins. A Computer Algorithm for Reconstructing a Scene from Two Projections. Nature, 293(5828):133, 1981. 2 +[18] Charles Loop and Zhengyou Zhang. Computing Rectifying Homographies for Stereo Vision. In Proc. Computer Vision and Pattern Recognition (CVPR), volume 1, pages 125-131. IEEE, 1999. 2, 3, 6, 7 +[19] Johannes L Schonberger and Jan-Michael Frahm. Structure-from-Motion Revisited. In Proc. Computer Vision and Pattern Recognition (CVPR), pages 4104-4113, 2016. 2, 7 +[20] Johannes L. Schonberger, Enliang Zheng, Jan-Michael Frahm, and Marc Pollefeys. Pixelwise View Selection for Unstructured Multi-View Stereo. In Proc. European Conf. on Computer Vision (ECCV), 2016. 7 +[21] Noah Snavely, Steven M Seitz, and Richard Szeliski. Photo Tourism: Exploring Photo Collections in 3D. In ACM Trans. Graphics, volume 25, pages 835-846. ACM, 2006. 2 +[22] Noah Snavely, Steven M Seitz, and Richard Szeliski. Modeling the world from internet photo collections. International journal of computer vision, 80(2):189-210, 2008. 2 +[23] Richard Szeliski and Sing Bing Kang. Shape Ambiguities in Structure From Motion. In Proc. European Conf. on Computer Vision (ECCV), pages 709-721. Springer, 1996. 2 +[24] Bill Triggs, Philip F McLauchlan, Richard I Hartley, and Andrew W Fitzgibbon. Bundle Adjustment A Modern Synthesis. In International Workshop on Vision Algorithms, pages 298-372. Springer, 1999. 2 +[25] Gengshan Yang, Joshua Manela, Michael Happold, and Deva Ramanan. Hierarchical Deep Stereo Matching on High-Resolution Images. In Proc. Computer Vision and Pattern Recognition (CVPR), June 2019. 4, 5 +[26] Fisher Yu and David Gallup. 3D Reconstruction from Accidental Motion. In Proc. Computer Vision and Pattern Recognition (CVPR), 2014. 2 +[27] Zhengyou Zhang. A Flexible New Technique for Camera Calibration. Trans. Pattern Analysis and Machine Intelligence, 22, 2000. 2 \ No newline at end of file diff --git a/depthsensingbeyondlidarrange/images.zip b/depthsensingbeyondlidarrange/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f0b9ca00b8321c2d48f072bcbb1fc1423d2a4fb3 --- /dev/null +++ b/depthsensingbeyondlidarrange/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef1c78052d1a8717fdcefa13452fc0a817298706c554dde1f8ebefb284f59a3a +size 483797 diff --git a/depthsensingbeyondlidarrange/layout.json b/depthsensingbeyondlidarrange/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f9b1239bce9a67f645bced6b4de5c483a22454f4 --- /dev/null +++ b/depthsensingbeyondlidarrange/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71b289a2a78b49d9edd58d300f1b0bda5096952714e442126632941b9cce48cc +size 490811 diff --git a/designingnetworkdesignspaces/fbcb04ee-81b7-481a-8eaf-8626c9aea1d8_content_list.json b/designingnetworkdesignspaces/fbcb04ee-81b7-481a-8eaf-8626c9aea1d8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f3585c51a9ffbb7f9234825eb3a458803487eead --- /dev/null +++ b/designingnetworkdesignspaces/fbcb04ee-81b7-481a-8eaf-8626c9aea1d8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad77b2106eca76e4ff97b667e2e58c763cd7a0f48dc0c8aba7687d2bb3000a7f +size 84571 diff --git a/designingnetworkdesignspaces/fbcb04ee-81b7-481a-8eaf-8626c9aea1d8_model.json b/designingnetworkdesignspaces/fbcb04ee-81b7-481a-8eaf-8626c9aea1d8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6a2085c291f1c5189d6f4d674e9d4f654cc23f14 --- /dev/null +++ b/designingnetworkdesignspaces/fbcb04ee-81b7-481a-8eaf-8626c9aea1d8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e5e810472b83d37468211009bae7b6e9b97f2411c7ebdd19cfabc24520990c2 +size 98434 diff --git a/designingnetworkdesignspaces/fbcb04ee-81b7-481a-8eaf-8626c9aea1d8_origin.pdf b/designingnetworkdesignspaces/fbcb04ee-81b7-481a-8eaf-8626c9aea1d8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fad9236b43d53660f41eda8d42c66cd403bc73b1 --- /dev/null +++ b/designingnetworkdesignspaces/fbcb04ee-81b7-481a-8eaf-8626c9aea1d8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:624db2bbc115a966c6bc28baec8e2181802e6c46087f126dcffdc2e1a32c8a56 +size 2165827 diff --git a/designingnetworkdesignspaces/full.md b/designingnetworkdesignspaces/full.md new file mode 100644 index 0000000000000000000000000000000000000000..68851e104d3a2baeb622df47b3e1510d537f4af2 --- /dev/null +++ b/designingnetworkdesignspaces/full.md @@ -0,0 +1,337 @@ +# Designing Network Design Spaces + +Ilija Radosavovic Raj Prateek Kosaraju Ross Girshick Kaiming He Piotr Dolkar Facebook AI Research (FAIR) + +# Abstract + +In this work, we present a new network design paradigm. Our goal is to help advance the understanding of network design and discover design principles that generalize across settings. Instead of focusing on designing individual network instances, we design network design spaces that parametrize populations of networks. The overall process is analogous to classic manual design of networks, but elevated to the design space level. Using our methodology we explore the structure aspect of network design and arrive at a low-dimensional design space consisting of simple, regular networks that we call RegNet. The core insight of the RegNet parametrization is surprisingly simple: widths and depths of good networks can be explained by a quantized linear function. We analyze the RegNet design space and arrive at interesting findings that do not match the current practice of network design. The RegNet design space provides simple and fast networks that work well across a wide range of flop regimes. Under comparable training settings and flops, the RegNet models outperform the popular EfficientNet models while being up to $5 \times$ faster on GPUs. + +# 1. Introduction + +Deep convolutional neural networks are the engine of visual recognition. Over the past several years better architectures have resulted in considerable progress in a wide range of visual recognition tasks. Examples include LeNet [12], AlexNet [10], VGG [22], and ResNet [6]. This body of work advanced both the effectiveness of neural networks as well as our understanding of network design. In particular, the above sequence of works demonstrated the importance of convolution, network and data size, depth, and residuals, respectively. The outcome of these works is not just particular network instantiations, but also design principles that can be generalized and applied to numerous settings. + +While manual network design has led to large advances, finding well-optimized networks manually can be challenging, especially as the number of design choices increases. A popular approach to address this limitation is neural architecture search (NAS). Given a fixed search space of possible + +![](images/c7658b1df55de573c44bdbc9c9123aea615939062338644e2627517ad2227fd7.jpg) + +![](images/0fbe84f9f961d5fd2e5044e8c02e9eccd5e6bd2181bbcd5e80214a5a9ba4b476.jpg) +Figure 1. Design space design. We propose to design network design spaces, where a design space is a parametrized set of possible model architectures. Design space design is akin to manual network design, but elevated to the population level. In each step of our process the input is an initial design space and the output is a refined design space of simpler or better models. Following [18], we characterize the quality of a design space by sampling models and inspecting their error distribution. For example, in the figure above we start with an initial design space A and apply two refinement steps to yield design spaces B then C. In this case $\mathbb{C} \subseteq \mathbb{B} \subseteq \mathbb{A}$ (left), and the error distributions are strictly improving from A to B to C (right). The hope is that design principles that apply to model populations are more likely to be robust and generalize. + +networks, NAS automatically finds a good model within the search space. Recently, NAS has received a lot of attention and shown excellent results [29, 15, 25]. + +Despite the effectiveness of NAS, the paradigm has limitations. The outcome of the search is a single network instance tuned to a specific setting (e.g., hardware platform). This is sufficient in some cases; however, it does not enable discovery of network design principles that deepen our understanding and allow us to generalize to new settings. In particular, our aim is to find simple models that are easy to understand, build upon, and generalize. + +In this work, we present a new network design paradigm that combines the advantages of manual design and NAS. Instead of focusing on designing individual network instances, we design design spaces that parametrize populations of networks. Like in manual design, we aim for interpretability and to discover general design principles that describe networks that are simple, work well, and generalize across settings. Like in NAS, we aim to take advantage of semi-automated procedures to help achieve these goals. + +The general strategy we adopt is to progressively design simplified versions of an initial, relatively unconstrained, design space while maintaining or improving its quality (Figure 1). The overall process is analogous to manual design, elevated to the population level and guided via distribution estimates of network design spaces [18]. + +As a testbed for this paradigm, our focus is on exploring network structure (e.g., width, depth, groups, etc.) assuming standard model families including VGG [22], ResNet [6], and ResNeXt [26]. We start with a relatively unconstrained design space we call AnyNet (e.g., widths and depths vary freely across stages) and apply our human-in-the-loop methodology to arrive at a low-dimensional design space consisting of simple "regular" networks, that we call RegNet. The core of the RegNet design space is simple: stage widths and depths are determined by a quantized linear function. Compared to AnyNet, the RegNet design space has simpler models, is easier to interpret, and has a higher concentration of good models. + +We design the RegNet design space in a low-compute, low-epoch regime using a single network block type on ImageNet [2]. We then show that the RegNet design space generalizes to larger compute regimes, schedule lengths, and network block types. Furthermore, an important property of the design space design is that it is more interpretable and can lead to insights that we can learn from. We analyze the RegNet design space and arrive at interesting findings that do not match the current practice of network design. For example, we find that the depth of the best models is stable across compute regimes ( $\sim 20$ blocks) and that the best models do not use either a bottleneck or inverted bottleneck. + +We compare top REGNET models to existing networks in various settings. First, REGNET models are surprisingly effective in the mobile regime. We hope that these simple models can serve as strong baselines for future work. Next, REGNET models lead to considerable improvements over standard RESNE(X)T [6, 26] models in all metrics. We highlight the improvements for fixed activations, which is of high practical interest as the number of activations can strongly influence the runtime on accelerators such as GPUs. Next, we compare to the state-of-the-art EFFICIENTNET [25] models across compute regimes. Under comparable training settings and flops, REGNET models outperform EFFICIENTNET models while being up to $5 \times$ faster on GPUs. We further test generalization on ImageNetV2 [20]. + +We note that network structure is arguably the simplest form of a design space design one can consider. Focusing on designing richer design spaces (e.g., including operators) may lead to better networks in future work. + +We strongly encourage readers to see the extended version of this work on arXiv² and also to check the code³. + +# 2. Related Work + +Manual network design. The introduction of AlexNet [10] catapulted network design into a thriving research area. In the following years, improved network designs were proposed; examples include VGG [22], Inception [23, 24], ResNet [6], ResNeXt [26], DenseNet [8], and MobileNet [7, 21]. The design process behind these networks was largely manual and focussed on discovering new design choices that improve accuracy e.g., the use of deeper models or residuals. We likewise share the goal of discovering new design principles. In fact, our methodology is analogous to manual design but performed at the design space level. + +Automated network design. Recently, the network design process has shifted from a manual exploration to more automated network design, popularized by NAS. NAS has proven to be an effective tool for finding good models, e.g., [30, 19, 14, 17, 15, 25]. The majority of work in NAS focuses on the search algorithm, i.e., efficiently finding the best network instances within a fixed, manually designed search space (which we call a design space). Instead, our focus is on a paradigm for designing novel design spaces. The two are complementary: better design spaces can improve the efficiency of NAS search algorithms and also lead to existence of better models by enriching the design space. + +Network scaling. Both manual and semi-automated network design typically focus on finding best-performing network instances for a specific regime (e.g., number of flops comparable to ResNet-50). Since the result of this procedure is a single network instance, it is not clear how to adapt the instance to a different regime (e.g., fewer flops). A common practice is to apply network scaling rules, such as varying network depth [6], width [27], resolution [7], or all three jointly [25]. Instead, our goal is to discover general design principles that hold across regimes and allow for efficient tuning for the optimal network in any target regime. + +Comparing networks. Given the vast number of possible network design spaces, it is essential to use a reliable comparison metric to guide our design process. Recently, the authors of [18] proposed a methodology for comparing and analyzing populations of networks sampled from a design space. This distribution-level view is fully-aligned with our goal of finding general design principles. Thus, we adopt this methodology and demonstrate that it can serve as a useful tool for the design space design process. + +Parameterization. Our final quantized linear parameterization shares similarity with previous work, e.g. how stage widths are set [22, 5, 27, 8, 7]. However, there are two key differences. First, we provide an empirical study justifying the design choices we make. Second, we give insights into structural design choices that were not previously understood (e.g., how to set the number of blocks in each stages). + +# 3. Design Space Design + +Our goal is to design better networks for visual recognition. Rather than designing or searching for a single best model under specific settings, we study the behavior of populations of models. We aim to discover general design principles that can apply to and improve an entire model population. Such design principles can provide insights into network design and are more likely to generalize to new settings (unlike a single model tuned for a specific scenario). + +We rely on the concept of network design spaces introduced by Radosavovic et al. [18]. A design space is a large, possibly infinite, population of model architectures. The core insight from [18] is that we can sample models from a design space, giving rise to a model distribution, and turn to tools from classical statistics to analyze the design space. We note that this differs from architecture search, where the goal is to find the single best model from the space. + +In this work, we propose to design progressively simplified versions of an initial, unconstrained design space. We refer to this process as design space design. Design space design is akin to sequential manual network design, but elevated to the population level. Specifically, in each step of our design process the input is an initial design space and the output is a refined design space, where the aim of each design step is to discover design principles that yield populations of simpler or better performing models. + +We begin by describing the basic tools we use for design space design in §3.1. Next, in §3.2 we apply our methodology to a design space, called AnyNet, that allows unconstrained network structures. In §3.3, after a sequence of design steps, we obtain a simplified design space consisting of only regular network structures that we name RegNet. Finally, as our goal is not to design a design space for a single setting, but rather to discover general principles of network design that generalize to new settings, in §3.4 we test the generalization of the RegNet design space to new settings. + +Relative to the AnyNet design space, the RegNet design space is: (1) simplified both in terms of its dimension and type of network configurations it permits, (2) contains a higher concentration of top-performing models, and (3) is more amenable to analysis and interpretation. + +# 3.1. Tools for Design Space Design + +We begin with an overview of tools for design space design. To evaluate and compare design spaces, we use the tools introduced by Radosavovic et al. [18], who propose to quantify the quality of a design space by sampling a set of models from that design space and characterizing the resulting model error distribution. The key intuition behind this approach is that comparing distributions is more robust and informative than using search (manual or automated) and comparing the best found models from two design spaces. + +![](images/f4528b28e192fbce5ee220c8e066d9de390d1db68ab6ea4082f40143a12a1d70.jpg) +Figure 2. Statistics of the AnyNetX design space computed with $n = 500$ sampled models. Left: The error empirical distribution function (EDF) serves as our foundational tool for visualizing the quality of the design space. In the legend we report the min error and mean error (which corresponds to the area under the curve). Middle: Distribution of network depth $d$ (number of blocks) versus error. Right: Distribution of block widths in the fourth stage $(w_{4})$ versus error. The blue shaded regions are ranges containing the best models with $95\%$ confidence (obtained using an empirical bootstrap), and the black vertical line the most likely best value. + +![](images/bae549fd925b8480b2201b1f291b5aa7cd967b9373aa90c666f83ad679ac2f1b.jpg) + +![](images/0634c68380e82eaf0df8ae093d73907794c4be356126fbd851db362577b35678.jpg) + +To obtain a distribution of models, we sample and train $n$ models from a design space. For efficiency, we primarily do so in a low-compute, low-epoch training regime. In particular, in this section we use the 400 million flop $^{4}$ (400MF) regime and train each sampled model for 10 epochs on the ImageNet dataset [2]. We note that while we train many models, each training run is fast: training 100 models at 400MF for 10 epochs is roughly equivalent in flops to training a single ResNet-50 [6] model at 4GF for 100 epochs. + +As in [18], our primary tool for analyzing design space quality is the error empirical distribution function (EDF). The error EDF of $n$ models with errors $e_i$ is given by: + +$$ +F (e) = \frac {1}{n} \sum_ {i = 1} ^ {n} \mathbf {1} \left[ e _ {i} < e \right]. \tag {1} +$$ + +$F(e)$ gives the fraction of models with error less than $e$ . We show the error EDF for $n = 500$ sampled models from the AnyNetX design space (described in §3.2) in Figure 2 (left). + +Given a population of trained models, we can plot and analyze various network properties versus network error, see Figure 2 (middle) and (right) for two examples taken from the AnyNetX design space. Such visualizations show 1D projections of a complex, high-dimensional space, and can help obtain insights into the design space. For these plots, we employ an empirical bootstrap [4] to estimate the likely range in which the best models fall. + +To summarize: (1) we generate distributions of models obtained by sampling and training $n$ models from a design space, (2) we compute and plot error EDFs to summarize design space quality, (3) we visualize various properties of a design space and use an empirical bootstrap to gain insight, and (4) we use these insights to refine the design space. + +![](images/5910d483e9fda81011d3e5b9a299f844cdf4b297dccc19165749209c53c6f367.jpg) +(a) network + +![](images/a8ec57a2f23ec8ed0ac3259911d926877b72ca010cdddce342daa80e2d42eecd.jpg) +(b) body + +![](images/b70e47f87e0ce015de364a758a3ff174c700600f30b4e8cbdb9d16ba1c4aa68e.jpg) +(c) stage i +Figure 3. General network structure for models in our design spaces. (a) Each network consists of a stem (stride-two $3 \times 3$ conv with $w_0 = 32$ output channels), followed by the network body that performs the bulk of the computation, and then a head (average pooling followed by a fully connected layer) that predicts $n$ output classes. (b) The network body is composed of a sequence of stages that operate at progressively reduced resolution $r_i$ . (c) Each stage consists of a sequence of identical blocks, except the first block which uses stride-two conv. While the general structure is simple, the total number of possible network configurations is vast. + +# 3.2. The AnyNet Design Space + +We next introduce our initial AnyNet design space. Our focus is on exploring the structure of neural networks assuming standard, fixed network blocks (e.g., residual bottleneck blocks). In our terminology the structure of the network includes elements such as the number of blocks (i.e. network depth), block widths (i.e. number of channels), and other block parameters such as bottleneck ratios or group widths. The structure of the network determines the distribution of compute, parameters, and memory throughout the computational graph of the network and is key in determining its accuracy and efficiency. + +The basic design of networks in our AnyNet design space is straightforward. Given an input image, a network consists of a simple stem, followed by the network body that performs the bulk of the computation, and a final network head that predicts the output classes, see Figure 3a. We keep the stem and head fixed and as simple as possible, and instead focus on the structure of the network body that is central in determining network compute and accuracy. + +The network body consists of 4 stages operating at progressively reduced resolution, see Figure 3b (we explore varying the number of stages in §3.4). Each stage consists of a sequence of identical blocks, see Figure 3c. In total, for each stage $i$ the degrees of freedom include the number of blocks $d_{i}$ , block width $w_{i}$ , and any other block parameters. While the general structure is simple, the total number of possible networks in the AnyNet design space is vast. + +Most of our experiments use the standard residual bottle-necks block with group convolution [26], shown in Figure 4. We refer to this as the X block, and the AnyNet design space built on it as AnyNetX (we explore other blocks in §3.4). While the X block is quite rudimentary, we show it can be surprisingly effective when network structure is optimized. + +![](images/ebc00ac3216608479ba60baa56eb68d1f4fbec41ff4df1857909ab7424673bb3.jpg) +(a) X block, $s = 1$ +Figure 4. The $\mathbf{X}$ block is based on the standard residual bottleneck block with group convolution [26]. (a) Each $\mathbf{X}$ block consists of a $1\times 1$ conv, a $3\times 3$ group conv, and a final $1\times 1$ conv, where the $1\times 1$ convs alter the channel width. BatchNorm [9] and ReLU follow each conv. The block has 3 parameters: the width $w_{i}$ , bottleneck ratio $b_{i}$ , and group width $g_{i}$ . (b) The stride-two ( $s = 2$ ) version. + +![](images/f3519be8934a8fde37689febd7c483c47f2f972f1789e6233fb8f4c110f4ff99.jpg) +(b) X block, $s = 2$ + +The AnyNetX design space has 16 degrees of freedom as each network consists of 4 stages and each stage $i$ has 4 parameters: the number of blocks $d_{i}$ , block width $w_{i}$ , bottleneck ratio $b_{i}$ , and group width $g_{i}$ . We fix the input resolution $r = 224$ unless otherwise noted. To obtain valid models, we perform log-uniform sampling of $d_{i} \leq 16$ , $w_{i} \leq 1024$ and divisible by 8, $b_{i} \in \{1,2,4\}$ , and $g_{i} \in \{1,2,\dots,32\}$ (we test these ranges later). We repeat the sampling until we obtain $n = 500$ models in our target complexity regime (360MF to 400MF), and train each model for 10 epochs. Basic statistics for AnyNetX were shown in Figure 2. + +There are $(16\cdot 128\cdot 3\cdot 6)^{4}\approx 10^{18}$ possible model configurations in the AnyNetX design space. Rather than searching for the single best model out of these $\sim 10^{18}$ configurations, we explore whether there are general design principles that can help us understand and refine this design space. To do so, we apply our approach of designing design spaces. In each step of this approach, our aims are: + +1. to simplify the structure of the design space, +2. to improve the interpretability of the design space, +3. to improve or maintain the design space quality, +4. to maintain model diversity in the design space. + +We now apply this approach to the AnyNetX design space. + +AnyNetX. For clarity, going forward we refer to the initial, unconstrained AnyNetX design space as AnyNetX. + +AnyNetX $_{\text{B}}$ . We first test a shared bottleneck ratio $b_{i} = b$ for all stages $i$ for the AnyNetX $_{\text{A}}$ design space, and refer to the resulting design space as AnyNetX $_{\text{B}}$ . As before, we sample and train 500 models from AnyNetX $_{\text{B}}$ in the same settings. The EDFs of AnyNetX $_{\text{A}}$ and AnyNetX $_{\text{B}}$ , shown in Figure 5 (left), are virtually identical both in the average and best case. This indicates no loss in accuracy when coupling the $b_{i}$ . In addition to being simpler, the AnyNetX $_{\text{B}}$ is more amenable to analysis, see for example Figure 5 (right). + +![](images/0008ea0fba508f6aad9f77a9599d68717b06a8f6aa7f824c8537882ecbbf1541.jpg) +Figure 5. AnyNetXB (left) and AnyNetXC (middle) introduce a shared bottleneck ratio $b_i = b$ and shared group width $g_i = g$ , respectively. This simplifies the design spaces while resulting in virtually no change in the error EDFs. Moreover, AnyNetXB and AnyNetXC are more amendable to analysis. Applying an empirical bootstrap to $b$ and $g$ we see trends emerge, e.g., with 95% confidence $b \leq 2$ is best in this regime (right). No such trends are evident in the individual $b_i$ and $g_i$ in AnyNetXA (not shown). + +![](images/568e3d6158b68348f3d4e01c7ce1628563f1679d407a65d225d3f1a5882584ae.jpg) + +![](images/a62a9cd198a50621cedcc1f59d11c1944ad5d2222d915386b21eea1ba5f90ce0.jpg) + +![](images/caf8dca75e6e106793bfdace90333a4103e33e571894d15710198f0d4318a0eb.jpg) + +![](images/f2b209f348e24581a45000787e7861297cb2e0cc60f7bf391bf024d2fdc31a13.jpg) + +![](images/5240d0722f03fc6313afe1af230c1e05b654f375188de2dbb5bc72863727552f.jpg) + +![](images/7cd38c6b488270393db4deaec0d53e62b7f84c2a9a67c05c773449dc7a369add.jpg) +Figure 6. Example good and bad AnyNetXc networks, shown in the top and bottom rows, respectively. For each network, we plot the width $w_{j}$ of every block $j$ up to the network depth $d$ . These per-block widths $w_{j}$ are computed from the per-stage block depths $d_{i}$ and block widths $w_{i}$ (listed in the legends for reference). + +![](images/e5f2d5efe4ebc5c0c2312b0a514e85af0c0ec693e6f66bcbeae2abbe6aa96c0f.jpg) + +![](images/a0ec539793fb3eb2db5c0e0889ac45fee783309f2b56d666431a8c1d01913441.jpg) + +AnyNetXc. Our second refinement step closely follows the first. Starting with AnyNetXb, we additionally use a shared group width $g_{i} = g$ for all stages to obtain AnyNetXc. As before, the EDFs are nearly unchanged, see Figure 5 (middle). Overall, AnyNetXc has 6 fewer degrees of freedom than AnyNetXA, and reduces the design space size nearly four orders of magnitude. Interestingly, we find $g > 1$ is best (not shown); we analyze in more detail in the arXiv. + +AnyNetXd. Next, we examine typical network structures of both good and bad networks from AnyNetXc in Figure 6. A pattern emerges: good network have increasing widths. We test the design principle of $w_{i+1} \geq w_i$ , and refer to the design space with this constraint as AnyNetXd. In Figure 7 (left) we see this improves the EDF substantially. We return to examining other options for controlling width shortly. + +AnyNetXE. Upon further inspection of many models (not shown), we observed another interesting trend. In addition to stage widths $w_{i}$ increasing with $i$ , the stage depths $d_{i}$ likewise tend to increase for the best models, although not necessarily in the last stage. Nevertheless, we test a design space variant AnyNetXE with $d_{i+1} \geq d_{i}$ in Figure 7 (right), and see it also improves results. Finally, we note that the constraints on $w_{i}$ and $d_{i}$ each reduce the design space by 4!, with a cumulative reduction of $O(10^{7})$ from AnyNetXA. + +![](images/d47345038b6810b99aa6316b9e933aa65c986b1113d44a1a8df089ff0c48c79d.jpg) +Figure 7. AnyNetX $_{\text{D}}$ (left) and AnyNetX $_{\text{E}}$ (right). We show various constraints on the per stage widths $w_{i}$ and depths $d_{i}$ . In both cases, having increasing $w_{i}$ and $d_{i}$ is beneficial, while using constant or decreasing values is much worse. Note that AnyNetX $_{\text{D}} = \text{AnyNetX}_{\text{C}} + w_{i+1} \geq w_{i}$ , and AnyNetX $_{\text{E}} = \text{AnyNetX}_{\text{D}} + d_{i+1} \geq d_{i}$ . We explore stronger constraints on $w_{i}$ and $d_{i}$ shortly. + +![](images/05132642ea80b6aa6c458e04ccab98f4c5363243fa8d82f2c625a7b28c5d7291.jpg) + +![](images/960f7b4ab202a0522c0eae3eb1613af536896be43696ad38b5f46ffd0d6d03dc.jpg) + +![](images/cc230709f886e2f7051e8eabdeb02b56c8e0e37b63f34981db622104b7861c15.jpg) + +![](images/c9c67c656ed9631e93f6326c4ad698eb23c7b3a9e1aeee679f7675d4b1cd9c16.jpg) + +![](images/559359cb799d4868bc2cf3cba4628efd0a48fb43e0f3809ce7d9cdda740ead5f.jpg) +Figure 8. Linear fits. Top networks from the AnyNetX design space can be well modeled by a quantized linear parameterization, and conversely, networks for which this parameterization has a higher fitting error $e_{\mathrm{fit}}$ tend to perform poorly. See text for details. + +![](images/699bc5d9d034447157e6231992a889810cd06e06c04f1a6ec07ddd82306bfead.jpg) + +![](images/d2a638c684f45d2eb9e668f28cf9d53c430ff7f1cba8e409e2fded28fcf97826.jpg) + +# 3.3. The RegNet Design Space + +To gain further insight into the model structure, we show the best 20 models from AnyNetX $_{\mathrm{E}}$ in a single plot, see Figure 8 (top-left). For each model, we plot the per-block width $w_{j}$ of every block $j$ up to the network depth $d$ (we use $i$ and $j$ to index over stages and blocks, respectively). See Figure 6 for reference of our model visualization. + +While there is significant variance in the individual models (gray curves), in the aggregate a pattern emerges. In particular, in the same plot we show the line $w_{j} = 48 \cdot (j + 1)$ for $0 \leq j \leq 20$ (solid black curve, please note that the y-axis is logarithmic). Remarkably, this trivial linear fit seems to explain the population trend of the growth of network widths for top models. Note, however, that this linear fit assigns a different width $w_{j}$ to each block, whereas individual models have quantized widths (piecewise constant functions). + +To see if a similar pattern applies to individual models, we need a strategy to quantize a line to a piecewise constant function. Inspired by our observations from $\mathrm{AnyNetX_D}$ and $\mathrm{AnyNetX_E}$ , we propose the following approach. First, we introduce a linear parameterization for block widths: + +$$ +u _ {j} = w _ {0} + w _ {a} \cdot j \quad \text {f o r} \quad 0 \leq j < d \tag {2} +$$ + +This parameterization has three parameters: depth $d$ , initial width $w_0 > 0$ , and slope $w_a > 0$ , and generates a different block width $u_j$ for each block $j < d$ . To quantize $u_j$ , + +![](images/eb0ffebf9c1d40acd2acbdd468117e3902f7776b3419c0c1e3bb0c301a64cf4b.jpg) +Figure 9. RegNetX design space. See text for details. + +we introduce an additional parameter $w_{m} > 0$ that controls quantization as follows. First, given $u_{j}$ from Eqn. (2), we compute $s_{j}$ for each block $j$ such that the following holds: + +$$ +u _ {j} = w _ {0} \cdot w _ {m} ^ {s _ {j}} \tag {3} +$$ + +Then, to quantize $u_{j}$ , we simply round $s_j$ (denoted by $\lfloor s_j\rfloor$ ) and compute quantized per-block widths $w_{j}$ via: + +$$ +w _ {j} = w _ {0} \cdot w _ {m} ^ {\left\lfloor s _ {j} \right\rceil} \tag {4} +$$ + +We can convert the per-block $w_{j}$ to our per-stage format by simply counting the number of blocks with constant width, that is, each stage $i$ has block width $w_{i} = w_{0} \cdot w_{m}^{i}$ and number of blocks $d_{i} = \sum_{j} \mathbf{1}[\lfloor s_{j} \rfloor = i]$ . When only considering four stage networks, we ignore the parameter combinations that give rise to a different number of stages. + +We test this parameterization by fitting to models from AnyNetX. In particular, given a model, we compute the fit by setting $d$ to the network depth and performing a grid search over $w_{0}$ , $w_{a}$ and $w_{m}$ to minimize the mean log-ratio (denoted by $e_{\mathrm{fit}}$ ) of predicted to observed per-block widths. Results for two top networks from AnyNetX are shown in Figure 8 (top-right). The quantized linear fits (dashed curves) are good fits of these best models (solid curves). + +Next, we plot the fitting error $e_{\mathrm{fit}}$ versus network error for every network in AnyNetXc through AnyNetXe in Figure 8 (bottom). First, we note that the best models in each design space all have good linear fits. Indeed, an empirical bootstrap gives a narrow band of $e_{\mathrm{fit}}$ near 0 that likely contains the best models in each design space. Second, we note that on average, $e_{\mathrm{fit}}$ improves going from AnyNetXc to AnyNetXe, showing that the linear parametrization naturally enforces related constraints to $w_{i}$ and $d_{i}$ increasing. + +To further test the linear parameterization, we design a design space that only contains models with such linear structure. In particular, we specify a network structure via 6 parameters: $d$ , $w_0$ , $w_a$ , $w_m$ (and also $b$ , $g$ ). Given these, we generate block widths and depths via Eqn. (2)-(4). We refer to the resulting design space as RegNet, as it contains only simple, regular models. We sample $d < 64$ , $w_0$ , $w_a < 256$ , $1.5 \leq w_m \leq 3$ and $b$ and $g$ as before (ranges set based on $e_{\mathrm{fit}}$ on AnyNetX_E). + +The error EDF of RegNetX is shown in Figure 9 (left). Models in RegNetX have better average error than AnyNetX while maintaining the best models. In Figure 9 (middle) we test two further simplifications. First, using $w_{m} = 2$ (doubling width between stages) slightly improves the EDF, but we note that using $w_{m} \geq 2$ performs better + +
restrictiondim.combinationstotal
AnyNetXAnone16(16·128·3·6)4~1.8·1018
AnyNetXB+bi+1=bi13(16·128·6)4·3~6.8·1016
AnyNetXC+gi+1=gi10(16·128)4·3·6~3.2·1014
AnyNetXD+wi+1≥wi10(16·128)4·3·6/(4!)~1.3·1013
AnyNetXE+dji+1≥di10(16·128)4·3·6/(4!)2~5.5·1011
RegNetquantized linear6~644·6·3~3.0·108
+ +Table 1. Design space summary. See text for details. + +![](images/b3d2868c9defab524f005eb2881579f5b6ee0d8a959bca8a8cc1425e2dde7912.jpg) + +![](images/3c8aa8576a138d05646f01dcf20944c272a91750e96b876c763f39fa48c439fd.jpg) + +![](images/3334e8efb42c1d1eb718714c012eab06e238a826119d570712eea2f1a99023fd.jpg) + +![](images/2ffeb1d4360641b68f6de2e19a53f5cd24df29413587448d64dc4baa52fd12b0.jpg) +Figure 10. RegNetX generalization. We compare RegNetX to AnyNetX at higher flops (top-left), higher epochs (top-middle), with 5-stage networks (top-right), and with various block types (bottom). In all cases the ordering of the design spaces is consistent and we see no signs of design space overfitting. + +![](images/5949662e8ff9e9823977ee6d9080932cc54fc42349b6e4f8428b0769e6519d93.jpg) + +![](images/5a5c92dc03acccd41bf45de828bbf3b9a89544b4a535aea04bf70a20eb912f3e.jpg) + +(shown later). Second, we test setting $w_{0} = w_{a}$ , further simplifying the linear parameterization to $u_{j} = w_{a} \cdot (j + 1)$ . Interestingly, this performs even better. However, to maintain the diversity of models, we do not impose either restriction. Finally, in Figure 9 (right) we show that random search efficiency is much higher for RegNetX; searching over just $\sim 32$ random models is likely to yield good models. + +Table 1 shows a summary of the design space sizes (for RegNet we estimate the size by quantizing its continuous parameters). In designing RegNetX, we reduced the dimension of the original AnyNetX design space from 16 to 6 dimensions, and the size nearly 10 orders of magnitude. We note, however, that RegNet still contains a good diversity of models that can be tuned for a variety of settings. + +# 3.4. Design Space Generalization + +We designed the RegNet design space in a low-compute, low-epoch training regime with only a single block type. However, our goal is not to design a design space for a single setting, but rather to discover general principles of network design that can generalize to new settings. + +In Figure 10, we compare the RegNetX design space to AnyNet $X_A$ and AnyNet $X_E$ at higher flops, higher epochs, with 5-stage networks, and with various block types (described in the arXiv). In all cases the ordering of the design spaces is consistent, with RegNet $X > \text{AnyNet} X_E > \text{AnyNet} X_A$ . In other words, we see no signs of overfitting. These results are promising because they show RegNet can generalize to new settings. The 5-stage results show the regular structure of RegNet can generalize to more stages, where AnyNet $X_A$ has even more degrees of freedom. + +![](images/d313a7afcdc14899493d0a85994ed1c290d5e56c799ab24acbd1ced2b4bb20de.jpg) +Figure 11. Top REGNETX models. We measure inference time for 64 images on an NVIDIA V100 GPU; train time is for 100 epochs on 8 GPUs with the batch size listed. Network diagram legends contain all information required to implement the models. + +# 4. Comparison to Existing Networks + +We now compare top models from the RegNetX and RegNetY design spaces (see arXiv) to the state-of-the-art on ImageNet [2] across regimes. We denote individual models using small caps, e.g. REGNETX. We also suffix the models with the flop regime, e.g. 400MF. For each flop regime, we pick the best model from 25 random settings of the RegNet parameters $(d, g, w_{m}, w_{a}, w_{0})$ , and re-train the top model 5 times at 100 epochs to obtain robust error estimates. + +Resulting top REGNETX and REGNETY models for each flop regime are shown in Figures 11 and 12. In addition to the simple linear structure and the trends we analyze in the arXiv, we observe an interesting pattern. Namely, the higher flop models have a large number of blocks in the third stage and a small number of blocks in the last stage. This is similar to the design of standard RESNET models. Moreover, we observe that the group width $g$ increases with complexity, but depth $d$ saturates for large models. + +Our goal is to perform fair comparisons and provide simple and easy-to-reproduce baselines. We note that along with better architectures, much of the recently reported gains in network performance are based on enhancements to the training setup and regularization scheme (see arXiv). As our focus is on evaluating network architectures, we perform carefully controlled experiments under the same training setup. In particular, to provide fair comparisons to classic work, we do not use any training-time enhancements. + +![](images/9d0930200c234de11c4f630a2928d9c75d8ac3a10ee728112e798a804f6645a0.jpg) +Figure 12. Top REGNETY models (Y=X+SE). The benchmarking setup and the figure format is the same as in Figure 11. + +# 4.1. State-of-the-Art Comparison: Mobile Regime + +Much of the recent work on network design has focused on the mobile regime ( $\sim 600\mathrm{MF}$ ). In Table 2, we compare REGNET models at 600MF to existing mobile networks. We observe that REGNETs are surprisingly effective in this regime considering the substantial body of work on finding better mobile networks via both manual design [7, 21, 16] and NAS [30, 19, 14, 15]. + +We emphasize that REGNET models use our basic 100 epoch schedule with no regularization except weight decay, while most mobile networks use longer schedules with various enhancements, such as deep supervision [13], Cutout [3], DropPath [11], AutoAugment [1], and so on. As such, we hope our strong results obtained with a short training schedule without enhancements can serve as a simple baseline for future work. + +
flops (B)params (M)top-1 error
MOBILENET [7]0.574.229.4
MOBILENET-V2 [21]0.596.925.3
SHUFFLENET [28]0.52-26.3
SHUFFLENET-V2 [16]0.59-25.1
NASNET-A [30]0.565.326.0
AMOEBA.NET-C [19]0.576.424.3
PNASNET-5 [14]0.595.125.8
DARTS [15]0.574.726.7
REGNETX-600MF0.606.225.9±0.03
REGNETY-600MF0.606.124.5±0.07
+ +Table 2. Mobile regime. We compare existing models using originally reported errors to RegNet models trained in a basic setup. Our simple RegNet models achieve surprisingly good results given the effort focused on this regime in the past few years. + +![](images/9d1d35758df544ec4a83bf17de0d7f0b1e30d057f1e5bcc8ab20683d94f5f30c.jpg) +Figure 13. ResNe(X)t comparisons. REGNETX models versus RESNE(X)T-(50,101,152) under various complexity metrics. As all models use the identical components and training settings, all observed gains are from the design of the RegNetX design space. + +
flops (B)params (M)acts (M)infer (ms)train (hr)top-1 error ours \( \pm \) std [orig]
RESNET-504.122.611.15312.2\( {23.2}_{\pm {0.09}}\left\lbrack {23.9}\right\rbrack \)
REGNETX-3.2GF3.215.311.45714.3\( {\mathbf{{21.7}}}_{\pm {0.08}} \)
RESNEXT-504.225.014.47818.0\( {21.9}_{\pm {0.10}}\left\lbrack {22.2}\right\rbrack \)
RESNET-1017.844.616.29020.4\( {21.4}_{\pm {0.11}}\left\lbrack {22.0}\right\rbrack \)
REGNETX-6.4GF6.526.216.49223.5\( {\mathbf{{20.8}}}_{\pm {0.07}} \)
RESNEXT-1018.044.221.213731.8\( {20.7}_{\pm {0.08}}\left\lbrack {21.2}\right\rbrack \)
RESNET-15211.560.222.613029.2\( {20.9}_{\pm {0.12}}\left\lbrack {21.6}\right\rbrack \)
REGNETX-12GF12.146.121.413732.9\( {\mathbf{{20.3}}}_{\pm {0.04}} \)
+ +
RESNET-504.122.611.15312.2\( {23.2} \pm {0.09}\left\lbrack {23.9}\right\rbrack \)
RESNExT-504.225.014.47818.0\( {21.9} \pm {0.10}\left\lbrack {22.2}\right\rbrack \)
REGNETX-4.0GF4.022.112.26917.1\( {\mathbf{{21.4}}}^{ \pm }{}_{-{0.19}} \)
RESNET-1017.844.616.29020.4\( {21.4} \pm {0.11}\left\lbrack {22.0}\right\rbrack \)
RESNExT-1018.044.221.213731.8\( {\mathbf{{20.7}}}^{ \pm }{}_{-{0.08}}\left\lbrack {21.2}\right\rbrack \)
REGNETX-8.0GF8.039.614.19422.6\( {\mathbf{{20.7}}}^{ \pm }{}_{-{0.07}} \)
RESNET-15211.560.222.613029.2\( {20.9} \pm {0.12}\left\lbrack {21.6}\right\rbrack \)
RESNExT-15211.760.029.719745.7\( {20.4} \pm {0.06}\left\lbrack {21.1}\right\rbrack \)
REGNETX-12GF12.146.121.413732.9\( {\mathbf{{20.3}}}^{ \pm }{}_{-{0.04}} \)
+ +# 4.2. Standard Baselines Comparison: ResNe(X)t + +Next, we compare REGNETX to standard RESNET [6] and RESNEXT [26] models. All of the models in this experiment come from the exact same design space, the former being manually designed, the latter being obtained through design space design. For fair comparisons, we compare REGNET and RESNE(X)T models under the same training setup (our standard REGNET training setup). We note that this results in improved RESNE(X)T baselines and highlights the importance of carefully controlling the training setup. + +Comparisons are shown in Figure 13 and Table 3. Overall, we see that REGNETX models, by optimizing the network structure alone, provide considerable improvements under all complexity metrics. We emphasize that good REGNET models are available across a wide range of compute regimes, including in low-compute regimes where good RESNE(X)T models are not available. + +Table 3a shows comparisons grouped by activations (which can strongly influence runtime on accelerators such as GPUs). This setting is of particular interest to the research community where model training time is a bottleneck and will likely have more real-world use cases in the future, especially as accelerators gain more use at inference time (e.g., in self-driving cars). REGNETX models are quite effective given a fixed inference or training time budget. + +![](images/a4f5c5d76653eef5b626059ab79f44d333e88500b8dc84f9e8fd6b7deaa0caa0.jpg) +Figure 14. EFFICIENTNET comparisons. REGNETs outperform the state of the art, especially when considering activations. + +![](images/a514ca30f18180cde78a7fd9fca443a2739fe814c8f8c4f423c390d5eab44d41.jpg) + +![](images/2645811e4ee965e54cac45bc75033db0a7675b7445a9326d0022100987646b81.jpg) + +Table 3. ResNE(X)T comparisons. (a) Grouped by activations, REGNETX show considerable gains (note that for each group GPU inference and training times are similar). (b) REGNETX models outperform ResNE(X)T models under fixed flops as well. + +
flops (B)params (M)acts (M)batch sizeinfer (ms)train (hr)top-1 error ours±std [orig]
EFFICIENTNET-B00.45.36.72563411.724.9±0.03 [23.7]
REGNETY-400MF0.44.33.91024195.125.9±0.16
EFFICIENTNET-B10.77.810.92565215.624.1±0.16 [21.2]
REGNETY-600MF0.66.14.31024195.224.5±0.07
EFFICIENTNET-B21.09.213.82566818.423.4±0.06 [20.2]
REGNETY-800MF0.86.35.21024226.023.7±0.03
EFFICIENTNET-B31.812.023.825611432.122.5±0.05 [18.9]
REGNETY-1.6GF1.611.28.010243910.122.0±0.08
EFFICIENTNET-B44.219.048.512824065.121.2±0.06 [17.4]
REGNETY-4.0GF4.020.612.35126816.820.6±0.08
EFFICIENTNET-B59.930.098.964504135.121.5±0.11 [16.7]
REGNETY-8.0GF8.039.218.051211328.120.1±0.09
+ +Table 4. EFFICIENTNET comparisons using our standard training schedule. Under comparable training settings, REGNETY outperforms EFFICIENTNET for most flop regimes. Moreover, REGNET models are considerably faster, e.g., REGNETX-F8000 is about $5 \times$ faster than EFFICIENTNET-B5. Note that originally reported errors for EFFICIENTNET (shown grayed out), are much lower but use longer and enhanced training schedules, see arXiv. + +# 4.3. State-of-the-Art Comparison: Full Regime + +We focus our comparison on EFFICIENTNET [25], which is representative of the state of the art and has reported impressive gains using a combination of NAS and an interesting model scaling rule across complexity regimes. + +To enable direct comparisons, and to isolate gains due to improvements solely of the network architecture, we opt to reproduce the exact EFFICIENTNET models but using our standard training setup, with a 100 epoch schedule and no regularization except weight decay (effect of longer schedule and stronger regularization are shown in the arXiv). We optimize only $lr$ and $wd$ , see arXiv. This is the same setup as REGNET and enables fair comparisons. + +Results are shown in Figure 14 and Table 4. At low flops, EFFICIENTNET outperforms the REGNETY. At intermediate flops, REGNETY outperforms EFFICIENTNET, and at higher flops both REGNETX and REGNETY perform better. + +We also observe that for EFFICIENTNET, activations scale linearly with flops (due to the scaling of both resolution and depth), compared to activations scaling with the square-root of flops for REGNETs. This leads to slow GPU training and inference times for EFFICIENTNET. E.g., REGNETX-8000 is $5 \times$ faster than EFFICIENTNET-B5, while having lower error. + +# 5. Conclusion + +In this work, we present a new network design paradigm. Our results suggest that designing network design spaces is a promising avenue for future research. See the arXiv for substantial additional experiments and ablations. + +# References + +[1] E. D. Cubuk, B. Zoph, D. Mane, V. Vasudevan, and Q. V. Le. AutoAugment: Learning augmentation policies from data. arXiv:1805.09501, 2018. 7 +[2] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. 2, 3, 7 +[3] T. DeVries and G. W. Taylor. Improved regularization of convolutional neural networks with cutout. arXiv:1708.04552, 2017. 7 +[4] B. Efron and R. J. Tibshirani. An introduction to the bootstrap. CRC press, 1994. 3 +[5] K. He, X. Zhang, S. Ren, and J. Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In ICCV, 2015. 2 +[6] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2016. 1, 2, 3, 8 +[7] A. G. Howard, M. Zhu, B. Chen, D. Kalenichenko, W. Wang, T. Weyand, M. Andreetto, and H. Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv:1704.04861, 2017. 2, 7 +[8] G. Huang, Z. Liu, L. Van Der Maaten, and K. Q. Weinberger. Densely connected convolutional networks. In CVPR, 2017. 2 +[9] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. 4 +[10] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. 1, 2 +[11] G. Larsson, M. Maire, and G. Shakhnarovich. Fractalnet: Ultra-deep neural networks without residuals. In ICLR, 2017. 7 +[12] Y. LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Backpropagation applied to handwritten zip code recognition. Neural computation, 1989. 1 +[13] C.-Y. Lee, S. Xie, P. Gallagher, Z. Zhang, and Z. Tu. Deeply-supervised nets. In AISTATS, 2015. 7 +[14] C. Liu, B. Zoph, M. Neumann, J. Shlens, W. Hua, L.-J. Li, L. Fei-Fei, A. Yuille, J. Huang, and K. Murphy. Progressive neural architecture search. In ECCV, 2018. 2, 7 +[15] H. Liu, K. Simonyan, and Y. Yang. Darts: Differentiable architecture search. In ICLR, 2019. 1, 2, 7 +[16] N. Ma, X. Zhang, H.-T. Zheng, and J. Sun. Shufflenet v2: Practical guidelines for efficient cnn architecture design. In ECCV, 2018. 7 +[17] H. Pham, M. Y. Guan, B. Zoph, Q. V. Le, and J. Dean. Efficient neural architecture search via parameter sharing. In ICML, 2018. 2 +[18] I. Radosavovic, J. Johnson, S. Xie, W.-Y. Lo, and P. Dollar. On network design spaces for visual recognition. In ICCV, 2019. 1, 2, 3, 4 +[19] E. Real, A. Aggarwal, Y. Huang, and Q. V. Le. Regularized evolution for image classifier architecture search. In AAAI, 2019. 2, 7 + +[20] B. Recht, R. Roelofs, L. Schmidt, and V. Shankar. Do image-net classifiers generalize to imagenet? arXiv:1902.10811, 2019. 2 +[21] M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L.-C. Chen. *Mobilenetv2: Inverted residuals and linear bottle-necks*. In *CVPR*, 2018. 2, 7 +[22] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. 1, 2 +[23] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In CVPR, 2015. 2 +[24] C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna. Rethinking the inception architecture for computer vision. In CVPR, 2016. 2 +[25] M. Tan and Q. V. Le. Efficientnet: Rethinking model scaling for convolutional neural networks. ICML, 2019. 1, 2, 8 +[26] S. Xie, R. Girshick, P. Dollar, Z. Tu, and K. He. Aggregated residual transformations for deep neural networks. In CVPR, 2017. 2, 4, 8 +[27] S. Zagoruyko and N. Komodakis. Wide residual networks. In BMVC, 2016. 2 +[28] X. Zhang, X. Zhou, M. Lin, and J. Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. In CVPR, 2018. 7 +[29] B. Zoph and Q. V. Le. Neural architecture search with reinforcement learning. In ICLR, 2017. 1 +[30] B. Zoph, V. Vasudevan, J. Shlens, and Q. V. Le. Learning transferable architectures for scalable image recognition. In CVPR, 2018. 2, 7 \ No newline at end of file diff --git a/designingnetworkdesignspaces/images.zip b/designingnetworkdesignspaces/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7122f9a095c08621baa69716f5b36be6d094dbdf --- /dev/null +++ b/designingnetworkdesignspaces/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb0c26312d8697a64a079321c3cc2a0f7230e264ea4474a4b16cd4ef325ea391 +size 725432 diff --git a/designingnetworkdesignspaces/layout.json b/designingnetworkdesignspaces/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..67f94b6ff6dc19f7283331632db30f807c3d9ba6 --- /dev/null +++ b/designingnetworkdesignspaces/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89f78707f48759735d0ea005c29c1d3a030085b6927f26960e65aaa0d2dd1ba5 +size 487975 diff --git a/detailed2d3djointrepresentationforhumanobjectinteraction/bc6fd72a-c44d-4334-b1a4-4e16fa7d3462_content_list.json b/detailed2d3djointrepresentationforhumanobjectinteraction/bc6fd72a-c44d-4334-b1a4-4e16fa7d3462_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..9210d555a30e8601362b23fc104df55134b72d38 --- /dev/null +++ b/detailed2d3djointrepresentationforhumanobjectinteraction/bc6fd72a-c44d-4334-b1a4-4e16fa7d3462_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:515bf888170695e09241f1bb7877ea42e272a8a879337c79de8865aabdb2fd89 +size 85152 diff --git a/detailed2d3djointrepresentationforhumanobjectinteraction/bc6fd72a-c44d-4334-b1a4-4e16fa7d3462_model.json b/detailed2d3djointrepresentationforhumanobjectinteraction/bc6fd72a-c44d-4334-b1a4-4e16fa7d3462_model.json new file mode 100644 index 0000000000000000000000000000000000000000..22a46fd82601ea0c8fc366da2ae7a51b5d7e9a03 --- /dev/null +++ b/detailed2d3djointrepresentationforhumanobjectinteraction/bc6fd72a-c44d-4334-b1a4-4e16fa7d3462_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77b6924a690b0ee62319b6d00315d29fcc64d22ca71f88ac3c6c767bd3cdf13b +size 105064 diff --git a/detailed2d3djointrepresentationforhumanobjectinteraction/bc6fd72a-c44d-4334-b1a4-4e16fa7d3462_origin.pdf b/detailed2d3djointrepresentationforhumanobjectinteraction/bc6fd72a-c44d-4334-b1a4-4e16fa7d3462_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..814dbf8599c0f750c625ed053110e4b8f28be145 --- /dev/null +++ b/detailed2d3djointrepresentationforhumanobjectinteraction/bc6fd72a-c44d-4334-b1a4-4e16fa7d3462_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6af74f5d3da2759f9314cda5bc657a5756d6a2bbc861a0236d2ab65f2a1b2dbe +size 10126368 diff --git a/detailed2d3djointrepresentationforhumanobjectinteraction/full.md b/detailed2d3djointrepresentationforhumanobjectinteraction/full.md new file mode 100644 index 0000000000000000000000000000000000000000..30df091436897f2f4715d2161312cb3c47c50f77 --- /dev/null +++ b/detailed2d3djointrepresentationforhumanobjectinteraction/full.md @@ -0,0 +1,356 @@ +# Detailed 2D-3D Joint Representation for Human-Object Interaction + +Yong-Lu Li, Xinpeng Liu, Han Lu, Shiyi Wang, Junqi Liu, Jiefeng Li, Cewu Lu* Shanghai Jiao Tong University + +yonglu.li@sjtu.edu.cn, xinpengliu0907@gmail.com, {sjtu.luhan, shiywang, ljq435, ljf likit, lucewu}@sjtu.edu.cn + +# Abstract + +Human-Object Interaction (HOI) detection lies at the core of action understanding. Besides 2D information such as human/object appearance and locations, 3D pose is also usually utilized in HOI learning since its viewindependence. However, rough 3D body joints just carry sparse body information and are not sufficient to understand complex interactions. Thus, we need detailed 3D body shape to go further. Meanwhile, the interacted object in 3D is also not fully studied in HOI learning. In light of these, we propose a detailed 2D-3D joint representation learning method. First, we utilize the singleview human body capture method to obtain detailed 3D body, face and hand shapes. Next, we estimate the 3D object location and size with reference to the 2D humanobject spatial configuration and object category priors. Finally, a joint learning framework and cross-modal consistency tasks are proposed to learn the joint HOI representation. To better evaluate the 2D ambiguity processing capacity of models, we propose a new benchmark named Ambiguous-HOI consisting of hard ambiguous images. Extensive experiments in large-scale HOI benchmark and Ambiguous-HOI show impressive effectiveness of our method. Code and data are available at https: //github.com/DirtyHarryLYL/DJ-RN. + +# 1. Introduction + +Human-Object Interaction (HOI) detection recently receives lots of attentions. It aims at locating the active human-object and inferring the action simultaneously. As a sub-task of visual relationship [37], it can facilitate activity understanding [6, 43, 44, 55], imitation learning [2], etc. + +What do we need to understand HOI? The possible answers are human/object appearance, spatial configuration, context, pose, etc. Among them, human body information + +![](images/d89f9c58c328593be1482944279fcd8b52e51469d06573e946cd04b0c5571fb6.jpg) +Figure 1. HOI detection based on 2D may have ambiguities under various viewpoints. HOI representation in 3D is more robust. Thus, we estimate the 3D detailed human body and interacted object location and size to represent the HOI in 3D. Then we learn a joint 2D-3D representation to combine multi-modal advantages. + +often plays an important role, such as 2D pose [31, 21, 58, 13] and 3D pose [63, 39]. Because of the various viewpoints, 2D human pose [7] or segmentation [22, 61, 16] often has ambiguities, e.g. same actions may have very different 2D appearances and poses. Although 3D pose is more robust, rough 3D body joints are not enough to encode essential geometric and meaningful patterns. For example, we may need detailed hand shape to infer the action "use a knife to cut", or facial shape for "eat and talk". And body shape would also largely affect human posture. In light of this, we argue that detailed 3D body can facilitate the HOI learning. Meanwhile, the object in HOI is also important, e.g. "hold an apple" and "hold the horse" have entirely different patterns. However, few studies considered how to embed 3D interacted objects in HOI. The reasons are two-fold: first, it is hard to reconstruct objects because of the 6D pose estimation and diverse object shapes (detailed point cloud or mesh [8, 64]). Second, estimating 3D human-object spatial relationship is also difficult for single-view. + +In this work, we propose a method to not only borrow essential discriminated clues from the detailed 3D body but also consider the 3D human-object spatial configuration. First, we represent the HOI in 3D. For human, we utilize the single-view human body capture [45] to obtain detailed human shape. For object, referring to the 2D human-object + +spatial configuration and object category prior, we estimate its rough location and size through perspective projection, and use a hollow sphere to represent it. Then, we put the 3D detailed human and object sphere into a normalized volume as the 3D HOI spatial configuration volume, as shown in Fig. 1. Next, we propose Detailed Joint Representation Network (DJ-RN), which consists of two feature extractors: a 2D Representation Network (2D-RN) and a 3D Representation Network (3D-RN). Finally, we adopt several consistency tasks to learn the 2D-3D joint HOI representation. In detail, we align the 2D spatial features according to more robust 3D spatial features. And we perform semantic alignment to ensure the cross-modal semantic consistency. To better embed the body posture, we estimate body part attentions in a 2D-3D joint way with consistency. That is if 2D features tell us the hands and head are important for "work on laptop", so will the 3D features. DJ-RN is the first joint learning method to utilize single-view 3D recover for HOI. It is a novel paradigm instead of an ad-hoc model, and flexible to replace 2D/3D modules/extracted features. We believe it would promote not only HOI learning but also action related tasks, e.g., image caption, visual reasoning. + +To better evaluate the ability of processing 2D ambiguities, we propose a new benchmark named Ambiguous-HOI, which includes ambiguous examples selected from existing datasets like HICO-DET [9], V-COCO [20], OpenImage [28], HCVRD [65]. We conduct extensive experiments on widely-used HOI detection benchmark and Ambiguous-HOI. Our approach achieves significant improvements with 2D-3D joint learning. The main contributions are as follows: 1) We propose a 2D-3D joint representation learning paradigm to facilitate HOI detection. 2) A new benchmark Ambiguous-HOI is proposed to evaluate the disambiguation ability of models. 3) We achieve state-of-the-art results on HICO-DET [9] and Ambiguous-HOI. + +# 2. Related Work + +Human-Object Interaction Detection. Recently, great progress has been made in HOI detection. Large-scale datasets [9, 20, 28] have been released to promote this field. Meanwhile, lots of deep learning based methods [19, 17, 31, 51, 21, 58, 48] have been proposed. Chao et al. [9] proposed a multi-stream framework, which is proven effective and followed by subsequent works [17, 31]. Differently, GPNN [51] proposed a graph model and used message passing to address both image and video HOI detection. Gkioxari et al. [19] adopted an action density map to estimate the 2D location of interacted objects. iCAN [17] utilized self-attention to correlate the human-object and context. TIN [31] proposed an explicit interactiveness learning network to identify the non-interactive human-object pairs and suppress them in inference. HAKE [30] proposes a novel hierarchical paradigm based on human body + +part states [38]. Previous methods mainly relied on the visual appearance and human-object spatial relative locations, some of them [31] also utilized the 2D estimated pose. But the 2D ambiguity in HOI is not well studied before. + +3D Pose-based Action Recognition. Recent deep learning based 3D pose estimation methods [26, 14, 46] have achieved substantial progresses. Besides 2D pose based action understanding [31, 29, 35, 10, 18, 59], many works also utilized the 3D human pose [54, 13, 62, 63, 39, 49, 27, 33, 3, 34, 40, 57, 24]. Yao et al. [62] constructed a 2.5D graph with 2D appearance and 3D human pose, and selected exemplar graphs of different actions for the exemplar-based action classification. In [63], 2D pose is mapped to 3D pose and the actions are classified by comparing the 3D pose similarity. Luvizon et al. [39] estimated the 2D/3D pose and recognized actions in a unified model from both image and video. Wang et al. [60] used the RGB-D data to obtain the 3D human joints and adopted an actionlet ensemble method for HOI learning. Recently, Pham et al. [49] proposed a multi-task model to operate 3D pose estimation and action recognition simultaneously from RGB video. Most 3D pose based methods [3, 34, 40, 57, 33, 49, 60, 13, 27, 24] are using Recurrent Nerval Network (RNN) based framework for spatio-temporal action recognition, but few studies focus on the complex HOI understanding from single RGB image. + +Single-view 3D Body Recover. Recently the single-view human body capture and reconstruction methods [45, 26, 42, 47, 4] have made great progresses. With the help of deep learning and large-scale scanned 3D human database [11, 25, 1], they are able to directly recover 3D body shape and pose from single RGB images. SMPLify-X [45] is a holistic and efficient model that takes the 2D human body, face and hand poses as inputs to capture 3D body, face and hands. To obtain more accurate and realistic body shape, SMPLify-X [45] utilizes the Variational Human Body Pose prior (VPoser) trained on large-scale MoCap datasets, which carries lots of human body pose prior and knowledge. It supports us to recover 3D detailed human body from HOI images and embed more body posture knowledge. + +# 3. Representing HOI in 3D + +Our goal is to learn the 2D-3D joint HOI representation, thus we need to first represent HOI in 3D. Given a still image, we use object detection [52] and pose estimation [7] to obtain 2D instance boxes and human pose. Next, we adopt the 3D human body capture [45] to estimate the 3D human body with above 2D detection (Sec. 3.1), and estimate the object location and size in 3D to construct the 3D spatial configuration volume (Sec. 3.2). + +# 3.1. Single-view 3D Body Capture + +Rough 3D pose is not sufficient to discriminate various actions, especially the complex interactions with daily ob + +![](images/fbd2cb9290401722fb7520886a42193c3a7240d72fc6516fb4f7c1eb3b529b24.jpg) +Figure 2. We adopt detailed human information. We use OpenPose [7] and SMPLify-X [45] to estimate the 2D, 3D poses and shapes of face and hands. These information would largely help the HOI learning, especially on actions related to face and hands. + +jects. Thus we need holistic and fine-grained 3D body information as a clue. To this end, we adopt a holistic 3D body capture method [45] to recover detailed 3D body from single RGB images. Given the 2D detection of image $I$ , i.e., 2D human and object boxes $b_{h}$ and $b_{o}$ , 2D human pose $\theta^{2D} = \{\theta_b^{2D},\theta_f^{2D},\theta_h^{2D}\}$ (main body joints $\theta_b^{2D}$ , jaw joints $\theta_f^{2D}$ and finger joints $\theta_h^{2D}$ in Fig. 2). We input them into SMPLify-X [45] to recover 3D human estimations, i.e., fitting the SMPL-X [45] model to $I$ and $\theta^{2D}$ . Then we can obtain the optimized shape parameters $\{\theta^{3D},\beta ,\psi \}$ by minimizing the body pose, shape objective function, where $\theta^{3D}$ are pose parameters and $\theta^{3D} = \{\theta_b^{3D},\theta_f^{3D},\theta_h^{3D}\}$ , $\beta$ are body, face and hands shape parameters, $\psi$ are facial expression parameters. The template body mesh is finally blended and deformed to fit the target body posture and shape in images. With function $M(\theta^{3D},\beta ,\psi):\mathbb{R}^{\lvert\theta^{3D}\rvert\times\lvert\beta\rvert\times\lvert\psi\rvert}\to$ $\mathbb{R}^{3N}$ , we can directly generate the 3D body mesh according to the estimated $\{\theta^{3D},\beta ,\psi \}$ from images and utilize it in the next stage, some examples are shown in Fig. 2. + +# 3.2. 3D Spatial Configuration Volume + +After obtaining the 3D body, we further represent HOI in 3D, i.e. estimate the 3D object location and size. For robustness and efficiency, we do not reconstruct the object shape, but use a hollow sphere to represent it. Thus we can avoid the difficult 6D pose estimation under the circumstance of single-view and various categories. Our procedure has two stages: 1) locating the sphere center on a plane according to the camera perspective projection, 2) using the prior object size and human-object distance to estimate the depth of the sphere. For each image, we adopt the estimated camera parameters from SMPLify-X [45], where focal length $f$ is set to a fixed value of 5000, and the camera distortions are not considered. For clarification, the camera optical center is expressed as $C(t_{1},t_{2},t_{3})$ in the world coordinate system, and the object sphere center is $O(x_O,y_O,z_O)$ . + +Object Sphere Center. As shown in Fig. 3, we assume that $O$ is projected to the midperpendicular of object box border-top, indicating the sphere center falls on plane $P_{ABC}$ . And we suppose the highest and lowest visible points of the + +![](images/e69b1128c60c774b82afecf940b5d47c0f7177a0e9610baa143cf121c4d29cac.jpg) +Figure 3. Object location estimation. Given prior radius $r$ , we can get the sphere center location by solving projection equations, which restricts the sphere to be tangent to plane $P_{1}$ and $P_{2}$ , and assures the sphere center falls on plane $P_{ABC}$ . + +sphere are projected to the object box border-bottom and border-top respectively. Then we can get two tangent planes of the sphere: $P_{1}$ (contains points B, C, E) and $P_{2}$ (contains points A, C, D) as shown in Fig. 3. $P_{1}$ and $P_{2}$ intersect with $P_{ABC}$ , restricting a region on $P_{ABC}$ where the sphere center may locate. To get the depth of sphere center, we need to know the sphere radius, i.e., $r = |\overrightarrow{OD}| = |\overrightarrow{OE}|$ . + +Object Sphere Radius. As for the sphere radius, we determine it by both considering the object box relative size (to the 2D human box) and the object category prior. With object detection in the first step, we can obtain the object category $j$ . Thus, we can set a rough object size according to Wikipedia and daily life experience. In practice, we set prior sizes for COCO 80 objects [32] to suit the HICO-DET setting [9]. First, for small objects or objects with similar size along different axes (e.g. ball, table), we define the prior object scale ratio between the sphere radius and the human shoulder width. Second, for objects that are usually partly seen or whose projection is seriously affected by the 6D pose (e.g. boat, skis), we use the relative scale ratio of the human and object boxes as the referenced ratio. The estimated sphere center is denoted as $\hat{O}(\hat{x}_O, \hat{y}_O, \hat{z}_O)$ . + +The sphere depth is very sensitive to the radius and may make the sphere away from human. Thus, we regularize the estimated depth $\hat{z}_c$ using the maximum and minimum depth $z_H^{max}, z_H^{min}$ of the recovered human. We define prior object depth regularization factor $\Gamma = \{[\gamma_i^{min}, \gamma_i^{max}]\}_{i=1}^{80}$ for COCO objects [32]. Specifically, with pre-defined depth bins (very close, close, medium, far, very far), we invite fifty volunteers from different backgrounds to watch HOI images and choose the degree of the object relative depth to the human. We then use their votes to set the empirical regularization factors $\Gamma$ . For estimated $\hat{O}(\hat{x}_O, \hat{y}_O, \hat{z}_O)$ , if $\hat{z}_O$ falls out of $[\gamma_j^{min} z_H^{min}, \gamma_j^{max} z_H^{max}]$ , we shift $\hat{O}$ to $(\hat{x}_O, \hat{y}_O, \gamma_j^{max} z_H^{max})$ or $(\hat{x}_O, \hat{y}_O, \gamma_j^{min} z_H^{min})$ , depending on which is closer to $\hat{O}$ . Size and depth priors can effectively restrict the error boundaries. Without them, 3D volume would have large deviation and degrade performance. + +Volume Formalization. Next, we perform translations to align different configurations in 3D. First, we set the coordinate origin as the human pelvis. The direction of gravity estimated is kept same with the negative direction of the z-axis, and the line between two human shoulder joints is rotated to be parallel to the x-axis. Then, we down-sample the 3D body to 916 points and randomly sample 312 points on spherical surface. The hollow sphere can keep the body information of the interacted body parts within the sphere. We then normalize the whole volume by setting unit length as the distance between the pupil joints. At last, we can obtain a normalized 3D volume including 3D body and object sphere, which not only carries essential 3D action information but also 3D human-object spatial configuration. + +# 4.2D-3D Joint Learning + +In this section, we aim to learn the joint representation. To this end, we propose Detailed Joint Representation Network (DJ-RN), as seen in Fig. 5. DJ-RN has two modules: 2D Representation Network (2D-RN) and 3D Representation Network (3D-RN). We use them to extract features from two modalities respectively (Sec. 4.1, 4.2). Then we align 2D spatial feature with 3D spatial feature (Sec. 4.3), and use body part attention consistency (Sec. 4.4) and semantic consistency (Sec. 4.5) to guide the learning. + +# 4.1. 2D Feature Extraction + +2D-RN is composed of human, object, and spatial streams following [9, 17, 31]. Within each stream, we adopt different blocks to take in 2D information with different properties and extract corresponding features (Fig. 5). + +Human/Object Block. Human and object streams mainly utilize visual appearance. We use a COCO [32] pretrained Faster-RCNN [52] to extract ROI pooling features from detected boxes. To enhance the representation ability, we adopt the iCAN block [17] which computes the selfattention via correlating the context and instances, and obtain the human feature $f_{H}^{2D}$ and object feature $f_{O}^{2D}$ . + +Spatial Block. Although appearance carries important clues, it also imports noise and misleading patterns from various viewpoints. Thus human-object spatial configuration can be used additionally to provide discriminative features [9, 17, 31]. Spatial stream mainly considers the 2D human-object relative locations. We input the 2D pose map and spatial map [31] to the spatial block, which consists of convolution and fully-connected (FC) layers to extract the spatial feature $f_{sp}^{2D}$ . The spatial map consists of two channels, human and object maps, which are all $64 \times 64$ and generated from the human and object boxes. The value is 1 in the box and 0 elsewhere. The pose map consists of 17 joint heatmaps of size $64 \times 64$ from OpenPose [7]. + +![](images/ecf26e5ae79c06f1cd32f59a32bf25c4f2d4c471c7e335ea739c544954226dff.jpg) +Figure 4. 3D spatial configuration volume. After 3D body capture, we use 2D boxes, estimated camera parameters and object category prior to estimate the 3D object location and size, and then put 3D human and object together in a normalized volume. We also pair the 3D location with semantic knowledge (Sec. 4.2). + +# 4.2.3D Feature Extraction + +3D-RN contains a 3D spatial stream with volume block which takes in the 3D spatial configuration volume, and a 3D human stream with 3D body block to encode 3D body. + +Volume Block. In 3D spatial stream, we adopt Point-Net [50] to extract 3D spatial feature $f_{sp}^{3D}$ . We first pre-train it to segment the human and object points in the generated 3D spatial configuration volume. Thus it can learn to discriminate the geometric difference and shape of human and object. Then we use it to extract features from 3D spatial volume point cloud. To further embed the semantic information of 3D locations, we pair the spatial feature with the corresponding semantics, i.e., the word embedding of object or body part category. We first divide the volume point cloud into 18 sets: 17 part sets and an object sphere set. Then, for the feature of part set, we concatenate it with PCA reduced word embedding [41] of part name (e.g. "hand"). Similarly, for the feature of the sphere set, we concatenate it with the object category word embedding (e.g. "bottle"), as seen in Fig. 4. The concatenated feature is used as $f_{sp}^{3D}$ . + +3D Body Block. In 3D body block, we extract features based on SMPL-X [45] parameters: joint body, face and hands shape $\beta$ , face expression $\psi$ and pose $\theta^{3D}$ , consisting of jaw joints $\theta_{f}^{3D}$ , finger joints $\theta_{h}^{3D}$ and body joints $\theta_{b}^{3D}$ . For body shape and expression, we directly use their parameters. For pose, we adopt the VPoser [45] to encode the 3D body into latent representations $\{f_{b}^{3D}, f_{f}^{3D}, f_{h}^{3D}\}$ for body, face and hands corresponding to $\{\theta_{b}^{3D}, \theta_{f}^{3D}, \theta_{h}^{3D}\}$ . VPoser is a variational auto-encoder trained with large-scale MoCap datasets [11, 25, 1]. Thus it learns a latent space encoding the manifold of the physically plausible pose, and effectively embeds the 3D body pose. We concatenate the latent representations, shape parameters and face expression, feed them to two 1024 sized FC layers, and get the 3D human feature $f_{H}^{3D} = F C_{3D}(\{\beta, \psi, f_{b}^{3D}, f_{f}^{3D}, f_{h}^{3D}\})$ . + +![](images/e32a60889e87271322d78e9419e8418f210f6718dc0d59d8f35fbf7a75a96427.jpg) +Figure 5. Overview of DJ-RN. The framework consists of two main modules, named 2D Representation Network (2D-RN) and 3D Representation Network (3D-RN). They extract HOI representations from 2D and 3D information respectively. Hence, we can use spatial alignment, part attention consistency and semantic consistency to learn a joint 2D-3D representation for HOI learning. + +# 4.3. 2D-3D Spatial Alignment + +In view of that 2D spatial features lack robustness and may bring in ambiguities, we propose the 2D spatial alignment. 3D spatial features are more robust, thus we refer them as anchors in the spatial space which describes the manifold of HOI spatial configuration. Given the 2D spatial feature $f_{sp}^{2D}$ of a sample, from the train set we randomly sample a positive 3D spatial feature $f_{sp+}^{3D}$ with the same HOI label and a negative feature $f_{sp-}^{3D}$ with non-overlapping HOIs (a person may perform multiple actions at the same time). For a human-object pair, we use triplet loss [53] to align its 2D spatial feature, i.e., + +$$ +\mathcal {L} _ {t r i} = \left[ d \left(f _ {s p} ^ {2 D}, f _ {s p +} ^ {3 D}\right) - d \left(f _ {s p} ^ {2 D}, f _ {s p -} ^ {3 D}\right) + \alpha \right] _ {+} \tag {1} +$$ + +where $d(\cdot)$ indicates the Euclidean distance, and $\alpha = 0.5$ is the margin value. For 2D samples with the same HOIs but different 2D spatial configurations, this spatial alignment will gather them together in the spatial space. + +# 4.4. Joint Body Part Attention Estimation + +Body parts are important in HOI understanding, but not all parts make great contributions in inference. Thus, adopting attention mechanism is apparently a good choice. Different from previous methods [12, 15], we generate body part attention by considering both 2D and 3D clues. Specifically, we use a part attention consistency loss to conduct self-attention learning, as shown in Fig. 6. With the 2D and 3D features, we can generate two sets of body attention. + +2D Attention. We concatenate the input $f_{H}^{2D}, f_{O}^{2D}, f_{sp}^{2D}$ to get $f^{2D}$ , and apply global average pooling (GAP) to get + +the global feature vector $f_{g}^{2D}$ . Then we calculate the inner product $\langle f_{g}^{2D}, f^{2D} \rangle$ and generate the attention map $att^{2D}$ by $att^{2D} = Softmax(\langle f_{g}^{2D}, f^{2D} \rangle)$ . Because 2D pose joints can indicate the part locations, we use joint attention to represent 2D part attention. If a joint location has high attention, its neighboring points should have high attention too. Thus we can calculate the pose joint attention by summarizing the attentions of its neighboring points. We represent the attention of 17 pose joints as $A^{2D} = \{a_{i}^{2D}\}_{i=1}^{17}$ , + +$$ +\hat {a} _ {i} ^ {2 D} = \frac {\sum_ {u , v} a t t _ {(u , v)} ^ {2 D} / (1 + d [ (u , v) , (u _ {i} , v _ {i}) ])}{\sum_ {u , v} 1 / (1 + d [ (u , v) , (u _ {i} , v _ {i}) ])}, \tag {2} +$$ + +and $a_i^{2D} = \frac{\hat{a}_i^{2D}}{\sum_{i=1}^{17} \hat{a}_i^{2D}}$ , where $(u, v)$ denotes arbitrary point on attention map $att^{2D}$ , $(u_i, v_i)$ indicates the coordinate of the $i$ -th joint (calculated by scaling the joint coordinate on image). $d[\cdot]$ denotes the Euclidean distance between two points. Eq. 2 means: if point $(u, v)$ is far from $(u_i, v_i)$ , the attention value of $(u, v)$ contributes less to the attention value of $(u_i, v_i)$ ; if $(u, v)$ is close to $(u_i, v_i)$ , it contributes more. After the summarizing and normalizing, we finally obtain the attention of $(u_i, v_i)$ , i.e. $a_i^{2D}$ . + +3D Attention. We use 3D joint attention to represent the 3D body part attention. Input $f_{sp}^{3D}$ is $[1228 \times 384]$ and $f_{H}^{3D}$ is [1024]. We first tile $f_{H}^{3D}$ 1228 times to get shape $[1228 \times 1024]$ , then concatenate it with $f_{sp}^{3D}$ to get $f^{3D}$ ([1228 × 1408]). Then we apply GAP to $f^{3D}$ to get a [1408] tensor, and feed it to two 512 sized FC layers and Softmax, finally obtain the attention for 17 joints, i.e., $A^{3D} = \{a_j^{3D}\}_{j=1}^{17}$ . + +![](images/7f40443a88a97f994cdd73daa1bd596a3b0d3def4559c66d4aea648302707a8d.jpg) +Figure 6. Body part attention alignment. For 2D, we apply self-attention on $f_{sp}^{2D}$ to generate attention map $att^{2D}$ and 2D part attention $A^{2D}$ . For 3D, we use $f_{sp}^{3D}$ to generate 3D part attention $A^{3D}$ , and get attention map $att^{3D}$ using the correspondence between point cloud and joints. Finally, we construct consistency loss $\mathcal{L}_{att}$ with $A^{3D}$ and $A^{2D}$ . $att^{2D}$ and $att^{3D}$ are used to reweight and generate $f_{sp}^{2D*}$ and $f_{sp}^{3D*}$ . + +Attention Consistency. Whereafter, we operate the attention alignment via an attention consistency loss: + +$$ +\mathcal {L} _ {a t t} = \sum_ {i} ^ {1 7} a _ {i} ^ {2 D} \ln \frac {a _ {i} ^ {2 D}}{a _ {i} ^ {3 D}}. \tag {3} +$$ + +where $a_{i}^{2D}$ and $a_{i}^{3D}$ are 2D and 3D attentions of the $i$ -th joint. $L_{att}$ is the Kullback-Leibler divergence between $A^{2D}$ and $A^{3D}$ , which enforces two attention estimators to generate similar part importance and keep the consistency. + +Next, in 2D-RN, we multiply $f_{sp}^{2D}$ by $att^{2D}$ , i.e. the Hadamard product $f_{sp}^{2D*} = f_{sp}^{2D} \circ att^{2D}$ . In 3D-RN, we first assign attention to each 3D point in the spatial configuration volume ( $n$ points in total). For human 3D points, we divide them into different sets according to 17 joints, and each set is corresponding to a body part. Within the $i$ -th set, we tile the body part attention $a_i^{3D}$ to each point. For object 3D points, we set all their attention as one. Because each element of $f_{sp}^{3D}$ is corresponding to a 3D point in the spatial configuration volume, we organize the attentions of both human and object 3D points as $att^{3D}$ of size $n \times 1$ , where $n$ is the number of elements in $f_{sp}^{3D}$ (Fig. 6). Thus we can calculate the Hadamard product $f_{sp}^{3D*} = f_{sp}^{3D} \circ att^{3D}$ . After the part feature re-weighting, our model can learn to neglect the parts unimportant to the HOI inference. + +# 4.5. 2D-3D Semantic Consistency + +After the feature extraction and re-weighting, we perform the HOI classification. All classifiers in each stream are composed of two 1024 sized FC layers and Sigmoids. The HOI score of the 2D-RN is $S^{2D} = (s_H^{2D} + s_O^{2D}) \circ s_{sp}^{2D}$ where $s_H^{2D}, s_O^{2D}, s_{sp}^{2D}$ are the scores of human, object and spatial stream. $S^{3D} = s_H^{3D} + s_{sp}^{3D}$ indicates the final prediction of the 3D-RN. To maintain the semantic consistency of + +![](images/6093ce8c82f1c010fd8ac893aa7bc46a60a23e10fc386c99f7b10657d6ffad06.jpg) +repair toaster + +![](images/2c6f99116556858c6af7d52f7044e8f510670ad9b1a9dfb8548497127a09ca2a.jpg) +Figure 7. Ambiguous samples from Ambiguous-HOI. + +![](images/3c27a5e21f444f3034f1cb9690537b529386fa870d5558613ef677c24ccab45b.jpg) +pick up sports ball + +![](images/69c2495538fe00391f3c14605fd06a4a3c98afd812200cac2f771011bd5f8016.jpg) + +2D and 3D representations, i.e. they should make the same prediction for the same sample, we construct: + +$$ +\mathcal {L} _ {s e m} = \sum_ {i} ^ {m} \left| \left| \mathcal {S} _ {i} ^ {2 D} - \mathcal {S} _ {i} ^ {3 D} \right| \right| _ {2}, \tag {4} +$$ + +where $m$ is the number of HOIs. + +Multiple HOI Inferences. Moreover, we concatenate the features from the last FC layers in 2D-RN and 3D-RN as $f^{joint}$ (early fusion), and make the third classification to obtain the score $S^{joint}$ . The joint classifier is also composed of two 1024 sized FC layers and Sigmoids. The multi-label classification cross-entropy losses are expressed as $\mathcal{L}_{cls}^{2D}, \mathcal{L}_{cls}^{3D}, \mathcal{L}_{cls}^{joint}$ . Thus, the total loss of DJ-RN is: + +$$ +\mathcal {L} _ {\text {t o t a l}} = \lambda_ {1} \mathcal {L} _ {\text {t r i}} + \lambda_ {2} \mathcal {L} _ {\text {a t t}} + \lambda_ {3} \mathcal {L} _ {\text {s e m}} + \lambda_ {4} \mathcal {L} _ {\text {c l s}}, \tag {5} +$$ + +where $\mathcal{L}_{cls} = \mathcal{L}_{cls}^{2D} + \mathcal{L}_{cls}^{3D} + \mathcal{L}_{cls}^{joint}$ , and we set $\lambda_{1} = 0.001$ , $\lambda_{2} = 0.01$ , $\lambda_{3} = 0.01$ , $\lambda_{4} = 1$ in experiments. The final score is + +$$ +\mathcal {S} = \mathcal {S} ^ {2 D} + \mathcal {S} ^ {3 D} + \mathcal {S} ^ {\text {j o i n t}}. \tag {6} +$$ + +# 5. Experiment + +In this section, we first introduce the adopted datasets and metrics. Then we describe the detailed implementation of DJ-RN. Next, we compare DJ-RN with the state-of-the-art on HICO-DET [9] and Ambiguous-HOI. At last, ablation studies are operated to evaluate modules in DJ-RN. + +# 5.1. Ambiguous-HOI + +Existing benchmarks mainly focus on evaluating generic HOIs, but not to specially examine the ability to process 2D pose and appearance ambiguities. Hence, we propose a new benchmark named Ambiguous-HOI. Ambiguous-HOI consists of hard examples collected from the test set of HICO-DET [9], and other whole datasets such as V-COCO [20], OpenImage [28], HCVRD [65] and Internet images. We choose HOI categories from HICO-DET [9] for its well-designed verbs and objects. For Internet images, we labeled the HOIs according to HICO-DET setting. The 2D pose and spatial configuration ambiguities are mainly considered in the selection. First, we put all images and corresponding labels in a candidate pool and manually choose some template 2D pose samples for each HOI. Then we use Procrustes transformation [5] to align the 2D pose of samples to the templates. Next, we cluster all samples to find the + +samples far from the cluster center and repeat clustering according to different templates. The mean distance between a sample and multiple cluster centers is recorded as reference. Meanwhile, we train an MLP taking the 2D pose and spatial map as inputs on HICO-DET train set. Then we use it as an ambiguity probe to find the most easily misclassified samples. Combining the above two references, we finally select 8,996 images with 25,188 annotated human-object pairs. Ambiguous-HOI finally includes 87 HOI categories, consisting of 48 verbs and 40 object categories from HICO-DET [9]. Some sample are shown in Fig. 7. + +# 5.2. Dataset and Metric + +Dataset. We adopt the widely-used HOI benchmark HICO-DET [9] and our novel Ambiguous-HOI. HICO-DET [9] is an instance-level benchmark consisting of 47,776 images (38,118 for training and 9,658 for testing) and 600 HOI categories. It contains 80 object categories from COCO [32], 117 verbs and more than 150k annotated HOI pairs. + +Metric. We use mAP metric from [9] for two benchmarks: true positive need to contain accurate human and object locations (box IoU with reference to the ground truth box is larger than 0.5) and accurate interaction/verb classification. + +# 5.3. Implementation Details + +For 3D body recovery, we first use OpenPose [7] to detect the 2D pose of body, face and hands. Then we feed them with the image to SMPLify-X [45] to get 3D body. Since cases with severe occlusion might fail the 3D recovery, we only recover 3D bodies for those which at least includes detected 2D head, pelvis, one shoulder and one hip joints. For the rest, we assign them the body with standard template 3D pose, i.e. generated by setting all SMPL-X parameters to zero. Sometimes the recovered body can be implausible, i.e. "monsters". To exclude them, we use VPoser[45] to extract the latent embedding of every recovered 3D body. With the mean latent embedding of the generated 3D body from HICO-DET train set as a reference, we assume that the farthest $10\%$ embeddings from the mean embedding are "monsters". At last, $81.2\%$ of the annotated instances are assigned with SMPLify-X [45] generated mesh, and we assign standard templates for the rest to avoid importing noise. + +For feature extraction, we use COCO [32] pre-trained ResNet-50 [23] in 2D-RN. In 3D-RN, we first train a PointNet [50] to segment the human and object points in 3D volume, and then use it to extract the 3D local feature of volume. The PointNet is trained for 10K iterations, using SGD with learning rate of 0.01, momentum of 0.9 and batch size of 32. In spatial alignment, we adopt the triplet loss with semi-hard sampling, i.e., for a sample, we only calculate the loss for its nearest negative and farthest positive samples in the same mini-batch with respect to their Euclidean + +
MethodDefaultKnown Object
FullRareNon-RareFullRareNon-Rare
Shen et al. [56]6.464.247.12---
HO-RCNN [9]7.815.378.5410.418.9410.85
InteractNet [19]9.947.1610.77---
GPNN [51]13.119.3414.23---
iCAN [17]14.8410.4516.1516.2611.3317.73
Interactiveness [31]17.0313.4218.1119.1715.5120.26
No-Frills [21]17.1812.1718.68---
PMFNet [58]17.4615.6518.0020.3417.4721.20
Julia et al. [48]19.4014.6020.90---
S2D19.9816.9720.8822.5619.4823.48
S3D12.4113.0812.2116.9517.7416.72
SJoint20.6117.0121.6923.2119.6624.28
DJ-RN21.3418.5322.1823.6920.6424.60
+ +Table 1. Results comparison on HICO-DET [9]. + +distances. In joint training, we train the whole model for 400K iterations, using SGD with momentum of 0.9, following cosine learning rate restart [36] with initial learning rate of 1e-3. For a fair comparison, we use object detection from iCAN [17]. We also adopt the Non-Interaction Suppression (NIS) and Low-grade Instance Suppression (LIS) [31] in inference. The interactiveness model from [31] is trained on HICO-DET train set only. The thresholds of NIS are 0.9 and 0.1 and LIS parameters follow [31]. + +# 5.4. Results and Comparisons + +HICO-DET. We demonstrate our quantitative results in Tab. 1, compared with state-of-the-art methods [56, 9, 19, 51, 17, 31, 21, 58, 48]. The evaluation follows the settings in HICO-DET[9]: Full(600 HOIs), Rare(138 HOIs) and Non-Rare(462 HOIs) in Default and Known Object mode. We also evaluate different streams in our model, i.e. 2D $(S^{2D})$ , 3D $(S^{3D})$ and Joint $(S^{joint})$ . Our 2D-RN has a similar multi-stream structure, object detection and backbone following HO-RCNN [9], iCAN [17], Interactiveness [31] and PMFNet [58]. With joint learning, 2D-RN $(S^{2D})$ directly outperforms above methods with 13.53, 6.50, 4.31, 3.88 mAP on Default Full set. This strongly proves the effectiveness of the consistency tasks in joint learning. Meanwhile, 3D-RN $(S^{3D})$ achieves 12.41 mAP on Default Full set and shows obvious complementarity for 2D-RN. Especially, 3D performs better on Rare set than Non-Rare set. This suggests that 3D representation has much weaker data-dependence than 2D representation and is less affected by the long-tail data distribution. Joint learning $(S^{Joint})$ performs better than both 2D and 3D, achieving 20.61 mAP, while unified DJ-RN (late fusion) finally achieves 21.34 mAP, which outperforms the latest state-of-the-art [48] with 1.94 mAP. Facilitated by the detailed 3D body information, we achieve 21.71 mAP on 356 hand-related HOIs, which is higher than the 21.34 mAP on 600 HOIs. + +Ambiguous-HOI. To further evaluate our method, we conduct an experiment on the proposed Ambiguous-HOI. We choose methods [17, 31, 48] with open-sourced code as baselines. All models are trained on HICO-DET train set + +![](images/080a094fbbfd8f9da5e3783add6387c449a6e6947b47f9d88a6d82f88db8903b.jpg) + +![](images/a1376db5d756fabe1d736a6a453a8aafadf3a13490895e46be2ccee21e134829.jpg) + +![](images/e0e4debf6b269663d1e9489dfb83f82322715bbaa6f96ae78b68d3953b4d22e6.jpg) + +![](images/d8024ce03761b5f68c0a3fea9868c0f54a01a7c3d8a6f043cac5dfd91c1cd257.jpg) + +![](images/0ce297be5dc16cd490b59b18d4ceeb3fbd6c7adba4fd3a8bf0b0174cb7c6de60.jpg) + +![](images/2dc856644004880a528d9ff508b6f230af43690c2ec133852d1d73280460ca9d.jpg) + +![](images/b2aee1dd7323c46ae1133b831c4fa89881c938f2f6e5757c606a6faebda1cbaf.jpg) + +![](images/1d1623eccfde618c9a96a7ab2847e24ea7ad4ad9ad6920377b47cb9377d2f8cc.jpg) +Figure 9. Visualized results and the corresponding 3D volumes. + +![](images/4e4134890c32299311e0c802e1d02fde2c72178cbeb3ac7f2ee6915f19da031a.jpg) +Figure 8. Visualized attention. Three rows are images, 2D and 3D attentions respectively. Red indicates high attention and blue is the opposite. 2D attention is in line with 3D attention, and they both capture reasonable part attentions for various HOIs. + +![](images/08eec0b00c8f851a663d88fda8e893692d40113b0db4f4360d1d77eba5a3a5d1.jpg) + +![](images/bea665e865fd3ed640f45c5275e95368d2967d2d067e4b7b22fd087db879526c.jpg) + +![](images/34689d2769aad4d780ead1f658f101a115ec7dea59d345ec668cbfb3a2510105.jpg) + +
MethodAmbiguous-HOI
iCAN [17]8.14
Interactiveness [31]8.22
Julia et al. [48]9.72
DJ-RN10.37
+ +Table 2. Results comparison on Ambiguous-HOI. + +
MethodDefaultKnown Object
FullRareNon-RareFullRareNon-Rare
DJ-RN21.3418.5322.1823.6920.6424.60
3D Pose20.4216.8821.4722.9519.4823.99
Point Cloud20.0516.5221.1022.6119.1123.66
w/o Face21.0217.5622.0523.4819.8024.58
w/o Hands20.8317.3621.8723.4019.9924.41
w/o Face & Hands20.7417.3621.7523.3319.8224.37
w/o Volume Block20.3417.1921.2822.9719.9423.87
w/o 3D Body Block20.0116.1421.1722.7318.8823.88
w/o Latt20.7016.5621.9323.3219.1324.57
w/o Ltri20.8317.6621.7723.5020.3124.45
w/o Lsem20.8017.5121.7823.4520.2724.39
+ +Table 3. Results of ablation studies. + +and achieve respective best performances. To test the ability of disambiguation and generalization, we directly test all models on Ambiguous-HOI. Ambiguous-HOI is much more difficult, thus all methods get relatively low scores (Tab. 2). DJ-RN outperforms previous method by 0.65, 2.15 and $2.23\mathrm{mAP}$ . This strongly verifies the advantage of our joint representation. + +Visualizations. We visualize the part attention in Fig. 8. We can find that two kinds of attention are aligned well and both capture essential parts for various HOIs. We also visualize + +![](images/d1bfb148848eb6a9382959b5100de32d54aa8f803320a7cb78b2ac25fa1d699f.jpg) + +![](images/2a485c27401a821a18949ee74a4c58599365871d837b24a4403d49427aa11b88.jpg) +ride-bicycle, 0.91 + +![](images/c86392af329d9787e3d8ae3115e695b5742ae54918991eda735c3f2ad147291d.jpg) + +![](images/7b5834abe9b534cdad8333b306c99c190af4e8aee7e974f8b09e963b8426cd64.jpg) + +![](images/b8548cd3633565fd13f822b22d3827ec16154cb27d1092245d2251fad383cc11.jpg) + +![](images/ceeec2e7660317c84415134d3861a6081870600462b26eaff7403557dc8ccab8.jpg) + +![](images/007c3d06bbc611ed92fee404a3790865c3fc2cd9a4d35237f12a00d0482d96ea.jpg) + +![](images/5eefe9050c053cbc74cf8556dab0dcf95182838f9fd7616e2c53780af120f4fe.jpg) + +![](images/0193070ecca19b787fdb28929fb013d53aa3441fb7c6a7c513b33076de58e9c7.jpg) + +![](images/4460c6c300d7fcb958fcee21d54fc2e5fdabdb7d06a48c39253cd219b6b62956.jpg) +type_on-laptop, 0.88 + +![](images/b7a37e84cb2da26ff51e84c497907a5715d24b3cee8c7098ad3f1e41c88209c0.jpg) +carry-backpack, 0.58 + +![](images/5917ac3f4dba47474c389da266b029ed3cd7550178e1919eae517168e52f2da4.jpg) +pour-bottle, 0.68 + +HOI predictions paired with estimated 3D spatial configuration volumes in Fig. 9. Our method performs robustly in HOI inference and 3D spatial configuration estimation. + +Time Complexity. 2D-RN has similar complexity with iCAN [17] and Interactiveness [31]. 3D-RN is very efficient because of the pre-extracted features (about 50 FPS). SMPLif-X runs with GPU acceleration is about 5 FPS. + +# 5.5. Ablation Study + +We evaluate different components of our method on HICO-DET. The results are shown in Tab. 3. + +3D Formats. Using 3D pose or point cloud for 3D body block in 3D-RN performs worse than VPoser embedding. +3D Human Inputs. Without detailed face and hand shape, DJ-RN shows obvious degradation, especially DJ-RN without hand shape. Because about $70\%$ verbs in HICO-DET are hand-related, which is consistent with daily experience. Blocks. Without volume or body block in 3D-RN hurts the performance with 1.00 and $1.33\mathrm{mAP}$ + +Losses: Without $\mathcal{L}_{att}$ , $\mathcal{L}_{tri}$ and $\mathcal{L}_{sem}$ , the performance degrades 0.64, 0.51 and $0.54\mathrm{mAP}$ . + +# 6. Conclusion + +In this paper, we propose a novel 2D-3D joint HOI representation learning paradigm, DJ-RN. We first represent the HOI in 3D with detailed 3D body and estimated object location and size. Second, a 2D Representation Network and a 3D Representation Network are proposed to extract multi-modal features. Several cross-modal consistency tasks are finally adopted to drive the joint learning. On HICO-DET and our novel benchmark Ambiguous-HOI, DJ-RN achieves state-of-the-art results. + +Acknowledgement: This work is supported in part by the National Key R&D Program of China, No. 2017YFA0700800, National Natural Science Foundation of China under Grants 61772332 and Shanghai Qi Zhi Institute. + +# References + +[1] Ijaz Akhter and Michael J Black. Pose-conditioned joint angle limits for 3d human pose reconstruction. In CVPR, 2015, 2, 4 +[2] Brenna D Argall, Sonia Chernova, Manuela Veloso, and Brett Browning. A survey of robot learning from demonstration. Robotics and autonomous systems, 57(5), 2009. 1 +[3] Fabien Baradel, Christian Wolf, and Julien Mille. **Pose-conditioned spatio-temporal attention for human action recognition. arXiv preprint arXiv:1703.10106, 2017. 2** +[4] Federica Bogo, Angjoo Kanazawa, Christoph Lassner, Peter Gehler, Javier Romero, and Michael J Black. Keep it smpl: Automatic estimation of 3d human pose and shape from a single image. In ECCV, 2016. 2 +[5] I Borg and P Groenen. Modern multidimensional scaling: Theory and applications springer-verlag new york 471. 1997. 6 +[6] Fabian Caba Heilbron, Victor Escorcia, Bernard Ghanem, and Juan Carlos Niebles. Activitynet: A large-scale video benchmark for human activity understanding. In CVPR, 2015. 1 +[7] Zhe Cao, Gines Hidalgo, Tomas Simon, Shih-En Wei, and Yaser Sheikh. OpenPose: realtime multi-person 2D pose estimation using Part Affinity Fields. In arXiv preprint arXiv:1812.08008, 2018. 1, 2, 3, 4, 7 +[8] Angel X Chang, Thomas Funkhouser, Leonidas Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, et al. Shapenet: An information-rich 3d model repository. arXiv preprint arXiv:1512.03012, 2015. 1 +[9] Yu-Wei Chao, Yunfan Liu, Xieyang Liu, Huayi Zeng, and Jia Deng. Learning to detect human-object interactions. In WACV, 2018. 2, 3, 4, 6, 7 +[10] Vasileios Choutas, Philippe Weinzaepfel, Jérôme Revaud, and Cordelia Schmid. Potion: Pose motion representation for action recognition. In CVPR, 2018. 2 +[11] CMU. Cmu mocap dataset. 2, 4 +[12] Wenbin Du, Yali Wang, and Yu Qiao. Rpan: An end-to-end recurrent pose-attention network for action recognition in videos. In ICCV, 2017. 5 +[13] Yong Du, Wei Wang, and Liang Wang. Hierarchical recurrent neural network for skeleton based action recognition. In CVPR, 2015. 1, 2 +[14] Haoshu Fang, Yuanlu Xu, Wenguan Wang, Xiaobai Liu, and Song-Chun Zhu. Learning pose grammar to encode human body configuration for 3d pose estimation. In AAAI, 2018. 2 +[15] Hao-Shu Fang, Jinkun Cao, Yu-Wing Tai, and Cewu Lu. Pairwise body-part attention for recognizing human-object interactions. In ECCV, 2018. 5 +[16] Hao-Shu Fang, Jianhua Sun, Runzhong Wang, Minghao Gou, Yong-Lu Li, and Cewu Lu. Instaboost: Boosting instance segmentation via probability map guided copypasting. In ICCV, 2019. 1 +[17] Chen Gao, Yuliang Zou, and Jia-Bin Huang. ican: Instance-centric attention network for human-object interaction detection. arXiv preprint arXiv:1808.10437, 2018. 2, 4, 7, 8 + +[18] Rohit Girdhar and Deva Ramanan. Attentional pooling for action recognition. In NIPS, 2017. 2 +[19] Georgia Gkioxari, Ross Girshick, Piotr Dólar, and Kaiming He. Detecting and recognizing human-object interactions. arXiv preprint arXiv:1704.07333, 2017. 2, 7 +[20] Saurabh Gupta and Jitendra Malik. Visual semantic role labeling. arXiv preprint arXiv:1505.04474, 2015. 2, 6 +[21] Tanmay Gupta, Alexander Schwing, and Derek Hoiem. No-frills human-object interaction detection: Factorization, appearance and layout encodings, and training techniques. arXiv preprint arXiv:1811.05967, 2018. 1, 2, 7 +[22] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In ICCV, 2017. 1 +[23] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 7 +[24] Zhiwu Huang, Chengde Wan, Thomas Probst, and Luc Van Gool. Deep learning on lie groups for skeleton-based action recognition. In CVPR, 2017. 2 +[25] Catalin Ionescu, Dragos Papava, Vlad Olaru, and Cristian Sminchisescu. Human3. 6m: Large scale datasets and predictive methods for 3d human sensing in natural environments. TPAMI, 2013. 2, 4 +[26] Angjoo Kanazawa, Michael J. Black, David W. Jacobs, and Jitendra Malik. End-to-end recovery of human shape and pose. In CVPR, 2018. 2 +[27] Qiuhong Ke, Mohammed Bennamoun, Senjian An, Ferdous Sohel, and Farid Boussaid. A new representation of skeleton sequences for 3d action recognition. In CVPR, 2017. 2 +[28] Alina Kuznetsova, Hassan Rom, Neil Alldrin, Jasper Uijlings, Ivan Krasin, Jordi Pont-Tuset, Shahab Kamali, Stefan Popov, Matteo Malloci, Tom Duerig, and Vittorio Ferrari. The open images dataset v4: Unified image classification, object detection, and visual relationship detection at scale. arXiv preprint arXiv::1811.00982, 2018. 2, 6 +[29] Inwooong Lee, Doyoung Kim, Seoungyoon Kang, and Sanghoon Lee. Ensemble deep learning for skeleton-based action recognition using temporal sliding LSTM networks. In ICCV, 2017. 2 +[30] Yong-Lu Li, Liang Xu, Xijie Huang, Xinpeng Liu, Ze Ma, Mingyang Chen, Shiyi Wang, Hao-Shu Fang, and Cewu Lu. Hake: Human activity knowledge engine. arXiv preprint arXiv:1904.06539, 2019. 2 +[31] Yong-Lu Li, Siyuan Zhou, Xijie Huang, Liang Xu, Ze Ma, Hao-Shu Fang, Yanfeng Wang, and Cewu Lu. Transferable interactiveness knowledge for human-object interaction detection. In CVPR, 2019. 1, 2, 4, 7, 8 +[32] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ECCV, 2014. 3, 4, 7 +[33] Jun Liu, Amir Shahroudy, Dong Xu, and Gang Wang. Spatio-temporal LSTM with trust gates for 3d human action recognition. In ECCV, 2016. 2 +[34] Jun Liu, Gang Wang, Ping Hu, Ling-Yu Duan, and Alex C Kot. Global context-aware attention LSTM networks for 3d action recognition. In CVPR, 2017. 2 + +[35] Mengyuan Liu and Junsong Yuan. Recognizing human actions as the evolution of pose estimation maps. In CVPR, 2018. 2 +[36] Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. arXiv preprint arXiv:1608.03983, 2016. 7 +[37] Cewu Lu, Ranjay Krishna, Michael Bernstein, and Li Fei-Fei. Visual relationship detection with language priors. In ECCV, 2016. 1 +[38] Cewu Lu, Hao Su, Yonglu Li, Yongyi Lu, Li Yi, Chi-Keung Tang, and Leonidas J Guibas. Beyond holistic object recognition: Enriching image understanding with part states. In CVPR, 2018. 2 +[39] Diogo C Luvizon, David Picard, and Hedi Tabia. 2d/3d pose estimation and action recognition using multitask deep learning. In CVPR, 2018. 1, 2 +[40] Diogo Carbonera Luvizon, Hedi Tabia, and David Picard. Learning features combination for human action recognition from skeleton sequences. Pattern Recognition, 2017. 2 +[41] Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781, 2013. 4 +[42] Mohamed Omran, Christoph Lassner, Gerard Pons-Moll, Peter Gehler, and Bernt Schiele. Neural body fitting: Unifying deep learning and model based human pose and shape estimation. In 3DV, 2018. 2 +[43] Bo Pang, Kaiwen Zha, Hanwen Cao, Chen Shi, and Cewu Lu. Deep rn framework for visual sequential applications. In CVPR, 2019. 1 +[44] Bo Pang, Kaiwen Zha, Yifan Zhang, and Cewu Lu. Further understanding videos through adverbs: A new video task. In AAAI, 2020. 1 +[45] Georgios Pavlakos, Vasileios Choutas, Nima Ghorbani, Timo Bolkart, Ahmed A. A. Osman, Dimitrios Tzionas, and Michael J. Black. Expressive body capture: 3d hands, face, and body from a single image. In CVPR, 2019. 1, 2, 3, 4, 7 +[46] Georgios Pavlakos, Xiaowei Zhou, Konstantinos G Derpanis, and Kostas Daniilidis. Coarse-to-fine volumetric prediction for single-image 3d human pose. In CVPR, 2017. 2 +[47] Georgios Pavlakos, Luyang Zhu, Xiaowei Zhou, and Kostas Daniilidis. Learning to estimate 3d human pose and shape from a single color image. In CVPR, 2018. 2 +[48] Julia Peyre, Ivan Laptev, Cordelia Schmid, and Josef Sivic. Detecting rare visual relations using analogies. In ICCV, 2019. 2, 7, 8 +[49] Huy Hieu Pham, Houssam Salmane, Louahdi Khoudour, Alain Crouzil, Pablo Zegers, and Sergio A Velastin. A unified deep framework for joint 3d pose estimation and action recognition from a single rgb camera. arXiv preprint arXiv:1907.06968, 2019. 2 +[50] Charles R. Qi, Hao Su, Kaichun Mo, and Leonidas J. Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In CVPR, 2017. 4, 7 +[51] Siyuan Qi, Wenguan Wang, Baoxiong Jia, Jianbing Shen, and Song-Chun Zhu. Learning human-object interactions by graph parsing neural networks. In ECCV, 2018. 2, 7 + +[52] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NIPS, 2015. 2, 4 +[53] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In CVPR, 2015. 5 +[54] Amir Shahroudy, Jun Liu, Tian-Tsong Ng, and Gang Wang. Ntu $\mathrm{rgb + }$ d: A large scale dataset for 3d human activity analysis. In CVPR, 2016. 2 +[55] Dian Shao, Yu Xiong, Yue Zhao, Qingqiu Huang, Yu Qiao, and Dahua Lin. Find and focus: Retrieve and localize video events with natural language queries. In ECCV, 2018. 1 +[56] Liyue Shen, Serena Yeung, Judy Hoffman, Greg Mori, and Fei Fei Li. Scaling human-object interaction recognition through zero-shot learning. In WACV, 2018. 7 +[57] Sijie Song, Cuiling Lan, Junliang Xing, Wenjun Zeng, and Jiaying Liu. An end-to-end spatio-temporal attention model for human action recognition from skeleton data. In AAAI, 2017. 2 +[58] Bo Wan, Desen Zhou, Yongfei Liu, Rongjie Li, and Xuming He. Pose-aware multi-level feature network for human object interaction detection. arXiv preprint arXiv:1909.08453, 2019. 1, 2, 7 +[59] Chunyu Wang, Yizhou Wang, and Alan L Yuille. An approach to pose-based action recognition. In CVPR, 2013. 2 +[60] Jiang Wang, Zicheng Liu, Ying Wu, and Junsong Yuan. Learning actionlet ensemble for 3d human action recognition. TPAMI, 2013. 2 +[61] Wenqiang Xu, Yonglu Li, and Cewu Lu. Srda: Generating instance segmentation annotation via scanning, reasoning and domain adaptation. In ECCV, 2018. 1 +[62] Bangpeng Yao and Li Fei-Fei. Action recognition with exemplar based 2.5 d graph matching. In ECCV, 2012. 2 +[63] Bangpeng Yao, Jiayuan Ma, and Li Fei-Fei. Discovering object functionality. In ICCV, 2013. 1, 2 +[64] Yang You, Yujing Lou, Qi Liu, Yu-Wing Tai, Weiming Wang, Lizhuang Ma, and Cewu Lu. Prin: Pointwise rotation-invariant network. arXiv preprint arXiv:1811.09361, 2018. 1 +[65] Bohan Zhuang, Qi Wu, Chunhua Shen, Ian Reid, and Anton van den Hengel. Care about you: towards large-scale human-centric visual relationship detection. arXiv preprint arXiv:1705.09892, 2017. 2, 6 \ No newline at end of file diff --git a/detailed2d3djointrepresentationforhumanobjectinteraction/images.zip b/detailed2d3djointrepresentationforhumanobjectinteraction/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..bf09a6c0edc804f72cbfaea731d33dd2a4a8eafb --- /dev/null +++ b/detailed2d3djointrepresentationforhumanobjectinteraction/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f28abcb9c42a81d15b5755b03aa5c85b22984bc181325ded3d5b5da247785067 +size 530685 diff --git a/detailed2d3djointrepresentationforhumanobjectinteraction/layout.json b/detailed2d3djointrepresentationforhumanobjectinteraction/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..24abb35a7528889d1609931c7d916edde2e430f2 --- /dev/null +++ b/detailed2d3djointrepresentationforhumanobjectinteraction/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0a21c50caf45ff3c91055de4037633713bedf150de40a4731d18546dca21e0a +size 495969 diff --git a/detailrecoveryimagederainingviacontextaggregationnetworks/99b9c115-a1dc-4c90-83ed-3080bf0c496d_content_list.json b/detailrecoveryimagederainingviacontextaggregationnetworks/99b9c115-a1dc-4c90-83ed-3080bf0c496d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..927e2f143a61d5e9af0cb14b8d3417bfd81b124c --- /dev/null +++ b/detailrecoveryimagederainingviacontextaggregationnetworks/99b9c115-a1dc-4c90-83ed-3080bf0c496d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1bc438c4f4d30b11d12d2f91cbcf12e947debaafc2c63ad418b7b7347aab9f2 +size 68292 diff --git a/detailrecoveryimagederainingviacontextaggregationnetworks/99b9c115-a1dc-4c90-83ed-3080bf0c496d_model.json b/detailrecoveryimagederainingviacontextaggregationnetworks/99b9c115-a1dc-4c90-83ed-3080bf0c496d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7fe53ff417459144c0b96145aba82ffe0232e8d9 --- /dev/null +++ b/detailrecoveryimagederainingviacontextaggregationnetworks/99b9c115-a1dc-4c90-83ed-3080bf0c496d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b8c21504b739764a1dcc144cdcd0e007a43d67c3259eb7e932e417d0914ab65 +size 86194 diff --git a/detailrecoveryimagederainingviacontextaggregationnetworks/99b9c115-a1dc-4c90-83ed-3080bf0c496d_origin.pdf b/detailrecoveryimagederainingviacontextaggregationnetworks/99b9c115-a1dc-4c90-83ed-3080bf0c496d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..44b1845b2ebcda339a1f836666c75ad362afa735 --- /dev/null +++ b/detailrecoveryimagederainingviacontextaggregationnetworks/99b9c115-a1dc-4c90-83ed-3080bf0c496d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25dba5c700646b5af8bc68f0141ac7ac62d3aef9989d10e348e4bcb7e550dc07 +size 4495419 diff --git a/detailrecoveryimagederainingviacontextaggregationnetworks/full.md b/detailrecoveryimagederainingviacontextaggregationnetworks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..70dce714c842e575f98e7879100a1de4540d52c8 --- /dev/null +++ b/detailrecoveryimagederainingviacontextaggregationnetworks/full.md @@ -0,0 +1,314 @@ +# Detail-recovery Image Deraining via Context Aggregation Networks + +Sen Deng $^{1,2}$ Mingqiang Wei $^{1,2*}$ Jun Wang $^{1,2}$ Yidan Feng $^{1,2}$ + +Luming Liang³ Haoran Xie⁴* Fu Lee Wang⁵ Meng Wang⁶ + +$^{1}$ Nanjing University of Aeronautics and Astronautics + +$^{2}$ MIIT Key Laboratory of Pattern Analysis and Machine Intelligence + +3Microsoft Applied Sciences Group 4Lingnan University + +$^{5}$ The Open University of Hong Kong $^{6}$ Hefei University of Technology + +# Abstract + +This paper looks at this intriguing question: are single images with their details lost during deraining, reversible to their artifact-free status? We propose an end-to-end detail-recovery image deraining network (termed a DRD-Net) to solve the problem. Unlike existing image deraining approaches that attempt to meet the conflicting goal of simultaneously deraining and preserving details in a unified framework, we propose to view rain removal and detail recovery as two separate tasks, so that each part could be specialized rather than traded off. Specifically, we introduce two parallel sub-networks with a comprehensive loss function which synergize to derain and recover the lost details caused by deraining. For complete rain removal, we present a rain residual network with the squeeze-and-excitation (SE) operation to remove rain streaks from the rainy images. For detail recovery, we construct a specialized detail repair network consisting of well-designed blocks, named structure detail context aggregation block (SDCAB), to encourage the lost details to return for eliminating image degradations. Moreover, the detail recovery branch of our proposed detail repair framework is detachable and can be incorporated into existing deraining methods to boost their performances. DRD-Net has been validated on several well-known benchmark datasets in terms of deraining robustness and detail accuracy. Comparisons show clear visual and numerical improvements of our method over the state-of-the-arts1. + +# 1. Introduction + +Images captured in rainy days inevitably suffer from noticeable degradation of visual quality. The degradation causes detrimental impacts on outdoor vision-based tasks, + +![](images/3849b7a315aad61f4eca72ddab9974f56dc85d15efe12273ca2b95b10e227bd1.jpg) +(a) Ground Truth PSNR=Inf/SSIM=1 + +![](images/febc9a8b7404a0c8cecb7489ec1704994f0fd4f9ee686d95c1057403b8c201f4.jpg) +(b) Rainy Image 9.56/0.4418 + +![](images/4efab609d6e59937d5dc24daa988665fc0205d605f5cdb55a1951caec83f3148.jpg) + +![](images/d0341d7639af478c0ac9cf4e106413ccc9f553045952c58c339a16855e716cb9.jpg) + +![](images/38747450ad21d7ace0b5a3651e591cda2296e9da7a5dd17208b658cf8b5a12b6.jpg) +(c) SPA-Net 19.10/0.8280 (CVPR'19) +(e) Ours w/o Detail Repair Net +24.02/0.9080 +Figure 1. Image deraining results tested in the dataset of Rain200H. From (a)-(f): (a) the ground truth image Castle, (b) the rainy image Castle and the deraining results of (c) SPA-Net [25], (d) DAF-Net [10], (e) Ours w/o Detail Repair Net, and (f) our DRD-Net respectively. + +![](images/8c55d14b69383d7cdcea950416e66302d56aa9414641c1888af84a6acce22893.jpg) +(d) DAF-Net 21.67/0.8489 (CVPR'19) +(f) Our DRD-Net +26.14/0.9320 + +such as video surveillance, autonomous driving, and object detection. It is, therefore, indispensable to remove rain in rainy images, which is referred to as image deraining. + +The ultimate goal of image deraining is to recover the ground-truth image $\mathbf{B}$ from its observation $\mathbf{O} = \mathbf{B} + \mathbf{R}$ with the rain streaks $\mathbf{R}$ , which is an ill-posed problem since + +![](images/552dc3664ca67dac7f16688c999a8114a68398805b241ed62f8ea6e07ea34d1b.jpg) +Figure 2. DRD-Net consists of two-sub networks, i.e., the rain removal network and the detail repair network. The first sub-network, which combines the squeeze-and-excitation (SE) operation with residual blocks to make full advantage of spatial contextual information, aims at removing rain streaks from the rainy image. And the second sub-network, which integrates the structure detail context aggregation block (SDCAB) to aggregate context feature information for a large reception field, seeks to recover the lost details to the derained image. + +both the clean image and rain streaks are all unknown. The traditional image deraining approaches behave ineffectively in medium- and heavy-rain removal, while the learning-based ones commonly lead to image degradations such as the loss of image details, halo artifacts and/or color distortion. Video-based deraining methods could borrow the redundant information between the sequence frames for quality rain removal [6, 22]. In contrast, single image based deraining methods ought to either draw support from priors, such as Gaussian mixture model [17], sparse coding [19] and low-rank representation [29, 7] or feed a large dataset into the well-designed deep networks [5, 10, 25], due to the lack of sequence information. + +Despite the great improvements of image deraining to produce promising deraining results when handling lightrain images, they are hindered to both remove rain streaks completely and preserve image details effectively on the images captured from the extremely bad weather. Such a phenomenon happens in Fig. 1. That is because the magnitude of image details is similar to and even smaller than that of rain streaks, but a rainy image in computer lacks semantic information to describe them separately. Therefore, the image details and rain streaks are commonly removed simultaneously. No state-of-the-art methods can serve as an image deraining panacea for various applications: they produce the deraining results with a tradeoff between rain removal and image detail maintenance. + +Different from existing image deraining methods that attempt to maintain image details and lack the detail-recovery + +mechanism, we look at this intriguing question: now that image deraining leads to image detail blurring in nature, are single images with their details lost during image deraining, reversible to their artifact-free status? + +We propose an end-to-end detail-recovery image deraining network (DRD-Net) based on the context aggregation networks, which simply introduces a collateral branch but succeed in recovering the original image details clearly. The main contribution of this work can be concluded as follows: + +- We build a two-branch parallel network (DRD-Net) composed of a squeeze-and excitation (SE) based rain residual network and a detail repair network. SE aggregates feature maps in the same convolutional layer to make full advantage of spatial contextual information for complete rain removal and the additional detail repair network encourages the lost details to return to the image after deraining by the rain residual network. +- We present the structure detail context aggregation block (SDCAB), which has larger reception fields and makes full use of the rain-free image patches, and demonstrate how SDCAB could facilitate the specific task of detail recovery. +- Our proposed framework regards rain removal and detail recovery as two independent tasks, therefore the detail recovery branch is actually detachable and can be incorporated into existing deraining methods to improve their performances. + +# 2. Related Work + +# 2.1. Video Deraining Methods + +Owing to the redundant information of the sequence frames in videos, rain streaks can be more easily identified and removed [6, 22, 1]. [6] replaces the intensity of a rainy pixel by averaging the corresponding pixel's intensities in the adjacent frames. [2] detects the rain streaks based on the histogram of rain streaks orientations. [23] summarizes the video-based deraining methods that have been proposed in recent years. In addition, the deraining results from video-based techniques may serve as the clean images for single image deraining [25]. + +# 2.2. Single Image Deraining Methods + +Without the temporal information, single image-based methods are more challenging than video-based methods. For rain removal from single images, existing methods fall into two categories: the traditional methods and the deep-learning based methods. + +Traditional Methods: Various image priors have been proposed to remove rain from single images. They assume that rain streaks $\mathbf{R}$ are sparse and in similar directions. Under this assumption, they decompose the input image $\mathbf{O}$ into the rain-free background scene $\mathbf{B}$ and the rain streaks layer $\mathbf{R}$ . [12] separates the rain streaks from high frequency using dictionary learning. [19] presents a discriminative sparse coding for separating rain streaks from the background image based on image patches. In [17], Gaussian mixture models (GMM), as a prior, is proposed to decompose the input image into the rain streaks and the background layer. [33] first detects rain-dominant regions and then the detected regions are utilized as a guidance image to help separate rain streaks from the background layer. [29] leverages the low-rank property of rain streaks to separate the two layers. + +Deep Learning-based Methods: Deep-learning based methods have been introduced to single image deraining by [5], which boost the deraining performance significantly. Later, [31] presents a conditional generative adversarial network (GAN) and uses the perceptual loss to refine the results. [27] develops a deep recurrent dilated joint rain streaks detection and removal network to remove the rain streaks. [16] proposes the multi-stage networks based on the recurrent neural network architecture to remove rain streaks in different directions. [30] presents a density-aware multi-stream connected network for deraining. By maintaining negative residual features, [4] builds a residual-guided network for removing the rain streaks from single images and [18] exploits the potential of paired operations via dual residual connection. Unlike [27] which regards rain accumulation removal as a separate task, [10] and [15] merge physics formulation into the whole network architecture. To handle real-world cases, [25] constructs a + +real-world rain dataset and incorporates the spatial attentive mechanism into the network design while [26] considers both supervised images pairs and unsupervised real rainy images into the network training by minimizing the KL distance between parameterized distributions of their rain residuals. In [24], the encoder-decoder based network is interpreted as a conditional generator and the deraining performance is improved by a residual learning branch optimizing the input of the generator. + +Existing image deraining approaches attempt to maintain image details by using appropriate loss functions or learning from a large even real-world dataset. However, image details are still lost to a certain extent, due to many complicated reasons. For example, most of current network architectures cannot deal with the saturated regions where the rain is very heavy and totally occlude the background scenes. That is the reason why a detail repair network becomes necessary. Thus, we propose a detail-recovery image deraining network, which comprises of two sub-networks with a comprehensive loss function for synergizing to derain and recover the lost details caused by deraining. + +# 3. DRD-Net + +Image deraining usually leads to detail blurring, because rain streaks and image details are all of high frequency in nature and they inevitably share similar geometrical properties. Unfortunately, existing approaches pay little attention to recovering the image details once they are lost during image deraining. For both rain removal and detail recovery of single images, we propose two sub-networks which work together as shown in Fig. 2. On one hand, we introduce a rain residual network to train a function that maps the rainy images to their rain streaks. Therefore, we can obtain the preliminarily derained images by separating the rain streaks from the rainy images. On the other hand, different from other methods which try to decompose a single rainy image into a background layer and a rain streaks layer, we present an additional detail repair network to find back the lost details. In the following, we will introduce the rain residual network and the detail repair network, respectively. + +# 3.1. Rain Residual Network + +Residual learning is proved to be a powerful tool for image restoration tasks like denoising and deraining [32, 16]. Based on the observation that the rain streaks $\mathbf{R}$ are sparser than the rain-free background scene $\mathbf{B}$ [16], we learn a function by training a residual network, which maps the rainy image $\mathbf{O}$ to rain streaks $\mathbf{R}$ . We train such a network by minimizing the loss function as + +$$ +L o s s _ {r} = \sum_ {i \in N (D)} | | f (\mathbf {O} _ {i}) - \hat {\mathbf {R}} _ {i} | | ^ {2}, \tag {1} +$$ + +![](images/f8535eb59ef28061cce8f78d6db54acac8a281428b5a8bf58272a5a6833b2d25.jpg) +Figure 3. Different convolution styles. From (a)-(d): (a) direct network, (b) residual block, (c) direct network with SE [16], (d) rain residual block with SE used in our rain residual network, and (e) structure detail context aggregation block used in our detail repair network. + +where the $f(\cdot)$ is a function that we try to learn, $\mathbf{O}_i$ is a rainy image and $\hat{\mathbf{R}}_{\mathrm{i}}$ is the ground-truth rain streak layer in the training dataset $D$ whose number is $N(D)$ . + +The architecture of our rain residual network is shown in the upper part of Fig. 2, which utilizes the Squeeze-and-Excitation (SE) [9] operation. Considering that the skipconnections can provide long-range information compensation and enable the residual learning [14], we combine the SE operation with the residual block in our rain residual network, which is different from Fig. 3(c) used in RESCAN [16]. The rain residual network includes 3 convolution layers and 16 rain residual blocks. The first layer can be interpreted as an encoder, which is used to transform the rainy image into the feature maps, and the last two layers are used to recover the RGB channels from feature maps. + +Mathematically, the rain residual block can be formulated as + +$$ +R R B = S E (R e s (\mathbf {X} _ {\mathbf {0}})), \tag {2} +$$ + +where $RRB$ is the output of the rain residual block, $SE(\cdot)$ and $Res(\cdot)$ denote the SE operation and the residual block shown in Fig. 3(d) respectively, and $\mathbf{X}_0$ is the input signal. + +Spatial contextual information has proved to be effective in single image deraining [11, 16]. Nevertheless, the different feature channels in the same layer are independent and have little correlation during the previous convolution operation. A main difference from the common residual block is that we combine SE into the residual block in our network. Since SE can model a correlation between different feature channels, we can intensify the feature channel which has more context information by giving a larger weight. Conversely, the feature channels that have less spatial contextual information will just receive a small weight. All the weights of different channels are learned by the rain residual network automatically during the training steps. + +# 3.2. Detail Repair Network + +Now that image deraining leads to image degradations in nature, we can train additional detail-recovery network that makes the detail-lost images be reversible to their artifact-free status. Based on the preliminarily derained image $\mathbf{I}_p$ which is obtained by subtracting the rain streaks $\mathbf{R}$ from the rainy image $\mathbf{O}$ , we can train a function to encourage the lost details to return by optimizing the loss function as + +$$ +L o s s _ {d} = \sum_ {i \in N (D)} | | \left(\mathbf {I} _ {p, i} + g (\mathbf {O} _ {i})\right) - \hat {\mathbf {I}} _ {i} | | ^ {2}, \tag {3} +$$ + +where $g(\cdot)$ is a function that we try to learn, $\mathbf{O}_i$ is a rainy image. $\hat{\mathbf{I}}_i$ is the ground-truth rain-free image in $D$ . + +Inspired by the work in [27], we design our detail repair network based on the structure detail context aggregation block (SDCAB). The difference from [27] is that we adopt SDCAB into the whole network flow to make the best use of multi-scale features, while [27] only applied multiscale dilated block in the first layer to extract the image features. We have validated that this modification benefits our detail recovery network. Specifically, SDCAB consists of different scales of dilation convolutions and $1 \times 1$ convolutions as shown in Fig. 3(d). Since a large receptive field is very helpful to acquire much contextual information [16], we present 3 dilated convolutions whose dilation scales are 1, 3 and 5 in SDCAB. Then, in order to extract the most important features, we concatenate the output of dilated convolutions and utilize the $1 \times 1$ convolution to reduce the feature dimensions. For reducing the complexity in training, the residual network is also introduced into SDCAB. + +As shown in Fig. 3(d), the dilated convolution concatenation layer (DCCL) can be expressed as + +$$ +D C C L = \operatorname {C o n v} _ {1 \times 1} (\operatorname {C a t} [ \operatorname {C o n v} _ {3 \times 3, d _ {1}} (X), \tag {4} +$$ + +$$ +\left. \operatorname {C o n v} _ {3 \times 3, d _ {3}} (X), \operatorname {C o n v} _ {3 \times 3, d _ {5}} (X) \right]\bigg), +$$ + +![](images/750ec5dd4598e21a75bbe219928d05b52e50a439fd7f3a3ad6f34b9683d87ccb.jpg) +(a) Rainy image 5.74/0.2440 + +![](images/188f03e2b1cd270eb3421e73b02dbb7cd60383c93ecd647c09c40763503a62c2.jpg) +(b) Result of DRRN X 23.71/0.9024 + +![](images/d66aa9496416b891e5bf87c24825f9e447c3b6127a8dc12d8572ba74fca7fe42.jpg) +(c) Final result Y 25.79/0.9302 +Figure 4. Image deraining results tested in the dataset of Rain200L. From (a)-(e): (a) the input rainy image, (b) the result $\mathbf{X}$ by only using the rain residual network (i.e., without the detail repair network), (c) the result $\mathbf{Y}$ by the DRD-Net, (d) the ground-truth image, and (e) the image of $\mathbf{Y} - \mathbf{X}$ (note: we have inverted the image $\mathbf{Y} - \mathbf{X}$ for better visualization). + +![](images/a5dd1a402fadb1e5072900d30af4711328c48691530eeac5ea3ea533a2213794.jpg) +(d) Ground-truth image Inf/1 + +![](images/f1add13bc84090d43fe921cbcedd00fed451f5c4fde2ad89240e474e5c845a5b.jpg) +(e) Image Y-X + +where $Conv_{x \times x, d_y}$ denotes the dilated convolutions with the kernel size of $x \times x$ , and the dilation scale is $y$ . $Cat(\cdot)$ is a concatenating operation and $X$ is the input feature. + +Mathematically, SDCAB can be formulated as + +$$ +S D C A B = \operatorname {A d d} \left[ X _ {\text {i n p u t}}, B N \left(D C C L _ {2}\right) \right], \tag {5} +$$ + +where $DCCL_{2}$ is described as + +$$ +D C C L _ {2} = P R e l u \left(B N \left(D C C L _ {1} \left(X _ {\text {i n p u t}}\right)\right)\right), \tag {6} +$$ + +A large receptive field plays an important role in obtaining more information. With a larger receptive field, we can obtain more context information, which is helpful to find back the lost details. We can observe from Fig. 4 that, DRD-Net has found back the details that were lost by filtering the rainy image to obtain $X$ . We have provided more experimental results on three synthetic datasets to compare the performance of image deraining with and without the additional detail repair network (DRN) in Table 1. As shown in Table 1, our DRD-Net outperforms other network architectures thanks to its capability to nd back the lost details. + +# 3.3. Comprehensive Loss Function + +As mentioned above, we employ the simplest $L_{2}$ loss as our objective function. The comprehensive loss function of our two-sub networks can be formulated as + +$$ +\begin{array}{l} L o s s _ {t o t a l} = \lambda_ {1} \sum_ {i \in N (D)} | | f (\mathbf {O} _ {i}) - \hat {\mathbf {R}} _ {i} | | ^ {2} \\ + \lambda_ {2} \sum_ {i \in N (D)} | | \left(\mathbf {I} _ {p, i} + g (\mathbf {O} _ {i})\right) - \hat {\mathbf {I}} _ {i} | | ^ {2}, \tag {7} \\ \end{array} +$$ + +where $\mathbf{O}_i$ denotes the i-th input rainy image, $\mathbf{I}_{p,i}$ denotes the preliminarily derained image obtained by subtracting the rain streaks $\mathbf{R}_i$ from $\mathbf{O}_i$ , $\hat{\mathbf{R}}_i$ and $\hat{\mathbf{I}}_i$ are the rain streaks image and the rain-free image respectively, $\lambda_{1}$ and $\lambda_{2}$ are two parameters to balance the two sub-loss functions, which in our experiments are fixed to be 0.1 and 1.0 respectively. + +# 4. Experiment and Discussions + +Three synthetic datasets and a real-world dataset are used to validate our DRD-Net. + +Synthetic Datasets: On account of the difficulty in acquiring the rainy/clean image pair datasets, we use the synthetic datasets to train our network. [31] provides a synthetic dataset named Rain800, which contains 700 training images and 100 testing image. [28] collects and synthesizes 2 datasets, including Rain200L and Rain200H. Both Rain200L and Rain200H consist of 1800 training images and 200 test images. + +Real-world Datasets: [25], [28] and [31] supply some real-world rainy images to validate the robustness of deraining methods. We use those images for objective evaluation. + +Training Details: We set the total number of epochs to be 120, and each epoch includes 1000 iterations. During training, we set the depth of our network to be 35, and utilize the non-linear activation PReLU [8]. For optimizing our network, the Adam [13] is adopted with a min-batch size of 4 to train the network. We initialize the learning rate as 0.01, which is divided by 2 every 15 epochs. All the experiments are performed by using an Nvidia 2080Ti GPU. + +# 4.1. Ablation Study + +Ablation Study on Different Components: To explore the effectiveness of our DRD-Net, it is necessary to decompose its full scheme into different parts and even replace the network architecture for the ablation study. + +- BL: Baseline (BL) indicates the residual network without the SE operation, which learns a function that maps the rainy images to the rain streaks. +- $\mathbf{BL} + \mathbf{SE}$ : Adding the SE operation to the baseline. +- $\mathbf{BL} + \mathbf{SE} + \mathbf{DB}$ : Employing two sub-networks for image deraining. One network is the rain residual net + +Table 1. Quantitative comparison between our DRD-Net and other network architectures. + +
DatasetMetricsBLBL+SEBL+SE+DBBL+SE+RBDRD-Net (Ours)
Rain200LPSNR35.5736.1736.8937.0437.15
SSIM0.97590.97780.97920.98600.9873
Rain200HPSNR26.2026.4927.1627.0128.16
SSIM0.82450.84730.91580.90610.9201
Rain800PSNR25.8326.0426.0926.1226.32
SSIM0.80930.81810.89030.89660.9018
+ +work (BL+SE), and the another is detail repair network based on the direct block (DB, see in Fig. 3(a)). + +- $\mathbf{BL} + \mathbf{SE} + \mathbf{RB}$ : DB is replaced with residual block (RB) in the detail repair network. +- BL+SE+SDCAB: Our DRD-Net, which comprises the rain residual network (BL+SE) and the detail repair network based on the proposed structure detail context aggregation block (SDCAB). + +Table 2. Ablation study on different settings of our method on the synthetic dataset Rain200H. M denotes the number of feature maps in our network and D is the total depth of our network. + +
MetricsM = 16M = 32M = 64
D = 8+3PSNR26.3626.7726.97
SSIM0.90850.91170.9135
D = 12+3PSNR26.5226.8927.31
SSIM0.90920.91290.9152
D = 16+3PSNR26.9327.6128.16
SSIM0.91270.91830.9201
+ +Analysis on SE and SDCAB: To validate the necessity of the structure in Fig. 3(d), we remove the SE operation from the network and show the results in Table 1. It is found that the performance of deraining without the SE operation suffers from slight degradations. This certifies the necessity of the SE operation from another side. In order to evaluate the effectiveness of the SDCAB, we compare our network with other connection style blocks, including the direct block (DB), the residual block (RB) which has been used in DDN [5]. For fair comparisons, we replace SDCAB with DB and RB respectively, which is shown in Table 1. The full scheme of $\mathrm{BL + SE + SDCAB}$ outperforms other architectures in the three datasets, which certifies that SDCAB is essential to detail-recovery image deraining. + +Ablation Study on Parameter Settings: Results under different parameter settings of DRD-Net can be found in Table 2. We have discussed the effects of the number of feature maps and SDCAB or the rain residual blocks (RRB). + +# 4.2. Comparison with the State-of-the-Arts + +We compare our method with several state-of-the-art detaining methods, including 2 prior-based methods, i.e., GMM [17], and DSC [20], and 4 learning-based methods, i.e., + +DDN [5], RESCAN [16], UGSM [3], DAF-Net [10], SPA-Net [25] and PReNet [21]. All these methods are performed in the same training and testing datasets for fair comparisons. + +Our DRD-Net can effectively avoid image degradation, caused by deraining as demonstrated in Fig. 5 (the upper row). Although most approaches can remove the rain streaks from the rainy image, the halo artifacts and color distortion have appeared after deraining. + +Moreover, it is challenging for most approaches to maintain/recover the details from heavy rainy images as shown in Fig. 5 (the middle and bottom rows). The white stripes of zebra and the bicycle are blurred severely by the compared approaches while they are considered as image details and recovered well by our DRD-Net. + +In order to validate the practicability of our DRD-Net, we visually evaluate its performance on a series of real-world rainy images in Fig. 6. DRD-Net can effectively remove the real-world rain streaks from the images while preserving their details, but other approaches somewhat tend to over-smooth the images. + +Moreover, the visual comparisons are commonly consistent to the numerical evaluations, which are shown in Table 3. Our DRD-Net mostly obtains the higher values of PSNR and SSIM than other methods on those three datasets. + +# 4.3. Detail Recovery for Other Deraining Networks + +Existing deep learning-based deraining methods resort to delicate network design to meet the challenging goal of removing rain streaks but retaining details of similar properties. In contrast, our DRD-Net decomposes this conflicting task into remove and repair by two parallel network branches, which share the same input and collaborate to spit an high-fidelity output. Apparently, the choice of the rain removal part is not unique, the detail recovery branch can be easily attached to existing deraining networks to boost their performance. + +Taking DDN [5] as an example, we experiment with the parallel network consisting of DDN and our detail repair network. For fair comparison, we keep most parameters from the original DDN untouched. The depth and the number of feature channels of the detail repair network are set as 24 and 16 respectively. We randomly select 20 image patches with the size of $64 \times 64$ to train the network, which + +![](images/5240746cb180f2a352de5b0aefb7974b20f8881a05aef9d943f515d8a19789c8.jpg) +Figure 5. Image deraining results tested in the synthetic datasets. From (a)-(h): (a) the rainy images, and the deraining results of (b) DNN [5], (c) RESCAN [16], (d) DAF-Net [10], (e) PReNet [21], (f) SPA-Net [25], (g) our DRD-Net respectively, and (h) the ground truth. + +![](images/097b88caf3ca5164609b3f639dd979c0dd45733a098bdee17a1cd85eb130be9e.jpg) +Figure 6. Image deraining results tested in the real datasets. From (a)-(h): (a) the rainy images, and the deraining results of (b) GMM [17], (c) DDN [5], (d) RESCAN [16], (e) DAF-Net [10], (f) PReNet [21], (g) SPA-Net [25] and (h) our DRD-Net respectively. + +is similar to DDN. We evaluate the network in the datasets Rain800 and Rain200H as shown in Table 4. One can observe that DDN incorporated with detail repair network outperforms the original DDN with negligible efficiency sacrifice, thanks to the parallel structure for detail recovery. + +# 4.4. Running Time + +We compare the running time of our method with different approaches on the dataset of Rain200H as shown in Table 5. It is observed that our method is not the fastest one, but its performance is still acceptable. + +Table 4. Quantitative evaluation, DDN w DRN indicates DDN incorporated with the detail repair network. + +
DatasetsMetricsDDNDDN w DRN
Rain200HPSNR24.6425.92
Time0.03s0.15s
Rain800PSNR24.0425.13
Time0.05s0.14s
+ +Table 3. Quantitative experiments evaluated on three recognized synthetic datasets. The first and second best results have been boldfaced and underlined. + +
DatasetRain200LRain200HRain800
PSNRSSIMPSNRSSIMPSNRSSIM
GMM [17]27.160.898213.040.467324.040.8675
DSC [20]25.680.875113.170.427220.950.7530
DDN [5]33.010.969224.640.848924.040.8675
RESCAN [16]37.070.986726.600.897424.090.8410
DAF-Net [10]32.070.964124.650.860725.270.8895
SPA-Net [25]31.590.965223.040.852222.410.8382
PReNet [21]36.760.979628.080.887126.610.9015
Ours37.150.987328.160.920126.320.9018
+ +![](images/681427f63fede15545e2c8ecd3dfcfc4142eb948610c08a00b1809783db1bc23.jpg) +(a) + +![](images/7f47b7a8fc0a6fb1f5e9880e07716e2ddb45fa0df61357a61b447dfa0dbd0d17.jpg) +(b) +Figure 7. The deraining results tested on the Google Vision API. From (a)-(c): (a) object recognition result in the real-world rainy image, (b) object recognition result after deraining by our DRD-Net, and (c) the averaged confidence in recognizing rain from 30 sets of the real-world rainy images and derained images of DDN [5], RESCAN [16] and Our DRD-Net respectively. Note: zero confidence refers to a total failure in recognizing rain from a derained image by Google API. + +![](images/3c9d2c84df94bb1345b775bbad1b400510f681caff91cbbd8605cf47e9a27f79.jpg) +(c) + +Table 5. Averaged time (in seconds) and performance of different methods in the dataset of Rain200H. + +
MetricsGMMDSCDDNRES CANDAF NetPRe NetSPA NetOurs
PSNR13.0413.1724.6426.6024.6528.0823.0428.16
Avg time331.4s92.9s0.03s0.25s0.52s0.20s0.06s0.54s
+ +# 4.5. Application + +To demonstrate that our DRD-Net can benefit vision-based applications, we employ Google Vision API to evaluate the deraining results. One of the results is shown in Fig. 7 (a-b). It is observed that the Google API can recognize the rainy weather in the rainy image while it cannot recognize the rainy weather in the derained image. Furthermore, we use the Google API to test 30 sets of the real-world rainy images and derained images of our method and two baseline methods [16, 5] as shown in Fig. 7 (c). As one can see, after deraining, the confidence in recognizing rain from the images are significantly reduced. + +# 5. Conclusion + +We have presented an end-to-end network with two subnetworks for image deraining from single images. One network is designed to remove the rain streaks from the rainy images, the other is proposed to find back the details to the derained images. We propose the new structure detail context aggregation block (SDCAB) which has a large receptive field to obtain more spatial information. Moreover, qualitative and quantitative experiments indicate that our method outperforms the state-of-the-art learning-based and traditional approaches in terms of removing the rain streaks and recovering the image details. + +# Acknowledgements + +This work was supported by the National Natural Science Foundation of China (No. 61502137, No. 61772267), the HKIBS Research Seed Fund 2019/20 (No. 190-009), the Research Seed Fund (No. 102367) of Lingnan University, Hong Kong, the Fundamental Research Funds for the Central Universities (No. NE2016004), and the Natural Science Foundation of Jiangsu Province (No. BK20190016). + +# References + +[1] Peter C. Barnum, Srinivasa G. Narasimhan, and Takeo Kanade. Analysis of rain and snow in frequency space. International Journal of Computer Vision, 86(2-3):256-274, 2010. +[2] Jérémie Bossu, Nicolas Hautière, and Jean-Philippe Tarel. Rain or snow detection in image sequences through use of a histogram of orientation of streaks. International Journal of Computer Vision, 93(3):348–367, 2011. +[3] Liang-Jian Deng, Ting-Zhu Huang, Xi-Le Zhao, and Tai-Xiang Jiang. A directional global sparse model for single image rain removal. Applied Mathematical Modelling, 59:662-679, 2018. +[4] Zhiwen Fan, Huafeng Wu, Xueyang Fu, Yue Huang, and Xinghao Ding. Residual-guide network for single image deraining. In 2018 ACM Multimedia Conference on Multimedia Conference, pages 1751-1759. ACM, 2018. +[5] Xueyang Fu, Jiabin Huang, Delu Zeng, Yue Huang, Xinghao Ding, and John W. Paisley. Removing rain from single images via a deep detail network. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 1715-1723, 2017. +[6] Kshitiz Garg and Shree K. Nayar. Detection and removal of rain from videos. In 2004 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR 2004), with CD-ROM, 27 June - 2 July 2004, Washington, DC, USA, pages 528-535, 2004. +[7] Xianglin Guo, Xingyu Xie, Guangcan Liu, Mingqiang Wei, and Jun Wang. Robust low-rank subspace segmentation with finite mixture noise. Pattern Recognition, 93:55-67, 2019. +[8] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In 2015 IEEE International Conference on Computer Vision, ICCV 2015, Santiago, Chile, December 7-13, 2015, pages 1026-1034, 2015. +[9] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In 2018 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2018, Salt Lake City, UT, USA, June 18-22, 2018, pages 7132-7141, 2018. +[10] Xiaowei Hu, Chi-Wing Fu, Lei Zhu, and Pheng-Ann Heng. Depth-attentional features for single-image rain removal. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. +[11] De-An Huang, Li-Wei Kang, Min-Chun Yang, Chia-Wen Lin, and Yu-Chiang Frank Wang. Context-aware single image rain removal. In Proceedings of the 2012 IEEE International Conference on Multimedia and Expo, ICME 2012, Melbourne, Australia, July 9-13, 2012, pages 164-169, 2012. +[12] Li-Wei Kang, Chia-Wen Lin, and Yu-Hsiang Fu. Automatic single-image-based rain streaks removal via image decomposition. IEEE Transactions on Image Processing, 21(4):1742-1755, 2011. +[13] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. + +[14] Guanbin Li, Xiang He, Wei Zhang, Huiyou Chang, Le Dong, and Liang Lin. Non-locally enhanced encoder-decoder network for single image de-raining. arXiv preprint arXiv:1808.01491, 2018. +[15] Ruoteng Li, Loong-Fah Cheong, and Robby T Tan. Heavy rain image restoration: Integrating physics model and conditional adversarial learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1633-1642, 2019. +[16] Xia Li, Jianlong Wu, Zhouchen Lin, Hong Liu, and Hongbin Zha. Recurrent squeeze-and-excitation context aggregation net for single image deraining. In Computer Vision - ECCV 2018 - 15th European Conference, Munich, Germany, September 8-14, 2018, Proceedings, Part VII, pages 262-277, 2018. +[17] Yu Li, Robby T. Tan, Xiaojie Guo, Jiangbo Lu, and Michael S. Brown. Rain streak removal using layer priors. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, volume 12, pages 2736-2744, 2016. +[18] Xing Liu, Masanori Suganuma, Zhun Sun, and Takayuki Okatani. Dual residual networks leveraging the potential of paired operations for image restoration. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7007-7016, 2019. +[19] Yu Luo, Yong Xu, and Hui Ji. Removing rain from a single image via discriminative sparse coding. In 2015 IEEE International Conference on Computer Vision, ICCV 2015, Santiago, Chile, December 7-13, 2015, volume 8, pages 3397-3405, 2015. +[20] Yu Luo, Yong Xu, and Hui Ji. Removing rain from a single image via discriminative sparse coding. In 2015 IEEE International Conference on Computer Vision, ICCV 2015, Santiago, Chile, December 7-13, 2015, pages 3397-3405, 2015. +[21] Dongwei Ren, Wangmeng Zuo, Qinghua Hu, Pengfei Zhu, and Deyu Meng. Progressive image deraining networks: a better and simpler baseline. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3937-3946, 2019. +[22] Varun Santhaseelan and Vijayan K Asari. Utilizing local phase information to remove rain from video. International Journal of Computer Vision, 112(1):71-89, 2015. +[23] Abhishek Kumar Tripathi and Sudipta Mukhopadhyay. Removal of rain from videos: a review. Signal, Image and Video Processing, 8(8):1421-1430, 2014. +[24] Guoqing Wang, Changming Sun, and Arcot Sowmya. Erlnet: Entangled representation learning for single image deraining. In Proceedings of the IEEE International Conference on Computer Vision, pages 5644-5652, 2019. +[25] Tianyu Wang, Xin Yang, Ke Xu, Shaozhe Chen, Qiang Zhang, and Rynson WH Lau. Spatial attentive single-image deraining with a high quality real rain dataset. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 12270–12279, 2019. +[26] Wei Wei, Deyu Meng, Qian Zhao, Zongben Xu, and Ying Wu. Semi-supervised transfer learning for image rain re + +moyal. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3877-3886, 2019. +[27] Wenhan Yang, Robby T. Tan, Jiashi Feng, Jiaying Liu, Zongming Guo, and Shuicheng Yan. Joint rain detection and removal via iterative region dependent multi-task learning. CoRR, abs/1609.07769, 2016. +[28] Wenhan Yang, Robby T. Tan, Jiashi Feng, Jiaying Liu, Zongming Guo, and Shuicheng Yan. Deep joint rain detection and removal from a single image. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 1685-1694, 2017. +[29] He Zhang and Vishal M. Patel. Convolutional sparse and low-rank coding-based rain streak removal. In 2017 IEEE Winter Conference on Applications of Computer Vision, WACV 2017, Santa Rosa, CA, USA, March 24-31, 2017, pages 1259-1267, 2017. +[30] He Zhang and Vishal M Patel. Density-aware single image de-raining using a multi-stream dense network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 695-704, 2018. +[31] He Zhang, Vishwanath Sindagi, and Vishal M. Patel. Image de-raining using a conditional generative adversarial network. CoRR, abs/1701.05957, 2017. +[32] Kai Zhang, Wangmeng Zuo, Yunjin Chen, Deyu Meng, and Lei Zhang. Beyond a gaussian denoiser: Residual learning of deep cnn for image denoising. IEEE Transactions on Image Processing, 26(7):3142-3155, 2017. +[33] Lei Zhu, Chi-Wing Fu, Dani Lischinski, and Pheng-Ann Heng. Joint bi-layer optimization for single-image rain streak removal. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pages 2545-2553, 2017. \ No newline at end of file diff --git a/detailrecoveryimagederainingviacontextaggregationnetworks/images.zip b/detailrecoveryimagederainingviacontextaggregationnetworks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ce227ee4c6e022c444d13a88d7c41d907bb73c13 --- /dev/null +++ b/detailrecoveryimagederainingviacontextaggregationnetworks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b284c5fd82df7845c67d4d15208f24b62f199c67cde9db5155773095f01e909 +size 948581 diff --git a/detailrecoveryimagederainingviacontextaggregationnetworks/layout.json b/detailrecoveryimagederainingviacontextaggregationnetworks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..9aaa83a7d10b6eb70355739cd447a13b3cfc449b --- /dev/null +++ b/detailrecoveryimagederainingviacontextaggregationnetworks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f238ec5d053a1b5fce0f67d670fa45dc3ffd3aab4e6902216edf623b3bd4f9a3 +size 351799 diff --git a/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/a91d226d-f3ab-482d-9494-621e2b126878_content_list.json b/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/a91d226d-f3ab-482d-9494-621e2b126878_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..1e27ce09ef5de3e8b08d86f0f050d20c01285e8d --- /dev/null +++ b/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/a91d226d-f3ab-482d-9494-621e2b126878_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d78d72a2d0fcd20d3ba0f71d7622623f1c995a329c93fd1615dd927d2e30690 +size 76948 diff --git a/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/a91d226d-f3ab-482d-9494-621e2b126878_model.json b/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/a91d226d-f3ab-482d-9494-621e2b126878_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6b0c9bc481f11ce7d9dc1e7105b64c1f895fa416 --- /dev/null +++ b/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/a91d226d-f3ab-482d-9494-621e2b126878_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:405677764ebbfe684533bd97ea8fa77d83a12db6ed51d9adc6aca50bcfb3827e +size 94397 diff --git a/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/a91d226d-f3ab-482d-9494-621e2b126878_origin.pdf b/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/a91d226d-f3ab-482d-9494-621e2b126878_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4a33de96637f59fb6bd1d7d603328457d8b92e23 --- /dev/null +++ b/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/a91d226d-f3ab-482d-9494-621e2b126878_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0a34cf97aa5e296741fedbc865aa33d26c0b7ebdfa133b73c311eb1867f2c22 +size 397235 diff --git a/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/full.md b/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/full.md new file mode 100644 index 0000000000000000000000000000000000000000..3ed20d22d8acb7491937e9ead84bafef7dbaf397 --- /dev/null +++ b/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/full.md @@ -0,0 +1,315 @@ +# Detecting Adversarial Samples Using Influence Functions and Nearest Neighbors + +Gilad Cohen +Tel Aviv University +Tel Aviv, 69978 + +giladco1@mail.tau.ac.il + +Guillermo Sapiro +Duke University +North Carolina, 27708 + +guillermo.sapiro@duke.edu + +Raja Giryes +Tel Aviv University +Tel Aviv, 69978 + +raja@tauex.tau.ac.il + +# Abstract + +Deep neural networks (DNNs) are notorious for their vulnerability to adversarial attacks, which are small perturbations added to their input images to mislead their prediction. Detection of adversarial examples is, therefore, a fundamental requirement for robust classification frameworks. In this work, we present a method for detecting such adversarial attacks, which is suitable for any pre-trained neural network classifier. We use influence functions to measure the impact of every training sample on the validation set data. From the influence scores, we find the most supportive training samples for any given validation example. A $k$ -nearest neighbor ( $k$ -NN) model fitted on the DNN's activation layers is employed to search for the ranking of these supporting training samples. We observe that these samples are highly correlated with the nearest neighbors of the normal inputs, while this correlation is much weaker for adversarial inputs. We train an adversarial detector using the $k$ -NN ranks and distances and show that it successfully distinguishes adversarial examples, getting state-of-the-art results on six attack methods with three datasets. Code is available at https://github.com/giladcohen/NNIF_adv_defense. + +# 1. Introduction + +Deep Neural Networks (DNNs) are vastly employed in both the academy and industry, achieving state-of-the-art (SOTA) results in many domains such as computer vision [21, 41, 49], natural language processing [1, 18], and speech recognition [15, 51]. However, studies have shown that DNNs are vulnerable to adversarial examples [12, 46], which are specially crafted perturbations on their input. Adversarial attacks generate such examples that fool machine learning models, inducing them to predict erroneously with high confidence, while being imperceptible to humans. Adversarial subspaces of different DNN classifiers tend to overlap, which makes some adversarial examples generated for a surrogate model fool also other different unseen DNNs [47]. This makes adversarial attacks a real threat to any machine learn + +![](images/4f68bb1dcd8c8ea2835ce395072962540eabb2e4f374fdc662d82e0ee8860183.jpg) +Figure 1. The correspondence between the helpful examples based on influence functions and the $k$ -nearest neighbours ( $k$ -NN) in the embedding space of a DNN can help to distinguish adversarial examples from normal ones. We present (using PCA) the embedding space of a DNN for a normal example (black star) with its adversarial version (brown $\mathbf{X}$ ) along with their $k$ -NN ( $k = 25$ ) and 25 most helpful samples. Note that for the normal example, the helpful samples highly correlate with the $k$ -NN in the embedding space. Yet, in the adversarial case, these samples are far from each other. This observation leads us to a technique for detecting adversarial attacks. + +ing model and thus should be kept in mind while deploying a DNN. + +The vulnerability of neural networks puts into question their usage in sensitive applications, where an opponent may provide modified inputs to cause misidentifications. For this reason, many methods have been developed to face this challenge. They can be mainly divided into two groups: 1) proactive defense methods, which aim at improving the robustness of DNNs to adversarial examples, and 2) reactive detection techniques that do not change the DNN but rather try to find whether an attack is associated with a certain input or not. + +Contribution. In this work, we focus on the reactive detection problem. We propose a novel strategy for detecting + +adversarial attacks that can be applied to any pre-trained neural network. The core idea of the algorithm is that there should be a correspondence between the training data and the classification of the network. If this relationship breaks then it is very likely that we are in the case of an adversarial input. + +To this end, we use two "metrics" to check the impact of the training data on the network decision. The first is influence functions [19], which determines how data points in the training set influence the decision of the network for a given test sample. This metric measures how much a small upweighting of a specific training point in the model's loss function affects the loss of a testing point. Thus, it provides us with a measure of how much a test sample classification is affected by each training sample. + +Second, we apply a $k$ -nearest neighbor ( $k$ -NN) classifier at the embedding space of the network. Various recent works [36, 8, 17, 7] demonstrate a high correlation between the network softmax output and the decision of a $k$ -NN applied at the embedding space of this network (where the neighbors are chosen from the training set). They basically show that the network's decision relies on the nearest neighbors resemblance in the embedding space. Thus, the distance in that space may serve as a measure for the effect of an example on the network output. + +Given the influence function and $k$ -NN based measures, we turn to combine them together to generate a novel strategy to detect adversarial examples. The rationale behind our approach is that for a normal input, its $k$ -NN training samples (nearest neighbors in the embedding space) and the most helpful training samples (found using the influence function) should correlate. Yet, for adversarial examples this correlation should break and thus, it will serve as an indication that an attack is happening. + +Figure 1 illustrates this relationship between the $k$ -NN and the most helpful training samples. The black star and brown $\mathbf{X}$ denote a normal and its corresponding adversarial image from CIFAR-10 validation set; the plot is of the embedding space projected using PCA fitted on the training set. For each sample (normal/adv), we find its 25 nearest neighbors (blue circles/red downward triangles) in the DNN embedding space; in addition, we find its 25 most helpful training examples from the training set (marked as blue squares and red upward triangles, respectively). Note that the nearest neighbors and the top most helpful training samples of the normal image are very close in the PCA embedding space, whereas the adversarial image does not exhibit the same correspondence between the training samples. + +To check the correlation between the two, we pursue the following strategy: For an unseen input sample, we take the most influential examples from the training set chosen by the influence functions. Then, we check their distance ranking in the embedding space of the network (i.e., what value of $k$ will + +cause $k$ -NN to take them into account) and their $L_{2}$ distance from the input sample's embedding vector. Finally, we use these $k$ -NN features to train a simple Logistic Regression (LR) for detecting whether the input is adversarial or not. + +We evaluate our detection strategy on various attack methods and datasets showing its advantage over other leading detection techniques. The results confirm the hypothesis claimed in previous works on the resemblance between $k$ -NN applied on the embedding space and the DNN decision, and show how it can be used for detecting adversarial examples. + +# 2. Related work + +In this section, we briefly review existing papers on adversarial attacks and defenses, and related theory. + +Theory: Madry et al. used the framework of robust optimization and showed results of adversarial training [26]. They found that projected gradient descent (PGD) is an optimal first order adversary, and employing it in the DNN training leads to optimal robustness against any first order attack. Simon-Gabriel et al. demonstrated that DNNs' vulnerability to adversarial attacks is increased with the gradient of the training loss as a function of the inputs [43]. They also found that this vulnerability does not depend on the DNN model. + +Fawzi et al. studied the geometry and complexity of the functions learned by DNNs and provided empirical analysis of the curvatures of their decision boundaries [10]. They showed that a DNN classifier is most vulnerable where its decision boundary is positively curved and that natural images are usually located in the vicinity of flat decision boundaries. These findings are also supported by Moosavi-Dezfooli et al. [31], who found that positively curved decision boundaries increase the likelihood that a small universal perturbation would fool a DNN classifier. + +Some works provided guarantees to certify robustness of the network. Hein and Andriushchenko formalized a formal upper bound for the noise required to flip a network prediction [14], while Sinha et al. provided an efficient and fast guarantee of robustness for the worst-case population performance, with high probability [44]. + +Adversarial attacks: One of the simplest and fastest attack methods is the fast gradient sign method (FGSM) [12]; in this method the attacker linearly fits the cross entropy loss around the attacked sample and lightly perturbs the image pixels in the direction of the gradient loss. This is a fast one-step attack, which is very easy to deploy on raw input images. + +The Jacobian-based saliency map attack (JSMA) [37] takes a different approach. Instead of mildly changing all image pixels, this attack is crafted on the $L_{0}$ norm, finding one or two pixels which induce the largest change in the loss and modify only them. This is a strong attack, achieving 97% + +success rate by modifying only $4.02\%$ of the input features on average. Yet, it is iterative and costly. + +Deepfool [32] proposed by Moosavi-Dezfooli et al. is a non-targeted attack1 that creates an adversarial example by moving the attacked input sample to its closest decision boundary, assuming an affine classifier. In reality most DNNs are very non linear, however, the authors used an iterative method, linearizing the classifier around the test sample at every iteration. Compared to FGSM and JSMA, Deepfool performs less perturbations to the input. It was also employed in the Universal Perturbations attack [30], which is an iterative attack that aims at fooling a group of images using the same minimal, universal perturbation applied on all of them. + +Carlini and Wagner [4] proposed a targeted attack $^2$ (denoted as CW) to impact the defensive distillation method [35]. The CW attack is resilient against most adversarial detection methods. In another work Carlini and Wagner provided an optimization framework [3], which includes a defense-specific loss as a regularization term. This optimization-based attack is argued to be the most effective to date for a white-box threat model where the adversary knows everything related to the trained DNN: training data, architecture, hyper-parameters, weights, etc. Chen et al. [5] included a $L_{1}$ regularization to the CW attack, forming the Elastic-net Attack to DNNs (EAD). + +Adversarial defenses: A wide range of proactive defense approaches have been proposed, including adversarial (re)training [12, 22, 48, 42, 29], distillation networks [35], gradient masking [48], feature squeezing [50], network input regularization [38, 16], output regularization [14], adjusting weights of correctly predicted labels [40], Parseval networks [6], and $k$ -NN search [9, 45]. + +However, those defenses can be evaded by the optimization-based attack [3], either wholly or partially. Since there are no known intrinsic properties that differentiate adversarial samples from regular images, proactive adversarial defense is extremely challenging. Instead, recent works have focused on reactive adversarial detection methods, which aim at distinguishing adversarial images from natural images, based on features extracted from DNN layers [28, 24, 39] or from a learned encoder [27]. Feinman et al. [11] proposed a LR detector based on Kernel density (KD) and Bayesian uncertainty features. + +Ma et al. [25] characterized the dimensional properties of the adversarial subspaces regions and proposed to use a property called Local Intrinsic Dimentionaloty (LID). LID describes the rate of expansion in the number of data objects as the distance from the reference sample increases. The + +authors estimated the LID score at every DNN layer using extreme value theory, where the smallest NN distances are considered as extreme events associated with the lower tail of the data samples' underlying distance distribution. Given a pretrained network and a dataset of normal examples, the authors applied on every sample: 1) Adversarial attack. 2) Addition of Gaussian Noise. The natural and noisy images were considered as negative (non-adversarial) class and the adversarial images were considered as positive class. For each image (natural/noisy/adversarial) they calculated a LID score at every DNN layer. Lastly, a LR model was fitted on the LID features for the adversarial detection task. + +Papernot and McDaniel [36] proposed the Deep $k$ -Nearest Neighbors (DkNN) algorithm to estimate better the prediction, confidence, and credibility for a given test sample. Using a pretrained network, they fitted a $k$ -NN model at every layer. Next, they used a left-out calibration set to estimate the nonconformity of every test sample for label j, counting the number of nearest neighbors along the DNN layer which differs from j. They showed that when an adversarial attack is made on a test sample, the real label displays less correspondence with the $k$ -NN labels from the DNN activations along the layers. + +Lee et al. [23] trained generative classifiers using the DNN activations of the training set on every layer to detect adversarial examples by applying a Mahalanobis distance-based confidence score. First, for every class and every layer, they computed the empirical mean and covariance of the activations induced by the training samples. Next, using the above class-conditional Gaussian distributions, they calculated the Mahalanobis distance between a test sample and its nearest class-conditional Gaussian. These distances are used as features to train a LR classifier for the adversarial detection task. The authors claimed that using the Mahalanobis distance is significantly more effective than the Euclidean distance employed in [25] and showed improved detection results. + +# 3. Method + +We hypothesize that the DNN predictions are influenced by the $k$ -NN of the training data in their hidden layers, especially in the embedding layer. If so, in order to fool the network, an adversarial attack must move the test sample towards a "bad" subspace in the embedding space, where harmful training data can cause the network to misclassify the correct label. To inspect our hypothesis, we fitted a $k$ -NN model on the DNN's activation layers, and also employed the influence functions as used in [19]. + +Influence functions can interpret a DNN by pointing out which of the training samples helped the DNN to make its prediction, and which training samples were harmful, i.e., inhibited the network from its prediction. Koh and Liang [19] suggested to measure the influence a train image $z$ has + +on the loss of a specific test image $z_{test}$ , by the term: + +$$ +I _ {u p, l o s s} (z, z _ {t e s t}) = - \nabla_ {\theta} L (z _ {t e s t}, \theta) ^ {T} H _ {\theta} ^ {- 1} \nabla_ {\theta} L (z, \theta), (1) +$$ + +where $H$ is the Hessian of the machine learning model, $L$ is its loss, and $\theta$ are the model parameters. In the definition of Eq. (1) $z$ and $z_{test}$ are images. + +For each test example $z_{test}$ , we calculate Eq. (1) per each training example $z$ in the training set. Then, we sort all $I_{up,loss}(z,z_{test})$ scores, determining the top $M$ helpful and harmful training examples for a specific $z_{test}$ . Next, for each of the $2\mathrm{x}M$ selected training points we find its rank and distance from the testing example by fitting a $k$ -NN model on the embedding space using all the training examples' embedding vectors. We feed the embedding vector of each test sample $z_{test}$ to the $k$ -NN model to extract all the nearest neighbors' ranks (denoted as $\mathcal{R}$ ) and distances (denoted $\mathcal{D}$ ) of the examples in the training set. The $\mathcal{R}$ and $\mathcal{D}$ features can also be extracted from any other hidden activation layer within the DNN, and not solely from the embedding vector. $\mathcal{R}^{M\uparrow}, \mathcal{D}^{M\uparrow}$ and $\mathcal{R}^{M\downarrow}, \mathcal{D}^{M\downarrow}$ are all the ranks and distances of the helpful and harmful training examples, respectively. + +We apply an adversarial attack on $z_{test}$ and repeat the aforementioned process on the new, crafted image. Both the normal and adversarial features $(\mathcal{R}^{M\uparrow}, \mathcal{D}^{M\uparrow}, \mathcal{R}^{M\downarrow}, \mathcal{D}^{M\downarrow})$ are used to train a LR classifier for the adversarial detection task. The detector training scheme is described in Alg. 1. + +We name our adversarial detection method Nearest Neighbor Influence Functions (NNIF). We assume that the training, validation, and testing sets are not contaminated with adversarial examples, as in [3]. We start by generating an adversarial validation set from the normal validation set (step 4). The $M$ most helpful and harmful training examples associated with the validation image prediction (either normal or adversarial) are found using the influence function in step 22 (see supp. material for the INFLUENCEFUNCTION procedure). The NNIF features are then evaluated by the $k$ -NN model, extracting the ranks and distances (from $\mathcal{R}$ and $\mathcal{D}$ ) of the most influential training points found above. This is done for both the normal validation images (step 8) and for the adversarial images (step 12). This scheme can be carried out on the embedding layer alone, or employed for all $L$ activation layers within the DNN. + +Finally, a LR classifier is trained using the NNIF features. Images from the test set are classified to either adversarial (positive) or normal (negative) based on the NNIF features extracted from the $M$ most helpful/harmful training examples, $(\mathcal{R}^{M\uparrow},\mathcal{D}^{M\uparrow},\mathcal{R}^{M\downarrow},\mathcal{D}^{M\downarrow})$ + +Training our NNIF detector is very time consuming, requiring us to calculate Eq. (1) on the entire training set for every validation image, having a time complexity of $\mathcal{O}(N_{train} \cdot N_{val})$ , where $N_{train}$ and $N_{val}$ are the size of the training and validation sets, respectively. For an adversarial detection the complexity time is $\mathcal{O}(N_{train})$ , since we + +need to find the top $M$ helpful/harmful training examples for every new incoming test image. + +Papernot and McDaniel [36] focused on improving credibility and robustness in DNN. They used the nearest neighbors in the activation layers for interpretability. As an additional competing strategy, we convert their original Dk:NN algorithm [36] to an adversarial detection method. This is done by collecting the empirical p-values calculated in the Dk:NN strategy and formulating a reactive adversarial detector by training a LR model on these features. While NNIF also uses nearest neighbors, instead of inspecting the labels of the nearest neighbors, we examine the correlation between them and the image's most helpful/harmful training examples using the influence functions. + +# 4. Results + +This section shows the power of our NNIF adversarial detector against six adversarial attack strategies (norms in parentheses): FGSM $(L_{\infty})$ , JSMA $(L_0)$ , DeepFool $(L_{2})$ , CW $(L_{2})$ , PGD $(L_{\infty})$ , and EAD $(L_{1})$ , as introduced in Section 2. The PGD attack was used with input perturbation as implemented by [26]. We selected these attacks for our experiments due to their effectiveness, diversity, and popularity. For versatility, we used Deepfool and EAD as non-targeted attacks. PGD was We applied these attacks on three datasets: CIFAR-10, CIFAR-100 [20], and SVHN [33]. NNIF performance is compared to the SOTA LID and Mahalanobis detectors (Section 2) and also to the DkNN adversarial detector (Section 3). Lastly, we analyzed the robustness of NNIF against a white-box setting. Before presenting our results, we first describe the experimental setup used in our analysis. + +# 4.1. Experimental setup + +Training and Testing: Each of the three image datasets was divided into three subsets: training set, validation set, and testing set, containing 49k, 1k, and 10k images respectively. Since our NNIF method is time consuming (especially the procedure INFLUENCEFUNCTION in Alg. 1), we randomly selected 49k and 1k training and validation samples, respectively, from the official SVHN training set and 10k testing samples from the official SVHN testing set. Any validation or testing image not correctly classified by the DNN was discarded. For every image in the validation and testing sets, we generated adversarial examples using all six attack methods, as describe in Step 4 in Alg. 1. Then, an equal number of normal and adversarial validation images were used to train a LR classifier, which was later applied on the remaining testing images for calculating the detectors metrics. We used the cleverhans library [34] to carry out all the adversarial attacks. + +Since the DkNN method requires a calibration set, we randomly selected $33\%$ of the validation set examples (after discarding the misclassifications) for calibrating it. Note + +Algorithm 1 Adversarial detection using Nearest Neighbors Influence Functions (NNIF) +Input: Training set $(X_{train},Y_{train})$ and validation set $(X_{val},Y_{val})$ +Input: Pre-trained DNN with L activation layers and parameters $\theta$ +Input: M: Number of top influence samples to collect +Output: Detector $(\mathcal{R}^{M\uparrow},\mathcal{D}^{M\uparrow},\mathcal{R}^{M\downarrow},\mathcal{D}^{M\downarrow})$ +1: $N_{train} = |X_{train}|,N_{val} = |X_{val}|$ +2: Initialize: $R_{norm}^{+} = [],D_{norm}^{+} = [],R_{norm}^{-} = [],D_{norm}^{-} = []$ +3: Initialize: $R_{adv}^{+} = [],D_{adv}^{+} = [],R_{adv}^{-} = [],D_{adv}^{-} = []$ +4: $(X_{val}^{adv},Y_{val}^{adv}):=$ adversarial attack on $(X_{val},Y_{val})$ +5: for l in [1,L] do +6: Fit k-NN[l] model on layer l. k = Ntrain +7: for $(x_i,y_i)$ in $(X_{val},Y_{val})$ do +8: $\mathcal{R}^{M\uparrow},\mathcal{D}^{M\uparrow},\mathcal{R}^{M\downarrow},\mathcal{D}^{M\downarrow}:=$ NNFEATURES $(x_i,k-NN[l])$ +9: $R_{norm}^{+}$ .append $(\mathcal{R}^{M\uparrow}),D_{norm}^{+}$ .append $(\mathcal{D}^{M\uparrow}),R_{norm}^{-}$ .append $(\mathcal{R}^{M\downarrow}),D_{norm}^{-}$ .append $(\mathcal{D}^{M\downarrow})$ +10: end for +11: for $(x_i,y_i)$ in $(X_{val}^{adv},Y_{val})$ do +12: $\mathcal{R}^{M\uparrow},\mathcal{D}^{M\uparrow},\mathcal{R}^{M\downarrow},\mathcal{D}^{M\downarrow}:=$ NNFEATURES $(x_i,k-NN[l])$ +13: $R_{adv}^{+}$ .append $(\mathcal{R}^{M\uparrow}),D_{adv}^{+}$ .append $(\mathcal{D}^{M\uparrow}),R_{adv}^{-}$ .append $(\mathcal{R}^{M\downarrow}),D_{adv}^{-}$ .append $(\mathcal{D}^{M\downarrow})$ +14: end for +15: end for +16: NNIFpos = $(R_{adv}^{+},D_{adv}^{+},R_{adv}^{-},D_{adv}^{-})$ +17: NNIFneg = $(R_{norm}^{+},D_{norm}^{+},R_{norm}^{-},D_{norm}^{-})$ +18: Detector $(\mathcal{R}^{M\uparrow},\mathcal{D}^{M\uparrow},\mathcal{R}^{M\downarrow},\mathcal{D}^{M\downarrow})=$ train a classifier on $(NNIFpos,NNIFneg)$ +19: procedure NNFEATURES $(x_i,k-NN[l])$ +20: Initialize: $R^{+}=[],D^{+}=[],R^{-}=[],D^{-}=[]$ +21: $\mathcal{R},\mathcal{D}:=$ Apply k-NN on activation layer l, get training examples' ranks & $L_2$ distances out of activations of sample $x_i$ +22: $H_{inds}^{+},H_{inds}^{-}:=$ INFLUENCEFUNCTION(( $x_i,y_i),(X_{train},Y_{train}))$ +training samples. This procedure is presented in the supp. material. +23: for j in $H_{inds}^{+}$ do +24: $R^{+}$ .append $(\mathcal{R}[j])$ +25: $D^{+}$ .append $(\mathcal{D}[j])$ +26: end for +27: for j in $H_{inds}^{-}$ do +28: $R^{-}$ .append $(\mathcal{R}[j])$ +29: $D^{-}$ .append $(\mathcal{D}[j])$ +30: end for +31: return $R^{+},D^{+},R^{-},D^{-}$ +32: end procedure + +that although Papernot and McDaniel [36] showed that the nearest neighbors can qualitatively detect adversarial attacks (see Fig. 7 in [36]), they did not formalize an adversarial detector. We employ their empirical $p$ -values as features for the adversarial detection task. + +Training DNNs: We trained all DNNs on the training set while decaying the learning rate using the validation set's accuracy score. All the DNNs used in our experiments are Resnet-34 [13] with global average pooling layer prior to the embedding space. The embedding vector was multiplied by a fully-connected layer for the logits calculation. We trained + +all three datasets for 200 epochs, with $L_{2}$ weight regularization of 0.0004, using a Stochastic Gradient Decent optimizer with momentum 0.9 and Nesterov updates. For evaluation we used the model checkpoint with the best (highest) validation accuracy on the image classification task. We follow the checklist in [2] and report the full DNN validation/test accuracies for the clean models when not under attack and the attacks success rates (see supp. material). These DNNs perform close to the SOTA and thus are sufficient for being used in an adversarial study without fine tuning [11]. + +Parameter tuning: The number of neighbors $(k)$ for LID + +![](images/cfa586571ea60ded7e987c2c450f05d7835cc66c453f4a981079d14401b8eea8.jpg) +Figure 2. Comparison of AUC scores for detection of FGSM, JSMA, Deepfool, CW, PGD, and EAD attacks on three datasets: (a) CIFAR-10, (b) CIFAR-100, and (c) SVHN. The black, blue, green, and red bars correspond to the DkNN, LID, Mahalanobis, and NNIF defense methods, respectively. The hatched pattern bars correspond to AUC scores increase where taking into consideration all the DNN activation layers instead of just the penultimate activation layer. Each attack cluster of bars is divided to four columns which correspond to the methods (from left to right): DkNN, LID, Mahalanobis, and NNIF. Our NNIF detector surpasses previous SOTA methods by a large margin for most of the attacks. + +![](images/6dd483193e06adca0acee0c97b145bbbb1668053d8bb0bab69b943d301a50aae.jpg) + +![](images/b6ebeda98dfd50fe7e337e7604e6c36632a48cca1cd9d253c5908b483fbd74b5.jpg) + +and DkNN, the noise magnitude $(\epsilon)$ for the Mahalanobis method, and the number of top influence samples to collect $(M)$ for NNIF were chosen using nested cross validation within the validation set, based on the AUC values of the detection ROC curve. We tuned $k$ for DkNN using an exhaustive grid search between [10, $N/\# \text{classes}]$ , where N is the dataset size and #classes is the number of classes. For LID the number of nearest neighbors was tuned using a grid search over the range [10, 40) while using a minibatch size of 100 (as in [25]). For the Mahalanobis method we tuned $\epsilon$ using an exhaustive grid search in log-space between $[1E^{-5}, 1E^{-2}]$ , and $M$ was tuned using a grid search over [10, 500]. The selected parameters are presented in the supp. material. + +Running INFLUENCEFUNCTION in Alg. 1 for an entire training set is very slow. Thus, for every testing set we randomly selected only $10\mathrm{k}$ out of the $49\mathrm{k}$ samples in the training set and calculated $I_{up,loss}$ (Eq. (1)) just for them. Although this is a coarse approximation of the real nearest neighbors distribution in the training set on the DNN embedding space, this approximation is sufficient for achieving new SOTA adversarial detection. We emphasize that this approximation was done only for the testing set, and not for the validation set. + +Activation layers: The LID, Mahalanobis, and NNIF detectors can be trained using either features from the embedding space alone or using all the activation layers in the network. The DkNN detector portrays very poor results when it is applied on all the DNN's features (data not shown) and therefore, we present all the DkNN results by training features from the embedding space alone. + +Threat model: We consider two treat models, black-box and white-box settings. Unless stated otherwise, the default + +threat model is black-box, where the attacker is unaware that an adversarial detection is employed. In this setting, only the model's parameters are given to the adversary. In Section 4.5 we also consider a white-box setting, where the attacker knows the model parameters, and also the adversarial detection scheme. + +# 4.2. Detection of adversarial attacks + +Figure 2 shows the discrimination power (AUC score) of the four inspected adversarial detectors: DkNN (black), LID (blue), Mahalabolis (green) and NNIF (red), on three popular datasets: CIFAR-10, CIFAR-100, and SVHN. We compare between the detection scores calculated for six adversarial attacks: FGSM, JSMA, Deepfool, CW, PGD, and EAD. The solid bars correspond to detections where only the penultimate activation layer was utilized. In some cases, considering all the layers in the DNN activations boosts the LID/Mahalanobis/NNIF scores; this is portrayed as a complementary hatched patterned bar above the solid bar. + +Our method surpasses all other detectors for distinguishing Deepfool, CW, and PGD attacks, for all the datasets. On FGSM and JSMA our NNIF detector also demonstrates SOTA results, matching the Mahalanobis detector's performance. Against EAD we show new SOTA for CIFAR-10 and SVHN, but not for CIFAR-100. Table 1 summarizes the AUC scores of the detectors using features from all the DNN's activation layers. The only exception is the $DkNN$ method, which is employed only on the embedding space. In the supp. material, we include results for more attacks and a similar table for the obtained AUC scores using only the DNN's penultimate layer. + +Table 1. Comparison of AUC scores $(\%)$ for various adversarial detection methods. Results obtained using all the DNN's activation layers for LID/Mahalanobis/NNIF and only the embedding space for DkNN. + +
DatasetDetectorFGSMJSMADeepfoolCWPGDEAD
CIFAR-10DkNN87.8195.3795.8296.8886.8385.20
LID98.1895.7495.8097.8293.2483.46
Mahalanobis99.8099.5697.4996.4894.7489.41
NNIF (ours)99.9699.5099.3299.598.3195.09
CIFAR-100DkNN93.6583.4676.7193.7773.7878.42
LID92.3378.6351.6167.8373.7151.11
Mahalanobis99.8796.4462.0574.4378.5362.93
NNIF (ours)99.9697.5077.1796.5196.6074.86
SVHNDkNN85.2494.6191.1395.1579.0784.77
LID99.9297.0693.9095.8280.1287.86
Mahalanobis100.0099.9197.9299.1894.4795.77
NNIF (ours)100.0099.7699.0699.5996.1897.40
+ +Table 2. Ablation test for adversarial attack detection: Calculating AUC score and accuracy for selected features. Attacking CIFAR-10 dataset using Deepfool. + +
RM↑DM↑RM↓DM↓AUC(%)acc(%)
✓82.1177.03
✓66.1461.47
✓✓83.2578.44
✓99.7997.68
✓✓99.8297.51
✓✓99.7999.29
✓✓✓99.8197.34
✓98.2796.69
✓✓97.7397.21
✓✓98.2896.73
✓✓✓97.6297.12
✓✓99.7997.73
✓✓✓99.8197.78
✓✓✓99.7997.71
✓✓✓✓99.8297.86
+ +# 4.3. Ablation study + +To quantify the contribution of each one of the features $(\mathcal{R}^{M\uparrow},\mathcal{D}^{M\uparrow},\mathcal{R}^{M\downarrow},\mathcal{D}^{M\downarrow})$ on the NNIF method performance, we conducted an ablation study on CIFAR-10 dataset. Table 2 shows the AUC and accuracy results for Deepfool attack using features from the DNN's embedding space only. In the supp. material we present an extended ablation study with more attacks: FGSM, JSMA, and CW. + +Our analysis shows that the most influential feature is $\mathcal{D}^{M\uparrow}$ , which is the $L_{2}$ distance from the most helpful training examples on the embedding space. In most cases, our NNIF detector performance using $\mathcal{D}^{M\uparrow}$ is nearly as good as the performance upon utilizing all four features. The least important feature is $\mathcal{R}^{M\downarrow}$ , which barely helps the adversarial detection. Intuitively it makes sense because we have noticed that the classes of the most harmful training examples always differ from the normal examples' class and mostly differ from the adversarial examples' class, and thus + +their rankings $(\mathcal{R}^{M\downarrow})$ are expected to be high for both cases (normal/adversarial). On the other hand, the distances from the most harmful training examples $(\mathcal{D}^{M\downarrow})$ are beneficial for the detection. The most helpful ranks $(\mathcal{R}^{M\uparrow})$ is a beneficial feature when used by itself, alias incorporating it with $\mathcal{D}^{M\uparrow}$ did not improve the results. We therefore deduce that the information added by $\mathcal{R}^{M\uparrow}$ can already be inferred from $\mathcal{D}^{M\uparrow}$ in our detector. + +We also show that the features $\mathcal{R}^{M\uparrow}$ , $\mathcal{D}^{M\uparrow}$ , $\mathcal{D}^{M\downarrow}$ affect every attack differently. We calculated the probability density functions for these three features on CIFAR-10, applying the Deepfool and CW attacks (shown in the supp. material). From these histograms it can be easily observed that $\mathcal{R}^{M\uparrow}$ or $\mathcal{D}^{M\uparrow}$ are more useful for detecting Deepfool adversarial attacks than CW ones. On the other hand, the $\mathcal{D}^{M\downarrow}$ feature discriminates CW attacks better than Deepfool attacks. + +A deployment of any learning based detector on systems is risky since an attacker could potentially have access to the LR classifier's parameters. Thus, it is helpful to deploy instead a detector which inspects only one feature and applies a simple thresholding. Our results show that this scheme is possible with NNIF using only the $\mathcal{D}^{M\uparrow}$ feature for all attacks. + +# 4.4. Generalization to other attacks + +To evaluate how well our detection method can be transferred to unseen attacks, we trained LR classifiers on the features obtained using the FGSM attack, and then evaluated the classifiers on the other (unseen) attacks. The AUC scores are shown in Table 3. It can be observed that our NNIF method shows the best generalization everywhere except to JSMA. Table 3 results were collected using only the penultimate layer in the DNN (the embedding vector); A similar generalization table with additional attacks, using all the DNN layers, is provided in the supp. material. Notice that the generalization is weaker for all methods in this case. + +Table 3. Generalization of adversarial detection from FGSM attack to unseen attacks. The LR classifier is trained on the features extracted after applying FGSM attack, and then evaluated on JSMA, Deepfool, CW, PGD, and EAD. + +
DatasetDetectorFGSM (seen)JSMADeepfoolCWPGDEAD
CIFAR-10DkNN87.8194.8995.2196.7685.1083.28
LID90.1294.6795.4397.6690.2982.52
Mahalanobis96.8098.9595.0389.5791.3968.87
NNIF (ours)87.7594.8197.9898.9893.9486.95
CIFAR-100DkNN93.6583.1662.4192.2273.6062.67
LID80.6874.3352.2567.8472.2552.10
Mahalanobis83.9090.2059.9668.7269.4259.34
NNIF (ours)87.2380.7678.8293.1681.8770.49
SVHNDkNN85.2493.4389.8492.2075.9979.81
LID88.3893.9391.3294.2280.2684.24
Mahalanobis98.1499.0091.4687.5186.2680.62
NNIF (ours)91.0697.9195.7998.1689.8091.99
+ +# 4.5. Attack against NNIF + +Here we consider a white-box threat model. In this setting, the adversary knows more than just the model parameters. We assume that the attacker is familiar with the adversarial defense scheme, but does not have access to the detector's parameters. Since the NNIF algorithm utilizes the entire training set, these data are also accessible to the attacker in our white-box setting. We employ a similar attack strategy as was proposed in [3] to evade the KD-based detector, and define a modified objective for the CW minimization: + +$$ +\text {m i n i m i z e} \| x - x _ {\text {a d v}} \| _ {2} ^ {2} + c \cdot \left(\ell_ {c w} \left(x _ {\text {a d v}}\right) + \ell_ {*} \left(D \left(x _ {\text {a d v}}\right)\right)\right), \tag {2} +$$ + +where $\ell_{cw}$ is the original adversarial loss term used in [4], and $D(x_{adv})$ is the sum over all the distances (in the embedding space) between the adversarial image and the original image's most helpful training samples ( $D_{adv}^{+}$ in Alg. 1). More rigorously, we define: + +$$ +\begin{array}{l} \ell_ {*} \left(D \left(x _ {a d v}\right)\right) := \sum D _ {a d v} ^ {+} = \\ \sum_ {i = 1} ^ {M} \left\| \mathrm {D N N} \left(x _ {\text {a d v}}\right) - \mathrm {D N N} \left(X _ {\text {t r a i n}} \left(H _ {\text {i n d s}} ^ {+} [ i ]\right)\right) \right\| _ {1}, \tag {3} \\ \end{array} +$$ + +where $\mathrm{DNN}(\cdot)$ is the network transformation from the input image to the embedding vector in the penultimate layer, and $H_{\text{inds}}^{+}[i]$ is the index of the $i^{th}$ most helpful training sample. Lastly, $c$ is a constant which balances between the fidelity to the original image and the adversarial strength. + +The objective of the minimization in Eq. (2) is to apply the CW attack while keeping $x_{adv}$ close to the most helpful training samples of the original image. In theory, we should have demanded this proximity for the nearest neighbors of $x_{adv}$ , and not for $x_{adv}$ itself, but differentiating over the nearest neighbor algorithm is not feasible. It should also be noted that this attack was performed only on the penultimate activation layer, with the features that correspond to the most helpful examples: $\mathcal{R}^{M\uparrow}$ and $\mathcal{D}^{M\uparrow}$ . + +We applied this white-box attack on 4000 random samples of CIFAR-10 test set. We show the performances of $DkNN$ , LID, Mahalanobis, and NNIF detectors on the original CW compared to our CW-Opt attack in Table 4. Results for other datasets are in the supp. material. For every detector we used the same hyper-parameters which yielded the best defense results using only the last layer. Following [3], we present the results in this experiment in term of accuracy, instead of AUC used in previous tests. + +From Table 4 we observe that the proposed white-box attack decreases NNIF detection accuracy by only $1\%$ . Therefore, we conclude that our NNIF defense algorithm is robust to a white-box setting. In addition, we note that the new attack impairs all the defense algorithms which rely on $L_{2}$ distance of nearest neighbors in the embedding space: DkNN, LID, and NNIF. Yet, for Mahalanobis we observe + +Table 4. Defense accuracy $(\%)$ for a white-box attack targeting the NNIF detector on CIFAR-10. + +
AttackDkNNLIDMahalanobisNNIF
CW93.4591.4390.7091.95
CW-Opt90.9989.7492.2990.81
+ +an adverse effect. This is somewhat expected since Mahalanobis estimates a global Gaussian for each class, and does not consider local features in the embedding space. + +# 5. Discussion and conclusions + +In this paper, we addressed the task of detecting adversarial attacks. We showed that for normal (untempered) images, there exists a strong correlation between their nearest neighbors in the DNN's embedding space and their most helpful training examples, found using influence functions. Our empirical results show that the $L_{2}$ distance from a test image embedding vector to its most helpful training inputs $(\mathcal{D}^{M^{\dagger}})$ is a strong measure for the detection of adversarial examples. The aforementioned distance combined with the nearest neighbors ranking order of the training inputs were used to achieve a SOTA adversarial detection performance for six attacks (FGSM, JSMA, Deepfool, CW, PGD, EAD) on three datasets: CIFAR-10, CIFAR-100, and SVHN. Furthermore, we showed that our detector is robust in a white-box setting. + +One possible avenue for future research is to inspect how the nearest neighbors are correlated with the most helpful/harmful training examples using different distance metrics or by employing a transform on the DNN embedding vectors. We emphasize that we mainly used the $L_{2}$ distance throughout our analysis, thus, we suspect that using another distance metric such as Mahalanobis [23] could improve our results further. + +Another open issue for future research is the long computation time, which is required to calculate the influence functions for the entire training set. It is obvious that in order to deploy our NNIF algorithm, a significant improvement in computation time is needed, especially for real time applications or systems, which mandate fast detection pace. A possible solution to this problem may be a form of hash map from the nearest neighbors to the most influence training examples. Every training example can be encoded with a probability vector for its influence on a specific class; then, instead of employing a simple $k$ -NN search in the embedding space, we can average over the probability of each class. + +Acknowledgements. GS is partially supported by ARO, NGA, ONR, NSF, and gifts from Amazon, Google, and Microsoft. RG and GC are supported by ERC-StG grant no. 757497 (SPADE) and gifts from NVIDIA, Amazon, and Google. + +# References + +[1] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv:1409.0473, 2014. +[2] Nicholas Carlini, Anish Athalye, Nicolas Papernot, Wieland Brendel, Jonas Rauber, Dimitris Tsipras, Ian Goodfellow, Aleksander Madry, and Alexey Kurakin. On evaluating adversarial robustness. arXiv:1902.06705, 2019. +[3] Nicholas Carlini and David A Wagner. Adversarial examples are not easily detected: Bypassing ten detection methods. In AISec@CCS, 2017. +[4] Nicholas Carlini and David A Wagner. Towards evaluating the robustness of neural networks. 2017 IEEE Symposium on Security and Privacy (SP), pages 39-57, 2017. +[5] Pin-Yu Chen, Yash Sharma, Huan Zhang, Jinfeng Yi, and Chojui Hsieh. Ead: Elastic-net attacks to deep neural networks via adversarial examples. In AAAI, 2018. +[6] Moustapha Cisse, Piotr Bojanowski, Edouard Grave, Yann Dauphin, and Nicolas Usunier. Parseval networks: Improving robustness to adversarial examples. In ICML, 2017. +[7] Gilad Cohen, Guillermo Sapiro, and Raja Giryes. DNN or k-NN: That is the generalize vs. memorize question. arXiv:1805.06822, 2018. +[8] Maik Döring, László Györfi, and Harro Walk. Rate of convergence of k-nearest-neighbor classification rule. J. Mach. Learn. Res., 18(1):8485–8500, 1 2017. +[9] Abhimanyu Dubey, Laurens van der Maaten, Zeki Yalniz, Yixuan Li, and Dhruv Kumar Mahajan. Defense against adversarial images using web-scale nearest-neighbor search. CVPR, pages 8759–8768, 2019. +[10] Alhussein Fawzi, Seyed-Mohsen Moosavi-Dezfooli, Pascal Frossard, and Stefano Soatto. Classification regions of deep neural networks. arXiv:1705.09552, 2017. +[11] Reuben Feinman, Ryan R Curtin, Saurabh Shintre, and Andrew B Gardner. Detecting adversarial samples from artifacts. arXiv:1703.00410, 2017. +[12] Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In ICLR, 2015. +[13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CVPR, pages 770-778, 2016. +[14] Matthias Hein and Maksym Andriushchenko. Formal guarantees on the robustness of a classifier against adversarial manipulation. In NIPS, 2017. +[15] Geoffrey Hinton, Li Deng, Dong Yu, George Dahl, Abdel-Rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara Sainath, and Brian Kingbury. Deep neural networks for acoustic modeling in speech recognition. IEEE Signal Processing Magazine, 29(6):82-97, 2012. +[16] Daniel Jakubovitz and Raja Giryes. Improving dnn robustness to adversarial attacks using jacobian regularization. In ECCV, 2018. +[17] Heinrich Jiang, Been Kim, Melody Guan, and Maya Gupta. To trust or not to trust a classifier. In NIPS, pages 5546-5557, 2018. + +[18] Yoon Kim. Convolutional neural networks for sentence classification. In EMNLP, pages 1746-1751, 2014. +[19] Pang Wei Koh and Percy S. Liang. Understanding black-box predictions via influence functions. In ICML, 2017. +[20] Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, 2009. +[21] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet classification with deep convolutional neural networks. Advances In Neural Information Processing Systems, pages 1-9, 2012. +[22] Alexey Kurakin, Ian J. Goodfellow, and Samy Bengio. Adversarial machine learning at scale. arXiv:1611.01236, 2017. +[23] Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detecting out-of-distribution samples and adversarial attacks. NeurIPS, 2018. +[24] Xin Li and Fuxin Li. Adversarial examples detection in deep networks with convolutional filter statistics. ICCV, pages 5775-5783, 2017. +[25] Xingjun Ma, Bo Li, Yisen Wang, Sarah M Erfani, Sudanthi N R Wijewickrema, Michael E Houle, Grant Schoenebeck, Dawn Song, and James Bailey. Characterizing adversarial subspaces using local intrinsic dimensionality. arXiv:1801.02613, 2018. +[26] Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In ICLR, 2018. +[27] Dongyu Meng and Hao Chen. Magnet: A two-pronged defense against adversarial examples. In ACM, 2017. +[28] Jan Hendrik Metzen, Tim Genewein, Volker Fischer, and Bastian Bischoff. On detecting adversarial perturbations. In ICLR, 2017. +[29] Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, Ken Nakae, and Shin Ishii. Distributional smoothing with virtual adversarial training. In ICLR, 2015. +[30] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In CVPR, 2017. +[31] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, Pascal Frossard, and Stefano Soatto. Analysis of universal adversarial perturbations. ArXiv:1705.09554, 2017. +[32] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: A simple and accurate method to fool deep neural networks. CVPR, pages 2574–2582, 2016. +[33] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. 2011. +[34] Nicolas Papernot, Fartash Faghri, Nicholas Carlini, Ian Goodfellow, Reuben Feinman, Alexey Kurakin, Cihang Xie, Yash Sharma, Tom Brown, Aurko Roy, Alexander Matyasko, Vahid Behzadan, Karen Hambardzumyan, Zhishuai Zhang, Yi-Lin Juang, Zhi Li, Ryan Sheatsley, Abhibhav Garg, Jonathan Uesato, Willi Gierke, Yinpeng Dong, David Berthelot, Paul Hendricks, Jonas Rauber, and Rujun Long. Technical report on the cleverhans v2.1.0 adversarial examples library. arXiv:1610.00768, 2018. +[35] N. Papernot, P. McDaniel, X. Wu, S. Jha, and A. Swami. Distillation as a defense to adversarial perturbations against + +deep neural networks. In IEEE Symposium on Security and Privacy (SP), 2016. +[36] Nicolas Papernot and Patrick D McDaniel. Deep k-nearest neighbors: Towards confident, interpretable and robust deep learning. arXiv:1803.04765, 2018. +[37] Nicolas Papernot, Patrick D McDaniel, Somesh Jha, Matt Fredrikson, Z Berkay Celik, and Ananthram Swami. The limitations of deep learning in adversarial settings. IEEE European Symposium on Security and Privacy (EuroS&P), pages 372-387, 2016. +[38] Andrew Slavin Ross and Finale Doshi-Velez. Improving the adversarial robustness and interpretability of deep neural networks by regularizing their input gradients. In AAAI, 2017. +[39] Bita Darvish Rouhani, Mohammad Samragh, Tara Javidi, and Farinaz Koushanfar. Towards safe deep learning: Unsupervised defense against generic adversarial attacks. 2018. +[40] Andras Rozsa, Manuel Gunther, and Terrance E. Boult. Towards robust deep neural networks with bang. In WACV, 2018. +[41] Florian Schroff, Dmitry Kalenichenko, and James Philbin. FaceNet: A unified embedding for face recognition and clustering. In CVPR, 2015. +[42] Uri Shaham, Yutaro Yamada, and Sahand Negahban. Understanding adversarial training: Increasing local stability of supervised models through robust optimization. Neurocomputing, 307:195-204, 2018. +[43] Carl-Johann Simon-Gabriel, Yann Ollivier, Léon Bottou, Bernhard Schölkopf, and David Lopez-Paz. First-order adversarial vulnerability of neural networks and input dimension. In ICML, 2019. +[44] Aman Sinha, Hongseok Namkoong, and John Duchi. Certifiable distributional robustness with principled adversarial training. In ICLR, 2018. +[45] Chawin Sitawarin and David Wágner. Defending against adversarial examples with k-nearest neighbor. ArXiv, abs/1906.09525, 2019. +[46] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In ICLR, 2014. +[47] Florian Tramer, Nicolas Papernot, Ian Goodfellow, Dan Boneh1, and Patrick McDaniel. The space of transferable adversarial examples. arXiv:1704.03453, 2017. +[48] Florian Tramér, Alexey Kurakin, Nicolas Papernot, Ian Goodfellow, Dan Boneh, and Patrick McDaniel. Ensemble adversarial training: Attacks and defenses. In ICLR, 2018. +[49] Athanasios Voulodimos, Nikolaos Doulamis, Anastasios Doulamis, and Eftychios Protopapadakis. Deep learning for computer vision: A brief review. Computational Intelligence and Neuroscience, 2018. +[50] Weilin Xu, David Evans, and Yanjun Qi. Feature squeezing: Detecting adversarial examples in deep neural networks. arXiv:1704.01155, 2018. +[51] Ying Zhang, Mohammad Pezeshki, Philemon Brakel, Saizheng Zhang, Cesar Laurent, Yoshua Bengio, and Aaron C Courville. Towards end-to-end speech recognition with deep convolutional neural networks. In Interspeech, 2016. \ No newline at end of file diff --git a/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/images.zip b/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6ea5cb87ecf64aa486f147582ba4e5972888d243 --- /dev/null +++ b/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:baabdc005b708b678739d2ad0b25f045e3cfc659fa69bfff5de096e547d2f12f +size 250390 diff --git a/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/layout.json b/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4aac5456c5d802975d0136b2c4ea2451ebef5f2d --- /dev/null +++ b/detectingadversarialsamplesusinginfluencefunctionsandnearestneighbors/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c52807fbc09d706f568c7731eb987d082accec9da2259c87273f07803238daa8 +size 437312 diff --git a/detectingattendedvisualtargetsinvideo/dfc2d831-2e5e-46b1-b91f-9ee23e2a9884_content_list.json b/detectingattendedvisualtargetsinvideo/dfc2d831-2e5e-46b1-b91f-9ee23e2a9884_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2d45a7273b66577fb5fab78818efdac4ba3dbb21 --- /dev/null +++ b/detectingattendedvisualtargetsinvideo/dfc2d831-2e5e-46b1-b91f-9ee23e2a9884_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6016a5bf340d8f53a94e4973cd7a8dfc8b5017ac4a1bd33542913c38673c4bb +size 72465 diff --git a/detectingattendedvisualtargetsinvideo/dfc2d831-2e5e-46b1-b91f-9ee23e2a9884_model.json b/detectingattendedvisualtargetsinvideo/dfc2d831-2e5e-46b1-b91f-9ee23e2a9884_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a6d64ac12b907b0c12174bc3bbb9e7acf31b0043 --- /dev/null +++ b/detectingattendedvisualtargetsinvideo/dfc2d831-2e5e-46b1-b91f-9ee23e2a9884_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:806d3972245c656400f512688d823fe2293afbde67a6dc8f78451d169e943540 +size 91523 diff --git a/detectingattendedvisualtargetsinvideo/dfc2d831-2e5e-46b1-b91f-9ee23e2a9884_origin.pdf b/detectingattendedvisualtargetsinvideo/dfc2d831-2e5e-46b1-b91f-9ee23e2a9884_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..06197c364e9f3531b1a8bd3b649e3ce69441e109 --- /dev/null +++ b/detectingattendedvisualtargetsinvideo/dfc2d831-2e5e-46b1-b91f-9ee23e2a9884_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ea609f55f2670d0fcd4388d94111bbd41921611dabebf9bf2fe38a1655de2f3 +size 2327462 diff --git a/detectingattendedvisualtargetsinvideo/full.md b/detectingattendedvisualtargetsinvideo/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5b9e222465dfbd8a36ac33678fb23b39d09b19ff --- /dev/null +++ b/detectingattendedvisualtargetsinvideo/full.md @@ -0,0 +1,275 @@ +# Detecting Attended Visual Targets in Video + +Eunj Chong + +Yongxin Wang + +Nataniel Ruiz3 + +James M. Rehg1 + +1Georgia Institute of Technology + +2Carnegie Mellon University + +$^{3}$ Boston University + +{eunjichong,rehg}@gatech.edu,yongxinw@andrew.cmu.edu,nruiz9@bu.edu + +https://github.com/ejcgct/attention-target-detection + +![](images/dda0f8666f5c7439166108439572ac726ed92784168b8860be889a778d4b6b81.jpg) +Figure 1: Visual attention target detection over time. We propose to solve the problem of identifying gaze targets in video. The goal of this problem is to predict the location of visually attended region (circle) in every frame, given a track of an individual's head (bounding box). It includes the cases where such target is out of frame (row-col: 1-2, 1-3, 2-1), in which case the model should correctly infer its absence. + +# Abstract + +We address the problem of detecting attention targets in video. Our goal is to identify where each person in each frame of a video is looking, and correctly handle the case where the gaze target is out-of-frame. Our novel architecture models the dynamic interaction between the scene and head features and infers time-varying attention targets. We introduce a new annotated dataset, VideoAttentionTarget, containing complex and dynamic patterns of real-world gaze behavior. Our experiments show that our model can effectively infer dynamic attention in videos. In addition, we apply our predicted attention maps to two social gaze behavior recognition tasks, and show that the resulting classifiers significantly outperform existing methods. We achieve state-of-the-art performance on three datasets: GazeFollow (static images), VideoAttentionTarget (videos), and VideoCoAtt (videos), and obtain the first results for automatically classifying clinically-relevant gaze behavior without wearable cameras or eye trackers. + +# 1. Introduction + +Gaze behavior is a critically-important aspect of human social behavior, visual navigation, and interaction with the 3D environment [26, 27]. While monitor-based and wear- + +able eye trackers are widely-available, they are not sufficient to support the large-scale collection of naturalistic gaze data in contexts such as face-to-face social interactions or object manipulation in 3D environments. Wearable eye trackers are burdensome to participants and bring issues of calibration, compliance, cost, and battery life. + +Recent works have demonstrated the ability to estimate the gaze target directly from images, with the potential to greatly increase the scalability of naturalistic gaze measurement. A key step in this direction was the work by Recasens et al. [44], which demonstrated the ability to detect the attention target of each person within a single image. This approach was extended in [11] to handle the case of out-of-frame gaze targets. Other related works include [45, 48, 28, 54, 18]. These approaches are attractive because they can leverage head pose features, as well as the saliency of potential gaze targets, in order to resolve ambiguities in gaze estimation. + +This paper develops a spatiotemporal approach to gaze target prediction which models the dynamics of gaze from video data. Fig 1 illustrates our goal: For each person in each video frame we estimate where they are looking, including the correct treatment of out-of-frame gaze targets. By identifying the visually-attended region in every frame, our method produces a dense measurement of a person's natural gaze behavior. Furthermore, this approach it has the + +benefit of linking gaze estimation to the broader tasks of action recognition and dynamic visual scene understanding. + +An alternative to the dynamic prediction of gaze targets is to directly classify specific categories or patterns of gaze behaviors from video [32, 40, 31, 14, 50, 15]. This approach treats gaze analysis as an action detection problem, for actions such as mutual gaze [32, 40, 31] or shared attention to an object [14, 50]. While these methods have the advantage of leveraging holistic visual cues, they are limited by the need to pre-specify and label the target behaviors. In contrast, our approach of predicting dense gaze targets provides a flexible substrate for modeling domain-specific gaze behaviors, such as the assessments of social gaze used in autism research [37, 4]. + +A key challenge in tackling the dynamic estimation of gaze targets in video is the lack of suitable datasets containing ground truth gaze annotations in the context of rich, real-world examples of complex time-varying gaze behaviors. We address this challenge by introducing the VideoAttentionTarget dataset, which contains 1,331 video sequences of annotated dynamic gaze tracks of people in diverse situations. + +Our approach to spatiotemporal gaze target prediction has two parts. First, we develop a novel spatial reasoning architecture to improve the accuracy of target localization. The architecture is composed of a scene convolutional layer that is regulated by the head convolutional layer via an attention mechanism [2], such that the model focuses on the scene region that the head is oriented to. The spatial module improves the state-of-the-art result on the GazeFollow benchmark by a considerable margin. Second, we extend the model in the temporal dimension through the addition of ConvLSTM networks. This model outperforms multiple baselines on our novel VideoAttentionTarget dataset. The software, models and dataset are made freely-available for research purposes. + +We further demonstrate the value of our approach by using the predicted heatmap from our model for social gaze recognition tasks. Specifically, we experimented on two tasks: 1) Automated behavioral coding of the social gaze of young children in an assessment task, and 2) Detecting shared attention in social scenes. In the first experiment, our heatmap features were found to be the most effective among multiple baselines for attention shift detection. In the second experiment, our approach achieved state-of-the-art performance on the VideoCoAtt dataset [14]. Both results validate the feasibility and effectiveness of leveraging our gaze target prediction model for gaze behavior recognition tasks. This paper makes the following contributions: + +- A novel spatio-temporal deep learning architecture that learns to predict dynamic gaze targets in video +- A new VideoAttentionTarget dataset, containing dense + +annotations of attention targets with complex patterns of gaze behavior + +- Demonstration that our model's predicted attention map can achieve state-of-the-art results on two social gaze behavior recognition tasks + +# 2. Related Work + +We organize the related work into three areas: gaze target prediction, gaze behavior recognition, and applications to social gaze analysis. Our focus is gaze target prediction, but we also provide results for behavior recognition in a social gaze setting (see Secs. 5.3 and 5.4). + +Gaze Target Prediction One key distinction among previous works on gaze target prediction is whether the attention target is located in a 2D image [44, 45, 48, 11, 28, 54, 18] or 3D space [1, 33, 51, 3, 34]. Our work addresses the 2D case, which we review in more detail; Authors of [44] were among the first to demonstrate how a deep model can learn to find the gaze target in the image. Saran et al. [48] adapt the method of [44] to a human-robot interaction task. Chong et al. [11] extends the approach of [44] to address out-of-frame gaze targets by simultaneously learning gaze angle and saliency. Within-frame gaze target estimation can be further enhanced by considering different scales [28], body pose [18] and sight lines [54]. A key difference between these works and our approach is that we explicitly model the gaze behavior over time and report results for gaze target prediction in video while considering out-of-frame targets. + +Our problem formulation and network architecture are most closely-related to [11]. In addition to the temporal modeling, three other key differences from [11] are 1) that we do not supervise with gaze angles and not require auxiliary datasets; 2) therefore we greatly simplify the training process; and 3) we present an improved spatial architecture. In terms of architecture, 1) we use head features to regulate the spatial pooling of the scene image via an attention mechanism; 2) we use a head location map instead of one-hot position vector; and 3) we use deconvolutions instead of a grid output to produce a fine-grained heatmap. Our experiments show that these innovations result in improved performance on GazeFollow (i.e. for static images, see Table 1) and on our novel video attention dataset (see Table 2). + +The work of [45] shares our goal of inferring gaze targets from video. In contrast to our work, they address the case where the gaze target is primarily visible at a later point in time, after the camera pans or there is a shot change. While movies commonly include such indirect gaze targets, they are rare in the social behavior analysis tasks that motivate this work (see Fig. 6). Our work is complementary to [45], in that our model infers per-frame gaze targets. + +![](images/872f204d26926ad4b478527c11141ac4445353ca9e87d7ce83b7324443f1a19e.jpg) +(a) Example frames and annotations + +![](images/7b457f20e3682cc4762d42908a6716f894b58b978087e4f9c96adb6c98643926.jpg) + +![](images/88d8d81da8031cfd673579b5d0ac60f38400ab7a098e07c00c6b123ae5d76537.jpg) +Target Direction w.r.t. Head Histogram + +![](images/8c2751d3b1f33f928192ff044eb9e1b85785683c33d7c02b2104caf517f2d124.jpg) +Head Size Histogram +(b) Dataset statistics +Figure 2: Overview of novel VideoAttentionTarget dataset (a) Example sequences illustrating the per-frame annotations of each person (bounding box) and their corresponding gaze target (solid dot). (b) Annotation statistics: top - annotated gaze target location distribution in image coordinates, middle - histogram of directions of gaze targets relative to the head center, bottom - histogram of head sizes measured as the ratio of the bounding box area to the frame size. + +Several works address the inference of 3D gaze targets [1, 33, 34]. In this setting, the identification of an out-of-frame gaze target can be made by relying on certain assumptions about the scene, such as the target object's location or its motion, or by using a joint learning framework informed by the task [51] or target location [3]. + +Gaze Behavior Recognition An alternative to inferring the target gaze location is to directly infer a gaze-related behavior of interest. For example, several approaches have been developed to detect if two people are looking at each other [32, 40, 31], or to detect if more than two people are looking at a common target [14, 50]. In addition, the 3D detection of socially-salient regions has been investigated using an egocentric approach [42]. Recently, Fan et al. [15] addressed the problem of recognizing atomic-level gaze behavior when human gaze interactions are categorized into six classes such as avert, refer, and follow. + +In contrast to approaches that directly infer gaze behavior, our method provides a dense mid-level representation of attention for each person in a video. Thus our approach is complementary to these works, and we demonstrate in Secs. 5.3 and 5.4 that our gaze representation has utility for gaze behavior classification. + +Social Gaze Detection in Clinical Settings One motivation for our work is the opportunity for automated measure + +ments of gaze behavior to inform research and clinical practice in understanding and treating developmental conditions such as autism [46, 19]. In this setting, automated analysis can remove the burden of laborious gaze coding that is commonplace in autism research, and enable a more fine-grained analysis of gaze behavior in clinical populations. Prior work in this area has leveraged the ability to analyze head orientation [47, 17, 12] to infer children's attention and have developed solutions for specific settings [43, 21, 5]. Prior works have also addressed the detection of eye contact and mutual gaze in the context of dementia care [35, 39] and autism [53, 9, 10]. Other work has analyzed mutual gaze in group interactions for inferring rapport [36]. In contrast to these works, our focus is to first develop a general approach to gaze target identification in video, and then explore its utility in estimating clinically-important social behaviors during face-to-face interactions between an adult examiner and a child. We believe are the first to present results (in Sec. 5.3) for automatically detecting clinicallymeaningful social gaze shifts without a wearable camera or an eye tracker. + +# 3. VideoAttentionTarget Dataset + +In this section we describe our novel VideoAttentionTarget dataset that was created specifically for the task of video gaze target modeling. Some example frames, annotations and statistics of the dataset are shown in Fig 2. + +![](images/1b78e1a1a31ea6fb9f4e1f9e7c00a64d9e9ebaa219bb40decadcd9abb6c16d6c.jpg) +Figure 3: Spatiotemporal architecture for gaze prediction. It consists of a head conditioning branch which regulates the main scene branch using an attention mechanism. A recurrent module generates a heatmap that is modulated by a scalar, which quantifies whether the gaze target is in-frame. Displayed is an example of in-frame gaze from the GazeFollow dataset. + +In order to ensure that our dataset reflects the natural diversity of gaze behavior, we gathered videos from various sources including live interviews, sitcoms, reality shows, and movie clips, all of which were available on YouTube. Videos from 50 different shows were selected. From each source video, we extracted short clips that contain dynamic gaze behavior without scene cuts, in which a person of interest can be continuously observed. The length of the clips varies between 1-80 seconds. + +For each clip, annotators first labeled tracks of head bounding boxes for each person. This resulted in 1,331 tracks comprising 164,541 frame-level bounding boxes. In the second pass, the annotators labeled the gaze target as a point in each frame for each annotated person. They also had the option to mark if the target was located outside the video frame (including the case where the subject was looking at the camera). This produced 109,574 in-frame gaze targets and 54,967 out-of-frame gaze annotations. All frames in all clips were annotated using custom software by a team of four annotators, with each frame annotated once. + +A testing set was constructed by holding out approximately $20\%$ of the annotations (10 shows, 298 tracks, 31,978 gaze annotations), ensuring no overlap of shows between the train and test splits. This allows us to measure generalization to new scenarios and individuals. Furthermore, in order to characterize the variability in human annotations of gaze targets, we had two other annotators (among the four who annotated the train split) who did not label + +that particular test samples additionally annotate them. We report this human inter-rater reliability which serves as the upper bound on the algorithm performance. + +# 4. Spatiotemporal Gaze Architecture + +Our architecture is composed of three mains parts. A head conditioning branch, a main scene branch and a recurrent attention prediction module. An illustration of the architecture is shown in Fig. 3. + +Head Conditioning Branch The head conditioning branch computes a head feature map from the crop of the head of the person of interest in the image. The "Head Conv" part of the network is a ResNet-50 [20] followed by an additional residual layer and an average pooling layer. A binary image of the head position, with black pixels designating the head bounding box and white pixels on the rest of the image, is reduced using three successive max pooling operations and flattened. We found that the binary image encoded the location and relative depth of the head in the scene more effectively than the position encoding used in previous works. The head feature map is concatenated with this head position feature. An attention map is then computed by passing these two concatenated features through a fully-connected layer which we call the "Attention Layer". + +Main Scene Branch A scene feature map is computed using the "Scene Conv" part of the network, which is identical to the "Head Conv" module previously described. Input to the "Scene Conv" is a concatenation of scene image and + +head position image. We found that providing head position as a spatial reference along with the scene helped the model learn faster. This scene feature map is then multiplied by the attention map computed by the head conditioning branch. This enables the model to learn to pay more attention to the scene features that are more likely to be attended to, based on the properties of the head. In comparison to [11], our approach results in earlier fusion of the scene and head information. The head feature map is additionally concatenated to the weighted scene feature map. Finally, the concatenated features are encoded using two convolutional layers in the "Encode" module. + +Recurrent Attention Prediction Module After encoding, the model integrates temporal information from a sequence of frames using a convolutional Long Short-Term Memory network [52], designated as "Conv-LSTM" in Fig. 3. A deconvolutional network comprised of four deconvolution layers, designated as the "Deconv" module, up-samples the features computed by the convolutional LSTM into a full-sized feature map. We found that this approach yields finer details than the grid-based map used in [11]. + +Heatmap Modulation The full-sized feature map is then modulated by a scalar $\alpha$ which quantifies whether the person's focus of attention is located inside or outside the frame, with higher values indicating in-frame attention. This $\alpha$ is learned by the "In Frame?" module in Fig. 3, which consists of two convolutional layers followed by a fully-connected layer. The modulation is performed by an element-wise subtraction of the $(1 - \alpha)$ from the normalized full-sized feature map, followed by clipping of the heatmap such that its minimum values are $\geq 0$ . This yields the final heatmap which quantifies the location and intensity of the predicted attention target in the frame. In Fig. 3 we overlay the final heatmap on the input image for visualization. + +Implementation Details We implemented our model in PyTorch. The input to the model is resized to $224 \times 224$ and normalized. The Attention Layer outputs $7 \times 7$ spatial soft-attention weights. The ConvLSTM module uses two ConvLSTM layers with kernels of size 3, whose output is up-sampled to a $64 \times 64$ -sized heatmap. Further model specifications can be found in our code. + +For supervision, we place a Gaussian weight around the center of the target to create the ground truth heatmap. Heatmap loss $\mathcal{L}_h$ is computed using MSE loss when the target is in frame per ground truth. In-frame loss $\mathcal{L}_f$ is computed with binary cross entropy loss. Final loss $\mathcal{L}$ used for training is a weighted sum of these two: $\mathcal{L} = w_h\cdot \mathcal{L}_h + w_f\cdot \mathcal{L}_f$ . + +We initialize the Scene Conv with CNN for scene recognition [55] and the Head Conv with CNN for gaze estimation [16]. Training is performed in a two-step process. First, the model is globally trained on the GazeFollow dataset until convergence. Second, it is subsequently trained on the + +
MethodAUC ↑Average Dist. ↓Min Dist. ↓
Random0.5040.4840.391
Center0.6330.3130.230
Judd [23]0.7110.3370.250
GazeFollow [44]0.8780.1900.113
Chong [11]0.8960.1870.112
Zhao [54]n/a0.1470.082
Lian [28]0.9060.1450.081
Ours0.9210.1370.077
Human0.9240.0960.040
+ +Table 1: Spatial module evaluation on the GazeFollow dataset for single image gaze target prediction. + +
Methodspatialout of frame
AUC ↑L2 Dist. ↓AP ↑
Random0.5050.4580.621
Fixed bias0.7280.3260.624
Chong [11]0.8300.1930.705
Chong [11]+LSTM0.8330.1710.712
No head position0.8350.1690.827
No head features0.7580.2580.714
No attention map0.7170.2260.774
No fusion0.8530.1650.817
No temporal0.8540.1470.848
Ours full0.8600.1340.853
Human0.9210.0510.925
+ +Table 2: Quantitative model evaluation on our VideoAttentionTarget dataset. + +VideoAttentionTarget dataset, while freezing the layers up to the Encode module to prevent overfitting. We used random flip, color jitter, and crop augmentations as described in [44]. We also added noise to head position during training to minimize the impact of head localization errors. + +# 5. Experiments + +We conducted four experiments to evaluate the performance of our method. Sec. 5.1 uses just the spatial component of our model on the GazeFollow dataset. Sec. 5.2 uses the full spatiotemporal model on the VideoAttentionTarget dataset. Sec. 5.3 uses the model output to classify clinically-relevant social behaviors in a sample of toddlers. Sec. 5.4 uses the model to detect shared attention in the VideoCoAtt dataset. Our method produces state-of-the-art results on all datasets in all experiments. + +# 5.1. Spatial Module Evaluation + +We evaluate the static part of our model on single image gaze target prediction using the GazeFollow dataset [44], and compare against prior methods. Evaluation follows the + +![](images/d8be3fadb46bc3e908e628acfc9da4c01c163f599bcdb5a8d847edd3cab7b88d.jpg) +Figure 4: Visualization of head-conditioned attention with corresponding input and final output. The attention layer captures and leverages the head pose information to regulate the model's prediction. + +same protocol from [44, 11]. GazeFollow contains annotations of person heads and gaze locations in a diverse set of images. To train the model, we used the annotation labels from [11] which were extended to additionally specify whether the annotated gaze target is out-of-frame. In order to make a fair comparison, we only use the GazeFollow dataset for training and do not include our new dataset in this experiment. + +The results in Table 1 demonstrate the value of our architectural choices in the spatial model component. We outperform previous methods by a significant margin. In fact, our AUC of 0.921 is quite close to the AUC of 0.924 obtained by human. Qualitatively, visualization of the learned weights of the attention layer reveals that the model has learned to effectively make use of the facial orientation information for weighting scene features, as shown in Fig. 4. + +# 5.2. Spatiotemporal Model Evaluation + +We evaluate our full model on the new VideoAttention-Target dataset. We use three performance measures: AUC, Distance, and Out-of-Frame AP. AUC: Each cell in the spatially-discretized image is classified as gaze target or not. The ground truth comes from thresholding a Gaussian confidence mask centered at the human annotator's target location. The final heatmap provides the prediction confidence score which is evaluated at different thresholds in the ROC curve. The area under curve (AUC) of this ROC curve is reported. Distance: $L^2$ distance between the annotated target location and the prediction given by the pixel of maximum value in the heatmap, with image width and height normal + +![](images/1c063e4318e2aa7fcafe2626b90f4c24acdc1a13b52063bd26531497bb55cc9e.jpg) +Figure 5: Gaze target prediction results on example frames. Initial denotes the first output of the deconvolution, Modulated shows the adjusted heatmap after modulation. Final prediction (yellow) and ground truth (red) are presented in the last column. Rows 1, 3, 4 depict properly predicted within-image gaze target, row 2 shows correctly identified nonexistent gaze target in frame, and the last row is an example of failure case where it predicts a fixated target behind the subject in the image due to the lack of sense of depth. + +ized to 1. AUC and Distance are computed whenever there is an in-frame ground truth gaze target (the heatmap always has a max). Out-of-Frame AP: The average precision (AP) is computed for the prediction score from the scalar $\alpha$ (described in Sec. 4) against the ground truth, computed in every frame. We also evaluate the performance of the annotators (Human performance) across all three measures. This is done by comparing annotator predictions in all pairs and averaging them. This is analogous to the kappa score used to measure inter-rater reliability, but specialized for our performance measures. + +Table 2 summarizes the experimental results. The first block of rows shows baseline tests and comparison with previous methods; Random is when the prediction is made at $50\%$ chance, and Fixed bias is when the bias present in the dataset (Fig 2b) is utilized. The method of [11], which is the existing non-temporal gaze target estimator, is compared both as-is and using an additional LSTM layer on top. The second set of rows in the table shows ablation study results by disabling key components of our model one at a time; No head position is when the head position image is not used. No head features is when the head feature map + +from the Head Conv module is not provided. In this case, the attention map is made using only the head position. No attention map is when attention map is not produced therefore the scene feature map is uniformly weighted. No fusion is when the head feature map is only used to produce attention map and not concatenated with scene feature map for encoding. No temporal is when ConvLSTM is not used. This quantitative analysis demonstrates that our proposed model strongly outperforms previous methods as well as the presented baselines. All components of the model are crucial to achieving the best performance, and the head convolutional pathway and the attention mechanism were found to have the biggest contribution. Qualitative results are presented in Fig. 5. + +# 5.3. Detecting the Social Bids of Toddlers + +Motivation Eye contact and joint attention are among the earliest social skills to emerge in human development [6], and are closely-related to language learning [22] and socio-emotional development [30]. Children with autism exhibit difficulty in modulating gaze during social interactions [38, 8, 49], and social gaze is assessed as part of the diagnosis and treatment of autism. This is usually done qualitatively or through laborious manual methods. The ability to automatically quantify children's social gaze would offer significant benefits for clinicians and researchers. + +Toddler Dataset We sampled a dataset of 20 toddlers from [9] (10 with an autism diagnosis, 10 female, mean age 36.4 months) who were video-recorded during dyadic social interactions. In this dataset, each participant completed an assessment known as the ESCS [37], which was administered by trained examiners. The ESCS is a semi-structured play protocol designed to elicit nonverbal social communication behaviors. + +Five expert raters annotated all of the child's gaze behavior consisting of looks to toys and looks to the examiner's face at the frame level. Based on this per-frame annotation, a toy-to-eyes gaze shift event is inferred if the gaze target changes from the toy to the examiner's face within 700 milliseconds. In total, the dataset contains 623 shift events during 221-minute-long recordings. Our task was to detect these toy-to-eyes gaze shifts and reject all other types of gaze shifts which the child made during the session. The toy-to-eyes shifts are relevant to child development because they can be further classified into different types of joint attention based on the context in which they are produced [37]. Joint attention is a key construct for the development of social communication. Our experiment provides preliminary evidence for the feasibility of automatically identifying such gaze-based joint attention events from video. + +Experimental setup and results Given the toddlers + +![](images/fa338921a160d70cbc7fc9b78bd30e102bb37cd53baa001ef7d6800e82272d7d.jpg) +Figure 6: Heatmap output of our model on toddlers video. + +dataset, we conducted experiments to see how an automated method can be used to retrieve gaze shift events. Two types of approaches for shift detection are explored. The first approach is to detect a shift in a two-step process where we initially classify the type of attended object - among toy, eyes, and elsewhere - in every frame with a ResNet-50 image classifier, and then apply an event classifier on top of it over a temporal window to conclusively find the gaze shift from toy to eyes. A random forest model is used for the event classifier. For the second approach, we try detecting a shift event in an end-to-end manner, using the I3D model [7] since gaze shift can be viewed as a special case of a human action. + +For both approaches, we compare shift detection performance when the inputs to the models are 1. the RGB image alone, 2. image and head position, and 3. image and heatmap produced by our attention network (Fig. 6). For 2 and 3 the head position or heatmap is concatenated depth-wise to the RGB image as a 4th channel in grayscale. CNN layers of ResNet were pretrained on ImageNet [13] and those of I3D were pretrained on Kinetics [24]. The child's head was detected and recognized using [25]. A sliding window size of 64 frames was used during training. For validation, we adopted 5-fold subject-wise cross validation in which 4 subjects were held out in each validation set. + +Table 3 summarizes the results of our experiment with the precision and recall of gaze shift detection. Interestingly, the 2D-CNN-based approach generally outperformed the 3D-CNN method, which is presumably due to the complexity of I3D and relatively less training data. Nevertheless, there still exists a noticeable gap relative to human performance, implying the need for further research on this problem. + +# 5.4. Detecting Shared Attention in Social Scenes + +As an additional application of our system on real-world problems, we apply our model to infer shared attention in social scenes. We use the VideoCoAtt dataset [14] to bench + +
MethodDetection ApproachPrec. ↑Rec. ↑
Random0.0340.503
ResNet on RGBrandom forest0.5410.567
ResNet on RGB+head0.5980.575
ResNet on RGB+hm0.7080.759
I3D on RGBend-to-end0.4330.506
I3D on RGB+head0.4750.500
I3D on RGB+hm0.5590.710
Human (clinical experts)0.9030.922
+ +mark our performance on this task. This dataset has 113,810 test frames that are annotated with the target location when it is simultaneously attended by two or more people. + +Given that our model does not have a head detection module as in [14], we trained a SSD-based [29] head detector in the same manner as [31] to automatically generate the input head positions. We fine-tuned this head detector with the head annotations in VideoCoAtt. However, we chose not to fine-tune our model for gaze target detection with VideoCoAtt, since their annotations do not naturally translate to the dense single-subject-target annotations that our model requires for training. + +Our method is evaluated on the following two tasks: 1. location prediction (spatial) and 2. interval detection (temporal) of shared attention. For the localization task, we first add up the individual heatmaps of all people in the frame and aggregate them into a single shared attention confidence map (examples in Fig. 7). Then, the $L^2$ distance is computed between the pixel location of the maximum confidence and the center of the ground truth. For the interval detection task, we regard the aggregated confidence map as representing a shared attention case if its maximum score is above certain threshold. A single heatmap from our model can have a maximum value of 1 at the fixated location and when another heatmap is added to the same location its value becomes 2. We chose a threshold value of 1.8 instead of 2 in this experiment to make a room for slight misalignments between multiple fixations. + +As a result, our method achieves state-of-the-art results on both tasks, as shown in Table 4. This outcome is surprising since the models of [14, 50] were formulated specifically to detect shared attention, whereas ours was not. However, it must also be noted that there exist differences in the experimental setup, such as the head detector and the training data, thus there are some caveats associated with our experimental finding. Here, we intend to demonstrate the + +![](images/6e8712bb61c97917e904f6db6bfebb219e188990292935d899566d3c0cdd360b.jpg) +Figure 7: Constructed shared attention map obtained by adding up individual heatmaps of all people in the image. Samples are from the VideoCoAtt dataset. + +Table 3: Gaze coding detection results on the toddlers dataset. As shown, our heatmap feature (denoted as hm) indeed improves shift detection when used along with image in a standard classification paradigm. + +
MethodAccuracy↑L2Dist. ↓
Random50.8286
Fixed bias52.4122
GazeFollow [44]58.7102
Gaze+Saliency [41]59.483
Gaze+Saliency [41]+LSTM66.271
Fan [14]71.462
Sumer [50]78.163
Ours83.357
+ +Table 4: Shared attention detection results on the Video-CoAtt dataset. The interval detection task is evaluated with prediction accuracy and the localization task is measured with $L^2$ . + +potential value of our model for recognizing higher-level social gaze, and it is encouraging that we can achieve good performance without tweaking the model for this specific problem. + +# 6. Conclusion + +We have presented a new deep architecture and a novel VideoAttentionTarget dataset for the task of detecting the time-varying attention targets for each person in a video. Our model is designed to allow the face to direct the learning of gaze-relevant scene regions, and our new dataset makes it possible to learn the temporal evolution of these features. The strong performance of our method on multiple benchmark datasets and a novel social gaze recognition task validates its potential as a useful tool for understanding gaze behavior in naturalistic human interactions. + +# 7. Acknowledgement + +We thank Caroline Dalluge and Pooja Parikh for the gaze target annotations in the VideoAttentionTarget dataset, and Stephan Lee for building the annotation tool and performing annotations. The toddler dataset used in Sec. 5.3 was collected and annotated under the direction of Agata Rozga, Rebecca Jones, Audrey Southerland, and Elysha Clark-Whitney. This study was funded in part by the Simons Foundation under grant 383667 and NIH R01 MH114999. + +# References + +[1] Sileye O Ba and Jean-Marc Odobez. Recognizing visual focus of attention from head pose in natural meetings. IEEE Transactions on Systems, Man, and Cybernetics, Part B (Cybernetics), 39(1):16-33, 2008. +[2] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015. +[3] Ernesto Brau, Jinyan Guan, Tanya Jeffries, and Kobus Barnard. Multiple-gaze geometry: Inferring novel 3d locations from gazes observed in monocular video. In The European Conference on Computer Vision (ECCV), September 2018. +[4] Susan E Bryson, Lonnie Zwaigenbaum, Catherine McDermott, Vicki Rombough, and Jessica Brian. The autism observation scale for infants: scale development and reliability data. Journal of autism and developmental disorders, 38(4):731-738, 2008. +[5] Kathleen Campbell, Kimberly LH Carpenter, Jordan Hashemi, Steven Espinosa, Samuel Marsan, Jana Schaich Borg, Zhuoqing Chang, Qiang Qiu, Saritha Vermeer, Elizabeth Adler, Mariano Tepper, Helen L Egger, Jeffery P Baker, Guillermo Sapiro, and Geraldine Dawson. Computer vision analysis captures atypical attention in toddlers with autism. Autism, pages 1-10, 2018. +[6] Malinda Carpenter, Katherine Nagell, Michael Tomasello, George Butterworth, and Chris Moore. Social cognition, joint attention, and communicative competence from 9 to 15 months of age. Monographs of the society for research in child development, pages i-174, 1998. +[7] Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6299-6308, 2017. +[8] Tony Charman, John Swettenham, Simon Baron-Cohen, Antony Cox, Gillian Baird, and Auriol Drew. Infants with autism: An investigation of empathy, pretend play, joint attention, and imitation. Developmental psychology, 33(5):781, 1997. +[9] Eunjji Chong, Katha Chanda, Zhefan Ye, Audrey Southerland, Nataniel Ruiz, Rebecca M Jones, Agata Rozga, and James M Rehg. Detecting gaze towards eyes in natural social interactions and its use in child assessment. Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies, 1(3):43, 2017. +[10] Eunji Chong, Elysha Clark-Whitney, Audrey Southerland, Elizabeth Stubbs, Chanel Miller, Eliana L Ajodan, Melanie R Silverman, Catherine Lord, Agata Rozga, Rebecca M Jones, et al. Detection of eye contact with deep neural networks is as accurate as human experts. +[11] Eunji Chong, Nataniel Ruiz, Yongxin Wang, Yun Zhang, Agata Rozga, and James M Rehg. Connecting gaze, scene, and attention: Generalized attention estimation via joint modeling of gaze and scene saliency. In Proceedings of the + +European Conference on Computer Vision (ECCV), pages 383-398, 2018. +[12] Eunji Chong, Audrey Southerland, Abhijit Kundu, Rebecca M Jones, Agata Rozga, and James M Rehg. Visual 3d tracking of child-adult social interactions. In 2017 Joint IEEE International Conference on Development and Learning and Epigenetic Robotics (ICDL-EpiRob), pages 399–406. IEEE, 2017. +[13] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248-255. IEEE, 2009. +[14] Lifeng Fan, Yixin Chen, Ping Wei, Wenguan Wang, and Song-Chun Zhu. Inferring shared attention in social scene videos. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6460-6468, 2018. +[15] Lifeng Fan, Wenguan Wang, Siyuan Huang, Xinyu Tang, and Song-Chun Zhu. Understanding human gaze communication by spatio-temporal graph reasoning. In The IEEE International Conference on Computer Vision (ICCV), October 2019. +[16] Kenneth Alberto Funes Mora, Florent Monay, and Jean-Marc Odobez. Eyediap: A database for the development and evaluation of gaze estimation algorithms from rgb and rgb-d cameras. In Proceedings of the Symposium on Eye Tracking Research and Applications, pages 255-258, 2014. +[17] Jinwei Gu, Xiaodong Yang, Shalini De Mello, and Jan Kautz. Dynamic facial analysis: From bayesian filtering to recurrent neural network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1548-1557, 2017. +[18] Jian Guan, Liming Yin, Jianguo Sun, Shuhan Qi, Xuan Wang, and Qing Liao. Enhanced gaze following via object detection and human pose estimation. In 26th International Conference on Multimedia Modeling, 2019. +[19] Jordan Hashemi, Mariano Tepper, Thiago Vallin Spina, Amy Esler, Vassilios Morellas, Nikolaos Papanikolopoulos, Helen Egger, Geraldine Dawson, and Guillermo Sapiro. Computer vision tools for low-cost and noninvasive measurement of autism-related behaviors in infants. *Autism research and treatment*, 2014, 2014. +[20] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. +[21] Corey DC Heath, Hemanth Venkateswara, Troy McDaniel, and Sethuraman Panchanathan. Detecting attention in pivotal response treatment video probes. In International Conference on Smart Multimedia, pages 248-259. Springer, 2018. +[22] Masako Hirotani, Manuela Stets, Tricia Striano, and Angela D Friederici. Joint attention helps infants learn new words: event-related potential evidence. Neuroreport, 20(6):600-605, 2009. +[23] Tilke Judd, Krista Ehinger, Frédo Durand, and Antonio Torralba. Learning to predict where humans look. In 2009 IEEE 12th international conference on computer vision, pages 2106-2113. IEEE, 2009. + +[24] Will Kay, Joao Carreira, Karen Simonyan, Brian Zhang, Chloe Hillier, Sudheendra Vijayanarasimhan, Fabio Viola, Tim Green, Trevor Back, Paul Natsev, et al. The kinetics human action video dataset. arXiv preprint arXiv:1705.06950, 2017. +[25] Davis E. King. Dlib-ml: A machine learning toolkit. Journal of Machine Learning Research, 10:1755-1758, 2009. +[26] Chris L Kleinke. Gaze and eye contact: a research review. Psychological bulletin, 100(1):78, 1986. +[27] Michael Land and Benjamin Tatler. Looking and acting: vision and eye movements in natural behaviour. Oxford University Press, 2009. +[28] Dongze Lian, Zehao Yu, and Shenghua Gao. Believe it or not, we know what you are looking at! In Asian Conference on Computer Vision, pages 35-50. Springer, 2018. +[29] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C Berg. Ssd: Single shot multibox detector. In European conference on computer vision, pages 21-37. Springer, 2016. +[30] Amy C MacPherson and Chris Moore. Attentional control by gaze cues in infancy. In Gaze-Following, pages 53-75. Psychology Press, 2017. +[31] Manuel J Marin-Jimenez, Vicky Kalogeiton, Pablo Medina-Suarez, and Andrew Zisserman. Laeo-net: revisiting people looking at each other in videos. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3477-3485, 2019. +[32] Manuel Jesús Marín-Jiménez, Andrew Zisserman, Marcin Eichner, and Vittorio Ferrari. Detecting people looking at each other in videos. International Journal of Computer Vision, 106(3):282-296, 2014. +[33] Benoit Massé, Silèye Ba, and Radu Horaud. Tracking gaze and visual focus of attention of people involved in social interaction. IEEE transactions on pattern analysis and machine intelligence, 40(11):2711-2724, 2017. +[34] Benoit Massé, Stéphane Lathuilière, Pablo Mesejo, and Radu Horaud. Extended gaze following: Detecting objects in videos beyond the camera field of view. In 14th IEEE International Conference on Automatic Face & Gesture Recognition, FG 2019, Lille, France, May 14-18, 2019, 2019. +[35] Yu Mitsuzumi, Atsushi Nakazawa, and Toyoaki Nishida. Deep eye contact detector: Robust eye contact bid detection using convolutional neural network. In BMVC, 2017. +[36] Philipp Müller, Michael Xuelin Huang, Xuong Zhang, and Andreas Bulling. Robust eye contact detection in natural multi-person interactions using gaze and speaking behaviour. In Proceedings of the 2018 ACM Symposium on Eye Tracking Research & Applications, page 31. ACM, 2018. +[37] Peter Mundy, Christine Delgado, Jessica Block, Meg Venezia, Anne Hogan, and Jeffrey Seibert. Early social communication scales (escs). Coral Gables, FL: University of Miami, 2003. +[38] Peter Mundy, Marian Sigman, Judy Ungerer, and Tracy Sherman. Defining the social deficits of autism: The contribution of non-verbal communication measures. Journal of child psychology and psychiatry, 27(5):657-669, 1986. + +[39] Atsushi Nakazawa, Yu Mitsuzumi, Yuki Watanabe, Ryo Kurazume, Sakiko Yoshikawa, and Miwako Honda. First-person video analysis for evaluating skill level in the humanitute tender-care technique. Journal of Intelligent & Robotic Systems, pages 1-16, 2019. +[40] Cristina Palmero, Elsbeth A van Dam, Sergio Escalera, Mike Kelia, Guido F Lichtert, Lucas PJJ Noldus, Andrew J Spink, and Astrid van Wieringen. Automatic mutual gaze detection in face-to-face dyadic interaction videos. Measuring Behavior 2018, 2018. +[41] Junting Pan, Elisa Sayrol, Xavier Giro-i Nieto, Kevin McGuinness, and Noel E O'Connor. Shallow and deep convolutional networks for saliency prediction. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 598-606, 2016. +[42] Hyun Soo Park, Eakta Jain, and Yaser Sheikh. 3D social saliency from head-mounted cameras. In Advances in Neural Information Processing Systems, volume 1, pages 422-430, 2012. +[43] Guido Pusiol, Laura Soriano, Li Fei-Fei, and Michael C Frank. Discovering the signatures of joint attention in child-caregiver interaction. In Proceedings of the Annual Meeting of the Cognitive Science Society, volume 36, 2014. +[44] Adria Recasens, Aditya Khosla, Carl Vondrick, and Antonio Torralba. Where are they looking? In Advances in Neural Information Processing Systems, pages 199-207, 2015. +[45] Adria Recasens, Carl Vondrick, Aditya Khosla, and Antonio Torralba. Following gaze in video. In Proceedings of the IEEE International Conference on Computer Vision, pages 1435-1443, 2017. +[46] James M. Rehg, Agata Rozga, Gregory D. Abowd, and Matthew S. Goodwin. Behavioral Imaging and Autism. IEEE Pervasive Computing, 13(2):84-87, 2014. +[47] Nataniel Ruiz, Eunji Chong, and James M Rehg. Fine-grained head pose estimation without keypoints. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 2074-2083, 2018. +[48] Akanksha Saran, Srinjoy Majumdar, Elaine Schaertl Shor, Andrea Thomaz, and Scott Niekum. Human gaze following for human-robot interaction. In 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 8615–8621. IEEE, 2018. +[49] Atsushi Senju and Mark H Johnson. Atypical eye contact in autism: models, mechanisms and development. *Neuroscience & Biobehavioral Reviews*, 33(8):1204–1214, 2009. +[50] Omer Sumer, Peter Gerjets, Ulrich Trautwein, and Enkelejda Kasneci. Attention flow: End-to-end joint attention estimation. In The IEEE Winter Conference on Applications of Computer Vision (WACV), March 2020. +[51] Ping Wei, Yang Liu, Tianmin Shu, Nanning Zheng, and Song-Chun Zhu. Where and why are they looking? jointly inferring human attention and intentions in complex tasks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6801-6809, 2018. +[52] SHI Xingjian, Zhourong Chen, Hao Wang, Dit-Yan Yeung, Wai-Kin Wong, and Wang-chun Woo. Convolutional LSTM network: A machine learning approach for precipitation + +nowcasting. In Advances in neural information processing systems, pages 802-810, 2015. +[53] Zhefan Ye, Yin Li, Yun Liu, Chanel Bridges, Agata Rozga, and James M Rehg. Detecting bids for eye contact using a wearable camera. In 2015 11th IEEE International Conference and Workshops on Automatic Face and Gesture Recognition (FG), volume 1, pages 1-8. IEEE, 2015. +[54] Hao Zhao, Ming Lu, Anbang Yao, Yurong Chen, and Li Zhang. Learning to draw sight lines. International Journal of Computer Vision, pages 1-25, 2019. +[55] Bolei Zhou, Agata Lapedriza, Jianxiong Xiao, Antonio Torralba, and Aude Oliva. Learning deep features for scene recognition using places database. In Advances in neural information processing systems, pages 487-495, 2014. \ No newline at end of file diff --git a/detectingattendedvisualtargetsinvideo/images.zip b/detectingattendedvisualtargetsinvideo/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..183817dbf41ee42ed1fc63da6e88ea77a8f5faf8 --- /dev/null +++ b/detectingattendedvisualtargetsinvideo/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec754b633322e6fb38dce8889a9258b4bc78d5d89cb352c6443ba5e816c48917 +size 710357 diff --git a/detectingattendedvisualtargetsinvideo/layout.json b/detectingattendedvisualtargetsinvideo/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..253365f4a51c2536f44fb3b467477177b912ca83 --- /dev/null +++ b/detectingattendedvisualtargetsinvideo/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:feae02d54e348884b22db21f0c3c3a3a4a67842e09802456b531be84cf499601 +size 303672 diff --git a/detectionincrowdedscenesoneproposalmultiplepredictions/efdc75aa-0e6d-46a4-8afa-b065ffe1b255_content_list.json b/detectionincrowdedscenesoneproposalmultiplepredictions/efdc75aa-0e6d-46a4-8afa-b065ffe1b255_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..b222d4daa170e3812ab25af45473741bd290ab1b --- /dev/null +++ b/detectionincrowdedscenesoneproposalmultiplepredictions/efdc75aa-0e6d-46a4-8afa-b065ffe1b255_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee08e9d5228df52acb5f2a4e729e3fe3516d3ae089ce0650029b43ad6f36d125 +size 75899 diff --git a/detectionincrowdedscenesoneproposalmultiplepredictions/efdc75aa-0e6d-46a4-8afa-b065ffe1b255_model.json b/detectionincrowdedscenesoneproposalmultiplepredictions/efdc75aa-0e6d-46a4-8afa-b065ffe1b255_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e6c592d014cb7d57147541d9b1b92a60d872f179 --- /dev/null +++ b/detectionincrowdedscenesoneproposalmultiplepredictions/efdc75aa-0e6d-46a4-8afa-b065ffe1b255_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbb436514ee252330e1bae9107bdb152f84c3b6b343fb878f12c42ac728a838f +size 92926 diff --git a/detectionincrowdedscenesoneproposalmultiplepredictions/efdc75aa-0e6d-46a4-8afa-b065ffe1b255_origin.pdf b/detectionincrowdedscenesoneproposalmultiplepredictions/efdc75aa-0e6d-46a4-8afa-b065ffe1b255_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fb06746841a8685204e16239204ea00c7bbf06ee --- /dev/null +++ b/detectionincrowdedscenesoneproposalmultiplepredictions/efdc75aa-0e6d-46a4-8afa-b065ffe1b255_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5849b8f3c7342fa6a6d9eb47ac83c4c06fbf741c7487bc54adc2875bac88a081 +size 844495 diff --git a/detectionincrowdedscenesoneproposalmultiplepredictions/full.md b/detectionincrowdedscenesoneproposalmultiplepredictions/full.md new file mode 100644 index 0000000000000000000000000000000000000000..6e0a023508e314461cd5da726d34c06260763bba --- /dev/null +++ b/detectionincrowdedscenesoneproposalmultiplepredictions/full.md @@ -0,0 +1,284 @@ +# Detection in Crowded Scenes: One Proposal, Multiple Predictions + +Xuangeng Chu $^{1*}$ Anlin Zheng $^{2*}$ Xiangyu Zhang $^{2*†}$ Jian Sun $^{2}$ $^{1}$ Peking University ${}^{2}$ MEGVII Technology + +xg.chu@pku.edu.cn, {zhenganlin, zhangxiangyu, sunjian}@megvii.com + +# Abstract + +We propose a simple yet effective proposal-based object detector, aiming at detecting highly-overlapped instances in crowded scenes. The key of our approach is to let each proposal predict a set of correlated instances rather than a single one in previous proposal-based frameworks. Equipped with new techniques such as EMD Loss and Set NMS, our detector can effectively handle the difficulty of detecting highly overlapped objects. On a FPN-Res50 baseline, our detector can obtain $4.9\%$ AP gains on challenging CrowdHuman dataset and $1.0\%$ MR $^{-2}$ improvements on CityPersons dataset, without bells and whistles. Moreover, on less crowed datasets like COCO, our approach can still achieve moderate improvement, suggesting the proposed method is robust to crowdedness. + +# 1. Introduction + +Proposal-based framework has been widely used in modern object detection systems [29, 11, 12, 20, 21, 24, 14, 4, 5, 2, 13, 28, 34, 33], both for one-stage [24, 28, 21, 10] and two/multi-stage [29, 20, 4, 5, 13, 2] methods. The paradigm in general has a two-step pipeline: first, generating overcomplete object proposals in handcraft (e.g. predefined anchors [28, 24, 21]) or learnable (e.g. $RPNs$ [29, 20, 13]) manner; then, predicting a single instance corresponding to each proposal box with a confidence score and a refined location. To remove duplicate predictions, methods such as Non-maximum Suppression (NMS) are usually required for post-processing. + +Although proposal-based approaches have achieved state-of-the-art performances [13, 2, 20, 21] in popular datasets such as COCO [22] and PASCAL VOC [8], it is still + +![](images/474b49baf6676c448d2e04e96a1c9a00f13f76940d955fe200f756ddef28387d.jpg) +(a) Baseline + +![](images/c523edaed768b4764219b7a8fa3bc5b1821ca6d2bf793d388870214d3b33734e.jpg) +(b) Ours +Figure 1. Human detection in crowds. (a) Results predicted by FPN [20] baseline. The dashed boxes indicate the missed detections (suppressed by NMS mistakenly). (b) Results of our method applied to FPN. All instances are correctly predicted. Boxes of the same color stem from the identical proposal (best viewed in color). + +very challenging for crowded detection in practice. Fig. 1 (a) shows a common failure case: the detector fails to predict instances heavily overlapped with others (indicated in dashed box). + +This kind of typical failure in crowded scenes is mainly ascribed to two reasons. First, highly overlapped instances (as well as their associated proposals) are likely to have very similar features. As a result, it is difficult for a detector to generate distinguishing prediction for each proposal respectively (illustration is show in Fig. 2 for a concrete example). Second, since instances may heavily overlap each other, the predictions are very likely to be mistakenly suppressed by + +NMS, as depicted in Fig. 1 (a). + +Previous works have tried to address this issue from different perspectives, such as sophisticated NMS [1, 16, 23, 18, 25, 17], new loss functions [44, 40], re-scoring [19], part-based detectors [44, 38, 46, 3]. However, as we will analyze later (Sec. 2), current works are either too complex or less effective for handing highly-overlapped cases, or degrading the performance of less-overlapped cases. + +In this paper, a new scheme is introduced to handle this difficulty: for each proposal box, instead of predicting a single instance, as usual, we suggest predicting a set of instances that might be highly overlapped, as described in Fig. 2. With this scheme, the predictions of nearby proposals are expected to infer the same set of instances, rather than distinguishing individuals, which is much easy to be learned. We also introduce several techniques in the new scheme. Firstly, a EMD loss is proposed to supervise the learning of instance set prediction. Secondly, a new post-processing method named Set NMS is introduced to suppress the duplicates from different proposals, which aims at overcoming the drawbacks of naïve NMS in crowd scenes. Lastly, an optional refinement module (RM) is designed to handle the potential false positives. + +Our method is simple and almost cost-free. It is applicable to all the proposal-based detectors such as [29, 20, 21, 13]. The major modification is adding a prediction branch, which only brings negligible extra cost. But the improvement is significant: on CrowdHuman [32] dataset, our method boosts the AP score by $4.5\%$ (without refinement module) or $4.9\%$ (with refinement module); in addition, the recall on crowded instances improves by $8.9\%$ . More importantly, fewer false positive appears, suggested by the slightly improved $\mathrm{MR}^{-2}$ index even without refinement module. Besides, on less crowded datasets, our method can still obtain moderate gains. For example, on CityPersons we achieve $0.9\%$ and $1.0\%$ improvements in AP and $\mathrm{MR}^{-2}$ over the baseline; and on COCO, [22] it obtains $1.0\%$ higher AP score. All experiments conducted on different datasets illustrate that our method can handle all scenes gracefully, regardless of the crowdedness. + +# 2. Background + +As mentioned in the introduction, the paradigm of proposal-based object detectors mainly involves two steps: the first step is proposal box generation, which could be achieved by Selective Search [12, 11], predefined/learnable anchors [29, 28, 24, 21, 41, 39, 45] or Region Proposal Networks (RPNs) [29, 20, 13, 4, 2], etc. The second step is instance prediction, i.e. predicting the refined detection results corresponding to each proposal box. We primarily focus on the second step in this paper. + +For instance prediction, current state-of-the-art object detection frameworks [29, 20, 21, 24, 28] usually attach a + +![](images/473782d10cc6f9f4a81b1c15c70cf0b9cf093855c6f207af85546b295e73c025.jpg) + +![](images/b231bd55c7a70816cec72a7a8fbd1353ef0f8ffbcb5e2d9c22922c42031e4f4a.jpg) +(a) + +![](images/c81dc53dde5b8ae22ab207006db7e8b03e5519e4f0e64339fa7b1487869cc237.jpg) + +![](images/f6e13553ebcc16ab7ebff93cff5f1f52596bf84a628c4a0efa1954d58e56571d.jpg) +(b) +Figure 2. A typical case in crowded detection. A knife and a fork share almost the same bounding boxes. Three proposal boxes (red, green and blue, best viewed in color) are heavily overlapped. (a) Single predication paradigm (see Sec. 2). Each proposal box is expected to predict a single instance [29, 20, 21, 24, 28, 13] (may be empty), which is intrinsically difficult as the proposals share very similar feature. Moreover, after NMS, it is very likely that only one prediction survives. (b) In our approach, each proposal predicts a set of instances. Our Set NMS can easily remove the duplicate prediction sets together (not illustrated in the figure). + +detection function to each proposal box, which is used to determine whether the proposal is associated to some ground truth instance; if true, further to predict the corresponding class label and the refined bounding box for the object. This mechanism implies that each proposal box corresponds to single ground truth (usually the one with the largest overlap to the proposal box). Therefore, the proposal boxes have to be over-completed to ensure every instance has a chance to be detected, which introduces many duplicates to the predictions. As a result, duplicate removal methods such as Non-Maximum Suppression (NMS) are necessary for those frameworks to filter out the duplicate results. + +Although the above paradigm seems to obtain outstanding results on some benchmarks such as COCO [22] and PASCAL VOC [8]. It suffers from missing detection in crowded scenarios due to post-processing methods, e.g. NMS. Fig. 1 (a) shows an example: people in the dashed boxes are suppressed by the nearby boxes mistakenly. Thus, several approaches or workarounds have been proposed to address this limitation, which can be categorized as follows: + +Advanced NMS. The effectiveness of naive NMS is based on the assumption that multiple instances rarely occur at the same location, which is no longer satisfied in the crowded scenes. Several improved NMS approaches have + +been proposed. For example, Soft-NMS [1] and Softer-NMS [16] suggest decaying the confidence score of the neighboring predictions for suppression rather than directly discard them. [30] employs Quadratic Binary Optimization to predict instances, taking advantage of the prior distribution of ground truth's sizes. However, such heuristic variants of NMS are not always valid under different circumstances. Thus, more complex mechanisms may be introduced, for example, [18, 25] uses a neural network for more sophisticated and data-dependent duplicate removal. Although these methods raise the upper bound of naïve NMS, the pipeline becomes much more complex and costly in computation. Other works such as [23, 17] propose to predict different NMS thresholds for different bounding boxes. As the major drawback, they need an extra structure for IoU/density estimation, which introduces more hyperparameters. Besides, it is still difficult to distinguish heavily overlapped boxes as in Fig 2 (a). + +Loss functions for crowded detection. A few previous works propose new loss functions to address the problem of crowded detection. For example, [43] proposes Aggregation Loss to enforce proposals to be close and locate compactly to the corresponding ground truth. [40] proposes Repulsion Loss, which introduces extra penalty to proposals intertwine with multiple ground truths. The quality of detections in crowded scenes is improved with the help of these loss functions. However, since traditional NMS is still needed in the frameworks, it is still difficult to recall the overlapped instances illustrated in Fig 2 (a). + +Re-scoring. In many detection frameworks [29, 24, 20, 21] a proposal box is bound to a ground truth as long as the overlap is larger than a given threshold, which usually leads to a many-to-one relation between proposals and ground-truth instances thus NMS is required to remove the duplicate proposals. Instead, if we redesign the loss function to encourage one-to-one relation, the NMS procedure may be eliminated to avoid miss detection. We name the method re-scoring. Some of the previous works follow the idea. For example, in [26, 27], each ground-truth instance is associated strictly to one proposal box during training. However, in the architectures of [26, 27], due to lack of connections between proposals, the prediction may be ambiguous, because it is not sure for one proposal to determine whether the related instance has been predicted by another proposal. Actually, in [26, 27] NMS is still involved. RelationNet [19], instead, explicitly models the relations between proposals, which is supposed to overcome the limitations of [26, 27]. Using re-scoring, RelationNet obtains outstanding performance on COCO [22] dataset even without NMS. However, in a more crowded dataset CrowdHuman [32], we find RelationNet with re-scoring performs relatively poor + +(see Sec. 4 for details). It may be because on CrowdHuman dataset, proposals have to be much denser than those on COCO. As a result, the re-scoring network needs to generate different predictions from very close proposals (so their features and relations are also very similar, as shown in Fig. 2 (a)), which is infeasible for neural networks. + +There are other approaches on crowded detection, for example, part-based detectors [44, 38, 46, 3], which is mainly used in detecting special instances such as pedestrian. The discussions are omitted in this paper. + +In conclusion, based on the above analyses, we argue that object detection in the crowded scene may be fundamentally difficult, or at least nontrivial and complex for the mentioned existing proposal-based frameworks. The key issue lies in the basic paradigm of predicting only one instance for each proposal box. It inspires us to explore new instance prediction schemes, i.e. multiple instance prediction for each proposal. + +# 3. Our Approach: Multiple Instance Prediction + +Our approach is motivated by the observation: consider there are multiple objects heavily overlapped with each other, like the case in Fig. 2; if one proposal corresponds to any of the objects, it is very likely to overlap all the other objects. So, for such a proposal box, rather than predict a single object, why not predict them all? Formally, for each proposal box $b_{i}$ , the new scheme suggests predicting the correlated set of ground-truth instances $\mathrm{G}(b_{i})$ instead of a single object: + +$$ +\mathrm {G} \left(b _ {i}\right) = \left\{g _ {j} \in \mathcal {G} \mid \operatorname {I o U} \left(b _ {i}, g _ {j}\right) \geq \theta \right\}, \tag {1} +$$ + +where $\mathcal{G}$ is the set of all the ground truth boxes and $\theta$ is a given threshold of intersection-over-union (IoU) ratio. Fig. 2 (b) visualizes the concept. Compared with the previous single-instance-prediction framework, we find our new scheme may greatly ease the learning in crowded scenes. As shown in Fig. 2 (b), all of the three proposal boxes are assigned to the same set of ground-truth instance - it is a feasible behavior since the three proposals actually share almost the same feature. While for the previous single-instance-prediction paradigm (Fig. 2 (a)), each proposal has to produce distinguishing predictions, which might be intrinsically difficult. + +We introduce the details of our approach as follows: + +Instance set prediction. For each proposal box $b_{i}$ , most of the modern proposal-based detection frameworks [29, 20, 21, 24, 13] employ a detection function to predict a pair $(\mathbf{c}_i, \mathbf{l}_i)$ to represent the associated instance, where $\mathbf{c}_i$ is the class label with confidence and $\mathbf{l}_i$ is the relative coordinates. In our approach, to predict a set of instances, we + +introduce a simple extension - just by introducing $K$ detection functions to generate a set of predictions $\mathrm{P}(b_i)$ : + +$$ +\mathrm {P} (b _ {i}) = \left\{\left(\mathbf {c} _ {i} ^ {(1)}, \mathbf {l} _ {i} ^ {(1)}\right), \left(\mathbf {c} _ {i} ^ {(2)}, \mathbf {l} _ {i} ^ {(2)}\right), \dots , \left(\mathbf {c} _ {i} ^ {(K)}, \mathbf {l} _ {i} ^ {(K)}\right) \right\}, \tag {2} +$$ + +where $K$ is a given constant standing for the maximum cardinality of $\mathrm{G}(b_i)$ in the dataset (see Eq. 1). $\mathrm{P}(b_i)$ can be simply implemented by introducing extra prediction branches in most of the existing detection frameworks [29, 20, 21, 13, 24], which is shown in Fig. 3 (a). Note that even though $K$ is fixed for all proposals, the network could still predict some $\mathbf{c}_i^{(k)}$ to background class, representing that the $k$ -th detection function does not predict instance for the proposal $b_i$ . + +EMD loss. We aim to design a loss $\mathcal{L}(b_i)$ to minimize the gap between predictions $\mathrm{P}(b_i)$ and ground-truth instances $\mathrm{G}(b_i)$ corresponding to the proposal $b_i$ , which can be catalogued into the problem of set distance measurement. Similar problems have been discussed in some early object detection papers, such as [36, 7, 35]. Inspired by them, we design the following EMD loss to minimize the Earth Mover's Distance between the two sets: + +$$ +\mathcal {L} \left(b _ {i}\right) = \min _ {\pi \in \Pi} \sum_ {k = 1} ^ {K} \left[ \mathcal {L} _ {c l s} \left(\mathbf {c} _ {i} ^ {(k)}, g _ {\pi_ {k}}\right) + \mathcal {L} _ {r e g} \left(\mathbf {l} _ {i} ^ {(k)}, g _ {\pi_ {k}}\right) \right] \tag {3} +$$ + +where $\pi$ represents a certain permutation of $(1,2,\dots ,K)$ whose $k$ -th item is $\pi_k$ ; $g_{\pi_k}\in \mathrm{G}(b_i)$ is the $\pi_k$ -th ground-truth box; $\mathcal{L}_{cls}(\cdot)$ and $\mathcal{L}_{reg}(\cdot)$ are classification loss and box regression loss respectively, following the common definitions as [29, 24, 20, 21, 13]. Note that in Eq. 3, we assume $|\mathrm{G}(b_i)| = K$ ; if not, we add some "dummy" boxes (whose class label is regarded as background and without regression loss) to $\mathrm{G}(b_i)$ until it is satisfied. Intuitively, the formulation in Eq. 3 implies to explore all possible one-to-one matches between predictions and ground truths, thus finding the "best match" with the smallest loss. It is also worth noting that if $K = 1$ , Eq. 3 becomes equivalent to the loss in traditional single-instance-prediction frameworks, implying that our EMD loss is a natural generalization to the commonly-used detection loss [29, 24, 20, 13]. + +Set NMS. In our approach, although each proposal is able to predict multiple associated instances, if naive NMS is still involved for post-processing it is impossible to detect objects effectively in crowded scenes. Fortunately, because of the EMD loss, instances predicted by one proposal are expected to be unique by definition. In other words, duplicates exist only between the predictions from different proposals, as illustrated in Fig. 2 (b). With this prior, we introduce a simple patch to naive NMS pipeline, named Set NMS - each time before one box suppressing another + +one in the NMS algorithm, we insert an additional test to check whether the two box come from the same proposal; if yes, we skip the suppression. Experiments in Sec. 4 also suggest that only when multiple-instance-prediction and Set NMS are used together can our approach achieve significant improvement in crowded detection. + +Refinement module. In our approach, each proposal is expected to generate a set of instances rather than a single one, which may suffer from increase in false positives since more predictions are generated. + +Although the failure cases are rarely observed in our experiments on real images, we introduce an optional refinement module in case of the risk, as shown in Fig. 3 (b). The module simply takes the predictions as input, combining them with proposal feature, then performs a second round of predicting. We expect the refinement module to correct the possible false predictions. + +Discussion: relation to previous methods. Predicting multiple instance is not new. Double-person detector [37] models person pairs in the DPM [9] framework. In the deep learning era, some early detection systems [26, 27, 36, 7] also imply the high-level idea of multiple-instance-prediction, while the methods are not proposal-based. For example, MultiBox [7, 36] directly predicts all the instances in an image patch; YOLO v1/v2 [26, 27] generates multiple predictions for each cell (i.e. predicting all instances centered at a certain location). Special loss functions are also proposed in [7, 36, 26, 27] for set prediction, whose design purposes are similar to our EMD loss. + +The most related previous work to us is [35] which introduces LSTM to decode instance boxes in each grid of an image. Similar to our EMD loss, they use Hungarian Loss for multiple instance supervision. For post-processing, a box stitching method is employed to merge the predictions produced by adjacent grids. They mainly evaluated the method on head detection task, which shows some capability to predict crowded objects. However, since the method does not make use of proposals, it may have difficulty in detecting objects of various sizes/shapes, such as pedestrians or general objects. Moreover, the LSTM predictor is complex, which may be nontrivial to integrated in current state-of-the-art detection frameworks [20, 21, 13] efficiently. + +# 3.1. Network Architecture + +Theoretically, our approach can be applied to most of the state-of-the-art proposal-based detectors, no matter one-stage [24, 21, 28] or two-stage [29, 20, 13] frameworks. In this paper, we choose FPN [20] with RoIAlign [13] as a baseline detector to evaluate our method. In FPN, the Region Proposal Network (RPN) branch takes the responsibility for proposal generation, while the RCNN (or named + +![](images/d3929d695331cde0725fb878bcd90167a8e31199da25260b0d674acf6b1af73d.jpg) +Figure 3. Overall architecture. (a) $box_{A}$ and $box_{B}$ are the two instances predicted by one proposal, using our EMD Loss. Refinement module is an optional step. (b) The refinement module concatenates feature and box information to optimize the results. + +$RoI$ branch is used to predict the instance corresponding to the RoI proposal. So, our method is attached to the latter branch. From Sec. 3, easy to see that there is only one extra hyper-parameter in our approach $-K$ , the maximum cardinality of $G(\cdot)$ (refer to Eq. 2). In the rest of the paper, we let $K = 2$ , which we find is satisfied for almost all the images and proposals in many detection datasets like CrowdHuman [32], COCO [22] and CityPersons [42]. + +Fig. 3 (a) illustrates the usage of our method in FPN (only RCNN branch is shown). Based on the original architecture, only slight modifications need to be made: just attach an additional instance prediction head to the tail. EMD loss is applied to the two predictions instead of the original loss. The refinement module is optional; if applied, we use the refined results as the final predictions. + +# 4. Experiment + +In this section, we evaluate our approach from different perspectives. Intuitively, a detection algorithm specially optimized for crowded scenes tends to recall more instances, however, often have the risk of increasing false positive predictions. Our benchmarks focus on both of the opposite aspects. + +Datasets. An ideal object detector for crowded scenes should be robust to instance distributions, i.e. not only effective for crowded detections, but also stable to detect single/less-crowded objects. We adopt three datasets - CrowdHuman [32], CityPersons [42] and COCO [22] - + +
Dataset# objects/img# overlaps/img
CrowdHuman [32]22.642.40
CityPersons [42]6.470.32
COCO* [22]9.340.015
+ +Table 1. Instance density of each dataset. The threshold for overlap statistics is IoU $> {0.5}$ . *Averaged by the number of classes. + +for comprehensive evaluations on heavily, moderately and slightly overlapped situations respectively. Table 1 lists the "instance density" of each dataset. Since our proposed approach mainly aims to improve crowded detections. So, we perform most of the comparisons and ablations on CrowdHuman. Note that the experiment on uncrowded dataset like COCO is to verify whether our method does harm to isolated object detection, not for significant performance improvements. + +Evaluation metrics We mainly take the following three criteria for different purposes: + +- Averaged Precision (AP), which is the most popular metric for detection. AP reflects both the precision and recall ratios of the detection results. In our experiment, we empirically find AP is more sensitive to the recall scores, especially on crowded dataset like CrowdHuman. Larger AP indicates better performance. +- $MR^{-2}$ [6], which is short for log-average Miss Rate on False Positive Per Image (FPPI) in $[10^{-2}, 100]$ , is commonly used in pedestrian detection. $\mathrm{MR}^{-2}$ is very sensitive to false positives (FPs), especially FPs with high confidence will significantly harm the $\mathrm{MR}^{-2}$ ratio. Smaller $\mathrm{MR}^{-2}$ indicates better performance. +- Jaccard Index (JI) [24] is mainly used to evaluate the counting ability of a detector. Different from AP and $\mathrm{MR}^{-2}$ which are defined on the prediction sequence with decreasing confidence, JI evaluates how much the prediction set overlaps the ground truths. Usually, the prediction set can be generated by introducing a confidence score threshold. In this paper, for each evaluation entry, we report the best JI score by exploring all possible confidence thresholds. We use the official SDK of CrowdHuman [32] for JI calculation. Larger JI indicates better performance. + +Detailed Settings. Unless otherwise specified, we use standard ResNet-50 [15] pre-trained on ImageNet [31] as the backbone network for all the experiments. The baseline detection framework is FPN [20], while using RoIPooling [13] instead of original RoIPooling. As for anchor settings, we use the same anchor scales as [20], while the aspect ratios are set to $H:W = \{1:1,2:1,3:1\}$ for CrowdHuman and CityPersons, and $\{2:1,1:1,1:2\}$ for COCO. + +For training, we use the same protocol as in [20]. The batch size is 16, split to 8 GPUs. Each training runs for 30 epochs. During training, the sampling ratio of positive to negative proposals for RoI branch is $1:1$ for CrowdHuman and $1:3$ for CityPersons and COCO. Multi-scale training and test are not applied; instead, the short edge of each image is resized to 800 pixels for both training and test. All box overlap IoU thresholds (e.g. $\theta$ in Eq. 1, NMS thresholds, and those in calculating evaluation metrics) are set to 0.5 by default. For our method, we use $K = 2$ (see Eq. 2). The refinement module in Fig. 3 is enabled by default. + +# 4.1. Experiment on CrowdHuman + +CrowdHuman [32] contains 15,000, 4,370 and 5,000 images for training, validation and test respectively. For fair comparison, we retrain most of the involved models with our own implementation under the same settings. Results are mainly evaluated on the validation set, using full-body benchmark in [32]. + +Main results and ablation study. Table 2 shows the ablation experiments of the proposed methods in Sec. 3, including multiple instance prediction with EMD loss, set NMS and refinement module. The baseline is FPN [20] using NMS (IoU threshold is 0.5) for post-processing. It is clear that our methods consistently improve the performances in all criteria. Especially, even without refinement module our method still obtains $4.5\%$ improvements in AP and $2.2\%$ in JI, suggesting that more instances may correctly detected; more importantly, we find the $\mathrm{MR}^{-2}$ ratio also improves, indicating that our model does not introduce more false predictions. The refinement module affects little on AP and JI, while further boosting $\mathrm{MR}^{-2}$ by $\sim 0.8\%$ , suggesting that the module mainly reduces false positives as we expected. + +
MIPSet NMSRMAP/%MR-2/%JI/%
85.842.979.8
✓87.442.880.8
✓✓90.342.282.0
✓✓✓90.741.482.3
+ +Table 2. Ablation experiments evaluated on CrowdHuman validation set. The baseline model (the first line) is our reimplemented FPN [20] with ResNet-50 [15] backbone. MIP – multiple instance prediction with EMD loss. RM – refinement module. + +Comparisons with various NMS strategies. In Fig. 1, since some instances are mistakenly suppressed by NMS, one possible hypothesis is that the predictions may be improved by using different NMS strategies. Table 3 explores some variants. For naïve NMS, compared with the default setting (0.5), slightly enlarging the IoU threshold (from 0.5 to 0.6) may help to recall more instances, so AP increases; + +
MethodIoU*AP/%MR-2/%JI/%
NMS0.372.348.569.6
0.480.744.676.3
0.585.842.979.8
0.688.145.479.4
0.787.156.574.4
0.882.868.562.6
Soft-NMS [1]0.588.242.979.8
Ours (w/o RM)0.590.342.282.0
Ours (with RM)0.590.741.482.3
+ +Table 3. Comparisons of different NMS strategies on CrowdHuman validation set. The baseline model is FPN [20]. *IoU threshold for post-processing. RM - refinement module. + +however, the $\mathrm{MR}^{-2}$ index becomes much worse (from $42\%$ to $45.4\%$ ), indicating that more false positives are introduced. Soft-NMS [1] can boost AP score, but no improvements are obtained in $\mathrm{MR}^{-2}$ and JI. In contrast, our method achieves the best scores in all the three metrics even without refinement module. + +Comparisons with previous works. To our knowledge, very few previous works on crowded detection report their results on CrowdHuman. To compare, we benchmark two methods - GossipNet [18] and RelationNet [19] - which are representative works categorized into advanced NMS and re-scoring approaches respectively (see Sec. 2 for the analyses). For GossipNet, we use the open-source implementation to benchmark1. And for RelationNet, we re-implement the re-scoring version2. All methods use FPN [20] as the base detector with the same training settings. + +Table 4 lists the comparison results. Surprisingly, both RelationNet and GossipNet suffer from significant drop in AP and $\mathrm{MR}^{-2}$ . Further analyses indicate that the two methods have better recall ratio than baseline NMS for crowded objects (see Table 5), however, tend to introduce too many false positive predictions. Though it is still too early to claim [19, 18] do not work on CrowdHuman (we have not fully explored the hyper-parameters), at least the two methods are nontrivial for tuning. In contrast, our method is not only effective, but also very simple, as it has almost no additional hyper-parameters. + +Table 4 also compares a recent work AdaptiveNMS [23], which is an enhanced NMS strategy for crowded detection. In [23], CrowdHuman results based on FPN are reported. Note that since the baseline are not aligned, we cannot make the direct comparison with our results. From the numbers, we find that our method can achieve significant improve + +ment from a stronger baseline (especially in AP), in addition, the pipeline is much simpler. + +Table 4 also evaluate our method on the Cascade R-CNN [2] framework. We add the EMD loss and Set NMS into the last stage of Cascade R-CNN. The results show our method can still boost the performance of Cascade R-CNN significantly on crowded datasets like CrowdHuman. + +
MethodAP/%MR-2/%JI/%
FPN baseline85.842.979.8
FPN + Soft-NMS [1]88.242.979.8
RelationNet [19] (our impl.)81.648.274.6
GossipNet [18] (our impl.)80.449.481.6
Ours90.741.482.3
FPN baseline (impl. by [23])83.152.4—
AdaptiveNMS (impl. by [23])84.749.7—
CascadeR-CNN [2] (our impl.)85.643.080.6
CascadeR-CNN + Ours86.941.781.2
+ +Table 4. Comparisons of various crowded detection methods on CrowdHuman validation set. All methods are based on FPN detector [20]. Higher values of AP and JI indicate better performance, which is in contrast to the MR $^{-2}$ . + +Analysis on recalls. To further understand the effectiveness of our method on crowded objects, we compare the recalls of different approaches for both crowded and uncrowded instances respectively. Results are shown in Table. 5. Note that recall relates to the confidence score threshold. For fair comparison, we use the thresholds corresponding to the best JI index for each entry respectively. From the table we find that for FPN baseline/Soft-NMS, recall of crowded objects is much lower than that of uncrowded objects, implying the difficulty of crowded detection. In contrast, our method greatly improves the recall ratio of the crowded instances (from $54.4\%$ to $63.3\%$ , by $8.9\%$ ), in addition, uncrowded recall is also slightly improved. + +# 4.2. Experiments on CityPersons + +CityPersons [42] is one of the widely used benchmarks for pedestrian detection. The dataset contains 5,000 images (2,975 for training, 500 for validation, and 1,525 for testing, respectively). Each image is with a size of $1024 \times 2048$ . Following the common practice in previous works, all of the object detectors are trained on the training (reasonable) subset and tested on the validation (reasonable) subset with the enlarged resolution by $1.3 \times$ compared to the original one, which is slightly different from the settings we used for CrowdHuman [32] and COCO [22]. To + +
MethodConf.TotalSparseCrowd
Ground truth-99481925906891
FPN + NMS0.862699(63.0%)\( ^3 \)58949(63.7%)3750(54.4%)
FPN + Soft-NMS [1]0.862699(63.0%)58949(63.7%)3750(54.4%)
FPN + GossipNet [18]0.063634(63.9%)59420(64.2%)4214(61.2%)
FPN + RelationNet [19]0.558344(58.6%)54173(58.5%)4172(60.5%)
Ours0.864153(64.5%)59790(64.6%)4364(63.3%)
+ +Table 5. Detection boxes recalled on CrowdHuman validation set. Only boxes with confidence score higher than a certain threshold are taken into account. The confidence thresholds are subject to the best JI scores respectively and noted in the "Conf" column. Numbers in the last three columns indicate the number of recalled boxes. "Crowd" means the corresponding ground-truth box overlaps with some other ground truth with IoU>0.5, otherwise marked "Sparse". Note that recalls of Soft-NMS [1] are the same with the NMS baseline, which is because the confidence threshold is relativity high (0.8), thus NMS is roughly equivalent to Soft-NMS. + +obtain a better baseline, we follow the strategy proposed in [3], namely evolving ground-truths into proposals by jittering. Other hyper-parameters remains the same as that in Sec. 4. + +
MethodConf.TotalSparseCrowd
Ground truth-15791471108
FPN0.61430136664
+NMS(90.6%)(92.9%)(59.3%)
FPN0.61430136664
+ Soft-NMS [1](90.6%)(92.9%)(59.3%)
Ours0.61476138096
(93.5%)(93.8%)(88.9%)
+ +Table 6. Detection recalls on CityPersons validation set. Please refer to the caption in Table 5 for the descriptions. Note that recalls of Soft-NMS [1] are the same as the NMS baseline, which is ascribed to the confidence threshold is relativity high (0.6), thus NMS is roughly equivalent to Soft-NMS. + +Qualitative results. Table 7 compares our method with FPN baselines with naïve NMS and Soft-NMS respectively. Our approach improves AP and $\mathrm{MR}^{-2}$ by $0.9\%$ and $1.0\%$ respectively over the NMS baseline, indicating the effectiveness of the art results on CityPersons. Though it may be unfair for direct comparisons due to different hyper-parameter settings, however, at least it implies our method achieves significant gains over a relatively strong baseline. + +![](images/da0378de54ff09ae4505073495654b5851830327bf93d2fb2462ff22bfd4781c.jpg) + +![](images/b267d95a11fc1305713dfcfa6ab550c510ff5c7c221cb79ae4ec917c49fbb756.jpg) + +![](images/8174418c6bc13457e2724c33da5b866d9912e62ce85909e6c491a912a75f46d4.jpg) + +![](images/5a66da50308e24c6122e8ac7851e6bacd1abd62dd6b6fa28281cdb38b6023cef.jpg) + +![](images/9f1d43130257b6071e36587a32db0a7fafb4b02ed136c258f1fb567b75871c4b.jpg) +Figure 4. Visual comparison of the baseline and our approach. The first row are the results produces by FPN with NMS. The last row are the results of our approach. The scores threshold for visualization is 0.3. Boxes with the same color stem from the identical proposal. The dashed boxes are the missed detection ones. + +![](images/712bc6f7b1c88f14c5b71c742c3577db1be2912e4d70832ac5760ed9f992a24a.jpg) + +![](images/c8504d674661d2d8f2954ff689b3d84fcf1bc4569eb5de3ecb43cff8423ac6c0.jpg) + +![](images/5e110480b539b67b50f6a759a7e661ddae649056542d588b9eecd380981dd9bd.jpg) + +Table 6 further analyzes the recalls of different methods. Similar to those in CrowdHuman (refer to Table 6), our method mainly significantly boosts the recall on crowded objects – from 64 increased to 96 out of a total of 108 instances in the validation set. The comparison further indicates our approach is very effective to deal with crowded scenes again. + +
MethodBackboneMR-2AP
FPN + NMSRes-5011.7%95.2%
FPN + Soft-NMS [1]11.8%95.3%
OursRes-5010.7%96.1%
AF-RCNN [42]12.8%—
OR-CNN [43]VGG-1611.0%—
Adaptive-NMS [23]10.8%—
FRCNN (our impl.) [29]Res-5011.6%95.0%
Repulsion Loss [40]11.6%—
+ +Table 7. Comparisons of different methods on CityPersons validation set. All models are evaluated with enlarged resolution of $1.3 \times$ compared to the original size. Models in the upper part are trained by ours with the same FPN base detector. Models in the lower part are trained with other protocols. + +# 4.3. Experiments on COCO + +According to Table 1, the crowdedness of COCO [22] is very low, which is out of our design purpose. So, we do not expect a significant performance gain on COCO. Instead, the purpose of introducing COCO is to verify: 1) whether our method generalizes well to multi-class detection problems; 2) whether the proposed approach is robust to different crowdedness, especially to isolated instances. + +
MethodAPAP50AP75APSAPMAPL
FPN37.559.640.423.041.248.6
Soft-NMS38.059.441.523.341.849.0
Ours38.560.541.523.041.850.1
+ +Table 8. Comparisons on COCO [22] minival set. All models are based on FPN detector. Results are evaluated in all the 80 classes. + +Following the common practice of [20, 21], we use a subset of 5000 images in the original validation set (named minival) for validation, while using the remaining images in the original training and validation set for training. Table 8 shows the comparisons with FPN and $\mathrm{FPN + Soft - NMS}$ baselines. Moderate improvements are obtained, e.g. $1.0\%$ better than naive NMS and $0.5\%$ better than Soft-NMS in AP. Interestingly, large objects achieve the most significant improvement (see $\mathrm{AP}_L$ in Table 8), which may be because larger objects are more likely to overlap. The experiment suggests our method is not only very effective on crowded scenes, but also able to deal with multiple classes and isolated instances without performance drop. + +# 5. Conclusion + +In this paper, we propose a very simple yet effective proposal-based object detector, specially designed for crowded instance detection. The method makes use of the concept of multiple instance prediction, introducing new techniques such as EMD loss, Set NMS and refinement module. Our approach is not only effective, but also flexible to cooperate with most state-of-the-art proposal-based detection frameworks; in addition, also generalizes well to less crowded scenarios. + +# References + +[1] Navaneeth Bodla, Bharat Singh, Rama Chellappa, and Larry S. Davis. Soft-NMS - Improving Object Detection With One Line of Code. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017. +[2] Zhaowei Cai and Nuno Vasconcelos. Cascade r-cnn: High quality object detection and instance segmentation. arXiv preprint arXiv:1906.09756, 2019. +[3] Cheng Chi, Shifeng Zhang, Junliang Xing, Zhen Lei, Stan Z Li, and Xudong Zou. Pedhunter: Occlusion robust pedestrian detector in crowded scenes. arXiv preprint arXiv:1909.06826, 2019. +[4] Jifeng Dai, Yi Li, Kaiming He, and Jian Sun. R-fcn: Object detection via region-based fully convolutional networks. In Advances in neural information processing systems, pages 379-387, 2016. +[5] Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable convolutional networks. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017. +[6] Piotr Dollar, Christian Wojek, Bernt Schiele, and Pietro Perona. Pedestrian detection: An evaluation of the state of the art. IEEE transactions on pattern analysis and machine intelligence, 34(4):743-761, 2012. +[7] Dumitru Erhan, Christian Szegedy, Alexander Toshev, and Dragomir Anguelov. Scalable object detection using deep neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2147-2154, 2014. +[8] M. Everingham, S. M. A. Eslami, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The pascal visual object classes challenge: A retrospective. International Journal of Computer Vision, 111(1):98-136, Jan. 2015. +[9] Pedro F Felzenszwalb, Ross B Girshick, David McAllester, and Deva Ramanan. Object detection with discriminatively trained part-based models. IEEE transactions on pattern analysis and machine intelligence, 32(9):1627-1645, 2009. +[10] Cheng-Yang Fu, Wei Liu, Ananth Ranga, Ambrish Tyagi, and Alexander C. Berg. DSSD: Deconvolutional single shot detector. CoRR, abs/1701.06659, 2017. +[11] Ross Girshick. Fast r-cnn. In The IEEE International Conference on Computer Vision (ICCV), December 2015. +[12] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 580-587, 2014. +[13] K. He, G. Gkioxari, P. Dollár, and R. Girshick. Mask R-CNN. In 2017 IEEE International Conference on Computer Vision (ICCV), pages 2980-2988, Oct 2017. +[14] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Spatial pyramid pooling in deep convolutional networks for visual recognition. In European conference on computer vision, pages 346-361. Springer, 2014. +[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceed- + +ings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. +[16] Yihui He, Chenchen Zhu, Jianren Wang, Marios Savvides, and Xiangyu Zhang. Bounding box regression with uncertainty for accurate object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2888-2897, 2019. +[17] Jan Hosang, Rodrigo Benenson, and Bernt Schiele. A convet for non-maximum suppression. In German Conference on Pattern Recognition, pages 192-204. Springer, 2016. +[18] Jan Hosang, Rodrigo Benenson, and Bernt Schiele. Learning non-maximum suppression. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. +[19] Han Hu, Jiayuan Gu, Zheng Zhang, Jifeng Dai, and Yichen Wei. Relation networks for object detection. arXiv preprint arXiv:1711.11575, 2017. +[20] Tsung-Yi Lin, Piotr Dólar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In CVPR, volume 1, page 4, 2017. +[21] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólár. Focal loss for dense object detection. arXiv preprint arXiv:1708.02002, 2017. +[22] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dálár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740-755. Springer, 2014. +[23] Songtao Liu, Di Huang, and Yunhong Wang. Adaptive nms: Refining pedestrian detection in a crowd. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[24] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C. Berg. SSD: Single shot multibox detector. In ECCV, 2016. +[25] Lu Qi, Shu Liu, Jianping Shi, and Jiaya Jia. Sequential context encoding for duplicate removal. CoRR, abs/1810.08770, 2018. +[26] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. +[27] Joseph Redmon and Ali Farhadi. Yolo9000: Better, Faster, Stronger. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. +[28] Joseph Redmon and Ali Farhadi. Yolov3: An incremental improvement. arXiv, 2018. +[29] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. In Advances in Neural Information Processing Systems (NIPS), 2015. +[30] Sitapa Rujikietgumjorn and Robert T. Collins. Optimized pedestrian detection for multiple and occluded people. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2013. + +[31] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211-252, 2015. +[32] Shuai Shao, Zijian Zhao, Boxun Li, Tete Xiao, Gang Yu, Xiangyu Zhang, and Jian Sun. Crowdhuman: A benchmark for detecting human in a crowd. arXiv preprint arXiv:1805.00123, 2018. +[33] Bharat Singh and Larry S. Davis. An analysis of scale invariance in object detection snip. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. +[34] Bharat Singh, Mahyar Najibi, and Larry S Davis. SNIPER: Efficient multi-scale training. NIPS, 2018. +[35] Russell Stewart, Mykhaylo Andriluka, and Andrew Y Ng. End-to-end people detection in crowded scenes. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2325-2333, 2016. +[36] Christian Szegedy, Scott Reed, Dumitru Erhan, Dragomir Anguelov, and Sergey Ioffe. Scalable, high-quality object detection. arXiv preprint arXiv:1412.1441, 2014. +[37] Siyu Tang, Mykhaylo Andriluka, and Bernt Schiele. Detection and tracking of occluded people. International Journal of Computer Vision, 110(1):58-69, Oct 2014. +[38] Yonglong Tian, Ping Luo, Xiaogang Wang, and Xiaouu Tang. Deep learning strong parts for pedestrian detection. In Proceedings of the IEEE international conference on computer vision, pages 1904-1912, 2015. +[39] Jiaqi Wang, Kai Chen, Shuo Yang, Chen Change Loy, and Dahua Lin. Region proposal by guided anchoring. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2965-2974, 2019. +[40] Xinlong Wang, Tete Xiao, Yuning Jiang, Shuai Shao, Jian Sun, and Chunhua Shen. Repulsion loss: Detecting pedestrians in a crowd. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. +[41] Tong Yang, Xiangyu Zhang, Zeming Li, Wenqiang Zhang, and Jian Sun. Metaanchor: Learning to detect objects with customized anchors. In Advances in Neural Information Processing Systems, pages 320-330, 2018. +[42] Shanshan Zhang, Rodrigo Benenson, and Bernt Schiele. Citypersons: A diverse dataset for pedestrian detection. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), volume 1, page 3, 2017. +[43] Shifeng Zhang, Longyin Wen, Xiao Bian, Zhen Lei, and Stan Z Li. Occlusion-aware r-cnn: detecting pedestrians in a crowd. In Proceedings of the European Conference on Computer Vision (ECCV), pages 637-653, 2018. +[44] Shanshan Zhang, Jian Yang, and Bernt Schiele. Occluded pedestrian detection through guided attention in cnns. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. +[45] Qiaoyong Zhong, Chao Li, Yingying Zhang, Di Xie, Shicai Yang, and Shiliang Pu. Cascade region proposal and global context for deep object detection. Neurocomputing, 2019. + +[46] Chunluan Zhou and Junsong Yuan. Bi-box regression for pedestrian detection and occlusion estimation. In The European Conference on Computer Vision (ECCV), September 2018. \ No newline at end of file diff --git a/detectionincrowdedscenesoneproposalmultiplepredictions/images.zip b/detectionincrowdedscenesoneproposalmultiplepredictions/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..828a1b1d3ffd37db3f9cf83a53952ed097fbc2b1 --- /dev/null +++ b/detectionincrowdedscenesoneproposalmultiplepredictions/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd38c3bec0547a10ba52c07fade50bc08f3a8718fec1934f880c646bc0b747b3 +size 631006 diff --git a/detectionincrowdedscenesoneproposalmultiplepredictions/layout.json b/detectionincrowdedscenesoneproposalmultiplepredictions/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..377e288152c45519b12e971070a2c333b86bb946 --- /dev/null +++ b/detectionincrowdedscenesoneproposalmultiplepredictions/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c25b35752b413ca5305b399c903ac8eb98d6bc67da18a66e6d3c9f22bf0c2649 +size 377008 diff --git a/determinantregularizationforgradientefficientgraphmatching/a15efefc-4966-4425-8314-2c3e489c36af_content_list.json b/determinantregularizationforgradientefficientgraphmatching/a15efefc-4966-4425-8314-2c3e489c36af_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..c585621dfb107d6c813d95b22a844801308f8c49 --- /dev/null +++ b/determinantregularizationforgradientefficientgraphmatching/a15efefc-4966-4425-8314-2c3e489c36af_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c48fae6da06b6984256a5754c15a1a9e19439061d675f6234c9265fd81bdd3b5 +size 80870 diff --git a/determinantregularizationforgradientefficientgraphmatching/a15efefc-4966-4425-8314-2c3e489c36af_model.json b/determinantregularizationforgradientefficientgraphmatching/a15efefc-4966-4425-8314-2c3e489c36af_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a75e06172bd6be0d0460d9aa01c4a16e1f7e71f9 --- /dev/null +++ b/determinantregularizationforgradientefficientgraphmatching/a15efefc-4966-4425-8314-2c3e489c36af_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cdec6c5aa13dabc3008b4ada5c0339c842c9fcfc763b7d89e9d3a241576b023c +size 100725 diff --git a/determinantregularizationforgradientefficientgraphmatching/a15efefc-4966-4425-8314-2c3e489c36af_origin.pdf b/determinantregularizationforgradientefficientgraphmatching/a15efefc-4966-4425-8314-2c3e489c36af_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..07a3abd9f80cee3fbd4da7515784cc55cdfe78c5 --- /dev/null +++ b/determinantregularizationforgradientefficientgraphmatching/a15efefc-4966-4425-8314-2c3e489c36af_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b7e5341ae50c0cf290446698a68e1f27b29266bd74493ebace8f5c7d378fa8c +size 938946 diff --git a/determinantregularizationforgradientefficientgraphmatching/full.md b/determinantregularizationforgradientefficientgraphmatching/full.md new file mode 100644 index 0000000000000000000000000000000000000000..d3caf08373f5c002e6c931e47a5b6ab460c76a13 --- /dev/null +++ b/determinantregularizationforgradientefficientgraphmatching/full.md @@ -0,0 +1,414 @@ +# Determinant Regularization for Gradient-Efficient Graph Matching + +Tianshu Yu†, Junchi Yan‡, Baoxin Li† +†Arizona State University, ‡Shanghai Jiao Tong University +{tianshuy,baoxin.li}@asu.edu yanjunchi@sjtu.edu.cn + +# Abstract + +Graph matching refers to finding vertex correspondence for a pair of graphs, which plays a fundamental role in many vision and learning related tasks. Directly applying gradient-based continuous optimization on graph matching can be attractive for its simplicity but calls for effective ways of converting the continuous solution to the discrete one under the matching constraint. In this paper, we show a novel regularization technique with the tool of determinant analysis on the matching matrix which is relaxed into continuous domain with gradient based optimization. Meanwhile we present a theoretical study on the property of our relaxation technique. Our paper strikes an attempt to understand the geometric properties of different regularization techniques and the gradient behavior during the optimization. We show that the proposed regularization is more gradient-efficient than traditional ones during early update stages. The analysis will also bring about insights for other problems under bijection constraints. The algorithm procedure is simple and empirical results on public benchmark show its effectiveness on both synthetic and real-world data. + +# 1. Introduction + +Compared with vector-like data, graph is a more versatile representation for many real-world problems whereby the relational structures are involved. One fundamental task in processing graph data is graph matching (GM), which involves establishing vertex correspondences among a pair or multiple graphs. Unlike point alignment that considers only unary (vertex) feature similarity, in general, graph matching establishes the vertex correspondence by considering both unary and higher-order namely hyperedge (typically second-order i.e. edge) information. Due to the introduction of higher-order information, graph matching becomes generally NP-hard. This is in contrast to point matching (linear assignment) which can be solved to the global optimal using the Hungarian method [29] in polynomial time regarding with the number of vertex. + +For its robustness against local noise and deformation, graph matching has been widely used in the analysis of images [12], graphics [19], and genome [46], etc. Related approximate techniques have also been developed for cross social network matching [10]. In all these domains, graph matching serves as a building block for downstream applications such as image recognition, graphics clustering, whereby the similarity based on aligned structure is utilized. + +Over the decades, extensive works have been developed on graph matching. Traditionally, most methods are focused on pairwise graph matching, i.e., each time only two graphs are involved for matching. Due to its NP-hardness, most methods seek approximation techniques to pursuit the trade-off between accuracy and efficiency. A popular conversion treatment from continuous to discrete solution is applying greedy algorithm or Hungarian method as projection. However such a conversion is likely to bring about arbitrary accuracy degeneration to the final solution. + +Recently, a few regularizers have been developed and become an important way to graduated discretization along the solution path. Examples include entropy [35], factorization based convex-concave relaxation [50], and $\ell_2$ norm [18]). However, there still lacks a clear investigation on the gradient behavior during the optimization: how does the regularized gradient impact the solution path and what can we do to improve? + +This work is focused on investigating and improving the effectiveness of gradient provided by regularization, by providing more reliable gradient direction along the continuous solution path (being a continuation method). We also develop a new regularization technique combined with the simple gradient based continuous optimization. It explores the determinant of the matching matrix which is relaxed in the continuous domain, and achieves superior performance among several gradient-based solvers, while existing regularized methods [16, 35, 18] often perform less competitive and also are algorithmically more complex. The main contributions of the paper are: + +i) To enable gradient-efficient continuation optimization for graph matching, we propose a novel graduated discretization technique. Specifically a determinant regulariza + +tion technique is devised on the matching solution. We analytically show the geometric property of our method compared to existing regularizers; + +ii) We develop two types of sub-gradient updating rules to address the issue of irregular solution matrix, which have been proved effective and moderately efficient; +iii) Our approach shows promising experimental results on public benchmarks. Thanks to the clear theoretical foundation, the algorithm procedure is in general simple and insensitive to hyperparameters. + +Notations are used as follows. Bold lower case x and upper case X refer to vector and matrix, respectively. While $\operatorname{det}(\cdot)$ and $\operatorname{sign}(\cdot)$ calculate matrix determinant and sign of a real value, respectively, and $\operatorname{diag}(\cdot)$ maps a vector to a diagonal matrix, and vice versa. 1 is a vector with all 1. + +# 2. Related Works + +We discuss two fundamental aspects for graph matching. + +# 2.1. Objective Modeling + +Graph matching aims to establish the node correspondence to maximize the affinity, which is in general defined as the summation of vertex-to-vertex and edge-to-edge affinity values. While some prior works relax graph matching with linear programming [37, 48, 34], we mainly focus on quadratic relaxation in this paper. In the literature, there are mainly two settings considered. One explores the affinity information confined within the second-order ones, which leads to the classic QAP formulation that has been widely used in graph matching methods [22, 23, 8, 24]: + +$$ +J (\mathbf {x}) = \mathbf {x} ^ {\top} \mathbf {K x} \tag {1} +$$ + +$$ +\mathbf {X} \mathbf {1} _ {n _ {2}} = \mathbf {1} _ {n _ {1}}, \mathbf {X} ^ {\top} \mathbf {1} _ {n _ {1}} \leq \mathbf {1} _ {n _ {2}}, \mathbf {X} \in \{0, 1 \} ^ {n _ {1} \times n _ {2}} +$$ + +where $\mathbf{x} = \operatorname{vec}(\mathbf{X})$ is the column-wise vectorized version of matrix $\mathbf{X}$ . The constraints assume each vertex in one graph shall find their one-to-one node correspondence in the other. + +There is also an emerging line of works [47, 5, 11, 42, 30] resorting to higher-order affinity by tensor representation, whereby three or more nodes are grouped as a tuple and the tensor element stores the similarity between each pair of tuples. A widely used tensor based objective is [21]: + +$$ +J (\mathbf {x}) = \mathbf {H} \otimes_ {1} \mathbf {x} \dots \otimes_ {p} \mathbf {x} \tag {2} +$$ + +where $\mathbf{H}$ is the affinity tensor and $p$ is the affinity order. Methods in this setting are also called hypergraph matching methods, which can increase the matching accuracy at the cost of notable complexity increase in both time and space. + +Differing from using predefined affinity parameters, recent studies also aim to learn the parameters in either unsupervised or supervised way [24, 4, 25]. For instance, the approach proposed in [6] learns the graph structure model + +for a specific category that is assumed to contain similar graph samples for matching. Recently deep neural networks [45, 38] are adopted for learning graph matching. + +# 2.2. Optimization Methods + +Many works resort to continuous relaxation to circumvent the more challenging discrete optimization problem. The classic work [22, 9] devises a spectral relaxations on the matching matrix, whereby the matching constraint is loosened by $\| \mathbf{x} \|_2 = 1$ for efficient computing. Some other works [16, 22, 23] resort to doubly-stochastic relaxation on the matching matrix, and the solution domain is relaxed to: + +$$ +\mathbf {X} \mathbf {1} _ {n _ {2}} = \mathbf {1} _ {n _ {1}}, \mathbf {X} ^ {\top} \mathbf {1} _ {n _ {1}} \leq \mathbf {1} _ {n _ {2}}, \mathbf {X} \in [ 0, 1 ] ^ {n _ {1} \times n _ {2}} +$$ + +There are efforts adopting semidefinite-programming (SDP) [36, 31], since SDP can achieve remarkably tight relaxations. The relaxation model can be written as [31]: + +$$ +\min _ {\mathbf {Y}} \operatorname {T r} (\mathbf {Q Y}) \quad \text {s . t .} \quad \mathbf {Y} \succeq \mathbf {0}, \quad \operatorname {T r} (\mathbf {K} _ {i} \mathbf {Y}) = c _ {i} +$$ + +where $\mathbf{Y} = \mathbf{x}\mathbf{x}^{\top}$ and constraints are defined by a number of $\mathbf{K}_i$ and $c_{i}$ . The problem can be solved using standard SDP solver while it suffers from the scalability issue. DS* algorithm [2] seeks to solve this issue with a lifting-free paradigm, which depends on a series of linearization. + +In practice, the continuous methods have a drawback due to the post binarization step, which can cause uncontrollable degeneration to the final solution quality. Therefore researchers have also tried to directly solve the problem in the discrete assignment space. The Integer Projected Fixed Point (IPFP) method [23] was developed, aiming to find an optimal solution along a (quasi) discrete course. Sampling methods [20, 33] directly generate discrete hypothesis via Monte Carlo Sampling, and the recent method [1] devises a graph matching tailored Tabu search strategy. + +From the optimization perspective, there also exist a large number of path-following based algorithms for graph matching [46, 26, 49, 40, 39, 18], including the continuation method used in the classic work [16]. + +# 3. GM via Determinant Regularization + +# 3.1. Theorem and Derived Objectives + +Graph matching can be relaxed as following: + +$$ +\max _ {\mathbf {x}} \mathbf {x} ^ {\top} \mathbf {K} \mathbf {x}, \quad \text {s . t .} \mathbf {H} \mathbf {x} = \mathbf {1}, \quad \mathbf {x} \in [ 0, 1 ] ^ {n ^ {2}} \tag {3} +$$ + +where $\mathbf{K} \in \mathbb{R}^{n \times n}$ is the so-called affinity matrix which is assumed pre-given in this paper, and $\mathbf{H}$ is a selection matrix encoding the one-to-one constraint for node correspondence. Here $n$ is the number of nodes in each graph. Now we first present the following proposition. + +Proposition 1. For any doubly stochastic matrix $\mathbf{X}$ , we have $|\operatorname{det}(\mathbf{X})| \leq 1$ . Equality holds iff $\mathbf{X}$ is a permutation. + +Proof. According to Hadamard's inequality [15], we have $|\operatorname{det}(\mathbf{X})| \leq \prod_{j=1}^{n} \| \mathbf{X}_j \|$ , where $\mathbf{X}_j$ refers to the $j$ th column of $\mathbf{X}$ . As $\mathbf{X}$ is doubly stochastic, we have $\mathbf{X}_{ij} \in [0,1]$ and $\sum_{i} \mathbf{X}_{ij} = 1$ . Thus $\| \mathbf{X}_j \| \leq 1$ and equality holds iff there is only a 1 element in $\mathbf{X}_j$ and all the resting elements are 0s. Therefore, for any column $j$ that's not in 0-1 mode, we must have $\| \mathbf{X}_j \| < 1$ . This observation claims that, if $\mathbf{X}$ is not a permutation (in this case non-0/non-1 element exists), $|\operatorname{det}(\mathbf{X})| \leq \prod_{j=1}^{n} \| \mathbf{X}_j \| < 1$ . + +On the other hand, for any permutation $\mathbf{X}$ , we must have $|\operatorname{det}(\mathbf{X})| = 1$ (As the columns of a doubly stochastic matrix are orthogonal). This completes the proof. + +This proposition gives an upper bound for the absolute value of the determinant. Together with the trivial lower bound we have $0 \leq |\operatorname{det}(\mathbf{X})| \leq 1$ . The equality of the 0 side holds when the columns/rows of $\mathbf{X}$ are linearly dependent. Based on the discussion above, we construct the following objective involving determinant regularization: + +$$ +\max _ {\mathbf {x}} \mathbf {x} ^ {\top} \mathbf {K} \mathbf {x} + \lambda | \det (\mathbf {X}) |, \quad \text {s . t .} \mathbf {H} \mathbf {x} = \mathbf {1} \tag {4} +$$ + +We refer to objective (4) as $\mathbb{P}_{\lambda}$ . Given objective (4) with a regularization term, two types of optimization strategies, namely multiplication and gradient, are widely applied. The multiplicative strategy is established on certain convergence guarantee where in the current iteration the updated affinity value is greater than the previous one under some mild conditions [17, 16]. In our case, however, it is difficult to devise a multiplication-based updating paradigm since the convergence condition involving matrix inversion cannot be easily found. Instead, we develop a gradient-based optimization algorithm under the framework of path-following [49]. Though we still face the difficulty of calculating matrix inversion in this setting, we provide an effective and efficient way to approximate the gradient of low-rank solution. These will be discussed in Section 4. Although it was reported that the multiplicative updating rule is more computationally efficient, we have found that our gradient-based algorithm can achieve remarkable improvement compared to multiplication-based ones in a reasonable time cost. + +# 3.2. Geometric Property of Gradients + +We show some geometric properties of the proposed models in this section and analyze the gradient behavior compared to two regularization counterparts. To this end, we unfold our analysis in Euclidean space, which is more intuitive. We also choose regularization model with $\ell_2$ [18] $(\sum_{i}\mathbf{x}_{i}^{2})$ and entropy [16] $(- \sum_{i}\mathbf{x}_{i}\log (\mathbf{x}_{i}))$ for comparison on the polytope. As the underlying contours are visualized, + +we demonstrate the property of determinant by showing its bound vs $\ell_2$ norm. Let us consider the following two sets: + +$$ +\mathcal {S} _ {1} = \left\{\mathbf {X} | | \left. \left. \mathbf {X} \right| \right| _ {F} ^ {2} = n \right\} \quad \mathcal {S} _ {2} = \left\{\mathbf {X} | | \det (\mathbf {X}) | = 1 \right\} \tag {5} +$$ + +where $S_{1}$ is the regularization introduced in [18]. For any $\mathbf{X} \in S_{1}$ , we have the following formula according to the geometric inequality and Hadamard's inequality: + +$$ +\| \mathbf {X} \| _ {F} ^ {2} / n = \sum_ {j = 1} ^ {n} \| \mathbf {X} _ {j} \| _ {2} ^ {2} / n \geq \sqrt [ n ]{\prod_ {j = 1} ^ {n} \| \mathbf {X} _ {j} \| _ {2} ^ {2}} \geq \sqrt [ n ]{| \det (\mathbf {X}) | ^ {2}} \tag {6} +$$ + +In general, we have $|\operatorname{det}(\mathbf{X})| \leq 1$ if $\mathbf{X} \in S_1$ . The above analysis implies that, the set of $\{\overline{\mathbf{X}} ||\mathbf{X}\|_F^2 \leq n\}$ is a proper subset of $\{\mathbf{X}||\operatorname{det}(\mathbf{X})| \leq 1\}$ . To show the geometric relation among these regularizers in 2D space, we present an example by projecting the 2-permutation polytope onto the 2-dimensional Euclidean space, with two permutation: + +$$ +\mathbf {A} _ {1} = \left( \begin{array}{l l} 1 & 0 \\ 0 & 1 \end{array} \right), \quad \mathbf {A} _ {2} = \left( \begin{array}{l l} 0 & 1 \\ 1 & 0 \end{array} \right) \tag {7} +$$ + +Any point on this polytope can be expressed as: + +$$ +\alpha \mathbf {A} _ {1} + (1 - \alpha) \mathbf {A} _ {2} \tag {8} +$$ + +We first give a 2-dimensional expression of determinant regularizer. Given Eq. (8), the corresponding absolute determinant value given $\alpha$ is: + +$$ +\left| \det \left\{\left( \begin{array}{c c} \alpha & 1 - \alpha \\ 1 - \alpha & \alpha \end{array} \right) \right\} \right| = | 2 \alpha - 1 | \tag {9} +$$ + +which is merely dependent on variable $\alpha$ . Upon this juncture, we linearly map permutation vertices $\mathbf{A}_1, \mathbf{A}_2$ and original point $(0,0;0,0)$ onto $(0,1), (1,0)$ and $(0,0)$ in regular 2D space, respectively. This can be done with a naive projection matrix from vectorized 4D to 2D space: + +$$ +\mathbf {P} = \left( \begin{array}{c c c c} 0. 5 & 0 & 0 & 0. 5 \\ 0 & 0. 5 & 0. 5 & 0 \end{array} \right) \tag {10} +$$ + +In this case the 2-permutation polytope in a regular 2D Euclidean space is the interval between points $(0,1)$ and $(1,0)$ . If we rescale any point on the polytope by $b > 0$ , then the absolute value of determinant is $b^2 |2\alpha - 1|$ . This implies that the absolute value of determinant is the product of rescaled point $b|2\alpha - 1|$ and $b$ . Since $b$ corresponds to an axis orthogonal to the polytope, we conclude that the contour of absolute value of determinant is a hyperbola rotated by $45^\circ$ . The contours of $\ell_2$ and entropy can be analogously obtained. + +The contours of three types of regularizers can be found in Figure 1. Serving as another regulator besides $\ell_{2}$ and + +![](images/679bdf853e334a02ac87b42e6ff0c22c75098f8cc8a3f4b425d34237fe5d8c41.jpg) +Figure 1. Contours of three regularization techniques on 2D Euclidean space. Black arrows indicate the contours of the regularization terms: entropy, $\ell_2$ norm $(\ell_2)$ and determinant (DET). The black dashed line refers to a 2-dimensional doubly stochastic polytope (DSP), where the discrete solutions lie on coordinates $(0,1)$ or $(1,0)$ . We see along with emphasizing the regularization weights, either term will push the solution to the discrete ones. However, in the deep interior of the DSP, determinant has much different behavior against the other two. + +entropy, we note that absolute determinant shows much different behavior than the other two. When the current solution is in the interior of the polytope and near to the point $\frac{1}{n}\mathbf{11}^{\top}$ , the gradients of $\ell_{2}$ and entropy are almost orthogonal to the polytope. In this case, the gradients of regularizers have no contribution to the update. However, absolute determinant has more effective gradient (almost in the polytope subspace) in the interior. This effectiveness also holds along with the solution path until polytope vertices, yielding contributing gradient in each iteration. + +Furthermore, it is a fact that $|\operatorname{det}(\mathbf{X})| > 0$ when $\mathbf{X}$ is strictly diagonal dominant (i.e. there exist an $i$ for each $j$ , such that $|\mathbf{X}_{ij}| \geq \sum_{k \neq i} \mathbf{X}_{kj}$ ). Thus for any (not necessarily doubly) stochastic matrix $\mathbf{Y}$ , strictly diagonal dominance implies there exist an $i$ such that $\mathbf{Y}_{ij} > 0.5$ for any $j$ . As for doubly stochastic matrix, there will be only one element larger than 0.5 in each column/row, which means there's no ambiguity. In this case, there exists a permutation $\mathbf{P}$ such that $\mathbf{P}\mathbf{X}\mathbf{P}^{\top}$ is diagonally dominant. We call such $\mathbf{X}$ doubly diagonally dominant. Conversely, if for any continuous solution $\operatorname{det}(\mathbf{X}) = 0$ , $\mathbf{X}$ cannot be doubly diagonally dominant, which implies ambiguity and is not of our interest. In general, larger determinant value of doubly stochastic solution implies less ambiguity, and a absolute determinant larger than 0 implies strong discriminativity to some extent ( $\mathbf{X}_{ij} > 0.5$ exists). + +# 4. Optimization Methods + +# 4.1. Path-following for solving Objective (4) + +Given objective (4), we devise a path-following-based method. Path-following, sometimes also called continuation method, is widely adopted in previous works on graph + +matching e.g. [49]. While the details differ, the common advantage of such strategy includes a guarantee on increasing objective score, as well as the optimum being a permutation, since a discrete solution is what we seek for the original problem. Another reason that we employ path-following rather than multiplication is that it is extremely difficult to find a theoretical ascending guarantee for the determinant-regularized model under multiplicative strategy. + +Such an algorithm requires the calculation of gradient of $\operatorname{det}(\mathbf{X})$ w.r.t. $\mathbf{X}$ involve a matrix inversion. However in practice, $\mathbf{X}$ is not necessarily invertible, especially in the early stage of optimization when $\mathbf{X}$ is deep in the interior of the permutation polytope. For the time being, we assume $\mathbf{X}$ is invertible, hence $\mathbf{X}^{-1}$ exists. We will discuss how to handle the case of low-rank $\mathbf{X}$ in the next section. + +Our path-following starts from an initial $\lambda_0 > 0$ . After a gradient-based algorithm finds the local optimum $\mathbf{X}_0^\mathcal{O}$ corresponding to $\lambda_0$ , it proceeds by amplifying the value with $\lambda_{t + 1} > \lambda_t$ and solves problem $\mathbb{P}_{\lambda_{t + 1}}$ for the next stage. In all the experiments we employ the amplifying procedure $\lambda_{t + 1} = 2\lambda_t$ . The gradient of (4) w.r.t. $\mathbf{X}$ is: + +$$ +\hat {\mathbf {X}} = 2 \mathbf {K} \mathbf {x} + \lambda \operatorname {s i g n} (\det (\mathbf {X})) \mathbf {X} ^ {- \top} \tag {11} +$$ + +Then the algorithm iterates by $\mathbf{X} = \mathbf{X} + \Delta \hat{\mathbf{X}}$ , where $\Delta > 0$ is a small increment. Likewise we need to project $\mathbf{X}$ back to the permutation polytope. Rather than Sinkhorn's algorithm [32], we employ a slightly revised projection method from [44] which manipulates columns and rows simultaneously. To this end, we first let $\mathbf{X}_{ij} = 0$ if $\mathbf{X}_{ij} < 0$ , then repeat the following projection: + +$$ +\mathbf {X} = \mathbf {X} + \frac {1}{n} \mathbf {1 1} ^ {\top} - \frac {1}{n} \mathbf {X} \mathbf {1 1} ^ {\top} - \frac {1}{n} \mathbf {1 1} ^ {\top} \mathbf {X} + \frac {1}{n ^ {2}} \mathbf {1 1} ^ {\top} \mathbf {X} \mathbf {1 1} ^ {\top} \tag {12} +$$ + +which theoretically ensures to converge to a point in the permutation polytope. This algorithm has fast convergence in practice (less than 10 iterations to an acceptable precision). + +# 4.2. Spectral Sub-gradient + +As discussed earlier, $\mathbf{X}$ is not necessarily invertible. In this case, the assumption of updating rule (11) no longer holds. This issue possibly happens when the current solution is close to the center of the polytope interior. One may imagine a naive replacement of matrix inversion with the pseudo-inversion, which can be applied on singular matrices. However, pseudo-inversion will keep the zero eigenvalues intact, and will not fulfill the purpose of maximizing the absolute determinant. + +To address this issue, we first diverge to look into the partial objective max $|\operatorname{det}(\mathbf{X})|$ . Since this partial term seeks to maximize the absolute determinant, any small value above 0 will be a proper increment on $|\operatorname{det}(\mathbf{X})|$ if the current determinant is 0. Thus any incremental direction in terms of + +Input: X; tolerance $\epsilon$ Output: sub-gradient $\bar{\mathbf{X}}$ 1 $\mathbf{U}\Lambda \mathbf{U}^{-1}\leftarrow \mathbf{X}$ (eigen-decomposition) 2 $\hat{\Lambda}\gets \Lambda$ 3 for $\forall i,|\Lambda_{ii}| < \epsilon$ do 4 if $\Lambda_{ii} = 0$ then 5 $\mid \hat{\Lambda}_{ii} = \epsilon$ 6 end 7 $\hat{\Lambda}_{ii} = \mathrm{sign}(\Lambda_{ii})\epsilon$ 8 end 9 $\mathbf{X}_u = \mathbf{U}\hat{\boldsymbol{\Lambda}}\mathbf{U}^{-1}$ 10 return $\bar{\mathbf{X}} = \mathbf{X}_u - \mathbf{X}$ + +Algorithm 1: Spectral sub-gradient for DetGM1. + +absolute determinant implies a proper "sub-gradient", and we can adopt such sub-gradient for update. To this end, we first perform eigen-decomposition on $\mathbf{X}$ : + +$$ +\mathbf {X} = \mathbf {U} \boldsymbol {\Lambda} \mathbf {U} ^ {- 1} \tag {13} +$$ + +where $\mathbf{U}$ is an orthogonal matrix containing both the basis of linear and null spaces and $\pmb{\Lambda}$ is the diagonal matrix with eigen-values in the magnitude descending order $(\sigma_{1},\dots,\sigma_{q},0,\dots,0)$ , $|\sigma_{t - 1}|\ge |\sigma_t|$ for any $t$ . Now we present two types of proper sub-gradients. + +# 4.2.1 Method Design by Increment Update: DetGM + +We employ a simple yet effective amplification procedure by letting any eigenvalue with magnitude smaller than a tolerance $\epsilon > 0$ to $\epsilon$ . The amplified eigenvalues become $(\sigma_{1}, \dots, \sigma_{s}, \mathrm{sign}(\sigma_{s+1})\sigma_{s+1}, \dots, \mathrm{sign}(\sigma_{r})\sigma_{r}, \epsilon, \dots, \epsilon)$ , where $s \leq q$ , $0 < |\sigma_{s+1}| < \epsilon$ , $|\sigma_{s}| \geq \epsilon$ , $\sigma_{r} \neq 0$ and $\sigma_{r+1} = 0$ in the original eigen-values and $q$ is the index of the first element which is negative value but with magnitude larger than $\epsilon$ . We add a tolerance $\epsilon$ to accommodate the calculating precision of float numbers. As such, each eigen-value is above 0, thus the determinant will not vanish. Let the diagonalized amplified eigenvalue matrix be $\hat{\Lambda}$ , then the modified matrix with small non-zero determinant can be written as: + +$$ +\mathbf {X} _ {u} = \mathbf {U} \hat {\boldsymbol {\Lambda}} \mathbf {U} ^ {- 1} \tag {14} +$$ + +Then the difference $\bar{\mathbf{X}} = \mathbf{X}_u - \mathbf{X} \approx \frac{\partial|\operatorname*{det}(\mathbf{X})|}{\bar{\mathbf{X}}}$ can be viewed as a proper ascending direction w.r.t. $\mathbf{X}$ , as by adding $\bar{\mathbf{X}}$ , $|\operatorname*{det}(\mathbf{X})|$ becomes above 0. This procedure is summarized in Algorithm 1. + +# 4.2.2 Method Design by Geometric Update: DetGM + +This line of sub-gradient is motivated by the geometric inequality $\frac{1}{n}\sum_{i}a_{i}\geq \sqrt[n]{\prod_{i}a_{i}}$ for $a_i\geq 0$ . It is easy to + +Input: X; tolerance $\epsilon$ ; step $\theta$ +Output: sub-gradient $\bar{\mathbf{X}}$ +1 UΛU-1← X (eigen-decomposition) +2 g← ∑i |Λii| +3 for i do +4 if Λii ≠ 0 then +5 | Γi← g/n sign(Λii) - Λii +6 else +7 | Γi← g/n +8 end +9 end +10 return $\bar{\mathbf{X}} \gets \theta \mathbf{U} \mathrm{diag}(\Gamma) \mathbf{U}^{-1}$ + +Algorithm 2: Spectral sub-gradient for DetGM $_2$ . + +show that $\prod_{i}a_{i}$ is concave in the affine subset $\sum_{i}a_{i} = d$ where $a_{i}\geq 0$ and $d > 0$ is a constant. The maximal value is reached if and only if $a_{i} = d / n$ for each $i$ . According to the concavity and the reachable maximum, it is easy to conclude that for any $0 < \theta < 1$ and the reweighted point $\mathbf{b} = (1 - \theta)\mathbf{a} + \theta \mathbf{m}$ , it has to be $\prod_{i}b_{i}\geq \prod_{i}a_{i}$ . Here $\mathbf{a} = (a_1,\dots,a_n)$ and $\mathbf{m} = (n / d,\dots,n / d)$ . Motivated by this observation, we devise another type of valid subgradient for absolute determinant in graph matching. + +To this end, we first calculate the summation of all the absolute eigen-values in $\pmb{\Lambda}$ as $g = \sum_{i}|\Lambda_{ii}|$ . $g$ is regarded as a constant. Then under fixed summation $g$ , the maximal determinant value can be achieved iff each eigen-value is equal to $g / n$ . Then we can calculate the gap $\Gamma = \mathbf{m} - \mathbf{a}$ between $\mathbf{m} = (g / n,\dots,g / n)$ and $\mathbf{a} = (\Lambda_{11},\dots,\Lambda_{nn})$ . To avoid the gradient to be too aggressive, we assign a small step $\theta$ to $\Gamma$ . Thus the sub-gradient is written as: + +$$ +\bar {\mathbf {X}} = \theta \mathbf {U} \operatorname {d i a g} (\boldsymbol {\Gamma}) \mathbf {U} ^ {- 1} \tag {15} +$$ + +This procedure is given in Algorithm 2. The main overhead for both algorithms lies in the eigen-decomposition, resulting in similar computational efficiency. + +# 5. Experiments + +All the experiments are conducted on a laptop with 3.0GHz CPU and 16GB memory. + +Datasets and metrics. Experiments involve both synthetic data and real-world images. The synthetic dataset is from the popular Random Graph Matching [8]. The real images include the CMU house sequence [3], Caltech101/MSRC object matching [8] and Pascal dataset [24]. For evaluation, accuracy, score and ratio are evaluated, where accuracy measures the portion of correctly matched nodes with respect to all nodes, score represents the value of the objective function and ratio emphasizes the ratio between current objective value and the maximal one. + +
MethodGAGMBGMRRWMBPF\( {\mathrm{{GGM}}}_{\mathrm{{lp}}} \)DetGM
Acc.73.6676.5672.9575.1476.6977.44
Ratio0.9330.9700.94610.9720.985
+ +Table 1. Accuracy (%) and ratio on Caltech-101 natural images. + +Compared Methods. Compared methods include Integer Projected Fixed Point (IPFP) [23], Graduated Assignment (GAGM) [16], Reweighted Random Walk (RRWM) [8], Binary-preserving Graph Matching (BGM) [18], and two very recent state-of-the-art solvers: Branching Path Following Matching (BPF) [40, 39] and Generalized Graph Matching (GGM) [43]. For GGM, we select the setting of $\mathbf{G}\mathbf{G}\mathbf{M}_{\mathrm{lp}}$ (refer [43] for more details). We term our method DetGM and DetGM for Sec. 4.2.1 and Sec. 4.2.2, respectively. In all experiments, all algorithms are initialized with a uniform matching. + +# 5.1. Results on Synthetic Data + +For each trial of the matching, a pair of graphs $G^{S}$ and $G^{D}$ is generated with $n_{in}$ inlier nodes on both, where we let $n_{in} = 40$ in all tests ( $n_{in} = 40$ is more challenging than a usual setting $n_{in} = 20$ such as in [8]). The attribute $\mathbf{a}_{ij}^{k}$ with $k \in \{S, D\}$ on edge is randomly generated from a multivariate uniform distribution ( $i = j$ and $i \neq j$ correspond to node and edge attributes, respectively). Attributes on graph $G^{D}$ are the copies of those on graph $G^{S}$ with Gaussian noise $\epsilon \sim \mathcal{N}(0, \delta)$ , namely $\mathbf{a}_{ij}^{D} = \mathbf{a}_{ij}^{D} + \epsilon$ . For a pair of edges ( $i, j$ ) in $G^{S}$ and ( $a, b$ ) in $G^{D}$ , the corresponding affinity is calculated as $\mathbf{A}_{ij:ab} = \exp(-|\mathbf{a}_{ij}^{S} - \mathbf{a}_{ab}^{D}|^2 / \sigma_s^2)$ , where $\sigma_s$ is a parameter and set to be 0.15 during all the synthetic tests. We conduct three types of empirical experiments with varying deformation noise $\epsilon$ , outlier count $n_{out}$ and edge density $\rho$ [8]. In each experiment, we independently conduct 200 times of the single trial and report the average accuracy and score (objective value). + +Figure 2 summarizes the synthetic experimental results. We see that $\mathrm{DetGM_1}$ and $\mathrm{DetGM_2}$ outperform all the selected algorithms in all settings. Particularly in the outlier test, the algorithms of DetGM significantly surpass both BPF and $\mathrm{GGM_{lp}}$ when there are massive outliers. We also observe that, though the objective scores of $\mathrm{DetGM_{1,2}}$ , BFP and $\mathrm{GGM_{lp}}$ are similar, there is a significant gap w.r.t. accuracy. This fact indicates again that the score may not necessarily reflect the true matching, which has also been pointed out in [41, 43]. $\mathrm{DetGM_{1,2}}$ , BPF and $\mathrm{GGM_{lp}}$ show similar performance in edge density test. + +Remarks IPFP, GAGM and RRWM are in the line of multiplication-based updating strategy, where in iteration the product between the affinity and the previous solution contributes most to the current solution. Instead, $\mathrm{DetGM}_{1,2}$ , BGM, BPF and $\mathrm{GGM}_{\mathrm{lp}}$ are gradient-based, which im + +plies these algorithms employ a much more cautious update in each iteration other than multiplication-based ones. While the performance of the two categories of updating strategies hardly differentiates when the number of nodes is small (up to 20 for inliers and 10 for outliers), which has been verified by multiple previous works [8, 18, 43], it can be concluded from our experiments that gradient-based methods have more stable performance compared with multiplication-based ones if number of nodes is large. We infer the reason of such phenomenon is as follows. With increasing problem dimension, the affinity matrix $\mathbf{A}$ tends to deliver more complex (2nd-order) local behavior, thus an aggressive update strategy such as multiplication will likely jump over previous local region and diverge to an inconsistent solution path. Besides, the convergence criterion of multiplicative strategy is typically due to the gap of two consecutive objective scores. When $\mathbf{A}$ is complex, with a higher probability an ascending gradient may still exist even if the gap is small. The aforementioned factors will result in weak solution. + +# 5.2. Results on Real-world Data + +CMU House and Hotel Sequence. CMU house sequence has 110 images in total. We follow the widely adopted protocol in [8] to conduct the test under varying sequence gap (10, 20, ..., 100), resulting in 560 image pairs. For each image, 30 landmark points are manually labelled. And for each pair of images, 10 landmarks are randomly removed from the first image. The graph is established with DeLaunay triangulation. The affinity is obtained as $\mathbf{K}_{ij:ab} = \exp(-|\mathbf{a}_{ij}^S - \mathbf{a}_{ab}^D|^2 / \sigma_s^2)$ , where $\mathbf{a}_{ij}^S$ measures the Euclidean distance between point $i$ and $j$ , and $\sigma_s^2 = 2500$ empirically. + +Typical matching example with BPF, $\mathrm{DetGM}_1$ and $\mathrm{DetGM}_2$ are shown in Figure 5, and we report accuracy in Figure 4. It can be observed that in both settings of the proposed algorithm can reach out competitive performance against state-of-the-art algorithms BPF and $\mathrm{GGM}_{\mathrm{lp}}$ , and significantly outperforms the resting algorithms in accuracy. The two settings $\mathrm{DetGM}_1$ and $\mathrm{DetGM}_2$ show very similar performance in CMU house and synthetic tests, indicating both of the updating rules are valid and the corresponding solution paths do not diverge much. For the rest if the experiments, we only report the behavior of $\mathrm{DetGM}_1$ due to their high similarity while abbreviating it as DetGM. + +Caltech-101. It [8] consists of 30 pairs of images from Caltech-101 [14] and $\mathrm{MSRC^2}$ . The features points are generated by MSER detector [28] and each point is assigned its SIFT feature [27]. The candidate matchings are selected by comparing the feature distance with a threshold 0.6, which + +![](images/ddb2e89480657868f6a6f1fe6cc560cfddee23a477af3793b264df4107b85d47.jpg) + +![](images/966fc8558d9d730e1204f320580de626dfce176934eb665aa9850b8ec02ca952.jpg) + +![](images/444159379b5a86b5748c920769bb2f4af14bd94560439f99ce4ba168a94b53b8.jpg) + +![](images/39a4ba99aef5562df65bdffe28fb48021c83152b8195c8b8afcfba52ba08fce0.jpg) + +![](images/67fff705e71d3d8acd721457166b4758fb4d0fd2351f9ed3acbe6a343b1a20c7.jpg) + +![](images/3ebb396942b06e460468a5e6bafa436a53a4735be093853661589dbd0f727044.jpg) +Figure 2. Accuracy and objective score on synthetic data by varying deformation, outlier count and edge density. Zoom-in for better view. + +![](images/16e5b022bbc704f9fd18ebdcd755311d84d30397b80a50133c5b12ec289e20d2.jpg) +Figure 3. Accuracy, score ratio and average running time on Pascal dataset by varying the number of outliers. + +![](images/6adf8a33b935325ba57e6673714c145b2cd38d6e11de75ec4c22e42f16350dc4.jpg) + +![](images/df8704fc7aca336d899a742a9a099ddb3bbf1626fd216072227fdde9877fa0c0.jpg) + +![](images/02dddae762ed4ca50ab6e5d12b00372fdbe45688cbeaba55d529c7d09fa868b6.jpg) +Figure 4. Accuracy on CMU house by varying the sequence gap, for two graphs with 20 and 30 nodes respectively. + +allows multiple correspondences for each feature. The dissimilarity between a candidate pair $(i,j)$ and $(a,b)$ is obtained with $\mathbf{K}_{ij:ab} = \max (50 - d_{ij:ab},0)$ where $d_{ij:ab}$ refers to the mutual projection error [7]. + +Results are reported in Table 1 and matching examples are shown in Figure 6. One can see that our method outperforms the peers including most up-to-date BPF and $\mathrm{GGM_{lp}}$ . + +Pascal Dataset. Pascal dataset [24] consists of 20 pairs of motorbike images and 30 pairs of car images collected from Pascal07 dataset [13]. For each image pair, feature points and corresponding ground-truth correspondence are manually labelled. We follow the popular protocol [49] to randomly select 0 to 20 outliers from the background to evaluate the algorithms under degradation. We follow [49] to generate the graph and the corresponding affinity. For each node $i$ , a feature $\mathbf{f}_i$ is assigned by taking its orientation of the normal vector at that node to the contour where the point was sampled. Then the node affinity between node $i$ and $j$ is computed as $\exp(-|\mathbf{f}_i - \mathbf{f}_j|)$ . Delaunay triangulation is performed to obtain the graphs, and pairwise distance $d_{ij}$ and absolute angle $\theta_{ij}$ are calculated on any valid edge $(i,j)$ . Thus the affinity between edge $(i,j)$ in $G^S$ and edge $(a,b)$ in $G^D$ is $\mathbf{K}_{ij:ab} = \exp(-(|d_{ij}^S - d_{ab}^D| + |\theta_{ij}^S - \theta_{ij}^D|)) / 2$ . + +Figure 7 presents an example of matching results on 6 counterparts and Figure 3 shows the quantitative results of the experiments. We also present time cost comparison against two typical solvers: RRWM and BPF. It can be seen that our algorithm achieves competitive performance + +![](images/f659dc2d25f98484aa2bf050b404f84de7dba2dc28a84b8f090a2102862de332.jpg) +(a) BPF: 13/20 + +![](images/7d547bec5bd6904d9c32f68b9646f3eda0f29a3017a3cd70f2c0ae206dcd6574.jpg) +(b) DetGM1: 17/20 + +![](images/4d0a51ac2a7c730959f06cdad7f9fde24f0170233fe70a7cda383c662f4750e4.jpg) +(c) DetGM2: 17/20 + +![](images/416efd6ea050aa7bca5bceadaee087b656c4eee8dafe9f2427c0d8aea70c2808.jpg) +(a) Original image pair + +![](images/c03e3071bc5688de2a8b6d9468b332900e1253f6804ceba3680f2b94337498ee.jpg) +(c) RRWM: 32/40 + +![](images/39959a2f42f73ecb599c079aa277f6d85779b24395deaa02ee7780c88eef604f.jpg) +Figure 5. Matching examples on CMU house dataset with 20 and 30 nodes for each graph respectively. Correct matchings are in green +(e) $\mathrm{GGM_{lp}}$ : 35/40 + +![](images/fb2cc3c7968589c5f7e0021b4a3a4e685259fce7e82381226e3857267225259e.jpg) +(b) GAGM: 20/40 + +![](images/6a232e1111ab9b69f4d6c7c065396fa04cbf9973ef84ea26865b676b0c0029a9.jpg) +(d) BPF: 35/40 + +![](images/e2e074e12c062604f981923614f1976ff76cb62ee241ca6b6838279583368222.jpg) +(f) DetGM: 36/40 + +![](images/d7268d3e5fc34d86efa57196b3f49d2ef17993849819ae14ef52229a81663e95.jpg) +Figure 6. Examples on Caltech-101 dataset with 40 nodes on a pair of face images. Correct matchings are in yellow. + +![](images/4e9049822db781b9d9fee7a5762f7cd104a29270b6a952ab6d66a93d92e29af7.jpg) +(c) RRWM: 18/30 + +![](images/751ec3126d70c9d714577052170e2931ffaaa9b502b281d354ee65b43cd9c159.jpg) +(e) $\mathrm{GGM_{lp}}$ 20/30 + +![](images/540c5162dece2fa35db2f96d1830e961b86e5033d123298a58ace7f497e0411b.jpg) +(a) IPFP: 6/30 +(b) GAGM: 18/30 +Figure 7. Examples on Pascal dataset with 30 inliers and 12 outliers on a pair of motorbike images. Correct matchings are in green. + +![](images/811db38f302846f8e25fe731e5cf49b79be1f46118775f18ba51ef69f602c15c.jpg) +(d) BPF: 20/30 + +![](images/61103d0b00e5c9564b720d527d0da4a1c1f859ead37e2c64074e1148b0816daa.jpg) +(f) DetGM: 24/30 + +against BPF and $\mathrm{GGM}_{\mathrm{lp}}$ and outperforms them in some specific outlier settings. It should also be noted that, though BPF achieves high accuracy, the running speed of BPF is extremely slow. From the third subfigure of Figure 3, we can find that in a typical setting with 20 outliers, BPF costs over 2,000 seconds to finish one trial in average. However, our algorithm only need around 60 seconds in average. Though RRWM has higher efficiency, our algorithm still shows moderate computational cost in practical use. + +# 6. Conclusion + +To enable gradient-efficient continuation optimization, the paper has presented a novel regularization technique for graph matching, as derived from the determinant analysis on the node matching matrix between two graphs. Theoretical property of our relaxation technique is studied and + +we also give some analysis on the geometric behavior compared to existing regularizers, which has rarely been considered. These findings are anticipated to bring about insights to other regularized objective with affine constraints. Extensive experiments are performed which show the state-of-the-art accuracy as well as efficiency of our method. + +# Acknowledgement + +Tianshu Yu and Baoxin Li were supported in part by a grant from ONR. Any opinions expressed in this material are those of the authors and do not necessarily reflect the views of ONR. Junchi Yan was partially supported by China Major State Research Development Program 2018AAA0100704, NSFC (61972250, U19B2035), and the Open Project Program of the National Laboratory of Pattern Recognition (NLPR), China. + +# References + +[1] K. Adamczewski, Y. Suh, and K. Lee. Discrete tabu search for graph matching. In ICCV, 2015. +[2] Florian Bernard, Christian Theobalt, and Michael Moeller. Ds*: Tighter lifting-free convex relaxations for quadratic matching problems. In CVPR, 2018. +[3] T. Caetano, T. Caelli, D. Schuurmans, and D. Barone. Graphical models and point pattern matching. TPAMI, 28(10):1646-1663, 2006. +[4] T. Caetano, J. McAuley, L. Cheng, Q. Le, and A. J. Smola. Learning graph matching. TPAMI, 31(6):1048-1058, 2009. +[5] M. Chertok and Y. Keller. Efficient high order matching. TPAMI, 2010. +[6] M. Cho, K. Alahari, and J. Ponce. Learning graphs to match. In ICCV, 2013. +[7] Minsu Cho, Jungmin Lee, and Kyoung Mu Lee. Feature correspondence and deformable object matching via agglomerative correspondence clustering. In ICCV, 2009. +[8] M. Cho, J. Lee, and K. M. Lee. Reweighted random walks for graph matching. In ECCV, 2010. +[9] T. Cour, P. Srinivasan, and J. Shi. Balanced graph matching. In NIPS, 2006. +[10] X. Du, J. Yan, and H. Zha. Joint link prediction and network alignment via cross-graph embedding. In IJCAI, 2019. +[11] O. Duchenne, F. Bach, I. Kweon, and J. Ponce. A tensor-based algorthm for high-order graph matching. TPAMI, 2011. +[12] O. Duchenne, A. Joulin, and J. Ponce. A graph-matching kernel for object categorization. In ICCV, 2011. +[13] M. Everingham, L. Van Gool, C. K. Williams, J. Winn, and A. Zisserman. The pascal visual object classes challenge 2007 (voc2007) results. 2007. +[14] L. Fei-Fei, R. Fergus, and P. Perona. Learning generative visual models from few training examples: An incremental bayesian approach tested on 101 object categories. CVU, 106(1):59–70, 2007. +[15] A. M. Fink. Hadamard's inequality for log-concave functions. Mathematical and Computer Modelling, 32(5-6):625-629, 2000. +[16] S. Gold and A. Rangarajan. A graduated assignment algorithm for graph matching. TPAMI, 1996. +[17] B. Jiang, J. Tang, C. Ding, Y. Gong, and B. Luo. Graph matching via multiplicative update algorithm. In NIPS, 2017. +[18] Bo Jiang, Jin Tang, Chris Ding, and Bin Luo. Binary constraint preserving graph matching. In CVPR, 2017. +[19] V. G. Kim, W. Li, N. J. Mitra, S. DiVerdi, and T. Funkhouser. Exploring collections of 3d models using fuzzy correspondences. In SIGGRAPH, 2012. +[20] J. Lee, M. Cho, and K.M. Lee. A graph matching algorithm using data-driven markov chain monte carlo sampling. In ICPR, 2010. +[21] J. Lee, M. Cho, and K. M. Lee. Hyper-graph matching via reweighted randomwalks. In CVPR, 2011. +[22] M. Leordeanu and M. Hebert. A spectral technique for correspondence problems using pairwise constraints. In ICCV, 2005. + +[23] M. Leordeanu, M. Hebert, and R Sukthankar. An integer projected fixed point method for graph matching and map inference. In NIPS, 2009. +[24] M. Leordeanu, R. Sukthankar, and M. Hebert. Unsupervised learning for graph matching. Int. J. Comput. Vis., pages 28-45, 2012. +[25] M. Leordeanu, A. Zanfir, and C. Sminchisescu. Semi-supervised learning and optimization for hypergraph matching. In ICCV, 2011. +[26] Z.Y. Liu, H. Qiao, and L. Xu. An extended path following algorithm for graph-matching problem. TPAMI, pages 1451-1456, 2012. +[27] D. G. Lowe. Object recognition from local scale-invariant features. In ICCV, page 1150, 1999. +[28] J. Matas, O. Chum, M. Urban, and T. Pajdla. Robust wide-baseline stereo from maximally stable extremal regions. Image and vision computing, 22(10):761-767, 2004. +[29] J. Munkres. Algorithms for the assignment and transportation problems. Journal of the Society for Industrial & Applied Mathematics, 5(1):32-38, 1957. +[30] Q. Ngoc, A. Gautier, and M. Hein. A flexible tensor block coo rd inate ascent scheme for hypergraph matching. In CVPR, 2015. +[31] C. Schellewald and C. Schnorr. Probabilistic subgraph matching based on convex relaxation. In EMMCVPR, 2005. +[32] R. Sinkhorn. A relationship between arbitrary positive matrices and doubly stochastic matrices. The annals of mathematical statistics, 35(2):876-879, 1964. +[33] Y. Suh, M. Cho, and K. M. Lee. Graph matching via sequential monte carlo. In ECCV, 2012. +[34] Paul Swoboda, Carsten Rother, Hassan Abu Alhaija, Dagmar Kainmuller, and Bogdan Savchynskyy. A study of lagrangean decompositions and dual ascent solvers for graph matching. In CVPR, 2017. +[35] Y. Tian, J. Yan, H. Zhang, Y. Zhang, X. Yang, and H. Zha. On the convergence of graph matching: Graduated assignment revisited. In ECCV, 2012. +[36] P. H. S. Torr. Solving markov random fields using semidefinite programmin. In AISTATS, 2003. +[37] L. Torresani, V. Kolmogorov, and C. Rother. Feature correspondence via graph matching: Models and global optimization. In ECCV, 2008. +[38] R. Wang, J. Yan, and X. Yang. Learning combinatorial embedding networks for deep graph matching. In ICCV, 2019. +[39] T. Wang, H. Ling, C. Lang, and S. Feng. Graph matching with adaptive and branching path following. TPAMI, 40(12):2853-2867, 2018. +[40] T. Wang, H. Ling, C. Lang, and J. Wu. Branching path following for graph matching. In ECCV, 2016. +[41] J. Yan, M. Cho, H. Zha, X. Yang, and S. Chu. Multi-graph matching via affinity optimization with graduated consistency regularization. TPAMI, 2016. +[42] J. Yan, C. Zhang, H. Zha, W. Liu, X. Yang, and S. Chu. Discrete hyper-graph matching. In CVPR, 2015. +[43] T. Yu, J. Yan, Y. Wang, W. Liu, and B. Li. Generalizing graph matching beyond quadratic assignment model. In NIPS, 2018. + +[44] T. Yu, J. Yan, J. Zhao, and B. Li. Joint cuts and matching of partitions in one graph. In CVPR, 2018. +[45] A. Zanfir and C. Sminchisescu. Deep learning of graph matching. In CVPR, 2018. +[46] M. Zaslavskiy, F. R. Bach, and J.-P. Vert. A path following algorithm for the graph matching problem. TPAMI, 2009. +[47] R. Zass and A. Shashua. Probabilistic graph and hypergraph matching. In CVPR, 2008. +[48] Zhen Zhang, Qinfeng Shi, Julian McAuley, Wei Wei, Yan-ning Zhang, and Anton Van Den Hengel. Pairwise matching through max-weight bipartite belief propagation. In CVPR, 2016. +[49] F. Zhou and F. D. Torre. Factorized graph matching. In CVPR, 2012. +[50] F. Zhou and F. D. Torre. Deformable graph matching. In CVPR, 2013. \ No newline at end of file diff --git a/determinantregularizationforgradientefficientgraphmatching/images.zip b/determinantregularizationforgradientefficientgraphmatching/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..3c2ce974dd747c1eb5b7cb97f42342c6f7bd1fe4 --- /dev/null +++ b/determinantregularizationforgradientefficientgraphmatching/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6028288e2b5de205294eace376da2d4a1badf45cdd9438ddcb0b70957edac4f7 +size 631577 diff --git a/determinantregularizationforgradientefficientgraphmatching/layout.json b/determinantregularizationforgradientefficientgraphmatching/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c67d5e1d9871f141293511177cb4110b3385831c --- /dev/null +++ b/determinantregularizationforgradientefficientgraphmatching/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec61351cd40ff1f9c8940cf8dc4c0af7c6b2496fc54f354cb18d9bd9e6724d3e +size 560941 diff --git a/differentiableadaptivecomputationtimeforvisualreasoning/918dd22d-8392-4d52-94c7-e7da48c435dd_content_list.json b/differentiableadaptivecomputationtimeforvisualreasoning/918dd22d-8392-4d52-94c7-e7da48c435dd_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..b789bb03e8ec75dea05a3454f121a85610c2ee15 --- /dev/null +++ b/differentiableadaptivecomputationtimeforvisualreasoning/918dd22d-8392-4d52-94c7-e7da48c435dd_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:accdf2ead4b86b93f12ad64e6a11c6504f53c5f3f00423c3934bb9941a69c5a3 +size 65262 diff --git a/differentiableadaptivecomputationtimeforvisualreasoning/918dd22d-8392-4d52-94c7-e7da48c435dd_model.json b/differentiableadaptivecomputationtimeforvisualreasoning/918dd22d-8392-4d52-94c7-e7da48c435dd_model.json new file mode 100644 index 0000000000000000000000000000000000000000..13ad98dd9b262cfdb270d5994555ccf98b75640e --- /dev/null +++ b/differentiableadaptivecomputationtimeforvisualreasoning/918dd22d-8392-4d52-94c7-e7da48c435dd_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:968e3d6574d2a4d2342deb7dac484eb3c6c9e2e9b4cc77a91c0d8688573ec6be +size 77551 diff --git a/differentiableadaptivecomputationtimeforvisualreasoning/918dd22d-8392-4d52-94c7-e7da48c435dd_origin.pdf b/differentiableadaptivecomputationtimeforvisualreasoning/918dd22d-8392-4d52-94c7-e7da48c435dd_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fefed7dbeb37c0225ad5297a8bb7a48152bac82f --- /dev/null +++ b/differentiableadaptivecomputationtimeforvisualreasoning/918dd22d-8392-4d52-94c7-e7da48c435dd_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97ff158b9ae891b0d634ee7b89bbc119620f06bf7f24d772ce4705d5b096e844 +size 1023181 diff --git a/differentiableadaptivecomputationtimeforvisualreasoning/full.md b/differentiableadaptivecomputationtimeforvisualreasoning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..2bc82beaaa779bb5258f7d9b4cbf79532a200f39 --- /dev/null +++ b/differentiableadaptivecomputationtimeforvisualreasoning/full.md @@ -0,0 +1,256 @@ +# Differentiable Adaptive Computation Time for Visual Reasoning + +Cristóbal Eyzaguirre and Álvaro Soto Pontificia Universidad Católica de Chile + +ceyzaguirre4@uc.cl, asoto@ing.puc.cl + +# Abstract + +This paper presents a novel attention-based algorithm for achieving adaptive computation called DACT, which, unlike existing ones, is end-to-end differentiable. Our method can be used in conjunction with many networks; in particular, we study its application to the widely know MAC architecture, obtaining a significant reduction in the number of recurrent steps needed to achieve similar accuracies, therefore improving its performance to computation ratio. Furthermore, we show that by increasing the maximum number of steps used, we surpass the accuracy of even our best non-adaptive MAC in the CLEVR dataset, demonstrating that our approach is able to control the number of steps without significant loss of performance. Additional advantages provided by our approach include considerably improving interpretability by discarding useless steps and providing more insights into the underlying reasoning process. Finally, we present adaptive computation as an equivalent to an ensemble of models, similar to a mixture of expert formulation. Both the code and the configuration files for our experiments are made available to support further research in this area. + +# 1. Introduction + +In the past few years, deep learning (DL) techniques have achieved state-of-the-art performance in most, if not all, computer vision tasks [17, 21, 8, 10]. While these methods are powerful in terms of representational capacity, they lack a suitable mechanism to allocate computational resources according to the complexity of each particular inference. In effect, most popular DL based models used in computer vision applications, such as CNN [18], RNN [18], Transformer [24], and MAC [10] have a fixed processing pipeline whose depth is independent of the complexity of the current input/output relation. + +The drawbacks associated with the use of a fixed processing pipeline can be illustrated by considering tasks that require a complex sequential inference. This is the case of new Visual Question Answering (VQA) scenarios that have + +![](images/45afaecbb799d987c7dbeef304b21cc6f7cd3300891296a4787236f69ca17bcc.jpg) +Q: What shape is the red thing? +A: Cube + +![](images/927be6f7e7010a931887cd44e0067f86fb8dd956fc3580cce4f9138379bde1ce.jpg) +Q: There is a large ball that is on the right side of the rubber sphere that is behind the tiny cyan object on the left side of the large green matte thing; what is its color? A: Blue +Figure 1. Examples of questions in the CLEVR [15] dataset that show a significant variation in the number of reasoning steps that are needed to answer them correctly. + +been recently proposed to support research in the area of visual reasoning, such as the CLEVR and GQA datasets [15, 11]. These datasets pose challenging natural language questions about images whose solution requires the use of perceptual abilities, such as recognizing objects or attributes, identifying spatial relations, or implementing high-level capabilities like counting. As an example, Figure 1 shows two instances from the CLEVR dataset [15]. In this case, each visual question entails a different level of complexity to discover the correct answer. Specifically, while the first question involves just the identification of a specific attribute from a specific object, the second question requires the identification and comparative analysis of several attributes from several objects. Despite this significant difference, current visual reasoning models use the same processing pipeline to answer both questions. + +From the previous example, it is possible to foresee that computational efficiency, at training and inference time, is a relevant disadvantage of using a fixed processing pipeline. In effect, the usual goal of a DL model is to maximize accuracy, and as a consequence, the model is forced to calibrate its processing structure according to the most com + +plex cases, overestimating the computational load needed to solve easier ones. This lack of computational efficiency not only causes longer processing times, but it also has major implications in terms of the environmental impact of AI technologies, a problem that is gaining considerable attention [23, 22]. As an example, [23] provides an estimation of the carbon footprint of several NLP models, concluding that current AI models are becoming environmentally unfriendly. This stresses the need to provide current DL models with a suitable adaptive mechanism to control the computational effort needed to generate each inference. Furthermore, besides computational efficiency, as we show in this work, the use of an adaptive processing pipeline might also play an important role in improving the overall accuracy of a model and to improve its interpretability. + +The previous argumentation highlights the need for suitable mechanisms to control computational complexity in DL models; however, so far, research in this area has been limited. Soft attention [2] and skip connection mechanisms [9] appear as possible options to improve the efficiency of current DL architectures. These strategies, however, do not allow to save computation, as they still require executing the full processing pipelines to select attention areas or skip connections. Modular approaches are also an option [1, 16]. In this case, from a collection of specialized processing modules, a controller or program generator adaptively selects on the fly a suitable configuration to handle each query. Unfortunately, this strategy does not scale appropriately with the number and diversity of modules needed to solve a task, which are usually limited to a fixed predefined collection. As an alternative, instead of using specialized modules, recent approaches use a general-purpose neural module that is applied sequentially to the input [10, 12]. In this case, each step in the sequence is expected to execute an operation necessary to arrive at the correct answer. The specification of the number of steps needed to answer each question, however, is non-trivial, so these models usually fix this value using a hyper-parameter for the whole model. + +In a seminal paper [7], Graves introduces Adaptive Computation Time, ACT, an algorithm to adaptively control computational complexity for Recurrent Neural Networks (RNN). The key idea behind ACT is to add a sigmoidal halting unit to an RNN that, at each inference step, determines if the RNN should stop or continue its processing. As an extra role, the activation values of the halting unit are also used to ensemble the final output of the model as a weighted sum of intermediate states. [7] demonstrates the advantages of ACT by showing its impact on improving the computational efficiency of RNN models on several synthetic tasks. Posterior works have also shown the advantages of ACT when it is applied in real-world scenarios, in the context of language modeling [5, 19] and image understanding [19]. + +Despite this success, as we show in this work, ACT suffers from instability problems to find a suitable number of steps to stop processing. We believe that this is due to its non-differentiable nature as ACT achieves halting by forcing the sum of the weights used to ensemble the final output be equal one by using a non-differentiable piecewise function. + +Motivated by the evident advantages that a mechanism such as ACT might provide to modern module networks, we propose a new approach to adaptive computation based on a novel attention-based formulation. As key insights, this mechanism addresses two main problems of ACT: i) Its non-differentiability and ii) The assumption that the hidden states of recurrent architectures can be linearly combined. Our approach overcomes the non-differentiable operation in ACT by using a halting unit to calculate, at each step, a running approximation of the final output of the model. This approximation leads to a monotonically decreasing probability distribution over all the outputs that implicitly includes a residual estimation of the benefits of continuing the processing steps. This allows us to calculate an upper bound for the future gain provided by subsequent outputs of the model. The result is a fully differentiable model that can be trained using gradient descent whose computation can be reduced by mathematically determining when an interruption of the processing pipeline does not harm its final performance. Finally, in our formulation, we also formalize adaptive computation as a gate-controlled bucket of models that resembles the operation of a mixture of experts model [13]. + +As a testbed for our formulation, we choose the MAC network [10], an architecture that is gaining considerable attention for solving tasks that require visual reasoning. We highlight, however, that our mathematical formulation is highly general, and that it can also be applied to other learning architectures. Our main results indicate that using the proposed method for adaptive computing achieves better performance than the same architecture with a comparable fixed computational cost. Remarkably, the resulting models learn subjacent patterns in the data, as shown by the strong correlation between the number of steps executed on inferences and the template used to generate it, correlations which we then exploit to improve the interpretability of the model. All this stands in stark contrast to the results obtained from the use of ACT, which fails to improve results or even meaningfully adapt the number of steps. + +In summary, the main contributions of this work are: (i) A novel formulation of an adaptive computational mechanism that is fully differentiable and it can be incorporated to current DL based models, such as MAC network; (ii) A comparative analysis of the performance of our proposed method and ACT, demonstrating the superior performance of the first; (iii) An extensive experimental evaluation demonstrating that the use of our adaptive computa + +tional mechanism on top of the MAC network can increase not only computational efficiency but also performance and interpretability of the resulting model. + +# 2. Related work + +Recent works have pointed out the need to improve the computational efficiency of DL models [23, 22]. As an example, [23] shows a surprising estimation related to the high carbon footprint of current DL techniques. Similarly, [22] argues about the relevance of including computational efficiency as an evaluation criterion for research and applications related to artificial intelligence. In spite of this increasing need, research to improve computational efficiency of DL models is still limited. + +In terms of deep convolutional models, there have been works that attempt to control the depth of these models, however, the main focus has been on improving accuracy but not computational efficiency. As an example, approaches such as skip connections [9] still require to compute a full model. Compact CNN models have also been explored in the context of visual recognition [26, 25, 4]. As an example, sparsity constraints have been used to control the total number of active parameters in a network [4]. This is an effective strategy to reduce the computational complexity of a model, however, it consists of a global constraint that does not adapt dynamically to each input. Attention mechanisms appear as an attractive option to focus computation in relevant information areas of the input, however, current attention techniques, such as soft-attention [2] or self-attention [24], focus also on performance, requiring to execute the full processing pipeline. + +In the context of recurrent networks, Graves proposes ACT [7], an algorithm designed to provide a RNN with a mechanism to dynamically adapt computational complexity. Specifically, ACT attempts to dynamical allocate the proper amount of computation for each particular input sample. The main challenge is that the complexity of each input is unknown before attempting to build a suitable output. ACT handles this issue by adding a halting unit whose activation determines if the RNN should stop or continue with another processing step. These activation values are then used to construct the models final output, as a weighted sum of intermediate states of all previous recurrent steps. This is performed through a series of non-differentiable operations mainly used to enforce a hard limit so that no subsequent iteration changes the model output. As we show in this work, this results in noisy gradients that do not handle properly the information about the number of processing steps being used. + +In spite of its limitations, ACT has been applied to multiple tasks beyond the synthetic cases reported in the original work [7]. It has been used to improve results on the LAMBADA language modeling dataset using a Universal + +Transformer architecture [5], achieving a new state-of-the-art performance. Also, on the challenging task of character level language modeling, it has been used to dynamically increase the attention span of a Transformer model, achieving state-of-the-art performance on the text8 and enwiki8 datasets. Furthermore, on the natural language reasoning corpus SNLI dataset, it has been reported to boost performance and interpretability [19]. In terms of visual recognition, [6] proposes a DL architecture based on residual networks that uses ACT to dynamically choose the number of executed layers for different pre-defined regions in the input image. [6] applies this strategy to the case of visual classification, reporting improving performance in terms of computational efficiency and model interpretability. + +Our approach to adaptive computation has substantial differences with respect to ACT. ACT achieves halting by forcing that the weights used to combine each step's output into the final answer sum exactly one. To attain this behavior a non-differentiable piecewise function is used, namely: if the sum of the weights is more than one, then change the last weight so that the sum is exactly one. In contrast, our approach maintains the full gradient by only halting during evaluation (and not during training). The weights used to combine all the step output's are described by a monotonically decreasing probability distribution that implicitly includes future steps yet to be computed. The result is a fully differentiable model for training with gradient descent whose computation can be reduced during inference by mathematically determining when the interruption cannot change the output. + +In terms of modular networks, existing approaches can be divided into those that combine multiple specialized modules [1, 16], and those that use a single general purpose module [10, 12]. In the case of specialized modules, the generation of the sequences required costly supervision or elaborate reinforcement learning training schemes. In the case of a general purpose module, the selection of the module to execute is trivial (only one), however, the number of steps to apply this module cannot be determined for each sample, instead its value is fixed as a hyper-parameter. In this work, we build upon these networks by replacing this fixed hyper-parameter by an adaptive approach to select the horizon of the computational pipeline. + +# 3. Differentiable Adaptive Computation Time + +In this section, we present our method to implement a Differentiable Adaptive Computation Time strategy (DACT). Our formulation can be applied to any model or ensemble that can be decomposed as a series of modules or submodels $m_{n}$ , $n \in [1, \dots, N]$ that can be ordered by complexity. For example, recurrent networks are composed by iterative steps, CNNs by residual blocks, and ensembles by smaller models. We refer to the composition as our final + +![](images/7e1ec84df3cfa3ca65732dde790b4d0301ed7f4d4cd6ae2413d3120510b6b40b.jpg) +Figure 2. The accumulated output $a_{n}$ is built by linearly combining $a_{n-1}$ with the output of the $n$ th model (following Equation 2). Each step can limit the contribution of future steps by maintaining or reducing the value of the scalar $p_{n-1}$ used for the linear combination (illustrated with a dotted line). Any $h_{n}$ valued roughly zero will force $p_{n}$ to this value, effectively disallowing the outputs of future models from altering the current accumulated output, and effectively imposing that this $a_{n}$ become the final output $Y$ . + +model or ensemble $M$ , and to its output as $Y$ . + +In the context of VQA, $m_{n}$ receives as an input question $Q$ and image $I$ , as well as any relevant representation from a previous submodel $m_{r}$ , $r < n$ . Each submodel $m_{i}$ should produce its own prediction $y_{n}$ about the correct answer to $Q$ . Additionally, each submodel $m_{n}$ should also produce a sigmoidal output $h_{n} \in [0,1]$ that represents how uncertain is $m_{n}$ about the correctness of its output $y_{n}$ , where we define the initial value $h_0 = 1$ . + +The use of scalars $h_n$ is the main mechanism to provide $M$ with an adaptive computation mechanism. The key idea is to restrict models with higher index $s > n$ from altering the final answer of $M$ once the current uncertainty about the correct answer is below a target level. With this goal in mind, let define: + +$$ +p _ {n} = \prod_ {i = 1} ^ {n} h _ {i} = h _ {n} p _ {n - 1} \tag {1} +$$ + +The value of $p_n$ can be interpreted as the probability that a subsequent submodel $m_s$ , $s > n$ might change the value of the final answer $Y$ of the ensemble $M$ . Consequently, we define the initial value $p_0 = 1$ . + +According to the previous formulation, $h_n$ represents the uncertainty of submodel $m_n$ , while $p_n$ represents the uncertainty of the full ensemble considering the first $n$ models. From Eq. (1), it is easy to see that the values of $p_n$ are monotonically decreasing with respect to index $n$ . Also, notice that a small value of $h_n$ forces the future values of $p_n$ to be close to 0. + +We still need to describe how to combine all intermediate outputs $y_{n}$ ( $n \in [1, \dots, N]$ ) to form $Y$ . We achieve this by defining auxiliary accumulator variables $a_{n}$ which contain the ensemble's answer up to step $n$ . By using Eq. 1, we can construct $a_{n}$ in such a manner that for some step $n$ with a low associated $p_{n}$ then $a_{n} \approx Y$ : + +$$ +a _ {n} = \left\{ \begin{array}{l l} \overrightarrow {0} & \text {i f} n = 0 \\ y _ {n} p _ {n - 1} + a _ {n - 1} (1 - p _ {n - 1}) & \text {o t h e r w i s e} \end{array} \right. \tag {2} +$$ + +It follows from this definition that $Y$ can always be rewritten as a weighted sum of intermediate outputs $y_{n}$ . Additionally, the sum of the weights is always equal to 1, thus describing a valid probability distribution over the intermediate outputs $y_{n}$ . Both proofs are included in supplementary material. + +Therefore, by describing what is effectively a pair-wise linear interpolation, we obtain a method for implicitly attending the outputs of each model in the ensemble, including succeeding ones. In this manner, what we propose is essentially a mixture of experts type ensemble [14] where we remove the controller and replace the gating model for the implicit distribution described above. As a main result, by adding probabilities instead of hidden values as in ACT, we remove the assumption of ACT that the hidden states of the underlying RNN are approximately linear. + +No restriction is placed on whether two models in the ensemble can communicate so long as the origin of the exchange is always before in the ordered model sequence as is always the case with recurrent architectures. + +# 3.1. Penalizing complexity + +Following the principle of Ockham's razor, we wish to reduce complexity when it is not needed by choosing simpler models in lieu of more complex ones when both provide similar results. To achieve this, we define the ponder cost $\rho$ as: + +$$ +\rho = \sum_ {n = 1} ^ {N} p _ {n} \tag {3} +$$ + +By adding the ponder cost to the loss function $L$ we encourage the network to minimize the contribution of more complex models. This is used in the next section 3.2 to reduce computation. + +$$ +\hat {L} (\boldsymbol {x}, \boldsymbol {y}) = L (\boldsymbol {x}, \boldsymbol {y}) + \tau \rho (\boldsymbol {x}) \tag {4} +$$ + +where $\tau$ is the time penalty, a hyper-parameter used to moderate the trade-off between complexity and error. + +# 3.2. Reducing computation time + +The previous formulation allows us to train a model incorporating the DACT methodology. In other words, we modify the training process of the model to allow simpler models to cap the maximum impact of all subsequent ones (equations 1 and 2). As a consequence, we can avoid running more complex models when they cannot significantly change the final output $Y$ . In this Section, we show that at test time we can use a halting criterion to ensure that the subsequent steps of the sequence do not change the current prediction. + +The choice of the criteria for halting (and therefore reducing computation) depends greatly on the task and how close of an approximation is required. In this work, our goal is to achieve the same top-1 accuracy with and without using DACT. This is equivalent to establish a halting criterion such that the class with highest probability in $a_{n}$ , i.e. using $n$ sub-models, will be the same as that in $Y$ . + +We know that $y_{n}$ (the intermediate output of the $n$ th classification model) is restricted to $0 \leq y_{n} \leq 1$ as a result of using either Softmax or Sigmoid functions. Since the maximum change of the accumulated answer $a_{n}$ in the remaining $d = N - n$ iterations is limited by $p_{n}$ , we can calculate the maximum difference between the predicted probabilities for the top most class and the runner-up. Consequently, we can achieve reduced computation by halting once this difference is insurmountable. + +Without loss of generality consider the case where, for some step $n$ , the class with the highest probability in the accumulated answer $a_{n}$ corresponds to class $c^{*}$ with probability $P(c^{*}, n)$ , and the runner-up (second best) class is $c^{ru}$ with probability $P(c^{ru}, n)$ . The minimum value for the probability of the class $c^{*}$ after the $d$ remaining steps is obtained when all the future steps assign a minimum probability (0) to this class. We can use this result to obtain a lower bound to the probability: + +$$ +\min \left(c ^ {*}, N\right) \geq P \left(c ^ {*}, n\right) \prod_ {i = n} ^ {n + d - 1} \left(1 - p _ {i}\right) \tag {5} +$$ + +Leveraging that $p_n \geq p_{n'}$ (for any $n'$ greater than $n$ ) in conjunction with Eq. 2, we can establish that the minimum value for the class at $c^*$ after another $d$ steps is always: + +$$ +\min \left(c ^ {*}, N\right) \geq P \left(c ^ {*}, n\right) \left(1 - p _ {n}\right) ^ {d} \tag {6} +$$ + +Likewise, the maximum value that the probability for the runner-up class $c^{ru}$ can take after all unused $d$ steps $(\max(c^{ru}, N))$ is achieved when the maximum probability (1) has been assigned to this class at every remaining step. Replacing this value into Eq. 2 yields an upper bound to the + +value that the probability for the class $c^{ru}$ can take: + +$$ +\begin{array}{l} \max \left(c ^ {r u}, N\right) \leq P \left(c ^ {r u}, n\right) \prod_ {i = n} ^ {n + d - 1} \left(1 - p _ {i}\right) \\ + \sum_ {i = n} ^ {n + d - 1} p _ {i} \prod_ {j = i + 1} ^ {n + d - 1} (1 - p _ {j}) \tag {7} \\ \end{array} +$$ + +Then, since $0 \leq p_n \leq 1$ and $p_n \geq p_{n'} (\forall n' \geq n)$ , we obtain that the maximum value for the class $c^{ru}$ is: + +$$ +\max \left(c ^ {r u}, N\right) \leq P \left(c ^ {r u}, n\right) + p _ {n} d \tag {8} +$$ + +We say that the difference between the top class and the runner up is insurmountable once we prove that $\min(c^*, N) \geq \max(c^{ru}, N)$ , and thus we can cut computation since the remaining steps cannot change the final answer of the model. Mathematically, this means the halting condition is achieved when: + +$$ +P \left(c ^ {*}, n\right) \left(1 - p _ {n}\right) ^ {d} \geq P \left(c ^ {r u}, n\right) + p _ {n} d \tag {9} +$$ + +which is the criterion used in this work to stop processing. + +# 4. Experiments + +The MAC network is a state-of-the-art recurrent architecture that decomposes problems into reasoning steps. This network iterates for a fixed number of times (usually 12) where each step first attends the question, then the image, and finally, it updates an internal memory representation. When applied to the CLEVR [15] dataset, the MAC sets state-of-the-art performance with $98.9\%$ accuracy. + +We start from a PyTorch [20] port of MAC available online3, which we trained without self-attention to achieve a maximum accuracy score of $98.6\%$ on CLEVR overall. To help convergence and speed up training, we first pre-train a variant of the model on CLEVR without gating or self-attention for ten epochs (with all hyper-parameters set to their defaults). We then reset all optimizers and train three main variants starting from the saved weights. First, we add the gate to the MAC, slightly improving the results. Second, we train several ACT versions using different ponder costs. Finally, we do the same with DACT. All variants are trained for another additional 30 epochs, saving the weights with the highest associated accuracy on the validation set. + +As one of the main goals of adaptive computation is to maximize performance at lower computational cost, we evaluate each model's accuracy with respect to the average number of steps taken to reach the best score. As illustrated in Figure 4, models resulting from the application of DACT + +![](images/ff4fe61907ddb703a6787a06bef5b9e1c5c307be95186c9954d112cb3970daf9.jpg) +Figure 3. Questions in CLEVR are synthetically generated following templates, for example, by replacing $\langle \mathrm{C} \rangle$ and $\langle \mathrm{M} \rangle$ with a color and material in the template "How many $\langle C \rangle$ $\langle M \rangle$ things are there?". Accordingly, adding adaptability to the model does not increase performance but rather, similar complexity to solve. The figure shows the average amount of computation used by three models for each question family, sorted by the average number of steps used by the respective model. The first image (a) illustrates how ACT fails to learn how to answer the most straightforward questions in less than three steps, or the hardest in more than five. Below it, b) shows the results for a variant of DACT that averages approximately the same number of steps but uses more of the available spectrum, significantly improving model performance. The last image shows a variant of DACT, which uses 50% more reasoning steps on average and thus achieves even better performance. + +![](images/993ae642d63e905295c1b78ee0e10ba74a138523bc6d3c6bc3eb11d03401a91d.jpg) +Figure 4. Scatterplot showing the relationships between computation (measured in average steps, horizontal), and precision (measured in accuracy, vertical) for each model, where every experiment was repeated three times. The results obtained with DACT are shown in color, with individual runs represented as small circles while the averages for each penalty are shown as larger ones. The averaged results for ACT are shown as gray Xes. No color is used as the value for the ponder cost did not impact the number of steps. The diamonds show the average accuracy obtained by MAC at different network lengths, while the dotted line represents the accuracy of the best performing 12 step MAC. + +to MAC substantially outperform non-adaptive versions of MAC with similar computation cost in the CLEVR dataset (achieved by training a MAC with the number of steps fixed + +![](images/b167106acd61fbccf92f3a5129c77d19927d51535aac27e4076427396e326230.jpg) +Figure 5. Learning curves of DACT enabled MACs with different ponder costs. For reference, we include the maximum accuracy achieved by any non-adaptive MAC as a dotted line. The black marks show the average accuracy obtained by this model when restricted to 12, 9, 5, 3, and 2 steps from top to bottom, respectively. Recall that these models are first pre-trained for ten epochs without any gating or adaptive algorithms. + +to the closest integer). Additionally, in our experiments, DACT trained with a ponder cost of $\lambda = 1\times 10^{-3}$ repeatedly obtains an accuracy comparable to the best achieved by any MAC and, on average, surpasses all tested alternatives. This apparent contradiction (obtaining better results with less computation) can be explained by consider + +ing that DACT-augmented-MACs have the same representational capacity as regular MACs, but can choose to reduce computation when needed. + +The same results also show that, when provided with sufficient resources, MAC increases its performance reducing its gap with respect to DACT versions. This tendency, however, does not hold beyond 12 iterations, as shown also in [10]. We train a 15 step MAC with gating using the same training scheme, and the results are worse than those from its 12 step counterpart, revealing the inadequacy of the gating mechanism. In contrast, DACT-enabled-MACs with the maximum amount of steps set to 15 can be fine-tuned from existing 12 step models to obtain the best results of any model tested at $98.72\%$ accuracy. In addition to improving performance, these results prove that using our algorithm on MACs makes them more robust to increase the value of the maximum number of steps. + +On the other hand, models trained with the existing algorithm (ACT) are unsuccessful in surpassing the accuracy of computationally equivalent MACs. In particular, DACT responds as expected to variations in the ponder cost, adapting its computation accordingly, however, ACT proves to be insensitive to the ponder cost. As an example, a variant of ACT without ponder cost $(\lambda = 0.0)$ performs 3.2 steps on average and obtains an accuracy of $95.8\%$ . + +We also evaluate how well the model adapts to variations in question complexity, since the rationale behind adapting the number of steps is to enable the models to allocate more computation to more complex questions. As expected, DACT iterates fewer times for easy questions and more when the input question is more complex, improving model performance at no additional computational cost. In Figure 3, questions are clustered by family type which translates to groups that require similar step sequences to solve and therefore are of similar complexity (the figure is further explained in supplementary material, where we include examples for each family). This figure shows a remarkable correlation between computation and question complexity, despite not including any type of supervision about these factors. + +Finally, in order to evaluate the generality of the suggested approach to real data, we evaluate the combined DACT-MAC architecture on the more diverse images and questions in the GQA dataset [11]. We start by again pretraining a non-gated MAC (4 steps, 5 epochs) and then finetuning ACT, DACT and gated MAC variants for another 15 epochs. The results shown in Table 1 of the supplementary material show that DACT is effective in reducing the number of steps needed while maintaining most of the performance of the architecture that always iterates the maximum number of times (four steps). However, we found in our experiments that for GQA the chosen architecture (MAC) doesn't benefit from iterating more than two steps, + +![](images/7338a7667cc23c55f770d66acfc47bb76c77bf142e718bf98b8d0a46bf262c77.jpg) +Figure 6. Attention maps, intermediate answers, and halting probabilities captured from DACT for the image and question shown. Three steps were needed to arrive at the answer. The first two steps output wrong answers with high uncertainty ( $p_n \approx 1$ ). The last step, however, has identified the relevant object and can thus answer correctly and with confidence. + +![](images/be8db6b8bbc599616b5574aae8b8d71de29ff5615923b376115a9f8665a19faf.jpg) +Answered: gray, Correct: yellow $p_1 = 0.99998426$ + +![](images/7821af48e24242e56b5262a72fed935f2ffdab903bee9f00a493dde827e4c1f1.jpg) +Answered: green, Correct: yellow $p_2 = 0.99998224$ + +![](images/dd4fa5f77c4b952d5501f224c86e2ad20ec16823e4f427c7dc2ac4d75bb413cc.jpg) +Answered: yellow, Correct: yellow $p_3 = 0.0028835023$ + +and even then the advantage gained over its non recurrent single-step version is marginal. Accordingly, adding adaptability to the model does not increase accuracy but rather results in a small but measurable reduction in performance. + +Regardless of the above, the experimental results highlight the advantages of our algorithm with respect to ACT, showing that DACT once again obtains better results for the same number of steps. Additionally, while our method continues to adapt computation in a coherent manner to the time penalties, ACT remains mostly irrespective to the values these take. Furthermore, the high correlations between computation and question type are also present for the GQA dataset as Figure 2 of the supplementary material shows, revealing once more that DACT learnt to meaningfully adapt complexity without supervision. + +# 5. Discussion + +As in previous works [16, 10], we also analyze the attention maps provided by the model. In particular, we examine both the linguistic and visual attentions generated at each step. Also, we raise the question of whether the proposed architecture can indeed improve interpretability. Figure 7 shows examples of the attention maps generated by the 12 + +![](images/0cdcca6519988a033135846f50ee8405d6fb9babdd3ed0d205f522e26952e7b2.jpg) +Figure 7. Linguistic and visual attention maps for both the standard MAC architecture (left) and our DACT enabled variant trained with $\tau = 5 \times 10^{-3}$ (right). Besides the obvious and substantial reduction in the number of steps used to answer, our model also contributes to the overall interpretability of the inference. This is achieved by adding a proxy of the number of steps taken to the loss function, effectively coerce the model into only using fewer (and therefore more likely to be semantically strong) steps. The question attentions above show that the last two steps are similar for both models, but that only one of the other ten steps used by MAC was necessary. + +![](images/a22f8c9ef9a720a9b425bd83e6d838a7d6453cb7f625450dc2ee5a5c0d5a49a9.jpg) + +![](images/1ea9fcdde439b3c0a733345b28990141c3f70941b14d825ac2999fe0ff9ac117.jpg) + +step MAC. Since the MAC architecture only considers the last state in memory for the final classification, the final controls tend to be significant. Indeed, our test indicates that the last few execution steps generate similar attention maps to those produced by our adaptive variant. However, as Figure 3 shows, very few queries need all 12 steps of computation, so most of the steps execute either, repetitions of other operations, or are just padding (e.g. attending punctuation). + +The above stands in contrast to our DACT enabled variant, which in practice provides a free lunch by maintaining the performance while increasing interpretability without (in the case of MAC) adding additional parameters. We achieve this by adding the differentiable approximation to the number of steps taken, the ponder cost (Eq. 3), to the loss function. Consequently, since the model is coerced into only using significant steps, we find that those taken are more likely to be semantically meaningful. + +In addition, the formation of the final output of the model from the sub-outputs enables us to check what the model would answer at each timestep. When analyzed in conjunction with the halting probabilities both yield valuable insights on the internal representation of the model. For instance, in Figure 6, the first step has minimal information from the question and image and consequently is very uncertain of the given answer. However, this limited information is enough for the model to identify that the question involves the color of some object, and therefore the answer is the color of the only object it has seen. We expect the increased transparency of the model will assist future studies on explainability and the detection of biases in datasets. + +The difference in steps for distinct queries allows us to obtain an estimation of the complexity of each encoded question as shown in 3. These can then be combined to obtain an estimator for subsets of the dataset. Estimators + +such as the average complexities of questions can be useful for curriculum learning [3], providing a novel way of separating data that does not require supervision. + +Finally, due to its non-differentiable inclusion of the number of steps used, ACT effectively provides the same penalty to each step. On the other hand, DACT is not limited in this respect, since probabilities $p_n$ are entirely differentiable. This allows for the inclusion of functions of the amount of steps in the loss, opening another line for future work. We expect that the inclusion of non-linear functions of the ponder cost (such as the square of its value) can also be a interesting avenue for future research. + +# 6. Conclusion + +This paper introduces a new algorithm for adaptive computation called DACT, which, unlike to existing ones, is end-to-end differentiable. By combining our method with the MAC architecture, we manage to significantly improve its performance to computation ratio by reducing the number of recurrent steps needed to achieve a certain accuracy threshold. Furthermore, we show that the inclusion of DACT improves the robustness of the resulting model to an increase in the number of processing steps, improving performance with respect to previous state-of-the-art results in CLEVR. Additionally, our results also show that DACT improves interpretability by providing additional insights into the internal operation of the MAC architecture, showing how its prediction and uncertainty change at the different steps of the estimation. As future work, we believe that our formulation of adaptive computation as an ensemble of models can motivate further research in this area. + +Acknowledgments: This work was partially funded by FONDECYT grant 1181739 and the Millennium Institute for Foundational Research on Data (IMFD). + +# References + +[1] Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Neural module networks. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Jun 2016. 2, 3 +[2] D. Bahdanau, K. Cho, and Y. Bengio. Neural machine translation by jointly learning to align and translate. 2015. 2, 3 +[3] Yoshua Bengio, Jérôme Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In Proceedings of the 26th Annual International Conference on Machine Learning, ICML '09, pages 41-48, New York, NY, USA, 2009. ACM. 8 +[4] S. Changpinyo, M. Sandler, and A. Zhmoginov. The power of sparsity in convolutional neural networks. arXiv:1702.06257, 2017. 3 +[5] Mostafa Dehghani, Stephan Gouws, Oriol Vinyals, Jakob Uszkoreit, and Lukasz Kaiser. Universal transformers. CoRR, abs/1807.03819, 2018. 2, 3 +[6] Michael Figurnov, Maxwell D. Collins, Yukun Zhu, Li Zhang, Jonathan Huang, Dmitry P. Vetrov, and Ruslan Salakhutdinov. Spatially adaptive computation time for residual networks. CoRR, abs/1612.02297, 2016. 3 +[7] Alex Graves. Adaptive computation time for recurrent neural networks. CoRR, abs/1603.08983, 2016. 2, 3 +[8] Kaiming He, Georgia Gkioxari, Piotr Dólár, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 2961-2969, 2017. 1 +[9] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. 2015. 2, 3 +[10] D. Hudson and C.D. Manning. Compositional attention networks for machine reasoning. In ICLR, 2018. 1, 2, 3, 7 +[11] Drew A Hudson and Christopher D Manning. Gqa: A new dataset for real-world visual reasoning and compositional question answering. Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1, 7 +[12] Drew A. Hudson and Christopher D. Manning. Learning by abstraction: The neural state machine, 2019. 2, 3 +[13] Robert Jacobs, Michael Jordan, Steven J. Nowlan, and Geoffrey E. Hinton. Adaptive mixture of local expert. Neural Computation, 3:78-88, 02 1991. 2 +[14] R.A. Jacobs, M.I. Jordan, S.J. Nowlan, and G.E. Hinton. Adaptive mixtures of local experts. *Neural Computation*, 3(1):79-87, 1991. 4 +[15] Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Li Fei-Fei, C. Lawrence Zitnick, and Ross B. Girshick. CLEVR: A diagnostic dataset for compositional language and elementary visual reasoning. CoRR, abs/1612.06890, 2016. 1, 5 +[16] J. Johnson, B. Hariharan, L. van der Maaten, J. Hoffman, L. Fei-Fei, C.L. Zitnick, and R. Girshick. Inferring and executing programs for visual reasoning. 2017. 2, 3, 7 +[17] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097-1105, 2012. 1 + +[18] Y. LeCun, Y. Bengio, and G. Hinton. Deep learning. Nature, 521:436-444, 2015. 1 +[19] Mark Neumann, Pontus Stenetorp, and Sebastian Riedel. Learning to reason with adaptive computation, 2016. 2, 3 +[20] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017. 5 +[21] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 779-788, 2016. 1 +[22] R. Schwartz, J. Dodge, N. A. Smith, and O. Etzioni. Green AI. CoRR, abs/1907.10597, 2019. 2, 3 +[23] Emma Strubell, Ananya Ganesh, and Andrew McCallum. Energy and policy considerations for deep learning in nlp. arXiv preprint arXiv:1906.02243, 2019. 2, 3 +[24] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A.N. Gomez, L. Kaiser, and I. Polosukhin. Attention is all you need. In NIPS, 2017. 1, 3 +[25] W. Wen, C. Wu, Y. Wang, Y. Chen, and H. Li. Learning Structured Sparsity in Deep Neural Networks. In Conference on Neural Information Processing Systems (NIPS), 2016. 3 +[26] H. Zhou, J. M. Alvarez, and F. Porikli. Less Is More: Towards Compact CNNs. In European Conference on Computer Vision (ECCV), 2016. 3 \ No newline at end of file diff --git a/differentiableadaptivecomputationtimeforvisualreasoning/images.zip b/differentiableadaptivecomputationtimeforvisualreasoning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..cd45cb0fee2aa21144cb1582483887099b28d1e0 --- /dev/null +++ b/differentiableadaptivecomputationtimeforvisualreasoning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bef095f418f72f13704dbdf751359d9cbf8ad3a3de131fc0f3682728de6c2bc1 +size 263307 diff --git a/differentiableadaptivecomputationtimeforvisualreasoning/layout.json b/differentiableadaptivecomputationtimeforvisualreasoning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1af06c438c9513a5710f3adaba7737a6f2ac3bb3 --- /dev/null +++ b/differentiableadaptivecomputationtimeforvisualreasoning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8669b78b139d5c1b9ad5ef7b7ed9c7b020d23aeece45cd6e8d6b46e892b1c659 +size 326933 diff --git a/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/56573750-1309-4fd0-9e1f-5bb5a6cd77a4_content_list.json b/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/56573750-1309-4fd0-9e1f-5bb5a6cd77a4_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..7621508e75c1cc41d3de24d0b21df3dbc49374a3 --- /dev/null +++ b/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/56573750-1309-4fd0-9e1f-5bb5a6cd77a4_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c41d6509cfe4db0bae6de2d8bfc4464dd43a13150fc24ed07a266e8b1da845d0 +size 95813 diff --git a/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/56573750-1309-4fd0-9e1f-5bb5a6cd77a4_model.json b/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/56573750-1309-4fd0-9e1f-5bb5a6cd77a4_model.json new file mode 100644 index 0000000000000000000000000000000000000000..f4c6edef4ee42b1d58e65b7d482ebfa31a59b9ca --- /dev/null +++ b/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/56573750-1309-4fd0-9e1f-5bb5a6cd77a4_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe8816ebcee0982b323a5acab88a780b2627339059dd5baa5c686278453b8954 +size 123832 diff --git a/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/56573750-1309-4fd0-9e1f-5bb5a6cd77a4_origin.pdf b/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/56573750-1309-4fd0-9e1f-5bb5a6cd77a4_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ba5b655a7a1b5e288d70c213cb4f2d99dd988178 --- /dev/null +++ b/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/56573750-1309-4fd0-9e1f-5bb5a6cd77a4_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e6e938097f78fe006667dd4fa3dc43babdefb1a47009ae30dffee629652c733 +size 3088355 diff --git a/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/full.md b/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/full.md new file mode 100644 index 0000000000000000000000000000000000000000..05063548c9cb55e16539f61bdf56c1e44fe8c557 --- /dev/null +++ b/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/full.md @@ -0,0 +1,420 @@ +# Differentiable Volumetric Rendering: Learning Implicit 3D Representations without 3D Supervision + +Michael Niemeyer1,2 Lars Mescheder1,2,3† Michael Oechsle1,2,4 Andreas Geiger1,2 + +$^{1}$ Max Planck Institute for Intelligent Systems, Tübingen $^{2}$ University of Tübingen + +$^{3}$ Amazon, Tübingen $^{4}$ ETAS GmbH, Bosch Group, Stuttgart + +{firstname.lastname}@tue.mpg.de + +# Abstract + +Learning-based 3D reconstruction methods have shown impressive results. However, most methods require 3D supervision which is often hard to obtain for real-world datasets. Recently, several works have proposed differentiable rendering techniques to train reconstruction models from RGB images. Unfortunately, these approaches are currently restricted to voxel- and mesh-based representations, suffering from discretization or low resolution. In this work, we propose a differentiable rendering formulation for implicit shape and texture representations. Implicit representations have recently gained popularity as they represent shape and texture continuously. Our key insight is that depth gradients can be derived analytically using the concept of implicit differentiation. This allows us to learn implicit shape and texture representations directly from RGB images. We experimentally show that our single-view reconstructions rival those learned with full 3D supervision. Moreover, we find that our method can be used for multi-view 3D reconstruction, directly resulting in watertight meshes. + +# 1. Introduction + +In recent years, learning-based 3D reconstruction approaches have achieved impressive results [12, 13, 17, 24, 41, 48, 49, 56, 64, 80]. By using rich prior knowledge obtained during the training process, they are able to infer a 3D model from as little as a single image. However, most learning-based methods are restricted to synthetic data, mainly because they require accurate 3D ground truth models as supervision for training. + +To overcome this barrier, recent works have investigated approaches that require only 2D supervision in the form of depth maps or multi-view images. Most existing approaches achieve this by modifying the rendering process + +![](images/bb9bffeea7b2e7e3c10848ae8de3c053d15732922819b0ecb0781974729228bf.jpg) +Figure 1: Overview. We show that volumetric rendering is inherently differentiable for implicit shape and texture representations. Using an analytic expression for the gradient of the depth $\frac{\partial\hat{d}}{\partial\theta}$ wrt. the network parameters $\theta$ , we learn implicit 3D representations $f_{\theta}$ from 2D images. + +to make it differentiable [4, 11, 15, 21, 33, 36, 43, 44, 47, 50, 58, 59, 62, 75, 76, 79, 88]. While yielding compelling results, they are restricted to specific 3D representations (e.g. voxels or meshes) that suffer from discretization artifacts and the computational cost limits them to small resolutions or deforming a fixed template mesh. At the same time, implicit representations [12, 48, 56] for shape and texture [54, 66] have been proposed which do not require discretization during training and have a constant memory footprint. However, existing approaches using implicit representations require 3D ground truth for training and it remains unclear how to learn implicit representations from image data alone. + +Contribution: In this work, we introduce Differentiable Volumetric Rendering (DVR). Our key insight is that we can derive analytic gradients for the predicted depth map with respect to the network parameters of the implicit shape and texture representation (see Fig. 1). This insight enables us to design a differentiable renderer for implicit shape and texture representations and allows us to learn these representations solely from multi-view images and object masks. + +Since our method does not have to store volumetric data in the forward pass, its memory footprint is independent of the sampling accuracy of the depth prediction step. We show that our formulation can be used for various tasks such as single- and multi-view reconstruction, and works with synthetic and real data. In contrast to [54], we do not need to condition the texture representation on the geometry, but learn a single model with shared parameters that represents both geometry and texture. Our code and data are provided at https://github.com/autonomousvision/differentiable_volumetric_rendering. + +# 2. Related Work + +3D Representations: Learning-based 3D reconstruction approaches can be categorized wrt. the representation they use as voxel-based [8, 13, 19, 61, 64, 73, 82, 83], point-based [2, 17, 31, 40, 77, 85], mesh-based [24, 32, 41, 55, 80], or implicit representations [3, 12, 22, 30, 48, 49, 56, 66, 81]. + +Voxels can be easily processed by standard deep learning architectures, but even when operating on sparse data structures [23, 64, 74], they are limited to relatively small resolution. While point-based approaches [2, 17, 40, 77, 85] are more memory-efficient, they require intensive post-processing because of missing connectivity information. Most mesh-based methods do not perform post-processing, but they often require a deformable template mesh [80] or represent geometry as a collection of 3D patches [24] which leads to self-intersections and non-watertight meshes. + +To mitigate these problems, implicit representations have gained popularity [3, 12, 22, 30, 48, 49, 53, 54, 56, 66, 81]. By describing 3D geometry and texture implicitly, e.g., as the decision boundary of a binary classifier [12, 48], they do not discretize space and have a fixed memory footprint. + +In this work, we show that the volumetric rendering step for implicit representations is inherently differentiable. In contrast to previous works, this allows us to learn implicit 3D shape and texture representations using 2D supervision. + +3D Reconstruction: Recovering 3D information which is lost during the image capturing process is one of the longstanding goals of computer vision [25]. Classic multi-view stereo (MVS) methods [5-7,20,37,60,68-70] usually match features between neighboring views [5, 20, 68] or reconstruct the 3D shape in a voxel grid [6, 7, 37, 60, 70]. While the former methods produce depth maps as output which have to be fused in a lossy post-processing step, e.g., using volumetric fusion [14], the latter approaches are limited by the excessive memory requirements of 3D voxel grids. In contrast to these highly engineered approaches, our generic method directly outputs a consistent representation in 3D space which can be easily converted into a watertight mesh while having a constant memory footprint. + +Recently, learning-based approaches [16, 29, 39, 58, 63, + +86, 87] have been proposed that either learn to match image features [39], refine or fuse depth maps [16, 63], optimize parts of the classical MVS pipeline [57], or replace the entire MVS pipeline with neural networks that are trained end-to-end [29, 86, 87]. In contrast to these learning-based approaches, our method can be supervised from 2D images alone and outputs a consistent 3D representation. + +Differentiable Rendering: We focus on methods that learn 3D geometry via differentiable rendering in contrast to recent neural rendering approaches [42,51,52,71] which synthesize high-quality novel views but do not infer the 3D object. They can again be categorized by the underlying representation of 3D geometry that they use. + +Loper et al. [47] propose OpenDR which approximates the backward pass of the traditional mesh-based graphics pipeline and has inspired several follow-up works [11, 21, 27, 28, 33, 44, 88]. Liu et al. [44] replace the rasterization step with a soft version to make it differentiable. While yielding compelling results in reconstruction tasks, these approaches require a deformable template mesh for training, restricting the topology of the output. + +Another line of work operates on voxel grids [46, 50, 57, 79]. Paschalidou et al. [57] and Tulsiani et al. [79] propose a probabilistic ray potential formulation. While providing a solid mathematical framework, all intermediate evaluations need to be saved for backpropagation, restricting these approaches to relatively small-resolution voxel grids. + +Liu et al. [45] propose to infer implicit representations from multi-view silhouettes by performing max-pooling over the intersections of rays with a sparse number of supporting regions. In contrast, we use texture information enabling us to improve over the visual hull and to reconstruct concave shapes. Sitzmann et al. [72] infer implicit scene representations from RGB images via an LSTM-based differentiable renderer. While producing high-quality renderings, the geometry cannot be extracted directly and intermediate results need to be stored for computing gradients. In contrast, we show that volumetric rendering is inherently differentiable for implicit representations. Thus, no intermediate results need to be saved for the backward pass. + +# 3. Method + +In this section, we describe our Differentiable Volumetric Rendering (DVR) approach. We first define the implicit neural representation which we use for representing 3D shape and texture. Next, we provide a formal description of DVR and all relevant implementation details. An overview of our approach is provided in Fig. 2. + +# 3.1. Shape and Texture Representation + +Shape: In contrast to discrete voxel- and point-based representations, we represent the 3D shape of an object implicitly + +![](images/df9553a3e82acc58284175e7009308b39071d1f38c83817df209e982dae18b12.jpg) +Figure 2: Differentiable Volumetric Rendering. We first predict the surface depth $\hat{d}$ by performing occupancy evaluations for a given camera matrix. To this end, we project sampled pixel $\mathbf{u}$ to 3D and evaluate the occupancy network at fixed steps on the ray cast from the camera origin towards this point. We then unproject the surface depth into 3D and evaluate the texture field at the given 3D location. The resulting 2D rendering $\hat{\mathbf{I}}$ can be compared to the ground truth image. When we also have access to ground truth depth maps, we can define a loss directly on the predicted surface depth. We can make our model conditional by incorporating an additional image encoder that predicts a global descriptor $\mathbf{z}$ of both shape and texture. + +using the occupancy network introduced in [48]: + +$$ +f _ {\theta}: \mathbb {R} ^ {3} \times \mathcal {Z} \rightarrow [ 0, 1 ] \tag {1} +$$ + +An occupancy network $f_{\theta}(\mathbf{p}, \mathbf{z})$ assigns a probability of occupancy to every point $\mathbf{p} \in \mathbb{R}^3$ in 3D space. For the task of single-view reconstruction, we process the input image with an encoder network $\mathbf{g}_{\theta}(\cdot)$ and use the output $\mathbf{z} \in \mathcal{Z}$ to condition $f_{\theta}$ . The 3D surface of an object is implicitly determined by the level set $f_{\theta} = \tau$ for a threshold parameter $\tau \in [0,1]$ and can be extracted at arbitrary resolution using isosurface extraction techniques. $^1$ + +Texture: Similarly, we can describe the texture of a 3D object using a texture field [54] + +$$ +\mathbf {t} _ {\theta}: \mathbb {R} ^ {3} \times \mathcal {Z} \rightarrow \mathbb {R} ^ {3} \tag {2} +$$ + +which regresses an RGB color value for every point $\mathbf{p} \in \mathbb{R}^3$ in 3D space. Again, $\mathbf{t}_{\theta}$ can be conditioned on a latent embedding $\mathbf{z}$ of the object. The texture of an object is given by the values of $\mathbf{t}_{\theta}$ on the object's surface ( $f_{\theta} = \tau$ ). In this work, we implement $f_{\theta}$ and $\mathbf{t}_{\theta}$ as a single neural network with two shallow heads. + +Supervision: Recent works [12, 48, 54, 56, 66] have shown that it is possible to learn $f_{\theta}$ and $\mathbf{t}_{\theta}$ with 3D supervision (i.e., ground truth 3D models). However, ground truth 3D data is often very expensive or even impossible to obtain for real-world datasets. In the next section, we introduce DVR, an alternative approach that enables us to learn both $f_{\theta}$ and $\mathbf{t}_{\theta}$ from 2D images alone. For clarity, we drop the condition variable $\mathbf{z}$ in the following. + +![](images/46b9e686d07a447d1f399468c77dd91395a164bf62c2830a38c5ec05f7f276c5.jpg) +Figure 3: Notation. To render an object from the occupancy network $f_{\theta}$ and texture field $\mathbf{t}_{\theta}$ , we cast a ray with direction $\mathbf{w}$ through a pixel $\mathbf{u}$ and determine the intersection point $\hat{\mathbf{p}}$ with the isosurface $f_{\theta}(\mathbf{p}) = \tau$ . Afterwards, we evaluate the texture field $\mathbf{t}_{\theta}$ at $\hat{\mathbf{p}}$ to obtain the color prediction $\hat{\mathbf{I}}_{\mathbf{u}}$ at $\mathbf{u}$ . + +# 3.2. Differentiable Volumetric Rendering + +Our goal is to learn $f_{\theta}$ and $\mathbf{t}_{\theta}$ from 2D image observations. Consider a single image observation. We define a photometric reconstruction loss + +$$ +\mathcal {L} (\hat {\mathbf {I}}, \mathbf {I}) = \sum_ {\mathbf {u}} \| \hat {\mathbf {I}} _ {\mathbf {u}} - \mathbf {I} _ {\mathbf {u}} \| \tag {3} +$$ + +which we aim to optimize. Here, $\mathbf{I}$ denotes the observed image and $\hat{\mathbf{I}}$ is the image rendered by our implicit model. Moreover, $\mathbf{I_u}$ denotes the RGB value of the observation $\mathbf{I}$ + +at pixel $\mathbf{u}$ and $\| \cdot \|$ is a (robust) photo-consistency measure such as the $\ell_1$ -norm. To minimize the reconstruction loss $\mathcal{L}$ wrt. the network parameters $\theta$ using gradient-based optimization techniques, we must be able to (i) render $\hat{\mathbf{I}}$ given $f_{\theta}$ and $\mathbf{t}_{\theta}$ and (ii) compute gradients of $\mathcal{L}$ wrt. the network parameters $\theta$ . Our core contribution is to provide solutions to both problems, leading to an efficient algorithm for learning implicit 3D representations from 2D images. + +**Rendering:** For a camera located at $\mathbf{r}_0$ we can predict the color $\hat{\mathbf{I}}_{\mathbf{u}}$ at pixel $\mathbf{u}$ by casting a ray from $\mathbf{r}_0$ through $\mathbf{u}$ and determining the first point of intersection $\hat{\mathbf{p}}$ with the isosurface $\{\mathbf{p} \in \mathbb{R}^3 | f_\theta(\mathbf{p}) = \tau\}$ as illustrated in Fig. 3. The color value $\hat{\mathbf{I}}_{\mathbf{u}}$ is then given by $\hat{\mathbf{I}}_{\mathbf{u}} = \mathbf{t}_\theta(\hat{\mathbf{p}})$ . We refer the reader to Section 3.3 for details on the ray casting process. + +Gradients: To obtain gradients of $\mathcal{L}$ with respect to $\theta$ , we first use the multivariate chain rule: + +$$ +\frac {\partial \mathcal {L}}{\partial \theta} = \sum_ {\mathbf {u}} \frac {\partial \mathcal {L}}{\partial \hat {\mathbf {I}} _ {\mathbf {u}}} \cdot \frac {\partial \hat {\mathbf {I}} _ {\mathbf {u}}}{\partial \theta} \tag {4} +$$ + +Here, $\frac{\partial\mathbf{g}}{\partial\mathbf{x}}$ denotes the Jacobian matrix for a vector-valued function $\mathbf{g}$ with vector-valued argument $\mathbf{x}$ and $\cdot$ indicates matrix multiplication. By exploiting $\hat{\mathbf{I}}_{\mathbf{u}} = \mathbf{t}_{\theta}(\hat{\mathbf{p}})$ , we obtain + +$$ +\frac {\partial \hat {\mathbf {I}} _ {\mathbf {u}}}{\partial \theta} = \frac {\partial \mathbf {t} _ {\theta} (\hat {\mathbf {p}})}{\partial \theta} + \frac {\partial \mathbf {t} _ {\theta} (\hat {\mathbf {p}})}{\partial \hat {\mathbf {p}}} \cdot \frac {\partial \hat {\mathbf {p}}}{\partial \theta} \tag {5} +$$ + +since both $\mathbf{t}_{\theta}$ as well as $\hat{\mathbf{p}}$ depend on $\theta$ . Because $\hat{\mathbf{p}}$ is defined implicitly, calculating $\frac{\partial \hat{\mathbf{p}}}{\partial \theta}$ is non-trivial. We first exploit that $\hat{\mathbf{p}}$ lies on the ray from $\mathbf{r}_0$ through $\mathbf{u}$ . For any pixel $\mathbf{u}$ , this ray can be described by $\mathbf{r}(d) = \mathbf{r}_0 + d\mathbf{w}$ where $\mathbf{w}$ is the vector connecting $\mathbf{r}_0$ and $\mathbf{u}$ (see Fig. 3). Since $\hat{\mathbf{p}}$ must lie on $\mathbf{r}$ , there exists a depth value $\hat{d}$ , such that $\hat{\mathbf{p}} = \mathbf{r}(\hat{d})$ . We call $\hat{d}$ the surface depth. This enables us to rewrite $\frac{\partial \hat{\mathbf{p}}}{\partial \theta}$ as + +$$ +\frac {\partial \hat {\mathbf {p}}}{\partial \theta} = \frac {\partial \mathbf {r} (\hat {d})}{\partial \theta} = \mathbf {w} \frac {\partial \hat {d}}{\partial \theta} \tag {6} +$$ + +For computing the gradient of the surface depth $\hat{d}$ with respect to $\theta$ we exploit implicit differentiation [3, 65]. Differentiating $f_{\theta}(\hat{\mathbf{p}}) = \tau$ on both sides wrt. $\theta$ , we obtain: + +$$ +\begin{array}{l} \frac {\partial f _ {\theta} (\hat {\mathbf {p}})}{\partial \theta} + \frac {\partial f _ {\theta} (\hat {\mathbf {p}})}{\partial \hat {\mathbf {p}}} \cdot \frac {\partial \hat {\mathbf {p}}}{\partial \theta} = 0 \\ \Leftrightarrow \frac {\partial f _ {\theta} (\hat {\mathbf {p}})}{\partial \theta} + \frac {\partial f _ {\theta} (\hat {\mathbf {p}})}{\partial \hat {\mathbf {p}}} \cdot \mathbf {w} \frac {\partial \hat {d}}{\partial \theta} = 0 \tag {7} \\ \end{array} +$$ + +Rearranging (7), we arrive at the following closed form expression for the gradient of the surface depth $\hat{d}$ : + +$$ +\frac {\partial \hat {d}}{\partial \theta} = - \left(\frac {\partial f _ {\theta} (\hat {\mathbf {p}})}{\partial \hat {\mathbf {p}}} \cdot \mathbf {w}\right) ^ {- 1} \frac {\partial f _ {\theta} (\hat {\mathbf {p}})}{\partial \theta} \tag {8} +$$ + +We remark that calculating the gradient of the surface depth $\hat{d}$ wrt. the network parameters $\theta$ only involves calculating + +the gradient of $f_{\theta}$ at $\hat{\mathbf{p}}$ wrt. the network parameters $\theta$ and the surface point $\hat{\mathbf{p}}$ . Thus, in contrast to voxel-based approaches [58, 79], we do not have to store intermediate results (e.g., volumetric data) for computing the gradient of the loss wrt. the parameters, resulting in a memory-efficient algorithm. In the next section, we describe our implementation of DVR which makes use of reverse-mode automatic differentiation to compute the full gradient (4). + +# 3.3. Implementation + +To use automatic differentiation, we have to implement the forward and backward pass for the surface depth prediction step $\theta \rightarrow \hat{d}$ . In the following, we describe how both passes are implemented. For more details, we refer the reader to the supplementary material. + +Forward Pass: As visualized in Fig. 3, we can determine $\hat{d}$ by finding the first occupancy change on the ray $\mathbf{r}$ . To detect an occupancy change, we evaluate the occupancy network $f_{\theta}(\cdot)$ at $n$ equally-spaced samples on the ray $\{\mathbf{p}_j^{\mathrm{ray}}\}_{j=1}^n$ . Using a step size of $\Delta s$ , we can express the coordinates of these point in world-coordinates as + +$$ +\mathbf {p} _ {j} ^ {\text {r a y}} = \mathbf {r} (j \Delta s + s _ {0}) \tag {9} +$$ + +where $s_0$ determines the closest possible surface point. We first find the smallest $j$ for which $f_{\theta}$ changes from free space $(f_{\theta} < \tau)$ to occupied space $(f_{\theta} \geq \tau)$ : + +$$ +j = \underset {j ^ {\prime}} {\operatorname {a r g m i n}} \left(f _ {\theta} \left(\mathbf {p} _ {j ^ {\prime} + 1} ^ {\text {r a y}}\right) \geq \tau > f _ {\theta} \left(\mathbf {p} _ {j ^ {\prime}} ^ {\text {r a y}}\right)\right) \tag {10} +$$ + +We obtain an approximation to the surface depth $\hat{d}$ by applying the iterative secant method to the interval $[j\Delta s + s_0, (j + 1)\Delta s + s_0]$ . In practice, we compute the surface depth for a batch of $N_p$ points in parallel. It is important to note that we do not need to unroll the forward pass or store any intermediate results as we exploit implicit differentiation to directly obtain the gradient of $\hat{d}$ wrt. $\theta$ . + +Backward Pass: The input to the backward pass is the gradient $\lambda = \frac{\partial\mathcal{L}}{\partial\hat{d}}$ of the loss wrt. a single surface depth prediction. The output of the backward pass is $\lambda \frac{\partial\hat{d}}{\partial\theta}$ , which can be computed using (8). In practice, however, we would like to implement the backward pass not only for a single surface depth $\hat{d}$ but for a whole batch of depth values. + +We can implement this efficiently by rewriting $\lambda \frac{\partial \hat{d}}{\partial \theta}$ as + +$$ +\mu \frac {\partial f _ {\theta} (\hat {\mathbf {p}})}{\partial \theta} \quad \text {w i t h} \quad \mu = - \left(\frac {\partial f _ {\theta} (\hat {\mathbf {p}})}{\partial \hat {\mathbf {p}}} \cdot \mathbf {w}\right) ^ {- 1} \lambda \tag {11} +$$ + +Importantly, the left term in (11) corresponds to a normal backward operation applied to the neural network $f_{\theta}$ and the right term in (11) is just an (element-wise) scalar multiplication for all elements in the batch. We can hence conveniently compute the backward pass of the operator $\theta \rightarrow \hat{d}$ + +by first multiplying the incoming gradient $\lambda$ element-wise with a factor and then backpropagating the result through the operator $\theta \rightarrow f_{\theta}(\hat{\mathbf{p}})$ . Both operations can be efficiently parallelized in common deep learning frameworks. + +# 3.4. Training + +During training, we assume that we are given $N$ images $\{\mathbf{I}_k\}_{k = 1}^N$ together with corresponding camera intrinsics, extrinsics, and object masks $\{\mathbf{M}_k\}_{k = 1}^N$ . As our experiments show, our method works with as little as one image per object. In addition, our method can also incorporate depth information $\{\mathbf{D}_k\}_{k = 1}^N$ , if available. + +For training $f_{\theta}$ and $\mathbf{t}_{\theta}$ , we randomly sample an image $\mathbf{I}_k$ and $N_p$ points $\mathbf{u}$ on the image plane. We distinguish the following three cases: First, let $\mathcal{P}_0$ denote the set of points $\mathbf{u}$ that lie inside the object mask $\mathbf{M}_k$ and for which the occupancy network predicts a finite surface depth $\hat{d}$ as described in Section 3.3. For these points we can define a loss $\mathcal{L}_{\mathrm{rgb}}(\theta)$ directly on the predicted image $\hat{\mathbf{I}}_k$ . Moreover, let $\mathcal{P}_1$ denote the points $\mathbf{u}$ which lie outside the object mask $\mathbf{M}_k$ . While we cannot define a photometric loss for these points, we can define a loss $\mathcal{L}_{\mathrm{free space}}(\theta)$ that encourages the network to remove spurious geometry along corresponding rays. Finally, let $\mathcal{P}_2$ denote the set of points $\mathbf{u}$ which lie inside the object mask $\mathbf{M}_k$ , but for which the occupancy network does not predict a finite surface depth $\hat{d}$ . Again, we cannot use a photometric loss for these points, but we can define a loss $\mathcal{L}_{\mathrm{occupancy}}(\theta)$ that encourages the network to produce a finite surface depth. + +RGB Loss: For each point in $\mathcal{P}_0$ , we detect the predicted surface depth $\hat{d}$ as described in Section 3.3. We define a photo-consistency loss for the points as + +$$ +\mathcal {L} _ {\mathrm {r g b}} (\theta) = \sum_ {\mathbf {u} \in \mathcal {P} _ {0}} \| \xi (\mathbf {I}) _ {\mathbf {u}} - \xi (\hat {\mathbf {I}}) _ {\mathbf {u}} \| \tag {12} +$$ + +where $\xi (\cdot)$ computes image features and $\| \cdot \|$ defines a robust error metric. In practice, we use RGB-values and (optionally) image gradients as features and an $\ell_1$ -loss for $\| \cdot \|$ . + +Depth Loss: When the depth is also given, we can directly incorporate an $\ell_1$ loss on the predicted surface depth as + +$$ +\mathcal {L} _ {\text {d e p t h}} (\theta) = \sum_ {\mathbf {u} \in \mathcal {P} _ {0}} | d - \hat {d} | _ {1} \tag {13} +$$ + +where $d$ indicates the ground truth depth value of the sampled image point $\mathbf{u}$ and $\hat{d}$ denotes the predicted surface depth for pixel $\mathbf{u}$ . + +Freespace Loss: If a point $\mathbf{u}$ lies outside the object mask but the predicted surface depth $\hat{d}$ is finite, the network falsely predicts surface point $\hat{\mathbf{p}} = \mathbf{r}(\hat{d})$ . Therefore, we penalize this occupancy with + +$$ +\mathcal {L} _ {\text {f r e e s p a c e}} (\theta) = \sum_ {\mathbf {u} \in \mathcal {P} _ {1}} \operatorname {B C E} \left(f _ {\theta} (\hat {\mathbf {p}}), 0\right) \tag {14} +$$ + +where BCE is the binary cross entropy. When no surface depth is predicted, we apply the freespace loss to a randomly sampled point on the ray. + +Occupancy Loss: If a point $\mathbf{u}$ lies inside the object mask but the predicted surface depth $\hat{d}$ is infinite, the network falsely predicts no surface points on ray $\mathbf{r}$ . To encourage predicting occupied space on this ray, we uniformly sample depth values $d_{\mathrm{random}}$ and define + +$$ +\mathcal {L} _ {\text {o c c u p a n c y}} (\theta) = \sum_ {\mathbf {u} \in \mathcal {P} _ {2}} \operatorname {B C E} \left(f _ {\theta} \left(\mathbf {r} \left(d _ {\text {r a n d o m}}\right)\right), 1\right) \tag {15} +$$ + +In the single-view reconstruction experiments, we instead use the first point on the ray which lies inside all object masks (depth of the visual hull). If we have additional depth supervision, we use the ground truth depth for the occupancy loss. Intuitively, $\mathcal{L}_{\mathrm{occupancy}}$ encourages the network to occupy space along the respective rays which can then be used by $\mathcal{L}_{\mathrm{rgb}}$ in (12) and $\mathcal{L}_{\mathrm{depth}}$ in (13) to refine the initial occupancy. + +Normal Loss: Optionally, our representation allows us to incorporate a smoothness prior by regularizing surface normals. This is useful especially for real-world data as training with 2D or 2.5D supervision includes unconstrained areas where this prior enforces more natural shapes. We define this loss as + +$$ +\mathcal {L} _ {\text {n o r m a l}} (\theta) = \sum_ {\mathbf {u} \in \mathcal {P} _ {0}} | | \mathbf {n} \left(\hat {\mathbf {p} _ {u}}\right) - \mathbf {n} \left(\mathbf {q} _ {\mathbf {u}}\right) | | _ {2} \tag {16} +$$ + +where $\mathbf{n}(\cdot)$ denotes the normal vector, $\hat{\mathbf{p}}_{\mathbf{u}}$ the predicted surface point and $\mathbf{q}_{\mathbf{u}}$ a randomly sampled neighbor of $\hat{\mathbf{p}}_{\mathbf{u}}$ .3 + +# 3.5. Implementation Details + +We implement the combined network with 5 fully-connected ResNet [26] blocks and ReLU activation. The output dimension of the last layer is 4, one dimension for the occupancy probability and three dimensions for the texture. For the single-view reconstruction experiments, we encode the input image with an ResNet-18 [26] encoder network $\mathbf{g}_{\phi}$ which outputs a 256-dimensional latent code $z$ . To facilitate training, we start with a ray sampling accuracy of $n = 16$ which we iteratively increase to $n = 128$ by doubling $n$ after 50, 150, and 250 thousand iterations. We choose the sampling interval $[s_0, n\Delta s + s_0]$ such that it covers the volume of interest for each object. We set $\tau = 0.5$ for all experiments. We train on a single NVIDIA V100 GPU with a batch size of 64 images with 1024 random pixels each. We use the Adam optimizer [35] with learning rate $\gamma = 10^{-4}$ which we decrease by a factor of 5 after 750 and 1000 epochs, respectively. + +# 4. Experiments + +We conduct two different types of experiments to validate our approach. First, we investigate how well our approach reconstructs 3D shape and texture from a single RGB image when trained on a large collection of RGB or RGB-D images. Here, we consider both the case where we have access to multi-view supervision and the case where we use only a single RGB-D image per object during training. Next, we apply our approach to the challenging task of multi-view reconstruction, where the goal is to reconstruct complex 3D objects from real-world multi-view imagery. + +# 4.1. Single-View Reconstruction + +First, we investigate to which degree our method can infer a 3D shape and texture representation from single-views. We train a single model jointly on all categories. + +Datasets: To adhere to community standards [13, 48, 80], we use the Choy et al. [13] subset (13 classes) of the ShapeNet dataset [10] for 2.5D and 3D supervised methods with training, validation, and test splits from [48]. While we use the renderings from Choy et al. [13] as input, we additionally render 24 images of resolution $256^2$ with depth maps and object masks per object which we use for supervision. We randomly sample the viewpoint on the northern hemisphere as well as the distance of the camera to the object to get diverse supervision data. For 2D supervised methods, we adhere to community standards [33, 44, 84] and use the renderings and splits from [33]. Similar to [13, 33, 48], we train with objects in canonical pose. + +Baselines: We compare against the following methods which all produce watertight meshes as output: 3D-R2N2 [13] (voxel-based), Pixel2Mesh [80] (mesh-based), and ONet [48] (implicit representation). We further compare against both the 2D and the 2.5D supervised version of Differentiable Ray Consistency (DRC) [79] (voxel-based) and the 2D supervised Soft Rasterizer (SoftRas) [44] (mesh-based). For 3D-R2N2, we use the pre-trained model from [48] which was shown to produce better results than the original model from [13]. For the other baselines, we use the pre-trained models4 from the authors. + +# 4.1.1 Multi-View Supervision + +We first consider the case where we have access to multiview supervision with $N = 24$ images and corresponding object masks. In addition, we also investigate the case when ground truth depth maps are given. + +Results: We evaluate the results using the Chamfer- $L_{1}$ distance from [48]. In contrast to previous works [13, 44, 48, + +Input SoftRas Ours $(\mathcal{L}_{\mathrm{RGB}})$ Pixel2Mesh Ours $(\mathcal{L}_{\mathrm{Depth}})$ + +![](images/0bf26715a4cec9424346df987df74d39ff34c6915068f04a15369ceb8170ee86.jpg) +Figure 4: Single-View Reconstruction. We show the input renderings from [13] and the output of our 2D supervised $(\mathcal{L}_{\mathrm{RGB}})$ and 2.5D supervised $(\mathcal{L}_{\mathrm{Depth}})$ model, Soft Rasterizer [44] and Pixel2Mesh [80]. For 2D supervised methods we use a corresponding view from [33] as input. + +Input Prediction + +![](images/1337ec679ec1cb3a97e0fba31bf7154b5f31dd14e70735d08f9bc789aff675b7.jpg) + +![](images/5b0986777e23aa23d27b203eb7eda8517ab52f092e3c3524fe8e9a4578de25ca.jpg) +Figure 5: Single-View Reconstruction with Single-View Supervision. While only trained with a single-view per object, our model predicts accurate 3D geometry and texture. + +Input Prediction + +![](images/58da3f4c7742ccbd5c36630c4e6bbe0dcae0631f4d60959d12751014a50e7808.jpg) + +![](images/4a3abbac45fe9a4cf157288ea7684b67f1d6e9e37b1675f2b4b2585ed564b9ed.jpg) + +79], we compare directly wrt. to the ground truth shape models, not the voxelized or watertight versions. + +In Table 1 and Fig. 4 we show quantitative and qualitative results for our method and various baselines. We can see that our method is able to infer accurate 3D shape and texture representations from single-view images when only trained on multi-view images and object masks as supervision signal. Quantitatively (Table 1), our method performs best among the approaches with 2D supervision and rivals the quality of methods with full 3D supervision. When trained with depth, our method performs comparably to the methods which use full 3D information. Qualitatively (Fig. 4), we see that in contrast to the mesh-based approaches, our method is not restricted to certain topologies. When trained with the photo-consistency loss $\mathcal{L}_{\mathrm{RGB}}$ we see that our approach is able to predict accurate texture information in addition to the 3D shape. + +# 4.1.2 Single-View Supervision + +The previous experiment indicates that our model is able to infer accurate shape and texture information without 3D + +
category2D Supervision2.5D Supervision3D Supervision
DRC (Mask) [79]SoftRas [44]Ours (LRGB)DRC (Depth) [79]Ours (LDepth)3D R2N2 [13]ONet [48]Pixel2Mesh [80]
airplane0.6590.1490.1900.3770.1430.2150.1510.183
bench-0.2410.210-0.1650.2100.1710.191
cabinet-0.2310.220-0.1830.2460.1890.194
car0.3400.2210.1960.3160.1790.2500.1810.154
chair0.6600.3380.2640.5100.2260.2820.2240.259
display-0.2840.255-0.2460.3230.2750.231
lamp-0.3810.413-0.3620.5660.3800.309
loudspeaker-0.3200.289-0.2950.3330.2900.284
rifle-0.1550.175-0.1430.1990.1600.151
sofa-0.4070.224-0.2210.2640.2170.211
table-0.3740.280-0.1800.2470.1850.215
telephone-0.1310.148-0.1300.2210.1550.145
vessel-0.2330.245-0.2060.2480.2200.201
mean0.5530.2660.2390.4010.2060.2770.2150.210
+ +Table 1: Single-View Reconstruction. We report Chamfer- $L_{1}$ distances wrt. the ground truth meshes for the single-view experiment. We compare against Differentiable Ray Consistency (DRC) [79] (2D and 2.5D supervision), Soft Rasterizer [44] (2D supervision), 3D-R2N2 [13], Occupancy Networks (ONet) [48], and Pixel2Mesh [80] (all 3D supervision). + +supervision. A natural question to ask is how many images are required during training. To this end, we investigate the case when only a single image with depth and camera information is available. Since we represent the 3D shape in a canonical object coordinate system, the hypothesis is that the model can aggregate the information over multiple training instances, although it sees every object only from one perspective. As the same image is used both as input and supervision signal, we now condition on our renderings instead of the ones provided by Choy et al. [13]. + +Results: Surprisingly, Fig. 5 shows that our method can infer appropriate 3D shape and texture when only a single-view is available per object, confirming our hypothesis. Quantitatively, the Chamfer distance of the model trained with $\mathcal{L}_{\mathrm{RGB}}$ and $\mathcal{L}_{\mathrm{Depth}}$ with only a single view (0.410) is comparable to the model trained with $\mathcal{L}_{\mathrm{Depth}}$ with 24 views (0.383). The reason for the numbers being worse than in Section 4.1 is that for our renderings, we do not only sample the viewpoint, but also the distance to the object resulting in a much harder task (see Fig. 5). + +# 4.2. Multi-View Reconstruction + +Finally, we investigate if our method is also applicable to multi-view reconstruction in real-world scenarios. We investigate two cases: First, when multi-view images and object masks are given. Second, when additional sparse depth maps are given which can be obtained from classic multi-view stereo algorithms [67]. For this experiment, we do not condition our model and train one model per object. + +Dataset: We conduct this experiment on scans 65, 106, and 118 from the challenging real-world DTU dataset [1]. The dataset contains 49 or 65 images with camera information for each object and baseline and structured light ground + +truth data. The presented objects are challenging as their appearance changes in different viewpoints due to specularities. Our sampling-based approach allows us to train on the full image resolution of $1200 \times 1600$ . We label the object masks ourselves and always remove the same images with profound changes in lighting conditions, e.g., caused by the appearance of scanner parts in the background. + +Baselines: We compare against classical approaches that have 3D meshes as output. To this end, we run screened Poisson surface reconstruction (sPSR) [34] on the output of the classical MVS algorithms Campbell et al. [9], Furukawa et al. [18], Tola et al. [78], and Colmap [67]. We find that the results on the DTU benchmark for the baselines are highly sensitive to the trim parameter of sPSR and therefore report results for the trim parameters 0 (watertight output), 5 (good qualitative results) and 7 (good quantitative results). For a fair comparison, we use the object masks to remove all points which lie outside the visual hull from the predictions of the baselines before running sPSR. We use the official DTU evaluation script in "surface mode". + +Results: We show qualitative and quantitative results in Fig. 6 and Table 2. Qualitatively, we find that our method can be used for multi-view 3D reconstruction, directly resulting in watertight meshes. The ability to accurately model cavities of the objects shows that our model uses texture information to improve over the visual hull (Fig. 7). Quantitatively, Table 2 shows that our approach rivals the results from highly tuned MVS algorithms. We note that the DTU ground truth is itself sparse (Fig. 7c) and methods are therefore rewarded for trading off completeness for accuracy, which explains the better quantitative performance of the baselines for higher trim parameters (Fig. 8). + +![](images/be24359a5ef5988d55946c6ffe7131979eea6a7097135bb47fe1823a4f634347.jpg) +(a) Shape + +![](images/9f41bbfdeac19bddb6be2ab34b8de709452f3d315c286d23f0f3ec08ea93f1a2.jpg) +(b) Normals + +![](images/56cdc57d5ab38929d9efa7794a8d700a4615f024728f8d9abbfe80c931c0cd03.jpg) +(c) Texture + +![](images/33e676f81292887d9ede5b56b8a992405c07e162a9e2452143cbf081977a9676.jpg) +Figure 6: Multi-View Stereo. We show the shape, normals, and the textured shape for our method trained with 2D images and sparse depth maps for scan 106 of the DTU dataset [1]. +(a) Visual Hull [38] + +![](images/ab1b5be4de172a7e80e33d158998cc23252739ec582ce4ca4ceeed858d5975d8.jpg) +(b) Ours $(\mathcal{L}_{\mathrm{RGB}})$ + +![](images/07d3f642f9876c65ba7323b9ffdabd8c9baa18711a85cc12ac00c2c007688253.jpg) +(c) Ground Truth + +![](images/285aceb23f5776dc5292d0a55a925d66dec76d2c251bff67c2f0ac3890a998a7.jpg) +Figure 7: Comparison against Visual Hull. We show the visual hull, the shape prediction of our model trained with $\mathcal{L}_{\mathrm{RGB}}$ , and the ground truth for scan 118 of the DTU dataset. Our method uses RGB cues to improve over the visual hull and predicts parts that are missing in the ground truth. +(a) Colmap 5 +Figure 8: Effect of Trim Parameter. We show screened Poisson surface reconstructions [34] with trim parameters 5 and 7 for Colmap [67] and the prediction of our model trained with $\mathcal{L}_{\mathrm{RGB}} + \mathcal{L}_{\mathrm{Depth}}$ for scan 106 of the DTU dataset. + +![](images/e767e3405009d896b8de25467953b8f3cb4a3ec21d3cbe0b34127e681d583118.jpg) +(b) Colmap 7 + +![](images/95b69e59f97097f7e8147aa6c66142e802a0c1b5b76d6d814dff37a92d935752.jpg) +(c) Ours + +# 5. Conclusion and Future Work + +In this work, we have presented Differentiable Volumetric Rendering (DVR). Observing that volumetric rendering is inherently differentiable for implicit representations allows us to formulate an analytic expression for the gradients of the depth with respect to the network parameters. Our experiments show that DVR enables us to learn implicit 3D shape representations from multi-view imagery without 3D + +
Trim Param.AccuracyCompletenessChamfer-L1
Tola [78] + sPSR02.4091.2421.826
Furu [18] + sPSR02.1460.8881.517
Colmap [67] + sPSR01.8810.7261.303
Camp [9] + sPSR02.2130.6701.441
Tola [78] + sPSR51.5311.2671.399
Furu [18] + sPSR51.7330.8881.311
Colmap [67] + sPSR51.4000.7821.091
Camp [9] + sPSR51.9910.6701.331
Tola [78] + sPSR70.3961.4240.910
Furu [18] + sPSR70.7230.9550.839
Colmap [67] + sPSR70.4461.0200.733
Camp [9] + sPSR71.4660.7191.092
Ours (LRGB)-1.0540.7600.907
Ours (LRGB + LDepth)-0.7890.7750.782
+ +Table 2: Multi-View Stereo. We show quantitative results for scans 65, 106, and 118 on the DTU dataset. For the baselines, we perform screened Poisson surface reconstruction (sPSR) [34] with trim parameters 0, 5, and 7 to obtain the final output. It shows that our generic method achieves results comparable to the highly optimized MVS methods. + +supervision, rivaling models that are learned with full 3D supervision. Moreover, we found that our model can also be used for multi-view 3D reconstruction. We believe that DVR is a useful technique that broadens the scope of applications of implicit shape and texture representations. + +In the future, we plan to investigate how to circumvent the need for object masks and camera information, e.g., by predicting soft masks and how to estimate not only texture but also more complex material properties. + +# Acknowledgments + +This work was supported by an NVIDIA research gift. The authors thank the International Max Planck Research School for Intelligent Systems (IMPRS-IS) for supporting Michael Niemeyer. + +# References + +[1] Henrik Aanaes, Rasmus R. Jensen, George Vogiatzis, Engin Tola, and Anders B. Dahl. Large-scale data for multiple-view stereopsis. International Journal of Computer Vision (IJCV), 120(2):153-168, 2016. 7, 8 +[2] Panos Achlioptas, Olga Diamanti, Ioannis Mitliagkas, and Leonidas J. Guibas. Learning representations and generative models for 3D point clouds. In Proc. of the International Conf. on Machine learning (ICML), 2018. 2 +[3] Matan Atzmon, Niv Haim, Lior Yariv, Ofer Israelov, Haggai Maron, and Yaron Lipman. Controlling neural level sets. In Advances in Neural Information Processing Systems (NIPS), 2019. 2, 4 +[4] Bruce G. Baumgart. Geometric Modeling for Computer Vision. Stanford University, 1974. 1 +[5] Michael Bleyer, Christoph Rhemann, and Carsten Rother. Patchmatch stereo - stereo matching with slanted support windows. In Proc. of the British Machine Vision Conf. (BMVC), 2011. 2 +[6] Jeremy S. De Bonet and Paul Viola. Poxels: Probabilistic voxelized volume reconstruction. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 1999. 2 +[7] Adrian Broadhurst, Tom W. Drummond, and Roberto Cipolla. A probabilistic framework for space carving. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2001. 2 +[8] André Brock, Theodore Lim, James M. Ritchie, and Nick Weston. Generative and discriminative voxel modeling with convolutional neural networks. arXiv.org, 1608.04236, 2016. 2 +[9] Neill D.F. Campbell, George Vogiatzis, Carlos Hernández, and Roberto Cipolla. Using multiple hypotheses to improve depth-maps for multi-view stereo. In Proc. of the European Conf. on Computer Vision (ECCV), 2008. 7, 8 +[10] Angel X. Chang, Thomas A. Funkhouser, Leonidas J. Guibas, Pat Hanrahan, Qi-Xing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, Jianxiong Xiao, Li Yi, and Fisher Yu. Shapenet: An information-rich 3d model repository. arXiv.org, 1512.03012, 2015. 6 +[11] Wenzheng Chen, Huan Ling, Jun Gao, Edward Smith, Jaako Lehtinen, Alec Jacobson, and Sanja Fidler. Learning to predict 3d objects with an interpolation-based differentiable renderer. In Advances in Neural Information Processing Systems (NIPS), 2019. 1, 2 +[12] Zhiqin Chen and Hao Zhang. Learning implicit fields for generative shape modeling. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2, 3 +[13] Christopher B. Choy, Danfei Xu, JunYoung Gwak, Kevin Chen, and Silvio Savarese. 3d-r2n2: A unified approach for single and multi-view 3d object reconstruction. In Proc. of the European Conf. on Computer Vision (ECCV), 2016. 1, 2, 6, 7 +[14] Brian Curless and Marc Levoy. A volumetric method for building complex models from range images. In ACM Trans. on Graphics, 1996. 2 + +[15] Valentin Deschaintre, Miika Aittala, Frédo Durand, George Drettakis, and Adrien Bousseau. Single-image SVBRDF capture with a rendering-aware deep network. In ACM Trans. on Graphics, 2018. 1 +[16] Simon Donne and Andreas Geiger. Learning non-volumetric depth fusion using successive reprojections. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2019. 2 +[17] Haoqiang Fan, Hao Su, and Leonidas J. Guibas. A point set generation network for 3d object reconstruction from a single image. Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2017. 1, 2 +[18] Yasutaka Furukawa and Jean Ponce. Accurate, dense, and robust multiview stereopsis. IEEE Trans. on Pattern Analysis and Machine Intelligence (PAMI), 32(8):1362-1376, 2010. 7, 8 +[19] Matheus Gadelha, Subhransu Maji, and Rui Wang. 3d shape induction from 2d views of multiple objects. In Proc. of the International Conf. on 3D Vision (3DV), 2017. 2 +[20] Silvano Galliani, Katrin Lasinger, and Konrad Schindler. Gipuma: Massively parallel multi-view stereo reconstruction. Publicationen der Deutschen Gesellschaft für Photogrammetrie, Fernerkundung und Geoinformation e. V, 25:361-369, 2016. 2 +[21] Kyle Genova, Forrester Cole, Aaron Maschinot, Aaron Sarna, Daniel Vlasic, and William T. Freeman. Unsupervised training for 3d morphable model regression. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2018. 1, 2 +[22] Kyle Genova, Forrester Cole, Daniel Vlasic, Aaron Sarna, William T. Freeman, and Thomas Funkhouser. Learning shape templates with structured implicit functions. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2019. 2 +[23] Ben Graham. Sparse 3d convolutional neural networks. In Proc. of the British Machine Vision Conf. (BMVC), 2015. 2 +[24] Thibault Groueix, Matthew Fisher, Vladimir G. Kim, Bryan C. Russell, and Mathieu Aubry. AtlasNet: A papier-mâché approach to learning 3d surface generation. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2018. 1, 2 +[25] Richard Hartley and Andrew Zisserman. Multiple view geometry in computer vision. Cambridge university press, 2003. 2 +[26] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2016. 5 +[27] Paul Henderson and Vittorio Ferrari. Learning to generate and reconstruct 3d meshes with only 2d supervision. In Proc. of the British Machine Vision Conf. (BMVC), 2018. 2 +[28] Paul Henderson and Vittorio Ferrari. Learning single-image 3d reconstruction by generative modelling of shape, pose and shading. International Journal of Computer Vision (IJCV), 2019. 2 +[29] Po-Han Huang, Kevin Matzen, Johannes Kopf, Narendra Ahuja, and Jia-Bin Huang. Deepmvs: Learning multi-view + +stereopsis. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[30] Zeng Huang, Tianye Li, Weikai Chen, Yajie Zhao, Jun Xing, Chloe LeGendre, Linjie Luo, Chongyang Ma, and Hao Li. Deep volumetric video from very sparse multi-view performance capture. In Proc. of the European Conf. on Computer Vision (ECCV), 2018. 2 +[31] Li Jiang, Shaoshuai Shi, Xiaojuan Qi, and Jiaya Jia. GAL: geometric adversarial loss for single-view 3d-object reconstruction. In Proc. of the European Conf. on Computer Vision (ECCV), 2018. 2 +[32] Angjoo Kanazawa, Shubham Tulsiani, Alexei A. Efros, and Jitendra Malik. Learning category-specific mesh reconstruction from image collections. In Proc. of the European Conf. on Computer Vision (ECCV), 2018. 2 +[33] Hiroharu Kato, Yoshitaka Ushiku, and Tatsuya Harada. Neural 3d mesh renderer. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2018. 1, 2, 6 +[34] Michael M. Kazhdan and Hugues Hoppe. Screenedoisson surface reconstruction. ACM Trans. on Graphics, 32(3):29, 2013.7,8 +[35] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proc. of the International Conf. on Learning Representations (ICLR), 2015. 5 +[36] Abhijit Kundu, Yin Li, and James M. Rehg. 3d-rcnn: Instance-level 3d object reconstruction via render-and-compare. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2018. 1 +[37] Kiriakos N. Kutulakos and Steven M. Seitz. A theory of shape by space carving. International Journal of Computer Vision (IJCV), 38(3):199-218, 2000. 2 +[38] Aldo Laurentini. The visual hull concept for silhouette-based image understanding. IEEE Trans. on Pattern Analysis and Machine Intelligence (PAMI), 16(2):150-162, 1994. 8 +[39] Vincent Leroy, Jean-Sébastien Franco, and Edmond Boyer. Shape reconstruction using volume sweeping and learned photoconsistency. In Proc. of the European Conf. on Computer Vision (ECCV), 2018. 2 +[40] Kejie Li, Trung Pham, Huangying Zhan, and Ian D. Reid. Efficient dense point cloud object reconstruction using deformation vector fields. In Proc. of the European Conf. on Computer Vision (ECCV), 2018. 2 +[41] Yiyi Liao, Simon Donne, and Andreas Geiger. Deep marching cubes: Learning explicit surface representations. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2018. 1, 2 +[42] Yiyi Liao, Katja Schwarz, Lars Mescheder, and Andreas Geiger. Towards unsupervised learning of generative models for 3d controllable image synthesis. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2020. 2 +[43] Guilin Liu, Duygu Ceylan, Ersin Yumer, Jimei Yang, and Jyh-Ming Lien. Material editing using a physically based rendering network. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2017. 1 +[44] Shichen Liu, Weikai Chen, Tianye Li, and Hao Li. Soft rasterizer: Differentiable rendering for unsupervised single-view mesh reconstruction. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2019. 1, 2, 6, 7 + +[45] Shichen Liu, Shunsuke Saito, Weikai Chen, and Hao Li. Learning to infer implicit surfaces without 3d supervision. In Advances in Neural Information Processing Systems (NIPS), 2019. 2 +[46] Stephen Lombardi, Tomas Simon, Jason Saragih, Gabriel Schwartz, Andreas Lehrmann, and Yaser Sheikh. Neural volumes: Learning dynamic renderable volumes from images. In ACM Trans. on Graphics, 2019. 2 +[47] Matthew M. Loper and Michael J. Black. Opendr: An approximate differentiable renderer. In Proc. of the European Conf. on Computer Vision (ECCV), 2014. 1, 2 +[48] Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3d reconstruction in function space. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2, 3, 6, 7 +[49] Mateusz Michalkiewicz, Jhony K. Pontes, Dominic Jack, Mahsa Baktashmotlagh, and Anders Eriksson. Implicit surface representations as layers in neural networks. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2019. 1, 2 +[50] Thu Nguyen-Phuoc, Chuan Li, Stephen Balaban, and Yong-Liang Yang. Rendernet: A deep convolutional network for differentiable rendering from 3d shapes. In Advances in Neural Information Processing Systems (NIPS), 2018. 1, 2 +[51] Thu Nguyen-Phuoc, Chuan Li, Lucas Theis, Christian Richardt, and Yong-Liang Yang. Hologan: Unsupervised learning of 3d representations from natural images. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2019. 2 +[52] Thu Nguyen-Phuoc, Christian Richardt, Long Mai, Yong-Liang Yang, and Niloy Mitra. Blockgan: Learning 3d object-aware scene representations from unlabelled images. arXiv.org, 2020. 2 +[53] Michael Niemeyer, Lars Mescheder, Michael Oechsle, and Andreas Geiger. Occupancy flow: 4d reconstruction by learning particle dynamics. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2019. 2 +[54] Michael Oechsle, Lars Mescheder, Michael Niemeyer, Thilo Strauss, and Andreas Geiger. Texture fields: Learning texture representations in function space. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2019. 1, 2, 3 +[55] Junyi Pan, Xiaoguang Han, Weikai Chen, Jiapeng Tang, and Kui Jia. Deep mesh reconstruction from single rgb images via topology modification networks. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2019. 2 +[56] Jeong J. Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2, 3 +[57] Despoina Paschalidou, Ali Osman Ulusoy, and Andreas Geiger. Superquadrics revisited: Learning 3d shape parsing beyond cuboids. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2019. 2 + +[58] Despoina Paschalidou, Ali Osman Ulusoy, Carolin Schmitt, Luc van Gool, and Andreas Geiger. Raynet: Learning volumetric 3d reconstruction with ray potentials. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2018. 1, 2, 4 +[59] Felix Petersen, Amit H. Bermano, Oliver Deussen, and Daniel Cohen-Or. Pix2vex: Image-to-geometry reconstruction using a smooth differentiable renderer. arXiv.org, 2019. 1 +[60] Andrew Prock and Chuck Dyer. Towards real-time voxel coloring. In Proceedings of the DARPA Image Understanding Workshop, 1998. 2 +[61] Danilo Jimenez Rezende, S. M. Ali Eslami, Shakir Mohamed, Peter Battaglia, Max Jaderberg, and Nicolas Heess. Unsupervised learning of 3d structure from images. In Advances in Neural Information Processing Systems (NIPS), 2016. 2 +[62] Elad Richardson, Matan Sela, Roy Or-El, and Ron Kimmel. Learning detailed face reconstruction from a single image. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2017. 1 +[63] Gernot Riegler, Ali Osman Ulusoy, Horst Bischof, and Andreas Geiger. OctNetFusion: Learning depth fusion from data. In Proc. of the International Conf. on 3D Vision (3DV), 2017. 2 +[64] Gernot Riegler, Ali Osman Ulusoy, and Andreas Geiger. Octnet: Learning deep 3d representations at high resolutions. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2017. 1, 2 +[65] Walter Rudin et al. Principles of mathematical analysis, volume 3. McGraw-hill New York, 1964. 4 +[66] Shunsuke Saito, Zeng Huang, Ryota Natsume, Shigeo Morishima, Angjoo Kanazawa, and Hao Li. Pifu: Pixel-aligned implicit function for high-resolution clothed human digitization. Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2019. 1, 2, 3 +[67] Johannes L. Schonberger and Jan-Michael Frahm. Structure-from-motion revisited. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2016. 7, 8 +[68] Johannes L. Schonberger, Enliang Zheng, Marc Pollefeys, and Jan-Michael Frahm. Pixelwise view selection for unstructured multi-view stereo. In Proc. of the European Conf. on Computer Vision (ECCV), 2016. 2 +[69] Steven M. Seitz, Brian Curless, James Diebel, Daniel Scharstein, and Richard Szeliski. A comparison and evaluation of multi-view stereo reconstruction algorithms. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2006. 2 +[70] Steven M. Seitz and Charles R. Dyer. Photorealistic scene reconstruction by voxel coloring. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 1997. 2 +[71] Vincent Sitzmann, Justus Thies, Felix Heide, Matthias Nießner, Gordon Wetzstein, and Michael Zollhöfer. Deepvoxels: Learning persistent 3d feature embeddings. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), pages 2437-2446, 2019. 2 + +[72] Vincent Sitzmann, Michael Zollhöfer, and Gordon Wetzstein. Scene representation networks: Continuous 3d-structure-aware neural scene representations. In Advances in Neural Information Processing Systems (NIPS), 2019. 2 +[73] David Stutz and Andreas Geiger. Learning 3d shape completion from laser scan data with weak supervision. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[74] Maxim Tatarchenko, Alexey Dosovitskiy, and Thomas Brox. Octree generating networks: Efficient convolutional architectures for high-resolution 3d outputs. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2017. 2 +[75] Ayush Tewari, Michael Zollhöfer, Pablo Garrido, Florian Bernard, Hyeongwoo Kim, Patrick Pérez, and Christian Theobalt. Self-supervised multi-level face model learning for monocular reconstruction at over 250 hz. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2018. 1 +[76] Ayush Tewari, Michael Zollhöfer, Hyeongwoo Kim, Pablo Garrido, Florian Bernard, Patrick Pérez, and Christian Theobalt. Mofa: Model-based deep convolutional face autoencoder for unsupervised monocular reconstruction. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2017. 1 +[77] Hugues Thomas, Charles R. Qi, Jean-Emmanuel Deschaud, Beatrix Marcotegui, François Goulette, and Leonidas J. Guibas. Kpconv: Flexible and deformable convolution for point clouds. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2019. 2 +[78] Engin Tola, Christoph Strecha, and Pascal Fua. Efficient large-scale multi-view stereo for ultra high-resolution image sets. Machine Vision and Applications (MVA), 23(5):903-920, 2012. 7, 8 +[79] Shubham Tulsiani, Tinghui Zhou, Alexei A. Efros, and Jitendra Malik. Multi-view supervision for single-view reconstruction via differentiable ray consistency. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2017. 1, 2, 4, 6, 7 +[80] Nanyang Wang, Yinda Zhang, Zhuwen Li, Yanwei Fu, Wei Liu, and Yu-Gang Jiang. Pixel2Mesh: Generating 3D mesh models from single RGB images. In Proc. of the European Conf. on Computer Vision (ECCV), 2018. 1, 2, 6, 7 +[81] Weiyue Wang, Xu Qiangeng, Duygu Ceylan, Radomir Mech, and Ulrich Neumann. DISN: Deep implicit surface network for high-quality single-view 3d reconstruction. Advances in Neural Information Processing Systems (NIPS), 2019. 2 +[82] Jiajun Wu, Chengkai Zhang, Tianfan Xue, Bill Freeman, and Josh Tenenbaum. Learning a probabilistic latent space of object shapes via 3d generative-adversarial modeling. In Advances in Neural Information Processing Systems (NIPS), 2016. 2 +[83] Haozhe Xie, Hongxun Yao, Xiaoshuai Sun, Shangchen Zhou, and Shengping Zhang. Pix2vox: Context-aware 3d reconstruction from single and multi-view images. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2019. 2 + +[84] Xinchen Yan, Jimei Yang, Ersin Yumer, Yijie Guo, and Honglak Lee. Perspective transformer nets: Learning single-view 3d object reconstruction without 3d supervision. In Advances in Neural Information Processing Systems (NIPS), 2016. 6 +[85] Guandao Yang, Xun Huang, Zekun Hao, Ming-Yu Liu, Serge Belongie, and Bharath Hariharan. Pointflow: 3d point cloud generation with continuous normalizing flows. In Proc. of the IEEE International Conf. on Computer Vision (ICCV), 2019. 2 +[86] Yao Yao, Zixin Luo, Shiwei Li, Tian Fang, and Long Quan. Mvsnet: Depth inference for unstructured multi-view stereo. In Proc. of the European Conf. on Computer Vision (ECCV), 2018. 2 +[87] Yao Yao, Zixin Luo, Shiwei Li, Tianwei Shen, Tian Fang, and Long Quan. Recurrent mvsnet for high-resolution multi-view stereo depth inference. Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2019. 2 +[88] Jacek Zienkiewicz, Andrew J. Davison, and Stefan Leutenegger. Real-time height map fusion using differentiable rendering. In Proc. IEEE International Conf. on Intelligent Robots and Systems (IROS), 2016. 1, 2 \ No newline at end of file diff --git a/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/images.zip b/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..4e913acf420be88e7f50d845a274b44245884fed --- /dev/null +++ b/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a33b966a389173265d2d6205afbf8c8e6090691fa566b76ffe85f1cf41a77de8 +size 429713 diff --git a/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/layout.json b/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0f03ea9d9ba0ca3cf06c038d79a5ea7e031d3804 --- /dev/null +++ b/differentiablevolumetricrenderinglearningimplicit3drepresentationswithout3dsupervision/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36c65165bcbc35d49a1fbd6aef70e3d021c450680f6a820bf999bb2aa1c5d190 +size 587889 diff --git a/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/02f64585-96ec-4042-8b81-c90c570ccde5_content_list.json b/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/02f64585-96ec-4042-8b81-c90c570ccde5_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a15c42a88b35b6fa944d93c82df7ff8baa4a0094 --- /dev/null +++ b/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/02f64585-96ec-4042-8b81-c90c570ccde5_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ef02faf8f861f9f2bf7f08fae1a8730138f9dd024eb8f5039513e622bb3af5f +size 86185 diff --git a/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/02f64585-96ec-4042-8b81-c90c570ccde5_model.json b/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/02f64585-96ec-4042-8b81-c90c570ccde5_model.json new file mode 100644 index 0000000000000000000000000000000000000000..5d0bb6231d049c110620c00e1dbe5f55d46e8dcd --- /dev/null +++ b/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/02f64585-96ec-4042-8b81-c90c570ccde5_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:378f31419976e06ab90f04373b9ec9d0f993d1ff6e6f4bb5c6c5391170487225 +size 102596 diff --git a/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/02f64585-96ec-4042-8b81-c90c570ccde5_origin.pdf b/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/02f64585-96ec-4042-8b81-c90c570ccde5_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4f511147716af6d9414b10c73e84a3f756b03604 --- /dev/null +++ b/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/02f64585-96ec-4042-8b81-c90c570ccde5_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7eb554e70f4eaf6d8223b284784e773612f1440fe0d4d87959ed403a57b0ab9 +size 982556 diff --git a/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/full.md b/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..970fc6f7fe1fccf94e477f1c8ef9700088f5492b --- /dev/null +++ b/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/full.md @@ -0,0 +1,367 @@ +# Differential Treatment for Stuff and Things: A Simple Unsupervised Domain Adaptation Method for Semantic Segmentation + +Zhonghao Wang $^{1}$ , Mo Yu $^{2}$ , Yunchao Wei $^{3}$ , Rogerio Feris $^{2}$ , Jinjun Xiong $^{2}$ , Wen-mei Hwu $^{1}$ , Thomas S. Huang $^{1}$ , Honghui Shi $^{4,1}$ + +$^{1}$ C3SR, UIUC, $^{2}$ IBM Research, $^{3}$ ReLER, UTS, $^{4}$ University of Oregon + +# Abstract + +We consider the problem of unsupervised domain adaptation for semantic segmentation by easing the domain shift between the source domain (synthetic data) and the target domain (real data) in this work. State-of-the-art approaches prove that performing semantic-level alignment is helpful in tackling the domain shift issue. Based on the observation that stuff categories usually share similar appearances across images of different domains while things (i.e. object instances) have much larger differences, we propose to improve the semantic-level alignment with different strategies for stuff regions and for things: 1) for the stuff categories, we generate feature representation for each class and conduct the alignment operation from the target domain to the source domain; 2) for the thing categories, we generate feature representation for each individual instance and encourage the instance in the target domain to align with the most similar one in the source domain. In this way, the individual differences within thing categories will also be considered to alleviate over-alignment. In addition to our proposed method, we further reveal the reason why the current adversarial loss is often unstable in minimizing the distribution discrepancy and show that our method can help ease this issue by minimizing the most similar stuff and instance features between the source and the target domains. We conduct extensive experiments in two unsupervised domain adaptation tasks, i.e. $GTA5 \rightarrow Cityscapes$ and $SYNTHIA \rightarrow Cityscapes$ , and achieve the new state-of-the-art segmentation accuracy. + +# 1. Introduction + +Semantic segmentation [28] enables image scene understanding at the pixel level, which is crucial to many real-world applications such as autonomous driving. The recent surge of deep learning [25] methods that generate features from large training datasets has significantly accelerated the progress in semantic segmentation [3, 4, 45, 5, 18, 19, 7, 39, + +![](images/48c65e39442b34f448fc0adbb91c19344ce8fa48fdc96d87463b21432a9c6a98.jpg) +Figure 1. Illustration of the proposed Stuff Instance Matching (SIM) structure. By matching the most similar stuff regions and things (i.e., instances) with differential treatment, we can adapt the features more accurately from the source domain to the target domain. + +![](images/8aae7b6102e38057bf288fb7b4de634827850968837a4a74e2c92a035fbb5f9c.jpg) + +8, 21, 31]. However, collecting data with pixel-level annotation is costly in terms of both time and money. Specifically, to annotate an image in the widely used benchmark Cityscapes [10] takes 1.5 hours on average; that sums up to 7,500 hours in total for annotating all the 5,000 images. Such annotation cost is quite burdensome, given that training deep neural networks on the collected data usually takes less than dozens of hours. + +To address the problem of high-cost annotation, unsupervised domain adaptation methods are proposed for semantic segmentation [32, 33]. In these works, a model trained on a source domain dataset with segmentation annotations is adapted for an unlabeled target domain. The source domain datasets can be synthetic, e.g., from video games, so that little human effort is required. However, such methods suffer from the domain shift problem. Existing methods deal with the problem by minimizing the distribution discrepancy of the features extracted by a feature extractor [36, 14] between the source domain and the target domain. To this end, the GAN [13] architectures, usually composed + +of a generator and a discriminator, are broadly used in this context. The generator extracts features from the input images, and the discriminator distinguishes which domain the features are generated from. The discriminator can thereby guide the generator to generate the target domain features with a distribution closer to the feature distribution of the source domain in an adversarial way. + +In the previous GAN-style approaches, the adversarial loss is essentially a binary cross-entropy about whether the generated feature is from the source domain. We observe that such a global training signal is usually weak for the segmentation task. First, the alignments between stuff regions and between things require different treatments but the adversarial loss lacks such structural information. For example, the stuff regions usually lack the appearance variance in an image but the things can have diverse appearances in the same image. Therefore, it is sub-optimal to use an adversarial loss to align the stuff and thing features globally without differential treatments. Second, the global GAN structure only adapts the feature distribution between two domains and does not necessarily adapt the target domain features towards the most likely space of source domain features. Therefore, as the semantic head gathers the features from the source domain with more training iterations, it becomes harder for the feature generator to adapt the target domain features exactly toward the source domain features. This leads to a performance drop on the target domain images as shown in figure 2. + +This paper proposes a stuff and instance matching (SIM) framework to address the aforementioned difficulties. First, we treat the alignments between stuff regions and between instances of things with different guidance. The key idea is shown in figure 1. The multiple stuff regions in a source image are usually similar, so the stuff from different domains can be directly aligned with their global feature vectors. While the multiple instances of the same thing, e.g., of the car category, can be diverse in the source image. Therefore we align instances in the target image to the most similar ones in the source image. + +Second, we deal with the instability with the GAN training framework, we apply a L1 loss to explicitly minimize the distance between the target domain stuff and thing features with the most similar source domain counterparts. In this way, the adaptation is processed in a more accurate direction, instead of the rough distribution matching when using only the adversarial cross entropy loss, even after the semantic head gathers the source domain features with longer training iterations. As shown in figure 2, we implement the output space adversarial adaptation [37] from GTA5 [32] dataset to Cityscapes [10] dataset, and compare it with our model which adds the SIM module. We successfully solve the problem of the performance drop at longer training iterations with few more computations. + +![](images/83f85e7cf2fbdb295c2d4cd6a9f06cebf8294c6153d45d2b7db23406bf365975.jpg) +Figure 2. mIoU comparison on the validation set of Cityscapes by adapting from GTA5 dataset to Cityscapes dataset. The blue line corresponds to the output space adversarial adaptation strategy [37]. The orange line corresponds to the output space adversarial adaptation combined with our proposed SIM structure. The model performance is tested every 5000 iterations. + +Finally, we propose to improve the SIM framework with a self-supervised learning strategy. Specifically, we use predicted segmentation with high confidence to train the segmentation model, and to enhance the alignment for both stuff categories and thing categories. + +We evaluate the proposed approach on two unsupervised domain adaptation tasks, the adaptation from GTA5 to Cityscapes and from SYNTHIA to Cityscapes, and achieve a new state-of-the-art performance on both tasks. + +# 2. Related works + +The domain adaptation in classification is a broadly studied problem after the surge of deep learning methods and a big progress has been made [43]. However, the domain adaptation in semantic segmentation problem is more challenging as it is in essence a pixel-level classification problem involving structured contextual semantic adaptation. A typical practice of this task is adapting a semantic segmentation model trained on synthetic datasets [32, 33] (source domain) to perform on real image datasets [10] (target domain). The key idea of the domain adaptation task is to align the feature distributions between the source domain and the target domain, so that the model can utilize the knowledge learned from the source domain to perform tasks on the target domain. We generally divide current methods into three categories: image-level transferring, feature-level transferring and label-level transferring. + +The image-level transferring refers to changing the appearance of images such that images from the source domain and the target domain are more visually similar. These methods [26, 41, 44] usually transfer the color, illumination and other stylization factors of images from one domain to another or from both domains to a neutral domain. In [26], Li et al. use CycleGAN [46] with a perceptual loss to preserve the locality of semantic information to perform the unpaired image-to-image transferring. In [44], Zhang et al. propose an Appearance Adaptation Network which transfers appearances of images between two domains mutually, such that the images appearance tend to be domain- + +![](images/cc959516846d3fbc406bb0da0abb9f79bda1cdc7fd3b0323abbe4643b1cca5d4.jpg) +Figure 3. Framework. 1) The overall structure is shown on the left. The solid lines represent the first step training procedure in Eqn (12), and the dash lines along with the solid lines represent the second step training procedure in Eqn (13). The blue lines correspond to the flow direction of the source domain data, and the orange lines correspond to the flow direction of target domain data. $\cap$ is an operation defined in Eqn (4); $+$ is an operation defined in Eqn (11) and is only effective in the second step training procedure. 2) The specific module design is shown on the right. $h$ , $w$ and $c$ represent the height, width and channels for the feature maps; $H$ , $W$ and $n$ represent the height, width and class number for the output maps of the semantic head. For SH, the input ground truth label map supervise the the semantic segmentation task, and the semantic head also generates a predicted label map joining the operations of $\cap$ and $+$ . For SM and IM, the grey dash lines represent the matching operation defined in Eqn (6) and (8) respectively. + +![](images/44a511eef739d2f018c50b7a0c1895efaa2339c93cb038fc42c53617e48f76eb.jpg) + +![](images/d77af43ba8433229cc54aaa80d9013eb95dfffea3739893e1f1a248060b0f241.jpg) + +![](images/9e8afe79d746edafc5f2ae03170a3f7e3340c2af7001ace78636d9a3a0ebdb86.jpg) + +![](images/195a6eccc20f999b73aef8b06a1f086d002cde104e22bbeb1602a11fd5941515.jpg) + +invariant. Choi et al. [9] raise a GAN-based self-ensembling data augmentation method for domain alignment. + +The feature-level transferring refers to matching the extracted feature distributions between the source domain and the target domain. While feature extractors [36, 14, 17] can extract task-specific features, the features extracted from the target domain and the ones from the source domain have a discrepancy due to the domain shift, which negatively impacts the model's performance on the target domain dataset. Therefore, minimizing the feature distribution discrepancy with GAN [13] structure is a common practice in domain adaptation. Sankaranarayanan et al. proposes an image reconstruction framework [35] to make the reconstructed images from two domains close to each other so that the features are pulled closer with back propagation. Tsai and et al. proposes a simple end-to-end output space domain adaptation framework [37]. Wu and et al. proposes a channelwise feature alignment network [41] to close the gap of the channel-wise mean and standard deviation in CNN feature maps. Chang and et al. propose a framework [2] to extract domain-invariant structures for adaptation. + +The label-level transferring refers to giving pseudolabels to the target domain dataset given the knowledge learned from the source domain for helping the adaptation task. This follows a self-supervised learning framework [22] where no human efforts are input for labeling the tar + +get dataset. Zou et al. [47] proposes a class-balanced self-training framework. Li et al. [26] proposes a joint self-learning and image transferring framework for adaptation. + +# 3. Background + +**Definitions** We follow the unsupervised semantic segmentation framework for the domain adaptation task; that is, given a source domain dataset with images and the pixel-level semantic annotations $\{x_i^s, y_i^s\}$ and a target domain dataset with only images $\{x_i^t\}$ , we plan to train a model that can predict the pixel-level labels $\{\hat{y}_i^t\}$ for the target domain images. We denote the class number with $N$ . + +Segmentation and adversarial adaptation The semantic segmentation task in deep learning literature is broadly discussed [3, 4, 45, 5], and the problem solving strategy is formalized by utilizing a feature extractor network $F$ to extract image features and a classification head $C$ to classify features into semantic classes. We use the cross entropy loss to supervise the model on the pixel classification task with the annotated source domain dataset in Eqn (1). + +$$ +\mathfrak {L} _ {\text {s e g}} ^ {S} \left(f _ {i} ^ {s}\right) = - \sum_ {i, h, w} \sum_ {k \in N} y _ {i} ^ {(h, w)} \log \left(\mathcal {S} \left(C \left(f _ {i} ^ {s}\right) ^ {(h, w)}\right) ^ {(k)}\right) \tag {1} +$$ + +where $f_{i}^{s} = F(x_{i}^{s})$ , $x_{i}^{s} \in X^{s}$ , $X^{s}$ is the source domain image dataset, $h$ and $w$ are the height and width of the feature maps, $y$ is the ground truth label, $S$ is the softmax + +operation. However, due to the domain shift problem, the model trained on the source domain will achieve inferior performance if directly applied to test on the target domain. Therefore, we impose a traditional GAN structure on the output space [37] to globally minimize the feature distribution discrepancy between the source domain and the target domain. Here, the feature extractor $F$ and the classification head $C$ serve as the generator $G$ where $G = C \circ F$ . A discriminator $D$ will discriminate the generated output by the generator $G$ . We close the feature distribution discrepancy between the source domain and the target domain by optimizing the adversarial target function in Eqn (2). + +$$ +\min _ {G} \mathfrak {L} _ {a d v} (G, D) = - \sum_ {x _ {i} ^ {t} \in X ^ {T}} \log \left(1 - D \left(\mathcal {S} \left(G \left(x _ {i} ^ {t}\right)\right)\right)\right) \tag {2} +$$ + +while the discriminator tries to distinguish which domain the feature is from by optimizing the discriminator target function in Eqn (3). + +$$ +\begin{array}{l} \min _ {D} \mathfrak {L} _ {D} (G, D) = - \sum_ {x _ {i} ^ {t} \in X ^ {T}} \log (D (\mathcal {S} (G (x _ {i} ^ {t}))) \\ - \sum_ {x _ {j} ^ {t} \in X ^ {S}} \log (1 - D (\mathcal {S} (G (x _ {j} ^ {s})))) \end{array} \tag {3} +$$ + +# 4. Proposed Methods + +The key idea of our method is that the past experience leading to good outcomes should also help the current training process. Specifically to our task, the past experience should help both the feature-level transferring and the label-level transferring from the source domain to the target domain. First, we raise a stuff and instance matching (SIM) framework to reduce the intra-class domain shift problem. Second, we propose a self-supervised learning framework combined with our proposed SIM structure to enable the label-level transferring, which further boosts the performance. The overall framework is shown in figure 3. + +# 4.1. Stuff and instance matching (SIM) + +First, we discuss the matching process for the background classes such as road, sidewalk, sky and etc.. These classes usually cover a large area of the image and lack appearance variation, so we only extract the image-level stuff feature representation for them. For each source domain image, we access the correctly classified label map by selecting the predicted labels matched with the ground truth labels in Eqn (4). + +$$ +L _ {P _ {i}} ^ {s} = \underset {k \in N} {\operatorname {a r g m a x}} \left(C \left(f _ {i} ^ {s}\right) ^ {(k)}\right) \tag {4} +$$ + +$$ +L _ {C _ {i}} ^ {s} = L _ {G _ {i}} ^ {s} \cap L _ {P _ {i}} ^ {s} +$$ + +where $L_{C_i}^s$ is the correctly classified label map, $L_{G_i}^s$ is the ground truth label map, $L_{P_i}^s$ is the predicted label map, and $i \in \{1..|X^S|\}$ . We average the features belonging to + +the same background semantic class across the width and height of the image as the stuff representation for each background class in Eqn (5). + +$$ +\mathcal {A} ^ {b} (L, f) = \frac {\sum_ {h , w} \delta \left(L ^ {(h , w)} - b\right) f ^ {(h , w)}}{\max \left(\epsilon , \sum_ {h , w} \delta \left(L ^ {(h , w)} - b\right)\right)} \tag {5} +$$ + +$$ +S _ {j} ^ {b} = \mathcal {A} ^ {b} \left(L _ {C _ {i}} ^ {s}, f _ {i} ^ {s}\right) \text {w h e r e} j = i \operatorname {m o d} w, +$$ + +$$ +\text {i f} \mathcal {A} ^ {b} \left(L _ {C _ {i}} ^ {s}, f _ {i} ^ {s}\right) \neq 0 +$$ + +where $S_{j}^{b}$ is the $j$ 'th source domain semantic feature sample of class $b$ , $b \in B$ (background classes), $i \in \{1..|X^{S}|\}$ , $w$ is the number of feature samples to be stored for each class, $\delta$ is the Dirac delta function and $\epsilon$ is a regularizing term. For each target domain image, we minimize the distance of the stuff representation of each background class with the closest intra-class source stuff feature representation. Because the ground truth of the target domain image is not provided, we use the predicted label map to generate the stuff feature representation for each background class. We adapt the stuff feature representation of the background classes by minimizing the loss function defined in Eqn (6) when the model is trained on the target domain. + +$$ +\mathfrak {L} _ {s t f} = \sum_ {i} \sum_ {b} \min _ {j} \left\| \mathcal {A} ^ {b} \left(L _ {P _ {i}} ^ {t}, f _ {i} ^ {t}\right) - S _ {j} ^ {b} \right\| _ {1} ^ {1} \tag {6} +$$ + +where $i\in \{1..|X^T |\}$ , and $b\in L_{P_i}^t\cap B$ + +Second, we discuss the instance matching process for the foreground classes such as cars, persons and etc.. Because the ground truth does not provide the instance level annotations, we generate the foreground instance mask by finding the disconnected regions for each foreground class in the label map $L$ . This coarsely segment the intra-class semantic regions into multiple instances, and thus various instance-level feature representations of one image can be generated accordingly in Eqn (7). + +$$ +R _ {k} = \left\{r _ {k _ {1}}, r _ {k _ {2}}, \dots , r _ {k _ {m}} \right\} = \mathcal {T} (L, k) +$$ + +$$ +\mathcal {I} (r, f) = \frac {\sum_ {h , w} r ^ {(h , w)} f ^ {(h , w)}}{\max \left(\epsilon , \sum_ {h , w} r ^ {(h , w)}\right)} \tag {7} +$$ + +where $r_{k_i}$ is the $i$ 'th $(i \in \{1, \dots, m\})$ binary mask of the connected region belonging to class $k$ , $k \in K$ (foreground classes), $\mathcal{T}$ is the operation to find the disconnected regions of class $k$ from the label mask $L$ , and $\mathcal{I}$ is the operation to generate the instance-level feature representation. The source domain instance feature samples can be generated in algorithm 1. Therefore, the target domain instance features can be pulled closer to the closest intra-class source domain instance feature sample by minimizing the loss function in Eqn (8). + +$$ +\mathfrak {L} _ {i n s} = \sum_ {i} \sum_ {k \in K} \frac {1}{\left| R _ {k} ^ {t} \right|} \sum_ {r ^ {t} \in R _ {k} ^ {t}} \min _ {j} \left\| \mathcal {I} \left(r ^ {t}, f _ {i} ^ {t}\right) - S _ {j} ^ {k} \right\| _ {1} ^ {1} \tag {8} +$$ + +where $i\in \{1..|X^T |\}$ , and $R_{k}^{t} = \mathcal{T}(L_{P_{i}}^{t},k)$ + +Algorithm 1: Instance-level source feature samples +Result: $S^k$ $z = 10$ # maximum class instances in an image + $c_{k} = 0,\forall k\in K$ ; # instance feature counter +for $x_{i}^{s}\in X^{S}$ do for $k\in K$ do $R_{k}^{s} = \mathcal{T}(L_{C_{i}}^{s},k)$ if $R_{k}^{s}\neq \emptyset$ then $R_{sort} = \mathrm{sort}R_k^s$ by area in descent order for $l\in \{1..\min (z,|R_{sort}|)\}$ do $j = c_{k}\mod z\ast w$ $c_{k} = c_{k} + 1$ $S_j^k = \mathcal{I}(R_{sort}[l],f_i^s)$ end end +end + +# 4.2. Self-supervised learning with SIM + +Because the model is only trained on the source domain with the ground truth annotations, the features and the softmax output are thus generated to optimize the source domain segmentation loss function but ignore the target domain segmentation supervision. However, the distribution of the ground truth labels from both domains also have a discrepancy, and this negatively impacts the model's performance on the target domain. Therefore, we propose a self supervised learning framework combined with our feature matching methods to alleviate this problem. + +We first follow the framework described in sections 3 and 4.1 to train a model with the source domain images $X^S$ and ground truth annotations $Y^S$ along with the target domain images $X^T$ . Then we use the trained model to give pseudolabels to the pixels with high confidence of the predicted labels in the training set images $X^T$ shown in Eqn (9). + +$$ +\hat {y} _ {i} ^ {t} = \underset {k \in N} {\operatorname {a r g m a x}} \mathbb {1} _ {[ S (C \left(f _ {i} ^ {t}\right)) ^ {(k)} > y _ {t} ^ {k} ]} \left(C \left(f _ {i} ^ {t}\right) ^ {(k)}\right) \tag {9} +$$ + +where $\mathbb{1}$ is a function which returns the input if the condition is true or a don't care symbol if not, and $y_{t}^{k}$ is the confidence threshold for class $k$ . Then, we add the semantic segmentation loss on the target domain images in Eqn (10) along with other losses to retrain our model. + +$$ +\mathfrak {L} _ {\text {s e g}} ^ {T} \left(f ^ {t}\right) = - \sum_ {i, h, w} \sum_ {k \in N} \hat {y} _ {i} ^ {(h, w)} \log \left(\mathcal {S} \left(C \left(f _ {i} ^ {t}\right) ^ {(h, w)}\right) ^ {(k)}\right) \tag {10} +$$ + +With the pseudo labels supervising the model to generate features corresponding to specific classes, these features should generically be adapted to be closer to the corresponding intra-class source domain features. The $L_{P_i}^t$ is thereby augmented by Eqn (11) for the stuff feature adaptation loss defined in Eqn (6) and the instance feature adaptation loss defined in Eqn (8): + +$$ +\mathbb {1} _ {L _ {P _ {i}} ^ {t} \neq \hat {y} _ {i} ^ {t}} \left(L _ {P _ {i}} ^ {t}\right) = \mathbb {1} _ {L _ {P _ {i}} ^ {t} \neq \hat {y} _ {i} ^ {t}} \left(\hat {y} _ {i} ^ {t}\right). \tag {11} +$$ + +1 selects the positions in the input satisfying the condition. + +# 4.3. Training procedure + +We follow a two-step training procedure to improve the performance of the generator $G$ on semantic segmentation task on the target domain dataset. First, we train our model without the self-supervised learning module, and optimize the target function in Eqn (12) with $G$ and $D$ in an adversarial training strategy: + +$$ +\min _ {G, D} \mathfrak {L} _ {\text {s t e p 1}} = \min _ {G} \left(\lambda_ {\text {s e g}} \mathfrak {L} _ {\text {s e g}} ^ {S} + \lambda_ {\text {a d v}} \mathfrak {L} _ {\text {a d v}} + \right. +$$ + +$$ +\lambda_ {c i} \left(\mathfrak {L} _ {s t f} + \mathfrak {L} _ {i n s}\right)) + \min _ {D} \lambda_ {D} \mathfrak {L} _ {D}, +$$ + +where $\lambda$ 's are the weight parameters for the losses. Second, after giving the pseudo labels to the target domain training dataset with the model trained in the first step, we reinitialize and repeat the training process to optimize the loss function in Eqn (13). + +$$ +\begin{array}{l} \min _ {G, D} \mathfrak {L} _ {s t e p 2} = \min _ {G} (\lambda_ {s e g} (\mathfrak {L} _ {s e g} ^ {S} + \mathfrak {L} _ {s e g} ^ {T}) + \lambda_ {a d v} \mathfrak {L} _ {a d v} + \\ \lambda_ {c i} \left(\tilde {\mathfrak {L}} _ {s t f} + \tilde {\mathfrak {L}} _ {i n s}\right) + \min _ {D} \lambda_ {D} \mathfrak {L} _ {D}, \tag {13} \\ \end{array} +$$ + +where $\tilde{\mathfrak{L}}_{stf}$ and $\tilde{\mathfrak{L}}_{ins}$ are augmented with predicted $\hat{y}_i^t$ s according to Eqn (11). + +# 5. Implementation + +# 5.1. Network architecture + +Segmentation Network. We adopt ResNet-101 model [14] pre-trained on ImageNet [11] with only the 5 convolutional layers $\{conv1, res2, res3, res4, res5\}$ as the backbone network. Due to memory limit, we do not use the multi-scale fusion strategy [42]. For generating better-quality feature maps, we follow the common practice from [3, 42, 37] and twice the resolution of the feature maps of the final two layers. To enlarge the field of view, we use dilated convolutional layers [42] with stride 2 and 4 in $res4$ and $res5$ . For the classification heads, we apply an ASPP module [4] to $res5$ with $\lambda_{seg} = 1$ . + +Discriminator. Following [37], We use 5 convolutional layers with kernel size $4 \times 4$ , stride of 2 and channel number of $\{64, 128, 256, 512, 1\}$ respectively to form the network. We use a leaky ReLU [24] layer of 0.2 negative slope between adjacent convolutional layers. Due to the small batch size in the training process, we do not use batch normalization layers [20]. The sole discriminator is implemented on the upsampled softmax output of the ASPP head on res5 with $\lambda_{adv} = 0.001$ and $\lambda_{D} = 1$ . + +Table 1. Comparison to the state-of-the-art results of adapting GTA5 to Cityscapes. + +
GTA5 → Cityscapes
Methodroadsidewalk building wallfence polelight signvegetation terrain skyperson rider cartruck bustrain motorbikemIoU
Wu et al.[40]85.030.881.325.821.222.225.426.683.436.776.258.924.980.729.542.92.526.911.641.7
Tsai et al.[37]86.536.079.923.423.323.935.214.883.433.375.658.527.673.732.535.43.930.128.142.4
Saleh et al.[34]79.829.377.824.221.66.923.544.280.538.076.252.722.283.032.341.327.019.327.742.5
Luo et al. [29]88.535.479.526.324.328.532.518.381.240.076.558.125.882.630.334.43.421.621.542.6
Hong et al.[16]89.249.070.713.510.938.529.433.777.937.665.875.132.477.839.245.20.025.535.444.5
Chang et al. [2]91.547.582.531.325.633.033.725.882.728.882.762.430.885.227.734.56.425.224.445.4
Du et al. [12]90.338.981.724.822.930.537.021.284.838.876.958.830.785.730.638.15.928.336.945.4
Vu et al. [38]89.433.181.026.626.827.233.524.783.936.778.858.730.584.838.544.51.731.632.445.5
Chen et al. [6]89.443.082.130.521.330.334.724.085.339.478.263.022.984.636.443.05.534.733.546.4
Zou et al. [47]89.658.978.533.022.341.448.239.283.624.365.449.320.283.339.048.612.520.335.347.0
Lian et al. [27]90.536.384.432.428.734.636.431.586.837.978.562.321.585.627.934.818.022.949.347.4
Li et al. [26]91.044.784.234.627.630.236.036.085.043.683.058.631.683.335.349.73.328.835.648.5
ours (ResNet101)90.644.784.834.328.731.635.037.684.743.385.357.031.583.842.648.51.930.439.049.2
Du et al. [12]88.732.179.529.922.023.821.710.780.829.872.549.516.182.123.218.13.524.48.137.7
Li et al. [26]89.240.981.229.119.214.229.019.683.735.980.754.723.382.725.828.02.325.719.941.3
ours (VGG16)88.135.883.125.823.929.228.828.683.036.782.353.722.882.326.438.60.019.617.142.4
+ +# 5.2. Training Details + +We use Pytorch toolbox and a single GPU to train our network. Stochastic Gradient Descent (SGD) is used to optimize the segmentation network. We use Nesterov's method [1] with momentum 0.9 and weight decay $5 \times 10^{-4}$ to accelerate the convergence. Following [3], we set the initial learning rate to be $2.5 \times 10^{-4}$ and let it polynomially decay with the power of 0.9. For the discriminator networks, we use Adam optimizer [23] with momentum 0.9 and 0.99. The initial learning rate is set to $10^{-4}$ and the same polynomial decay rule is applied. + +# 6. Experiments + +# 6.1. Datasets + +The Cityscapes [10] dataset consists of 5000 images of resolution $2048 \times 1024$ with high-quality pixel-level annotations. These images of street scenes were annotated with 19 semantic labels for evaluation. This dataset is split into training, validation and test sets with 2975, 500 and 1525 images respectively. Following previous works [15, 30], We only evaluate our models on the validation set. The GTA5 [32] dataset contains 24966 fine annotated synthetic images of resolution $1914 \times 1052$ . All the images are frames captured from the game Grand Theft Auto V. To accommodate the model with the limited GPU memory, we follow [37] and resize GTA5 images to the resolution of $1280 \times 720$ . This dataset shares all the 19 classes used for evaluation in common with the Cityscapes dataset. The SYNTHIA [33] dataset has 9400 images of resolution $1280 \times 760$ with pixel-level annotations. Similar to [29, 37, 12, 26], we eval + +uate our models on Cityscapes validation set with the 13 classes shared in common between SYNTHIA dataset and Cityscapes dataset. The Cityscapes images are resized to $1024 \times 512$ for both the training stage and the testing stage. + +# 6.2. GTA5 to Cityscapes + +We first show our over results and compare to the previous state-of-the-arts; then discuss the effectiveness of each module in our model; finally we discuss the choice of hyper parameters of our proposed SIM module. + +Overall results. We compare the performance of our method with the current state-of-the-arts in table 1. For fair comparison, we list the performance of the models using resnet-101 [14] and VGG16 [36] as the backbones respectively. Our method achieves the state-of-the-art performance with either backbone. + +Module contributions. We show the contribution of each module to the overall performance of our model in table 2. If trained purely on the source domain dataset, the model can achieve an mIoU of 36.6 on the Cityscapes validation set. Then, we follow the work of [37] to add the global adversarial training on the output space with the adversarial loss in Eqn (2) and the discriminator loss in Eqn (3), and the mIoU is thereby improved to 41.4. As mentioned in section 2, image-level adaptation is also a key factor in minimizing the discrepancy of data distribution. Therefore, it is helpful to utilize a transferred source-domain image dataset whose appearance is more similar to that of the target-domain image dataset. We adopt the transferred GTA5 images of [26] which utilizes a CycleGAN [46] structure to adapt the style of GTA5 images to the style + +Table 2. Ablation study on the adaptation from GTA5 dataset to Cityscapes dataset. AA stands for adversarial adaptation; IT stands for image transferring; SIM stands for semantic and instance matching; SSL stands for self-supervised learning. + +
methodAAITSIMSSLmIoU
source only36.6
+ AA[37]✓41.4
+ IT[26]✓✓44.9
+ SIM✓✓✓46.2
+ SSL✓✓✓✓49.2
target only65.1
+ +Table 3. Influence of $\lambda_{ci}$ given the number of semantic feature samples to be stored is 50 ( $w = 50$ ) + +
λci0.10.050.010.0050.001
mIoU43.444.246.245.445.5
+ +Table 4. Influence of the number of semantic feature samples to be stored $(w)$ given $\lambda_{ci} = 0.01$ + +
w10502008001600
mIoU45.246.246.145.345.0
+ +of Cityscapes images. This further improves the mIoU to 44.9, which serves as the baseline for our works. + +Then, we add our SIM module to the training framework. The background classes include road, sidewalk, building, wall, fence, vegetation, terrain and sky. The foreground classes are all the rest classes used for evaluation. With the best setting for the SIM module where $\lambda_{ci} = 0.01$ and $w$ , the number of semantic source domain feature samples to be stored, is 50, the mIoU improves to 46.2 by optimizing the Eqn (12). In this setting, we empirically set the maximum source domain instance features of each class to be stored to 10 for each image, and the feature of the instance covering larger area is to be stored with higher priority. We also adapt 10 instance features at maximum for each class from the target domain to the source domain. This is because instance feature representations of small regions or noise regions may be too many for storage and adaptation. + +Finally, we retrain our model with the combination of SIM and the self supervised learning (SSL) framework given the pseudo-labeled target dataset by the training step 1. When generating the pseudo labels for the target dataset, we choose the confidence threshold for each class respectively. We first follow Eqn (9) to give pseudo labels for each pixel by setting $y_{t} = 0$ for each image in the target dataset. Then, we generate a confidence map corresponding to the pseudo label map where the confidence is the maximum item of the softmax output in each channel so that the pseudo label at each pixel is associated with a confidence value. After this, we rank the confidence values belonging to the same class across the whole target dataset. If the median confidence value is below 0.9, then the confidence + +threshold for that class is set to the median confidence value; otherwise, it is set to 0.9. With the new $y_{t}^{k}$ being set, we follow Eqn (9) to generate the pseudo labels with don't cares for the target dataset and thus the model retraining can be processed by optimizing Eqn (13). This improves the mIoU to 49.2. We provide a visualization showing the improvements of our methods in figure 4. + +Hyper parameters analysis. This mainly deals with the settings of $\lambda_{ci}$ , the weight for the semantic matching loss and the instance matching loss, and $w$ , the number of semantic feature samples to be stored for our proposed SIM module. For the hyper parameters of other modules, we follow [37] to set $\lambda_{seg} = 1$ , $\lambda_{adv} = 0.01$ and $\lambda_{D} = 1$ to control the variables. + +First, we discuss the influence of $\lambda_{ci}$ given $w = 50$ , which is shown in table 3. We experiment the influence of $\lambda_{ci}$ with different $w$ 's. Here we only exhibit the results with $w = 50$ , the setting that achieves the best performance, to provide the intuition of the influence of the choice of $\lambda_{ci}$ . We argue that $\lambda_{ci}$ should not be set either too large or too small. If it is too large, the features corresponding to the image-level or instance-level semantic class would be pulled closer to the same source domain feature sample too much, such that these target-domain features would also be very close to each other thus lack intra-class feature variance. This could worsen the scene understanding for the feature extractor and thus negatively impact the overall performance of our model. On the other hand, if $\lambda_{ci}$ is too small, the matching loss would not help the model much on minimizing the feature discrepancy between the source domain and the target domain. As shown in table 3, when $\lambda_{ci} = 0.01$ , an appropriately large value, the model achieves the best performance. + +Second, we show the influence of the choice of $w$ , the number of semantic feature samples to be stored, as shown in table 4. As the model is always being updated during the training stage, it would be infeasible to access all the source-domain feature samples with the newly updated model. Therefore, we store an amount of feature samples generated with recent updated models. The number of these feature samples, $w$ , should balance the factors such that 1) $w$ should be large enough so that there will be enough source domain feature samples to be matched; and 2) $w$ should not be too large or the stored source domain feature samples are not up-to-date. With our experiments, $w = 50$ achieves the best performance. + +# 6.3. SYNTHIA to Cityscapes + +We evaluate the mIoU of 13 classes shared between the source domain and the target domain as [29, 37, 12, 26]. We use the same hyper parameters which achieves the best performance discussed in section 6.2 for all the following experiments. We compare our model with the previous + +![](images/87144c94b95d06fa4febdf22ba6efb1a9e237b3ead939556bd83f866c4d3d3e4.jpg) + +![](images/8af4cae1c423da613fc1fffc0f9704672a2cd14fa6ac3e6c5b0befead67440c5.jpg) + +![](images/b0ee6ab938a88bd441612bcad5f36d06d431adc5def706ea0c5ac3d1b91a9c78.jpg) +Target Image + +![](images/64483ef710ff5d9a994ac9d51970dd84d2ca43f7852cd252192787dee426accf.jpg) + +![](images/9dadfcd728e0bc3c2e181d51e48a05023428188feb23150fd78d6000c78774b6.jpg) + +![](images/61c599dd29f519bdcbebe1848b1154dcc5ba2d413798cbc268af9adbbc2aad1e.jpg) +Ground Truth + +![](images/7891eb82c79482915bc8c3e8dd16c5d44ca98b08657f584a0d04e0349615bb77.jpg) + +![](images/f403b56959e75c04fe0a872bb3508b56748440f15cf20d6fab35976ee0aeef56.jpg) + +![](images/ecbf815557e192b2e44d8fda96962e302a9ae30cba8022f659f7710d93f87904.jpg) +Source Only +Figure 4. Visualization of the segmentation results. 'Source only', 'AA+IT', and 'Ours' correspond to the models that achieves mIoU of 36.6, 44.9, and 49.2 in table 2, respectively. + +![](images/fab55ec421d625479e50a505da31aaee0c1f46282d809f5fc75a42bd22b2c435.jpg) + +![](images/c0d59903e08b99e34c1d0248879edc32cb25f35b0d11eebbe71377db71c3a21f.jpg) + +![](images/004f012485f507dfac3b6507cbfcc46205f73719bc4da5a807e281ff3d5a4a1b.jpg) +AA+IT + +![](images/d6f80b0be109233613736a1da14ed283ae865c1a91faab37da74d2c23d2cfb98.jpg) + +![](images/3c19915a55d5eaa941b4d0115ae562966ae70aef25c6d8bcd5f59bcb99d18b1f.jpg) + +![](images/98d281e35b68e65fe3e6c840a32fea07a369fef1018bae2ebd856e96bb0a297c.jpg) +Ours + +Table 5. Comparison to the state-of-the-art results of adapting SYNTHIA to Cityscapes. + +
SYNTHIA → Cityscapes
MethodroadsidewalkbuildinglightsignvegetationskypersonridercarbusmotorbikebikemIoU
Luo et al. [29]82.524.079.416.512.779.282.858.318.079.325.317.625.946.3
Tsai et al.[37]84.342.777.54.77.077.982.554.321.072.332.218.932.346.7
Du et al. [12]84.641.780.811.514.780.885.357.521.682.036.019.334.550.0
Li et al. [26]86.046.780.314.111.679.281.354.127.973.742.225.745.351.4
ours (ResNet101)83.044.080.317.115.880.581.859.933.170.237.328.545.852.1
+ +Table 6. Ablation study on the adaptation from SYNTHIA dataset to Cityscapes dataset. AA stands for adversarial adaptation; IT stands for image transferring; SIM stands for semantic and instance matching; SSL stands for self-supervised learning. + +
methodAAITSIMSSLmIoU
source only38.6
+ AA[37]✓45.9
+ IT[26]✓✓46.0
+ SIM✓✓✓47.1
+ SSL✓✓✓✓52.1
target only71.7
+ +state-of-the-arts in table 5. Our model also achieves a new state of the art on adaptation from SYNTHIA dataset to the Cityscapes dataset. + +Table 6 shows the contribution of each module. The model can achieve an mIoU of 38.6 if trained on the source domain only. By adding the adversarial training module and utilizing the transferred source domain images, the model can achieve an mIoU of 46.0. We notice that the improvement of utilizing the transferred images is not obvious, and we conjecture that this is because of the large gap of layouts between the source domain and the target domain. By + +adding our SIM module, the mIoU improves to 47.1. After retraining our model with self-supervised learning using the same pseudo-labeling strategy described in section 6.2, our model achieves an mIoU of 52.1. + +# 7. Conclusions + +We propose a stuff and instance matching (SIM) module for the unsupervised domain adaptation of semantic segmentation from a synthetic dataset to a real-image dataset. We (1) consider the difference of appearance variance between the stuff regions and the instances of things, and thus treat them differently in the adaptation process; (2) explicitly minimize the distance of the closest stuff and instance features between the source domain and the target domain, which enables the adaptation in a more accurate direction and stabilize the GAN training process at longer iterations. By combining our SIM module with self-training, our model achieves a new state-of-the-art on this task. + +Acknowledgments This work is in part supported by IBM-Illinois Center for Cognitive Computing Systems Research (C3SR) - a research collaboration as part of the IBM AI Horizons Network, and ARC DECRA DE190101315. + +# References + +[1] Aleksandar Botev, Guy Lever, and David Barber. Nesterov's accelerated gradient and momentum as approximations to regularised update descent. In IEEE IJCNN, pages 1899-1903, 2017. +[2] Wei-Lun Chang, Hui-Po Wang, Wen-Hsiao Peng, and Wei-Chen Chiu. All about structure: Adapting structural information across domains for boosting semantic segmentation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[3] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Semantic image segmentation with deep convolutional nets and fully connected crfs. arXiv preprint arXiv:1412.7062, 2014. +[4] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE TPAMI, 40(4):834-848, 2017. +[5] Liang-Chieh Chen, George Papandreou, Florian Schroff, and Hartwig Adam. Rethinking atrous convolution for semantic image segmentation. arXiv preprint arXiv:1706.05587, 2017. +[6] Minghao Chen, Hongyang Xue, and Deng Cai. Domain adaptation for semantic segmentation with maximum squares loss. In The IEEE International Conference on Computer Vision (ICCV), October 2019. +[7] Bowen Cheng, Liang-Chieh Chen, Yunchao Wei, Yukun Zhu, Zilong Huang, Jinjun Xiong, Thomas S Huang, WenMei Hwu, and Honghui Shi. Spgnet: Semantic prediction guidance for scene parsing. In The IEEE International Conference on Computer Vision (ICCV), pages 5218-5228, 2019. +[8] Bowen Cheng, Maxwell D. Collins, Yukun Zhu, Ting Liu, Thomas S. Huang, Hartwig Adam, and Liang-Chieh Chen. Panoptic-DeepLab: A Simple, Strong, and Fast Baseline for Bottom-Up Panoptic Segmentation. arXiv e-prints, page arXiv:1911.10194, Nov. 2019. +[9] Jaehoon Choi, Taekyung Kim, and Changick Kim. Self-ensembleing with gan-based data augmentation for domain adaptation in semantic segmentation. In The IEEE International Conference on Computer Vision (ICCV), October 2019. +[10] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. +[11] J. Deng, W. Dong, R. Socher, L. Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 248–255, June 2009. +[12] Liang Du, Jingang Tan, Hongye Yang, Jianfeng Feng, Xi-angyang Xue, Qibao Zheng, Xiaqing Ye, and Xiaolin Zhang. Ssf-dan: Separated semantic feature based domain adaptation network for semantic segmentation. In The IEEE + +International Conference on Computer Vision (ICCV), October 2019. +[13] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 27, pages 2672-2680. Curran Associates, Inc., 2014. +[14] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. +[15] Judy Hoffman, Dequan Wang, Fisher Yu, and Trevor Darrell. Fcts in the wild: Pixel-level adversarial and constraint-based adaptation. arXiv preprint arXiv:1612.02649, 2016. +[16] Weixiang Hong, Zhenzhen Wang, Ming Yang, and Junsong Yuan. Conditional generative adversarial network for structured domain adaptation. In IEEE CVPR, 2018. +[17] Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q. Weinberger. Densely connected convolutional networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. +[18] Zilong Huang, Xinggang Wang, Lichao Huang, Chang Huang, Yunchao Wei, and Wenyu Liu. Ccnet: Criss-cross attention for semantic segmentation. In The IEEE International Conference on Computer Vision (ICCV), pages 603-612, 2019. +[19] Zilong Huang, Yunchao Wei, Xinggang Wang, Honghui Shi, Wenyu Liu, and Thomas S Huang. Alignseg: Feature-aligned segmentation networks. arXiv preprint arXiv:2003.00872, 2020. +[20] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. +[21] Jianbo Jiao, Yunchao Wei, Zequn Jie, Honghui Shi, Rynson WH Lau, and Thomas S Huang. Geometry-aware distillation for indoor semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2869-2878, 2019. +[22] Longlong Jing and Yingli Tian. Self-supervised Visual Feature Learning with Deep Neural Networks: A Survey. arXiv e-prints, page arXiv:1902.06162, Feb 2019. +[23] Diederik P. Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. In ICLR, 2014. +[24] Andrew L. Maas, Awni Y Hannun, and Andrew Ng. Rectifier nonlinearities improve neural network acoustic models. In ICML, 2013. +[25] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature Cell Biology, 521(7553):436-444, 5 2015. +[26] Yunsheng Li, Lu Yuan, and Nuno Vasconcelos. Bidirectional learning for domain adaptation of semantic segmentation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[27] Qing Lian, Fengmao Lv, Lixin Duan, and Boqing Gong. Constructing self-motivated pyramid curriculums for cross-domain semantic segmentation: A non-adversarial approach. + +In The IEEE International Conference on Computer Vision (ICCV), October 2019. +[28] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. +[29] Yawei Luo, Liang Zheng, Tao Guan, Junqing Yu, and Yi Yang. Taking a closer look at domain shift: Category-level adversaries for semantics consistent domain adaptation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[30] Xingchao Peng, Ben Usman, Neela Kaushik, Judy Hoffman, Dequan Wang, and Kate Saenko. VisDA: The Visual Domain Adaptation Challenge. arXiv preprint arXiv:1710.06924, 2017. +[31] Rui Qian, Yunchao Wei, Honghui Shi, Jiachen Li, Jiaying Liu, and Thomas Huang. Weakly supervised scene parsing with point-based distance metric learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 8843-8850, 2019. +[32] Stephan R. Richter, Vibhav Vineet, Stefan Roth, and Vladlen Koltun. Playing for data: Ground truth from computer games. In Bastian Leibe, Jiri Matas, Nicu Sebe, and Max Welling, editors, Computer Vision – ECCV 2016, pages 102–118, Cham, 2016. Springer International Publishing. +[33] German Ros, Laura Sellart, Joanna Materzynska, David Vazquez, and Antonio M. Lopez. The synthia dataset: A large collection of synthetic images for semantic segmentation of urban scenes. In *The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)*, June 2016. +[34] Fatemeh Saleh, Sadegh Aliakbarian, Mathieu Salzmann, Lars Petersson, and Jose M. Alvarez. Effective use of synthetic data for urban scene semantic segmentation. In ECCV, 2018. +[35] Swami Sankaranarayanan, Yogesh Balaji, Arpit Jain, Ser Nam Lim, and Rama Chellappa. Learning from synthetic data: Addressing domain shift for semantic segmentation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. +[36] Karen Simonyan and Andrew Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition. arXiv e-prints, page arXiv:1409.1556, Sep 2014. +[37] Yi-Hsuan Tsai, Wei-Chih Hung, Samuel Schulter, Kiyuk Sohn, Ming-Hsuan Yang, and Manmohan Chandraker. Learning to adapt structured output space for semantic segmentation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. +[38] Tuan-Hung Vu, Himalaya Jain, Maxime Bucher, Matthieu Cord, and Patrick Perez. Advent: Adversarial entropy minimization for domain adaptation in semantic segmentation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[39] Yunchao Wei, Huaxin Xiao, Honghui Shi, Zequn Jie, Jiashi Feng, and Thomas S Huang. Revisiting dilated convolution: A simple approach for weakly-and semi-supervised semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7268-7277, 2018. + +[40] Zuxuan Wu, Xintong Han, Yen-Liang Lin, Mustafa Gokhan Uzunbas, Tom Goldstein, Ser-Nam Lim, and Larry S. Davis. DCAN: dual channel-wise alignment networks for unsupervised scene adaptation. In ECCV, 2018. +[41] Zuxuan Wu, Xintong Han, Yen-Liang Lin, Mustafa Gokhan Uzunbas, Tom Goldstein, Ser Nam Lim, and Larry S. Davis. Dcan: Dual channel-wise alignment networks for unsupervised scene adaptation. In The European Conference on Computer Vision (ECCV), September 2018. +[42] Fisher Yu and Vladlen Koltun. Multi-Scale Context Aggregation by Dilated Convolutions. In ICLR, 2016. +[43] Lei Zhang. Transfer Adaptation Learning: A Decade Survey. arXiv e-prints, page arXiv:1903.04687, Mar 2019. +[44] Yiheng Zhang, Zhaofan Qiu, Ting Yao, Dong Liu, and Tao Mei. Fully convolutional adaptation networks for semantic segmentation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. +[45] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid scene parsing network. In IEEE CVPR, 2017. +[46] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017. +[47] Yang Zou, Zhiding Yu, B.V.K. Vijaya Kumar, and Jinsong Wang. Unsupervised domain adaptation for semantic segmentation via class-balanced self-training. In The European Conference on Computer Vision (ECCV), September 2018. \ No newline at end of file diff --git a/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/images.zip b/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b0a0cc43daceb78392be45b50e817b824ec93ce8 --- /dev/null +++ b/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2290bab122d57e7b38a2a83f9b54a713c0b1eacf5acedb53ca4795d02832dbc +size 681830 diff --git a/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/layout.json b/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f35ab0c42de57c8fd163bd01bfdcdee87d31d8b7 --- /dev/null +++ b/differentialtreatmentforstuffandthingsasimpleunsuperviseddomainadaptationmethodforsemanticsegmentation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc04048e177001044c44523af395ad032a09e420897ad1bd54d83f1d60797069 +size 451852 diff --git a/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/fb6c97ee-c2ba-43a8-8192-c34f0345e846_content_list.json b/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/fb6c97ee-c2ba-43a8-8192-c34f0345e846_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..35825464a3a98fbe429d183e9971f075fa0e8593 --- /dev/null +++ b/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/fb6c97ee-c2ba-43a8-8192-c34f0345e846_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:561da7ebdfd252c2febfaf2cc4a4cb1258f64d523591a3c7bc1feac32b957b84 +size 82805 diff --git a/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/fb6c97ee-c2ba-43a8-8192-c34f0345e846_model.json b/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/fb6c97ee-c2ba-43a8-8192-c34f0345e846_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4df3460ccc3019130935bf3d4c827d7ac9ce6ae0 --- /dev/null +++ b/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/fb6c97ee-c2ba-43a8-8192-c34f0345e846_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aff06a29d39e06ccd9cf7552a5480fad8a6db63a7c0c07c75188468ad68b9641 +size 96944 diff --git a/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/fb6c97ee-c2ba-43a8-8192-c34f0345e846_origin.pdf b/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/fb6c97ee-c2ba-43a8-8192-c34f0345e846_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..af57ffc7aecc42e9924a83b071f69733408a470a --- /dev/null +++ b/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/fb6c97ee-c2ba-43a8-8192-c34f0345e846_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d3982f692ab2949fdab068aa06928a4a2e0a2d6fcdbe66b266cb825b1147dc7 +size 3181429 diff --git a/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/full.md b/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f5b01a06b9c84fa105620ae3008a533c2ed352e2 --- /dev/null +++ b/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/full.md @@ -0,0 +1,352 @@ +# Discovering Human Interactions with Novel Objects via Zero-Shot Learning + +Suchen Wang1 Kim-Hui Yap1 Junsong Yuan2 Yap-Peng Tan1 +1Nanyang Technological University 2State University of New York at Buffalo +{wang.sc, ekhyap, eyptan}@ntu.edu.sg, {jsyuan}@buffalo.edu + +# Abstract + +We aim to detect human interactions with novel objects through zero-shot learning. Different from previous works, we allow unseen object categories by using its semantic word embedding. To do so, we design a human-object region proposal network specifically for the human-object interaction detection task. The core idea is to leverage human visual clues to localize objects which are interacting with humans. We show that our proposed model can outperform existing methods on detecting interacting objects, and generalize well to novel objects. To recognize objects from unseen categories, we devise a zero-shot classification module upon the classifier of seen categories. It utilizes the classifier logits for seen categories to estimate a vector in the semantic space, and then performs nearest search to find the closest unseen category. We validate our method on V-COCO and HICO-DET datasets, and obtain superior results on detecting human interactions with both seen and unseen objects. + +# 1. Introduction + +Human-object interaction (HOI) detection [12, 5, 11, 27] is important for human-centric visual understanding. The goal is to detect interactions between humans and objects, and use verbs to describe their relationships (e.g., sit on bench, carry suitcase, etc.). Although recent studies [4, 21, 44, 48, 43, 40, 39] have achieved good progress, current HOI methods are limited to interactions with 80 object categories as defined in MS-COCO dataset [23]. + +Previous attempts [17, 37, 1, 30] to scale HOIs only focus on detecting human interactions with known objects. It aims to generalize the knowledge obtained from seen interactions (e.g., sit on chair, carry suitcase) to unseen interactions (e.g., sit on suitcase). In comparison, as shown in Figure 1, we aim to detect human interactions with unseen object categories (i.e., categories without any annotated visual samples in the training set). + +Most existing HOI methods [4, 21, 44, 48, 43, 40, 39] applied an off-the-shelf object detector to first generate hu + +![](images/41b15dcabeade694d887916f2cb8de4537dacbd7853494098027946f7484d432.jpg) +Figure 1: We aim to scale the object space in HOI detection via zero-shot learning. This figure depicts the output of our model. Apart from the 80 object categories (green boxes) as defined in MS-COCO, our model can detect human interactions with unseen object categories, e.g., rose (red box) in this image. + +man and object candidates, and then applied an interaction model to predict their relationships. However, the commonly used object detectors [35, 22, 7] are designed for detecting all objects in the given image. As a result, many non-interacting human-object pairs are produced. Besides, those object detectors treat humans as an independent category like other object categories. In this way, the detection of objects cannot exploit the information of human appearance. + +To alleviate the above limitations, we propose a detector (as shown in Figure 2) specifically for the HOI detection task. Our main idea is to leverage human visual clues to find interacting objects. The proposed detector follows the pipeline of Faster RCNN [35], while we replace the original region proposal network (RPN) with a novel human-object region proposal network (HO-RPN). It scores region proposals based on its interactiveness with the detected humans, and generalizes well to novel objects if they are interacting with humans (e.g., the red box in Figure 1). This enables us to detect human interactions with unseen object categories. + +![](images/7c435e57b5fc81db530b716f6f1e82316b870d1a352233263b33c4f289811196.jpg) +Figure 2: Overview of our model. It consists of three main modules. (1) Our proposed human-object region proposal network (HO-RPN) first localizes humans and interacting objects. It estimates an interactiveness score for each object proposal. (2) The zero-shot classification module classifies the generated region proposals. It can recognize both seen and unseen object categories. (3) It then estimates the probability of verbs between every human-object pair. The score from three modules will be aggregated as the final score for the interaction. + +To recognize novel objects, we assume each object category has a corresponding semantic embedding vector which is learned from text corpus [29, 26]. We build a zero-shot classification module upon the softmax classifier of seen categories. Based on the logit outputs of the classifier, we estimate a semantic embedding vector for the input region proposal and then search for the nearest unseen category in the semantic space. + +Extensive experiments on V-COCO [12] and HICODET [4] datasets show that: (1) The proposed HO-RPN can learn to localize objects based on their interactiveness with humans; (2) By leveraging on human visual clues, our model significantly outperforms zero-shot object detection [2] on detecting novel objects; (3) Our model can outperform existing HOI methods on detecting human interactions with both seen and unseen objects. Besides, we construct a test set from Visual Genome [18] with 110 object categories (80 MS-COCO + 30 new) to show the ability of our model on detecting human-novel-object interactions. + +Our contributes are summarized below. (1) This is the first attempt to detect human interactions with novel objects. (2) We propose a novel human-object region proposal network for the HOI detection task. (3) We design a zero-shot classification module to recognize novel objects. (4) Our approach achieves superior results of HOI detection on V-COCO [12] and HICO-DET [2] datasets. + +# 2. Related Work + +Human-Object Interaction (HOI) The goal of HOI is to detect interactions between humans and objects. It is closely related to visual relationship detection [46, 6, 25, 31, 45], while HOI detection requires more fine-grained verbs + +to describe the relationships. Existing HOI works [4, 10, 44, 43, 40, 30] usually take advantage of pre-trained object detectors [35, 22], and focus their attention on improving the verb predictions. In their frameworks, the verb prediction model needs to differentiate noninteracting human-object pairs since noninteracting objects are also detected by object detectors. Gkioxari et al. [11] proposed to use human appearance to predict the potential location of interacting objects and then re-weight object candidates based on their distances to the prediction. Li et al. [21] learned a binary classifier to estimate the interactiveness of human-object pairs and filter out noninteracting ones. Qi et al. [32] proposed to build a graph network among all human and object candidates and then parse their relationships. Human body language often includes strong clues for the interaction. Many recent works [48, 39, 13, 8] leveraged on human pose to improve the robustness of verb predictions such that they can reduce the false positive predictions on noninteracting human-object pairs. + +Instead of improving the verb prediction, our main goal is to detect more interactions by extending novel objects. Shen et al. [37] have scaled HOIs to 600 classes by increasing the number of verbs. However, current HOIs are still limited to the 80 MS-COCO object categories [23]. Previous attempts to scale HOIs using zero-shot learning [17, 1, 37] mainly focus on the unseen interactions with known objects. When scaling HOIs by adding new object categories, they require the bounding box annotations of new object categories to re-train their detector. In comparison, we do not require annotations of new object categories except their semantic word embeddings learned from text corpus [29, 26]. Hence, our method can scale HOIs more easily without the need of much human labor. + +Zero-Shot Learning (ZSL) Most ZSL works focus on the zero-shot image recognition problem [41, 47, 42, 49], which aims to recognize unseen classes by generalizing the knowledge learned from seen classes. For ZSL, additional side information is required. Early works [9, 19, 24] utilize attributes to link various classes. This requires much human labor to design attributes, especially for large-scale datasets. An easier way is to use the semantic word embedding of category names [3, 28, 38]. Based on the distance in the semantic space, we can implicitly gauge the relationships among classes. + +Apart from zero-shot image recognition, zero-shot object detection [33, 2, 34] has received much attention recently. It aims to detect unseen objects from the given image using annotations of seen object categories. Existing methods [33, 2, 34] usually choose semantic embedding vectors as side information. This task is different from our focus in this paper since it aims to detect all novel objects in the images, while we focus on the novel objects in the interaction with humans. + +# 3. Approach + +# 3.1. Problem Statement + +The goal of human-object interaction (HOI) detection is to find one or multiple tuples $\langle \text{human}, \text{verb}, \text{object} \rangle$ from the given image. Formally, human-object interaction can be defined as $\langle b_h, v, b_o, y \rangle$ , where the bounding box $b_h, b_o \in \mathbb{R}^4$ indicates the location of humans and objects, verb $v \in \mathcal{V} = \{V_1, \ldots, V_m\}$ denotes the action performed by the human, and $y \in \mathcal{V}$ denotes the object category. + +In this paper, our main focus is to scale HOIs by extending the object category space via zero-shot learning. Let $\mathcal{Y}_S = \{1,\dots ,c_1\}$ and $\mathcal{Y}_{\mathcal{U}} = \{c_1 + 1,\dots ,c_1 + c_2\}$ denote the seen and unseen object category space respectively. We aim to develop a model which can detect human interactions $< b_{h},v,b_{o},y>$ with both seen and unseen object categories, i.e., $y\in \mathcal{V} = \mathcal{Y}_S\cup \mathcal{Y}_U$ . To make this a feasible task, we assume that each object category $y\in \mathcal{V}$ has a semantic embedding vector $\mathbf{q}_y\in \mathbb{R}^p$ such that we can leverage on the relations in the semantic space to detect human interactions with unseen objects. + +# 3.2. Formulation + +Existing HOI detection methods [12, 11, 44, 13] consist of two main components, i.e., an off-the-shelf object detector [35, 7, 20, 22] followed by an interaction model. Given an input image $x$ , the object detector first detects $b_{h}$ and $b_{o}$ , and predicts box score $p(b_{h}, y = \text{"person"}|x)$ and $p(b_{o}, y|x)$ . Without the loss of clarity, we replace $p(b_{h}, y = \text{"person"}|x)$ with $p(b_{h}|x)$ in the following discussion for concise representation. Given $b_{h}$ and $b_{o}$ , the interaction model then estimates the probability of verbs denoted by $p(v|b_{h}, b_{o}, y, x)$ . The final score for the interaction $< b_{h}, v, b_{o}, y >$ is given as + +$$ +p \left(b _ {h}, v, b _ {o}, y \mid x\right) = p \left(v \mid b _ {h}, b _ {o}, y, x\right) p \left(b _ {o}, y \mid x\right) p \left(b _ {h} \mid x\right) \tag {1} +$$ + +In this way, the original problem is reduced to 3 tasks, i.e., human detection, object detection, and verb prediction. Notice that the framework in Eq.(1) treats the detection of humans and objects as two independent processes, i.e., $p(b_h, b_o, y|x) = p(b_o, y|x)p(b_h|x)$ . This assumption leads to the following limitations. + +First, isolating the detection of objects with humans makes it impossible to detect only interacting objects. In this framework, the object detection will detect both interacting and noninteracting objects as candidates. Previous methods [11, 32, 21] often perform post-processing to suppress noninteracting ones. In comparison, we propose a more efficient way, i.e., producing only interacting objects at the detection stage. Second, the framework in Eq.(1) cannot handle novel objects well, even with zero-shot object detection [2, 34], since it is difficult to differentiate unseen objects with the background using only its visual feature. + +![](images/5d80db55ea8e964144841188ff9e690f3431ce059dc50008c438d9d061b6f57b.jpg) +Figure 3: Overview of HO-RPN. Each cell in the feature map represents a sliding window position. The features of top $k$ human anchor boxes will be used to score the object anchor boxes using a relational network. + +However, the human body language usually implies the location of interacting objects. For instance, as shown in Figure 1, we can rely on human visual clues to localize the unseen novel object "rose". + +To alleviate the above limitations, we propose to score the object box based on its interactiveness with the detected human boxes, i.e., $p(b_{o},y|b_{h},x)$ . Then the score of interaction $p(b_{h},v,b_{o},y|x)$ can be expressed as + +$$ +p (v \mid b _ {h}, b _ {o}, y, x) p (b _ {o}, y \mid b _ {h}, x) p (b _ {h} \mid x) \tag {2} +$$ + +Our model is shown in Figure 2. It is composed of a novel human-object region proposal network, a zero-shot classification module, and a verb prediction module. We will elaborate them in Sec.3.3, Sec.3.4 and Sec.3.5 respectively. + +# 3.3. Human-Object Region Proposal Network + +We have two separate branches for generating human and object region proposals. We use the original region proposal network (RPN) [35] to generate human region proposals. For object region proposals, we design a novel human-object region proposal network (HO-RPN). + +The original RPN estimates the score of anchor boxes based on the objectiveness. Intuitively, a high score will be assigned to an anchor box if it well covers an object. However, this criterion does not well match the goal of HOI detection, since we are only interested in interacting objects. In our case, we expect that a high score is assigned if the anchor box well covers an object and, more importantly, the object is interacting with humans. To achieve this goal, we propose a human-object region proposal network (HO-RPN). It scores the anchor boxes based on its interactiveness with humans. + +The architecture of HO-RPN is shown in Figure 3. In addition to the convolutional feature maps from the backbone network, HO-RPN also takes as input the feature of the top $K$ detected human anchor boxes from the RPN hidden layer. HO-RPN first performs a 2D convolution on the backbone feature maps to obtain a hidden feature + +map. Then, at each sliding window position, we apply a relational network (RN) [36] to reason about the interactiveness score of $n$ anchor boxes with different shape, $s_r = [s_r^{(1)},\dots,s_r^{(n)}]\in \mathbb{R}^n$ , based on its visual features and relationships with detected humans. Let $\mathbf{x}_o^{(j)}\in \mathbb{R}^d$ denote the feature of $j$ -th sliding window position in HO-RPN, and $\mathbf{x}_h^{(k)}\in \mathbb{R}^d$ denote the feature of $k$ -th human anchor box from human RPN. Specifically, the relational network computes the score by + +$$ +s _ {r} = \sigma \left(f \left(\sum_ {k = 1} ^ {K} g \left(\mathbf {x} _ {o} ^ {(j)}, \mathbf {x} _ {h} ^ {(k)}\right)\right)\right) \tag {3} +$$ + +where $\sigma (\cdot)$ is a sigmoid function. Here $g(\cdot):\mathbb{R}^{2d}\mapsto \mathbb{R}^d$ is a simple multi-layer perceptron (MLP), which processes the concatenated feature of $\mathbf{x}_o^{(j)}$ and $\mathbf{x}_h^{(k)}$ . The role of $g(\cdot)$ is to infer if the object and human are interacting. Here $f(\cdot):\mathbb{R}^d\mapsto \mathbb{R}^n$ is another MLP, which aggregates the relations with $K$ human boxes. This predicted score will be used to generate object region proposals. + +# 3.4. Zero-Shot Object Classification + +Once human and object region proposals are generated by HO-RPN, a head network is used to predict $p(b_h|x)$ and $p(b_o,y|x)$ , and regress the box $b_{h}$ and $b_{o}$ . To be compatible with novel object categories, here we use a class agnostic bounding box regressor instead of class-specific regressors. To recognize unseen categories, we follow the idea from ConSE [28] and design a zero-shot classification module for our task. The objective behind our module is that it should not change the architecture of detectors such that we can take advantage of the well-trained weights on seen categories. The benefit of doing so is that if we can add new object categories into the object space, we do not need to re-train the network. + +Our zero-shot classification module is shown in Figure 4. It uses the logit output of the softmax classifier for seen categories to estimate the probability of unseen categories. Suppose $f_{y}(b_{o}) \in \mathbb{R}$ is the probability of region proposal $b_{o}$ belonging to seen category $y \in \mathcal{V}_{S}$ predicted by a classifier. Given $\{f_{y}(b_{o})\}_{y \in \mathcal{V}_{S}}$ , we denote the most likely seen category as + +$$ +\hat {y} _ {1} := \underset {y \in \mathcal {Y} _ {S}} {\arg \max } f _ {y} \left(b _ {o}\right) \tag {4} +$$ + +Similarly, let $\hat{y}_j$ denote the $j$ -th most likely seen category, i.e., the category with the $j$ -th largest value among $\{f_y(b_o)\}_{y\in \mathcal{Y}_S}$ . Based on the top $K$ predicted seen categories and their semantic word embedding $\{\mathbf{q}_{\hat{y}_1},\dots,\mathbf{q}_{\hat{y}_K}\}$ , we estimate a semantic embedding vector $\mathbf{e} \in \mathbb{R}^p$ for the input region proposal $b_{o}$ by + +$$ +\mathbf {e} = \frac {1}{Z} \sum_ {j = 1} ^ {K} f _ {\hat {y} _ {j}} \left(b _ {o}\right) \cdot \mathbf {q} _ {\hat {y} _ {j}} \tag {5} +$$ + +![](images/f2bdb885f79fabfb317cdc47ee8e053af5d0aeca4a59787d7812fffea990ad9f.jpg) +Figure 4: The pipeline of zero-shot classification. The softmax classifier for seen categories (including the background) first classifies the region proposal. If the background category has a high response, we then identify if it belongs to unseen categories. We estimate a semantic embedding using Eq.(5). The nearest unseen category in the semantic space will be chosen as the prediction. + +where $Z = \sum_{j=1}^{K} f_{\hat{y}_j}(b_o)$ , which is a normalization factor. + +Besides the categories in $\mathcal{V}_S$ , the background is also a category in the softmax classifier. If the softmax classifier is very confident in its prediction for $y =$ "background", it will not be a seen object. Then, we estimate if it belongs to unseen categories. To do so, we compute the similarity of e to the semantic embedding vector of unseen categories as + +$$ +s _ {y} = \cos (\mathbf {e}, \mathbf {q} _ {y}), y \in \mathcal {Y} _ {\mathcal {U}} \tag {6} +$$ + +where $\cos(\cdot, \cdot)$ is the cosine similarity. If $s_y < \tau$ for any $y \in \mathcal{Y}_{\mathcal{U}}$ , the region proposal $b_o$ will be predicted as background. + +For seen categories, we take the output of the softmax classifier as the prediction, i.e., $s_y = f_y(b_o), y \in \mathcal{Y}_S$ . By doing so, our proposed zero-shot classification module enables the detector to detect unseen categories without the loss of performance on seen categories. Finally, the score of object boxes is obtained as + +$$ +p \left(b _ {o}, y \mid b _ {h}, x\right) := s _ {r} \times s _ {y} \tag {7} +$$ + +# 3.5. Verb Prediction + +Once humans and objects are detected, verb branch will predict the probability of verbs for every human-object pair. Except for the visual appearance within box $b_{o}$ and $b_{h}$ , we also take as input the union region of $b_{o}$ and $b_{h}$ , since there may be additional context information. Consider that each human can simultaneously perform multiple actions for an object, e.g., looking at and holding, we formulate the verb prediction as multiple binary classification problem. For a verb category $v \in \mathcal{V}$ , we predict its probability by + +$$ +p \left(v \mid b _ {h}, b _ {o}, y, x\right) := \sigma \left(h _ {v} \left(\mathbf {x} _ {o}, \mathbf {x} _ {h}, \mathbf {x} _ {h, o}\right)\right) \tag {8} +$$ + +where $\mathbf{x}_o, \mathbf{x}_h, \mathbf{x}_{h,o} \in \mathbb{R}^d$ are the visual features extracted from box $b_o, b_h$ , and their union region using RoIAlign [14]. Here, $h_v(\cdot, \cdot, \cdot): \mathbb{R}^{3d} \mapsto \mathbb{R}$ is a MLP which processes the concatenated feature and $\sigma(\cdot)$ is a sigmoid function. + +![](images/178fcca6e3623f636ba813de9ec54870e398e4bbf3c7523ea8762f82fc3e6688.jpg) +Figure 5: Qualitative comparison of HO-RPN (bottom row) with RPN (upper row) on unseen novel objects. In this figure, tennis racket, suitcase, surfboard, baseball glove, and frisbee are unseen by the model based on our seen/unseen split. For RPN (upper row), we visualize the top 5 object region proposals (except proposals have an IoU $>0.5$ with humans). For our proposed HO-RPN, the top 2 object region proposals are enough to capture novel objects in the example images. + +![](images/b160aeca90244c3417e42c98e70f51a73f52d485b6b0cee7b8f38b0eda2e9fe5.jpg) + +![](images/a03e55cb92750ed09dca7a31f211a58b17f72f552dc41ab4e40857b89f8268c6.jpg) + +![](images/314cc97a6af7d6f8debe982899a457b27267f97c6b63f28ecc5a42bda9118ae0.jpg) + +![](images/0391ed4b3d124fa548c9fe1a705c58a309eb860b000132cfe607cbac2b8b2595.jpg) + +![](images/a960a3a090f508ad24ca58f8fb2ccc110b2fa897b221339afdb4b315aa96f698.jpg) + +![](images/f8f23fe0a1912b6de00f7b6fe16932ccfeccc62ca046d35f560996ea8710e46e.jpg) + +![](images/b95ff8b3438895cb9d7ab099756bc2349584eff1e8f924e9324b1ca6a23e2a8d.jpg) + +![](images/d2e1e1e5f8d241f029079ebb2bf09281bf9b19418fcc694ae3a3da4639a7d69c.jpg) + +![](images/e4ad4a8aa81a9b07fc54b25cb80ee67a2c6986af3fbf225996b8113bf5a68f58.jpg) +Figure 6: Qualitative results of interacting object detection. Compared with Faster RCNN (top row), our model (bottom row) only detects interacting objects. Boxes with a score $>0.7$ are visualized. + +![](images/0105600c6cfc996b25ab7f994e24bcf855d7c4dd38e2c4298ed9b36fa3fd0229.jpg) + +![](images/db45b385727abe52d96d9c641455b3e4e0245ef97bb71e2fbfa1077e877966ed.jpg) + +![](images/cacd84e1082befc28920d46eca133316334727a1acfc1491d7884ee91ec737fd.jpg) + +# 4. Experiments + +We mainly evaluate our method using V-COCO [12] and HICO-DET [4] datasets, which have exhaustive annotations of human interactions with 80 MS-COCO categories [23]. There are 25 and 117 verbs on V-COCO and HICO-DET respectively to describe human-object interactions. We also construct a test set from Visual Genome [18] with 30 novel categories apart from the 80 MS-COCO categories to evaluate our method. + +# 4.1. Evaluation Protocol + +Seen/unseen split We simulate the zero-shot scenario on V-COCO [12] and HICO-DET [4] by partitioning the 80 object categories into seen and unseen sets. All images including unseen object categories will be removed from the training set. Existing seen/unseen splits [2, 33, 34] are mainly constructed based on the statistics of COCO, which cannot be applied to the above HOI datasets. For example, in previous work [33], "vase" is a seen class with 4,623 in + +stances in the COCO train2014 set, while no HOI with "vase" exists in the V-COCO train set. For this reason, we propose a new seen/unseen split following the steps in [33]. We sort the classes per supercategory in ascending order based on the total number of instances in V-COCO train set and HICO-DET train set. For each supercategory, we pick $20\%$ rare classes as unseen classes, which results in 43 seen classes and 37 unseen classes (see supplementary materials for details). In this way, we construct a training set of 1,878 images in V-COCO [12] and 30,854 images in HICO-DET [4] with only seen object categories. + +Implementation details Our model is built upon the ResNet50 [15] with Feature Pyramid Network (FPN) [22]. We adopt synchronized SGD training on 4 GPUs with 2 images per GPU. The learning rate is 0.005 with a weight decay of 0.0001 and a momentum of 0.9. We first search the best hyper-parameters on V-COCO val set. Then we train our model for 6k iterations on V-COCO trainval + +
Recall@kMethodsTrain setk=100k=500
COCOVCOCOallseenunseenallseenunseen
RPN w/ FPN✓83.688.750.390.293.568.6
RPN w/ FPN✓✓87.190.763.894.496.183.5
HO-RPN (ours)✓89.892.274.695.596.688.5
+ +(a) Generated region proposals. Results are evaluated on V-COCO val set. We train network with only annotations of seen categories. A true positive is considered if the generated region proposals have an IoU $>0.5$ with ground truth bounding boxes. + +
#boxesVCOCOHICO-DETTime (s)
436.243.70.214
842.745.70.287
1242.845.90.356
+ +(c) Ablation on #human boxes. Results are AP@IoU=0.5 and the average inference time per image. + +
MethodsVCOCOHICO-DET
ZSOD [2]3.35.1
ZS-HOID w/o sr3.45.3
ZS-HOID (ours)11.511.3
+ +(d) Novel object detection. Results are AP@IoU=0.5 over all unseen categories based on our seen/unseen split. + +
MethodsVCOCOHICO-DET
Faster RCNN28.233.2
InteractNet [11]36.239.3
Interactiveness [21]36.641.4
HOID w/o sr29.433.6
HOID (ours)42.745.7
+ +(b) Interacting object detection. Results are AP@IoU=0.5 among 79 object categories (except "person"). + +
EmbeddingsVCOCOHICO-DET
GloVe [29]10.49.1
FastText [16]10.29.9
GoogleNews [26]11.511.3
+ +(e) Ablation on semantic embedding. Results are AP@IoU=0.5 over all unseen object categories. + +Table 1: Ablation studies on various components in our proposed model. + +set and 20k iterations on HICO-DET train set, and report the results on their test set. + +Evaluation metrics Our central interest is to detect tuples $< b_h, v, b_o, y >$ . We evaluate the detection performance using mean Average Precision (mAP) following previous works [11, 44, 37, 21]. The Average Precision is first calculated per interaction class $\{v, y\}_{v \in \mathcal{V}, y \in \mathcal{Y}}$ and then we take the mean. Formally, a detected tuple is considered as true positive if (1) the predicted human and object bounding box have an Intersection-over-Union (IoU) of 0.5 or higher with the ground truth, (2) the verb prediction is correct, and (3) the object category is correct. In the ablation studies, we use the COCO-style Average Precision at IoU = 0.5 (AP@IoU=0.5) to evaluate the performance of interacting object detection. + +# 4.2. Ablation Analysis + +In the following experiments, we call our HOI detection model using HO-RPN as HOID for short. When the proposed zero-shot classification module is used to detect novel objects, we call it as ZS-HOID. + +Generated region proposals In Table 1a, we evaluate the quality of region proposals generated by our proposed HO-RPN using the recall at the top $k$ proposals. We compare against the original RPN [35] built with FPN [22], where no human clues are used to generate object proposals. Here the ground truth only includes the objects interacting with humans. A true positive is considered if the proposal has an IoU $> 0.5$ with ground truth. + +The first row in Table 1a refers to the model trained on COCO trainval set ( $\sim$ 37k images excluding V-COCO val and test set and images with unseen classes). It shows the worst performance since it captures many noninteracting objects. For a fair comparison, we also finetune it + +on V-COCO train set with seen interacting objects. As reported, our HO-RPN can cover $1.5\%$ more seen objects and $10.8\%$ more unseen objects than RPN with FPN at the top 100 proposals. This result suggests the benefits of using human visual clues to localize objects. Figure 5 depicts some qualitative results on unseen object categories. As shown, our HO-RPN can better capture novel objects than the RPN. + +Interacting object detection In Table 1b, we investigate the performance of our model, HOID, on detecting interacting objects. We compare against Faster RCNN [35] and two competitive baselines, InteractNet [11] and Interactiveness [21]. Given the boxes detected by Faster RCNN, InteractNet and InteractivenessNet perform post-processing to suppress noninteracting objects. In this experiment, all 80 MS-COCO object categories are used for training models. To study the impact of interactivity score $s_r$ , we ablate it from the object box score in Eq.(7). + +We evaluate the detected boxes on V-COCO test set and HICO-DET test set using AP@IoU=0.5. Notice that here detections of noninteracting objects will be seen as false positives. As shown, our method can outperform the best baseline by 6.6 and 4.3 points on V-COCO and HICO-DET. We observe that the ablation of $s_r$ drops the AP by 13.3 and 12.1 points. It suggests that the interactiveness score predicted by HO-RPN makes the main contribution to our improvement. In Figure 6, we show some detection results of our method. + +Number of human boxes in Eq.(3) In Table 1c, we change the number of human boxes in HO-RPN (i.e., $K$ in Eq.(3)). We observe that as involving more human boxes, the performance on detecting interacting objects increases. However, it will cost more inference time. As a trade-off between performance and speed, we choose 8 human boxes in our experiments. + +![](images/083667adf4a33f8cdf52d77d4d49805d33dc17a3b057bf6bcb43248035fd2064.jpg) +Figure 7: Ablation on various seen/unseen splits. Each point corresponds to an experiment. The x-axis represents the average number of training samples per class. The y-axis is the AP@IoU=0.5 (%) over unseen classes. + +Novel object detection In Table 1d, we evaluate the performance of our model, ZS-HOID, on detecting unseen novel objects. As this task is closely related to zero-shot object detection, we compare against a state-of-the-art zero-shot object detector (ZSOD) [2]. Here we use word2vec [26] trained on GoogleNews corpus as the semantic word embedding. As shown, our method can achieve 8.2 and 6.2 points improvement over ZSOD. This improvement is mainly due to the interactiveness score produced by HO-RPN, since the AP drops to 3.4 and 5.3 when we ablate it from our model. + +Semantic embeddings In Table 1e, we test three semantic embeddings, GloVe [29] trained on Wikipedia 2014 and Gigaword 5 corpus, word2vec [26] on GoogleNews corpus, and FastText [16] on Wikipedia 2017 and UMBC corpus. It shows that word2vec on GoogleNews achieves the overall best performance. Thus, in the rest of experiments with zero-shot classification, we use the word2vec on GoogleNews as the semantic embedding. + +Comparison of various seen/unseen splits In our experiments, we observe that the successes of zero-shot classification strongly rely on the related seen categories. For instance, the novel category "surfboard" can be recognized if the classifier for seen categories "skateboard", "snowboard" and "boat" has a relatively higher response than other seen categories. To investigate the influences of seen/unseen splits, we perform two different random splits: Split-A and Split-B. Split-A conducts splits per supercategory (e.g., animals, sports, vehicles). It ensures that each unseen category can have at least one seen category from the same supercategory. In comparison, Split-B selects an entire supercategory as seen or unseen. In this way, there is no common supercategory between seen and unseen. Figure 7 depicts the experimental results. As shown, the results of Split-B are generally worse than Split-A, even though it has more training samples. It suggests that + +
MethodsNo pose estimatorHICO-DET (default)
FullRareNon-rare
VSRL [12]✓9.097.029.71
InteractNet [11]✓9.947.1610.77
GPNN [32]✓13.119.3414.23
iCAN [10]✓14.8410.4516.15
Knowledge [44]✓14.7013.2615.13
Contextual Attention [40]✓16.2411.1617.75
No-Frills (no pose) [13]✓16.9611.9518.46
HOID (ours)✓17.8512.8519.34
No-Frills (with pose) [13]17.1812.1718.68
Interactiveness [21]17.2213.5118.32
PMFNet [39]17.4615.6518.00
+ +Table 2: HOI detection. We compare against state-of-the-art HOI detection methods. Results are mAP $(\%)$ evaluated on HICODET test set. In this experiment, all 80 MS-COCO categories are used for training. + +
MethodsSeenUnseenAll
ZSOD + InteractNet [11]38.6410.9727.88
ZSOD + Interactiveness [21]39.7013.6729.58
ZS-HOID w/o sr (our baseline)37.5310.6127.06
ZS-HOID (ours)43.1319.8834.09
+ +Table 3: Experimental comparison of human-novel-object interaction detection. Results are mAP $(\%)$ evaluated on V-COCO test set based on our seen/unseen split. + +having related seen categories is a key factor for detecting novel objects. + +HOI detection In Table 2, we compare against state-of-the-art HOI detection methods. Here all annotated samples of 80 MS-COCO categories are used to train our model. We evaluate on HICO-DET dataset using the provided evaluation protocol. It shows that our method can achieve state-of-the-art performance on full and non-rare interactions. We believe that the promotion is due to the good performance of our detector, which produces only interacting objects and indirectly reduces the false positive interaction detections. It is worth noting that we do not utilize extra pose estimators to extract the human skeleton. But we believe that using the pose estimator can further improve our performance. + +# 4.3. Human-Novel-Object Interaction Detection + +In this section, we evaluate the performance of human-novel-object interaction detection on V-COCO and HICODET datasets using our seen/unseen split. For comparison with existing HOI detection methods, we replace their object detectors with a zero-shot object detector (ZSOD) [2] which is trained with seen categories. Here we choose InteractNet [11] and Interactiveness [21] as competitors since their models can utilize human visual information to suppress noninteracting objects produced by the object detector. We re-train their interaction models using annotations of seen categories and evaluate on the full test set with + +![](images/af83198606c5d1877483bc2b5f558b6e93d12271886384b94239bcd515d07e3e.jpg) + +![](images/3c4860c839ed078a4118f74f5073439b2d24a911c426962b5867991b06ddb4ff.jpg) + +![](images/a162262c16297aecb01a27a6476edfc442cfc299a6272a57c898581c9c782cb3.jpg) + +![](images/ca706f441ed29d218d6574f05ed3d324cd71e1f58624e8c67fe6a56ab364e214.jpg) + +![](images/ef4d7b3aa2728549bea96c73e9dcdbe6f2b063ba914ce44840c481e016b1efe0.jpg) + +![](images/ca46993be0edaa67793ed461d2a361984546a1b5fb3cf9cc1852b809d06c4378.jpg) + +![](images/fff2de42308d7cf475b8c8ee7b291120adf0a1382461fb10cabd5ffc88addeaf.jpg) + +![](images/1be1011ca35489ea225936aae6d1cd557bfc7ec98c60b7cd54a501e662047a58.jpg) + +![](images/a29ce16f9febcba7944c7921c57cb01e5f4adabd011c1b072d3bd1a71f110a05.jpg) + +![](images/18b6ca718d0da2cb055fc6f648ae0e4b5e722ff1719366e685b5d375f846e096.jpg) + +![](images/d1e7f2c75d824a9018be5d935ae473b6a08b61a2721e7a8c4969ab542cb6adb4.jpg) +Figure 8: Results of our model on human-novel-object interaction detection. Our model is trained with annotations of all 80 MS-COCO object categories (green boxes), while it can detect interactions with unseen object categories (red boxes). + +![](images/3b8cdfe7dd468d6a822613d572707987246dd486697da207947812db770d0166.jpg) + +![](images/cf4c1609e1831811ba1af848c6a2caeb6760986414ce5d65bc4e542f3caba4a1.jpg) + +![](images/8b84d31f81212aa2cf4002bad89b0c693c2b1075fad18e18ca9376e654628f06.jpg) + +![](images/d44ea90b9237fc66d78b44cf308c84eed216e5c9299afbfbf74b62fa11c3cc45.jpg) + +
Methodsaccessoryanimalapplianceelectronicfoodfurnitureindoorkitchenoutdoorsportsvehicleall
SeenZSOD+InteractNet [11]9.5516.094.828.885.546.129.676.3011.0212.9314.6412.31
ZSOD+Interactiveness[21]15.0419.107.9012.237.596.7610.3310.6625.8415.6317.4015.92
ZS-HOID w/o sr (our baseline)9.0514.404.607.945.177.209.165.8811.0811.5712.9811.11
ZS-HOID (ours)19.5125.7611.5616.2311.6910.3018.7112.1130.7021.5120.8821.19
UnseenZSOD+InteractNet [11]0.821.640.230.000.823.870.670.070.002.412.201.62
ZSOD+Interactiveness[21]2.133.100.070.610.240.820.640.691.972.601.671.52
ZS-HOID w/o sr (our baseline)0.921.440.130.000.753.410.580.060.002.052.181.45
ZS-HOID (ours)5.324.984.630.341.484.040.010.443.313.503.713.02
+ +Table 4: Experimental comparison of human-novel-object interaction detection. Results are mAP (%) evaluated on HICO-DET test set based on our seen/unseen split. + +both seen and unseen categories. + +The results on V-COCO and HICO-DET datasets are shown in Table 3 and Table 4. We separately report the mean Average Precision (mAP) over (1) interactions with seen categories and (2) interactions with unseen categories. Our main focus is on detecting human-novel-object interactions. For V-COCO dataset, as shown in Table 3, our method outperforms the best baseline by 6.21 points on unseen categories. For the challenging HICO-DET dataset, we increase the mAP by nearly $1.86 \times$ over the best baseline on interactions with unseen categories. + +# 4.4. Scaling HOIs by Extending Object Space + +To further demonstrate the ability of our method on detecting HOIs with novel object categories, we collect more images from Visual Genome [18] to test our model (see more details in supplementary materials). Besides the 80 MS-COCO categories, we collect 30 novel object categories (e.g., camera, fishing pole, guitar, pen, etc.). Here we use the model trained on HICO-DET train set with the anno + +tations of all 80 MS-COCO categories to detect human interactions with novel objects. In this experiment, we mainly use qualitative evaluation. Some results of our model are shown in Figure 8. + +# 5. Conclusion + +In this paper, we propose a novel human-object region proposal network for the human-object interaction detection task. It leverages human visual clues to find objects. We show that our proposed model can well detect interacting objects, even though they belong to unseen object categories. Furthermore, we design a zero-shot classification module to recognize novel objects. These contributions allow us to detect human interactions with unseen object categories. + +Acknowledgement This work was conducted within the Delta-NTU Corporate Lab for Cyber-Physical Systems with funding support from Delta Electronics Inc. and the National Research Foundation (NRF) Singapore under the Corp Lab@University Scheme. + +# References + +[1] Ankan Bansal, Sai Saketh Rambhatla, Abhinav Shrivastava, and Rama Chellappa. Detecting human-object interactions via functional generalization. 2020. 1, 2 +[2] Ankan Bansal, Karan Sikka, Gaurav Sharma, Rama Chellappa, and Ajay Divakaran. Zero-shot object detection. In ECCV, 2018. 2, 3, 5, 6, 7 +[3] Soravit Changpinyo, Wei-Lun Chao, Boqing Gong, and Fei Sha. Synthesized classifiers for zero-shot learning. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 2 +[4] Yu-Wei Chao, Yunfan Liu, Xieyang Liu, Huayi Zeng, and Jia Deng. Learning to detect human-object interactions. In WACV, 2018. 1, 2, 5 +[5] Yu-Wei Chao, Zhan Wang, Yugeng He, Jiaxuan Wang, and Jia Deng. Hico: A benchmark for recognizing human-object interactions in images. In The IEEE International Conference on Computer Vision (ICCV), 2015. 1 +[6] Bo Dai, Yuqi Zhang, and Dahua Lin. Detecting visual relationships with deep relational networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 2 +[7] J. Dai, H. Qi, Y. Xiong, Y. Li, G. Zhang, H. Hu, and Y. Wei. Deformable convolutional networks. In The IEEE International Conference on Computer Vision (ICCV), 2017. 1, 3 +[8] Hao-Shu Fang, Jinkun Cao, Yu-Wing Tai, and Cewu Lu. Pairwise body-part attention for recognizing human-object interactions. In The European Conference on Computer Vision (ECCV), 2018. 2 +[9] A. Farhadi, I. Endres, D. Hoiem, and D. Forsyth. Describing objects by their attributes. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, 2009. 2 +[10] Chen Gao, Yuliang Zou, and Jia-Bin Huang. ican: Instance-centric attention network for human-object interaction detection. In *British Machine Vision Conference*, 2018. 2, 7 +[11] Georgia Gkioxari, Ross Girshick, Piotr Dollr, and Kaiming He. Detecting and recognizing human-object interactions. In CVPR, 2018. 1, 2, 3, 6, 7, 8 +[12] Saurabh Gupta and Jitendra Malik. Visual semantic role labeling. arXiv preprint arXiv:1505.04474, 2015. 1, 2, 3, 5, 7 +[13] Tanmay Gupta, Alexander Schwing, and Derek Hoiem. No-frills human-object interaction detection: Factorization, layout encodings, and training techniques. In The IEEE International Conference on Computer Vision (ICCV), 2019. 2, 3, 7 +[14] Kaiming He, Georgia Gkioxari, Piotr Dollar, and Ross Girshick. Mask r-cnn. In The IEEE International Conference on Computer Vision (ICCV), 2017. 4 +[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 5 +[16] Armand Joulin, Edouard Grave, Piotr Bojanowski, Matthijs Douze, Hervé Jégou, and Tomas Mikolov. Fast-text.zip: Compressing text classification models. CoRR, abs/1612.03651, 2016. 6, 7 + +[17] Keizo Kato, Yin Li, and Abhinav Gupta. Compositional learning for human object interaction. In The European Conference on Computer Vision (ECCV), 2018. 1, 2 +[18] Ranjay Krishna, Yuke Zhu, Oliver Groth, Justin Johnson, Kenji Hata, Joshua Kravitz, Stephanie Chen, Yannis Kalantidis, Li-Jia Li, David A Shamma, Michael Bernstein, and Li Fei-Fei. Visual genome: Connecting language and vision using crowdsourced dense image annotations. 2016. 2, 5, 8 +[19] C. H. Lampert, H. Nickisch, and S. Harmeling. Learning to detect unseen object classes by between-class attribute transfer. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 951–958, 2009. 2 +[20] Hei Law and Jia Deng. Cornernet: Detecting objects as paired keypoints. In The European Conference on Computer Vision (ECCV), 2018. 3 +[21] Yong-Lu Li, Siyuan Zhou, Xijie Huang, Liang Xu, Ze Ma, Hao-Shu Fang, Yanfeng Wang, and Cewu Lu. Transferable interactiveness knowledge for human-object interaction detection. In CVPR, 2019. 1, 2, 3, 6, 7, 8 +[22] T. Lin, P. Dollr, R. Girshick, K. He, B. Hariharan, and S. Belongie. Feature pyramid networks for object detection. In CVPR, 2017. 1, 2, 3, 5, 6 +[23] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ECCV. 2014. 1, 2, 5 +[24] Jingen Liu, B. Kuipers, and S. Savarese. Recognizing human actions by attributes. In Proceedings of the 2011 IEEE Conference on Computer Vision and Pattern Recognition, CVPR, 2011. 2 +[25] Cewu Lu, Ranjay Krishna, Michael Bernstein, and Li Fei-Fei. Visual relationship detection with language priors. In European Conference on Computer Vision, 2016. 2 +[26] Tomas Mikolov, G.s Corrado, Kai Chen, and Jeffrey Dean. Efficient estimation of word representations in vector space. In ICLR, 2013. 2, 6, 7 +[27] Tushar Nagarajan, Christoph Feichtenhofer, and Kristen Grauman. Grounded human-object interaction hotspots from video. In The IEEE International Conference on Computer Vision (ICCV), 2019. 1 +[28] Mohammad Norouzi, Tomas Mikolov, Samy Bengio, Yoram Singer, Jonathon Shlens, Andrea Frome, Greg Corrado, and Jeffrey Dean. Zero-shot learning by convex combination of semantic embeddings. In International Conference on Learning Representations, 2014. 2, 4 +[29] Jeffrey Pennington, Richard Socher, and Christopher D. Manning. Glove: Global vectors for word representation. In Empirical Methods in Natural Language Processing (EMNLP), pages 1532-1543, 2014. 2, 6, 7 +[30] Julia Peyre, Ivan Laptev, Cordelia Schmid, and Josef Sivic. Detecting unseen visual relations using analogies. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 1, 2 +[31] Julia Peyre, Josef Sivic, Ivan Laptev, and Cordelia Schmid. Weakly-supervised learning of visual relations. In The IEEE International Conference on Computer Vision (ICCV), 2017. 2 + +[32] Siyuan Qi, Wenguan Wang, Baoxiong Jia, Jianbing Shen, and Song-Chun Zhu. Learning human-object interactions by graph parsing neural networks. In The European Conference on Computer Vision (ECCV), September 2018. 2, 3, 7 +[33] Shafin Rahman, Salman Khan, and Nick Barnes. Polarity loss for zero-shot object detection. arXiv preprint arXiv:1811.08982, 2018. 2, 5 +[34] Shafin Rahman, Salman Khan, and Nick Barnes. Transdu c tive learning for zero-shot object detection. International Conference on Computer Vision (ICCV), 2019. 2, 3, 5 +[35] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. In NIPS, 2015. 1, 2, 3, 6 +[36] Adam Santoro, David Raposo, David G Barrett, Mateusz Malinowski, Razvan Pascanu, Peter Battaglia, and Timothy Lillicrap. A simple neural network module for relational reasoning. In Advances in Neural Information Processing Systems 30. 2017. 4 +[37] Liyue Shen, Serena Yeung, Judy Hoffman, Greg Mori, and Fei Fei Li. Scaling human-object interaction recognition through zero-shot learning. In WACV, 2018. 1, 2, 6 +[38] Richard Socher, Milind Ganjoo, Christopher D. Manning, and Andrew Y. Ng. Zero-shot learning through cross-modal transfer. In NIPS, 2013. 2 +[39] Bo Wan, Desen Zhou, Yongfei Liu, Rongjie Li, and Xuming He. Pose-aware multi-level feature network for human object interaction detection. In The IEEE International Conference on Computer Vision (ICCV), 2019. 1, 2, 7 +[40] Tiancai Wang, Rao Muhammad Anwer, Muhammad Haris Khan, Fahad Shahbaz Khan, Yanwei Pang, Ling Shao, and Jorma Laaksonen. Deep contextual attention for human-object interaction detection. In The IEEE International Conference on Computer Vision (ICCV), 2019. 1, 2, 7 +[41] Xiaolong Wang, Yufei Ye, and Abhinav Gupta. Zero-shot recognition via semantic embeddings and knowledge graphs. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[42] Yongqin Xian, Bernt Schiele, and Zeynep Akata. Zero-shot learning - the good, the bad and the ugly. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 2 +[43] Tete Xiao, Quanfu Fan, Dan Gutfreund, Mathew Monfort, Aude Oliva, and Bolei Zhou. Reasoning about human-object interactions through dual attention networks. In The IEEE International Conference on Computer Vision (ICCV), 2019. 1, 2 +[44] Bingjie Xu, Yongkang Wong, Junnan Li, Qi Zhao, and Mohan S. Kankanhalli. Learning to detect human-object interactions with knowledge. In CVPR, 2019. 1, 2, 3, 6, 7 +[45] Ruichi Yu, Ang Li, Vlad I. Morariu, and Larry S. Davis. Visual relationship detection with internal and external linguistic knowledge distillation. In The IEEE International Conference on Computer Vision (ICCV), 2017. 2 +[46] Yibing Zhan, Jun Yu, Ting Yu, and Dacheng Tao. On exploring undetermined relationships for visual relationship detection. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2 + +[47] Li Zhang, Tao Xiang, and Shaogang Gong. Learning a deep embedding model for zero-shot learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. 2 +[48] Penghao Zhou and Mingmin Chi. Relation parsing neural network for human-object interaction detection. In The IEEE International Conference on Computer Vision (ICCV), 2019, 1, 2 +[49] Pengkai Zhu, Hanxiao Wang, and Venkatesh Saligrama. Generalized zero-shot recognition based on visually semantic embedding. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2 \ No newline at end of file diff --git a/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/images.zip b/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b22219f522d06d24a6c5fa19cf4b50a83d75ee55 --- /dev/null +++ b/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d81ec66a747313356131f4c0c81f4a42908c99b6d08eec04475e4507b7779abe +size 877466 diff --git a/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/layout.json b/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..17f1aa48ddb4acb74ddd627d388064081b2ff159 --- /dev/null +++ b/discoveringhumaninteractionswithnovelobjectsviazeroshotlearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a17f5b01d5e08b7e7119fa81ecae0453ddc763be83150aa7ee494ecf576f12f +size 409636 diff --git a/discoveringsynchronizedsubsetsofsequencesalargescalesolution/652ffde9-3bb1-47a4-a3c4-4ae185e5c6e8_content_list.json b/discoveringsynchronizedsubsetsofsequencesalargescalesolution/652ffde9-3bb1-47a4-a3c4-4ae185e5c6e8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d097cd0bea9757e17f55226a6b7989d1b1a97f32 --- /dev/null +++ b/discoveringsynchronizedsubsetsofsequencesalargescalesolution/652ffde9-3bb1-47a4-a3c4-4ae185e5c6e8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32312f522a3ed95149ab4b59ecfce779a245a2dafd0f53e49f13672d429b4cd0 +size 85119 diff --git a/discoveringsynchronizedsubsetsofsequencesalargescalesolution/652ffde9-3bb1-47a4-a3c4-4ae185e5c6e8_model.json b/discoveringsynchronizedsubsetsofsequencesalargescalesolution/652ffde9-3bb1-47a4-a3c4-4ae185e5c6e8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e484bb833d9523ddbe4180b1fce7179fa26fe2a2 --- /dev/null +++ b/discoveringsynchronizedsubsetsofsequencesalargescalesolution/652ffde9-3bb1-47a4-a3c4-4ae185e5c6e8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e6625c0b95bf1128c98a5b61ee48503b7fc4e087066c55d850ea43324d33ab7 +size 105849 diff --git a/discoveringsynchronizedsubsetsofsequencesalargescalesolution/652ffde9-3bb1-47a4-a3c4-4ae185e5c6e8_origin.pdf b/discoveringsynchronizedsubsetsofsequencesalargescalesolution/652ffde9-3bb1-47a4-a3c4-4ae185e5c6e8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8802fcce741e77cfbf0bd044a4bcd2651d577337 --- /dev/null +++ b/discoveringsynchronizedsubsetsofsequencesalargescalesolution/652ffde9-3bb1-47a4-a3c4-4ae185e5c6e8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a20570abcfcf6fcbac178bcf875cb137556463b2b16fd31d41e8a413c5b5422c +size 3245475 diff --git a/discoveringsynchronizedsubsetsofsequencesalargescalesolution/full.md b/discoveringsynchronizedsubsetsofsequencesalargescalesolution/full.md new file mode 100644 index 0000000000000000000000000000000000000000..72dffba936eeaf77dfdba9cdeaeea6b828378589 --- /dev/null +++ b/discoveringsynchronizedsubsetsofsequencesalargescalesolution/full.md @@ -0,0 +1,353 @@ +# Discovering Synchronized Subsets of Sequences: A Large Scale Solution + +Evangelos Sariyanidi1, Casey J. Zampella1, Keith G. Bartley1, John D. Herrington1,2, Theodore D. Satterthwaite2, Robert T. Schultz1,2 and Birkan Tunc1,2 +1Center for Autism Research, Children's Hospital of Philadelphia 2University of Pennsylvania {sariyanide, zampellac, bartleyg, herringtonj, schultzrt, tuncb}@email.chop.edu + +# Abstract + +Finding the largest subset of sequences (i.e., time series) that are correlated above a certain threshold, within large datasets, is of significant interest for computer vision and pattern recognition problems across domains, including behavior analysis, computational biology, neuroscience, and finance. Maximal clique algorithms can be used to solve this problem, but they are not scalable. We present an approximate, but highly efficient and scalable, method that represents the search space as a union of sets called $\epsilon$ -expanded clusters, one of which is theoretically guaranteed to contain the largest subset of synchronized sequences. The method finds synchronized sets by fitting a Euclidean ball on $\epsilon$ -expanded clusters, using Jung's theorem. We validate the method on data from the three distinct domains of facial behavior analysis, finance, and neuroscience, where we respectively discover the synchrony among pixels of face videos, stock market item prices, and dynamic brain connectivity data. Experiments show that our method produces results comparable to, but up to 300 times faster than, maximal clique algorithms, with speed gains increasing exponentially with the number of input sequences. + +# 1. Introduction + +Synchrony is observed in countless phenomena and its discovery is central to answering many computer vision and pattern recognition problems. However, a basic research problem has remained surprisingly underexplored: Given a set of sequences (i.e., time series), how can we discover the largest subset in which every pair of sequences satisfies a synchrony criterion? This problem naturally arises in many domains. For example, in a video, only movement in a subset of pixels is synchronized in time, and their identification can lead to discovering events of interest (e.g., facial expressions [58, 54]). In the stock market, the prices of only certain and a priori unknown assets are correlated. The brain is dynamically organized into subsets of neurons (i.e., modules, systems) that have synchronous activation. Indeed, + +researchers have used the synchrony among sequences to mine financial data [4, 29], define the functional architecture of the brain [22, 6], and identify community structure in complex networks [36, 31]. Previous research in this area has commonly employed maximal clique algorithms. However, despite their widespread use, maximal clique algorithms have exponential complexity [48], which imposes a barrier on possible research questions that can be targeted. + +In this paper, we propose an efficient and scalable framework to approximately solve the following problem: Given a set of sequences, find the largest subset such that all pairs of sequences in that subset are correlated above a given threshold. The framework first clusters all input sequences, and then refines the clusters until all sequences within the clusters are synchronized (i.e., pairwise correlated). Prior to refining, the clusters are enlarged to obtain so-called $\epsilon$ -expanded clusters. We call our method SyncRef, as it finds synchronized subsets through refining. Herein, we demonstrate SyncRef's versatility through experiments on data from three distinct domains, namely computer vision (motion of video pixels), finance (price of market assets), and neuroscience (neuronal activity). These experiments clearly demonstrate that SyncRef yields solutions that are highly comparable to an exact solution, yet are obtained hundreds of times faster. Moreover, the speed gains of SyncRef increase exponentially with the number of sequences. + +This paper makes two specific technical contributions. First, we introduce the concept of $\epsilon$ -expansion, a principled approach to expand a set of clusters that span the input set. The largest possible subset of synchronized sequences is theoretically guaranteed to be contained within one of the $\epsilon$ -expanded clusters. Second, we show how to use Jung's theorem to ensure that all possible pairs of sequences in the output solution are correlated above a given threshold. We also provide directions for how to extend the SyncRef method to discover the largest subset of locally correlated sequences within an unknown time window. The code of SyncRef is publicly available at https://github.com/sariyanidi/SyncRef. + +# 1.1. Problem formulation + +We now formulate the problem of discovering synchronized (i.e., pairwise correlated) subsets of sequences (i.e., time series). Let $\mathcal{X}$ be a set of $N$ sequences, each having $T$ time values, $\mathcal{X} = \{x_i\}_{i=1}^N$ . Let $r(x_i, x_j)$ be the correlation coefficient between the sequences $x_i$ and $x_j$ . We call a pair of sequences synchronized if their correlation is not less than $\rho_\theta$ , or, equivalently, if the $\ell_2$ norm of the difference of the $z$ -normalized sequences is not more than $\epsilon_\theta := \sqrt{2T(1 - \rho_\theta)}$ (see Supplementary Appendix A). Similarly, we say that a set of sequences $\mathcal{S} := \{x_i\}_{i \in \mathcal{I}}$ , where $\mathcal{I}$ is a subset of $\{1, \ldots, N\}$ , is synchronized if all pairs of sequences in $\mathcal{S}$ are synchronized. We aim to find the largest synchronized set; i.e., the set with the maximal cardinality $|\mathcal{S}|$ . This optimization problem is expressed as follows. + +Problem 1. Given sequence set $\mathcal{X} = \{x_i\}_{i=1}^N$ and $\epsilon_{\theta}$ , + +$$ +m a x i m i z e \quad | \mathcal {S} | \tag {1} +$$ + +$$ +s u b j e c t \quad \mathcal {S} = \left\{x _ {i} \right\} _ {i \in \mathcal {I}}, \mathcal {I} \subseteq \{1, \dots , N \}, \tag {2} +$$ + +$$ +\left| \left| \tilde {x} _ {i} - \tilde {x} _ {j} \right| \right| _ {2} \leq \epsilon_ {\theta} \forall i, j \in \mathcal {I}, \tag {3} +$$ + +where $\tilde{x}_i$ is the $z$ -normalized version of sequence $x_i$ . + +This problem is equivalent to finding the largest maximal clique in a binary graph whose nodes represent sequences, and two nodes are connected if the distance between them is at most $\epsilon_{\theta}$ —an NP-complete problem. + +# 1.2. Related work + +Correlation is arguably the most standard metric of synchrony across domains [12, 18, 38, 20, 30, 33, 28, 45, 47, 52]. However, it is not straightforward to apply the correlation metric to the task of identifying the largest subset of synchronized sequences in a given set of sequences. A naive method would be to construct all possible subsets of the given set of sequences, and test whether the pairwise correlation among all the members of each subset is larger than a predefined threshold. However, a set with $n$ sequences has $2^{n}$ possible subsets; therefore, this method is not scalable. + +A popular approach for identifying synchrony is to use warping methods (e.g., dynamic time warping) [40, 41]. While methods that can be applied to multiple sequences exist [55, 56, 49, 50], warping methods do not aim to identify the largest subset of synchronized sequences, as their goal is to optimize the time warping path among sequences. + +Branch and bound (B&B) frameworks have recently been proposed for unsupervised temporal commonality [10] and synchrony discovery [9, 8], but the problems addressed by them are inherently different than those addressed by our approach; those B&B methods do not aim to identify subsets of sequences that are synchronized [i.e., subsets that satisfy the condition in (3)]. + +A problem related to ours is longest common substring (LCS) discovery [23]. However, LCS discovery applies to discrete-valued data (e.g., words, DNA/protein sequences), whereas we are interested in continuous-valued sequences. + +One can use clustering to identify similar sequences [46]. However, no clustering approach (including hierarchical clustering) or other space partitioning algorithms such as KD trees can ensure that the condition in (3) is satisfied—that the pairwise correlation among all members of a cluster exceeds a given threshold. The closest clustering paradigm to ours is that of density based approaches, which impose a proximity constraint—a distance threshold—to include an element in a cluster [15]. Still, these approaches do not require that all pairs in the cluster satisfy the proximity constraint; it suffices for any member of a cluster to be sufficiently close to any other member. + +Finally, our problem can be solved using generic maximal clique algorithms [48, 5] (Section 1.1). Unfortunately, those algorithms are not practical for operation on large $N$ , due to their computational time and space complexity (see also Section 3.1.4). One can also use an approximate maximal clique finding algorithm [17] to reduce computational complexity. In our experiments, we compare with both exact and approximate maximal clique finding algorithms. We experiment using facial videos, financial time series and brain connectivity data. SyncRef can have further applications, such as anomaly detection [3], if anomaly is manifested with synchronous behavior of a subset of time series. + +# 2. The SyncRef method + +We now describe how to approximately solve Problem 1 with the proposed SyncRef approach. The input to SyncRef is the set that contains all sequences, $\mathcal{X}$ . SyncRef gradually filters out irrelevant sequences to yield a synchronized set. + +Fig. 1 illustrates the entire framework. We first cast all sequences into a time-invariant principal component analysis (PCA) representation (Fig. 1c). Then, we cluster sequences efficiently by defining thresholds on their PCA coefficients (Fig. 1c, Section 2.2). We then enlarge clusters to get the so-called $\epsilon$ -expanded clusters (Fig. 1d). We show that the largest possible synchronized set $S$ is guaranteed to be contained entirely in one of the $\epsilon$ -expanded clusters. Finally, we output a synchronized set by removing sequences from an expanded cluster until the inequalities in (3) are satisfied (Fig. 1e,f; Section 2.4). The entire process is summarized in the algorithm in Table 1. + +# 2.1. Representing via PCA + +Since SyncRef necessitates calculation of distances between sequences, reducing the dimensionality of the input sequences improves efficiency. For this purpose, we compress all sequences by applying PCA. To this end, we form a $T \times N$ matrix $\tilde{\mathbf{X}}$ whose columns are the $z$ -normalized + +![](images/c35c3b809107fa73f48bf42e61ee732ffa848db0debed66e9e272246e33cbae8.jpg) +(a) + +![](images/a0115a69dec265a031cfb0afec1aef281688a772af0b98acefb53c62d0e46ba7.jpg) + +![](images/f44491190d98317bd6d8ea10cd33e8ea4e8e965f8742f48e53d3583cf4f093f7.jpg) + +![](images/f9656b43e70cb4cdae649a8fdd6a841cd381a840fa0380d4fac94f3531e11478.jpg) + +![](images/46cbe84e9974407d4b07cd6593216c120c3a40a6271a88ad3521bfd2357d9d6d.jpg) + +![](images/51daa124098f09dffc932af937c0c98efbdd9bdd7f1cce011d85bc840dfcdc9a.jpg) + +![](images/46183747d2670095eb0ae5b7b992dc7c88cd997715a44fbb771724976641fef8.jpg) + +![](images/cee3f7f72fe24da127fb8f23aa70f4fe39d9162836e8546bfbd6a60074600343.jpg) + +![](images/1bb4936b0673008e95e873ea37423933ab4138883f3ac1fa2f1d3bda2d07a47f.jpg) + +![](images/e48ec6c7bd7bf3b04ff2c15f62507c5acb49d2237765eee40bd20c67f920d9eb.jpg) +(b) + +![](images/3e4cc9a83d7682f592e642c2e43657627b8212b0f3dd0f20e40d7ee56f3cdfba.jpg) +Figure 1. Illustration of how SyncRef finds a synchronized set of sequences. (a) A face video of $100 \times 100$ frames. (b) Input to SyncRef: The set $\mathcal{X}$ of 10,000 sequences, where each sequence corresponds to the optical flow magnitude of a pixel w.r.t. the first frame. (c) Illustration of the PCA representation of sequences in (b); for visualization we use two PCA coefficients $u_{1}, u_{2}$ . Each rectangular region, defined by dashed lines (i.e., thresholds $\theta_{k}^{j}$ ), is a cluster. $C^{j}$ is the most populated cluster. (d) The $\epsilon$ -expanded cluster $C_{\epsilon}^{j}$ . (e) The identified synchronized set $S$ ; all points within the circle are correlated at least by $\rho_{\theta} = 0.80$ . (f) The synchronized set of sequences illustrated back on the time domain: Those sequences correspond to pixels around the mouth region activated with the smile in (a). + +![](images/eee645828e78180ce75d94291f8ca46fcb3c22dd696142d4c75529ab6a112fea.jpg) + +![](images/9b5478e8c993e0f63df2c048f592dd6393b76a070f3b93f3f6af7c21dc1bf4a4.jpg) + +![](images/fb8fabef58d58933a4cd0d91ca99e5bfdbe348872dd6b84202039ff001c7ebf5.jpg) +(f) + +Table 1. Algorithm summarizing the SyncRef method. + +
Input: Set of N sequences, X={xi}i=1
Output: Set of synchronized sequences S such that S⊆X
+ +1. Compute PCA representations of all sequences, $\{\mathbf{u}^i\}_i$ , using eq. (4) +2. Determine clusters $\{C^j\}_{j}$ by computing the thresholds $\{\theta_k^j\}_{j,k}$ as described in Section 2.2 +3. For $j = 1, \dots, M^K$ , find all the sequences that belong to cluster $C^j$ , i.e. sequences whose PCA representation $\mathbf{u}^i = (u_1^i, \dots, u_K^i)$ satisfies $\theta_k^{j_k} < u_k^i \leq \theta_k^{j_k + 1}$ for $k = 1, \dots, K$ (Section 2.2) +4. Find $\epsilon$ -neighbours of all clusters $\{C^j\}_j$ via ineq. (5), Section 2.3 +5. For $j = 1, \dots, M^K$ , obtain expanded cluster $C_{\epsilon}^{j}$ by applying Lemma 2.2 to all points that belong to $\epsilon$ -neighbours of $C^j$ (Section 2.3) +6. Apply a refining as in Section 2.4 to the $N_{C}$ most populated expanded clusters to obtain $N_{C}$ synchronized subsets +7. Set $S$ to the largest among the $N_C$ subsets computed at step 6. + +sequences, $\tilde{x}_1,\tilde{x}_2,\ldots ,\tilde{x}_N$ . Then, we approximately reconstruct this matrix using PCA as + +$$ +\tilde {\mathbf {X}} \approx \mathbf {W} \mathbf {U}, \tag {4} +$$ + +where $\mathbf{W}$ is the PCA basis matrix and its columns form an orthogonal set of vectors. The size of $\mathbf{W}$ is $T\times K$ where $K$ is chosen such that $K < \min \{T,N\}$ for compression. $\mathbf{U} = (\mathbf{u}^1,\mathbf{u}^2,\dots ,\mathbf{u}^N)$ is the matrix with the PCA coefficients where each column $\mathbf{u}^i = (u_1^i,u_2^i,\ldots ,u_K^i)^T$ contains the compressed representation of the sequence $\tilde{x}_i$ . + +# 2.2. Clustering via partitioning $\mathbb{R}^K$ + +In order to cluster sequences efficiently, we partition $\mathbb{R}^K$ -the set of all possible PCA coefficients- by defining thresholds over PCA coefficients. For each PCA coefficient $u_{k}$ , we define $M + 1$ monotonically increasing threshold values $\theta_k^0,\dots ,\theta_k^M$ that partition the real line into $M$ nonoverlapping intervals (Fig. 1c). To ensure that the entire $\mathbb{R}^K$ + +is partitioned, we always set $\theta_k^0$ to $-\infty$ and $\theta_k^M$ to $\infty$ . The determination of the other thresholds is explained below. + +Definition 1. A cluster is a set in $\mathbb{R}^K$ defined by $K$ threshold intervals $(\theta_1^{j_1},\theta_1^{j_1 + 1}],\ldots ,(\theta_K^{j_K},\theta_K^{j_K + 1}]$ as $C^{j_1j_2\dots j_K}\coloneqq \{(u_1,\dots ,u_K)\in \mathbb{R}^K:\theta_k^{j_k} < u_k\leq \theta_k^{j_k + 1}\}$ , where $j_{k}\in \{0,1,\dots ,M\}$ . For brevity, we denote the cluster $C^{j_1j_2\dots j_K}$ as $C^j$ . + +Since each dimension of $\mathbb{R}^K$ is divided into $M$ intervals, we have a total of $M^K$ possible unique clusters, and the union of all clusters covers $\mathbb{R}^K$ , i.e., $\bigcup_{j=1}^{M^K} C^j = \mathbb{R}^K$ . + +PCA coefficients of different orders may follow different activation patterns (e.g., lower order components may be activated more). Therefore, we define non-uniform thresholds that divide each dimension of $\mathbb{R}^K$ into equiprobable intervals. To determine equiprobable intervals on each dimension $k$ , we apply kernel density estimation on the PCA coefficients of the $k$ th dimension, $\{u_k^1, u_k^2, \ldots, u_k^N\}$ and thus estimate $p(u_k)$ , namely the probability density for the $k$ th coefficient. Then, we divide the real line into $M + 1$ intervals $\mathcal{I}_k = (\theta_k^j, \theta_k^{j+1}]$ in way that the probability $\int_{\mathcal{I}_k} p_k(u_k) \, \mathrm{d}u_k$ is $1 / M$ for any interval $\mathcal{I}_k = (\theta_k^j, \theta_k^{j+1}]$ . + +# 2.3. $\epsilon$ -expanded clusters + +Each cluster consists of sequences that have similar PCA coefficients; however, it is possible that highly correlated sequences that satisfy (3) are separated in different clusters. Here, we explain how to minimally expand clusters to ensure that the largest subset of sequences that satisfy condition (3) is entirely contained within one of the clusters. + +Definition 2. The $\epsilon$ -expanded cluster corresponding to cluster $C^j$ is $C_{\epsilon}^{j} := \bigcup_{\mathbf{u} \in C^{j}} B_{\epsilon}[\mathbf{u}]$ , where $B_{\epsilon}[\mathbf{u}]$ is the Eu + +ccludean ball of radius $\epsilon$ centered at $\mathbf{u}$ , i.e. $B_{\epsilon}[\mathbf{u}] = \{\mathbf{v} \in \mathbb{R}^{K} : ||\mathbf{u} - \mathbf{v}||_{2} \leq \epsilon\}$ . + +An illustration of an $\epsilon$ -cluster in $\mathbb{R}^2$ is the rounded rectangle in Fig. 1d. The following theorem is an important result, as it demonstrates that one of the $\epsilon$ -expanded clusters is guaranteed to contain the largest set of synchronized sequences. + +Theorem 2.1. Let $\mathcal{S} = \{x_i\}_{i\in \mathcal{I}}$ , where $\mathcal{I}\subseteq \{i\}_{i = 1}^{N}$ , be a set of $T$ -long sequences that satisfy inequalities (3) and $\mathcal{U}$ the set that contains the $K$ -dimensional compressed (i.e., $K < \min \{T,N\}$ ) PCA representations of those sequences, $\mathcal{U} = \{\mathbf{u}^i\}_{i\in \mathcal{I}}$ . Let $\epsilon$ be $\epsilon \coloneqq \epsilon_{\theta}\sqrt{K / (2(K + 1))}$ , and $\{C^j\}_{j}$ be a set of clusters (Definition 1) such that $\bigcup_{j}C^{j} = \mathbb{R}^{K}$ . Then, there exists an $\epsilon$ -expanded cluster $C_\epsilon^j$ such that $\mathcal{U}\subseteq C_\epsilon^j$ . Moreover, there is no $C_{\epsilon_0}^j$ with $\epsilon_0 < \epsilon$ that can in general guarantee the existence of $C^j$ such that $\mathcal{U}\subseteq C_{\epsilon_0}^j$ . + +Proof is in Supp. Appendix B. To use Theorem 2.1 in practice, we need to know when a point $\mathbf{u} \notin C^j$ belongs to $C_\epsilon^j$ . + +Lemma 2.2. A point $\mathbf{u}$ belongs to $C_{\epsilon}^{j}$ if and only if $\sum_{k=1}^{K} f\left(u_{k}; \theta_{k}^{j_{k}}, \theta_{k}^{j_{k}+1}\right) \leq \epsilon^{2}$ , where + +$$ +f\left(u_{k};\theta_{k}^{j_{k}},\theta_{k}^{j_{k} + 1}\right):= \left\{ \begin{array}{ll}0 & if u_{k}\in (\theta_{k}^{j_{k}},\theta_{k}^{j_{k} + 1}]\\ \min_{t\in \{j_{k},j_{k} + 1\}}\bigl\{(\theta_{k}^{t} - u_{k})^{2}\bigr \} else. \end{array} \right. +$$ + +The proof of Lemma 2.2 is shown in Supplementary Appendix C. To efficiently identify all members of an expanded cluster $C_{\epsilon}^{j}$ , we introduce the concept of $\epsilon$ -neighbors. We say that $C^i$ and $C^j$ are $\epsilon$ -neighbors if the $\ell_2$ distance of their closest points is less than $\epsilon$ (i.e., $\inf \{||\mathbf{u} - \mathbf{v}||_2 : \mathbf{u} \in C^i, \mathbf{v} \in C^j\} < \epsilon$ ). By definition of $\epsilon$ -expanded clusters, it follows that $C^i$ can contain members of $C_{\epsilon}^{j}$ if and only if $C^i$ and $C^j$ are $\epsilon$ -neighbors (e.g. only the five neighbors of $C^j$ in Fig. 1c can contain points of $C_{\epsilon}^{j}$ ; see also Fig. 1d). Thus, one can find all members of $\epsilon$ -expanded cluster $C_{\epsilon}^{j}$ by applying Lemma 2.2 to points that belong to $\epsilon$ -neighbors of $C^j$ , ignoring all other points, thus improving efficiency significantly. Moreover, $C^i$ and $C^j$ are $\epsilon$ -neighbors if + +$$ +\sum_ {k = 1} ^ {K} \min _ {\substack {p \in \left\{i _ {k}, i _ {k} + 1 \right\} \\ t \in \left\{j _ {k}, j _ {k} + 1 \right\}}} \left\{\left(\theta_ {k} ^ {p} - \theta_ {k} ^ {t}\right) ^ {2} \right\} < \epsilon^ {2} \tag{5} +$$ + +(see Supplementary Appendix D for proof). Thus, using inequality (5), one can efficiently find all the $\epsilon$ -neighbors of each cluster. + +# 2.4. Refining $\epsilon$ -expanded cluster + +We now explain how to refine $\epsilon$ -expanded clusters to output the (approximately) largest synchronized subset within a given set of sequences. This refining is the last step to + +solving Problem 1, and it is crucial as it ensures that the solution satisfies the condition in (3). Heuristically, we expect the optimal solution to lie in one of the most populated clusters, and experiments support this heuristic (Section 3.1.4). + +Solution via maximal cliques. We can apply a maximal clique algorithm to an expanded cluster to identify the largest synchronized subset in it. The advantage of this approach compared to applying maximal clique on the entire set of sequences is reduced space complexity, due to smaller graphs. Still, this can be inefficient for very large $N$ . + +Approximate solution via ball fitting. We now present a scalable approach. According to Jung's theorem [11], the radius of the tightest (Euclidean) ball enclosing a set of points that satisfy condition (3) can be any value within the range $\left[\epsilon_{\theta} / 2, \epsilon_{\theta}\sqrt{T / (2(T + 1))}\right]$ . This leads to the following iterative refinement approach: At each iteration, we compute the radius of the ball enclosing points in $C_{\epsilon}^{j}$ [21] and then remove from $C_{\epsilon}^{j}$ the farthest points from the mean. We terminate iterations when the radius reaches $\epsilon_{\theta}\sqrt{T / (2(T + 1))}$ . Note that points that are $\epsilon_{\theta} / 2$ away from the ball's center may still violate (3). Therefore, we compute the pairwise distance for all remaining points in $C_{\epsilon}^{j}$ that are $\epsilon_{\theta} / 2$ away from the ball's center, and remove the ones that violate condition (3). The same iterative procedure can be repeated by initializing not from the mean of all sequences in $C_{\epsilon}^{j}$ , but from a randomly selected point, and ignoring all points in $C_{\epsilon}^{j}$ that are $2\epsilon_{\theta}$ away from the randomly selected point. This turns out to be a useful strategy. Thus, we repeat the refining strategy described above for an additional randomly selected $\sigma$ percent of the points in $C_{\epsilon}^{j}$ , where $\sigma$ is determined empirically. Let $\mathcal{U}$ represent the set of refined points. Since we carry out the ball fitting on the PCA domain and since the columns of the PCA matrix $\mathbf{W}$ form an orthonormal set, the norm among any two points in $\mathcal{U}$ can be smaller than the actual norm of the corresponding sequences. As a result, some points in $\mathcal{U}$ can violate (3). Therefore, as a final step, we repeat the ball fitting procedure described above on the time domain; that is, we refine the set of sequences whose PCA representation lies in $\mathcal{U}$ . + +# 3. Experimental validation + +Next, we evaluate the ability of SyncRef to discover the largest synchronized subset within a given set of sequences. To evaluate the versatility and generalizability of the method, we use real data from three distinct domains, namely facial analysis, finance, and neuroscience. + +# 3.1. Optimization performance + +# 3.1.1 Metric + +We quantify (sub)optimality via mean percentage error (MPE). Let $\mathcal{X}_j$ be a set (of $N$ sequences) whose largest synchronized subset contains $S_j^*$ sequences, and let $\hat{S}_j^*$ be the + +size of the largest synchronized subset discovered with a given method. Then, the MPE over $N_{\mathcal{X}}$ sets of sequences is $\frac{1}{N_{\mathcal{X}}} \sum_{j=1}^{N_{\mathcal{X}}} \frac{S_j^* - \hat{S}_j^*}{S_j^*}$ . The exact solution $S_j^*$ is obtained via maximal clique (Section 3.1.3). We ran experiments on a cluster computer and allowed up to 100GB RAM per process (i.e., per set of sequences). We ignored the set of sequences in which the maximal clique algorithm failed with memory error. We limited $N$ to 1600 as maximal clique often failed beyond this number of sequences. + +# 3.1.2 Datasets and tasks + +Facial dataset. We use the MMI [37] dataset, which contains 327 facial expression videos at 30fps, annotated with temporal phase labels describing the evolution of expressions: neutral (i.e., expressionless), onset, apex, and offset [42]. From each video, we extract as many sequences as the number of pixels, where each sequence represents the motion (i.e., optical flow [16]) magnitude of one pixel. By finding the largest subset of synchronized sequences, we are effectively identifying the largest group of pixels that move together. Since the dominant event in the videos is a facial expression, we expect the largest group of synchronized pixels to correspond to the unfolding of that expression. Thus, their identification is of potential interest for unsupervised facial expression annotation (see also Section 3.2). In sum, we have $N_{\mathcal{X}} = 327$ input sets for which synchronized pixels are discovered. Video lengths vary between $T = 22$ and 177 frames. To evaluate how computational speed changes with $N$ , we randomly subsampled the optical flow representation to generate input sets of $N = 400, 800, 1200$ , and 1600 sequences. Obtaining ground truth for higher $N$ was not possible (Section 3.1.1). Prior to optical flow computation, we detected facial landmarks with OpenFace [2], used a part-based representation [42] of left/right eye and mouth, and applied temporal registration [43]. + +Stock market dataset. We fetched the data corresponding to daily stock price for all companies on the U.S. stock market for the past three years using a financial data API (financialmodellingrep.com). There are approximately 22 stock trading days per month. We eliminated companies whose price was not available for a large part of this three-year period, and the final number of available companies was 6,582. The task was to identify the largest subset of companies whose stock market prices were correlated. We treated each month of each year independently, and obtained a dataset with $N_{\chi} = 12 \times 3 = 36$ sets of sequences where each set contained 6,582 sequences with $T = 22$ values. Each value in a sequence contains the average of the highest and lowest stock price for the corresponding company within one day. For the same reasons with the facial dataset, we experimented on $N = 400$ , 800, 1200, and 1600 randomly subsampled sequences. + +Brain dataset. We used a subset of functional magnetic resonance imaging data from the Philadelphia Neurodevelopmental Cohort [44]. This subset contains data from $\mathcal{N}_X = 25$ healthy males. Each brain is represented by $N = 400$ sequences, corresponding to mean functional activation of 400 brain regions across time ( $T = 120$ ). Subsampling was not necessary as $N = 400$ was small enough to run maximal clique for obtaining ground truth. + +# 3.1.3 Compared methods and implementation + +Our method, which uses ball fitting (Section 2.4), is referred to as SyncRef. We compare with the following methods, some of which are variations of our method. (1) MaxClique: exact solution by finding the largest maximal clique [48] (Section 1.1); (2) Approximate MaxClique [27]; (3) SyncRef-MaxClique: the SyncRef method where refining is performed with maximal clique (Section 2.4); (4) BallFit: the ball fitting method (Section 2.4) on the entire set of input sequences (i.e., no clustering); (5) SyncRef-DCT: the SyncRef method where PCA is replaced with discrete cosine transform (DCT). We compare with DCT to see how PCA performs compared to a non-learned but still orthogonal representation. Since DCT is not a learned representation, we compute the thresholds for the SyncRef-DCT clusters (Section 2.2) offline on a large dataset of sequences [7]. + +We implemented our method on python. We use the method of Gartner [21] for ball fitting during refining. We set $M = 4$ and $K = 4$ . We refine the $N_C$ most populated clusters and report results for $N_C = 1, 2, \ldots, 16$ . To find maximal cliques, we used a state-of-the-art python package, networkx [27]. For approximate maximal cliques we used the approximation module of the same package. To our knowledge, there is no other method that we can compare SyncRef against (Section 1.2). + +# 3.1.4 Results + +Fig. 2a,b,c report the MPE of compared methods on the facial dataset, stock market dataset and brain dataset w.r.t. the number of refined clusters, $N_{C}$ (MaxClique is omitted since it is the exact solution; i.e. its MPE is 0). The top, middle and bottom rows of Fig. 2 respectively represent results for correlation thresholds of $\rho_{\theta} = 0.65$ , $\rho_{\theta} = 0.75$ and $\rho_{\theta} = 0.85$ . SyncRef-MaxClique's MPE goes to zero if enough clusters are searched (i.e., as $N_{C}$ increases). This is expected from Theorem 2.1, which guarantees that one of the $\epsilon$ -expanded clusters will entirely contain the optimal solution. SyncRef and SyncRef-DCT perform better with the higher $\sigma$ , as clusters are refined more thoroughly. For $\sigma = 0.05$ , both SyncRef and SyncRef-DCT always outperform BallFit for sufficiently large $N_{C}$ . Approximate MaxClique works well on the brain dataset but relatively poorly on the other datasets. + +![](images/4b18f5677977ddceb0ef01cd40761870e33862054ec931e47854b081e9fa790b.jpg) +(a) + +![](images/088a9e66eefb2997b4c0d374a3bce8c2588f419b3813c78d918b9289c416b411.jpg) + +![](images/658d46fefd04b105335e9c74d5cd9db2eb3ccb87b45d935bdf6a162b4696d9af.jpg) + +![](images/8563ef78df576e16368fba4b1984612511fb74df4c4a9949aec8025bb9276ece.jpg) +(b) + +![](images/1a49a7255bbcd558bf788f799b918963bf2917e0ba5c13684952ee9762631293.jpg) + +![](images/84e07a8f0b4add346dc3cc4e3a9f8a96eb1170a751265778434d147e090b3815.jpg) + +![](images/b490d882bba63b25562c49beed40302afca3487f8012886f9637da1e09bd2a3d.jpg) +(c) + +![](images/34d702088c95fc10a968d0d1b43d4a47081fe6dc460d9cbf432edd08b335a82f.jpg) + +![](images/547168fd8a1099839a3dc8d44d53845c0eb46f2f182f7f0c1d8386e52b7c3600.jpg) + +![](images/115461b4b223e5e857469e3e821628e54b929c12f0a1bd9a29a82268d531637e.jpg) +Figure 2. Mean percentage error (MPE) on facial (a), stock market (b), and brain (c) datasets against the number of expanded clusters that were refined $(N_{C})$ for varying number of input sequences $(N)$ . Top, middle, and bottom rows respectively represent results for $\rho_{\theta} = 0.65$ , $\rho_{\theta} = 0.75$ and $\rho_{\theta} = 0.85$ . BallFit and Approximate Max. Clique do not depend on $N_{C}$ . MaxClique is omitted from (a-c) as its MPE is 0. + +Table 2. Average computation time in seconds and speed gain relative to the exact solution (given within parentheses) for increasing numbers of input sequences $(N)$ . Speed gain for MaxClique is always 1 since it is the exact solution. + +
Facial data
MethodN=400N=800N=1200N=1600
Exact (MaxClique)1.8 (1)27.9 (1)205.9 (1)392.3 (1)
Approximate MaxClique10.9 (0.3)72.6 (0.4)220.25 (0.9)477.6 (0.8)
BallFit1.0 (1.7)4.0 (7.1)9.0 (22.9)15.0 (26.1)
SyncRef-Max.Clique5.1 (0.3)105.7 (0.3)822.8 (0.3)1256.3 (0.3)
SyncRef-DCT σ = .0050.4 (5.1)1.1 (24.5)2.5 (82.0)5.4 (73.2)
SyncRef-DCT σ = .051.0 (1.9)3.4 (8.2)7.2 (28.3)12.5 (31.4)
SyncRef σ = .0050.9 (2.0)1.1 (25.1)1.2 (167.5)1.3 (311.2)
SyncRef σ = .050.9 (2.0)1.1 (25.4)1.2 (166.6)1.3 (303.8)
+ +Overall, SyncRef has the best and most consistent performance across the three datasets. Error drops below $5\%$ in all cases when $N_{C} = 16$ clusters are searched and in most when $N_{C} = 8$ clusters are searched. SyncRef and SyncRef-DCT perform similarly on the facial dataset, but there is a visible difference on other datasets. The high and consistent performance of SyncRef is remarkable as the characteristics of the sequences in each dataset are very different (Fig. 3). Facial and stock market sequences are relatively smooth (Fig 3a,b), but the brain dataset shows abrupt variations (Fig 3c), which explains the poor performance of DCT on the latter dataset. SyncRef works equally well on all datasets, as PCA compression does not impose assumptions regarding smoothness of sequences. + +Table. 2 shows average computing times and computation gains relative to exact solution. SyncRef-MaxClique can be slower than the exact solution, as it performs searches repeatedly on partially overlapping clusters. However, SyncRef-MaxClique can be advantageous when memory restrictions are present (Section 2.4). Approximate MaxClique is also slower than MaxClique, but the former is more scalable in terms of memory: While MaxClique failed occasionally even when we allowed 100GB of RAM, no such problem was observed for other methods, even with much less RAM (e.g., 16GB). SyncRef and SyncRef-DCT are always faster than all other methods. SyncRef-DCT is faster than Sync-Ref when $N$ is not very large, as the cluster thresholds for the former are computed offline (Section 3.1.3). Importantly, SyncRef is faster when $N$ is large (e.g., $N = 1600$ ), as the cost of computing thresholds becomes negligible and also because PCA uses clusters more efficiently as it adapts to data. Of note, the speed gain of Sync-Ref relative to exact solution exceeds 300 for $N = 1600$ . Table 2 shows that the computation time of SyncRef increases very modestly with $N$ , which suggests that it can be applied to even larger $N$ . Nevertheless, 1, 600 is already a very large number for our NP-hard problem, as obtaining exact solution not only takes very long time but also requires large computation space (i.e., RAM; Section 3.1.1) + +Conclusion. SyncRef achieves results comparable to the exact solution (less than $5\%$ MPE) across three datasets + +![](images/62cfaa3db4506ce9cc9032485c2e68fdfd022ebfe91a1f57f7df0710e4409bae.jpg) +(a) +(d) + +(b) + +![](images/0d2e1a9902e974606e6e8be3788a48b953e55997a0d6ab25c416c21ca1f4749c.jpg) +(b) +(e) + +![](images/b6afdd2d7dfe573c0822f709bb78a688a75cb325adc3ee7a8d4ab825349f73d1.jpg) +(c) + +![](images/a75a5d901eb07aa5993060750bea0e26b0d8b234fb3c5aaf37ead636dd6072fe.jpg) +Figure 3. Illustration of synchronized sequences discovered by SyncRef $(\sigma = 0.05; \rho_{\theta} = 0.75)$ . 35 randomly selected sequences from the (a) facial, (b) stock market, and (c) brain datasets; the subset of synchronized sequences discovered by SyncRef are highlighted in green and also shown by overlaying in (d), (e) and (f). + +from distinct domains, and is up to hundreds of times faster than the exact solution, with a speed advantage that increases exponentially with the number of sequences. + +# 3.2. Interpretation of synchronized sequences + +We discuss the interpretation of the synchronized sequences for which quantitative results were given in Section 3.1.4. We focus on the face and brain datasets, as the interpretation and research value of identifying co-movement in stock market asset prices is more evident [32, 34, 39]. + +Facial data. Prediction of facial expressions' temporal phases (i.e., neutral, onset, apex, and offset) [13] is an active research problem [57, 58, 53, 54] as annotated data is necessary for facial expression research and automation of this process eliminates or aids meticulous manual work. + +We show that synchronized pixels in facial expression videos are directly related to the temporal phases of the displayed expression. We use the MMI dataset, which has manually annotated temporal phases of expressions (Section 3.1.2). We generate two input sets of sequences per video: One with pixels corresponding to the upper face (eyes, brows), and one corresponding to lower face (mouth). We then use SyncRef $(\sigma = 0.05)$ to find the largest synchronized set (Fig. 4ii) from each input set (Fig. 4i), and finally estimate the temporal phase as the average of sequences within the synchronized set (Fig. 4iii). Thus, we estimate two temporal phase annotations (upper and lower face) per video. We evaluate accuracy with a standard annotation evaluation metric [1], namely Pearson's correlation. Specifically, we correlate the estimated upper (lower) face annotation with the temporal phase annotations of all the upper (lower) facial action units (AUs) [13, 42], and consider an estimation successful if the correlation is at least 0.85. + +SyncRef successfully estimated the temporal phase of at least one AU in $91.9\%$ of MMI videos. Table 3 shows the ratio of AUs whose temporal phase was successfully estimated. Fig. 4 shows the estimated and true temporal phase annotation for 15 MMI sequences. Overall, this section shows that discovering the synchronized sets of pixels in a video can be useful for identifying events of interest. For proof of concept, we used the MMI dataset where events are segmented in time. In a real application, one would need additional tools to eliminate irrelevant events (e.g., head movements) and to identify the exact temporal location of expressions. We discuss how SyncRef can be extended to address the latter issue in Section 4. + +Brain data. To show that the identified synchronized sets have neurobiological relevance, we visualized the regions of the brain that were identified as being synchronized (Fig. 5). The synchronized regions were mainly distributed within three functional systems. These included the default mode network (DMN), which has an important role in integrating different cognitive processes [24, 25]. The other two, namely somatomotor and visual systems, are known to be relatively more modular (i.e., densely correlated within themselves but only sparsely correlated to other systems), possibly acting as sensory modules [19, 26, 35]. Our finding is in agreement with the neuroscience literature [35], validating that SyncRef identifies biologically driven synchronized sets. Indeed, SyncRef can advance research in the field by allowing identification of synchronous neuronal clusters at the voxel-level, which is not possible with current methods due to extreme dimensionality $(\geq 10^{5})$ . + +![](images/40f77581eecfc79ec16e6623b87a9b93380b97e75481125df0a0c4b518939cc4.jpg) +i. Motion ii. Motion of iii. Predicted iv. Face i. Motion ii. Motion of iii. Predicted iv. Face i. Motion ii. Motion of iii. Predicted iv. Face of all pixels synced pixels & GT labels at apex of all pixels synced pixels & GT labels at apex of all pixels synced pixels & GT labels at apex + +![](images/b22de08454a6cc31dacd0dad9d73c290d76cb7c7ccba65320b65ef8265c1fa04.jpg) +Figure 4. Temporal phase estimation for 15 MMI sequences. For each sequence, we show (i) the input set i.e., the motion (optical flow magnitude) of all pixels over time; (ii) the motion of synchronized pixels discovered with SyncRef, (iii) the ground truth (GT) temporal phase label (solid green lines) vs. the label predicted as the mean of synchronized pixels (dashed blue lines); and (iv) expression at apex. + +![](images/1234d9b1a49e0c1f7ab9507f2e5bbd75e5d570127af099aa2113f77b167d30cb.jpg) + +Table 3. Ratio of Action Units (AUs) (in the MMI dataset) whose temporal phase annotation was predicted successfully with SyncRef. + +
Action unit:124567910111213141516171820222324252627284345
Prediction rate:.67.77.63.59.59.43.94.95.90.891.0.80.85.72.86.78.75.88.80.80.77.69.881.0.75.48
+ +![](images/8694323ce557d0c3d65a1981a11905f9cf3f9c73bf949c9ac8746234a373335b.jpg) +Figure 5. Brain regions with high synchrony $(\rho_{\theta} = 0.6)$ . (a) Regions are colored based on the number of times that they were included in the synchronized set. (b) Regions are assigned to the seven known functional systems of the brain. Numbers and colors indicate the number of times that the regions of these systems were included in the largest synchronized set. + +# 4. Future directions + +The range of applications for our approach of discovering synchrony can be increased significantly by allowing for local correlations; that is, identifying sequences correlated only within a time window rather than the entire sequence, and finding time windows where the number of correlated sequences is maximized. This can be done with a sliding window [51], which is a standard approach. This approach can be rendered efficient by replacing PCA with a representation that allows for the usage of integral images [51]. For Theorem 2.1 to be valid, the representation needs to also be an orthogonal transformation as this property is used in the proof (Supplementary Appendix B). Fortunately, there exist representations that satisfy these criteria. DCT is an orthogonal transformation that can be computed efficiently thanks + +to cosine integral images [14], and is effective for smooth sequences (Section 3.1.4). Haar basis is another representation that satisfies both criteria [51]. If those non-adaptive representations are not as effective as PCA, one can also consider a two-stage coarse-to-fine approach; that is, to use DCT or Haar to substantially reduce the candidates to time windows with a large number of synchronized sequences, and then to use SyncRef only on the remaining candidates. Another important extension to the SyncRef method is to allow for lags among sequences. While the proposed framework can be extended to allow for lag among sequences through a greedy framework, the theoretical guarantee of the $\epsilon$ -expanded clusters may not be preserved. + +# 5. Conclusion + +We presented SyncRef, a method to find the largest subset in a set of sequences such that every pair in the subset is correlated beyond a defined threshold. Data from three distinct domains clearly illustrate that SyncRef produces results comparable to the exact solution, but in a much faster and scalable manner. In addition, SyncRef is robust to the number of input sequences, the correlation threshold, and the type or source of data. + +# Acknowledgment + +We would like to thank Yusuf Osmanlioglu for his comments on the manuscript and the technical discussions that helped shaping up the method. The work of E. Sariyanidi, C. J. Zampella, R. T. Schultz and B. Tunc is partially funded by the NIMH of US under grant R01MH118327 and by the Eagles Autism Foundation. The work of R. T. Schultz is partially funded also by the McMorris Family Foundation. + +# References + +[1] AD Albano. Introduction to educational and psychological measurement using R, 2017. 7 +[2] T. Baltrusaitis, A. Zadeh, Y. C. Lim, and L. Morency. Openface 2.0: Facial behavior analysis toolkit. In Proc. IEEE Int'l Conf. Automatic Face Gesture Recognition, pages 59-66, May 2018. 5 +[3] Jawadul H Bappy, Sujoy Paul, Ertem Tuncel, and Amit K Roy-Chowdhury. Exploiting typicality for selecting informative and anomalous samples in videos. IEEE Trans. on Image Processing, 28(10):5214-5226, 2019. 2 +[4] Vladimir Boginski, Sergiy Butenko, and Panos M Pardalos. Mining market data: a network approach. Computers & Operations Research, 33(11):3171-3184, 2006. 1 +[5] Coen Bron and Joep Kerbosch. Algorithm 457: Finding all cliques of an undirected graph. Commun. ACM, 16(9):575-577, Sept. 1973. 2 +[6] Ed Bullmore and Olaf Sporns. Complex brain networks: graph theoretical analysis of structural and functional systems. Nature reviews. Neuroscience, 10(3):186-98, mar 2009. 1 +[7] Yanping Chen, Eamonn Keogh, Bing Hu, Nurjahan Begum, Anthony Bagnall, Abdullah Mueen, and Gustavo Batista. The UCR time series classification archive, July 2015. 5 +[8] Wen-Sheng Chu, Fernando De la Torre, Jeffrey F Cohn, and Daniel S Messinger. A branch-and-bound framework for unsupervised common event discovery. Int'l J. of Computer Vision, 123(3):372-391, 2017. 2 +[9] Wen-Sheng Chu, Jiabei Zeng, Fernando De la Torre, Jeffrey F Cohn, and Daniel S Messenger. Unsupervised synchrony discovery in human interaction. In Proc. IEEE Int'l Conference on Computer Vision, pages 3146-3154, 2015. 2 +[10] Wen-Sheng Chu, Feng Zhou, and Fernando De la Torre. Unsupervised temporal commonality discovery. In Proc. European Conf. on Computer Vision, pages 373-387, 2012. 2 +[11] Boris V Dekster. The Jung theorem for spherical and hyperbolic spaces. Acta Mathematica Hungarica, 67(4):315-331, 1995. 4 +[12] Emilie Delaherche, Mohamed Chetouani, Ammar Mahdhaoui, Catherine Saint-Georges, Sylvie Viaux, and David Cohen. Interpersonal synchrony: A survey of evaluation methods across disciplines. IEEE Transactions on Affective Computing, 3(3):349–365, 2012. 2 +[13] P. Ekman, W.V. Friesen, and J.C. Hager. The Facial Action Coding System. Weidenfeld and Nicolson, London, 2 edition, 2002. 7 +[14] Elhanan Elboher and Michael Werman. Cosine integral images for fast spatial and range filtering. In Proc. IEEE Int'l Conference on Image Processing, pages 89-92, 2011. 8 +[15] Martin Ester, Hans-Peter Kriegel, Jörg Sander, and Xiaowei Xu. A density-based algorithm for discovering clusters in large spatial databases with noise. In Proc. International Conference on Knowledge Discovery and Data Mining, pages 226-231. AAAI Press, 1996. 2 +[16] Gunnar Farnebäck. Two-frame motion estimation based on polynomial expansion. In Image Analysis, pages 363-370. 2003. 5 + +[17] Uriel Feige. Approximating maximum clique by removing subgraphs. SIAM Journal on Discrete Mathematics, 18(2):219-225, 2004. 2 +[18] Eileen M Finnegan, Erich S Luschei, Julie M Barkmeier, and Henry T Hoffman. Synchrony of laryngeal muscle activity in persons with vocal tremor. Archives of Otolaryngology-Head & Neck Surgery, 129(3):313-318, 2003. 2 +[19] Jerry Alan Fodor. Modularity of Mind: An Essay on Faculty Psychology. MIT Press, 1983. 7 +[20] Brandon K Fornwalt, Takeshi Arita, Mohit Bhasin, George Voulgaris, John D Merlino, Angel R León, Derek A Fyfe, and John N Oshinski. Cross-correlation quantification of dyssynchrony: a new method for quantifying the synchrony of contraction and relaxation in the heart. Journal of the American Society of Echocardiography, 20(12):1330-1337, 2007. 2 +[21] Bernd Gartner. Fast and robust smallest enclosing balls. In Jaroslav Nešetřil, editor, Algorithms - ESA' 99, pages 325-338, Berlin, Heidelberg, 1999. 4, 5 +[22] Chad Giusti, Eva Pastalkova, Carina Curto, and Vladimir Itskov. Clique topology reveals intrinsic geometric structure in neural correlations. Proceedings of the National Academy of Sciences, 112(44):13455-13460, 2015. 1 +[23] Szymon Grabowski. A note on the longest common substring with k-mismatches problem. Information Processing Letters, 115(6-8):640-642, 2015. 2 +[24] Michael D Greicius, Ben Krasnow, Allan L Reiss, and Vinod Menon. Functional connectivity in the resting brain: a network analysis of the default mode hypothesis. Proceedings of the National Academy of Sciences, 100(1):253-258, 2003. 7 +[25] Shi Gu, Theodore D Satterthwaite, John D Medaglia, Muzhi Yang, Raquel E Gur, Ruben C Gur, and Danielle S Bassett. Emergence of system roles in normative neurodevelopment. Proceedings of the National Academy of Sciences, 112(44):13681-13686, 2015. 7 +[26] Ruben C Gur, Jan Richard, Monica E Calkins, Rosetta Chiavacci, John A Hansen, Warren B Bilker, James Loughead, John J Connolly, Haijun Qiu, Frank D Mentch, et al. Age group and sex differences in performance on a computerized neurocognitive battery in children age 8-21. Neuropsychology, 26(2):251, 2012. 7 +[27] Aric Hagberg, Pieter Swart, and Daniel S Chult. Exploring network structure, dynamics, and function using networkx. Technical report, Los Alamos National Lab.(LANL), Los Alamos, NM (United States), 2008. 5 +[28] Ariel Haimovici, Enzo Tagliazucchi, Pablo Balenzuela, and Dante R Chialvo. Brain organization into resting state networks emerges at criticality on a model of the human connectome. Physical review letters, 110(17):178101, 2013. 2 +[29] Wei-Qiang Huang, Xin-Tian Zhuang, and Shuang Yao. A network analysis of the chinese stock market. Physica A: Statistical Mechanics and its Applications, 388(14):2956-2964, 2009. 1 +[30] Peter König. A method for the quantification of synchrony and oscillatory properties of neuronal activity. Journal of neuroscience methods, 54(1):31-37, 1994. 2 + +[31] Junqiu Li, Xingyuan Wang, and Yaozu Cui. Uncovering the overlapping community structure of complex networks by maximal cliques. Physica A: Statistical Mechanics and its Applications, 415:398-406, 2014. 1 +[32] Shu-hsien Liao, Pei-hui Chu, and Ying-lu You. Mining the co-movement between foreign exchange rates and category stock indexes in the taiwan financial capital market. Expert Systems with Applications, 38(4):4608-4617, 2011. 7 +[33] Francois Longin and Bruno Solnik. Extreme correlation of international equity markets. The journal of finance, 56(2):649-676, 2001. 2 +[34] Randall Morck, Bernard Yeung, and Wayne Yu. The information content of stock markets: why do emerging markets have synchronous stock price movements? Journal of financial economics, 58(1-2):215-260, 2000. 7 +[35] Yusuf Osmanlioglu, Birkan Tunç, Drew Parker, Mark A. Eliott, Graham L. Baum, Rastko Ciric, Theodore D. Satterthwaite, Raquel E. Gur, Ruben C. Gur, and Ragini Verma. System-level matching of structural and functional connectomes in the human brain. NeuroImage, 199:93 - 104, 2019. 7 +[36] Gergely Palla, Imre Derenyi, Illés Farkas, and Tamás Vicsek. Uncovering the overlapping community structure of complex networks in nature and society. *nature*, 435(7043):814, 2005. 1 +[37] M. Pantic, M. Valstar, R. Rademaker, and L. Maat. Web-based database for facial expression analysis. In Proc. IEEE Int'l Conf. Multimedia and Expo, page 5, 2005. 5 +[38] Emmanuel Paradis, Stephen R Baillie, William J Sutherland, and Richard D Gregory. Spatial synchrony in populations of birds: effects of habitat, population trend, and spatial scale. Ecology, 81(8):2112-2125, 2000. 2 +[39] Robert S Pindyck and Julio J Rotemberg. The comovement of stock prices. The quarterly journal of economics, 108(4):1073-1104, 1993. 7 +[40] Hiroaki Sakoe, Seibi Chiba, A Waibel, and KF Lee. Dynamic programming algorithm optimization for spoken word recognition. Readings in speech recognition, 159:224, 1990. 2 +[41] Stan Salvador and Philip Chan. Toward accurate dynamic time warping in linear time and space. Intelligent Data Analysis, 11(5):561-580, 2007. 2 +[42] E. Sariyanidi, H. Gunes, and A. Cavallaro. Automatic analysis of facial affect: A survey of registration, representation and recognition. IEEE Trans. on Pattern Analysis and Machine Intelligence, 37(6):1113-1133, 2015. 5, 7 +[43] E. Sariyanidi, H. Gunes, and A. Cavallaro. Robust registration of dynamic facial sequences. IEEE Trans. on Image Processing, 2016. 5 +[44] Theodore D Satterthwaite, Mark A Elliott, Kosha Ruparel, James Loughead, Karthik Prabhakaran, Monica E Calkins, Ryan Hopson, Chad Jackson, Jack Keefe, Marisa Riley, Frank D Mentch, Patrick Sleiman, Ragini Verma, Christos Davatzikos, Hakon Hakonarson, Ruben C Gur, and Raquel E Gur. Neuroimaging of the Philadelphia neurodevelopmental cohort. NeuroImage, 86:544-53, feb 2014. 5 + +[45] RC Schmidt, Samantha Morr, Paula Fitzpatrick, and Michael J Richardson. Measuring the dynamics of interactional synchrony. Journal of Nonverbal Behavior, 36(4):263-279, 2012. 2 +[46] Sohil Atul Shah and Vladlen Koltun. Robust continuous clustering. Proceedings of the National Academy of Sciences, 114(37):9814-9819, 2017. 2 +[47] Xiaofan Sun, Khiet P Truong, Maja Pantic, and Anton Nijholt. Towards visual and vocal mimicry recognition in human-human interactions. In Proc. IEEE Int'l Conf. on Systems, Man, and Cybernetics, pages 367-373, 2011. 2 +[48] Etsuji Tomita, Akira Tanaka, and Haruhisa Takahashi. The worst-case time complexity for generating all maximal cliques and computational experiments. Theoretical Computer Science, 363(1):28-42, 2006. 1, 2, 5 +[49] George Trigeorgis, Mihalis A Nicolaou, Björn W Schuller, and Stefanos Zafeiriou. Deep canonical time warping for simultaneous alignment and representation learning of sequences. IEEE Trans. Pattern Analysis and Machine Intelligence, 40(5):1128-1138, 2018. 2 +[50] George Trigeorgis, Mihalis A Nicolaou, Stefanos Zafeiriou, and Bjorn W Schuller. Deep canonical time warping. In Proc. IEEE Conf. Computer Vision and Pattern Recognition, pages 5110-5118, 2016. 2 +[51] Paul Viola and Michael J Jones. Robust real-time face detection. Int'l J. of Computer Vision, 57(2):137-154, 2004. 8 +[52] Xiang Yu, Shaoting Zhang, Yang Yu, Norah Dunbar, Matthew Jensen, Judee K Burgoon, and Dimitris N Metaxas. Automated analysis of interactional synchrony using robust facial tracking and expression recognition. In Proc. IEEE Int'l Conf. Automatic Face and Gesture Recognition Workshops, pages 1-6, 2013. 2 +[53] Lazaros Zafeiriou, Mihalis A Nicolaou, Stefanos Zafeiriou, Symeon Nikitidis, and Maja Pantic. Learning slow features for behaviour analysis. In Proc. Int'l Conf. Computer Vision, pages 2840-2847, 2013. 7 +[54] Lazaros Zafeiriou, Mihalis A Nicolaou, Stefanos Zafeiriou, Symeon Nikitidis, and Maja Pantic. Probabilistic slow features for behavior analysis. IEEE Trans. on Neural Networks and Learning Systems, 27(5):1034-1048, 2016. 1, 7 +[55] Feng Zhou and Fernando De la Torre. Generalized time warping for multi-modal alignment of human motion. In Proc. IEEE Conf. on Computer Vision and Pattern Recognition, pages 1282-1289, 2012. 2 +[56] Feng Zhou and Fernando De la Torre. Generalized canonical time warping. IEEE Trans. on Pattern Analysis and Machine Intelligence, 38(2):279-294, 2016. 2 +[57] Feng Zhou, Fernando De la Torre, and Jessica K Hodgins. Aligned cluster analysis for temporal segmentation of human motion. In IEEE Int'l Conf. on Automatic Face & Gesture recognition, pages 1-7, 2008. 7 +[58] Feng Zhou, Fernando De la Torre, and Jessica K Hodgins. Hierarchical aligned cluster analysis for temporal clustering of human motion. IEEE Trans. on Pattern Analysis and Machine Intelligence, 35(3):582-596, 2013. 1, 7 \ No newline at end of file diff --git a/discoveringsynchronizedsubsetsofsequencesalargescalesolution/images.zip b/discoveringsynchronizedsubsetsofsequencesalargescalesolution/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..be53f89ad9503109ef5899b61a0deb05cc45e24f --- /dev/null +++ b/discoveringsynchronizedsubsetsofsequencesalargescalesolution/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb9ade90e9c136dbb0fac40dc5d131b6922fee2842f4e229ccd257ad58fdc5be +size 776377 diff --git a/discoveringsynchronizedsubsetsofsequencesalargescalesolution/layout.json b/discoveringsynchronizedsubsetsofsequencesalargescalesolution/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..63e6a416be2685175d10d5c15c7b25ecf9f50206 --- /dev/null +++ b/discoveringsynchronizedsubsetsofsequencesalargescalesolution/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a40a8ff0f5b90af50c624ec434da237d616b8f0d94e9e0836edcb57eec12d46 +size 570456 diff --git a/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/1f6c37c8-114c-4513-821d-7287499c846f_content_list.json b/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/1f6c37c8-114c-4513-821d-7287499c846f_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..b70222a8dd4161b89f7a6bf26e82268a7b694122 --- /dev/null +++ b/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/1f6c37c8-114c-4513-821d-7287499c846f_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec0e960e9fdb52b73dca6189024bdd479719a8256a16349533f83c4c19c1ae1a +size 79901 diff --git a/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/1f6c37c8-114c-4513-821d-7287499c846f_model.json b/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/1f6c37c8-114c-4513-821d-7287499c846f_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c8fc8310fdd2bb41635826cc2d1ceec0d53e2168 --- /dev/null +++ b/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/1f6c37c8-114c-4513-821d-7287499c846f_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7b2ce42845a50c28d3c6519fe2b456a337e593dd877a3c3628eeed03b0e596d +size 101315 diff --git a/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/1f6c37c8-114c-4513-821d-7287499c846f_origin.pdf b/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/1f6c37c8-114c-4513-821d-7287499c846f_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6499cc97c038e2efc0a90c3fd8e9e8677a12ae22 --- /dev/null +++ b/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/1f6c37c8-114c-4513-821d-7287499c846f_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7ee04cd6d2ac4a43ea7895e384300223f24cb36cd27d641107dffc6fe89f8e0 +size 574526 diff --git a/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/full.md b/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8260ef0bcd37249ba84be7ccfc6e96be9c5683a7 --- /dev/null +++ b/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/full.md @@ -0,0 +1,371 @@ +# Discrete Model Compression with Resource Constraint for Deep Neural Networks + +Shangqian Gao $^{1,3}$ , Feihu Huang $^{1}$ , Jian Pei $^{2}$ , and Heng Huang $^{*1,3}$ + +1Electrical and Computer Engineering Department, University of Pittsburgh, PA, USA + +$^{2}$ School of Computing Science, Simon Fraser University, BC, Canada + +$^{3}$ JD Finance America Corporation, Mountain View, CA, USA + +shg84@pitt.edu, feh23@pitt.edu, jpei@cs.sfu.ca, heng.huang@pitt.edu + +# Abstract + +In this paper, we target to address the problem of compression and acceleration of Convolutional Neural Networks (CNNs). Specifically, we propose a novel structural pruning method to obtain a compact CNN with strong discriminative power. To find such networks, we propose an efficient discrete optimization method to directly optimize channel-wise differentiable discrete gate under resource constraint while freezing all the other model parameters. Although directly optimizing discrete variables is a complex non-smooth, non-convex and NP-hard problem, our optimization method can circumvent these difficulties by using the straight-through estimator. Thus, our method is able to ensure that the sub-network discovered within the training process reflects the true sub-network. We further extend the discrete gate to its stochastic version in order to thoroughly explore the potential sub-networks. Unlike many previous methods requiring per-layer hyper-parameters, we only require one hyper-parameter to control FLOPs budget. Moreover, our method is globally discrimination-aware due to the discrete setting. The experimental results on CIFAR10 and ImageNet show that our method is competitive with state-of-the-art methods. + +# 1. Introduction + +Convolutional Neural Networks (CNNs) have achieved great success in computer vision tasks [23, 39, 40, 42, 2]. With more and more sophisticated GPU support on CNNs, the complexity of CNN grows dramatically from several layers [23, 43] to hundreds of layers [9, 17]. Although these + +*Corresponding Author. This work was partially supported by U.S. NSF IIS 1836945, IIS 1836938, IIS 1845666, IIS 1852606, IIS 1838627, IIS 1837956. + +complex CNNs can achieve strong performance on vision tasks, there is an unavoidable growth of the computational cost and model parameters. Such a huge computational burden prohibits the model from being deployed on mobile devices and resource-limited platforms. Even if the model can be deployed on mobile devices, the battery will be depleted quickly due to huge computational costs. To tackle such problems, many efforts [8, 7] have been devoted for getting compact sub-networks from the original computational heavy model. + +Structural pruning, especially channel pruning, is an efficient way to reduce computational cost since it doesn't require any post-processing steps to acquire acceleration. One of the most challenging parts of structural pruning is how to deal with the natural discrete configuration of channels in each layer. Many existing works [31, 37] try to solve this problem by relaxing discrete values to continuous values. However, such relaxation may lead to a biased estimation of the corresponding pruning criterion, since you can't completely remove the impact of channels with small importance value. Some other methods [28, 34] use the estimation of channel importance to decide whether to prune a channel, nonetheless, the relative importance of a channel can be changed due to the choice of the sub-network. Recently, discrimination-aware pruning [49] has been proposed to explore the impact of discriminative power on channel pruning. Although this method considers the discriminative power of CNNs by adding classifiers on intermediate layers, it does not consider CNN as a whole, which may result in sub-optimal compression results. + +To deal with these challenges, we propose a new method of using the discrete gate to turn off or turn on certain channels. By doing so, we can always get the exact model output given different sub-network architectures. Thanks to the precise output estimation of a sub-network, our method + +is able to consider the discriminative power of a complete sub-network. At the same time, we do not take the magnitude of a channel into consideration, the global discriminative power is the only criterion. Moreover, we propose an efficient optimization method to obtain the subnetwork. Although directly optimizing discrete variables is often non-smooth non-convex and NP-hard, our optimization method can circumvent these difficulties by using the straight-through estimator (STE) [1]. + +Automatic Model Compression (AMC) [11] is a pioneer method using the discrete channel setting, which is optimized by reinforced learning. Different from AMC, our method is guided by gradients of the loss function when exploring sub-networks from the original CNN. Our method can obtain a sub-network efficiently due to its differentiable nature. On ImageNet dataset, our method can discover a high performance sub-network satisfying given budget within $2\%$ of time for regular training (finetuning time is excluded). From this perspective, our method is also related to differentiable architecture search (DARTS) [27]. + +Our main contributions are summarized as follows: + +1) To compress a model, we apply the discrete gate on each channel, which ensures that the output from any sub-networks is correct and unbiased. +2) We use STE to enable back-propagation through discrete variables. To further enlarge the search space of sub-networks, we replace the discrete gate with its stochastic version. +3) To ensure we can get the model with the given computational budget, we further propose resource regularization when exploring potential sub-networks. +4) Extensive experimental results show that our method achieves state-of-the-art results on CIFAR10 and ImageNet with ResNet and MobileNetV2. + +# 2. Related Works + +Model compression recently has drawn a lot of attention from the compute vision community. In general, current model compression methods can be separated into the following four categories: weight pruning, structural pruning, weight quantization, and knowledge distillation [14]. + +Weight pruning eliminates model parameters without any assumption on the structure of weights. One of the early works [8] uses $L_{1}$ or $L_{2}$ magnitude as criterion to remove weights. Under this setting, parameters lower than a certain threshold are removed, and weights with small magnitude are considered not important. A systematic DNN weight pruning framework [48] has been proposed by using alternating direction method of multipliers (ADMM) [3, 15, 16]. Different from the aforementioned works, SNIP [24] updates the importance of weights by backpropagating gradients from the loss function. Lottery ticket hypothesis [6] + +is another very interesting weight pruning algorithm, which manifests that small high-performance sub-networks exist within the overparameterized large network at initialization time. Different from the lottery ticket hypothesis, in rethinking the value of network pruning [29], they argue that fine-tuning a pre-trained model is not necessary and show that the pruned model with random initialization achieves better performance. he major drawback of weight level pruning is that they often require specially designed sparse matrix multiplication library to achieve acceleration. + +Different from weight pruning, structural pruning provides a natural way to reduce computational costs. The development of structural pruning is similar to weight pruning in that channels with low magnitude are often regarded as not important [25]. Similar to the idea of magnitude pruning, Group Lasso [45] is also applied on CNNs to structurally make channels or filters to have all 0 values, thus those channels can be safely removed. GrOWL [47] focuses on exploring inter-channel relations on top of sparsity, and argues that similar channels can share the same weights. The following researches show that weights with small magnitude could be important [30], and it's difficult for channels under $L_{1}$ regularization to achieve exact zero values. To compensate this, they propose to get exact zero values for each channel by using explicit $L_{0}$ regularization [30]. Besides simply using channel magnitude as pruning standards, other methods utilize batchnorm to achieve the similar target, since batchnorm [19] is an indispensable component in recent neural network designs [9, 17]. For each channel, batchnorm uses a scaling factor $\gamma$ to adjust the magnitude of corresponding feature maps. To achieve the goal of channel pruning, $\gamma$ is regularized to be sparse and $\gamma$ fell below a predefined threshold will be set to 0 during model pruning [28]. Other works related to this idea include [46, 18, 20]. Unlike previous methods relying on the magnitude of channels, discrimination-aware pruning [49] utilizes local discriminative power to help channel pruning. AMC [11] achieves the goal of channel pruning in a discrete setting by taking the advantages of reinforcing learning. Collaborative channel pruning [37] focuses on pruning channels by utilizing Taylor expansion of the loss function. Our method belongs to this category, the major difference between our method and previous model pruning methods is that our method strictly uses the discrete setting of channels while it can be optimized through gradient descent. + +Weight quantization is another direction for model compression, which focuses on reducing the numerical precision of weights from 32-bit float point value to low bit value. Binary connects [4] and binary neural network [38] push the full precision weight to binary weight values, making the model weights become binary values. The connection between our method and weight quantization is that both of them use STE to estimate the gradient for discrete value. + +![](images/d8d44e0292ac50046c083a553aaee00bc4734e6b14963137254db657dfa93255.jpg) +Figure 1: The gate training process of the proposed method. A sub-network is sampled according to Eq. (4). Then $\theta$ is optimized through STE with gradient descent. At the next iteration, the sub-network is sampled with the updated $\theta$ . + +Besides the aforementioned methods, there are works from other directions. There is a range of methods focus on pruning weights [33] or structures [35] by utilizing uncertainty in weights. EigenDamage [44] can achieve structural pruning by using Kronecker-factored eigenbasis. + +# 3. Proposed Method + +# 3.1. Notations + +To better describe proposed approach, we first define some notations. The feature map of each layer can be represented by $\mathcal{F}_l\in \Re^{C_l\times W_l\times H_l}$ where $C_l$ is the number of channels, $W_{l}$ and $H_{l}$ are height and width of the current feature map. $\mathcal{F}_{l,c}$ is the feature map of $c$ -th channel from $l$ -th layer. The mini-batch dimension of feature map is ignored to simplify notations. Throughout the paper, w.p. means with probability. $\mathbf{1} = [1,\dots ,1]^T$ is a vector with all ones. $\mathrm{sign}(\cdot)$ is the popular sign function. + +# 3.2. Differentiable Discrete Gate + +In this paper, to incorporate the discrete nature of channel pruning, we explicitly consider using discrete-valued gates to represent open or close of a channel. The discrete gate function can be described as follows: + +$$ +g (\theta) = \left\{ \begin{array}{l l} 1 & \text {i f} \theta \in [ 0. 5, 1 ], \\ 0 & \text {i f} \theta \in [ 0, 0. 5), \end{array} \right. \tag {1} +$$ + +where $\theta \in [0,1]$ is a learnable parameter in our setting. The discrete gate function is applied after the output feature map of a layer: + +$$ +\widehat {\mathcal {F}} _ {l, c} = g \left(\theta_ {l, c}\right) \cdot \mathcal {F} _ {l, c}, \tag {2} +$$ + +where $\widehat{\mathcal{F}}_{l,c}$ is the feature map after pruning. + +Since the binary gate function is not differentiable, STE [1] is used to enable gradient calculation, which can be described as follows: + +$$ +\frac {\partial \mathcal {L}}{\partial \theta} = \frac {\partial \mathcal {L}}{\partial g (\theta)}, \tag {3} +$$ + +where $\mathcal{L}$ is the loss function. Here, the backward propagation of $g(\theta)$ can be understood as an identity function within certain range. If $\theta \notin [0,1]$ , the gradient will not be calculated, and the $\theta$ will be clipped to range $[0,1]$ . + +In fact, there are some limitations of the deterministic discrete gate function. For example, once the $g(\theta)$ of certain channels become 0, then these channels are probably remained pruned, and they may never be selected as candidate channels. To compensate such situations, we further propose the stochastic discrete gate to ensure gates with $\theta$ lower than 0.5 can be considered as candidate channels again. Specifically, the stochastic discrete gate is achieved by applying stochastic rounding: + +$$ +g (\theta) = \left\{ \begin{array}{l l} 1 & w. p. \theta \\ 0 & w. p. 1 - \theta \end{array} \right. \tag {4} +$$ + +where $\theta$ is within $[0,1]$ to satisfy the definition of probability. From this definition, we can see that a channel always has a chance to be sampled if $\theta \neq 0$ . Since our method uses the discrete setting, sampling from the stochastic discrete gate is equivalent to sample a sub-network. + +# 3.3. Model Compression as Constrained Optimization + +There are many different ways to represent the pruning objective for model compression. In this paper, we mainly focus on the following channel pruning problem: + +$$ +\min _ {\Theta} \mathcal {L} \big (f (x; \mathcal {W}, \Theta), y \big) +$$ + +$$ +s. t. \mathbf {1} ^ {T} \mathbf {g} - p \mathbf {1} ^ {T} \mathbf {C} = 0 \tag {5} +$$ + +$$ +\mathbf {g} \in \{0, 1 \} ^ {n}, +$$ + +where $\mathbf{g} = (g_{1},\dots ,g_{L})$ is a vector containing all gate values, $\mathbf{g}_l = [g(\theta_{l,1}),\ldots ,g(\theta_{l,C_l})]^T$ is the vector containing gate values in $l$ -th layer, $\Theta$ are the parameters of discrete gates following the definition in section 3.2, $\mathcal{W}$ is the model parameters, $p$ is a predefined threshold working as the pruning rate, and $\mathbf{C} = (C_1,\dots ,C_L)$ . Here, $\mathbf{1}^T\mathbf{g}$ is the sum of all gate values, which represents the number of remained channels, $n$ is the total number of gates and $\mathbf{1}^T\mathbf{C}$ is the total number of channels. Note that not all layers are included in Eq. (5), and the vector $\mathbf{g}$ and $\mathbf{C}$ only contain layers are used for pruning. There are several remarks on this pruning objective: 1) The pruning of channels only depends on the discriminate power of its own, channel magnitude is irrelevant during model pruning; 2) There exists no layer-wise + +hyper-parameter, only a global hyper-parameter is used to control pruning rate; 3) During training of the parameters for the gate function, model parameters $\mathcal{W}$ are fixed. + +Under this setting, the major advantage of the discrete gate setting is that the impact of pruned channels are precisely reflected in the value of loss function. If the gates are relaxed in continuous values, then it doesn't possess such good property. In addition, continuous relaxed gate function causes severe difficulty to solve the optimization problem defined in Eq. (5). + +For simplicity, we replace the equality constraint with a regularization term and redefine the optimization problem as follows: + +$$ +\min _ {\Theta} \mathcal {F} (\Theta) := \mathcal {L} (f (x; \mathcal {W}, \Theta), y) + \lambda \mathcal {R} \left(\mathbf {1} ^ {T} \mathbf {g}, p \mathbf {1} ^ {T} \mathbf {C}\right), \tag {6} +$$ + +where $\mathcal{R}(\cdot, \cdot)$ is the specific regularization function used, which can be a typical regression loss function such as MAE or MSE. In practice, both MAE and MSE are not used, we will talk about the choice of $\mathcal{R}(\cdot, \cdot)$ later. The constraint $\mathbf{g} \in \{0,1\}^n$ is absorbed into the optimization problem due to the definition of discrete gate (Eq. (1) and (4)). + +Recently, there are increasing interests in reducing the float point operations (FLOPs) in model pruning literature. The definition used in Eq. (6) along with the definition of deterministic discrete gate in Eq. (1) can easily transform the pruning rate constraint in Eq. (5) to FLOPs constraint. Recall that for a single convolution layer $l$ with one sample, the FLOPs calculation can be down as follows: + +$$ +\left(\text {F L O P s}\right) _ {l} = k _ {l} \cdot k _ {l} \cdot \frac {c _ {l - 1}}{\mathcal {G} _ {l}} \cdot c _ {l} \cdot w _ {l} \cdot h _ {l}, \tag {7} +$$ + +where $k_{l}$ is the kernel size, $\mathcal{G}_l$ is the number of groups, $c_{l-1}$ and $c_{l}$ are the number of input and output channels, $w_{l}$ and $h_{l}$ are width and height, (FLOPs) $_l$ is the FLOPs of $l$ -th layer. By replacing $c_{l}$ and $c_{l-1}$ with $\mathbf{g}_{l}$ and $\mathbf{g}_{l-1}$ , we get a new representation of FLOPs during searching for sub-networks: + +$$ +\widehat {(\mathrm {F L O P s})} _ {l} = k _ {l} \cdot k _ {l} \cdot \frac {\mathbf {1} ^ {T} \mathbf {g} _ {l - 1}}{\mathcal {G} _ {l}} \cdot \mathbf {1} ^ {T} \mathbf {g} _ {l} \cdot w _ {l} \cdot h _ {l}, \tag {8} +$$ + +Then combining Eq. (7), Eq. (8) with Eq. (6), the original $\mathcal{R}(\mathbf{1}^T\mathbf{g},p\mathbf{1}^T\mathbf{C})$ is replaced by the FLOPs regularization: + +$$ +\mathcal {R} (\hat {T}, p T), \tag {9} +$$ + +where $\hat{T} = \sum_{l=1}^{L} (\widehat{\mathrm{FLOPs}})_l$ and $T = \sum_{l=1}^{L} (\mathrm{FLOPs})_l$ are remained FLOPs and total FLOPs of the model. Note that we still use $p$ as the only global hyper-parameter to represent the remaining fractions of the FLOPs. By incorporating FLOPs regularization and the objective in Eq. (6), we can prune the model to arbitrary level of FLOPs. + +![](images/7a633dfbdeaf631ad90dc740a4a3c23265774a54568041990748f8541d2c6776.jpg) +(a) function value of the regularization + +![](images/fce2ea7af7dafdfe3fb2a6c731cfd2abeeaf96e21aa47e308e5b20ec64eae1be.jpg) +(b) gradients of the regularization +Figure 2: The values and gradients of the resource regularization, $y$ is set to 0 for better visualization. + +# 3.4. Choice of the Regularization Loss + +In order to train the parameters of gates properly, the value of the regularization term should be decreased to near 0 in the early stage of gate training, and remain near 0 for the rest of the training process. The reason we want to keep the regularization term near 0 for most time is to ensure the algorithm have enough time to discover the best possible sub-architecture with the given constraint. Regular regression loss like MAE and MSE can't satisfy this requirement, since their gradient is either constant or decreasing when close to 0. To overcome this issue, we propose the following regularization loss: + +$$ +\mathcal {R} _ {\log} (x, y) = \log (| x - y | + 1). \tag {10} +$$ + +The plot of gradient and value of this function is shown in Fig. 2. The benefit of this function is that when $x$ is close to target $y$ , the gradient will increase and keep $x$ close to the target value $y$ . The loss function is not differentiable at the point $x = y$ by definition, but sub-gradient can be used here which has been implemented in major deep learning frameworks. In practice, the Eq. (10) works well for appropriate choice of $\lambda$ , on the contrary, MAE and MSE often fail to keep the value of the regularization term close to 0. + +# 3.5. Symmetric Weight Decay + +To further expand search space, we propose a symmetric weight decay on the weights of gates, which is inspired by the subgradient of the regularization loss: + +$$ +\frac {\partial \mathcal {R} _ {\log}}{\partial \theta_ {l , c}} = \left\{ \begin{array}{l l} \eta_ {l} \cdot \frac {1}{| \hat {T} - p T | + 1} \cdot \frac {\hat {T} - p T}{| \hat {T} - p T |}, & \text {i f} \hat {T} \neq p T \\ 0, & \text {i f} \hat {T} = p T \end{array} \right. \tag {11} +$$ + +where $\eta_{l} = k_{l}^{2}\cdot \frac{\mathbf{1}^{T}\mathbf{g}_{l - 1}}{\mathcal{G}_{l}}\cdot w_{l}\cdot h_{l}$ . Eq. (11) indicates that $\mathcal{R}_{\log}$ works like weight decay with different decay value for each layer while the decay value is also different for each training iteration. Since the impact of $R_{\mathrm{log}}$ on $\theta$ can be expressed by weight decay, the stochasticity of the gates can be increased in a similar way. Based on above arguments, we can explore + +# Algorithm 1: Discrete Model Compression + +input: dataset for training gate, $D_{\mathrm{gate}}$ ; remaining rate of FLOPs, $p$ regularization hyper-parameter, $\lambda$ symmetric weight decay parameter $\beta$ gate training epochs num-E; pre-trained model $f$ + +Freeze $\mathcal{W}$ and batchnorm parameters in $f$ + +Initialize all $\theta_{l,c}$ to 1. + +for $e\coloneqq 1$ to num- $\pmb{E}$ do shuffle $(D_{\mathrm{gate}})$ + +foreach $x,y$ in $D_{gate}$ do + +$$ +\min _ {\Theta} \mathcal {F} (\Theta) = \mathcal {L} (f (x; \mathcal {W}, \Theta), y) + \lambda \mathcal {R} _ {\log} +$$ + +1. forward calculation: +2. calculate gradient w.r.t $\theta_{l,c}$ +3. update each $\theta_{l,c}$ by ADAM optimizer. +4. apply symmetric weight decay on $\theta_{l,c}$ defined in Eq. (12). +5. clip each $\theta_{l,c}$ to [0,1]. + +end end + +return model $f$ with the final $\Theta$ . + +larger search spaces by applying symmetric weight decay on each $\theta_{l,c}$ . The goal of doing this is to slow down the pace of gate parameters to become deterministic (approach 0 or 1). As a result, the search space is enlarged: + +$$ +\theta_ {l, c} = \theta_ {l, c} - \beta \operatorname {s i g n} \left(\theta_ {l, c} - 0. 5\right), \tag {12} +$$ + +where $\beta$ is the hyper-parameter to control the strength of weight decay. + +# 3.6. Our DMC Algorithm + +We have introduced the core idea of our method, and the discrete model compression (DMC) algorithm is presented in Algorithm 1. During freezing trainable parameters, the batchnorm running statistics are also frozen. It should be emphasized again that the gate learning process is isolated from the training of the model parameters. In this way, we can prune any pre-trained models without modifications. In the calculation of $\mathcal{L}$ , the sub-networks are drawn from the stochastic discrete gate. When calculating FLOPs regularization and during model pruning, the deterministic version of the gate is used. Both stochastic and deterministic calculation share the same $\theta_{l,c}$ . + +# 4. Experiments + +# 4.1. Settings + +Implementation Detail. We use CIFAR-10 [22] and ImageNet [5] to verify the performance of our method. Our method only requires one hyperparameter $p$ to control the FLOPs budget. For all experiments, we use resource regularization with $\mathcal{R}_{\log}$ defined in Eq. (10). As a result, $p$ + +![](images/763d5d1cf9e364bd00b22afe3f15a598725a707bacf1af4d7c03d5b32e7a0281.jpg) +(a) Bottleneck Block +Figure 3: Gate placement for different architectures. (a) Bottleneck Block for ResNet. (b) Inverted Residual Block for MobileNetV2. + +![](images/924261dd0bd2b091b0ebea82b6ff28d13701710600d77439cee89e59eedbdd0a.jpg) +(b) Inverted Residual Block + +decides how much FLOPs are preserved for each experiment. $\lambda$ decides the regularization strength in our method. We choose $\lambda = 4$ in all CIFAR-10 experiments and $\lambda = 8$ for all ImageNet experiments. For CIFAR-10, we compare with other methods on ResNet-56 and MobileNetV2. For ImageNet, we select ResNet-34, ResNet50, ResNet101 and MobileNetV2 as our target models. The reason we choose these models is because that ResNet [9] models and MobileNetV2 [41] are much harder to prune than earlier models like AlexNet [23] and VGG [43]. For CIFAR-10 models, we train it from scratch following the code from PyTorch examples. After pruning the model, we finetune the model for 160 epochs using SGD with start learning rate 0.1, weight decay 0.0001 and momentum 0.8, the learning rate is multiplied by 0.1 at epoch 80 and 120. For ImageNet models, we directly use the pre-trained models released from pytorch [36]. After pruning, we finetune the model for 100 epochs using SGD with start learning rate 0.01, weight decay 0.0001 and momentum 0.9, and the learning rate is scaled by 0.1 at epoch 30, 60 and 90. For MobileNetV2 on ImageNet, we choose weight decay as 0.00004 which is used in the original paper [41]. Both CIFAR-10 and ImageNet finetuning hyperparameters are similar to those used in Collaborative Channel Pruning (CCP) [37]. During gate training, we choose the $\beta$ of symmetric weight decay (Eq. (12)) as 0.0001. We randomly choose 2, 500 and 10, 000 samples as the dataset for training gate ( $D_{\mathrm{gate}}$ ) for CIFAR-10 and ImageNet separately. We didn't create a standalone validation set for training gate in order to directly use pre-trained models. In the gate training process, we use ADAM [21] optimizer with a constant learning rate 0.001 and train gate parameters for 300 epochs. All the codes are implemented with pytorch [36]. The experiments are conducted on a machine with 4 Nvidia Tesla P40 GPUs. + +Placement of Gate. Where to put gates is a crucial problem to best approximate the output from actual sub-networks + +
MethodArchitectureBaseline AccPruned AccΔ-AccPruned FLOPs
Channel Pruning [13]ResNet-5692.80%91.80%-1.00%50.0%
AMC [11]92.80%91.90%-0.90%50.0%
Pruning Filters [25]93.04%93.06%+0.02%27.6%
Soft Prunings [10]93.59%93.35%-0.24%52.6%
DCP [49]93.80%93.59%-0.31%50.0%
DCP-Adapt [49]93.80%93.81%+0.01%47.0%
CCP [37]93.50%93.42%-0.08%52.6%
DMC(ours)93.62%93.69%+0.07%50.0%
WM* [49]MobileNetV294.47%94.17%-0.30%26.0%
DCP [49]94.47%94.69%+0.22%26.0%
DMC(ours)94.23%94.49%+0.26%40.0%
+ +Table 1: Comparison results on CIFAR-10 dataset with ResNet-56 and MobileNetV2. $\Delta$ -Acc represents the performance changes before and after model pruning. +/- indicates increase or decrease compared to baseline results. WM represents width multiplier used in original design of MobileNetV2, this result is from DCP [49] paper. + +![](images/c88ea2b57b018d198c477683a548419e41617120edce9ecd307b8da1a6398d93.jpg) +(a) ResNet-50 + +![](images/6635d05c675ce11a1511183bd9e6978335e20b7e54942b2f3d61b2d088088020.jpg) +(b) MobileNetV2 +Figure 4: Networks discovered by our method from ResNet-50 and MobileNetV2. Dashed line indicates channel number changes in the original model. + +when corresponding channels are pruned. Following the settings in NAS works [27, 50], we regard Conv-BN-Relu as a complete block, thus the gates are always placed after Relu activation functions. To better simulate the results of a sub-network, we place two individual gates for a bottleneck block in a ResNet. For MobileNetV2, we place two gates in an inverted residual block, and the two gates share the same set of parameters due to the nature of depth-wise convolution. Details are shown in Fig. 3. Following the above settings, outputs from sampled sub-networks can well approximate the outputs from the actual compact network. + +# 4.2. Results on CIFAR-10 + +In Tab. 1, we show all the comparison results on CIFAR-10. For ResNet-56, our method performs much better than + +early methods [13, 11, 25, 10]. Specially, when compared with Soft Pruning, our method is better than their results by $0.31\%$ on $\Delta$ -Acc given similar pruned FLOPs (52.6% vs 50%). Discrimination-aware pruning utilizes local discrimination criterion when pruning the model. Our method outperforms DCP [49] by $0.38\%$ on $\Delta$ -Acc with the same pruned FLOPs. Moreover, our method outperforms DCP-adapt (stronger version of DCP) by $0.06\%$ give similar pruned FLOPs. Collaborative filter pruning [37] is one of the most recent works on channel pruning which considers the correlation between different weights when applying Taylor expansion on the loss function. Our method still outperforms their result by $0.15\%$ on $\Delta$ -Acc. Such observation may indicate that our method also implicitly considers weights correlation during the search of optimal subnetwork. For MobileNetV2, our method outperforms DCP by $0.04\%$ on $\Delta$ -Acc, while pruning $14\%$ more FLOPs than DCP. This shows that global discrimination-aware is better than local discrimination-aware. + +# 4.3. Results on ImageNet + +In Tab. 2, we presents all the comparison results on ImageNet. All results are adopted from their original papers except for ThiNet on MobileNetV2. To establish a high-quality baseline, the comparison methods are mainly chosen from recently published papers. Specially, DCP [49], CCP [37], IE [34], FPGM [12] and GAL [26] are from this category. Such high-quality baselines can help us better understand the benefit of using discrete channel settings. + +For ResNet-34, our method can prune $43.4\%$ FLOPs while only result in $0.73\%$ and $0.31\%$ performance drops on Top-1 accuracy and Top-5 accuracy separately. FPGA prunes slightly less FLOPs compared with our method $(41.1\%)$ vs $43.3\%$ ), however, it causes larger damage to the final performance than our method $(0.56\%)$ worse with Top + +
MethodArchitectureBaseline Top-1 AccBaseline Top-5 AccΔ-Acc Top-1Δ-Acc Top-5Pruned FLOPs
Pruning Filters [25]ResNet-3473.23%--1.06%-24.8%
Soft Prunings [10]73.93%91.62%-2.09%-1.92%41.1%
IE [34]73.31%--0.48%-24.2%
FPGM [12]73.92%91.62%-1.29%-0.54%41.1%
DMC(ours)73.30%91.42%-0.73%-0.31%43.4%
Soft Pruning [10]ResNet-5076.15%92.87%-1.54%-0.81%41.8%
IE [34]76.18%--1.68%-45%
FPGM [12]76.15%92.87%-1.32%-0.55%53.5%
GAL [26]76.15%92.87%-4.35%-2.05%55.0%
DCP [49]76.01%92.93%-1.06%-0.61%55.6%
CCP [37]76.15%92.87%-0.94%-0.45%54.1%
DMC(ours)76.15%92.87%-0.80%-0.38%55.0%
Rethinking [46]ResNet-10177.37%--2.10%-47.0%
IE [34]77.37%--0.02%-39.8%
FPGM [12]77.37%93.56%-0.05%0.00%41.1%
DMC(ours)77.37%93.56%+0.03%+0.04%56.0%
Thinet* [32]MobileNetV270.11%--6.40%-4.60%44.7%
DCP [49]70.11%--5.89%-3.77%44.7%
DMC(ours)71.88%90.29%-3.51%-1.83%46.0%
+ +Table 2: Comparison results on ImageNet dataset with ResNet-34, ResNet-50, ResNet-101 and MobileNetV2. $\Delta$ -Acc represents the performance changes before and after model pruning. +/- indicates increase or decrease compared to baseline results. ThiNet on MobileNetV2 results are from DCP [49] paper. + +
Gate SettingArchitectureTop-1 AccTop-5 AccPruned FLOPs
1-GateResNet-5075.06%92.41%55.2%
2-Gate75.35%92.49%55.0%
1-GateMobileNetV267.73%88.14%45.3%
2-Gate-Shared68.37%88.46%46.0%
+ +Table 3: Performance of pruned models given different gate settings on ImageNet. + +1 accuracy and $0.23\%$ worse with Top-5 accuracy). The other two methods only prune a small amount of FLOPs (around $25\%$ ). Our method has a lower Top-1 accuracy compared with IE, but we prune 1.8 times as much FLOPs as IE. For ResNet-50, our method achieves the best $\Delta$ -Acc Top-1 and $\Delta$ -Acc Top-5 accuracy compared with all other methods. Among all comparison methods, CCP has the smallest performance gap with our method. Specifically, our DMC algorithm outperforms the state-of-the-art pruning algorithm CCP by $0.14\%$ at Top-1 accuracy with slightly more pruned FLOPs ( $55.0\%$ vs $54.1\%$ ). For other comparison methods, our DMC algorithm has advantages on Top-1 accuracy varying from $0.26\%$ to $3.55\%$ . For ResNet-101, our method also achieves the best $\Delta$ -Acc Top-1 and $\Delta$ -Acc Top-5 accuracy. Moreover, our DMC algorithm prunes a much larger amount of FLOPs than all the other methods ( $56\%$ vs $47\%$ the second largest). After pruning $56\%$ of FLOPs, the pruned ResNet-101 only has 3.43 GFLOPs which is even less than the vanilla ResNet-50 (4.09 GFLOPs). At such a high pruning rate for FLOPs, the performance of pruned ResNet-101 even increases by + +$0.03\%$ and $0.04\%$ for Top-1 and Top-5 accuracy respectively. For MobileNet-V2, our method largely increases the results obtained by DCP. With similar amount of pruned FLOPs (46% vs 44.7%), DMC outperforms DCP by 2.38% and 1.94% for $\Delta$ -Acc Top-1 and $\Delta$ -Acc Top-5 accuracy. Such significant improvement further shows that the global discrimination-aware pruning utilized in our method has obvious advantages when compared with local discrimination-aware pruning utilized in DCP. Global discrimination-aware is a direct consequence of discrete channel settings introduced in our algorithm. We further plot the channel configurations for each layer of ResNet-50 and MobileNetV2 after pruning in Fig. 4. Since early layers often have a large impact on FLOPs, most early layers are aggressively pruned. But there are some exceptions, layer-1 and layer-8 have a much higher preserved number of channels compared to adjacent layers in ResNet-50. Similar observations hold for layer-3 and layer-6 in MobileNetV2. These layers are regarded as important components in our method. + +# 4.4. Impact of Gate Placement + +In Tab. 3, we show how gate placement impacts the performance of the pruned model. 1-Gate represents removing gates with the dashed line in Fig 3. 2-Gate and 2-Gate-Shared are the original settings described in section 4.1. From this table, we can see that precise estimation of subnetwork performance results in improvements in the final model $(+0.29\%)$ on Top-1 for ResNet, $+0.64\%$ on Top-1 for MobileNetV2). This experiment clearly shows that the + +![](images/1d6c5f11b38ee3f5f8c19149f05dc1f7bfe554e8a2151af1988ced9b0a7dcefe.jpg) +(a) $35\%$ FLOPs + +![](images/048241b5be7dadf44041a587a8455386ed50756e4a04c3cba5de0b47c543a8b4.jpg) +(b) $50\%$ FLOPs + +![](images/c6381ac042cc960f033242f1bad6eb73ac4235134b666fef5ded09dc297a8fb1.jpg) +(c) $65\%$ FLOPs + +![](images/94fafe33c6f0d4648b41098505914a37e5ffc9a5c961dddac650fe4841fcb07f.jpg) +(d) $80\%$ FLOPs + +![](images/aa943b01e76adadfe7934bd6f767bd941b65867812038d0f46b25dfc1f05c3cb.jpg) +(e) $35\%$ FLOPs + +![](images/747e3b46e95b7b5c992b3d292d056450e237cf40b5f24a3b33e6c08beb97820e.jpg) +(f) $50\%$ FLOPs + +![](images/cbe4c402ee953a8e9c61d880852534a3de1066dd46c45b3f251b9f94759f31fc.jpg) +(g) $65\%$ FLOPs + +![](images/8be8f095189f2c2f33460f354547505ef36b4215396e9834bd71f4b438bc6254.jpg) +(h) $80\%$ FLOPs + +![](images/6f98a565165ed1c779d3bd378aac51d4f3cdbb366f4a0ddd93384e2594ec019d.jpg) +(i) $35\%$ FLOPs + +![](images/5f8675b02a33b636e7ac8cf630840c499ef054989dda560998b43acfefcd859e.jpg) +(j) $50\%$ FLOPs + +![](images/236437a3856519df5a91662ee420581129da47802c75e5e0539d4dfc9fe11bd7.jpg) +(k) $55\%$ FLOPs +Figure 5: (a)-(d): Test set performance and regularization loss with the progress of gate training. (e)-(h): Pruning rate on different layers with the progress of gate training. (i)-(l): Evolution of gate randomness during the progress of gate training. + +![](images/d0e14c9cb585efab208904b3a37e461430847cdae615825e7ee1309b6821acd3.jpg) +(1) $80\%$ FLOPs + +discrepancy between the precise and imprecise estimation of sub-network during gate training. + +# 4.5. Understanding the Training of Discrete Gates + +We draw related figures about the gate training process in Fig. 5. Four experiments are conducted given different values of $p$ from 0.35 to 0.8 on CIFAR-10 with ResNet-56. Fig. 5 (a)-(d) show the test performance along with regularization loss. It's quite clear that there are two stages for gate training. In the first stage, the test accuracy of the subnetwork sharply drops, at the same time, regularization loss drops too. In the second stage, regularization loss is near 0, the test performance continues to increase until the end of the training process. This shows that our DMC algorithm can consistently find sub-networks with better performance. Fig. 5 (e)-(h) show the progress of pruning rate for different layers. We can see the pruning rate of a layer dramatically decreases at the beginning. However, within the process of the second training stage, some pruned channels of certain layers are recovered. This observation shows that our method indeed explores the search space instead of stacking at a trivial solution with a fixed sub-network. In Fig.5 (i)-(l), we plot the value of $s = \frac{\sum_{l=1}^{L}\sum_{c=1}^{C_l}|\theta_{l,c} - 0.5|}{n}$ . This value can roughly measure whether the discrete gate is inclined to + +deterministic ( $\theta$ is close to 0 or 1) or stochastic ( $\theta$ is close to 0.5). At the beginning of training, $s$ dramatically drops, depicting that increased stochasticity when sampling a sub-network. After training for a while, there is a turning point that the gates start to become more deterministic. This is mainly because that the information from the samples is utilized to reduce the stochasticity and make it more confident towards the final sub-network. + +# 5. Conclusion + +In this paper, we proposed an effective discrete model compression method to prune CNNs given certain resource constraints. By turning deterministic discrete gate to stochastic discrete gate, moreover, our method can explore larger search space of sub-networks. To further enlarge the space, we introduced the symmetric weight decay on the gate parameters inspired by the fact that regularization loss can be regarded as weight decay. Our method also benefits from the exact estimation of sub-networks' outputs because of a combination of the precise placement of gates and the discrete setting. Extensive experiments results on ImageNet and CIFAR-10 show that our method outperforms state-of-the-art methods. + +# References + +[1] Yoshua Bengio, Nicholas Léonard, and Aaron Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432, 2013. +[2] Mariusz Bojarski, Davide Del Testa, Daniel Dworakowski, Bernhard Firner, Beat Flepp, Prasoon Goyal, Lawrence D Jackel, Mathew Monfort, Urs Muller, Jiakai Zhang, et al. End to end learning for self-driving cars. arXiv preprint arXiv:1604.07316, 2016. +[3] Stephen Boyd, Neal Parikh, Eric Chu, Borja Peleato, Jonathan Eckstein, et al. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends in Machine learning, 3(1):1-122, 2011. +[4] Matthieu Courbariaux, Yoshua Bengio, and Jean-Pierre David. Binaryconnect: Training deep neural networks with binary weights during propagations. In Advances in neural information processing systems, pages 3123-3131, 2015. +[5] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 248-255. IEEE, 2009. +[6] Jonathan Frankle and Michael Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural networks. In International Conference on Learning Representations, 2019. +[7] Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015. +[8] Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. In Advances in neural information processing systems, pages 1135-1143, 2015. +[9] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. +[10] Yang He, Guoliang Kang, Xuanyi Dong, Yanwei Fu, and Yi Yang. Soft filter pruning for accelerating deep convolutional neural networks. In International Joint Conference on Artificial Intelligence (IJCAI), pages 2234-2240, 2018. +[11] Yihui He, Ji Lin, Zhijian Liu, Hanrui Wang, Li-Jia Li, and Song Han. Amc: Automl for model compression and acceleration on mobile devices. In Proceedings of the European Conference on Computer Vision (ECCV), pages 784-800, 2018. +[12] Yang He, Ping Liu, Ziwei Wang, Zhilan Hu, and Yi Yang. Filter pruning via geometric median for deep convolutional neural networks acceleration. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4340-4349, 2019. +[13] Yihui He, Xiangyu Zhang, and Jian Sun. Channel pruning for accelerating very deep neural networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 1389-1397, 2017. + +[14] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. +[15] Feihu Huang, Songcan Chen, and Heng Huang. Faster stochastic alternating direction method of multipliers for nonconvex optimization. In International Conference on Machine Learning, pages 2839-2848, 2019. +[16] Feihu Huang, Shangqian Gao, Jian Pei, and Heng Huang. Nonconvex zeroth-order stochastic admm methods with lower function query complexity. arXiv preprint arXiv:1907.13463, 2019. +[17] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4700-4708, 2017. +[18] Zehao Huang and Naiyan Wang. Data-driven sparse structure selection for deep neural networks. In Proceedings of the European conference on computer vision (ECCV), pages 304-320, 2018. +[19] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of the 32Nd International Conference on International Conference on Machine Learning - Volume 37, ICML, pages 448-456. JMLR.org, 2015. +[20] Jaedeok Kim, Chiyoun Park, Hyun-Joo Jung, and Yoonsuck Choe. Plug-in, trainable gate for streamlining arbitrary neural networks. CoRR, abs/1904.10921, 2019. +[21] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. +[22] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Cite-seer, 2009. +[23] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097-1105, 2012. +[24] Namhoon Lee, Thalaiyasingam Ajanthan, and Philip HS Torr. Snip: Single-shot network pruning based on connection sensitivity. ICLR, 2019. +[25] Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. ICLR, 2017. +[26] Shaohui Lin, Rongrong Ji, Chenqian Yan, Baochang Zhang, Liujuan Cao, Qixiang Ye, Feiyue Huang, and David Doermann. Towards optimal structured cnn pruning via generative adversarial learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2790-2799, 2019. +[27] Hanxiao Liu, Karen Simonyan, and Yiming Yang. DARTS: Differentiable architecture search. In International Conference on Learning Representations, 2019. +[28] Zhuang Liu, Jianguo Li, Zhiqiang Shen, Gao Huang, Shoumeng Yan, and Changshui Zhang. Learning efficient convolutional networks through network slimming. In ICCV, 2017. + +[29] Zhuang Liu, Mingjie Sun, Tinghui Zhou, Gao Huang, and Trevor Darrell. Rethinking the value of network pruning. In International Conference on Learning Representations, 2019. +[30] Christos Louizos, Max Welling, and Diederik P. Kingma. Learning sparse neural networks through $l_{0}$ regularization. In International Conference on Learning Representations, 2018. +[31] Jian-Hao Luo and Jianxin Wu. Autopruner: An end-to-end trainable filter pruning method for efficient deep model inference. arXiv preprint arXiv:1805.08941, 2018. +[32] Jian-Hao Luo, Hao Zhang, Hong-Yu Zhou, Chen-Wei Xie, Jianxin Wu, and Weiyao Lin. Thinet: pruning cnn filters for a thinner net. IEEE transactions on pattern analysis and machine intelligence, 2018. +[33] Dmitry Molchanov, Arsenii Ashukha, and Dmitry Vetrov. Variational dropout sparsifies deep neural networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 2498-2507. JMLR.org, 2017. +[34] Pavlo Molchanov, Arun Mallya, Stephen Tyree, Iuri Frosio, and Jan Kautz. Importance estimation for neural network pruning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 11264-11272, 2019. +[35] Kirill Neklyudov, Dmitry Molchanov, Arsenii Ashukha, and Dmitry P Vetrov. Structured bayesian pruning via log-normal multiplicative noise. In Advances in Neural Information Processing Systems, pages 6775-6784, 2017. +[36] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017. +[37] Hanyu Peng, Jiaxiang Wu, Shifeng Chen, and Junzhou Huang. Collaborative channel pruning for deep networks. In International Conference on Machine Learning, pages 5113-5122, 2019. +[38] Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In European Conference on Computer Vision, pages 525-542. Springer, 2016. +[39] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 779-788, 2016. +[40] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pages 91-99, 2015. +[41] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhoginov, and Liang-Chieh Chen. *Mobilenetv2: Inverted residuals and linear bottlenecks*. In *Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition*, pages 4510–4520, 2018. +[42] Karen Simonyan and Andrew Zisserman. Two-stream convolutional networks for action recognition in videos. In Advances in neural information processing systems, pages 568-576, 2014. + +[43] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. +[44] Chaoqi Wang, Roger B. Grosse, Sanja Fidler, and Guodong Zhang. Eigendamage: Structured pruning in the kronecker-factored eigenbasis. In Proceedings of the 36th International Conference on Machine Learning, ICML 2019, pages 6566-6575, 2019. +[45] Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in deep neural networks. In Advances in neural information processing systems, pages 2074-2082, 2016. +[46] Jianbo Ye, Xin Lu, Zhe Lin, and James Z Wang. Rethinking the smaller-norm-less-informative assumption in channel pruning of convolution layers. In International Conference on Learning Representations, 2018. +[47] Dejiao Zhang, Haozhu Wang, Mario Figueiredo, and Laura Balzano. Learning to share: Simultaneous parameter tying and sparsification in deep learning. 2018. +[48] Tianyun Zhang, Shaokai Ye, Kaiqi Zhang, Jian Tang, Wu-jie Wen, Makan Fardad, and Yanzhi Wang. A systematic dnn weight pruning framework using alternating direction method of multipliers. In Proceedings of the European Conference on Computer Vision (ECCV), pages 184-199, 2018. +[49] Zhuangwei Zhuang, Mingkui Tan, Bohan Zhuang, Jing Liu, Yong Guo, Qingyao Wu, Junzhou Huang, and Jinhui Zhu. Discrimination-aware channel pruning for deep neural networks. In Advances in Neural Information Processing Systems, pages 875-886, 2018. +[50] Barret Zoph and Quoc V. Le. Neural architecture search with reinforcement learning. 2017. \ No newline at end of file diff --git a/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/images.zip b/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9ae85bf4afdd3c33dbb442e0a12b5ec49948bdaa --- /dev/null +++ b/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e52568af9bd1f6a0c2d8deea30b32fabcb2f854065be7a37d3cfdd5e4e35ce57 +size 475407 diff --git a/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/layout.json b/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6160ae20794d70ea1497e02e8a351a18e446e0ad --- /dev/null +++ b/discretemodelcompressionwithresourceconstraintfordeepneuralnetworks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f328e2c7a2775faa3ec8ec324a2fd7e74b91fb4e8bf5f1a0e283e347cc42eefe +size 488580