diff --git a/multimodalcategorizationofcrisiseventsinsocialmedia/60ee740a-3778-41e2-b0a0-e04fea03c2a5_content_list.json b/multimodalcategorizationofcrisiseventsinsocialmedia/60ee740a-3778-41e2-b0a0-e04fea03c2a5_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d57823125d1078d3f84b51967480b5567507f652 --- /dev/null +++ b/multimodalcategorizationofcrisiseventsinsocialmedia/60ee740a-3778-41e2-b0a0-e04fea03c2a5_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2639b424867cd7b39f3cd8446d65b7155a8ab7217131acbc36c4e3afd2deef04 +size 92264 diff --git a/multimodalcategorizationofcrisiseventsinsocialmedia/60ee740a-3778-41e2-b0a0-e04fea03c2a5_model.json b/multimodalcategorizationofcrisiseventsinsocialmedia/60ee740a-3778-41e2-b0a0-e04fea03c2a5_model.json new file mode 100644 index 0000000000000000000000000000000000000000..19bc992b6979c3fe9c61919057eca7ad583d3df5 --- /dev/null +++ b/multimodalcategorizationofcrisiseventsinsocialmedia/60ee740a-3778-41e2-b0a0-e04fea03c2a5_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1a49c9a783054cbaa1a9f1170a0783c567167f9248460aa2f0729ad54d5b338 +size 116620 diff --git a/multimodalcategorizationofcrisiseventsinsocialmedia/60ee740a-3778-41e2-b0a0-e04fea03c2a5_origin.pdf b/multimodalcategorizationofcrisiseventsinsocialmedia/60ee740a-3778-41e2-b0a0-e04fea03c2a5_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5cb434b54dda82cc455138ea5a08cdb0fb0099cd --- /dev/null +++ b/multimodalcategorizationofcrisiseventsinsocialmedia/60ee740a-3778-41e2-b0a0-e04fea03c2a5_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fd5f5a3933c13ca65e5a90ad9711dddb10bda2afdd21a019d4bb6c7fb42d13a +size 780669 diff --git a/multimodalcategorizationofcrisiseventsinsocialmedia/full.md b/multimodalcategorizationofcrisiseventsinsocialmedia/full.md new file mode 100644 index 0000000000000000000000000000000000000000..6f6854983b26d20feb0d00b013f4bd50bc0cfc71 --- /dev/null +++ b/multimodalcategorizationofcrisiseventsinsocialmedia/full.md @@ -0,0 +1,423 @@ +# Multimodal Categorization of Crisis Events in Social Media + +Mahdi Abavisani* + +Dataminr Inc., New York, NY + +mabavisani@dataminr.com + +Liwei Wu* + +Department of Statistics + +University of California, Davis + +Davis, CA + +liwu@ucdavis.edu + +Shengli Hu + +Dataminr Inc., New York, NY + +shu@dataminr.com + +Joel Tetreault + +Dataminr Inc., New York, NY + +jtetreault@dataminr.com + +Alejandro Jaimes + +Dataminr Inc., New York, NY + +ajaimes@dataminr.com + +# Abstract + +Recent developments in image classification and natural language processing, coupled with the rapid growth in social media usage, have enabled fundamental advances in detecting breaking events around the world in real-time. Emergency response is one such area that stands to gain from these advances. By processing billions of texts and images a minute, events can be automatically detected to enable emergency response workers to better assess rapidly evolving situations and deploy resources accordingly. To date, most event detection techniques in this area have focused on image-only or text-only approaches, limiting detection performance and impacting the quality of information delivered to crisis response teams. In this paper, we present a new multimodal fusion method that leverages both images and texts as input. In particular, we introduce a cross-attention module that can filter uninformative and misleading components from weak modalities on a sample by sample basis. In addition, we employ a multimodal graph-based approach to stochastically transition between embeddings of different multimodal pairs during training to better regularize the learning process as well as dealing with limited training data by constructing new matched pairs from different samples. We show that our method outperforms the unimodal approaches and strong multimodal baselines by a large margin on three crisis-related tasks. + +# 1. Introduction + +Each second, billions of images and texts that capture a wide range of events happening around us are uploaded to + +Oh shit...no injuries..no fire...but somehow two private jets here just North of San Antonio Airport...bizarre accident.. + +![](images/51e0334e49199a3a643ef7a602b08a3fb5690a0937917cbb8bc15356333cc5d4.jpg) +Figure 1. A Crisis-related Image-text Pair from Social Media + +social media platforms from all over the world. At the same time, the fields of Computer Vision (CV) and Natural Language Processing (NLP) are rapidly advancing [25, 23, 15] and are being deployed at scale. With large-scale visual recognition and textual understanding available as fundamental tools, it is now possible to identify and classify events across the world in real-time. This is possible, to some extent, in images and text separately, and in limited cases, using a combination. A major difficulty in crisis events, $^{1}$ in particular, is that as events surface and evolve, users post fragmented, sometimes conflicting information in the form of image-text pairs. This makes the automatic identification of notable events significantly more challenging. + +Unfortunately, in the middle of a crisis, the information that is valuable for first responders and the general public often comes in the form of image-text pairs. So while traditional CV and NLP methods that treat visual and textual information separately can help, a big gap exists in current approaches. Despite the general consensus on the importance of using AI for Social Good [22, 20, 4], the power of social media, and a long history of interdisciplinary research on humanitarian crisis efforts, there has been very little work on automatically detecting crisis events jointly using visual and textual information. + +Prior approaches that tackle the detection of crisis events have focused on either image-only or text-only approaches. As shown in Figure 1, however, an image alone can be ambiguous in terms of its urgency whereas the text alone may lack details. + +To address these issues, we propose a framework to detect crisis events using a combination of image and text information. In particular, we present an approach to automatically label images, text, and image-text pairs based on the following criteria/tasks: 1) Informativeness: whether the social media post is useful for providing humanitarian aid in an emergency event, 2) Event Classification: identifying the type of emergency (in Figure 2, we show some of the categories that different image-text pairs belong to in our event classification task), and 3) Severity: rating how severe the emergency is based on the damage indicated in the image and text. Our framework consists of several steps in which, given an image-text pair, we create a feature map for the image, generate word embeddings for the text, and propose a cross-attention mechanism to fuse information from the two modalities. It differs from previous multimodal classification in how it deals with fusing that information. + +In short, we present a novel, multimodal framework for classification of multimodal data in the crisis domain. This approach, "Cross Attention", avoids transferring negative knowledge between modalities and makes use of stochastic shared embeddings to mitigate overfitting in small data as well as dealing with training data with inconsistent labels for different modalities. Our model outperforms strong unimodal and multimodal baselines by up to 3 F-score points across three crisis tasks. + +# 2. Related Work + +AI for Emergency Response: Recent years have seen an explosion in the use of Artificial Intelligence for Social Good [22, 20, 4]. Social media has proven to be one of most relevant and diverse resources and testbeds, whether it be for identifying risky mental states of users [11, 17, 21], recognizing emergent health hazards [16], filtering for and detecting natural disasters [48, 40, 47], or surfacing violence and aggression in social media [10]. + +![](images/4a0da02465f7310cfcfa4dfff53db870db7c88755ba397d66b811445b6dad7da.jpg) + +![](images/013fcbd4a399c0760037dd9a5af8b036570514d1a5bb0e539fa6fa91a7d57193.jpg) + +![](images/269712e1050f4f567dbf8b82a9fab80c56fb9f6960626282b964613c848fcc1f.jpg) +Figure 2. Samples from Task 2; Event Classification with Texts and Images. + +![](images/8d8b638db5027133e58b1de9b604777212fbc4af1802b315dc04704960350886.jpg) + +Most prior work on detecting crisis events in social media has focused on text signals. For instance, Kumar et al. [33] propose a real-time tweet-tracking system to help first responders gain situational awareness once a disaster happens. Shekhar et al. [50] introduce a crisis analysis system to estimate the damage level of properties and the distress level of victims. At a large scale, filtering (e.g., by anomaly or burst detection), identifying (e.g., by clustering), and categorizing (e.g., by classifying) disaster-related texts on social media have been the foci of multiple research groups [53, 57, 62], achieving accuracy levels topping at 0.75 on small annotated datasets collected from Twitter. + +Disaster detection in images has been an active front, whether it be user-generated content or satellite images (for a detailed survey, refer to Said et al. [48]). For instance, Ahmad et al. [5] introduce a pipeline method to effectively link remote sensor data with social media to better assess damage and obtain detailed information about a disaster. Li et al. [37] use convolutional neural networks and visualization methods to locate and quantify damage in a disaster images. Nalluru et al. [42] combine semantic textual and image features to classify the relevancy of social media posts in emergency situations. + +Our framework focuses on combining images and text, yielding performance improvements on three disaster classification tasks. + +Deep Multimodal Learning: In deep multimodal learning, neural networks are used to integrate the complementary information from multiple representations (modalities) of the same phenomena [59, 43, 3, 13, 2]. In many applications, including image captioning [9, 45], visual question + +answering [8, 19], and text-image matching [51, 18, 35], combining image and text signals is of interest. Thus many recent works study image-text fusion [39, 36, 55, 54]. + +Existing multimodal learning frameworks applied to the crisis domain are relatively limited. Lan et al. [34] combine early fusion and late fusion methods to incorporate their advantages, Ilyas [28] introduce a disaster classification system based on naive-bayes classifiers and support vector machines. Kelly et al. [30] introduce a system for real-time extraction of information from text and image content in Twitter messages with exploiting the spatio-temporal metadata for filtering, visualizing, and monitoring flooding events. Mouzannar et al. [41] propose a multimodal deep learning framework to identify damage related information on social media posts with texts, images, and video. + +In the application of crisis tweets categorization, one modality may contain uninformative or even misleading information. The attention module in our model passes information based on the confidence in the usefulness of different modalities. The more confident modality blocks weak or misleading features from the other modality through their cross-attention link. The partially blocked results of both modalities are later judged by a self-attention layer to decide which information should be passed to the next layer. While our attention module is closely related to co-attention and self-attention mechanisms [58, 24, 38, 19, 27, 45], unlike them, it does not need the input features to be homogeneous. In contrast, self-attention and co-attention layers can be sensitive to heterogeneous inputs. The details of the model are described in the next section. + +# 3. Methodology + +The architecture we propose is designed for classification problems that takes as input image-text pairs such as user generated tweets in social media, as illustrated in Figure 3, where the DenseNet and BERT graphs are from [26] and [15]. Our methodology consists of 4 parts: the first two parts extract feature maps from the image and extract embeddings from the text, respectively; the third part comprises our cross-attention approach to fuse projected image and text embeddings; and the fourth part uses Stochastic Shared Embeddings (SSE) [60] as our regularization technique to prevent over-fitting and deal with training data with inconsistent labels for image and text pairs. + +We describe each module in the sub-sections that follow. + +# 3.1. Image Model for Feature Map Extraction: + +We extract feature maps from images using Convolutional Neural Networks (CNNs). In our model we select DenseNet [26], which reduces module sizes and increases connections between layers to address parameter redundancy and improve accuracy (other approaches, such as EfficientNet [56] could also be used, but DenseNet is efficient + +![](images/c978d786e60b83fcc68e534af7867c4e2aa65ad4cf88316d8e6aa4f2acf119d3.jpg) +Figure 3. Illustration of Our Framework. Embedding features are extracted from images and texts by DenseNet and BERT networks, respectively, and are integrated by the cross-attention module. In the training process, the embeddings of different samples are stochastically transitioned between each other to provide a robust regularization. + +and commonly used for this task). + +For each image $v_{i}$ , we therefore have: + +$$ +f _ {i} = \mathbf {D e n s e N e t} (v _ {i}), \tag {1} +$$ + +where $v_{i}$ is the input image, $f_{i}\in \mathbb{R}^{D_{f}}$ is the vectorized form of a deep feature map in the DenseNet with dimension $D_{f} = W\times H\times C$ , where $W,H,C$ are the feature map's height, width and number of channels respectively. + +# 3.2. Text Model for Embedding Extraction: + +Full-network pre-training [44, 15] has led to a series of breakthroughs in language representation learning. Specifically, deep-bidirectional Transformer models such as BERT [15] and its variants [61, 7] have achieved state-of-the-art results on various natural language processing tasks by leveraging close and next-sentence prediction tasks as weakly-supervised pre-training. Therefore, we use BERT as our core model for extracting embeddings from text (variants such as XLNET [61] and ALBERT [7] could also be used). We use the BERT model pre-trained on Wiki and Books data[29] on crisis-related tweets $t_i$ 's. For each text input $t_i$ , we have + +$$ +e _ {i} = \mathbf {B E R T} (t _ {i}), \tag {2} +$$ + +where $t_i$ is a sequence of word-piece tokens and $e_i \in \mathbb{R}^{756}$ is the sentence embedding. Similar to the BERT paper [15], we take the embedding associated with [CLS] to represent the whole sentence. + +In the next subsection we detail how DenseNet and BERT are fused. + +# 3.3. Cross-attention module for avoiding negative knowledge in fusion: + +After we obtain the image feature map $f_{i}$ (DenseNet) and the sentence embedding $e_{i}$ (BERT), we use a new cross + +attention mechanism to fuse the information they represent. In many text-vision tasks, the input pair can contain noise. In particular, in classification of tweets, one modality may contain non-informative or even misleading information. In such a case, negative information transfer can occur. Our model can mitigate the effects of one modality over another on a case by case basis. + +To address this issue, in our cross-attention module, we use a combination of cross-attention layers and a self-attention layer. In this module, each modality can block the features of the other modality based on its confidence in the usefulness of its input. This happens with the cross-attention layer. The result of partially blocked features from both modalities is later fed to a self-attention layer to decide which information should be passed to the next layer. + +The self-attention layer exploits a fully-connected layer to project the image feature map into a fixed dimensionality $K$ (we use $K = 100$ ), and similarly project the sentence embedding so that: + +$$ +\tilde {f} _ {i} = F \left(W _ {v} ^ {T} f _ {i} + b _ {v}\right), +$$ + +$$ +\tilde {e} _ {i} = F \left(W _ {e} ^ {T} e _ {i} + b _ {e}\right), \tag {3} +$$ + +where $F$ represents an activation function such as ReLU (used in our experiments) and both $\tilde{f}_i$ and $\tilde{e}_i$ are of dimension $K = 100$ . + +In the case of misleading information in one modality, without an attention mechanism (such as co-attention [39]), the resulting $\tilde{f}_i$ and $\tilde{e}_i$ cannot be easily combined without hurting performance. Here, we propose a new attention mechanism called cross-attention (Figure 3), which differs from standard co-attention mechanisms: the attention mask $\alpha_{v_i}$ for the image is completely dependent on the text embedding $e_i$ , while the attention mask $\alpha_{e_i}$ for the text is completely dependent on the image embedding $f_i$ . Mathematically, this can be expressed as follows: + +$$ +\alpha_ {v _ {i}} = \sigma \left(W _ {v} ^ {\prime T} f _ {i} + b _ {v} ^ {\prime}\right), +$$ + +$$ +\alpha_ {e _ {i}} = \sigma \left(W _ {e} ^ {\prime T} e _ {i} + b _ {e} ^ {\prime}\right), \tag {4} +$$ + +where $\sigma$ is the Sigmoid function. Co-attention, in contrast, can be expressed as follows: + +$$ +\alpha_ {v _ {i}} = \sigma \left(W _ {v} ^ {\prime T} [ f _ {i} | e _ {i} ] + b _ {v} ^ {\prime}\right), +$$ + +$$ +\alpha_ {e _ {i}} = \sigma \left(W _ {e} ^ {\prime T} \left[ f _ {i} \mid e _ {i} \right] + b _ {e} ^ {\prime}\right), \tag {5} +$$ + +where | means concatenation. + +After we have the attention masks $\alpha_{v_i},\alpha_{e_i}$ for image and text respectively, we can augment the projected image and text embeddings $\tilde{f}_i,\tilde{e}_i$ with $\alpha_{v_i}\cdot \tilde{f}_i$ and $\alpha_{e_i}\cdot \tilde{e}_i$ before performing concatenation or adding. In our experiments, we use concatenation but obtained similar performance using addition. + +The last step of this module takes the concatenated embedding which jointly represents the image and text tuple in and feeds into the two-layer fully-connected networks. We add self-attention in the fully-connected networks and use the standard softmax cross-entropy loss for the classification. + +In Section 4, we show that the combination of cross-attention layers and the self-attention layer on their concatenation works better than co-attention and self-attention mechanisms for the tasks we address in this paper. + +# 3.4. SSE for Better Regularization + +Due to unforeseeable and unpredictable nature of disasters, and also because they require fast processing and reaction, one often has to deal with limited annotations for user-generated content during crises. Using regularization techniques to mitigate this issue becomes especially important. In this section, we extend Stochastic Shared Embeddings (SSE) technique [60] to its multimodal version for taking the full advantage from the annotated data by 1) generating new artificial multimodal pairs. 2) also including the annotated data with inconsistent labels for text and image in the training process. + +SSE-Graph [60], a variation of SSE, is a data-driven approach for regularizing embedding layers which uses a knowledge graph to stochastically make transitions between embeddings of different samples during the stochastic gradient descent (SGD). That means, during the training, based on a knowledge graph, there is a chance that embeddings of different samples being swapped. We use the text and image labels to construct knowledge graphs that can be used to create stochastic multimodal training samples with consistent labels for both the image and text. + +We treat feature maps of images as embeddings and use class labels to construct knowledge graphs. The feature maps of two images are connected by an edge in the graph, if and only if they belong to the same class (e.g. they are both labeled "affected individuals"). We follow the same procedure for text embeddings and construct a knowledge graph for text embeddings as well. Finally, we connect the nodes associated with the knowledge graph of image feature maps with an edge to nodes in text's knowledge graph if and only if they belong to the same class. + +Let $\Phi^v$ and $\Phi^t$ be sets of parameters. We define the transition probability $p(i^v, j^v | \Phi^v)$ as probability of transition from $i^v$ to $j^v$ , where $i^v$ and $j^v$ are nodes in the image knowledge graph that correspond to image features $f_i$ and $f_j$ . Similarly, we define $p(i^t, k^t | \Phi^t)$ as probability of transition from $i^t$ to $k^t$ (nodes corresponding to text embeddings $e_i$ and $e_k$ , respectively). + +Taking image feature maps as an example, if $i^v$ is connected to $j^v$ but not connected to $l^v$ in the knowledge graph, one simple and effective way to generate more multimodal + +pairs is to use a random walk (with random restart and self-loops) on the knowledge graph. Since we are more interested in transitions within embeddings of consistent labels, in each transition probability, we set the ratio of $p(i^v,j^v|\Phi^v)$ and $p(i^v,l^v|\Phi^v)$ to be a constant greater than 1. In more formal notation, we have + +$$ +i ^ {v} \sim j ^ {v}, i ^ {v} \not \sim l ^ {v} \longrightarrow p (i ^ {v}, j ^ {v} | \Phi^ {v}) / p (i ^ {v}, l ^ {v} | \Phi^ {v}) = \rho^ {v}, \tag {6} +$$ + +where $\rho^v$ is a tuning parameter and $\rho^v > 1$ , and $\sim$ and $\gamma$ denote connected and not connected nodes in the knowledge graph. We also have: + +$$ +p \left(i ^ {v}, i ^ {v} \mid \Phi\right) = 1 - p _ {0} ^ {v}, \tag {7} +$$ + +where $p_0^v$ is called the SSE probability for image features. + +We similarly define $\rho^t$ and $p_0^t$ in $\Phi^t = \{\rho^t, p_0^t\}$ for text embeddings. Note that $\rho^t$ is defined with respect to the image features' label. That is + +$$ +i ^ {v} \sim j ^ {t}, i ^ {v} \not \sim l ^ {t} \longrightarrow p (i ^ {t}, j ^ {t} | \Phi^ {t}) / p (i ^ {t}, l ^ {t} | \Phi^ {t}) = \rho^ {t}. \tag {8} +$$ + +Both $\Phi^v$ and $\Phi^t$ parameters sets are treated as tuning hyper-parameters in experiments and can be tuned fairly easily. With Eq. (8), Eq. (7) and $\sum_{k^v}p(j^v,k^v|\Phi^v),\sum_{k^t}p(j^t,k^t|\Phi^t) = 1$ , we can derive transition probabilities between any two sets of feature maps in images and texts to fill out the transition probability table. + +With the right parameter selection, each multimodal pair in the training can be transitioned to many more multimodal pairs that are highly likely to have consistent labels for the image and text pairs which can mitigate both the issues of limited number of training samples and inconsistency in the annotations of image-text pairs. + +# 4. Experimental Setup + +The image-text classification problem we consider can be formulated as follows: we have as input $(v_{1},t_{1}),\ldots ,(v_{i},t_{i}),\ldots ,(v_{n},t_{n})$ , where $n$ is the number of training tuples and the $i$ -th tuple consists of both image $v_{i}$ and text $t_i$ . The respective labels for $v_{i}$ and $t_i$ 's are also given in training data. Our goal is to predict the correct label for any unseen $(v,t)$ pair. To simplify the evaluation, we assume there is only one correct label associated with the unseen $(v,t)$ pairs. As a result, this paper targets a multi-class classification problem instead of a multi-label problem. + +# 4.1. Dataset + +There are very few crisis datasets, and to the best of our knowledge there is only one multimodal crisis dataset, CrisisMMD [6]. It consists of annotated image-tweet pairs where images and tweets are independently labeled as + +described below. We use this dataset for our experiments. The dataset was collected using event-specific keywords and hashtags during seven natural disasters in 2017: Hurricane Irma, Hurricane Harvey, Hurricane Maria, the Mexico earthquake, California wildfires, Iraq-Iran earthquakes, and Sri Lanka floods. The corpus is comprised of three types of manual annotations: + +Task 1: Informative vs. Not Informative: whether a given tweet text or image is useful for humanitarian aid purposes, defined as providing assistance to people in need. + +Task 2: Humanitarian Categories: given an image, or tweet, or both, categorize it into one of the five following categories: + +Infrastructure and utility damage +- Vehicle damage +- Rescue, volunteering, or donation efforts +- Affected individuals (injury, dead, missing, found, etc.) +- Other relevant information + +Note that we merge the data that are labeled as injured or dead people and missing or found people in the CrisisMMD with those that are labeled as affected individuals and view all of them as one class of data. + +Task 3: Damage Severity: assess the severity of damage reported in a tweet image and classify it into Severe, Mild, and Little/None. + +It is important to note that while the annotations for the last task are only on images. Our experiments reveal that using tweet texts along with the images can boost performance. In addition, our paper is the first one to perform all three tasks on this dataset (text-only, image-only, combined). + +# 4.2. Settings + +Images and text from tweets in this dataset were annotated independently. Thus, in many cases, images and text in the same pairs may not share the same labels for either Task 1 or Task 2 (labels for Task 3 were only created by annotating the images). Given the different evaluation conditions, we carry out three evaluation settings for the sake of being comprehensive in our model assessment but also to establish best practices for the community: Setting A: we exclude the image-text pairs with differing labels for image and text; Setting B: we include the image-text pairs with different labels in the training set but keep the test set the same as in A. + +In addition, we introduce Setting $C$ to mimic a realistic crisis tweet classification task where we only train on events that have transpired before the event(s) in the test set. + +Table 1 shows the number of samples in each set for + +Table 1. Number of samples in different splits of our settings. + +
Setting# of Training samples# of Dev samples# of Test samples
Setting A
Task1:78765532821
Task2:13525401467
Task3:2590340358
Setting B
Task1:126805532821
Task2:54335401467
Setting C
Experiment 1:174-217
Experiment 2:4037-217
Experiment 3:4761-217
+ +different setting and tasks. + +Setting A: In this setting our train and test data is sampled from tweets in which the text and image pairs have the same label. That is: + +$$ +\mathcal {C} \left(v _ {i}\right) = \mathcal {C} \left(t _ {i}\right), \tag {9} +$$ + +where $\mathcal{C}(x)$ denotes the class of data point $x$ . This results in a small, yet potentially more reliable training set. We mix the data from all seven crisis events and split the data into training, dev and test sets. + +Setting B: We relax the assumption in Equation 9 and allow in training: + +$$ +\mathcal {C} \left(v _ {i}\right) \neq \mathcal {C} \left(t _ {i}\right), \tag {10} +$$ + +As the training set of this setting contains samples with inconsistent labels for image and text, multimodal fusion methods such as late feature fusion cannot deal with the training data. Our method, on the other hand, with the use of the proposed multimodal SSE, can transition the training instance with in consistent labels to a new training pair with consistent labels. We do this by manually setting $p_0^t = 1$ for the training cases with inconsistent image-text labels (i.e. all the text samples are transitioned). Since unimodal models only receive one of the modalities, it is also possible to train them separately on images and texts and use an average of their prediction in the testing stage (also known as score level fusion). + +However, we maintain the assumption of Eq. (9) for the test data. This helps to directly compare the two settings with the same test samples. In fact, in practice, the data is most valuable when the class labels match for both image and text. The rationale is that detecting an event is more valuable to crisis managers than the categorization of different parts of that event. Our dev and test sets for this setting are similar to the previous setting. However, the training set contains a larger number of samples where their image-text pairs are not necessarily labeled as the same class. + +Setting C: This setting is closest to the real-world scenario where we analyze the new event of a crisis with a model + +trained on previous crisis events. First, we require the training and test sets to be from crisis events of a different nature (i.e., wildfire vs. flood). Second, we maintain the temporal component and only train on events that have happened before the tweets of the testing set. Since collecting annotated data on an urgent ongoing-event is not possible, and also because an event of crisis may do not have a similar annotated event in the past, these two restrictions often simulate a real-world scenario. For the experiments of this setting, there is no dev set. Instead, we use a random portion of the training data to tune the hyper-parameters. + +We test on the tweets that are related to the California Wildfire (Oct 10 - 27, 2017), and train on the following three sets: + +1. Sri Lanka Floods tweets (May 31- Jul. 3, 2017) +2. Sri Lanka Floods, and Hurricane Harvey and Hurricane Irma tweets (May 31-Sept. 21, 2017) +3. Sri Lanka Floods, Hurricanes Harvey and Irma and Mexico Earthquakes (May 31 - Oct. 5, 2017). + +Similar to setting B, for the test set (i.e. California Wildfire) we only consider the samples with consistent labels for image and text, but for the training sets, we use all the available samples. + +# 4.3. Baselines + +We compare our method against several state-of-the-art methods for text and/or image classification. There are a number of categories of baseline methods we compare against. In the first category, we compare to DenseNet and BERT, which are of the most commonly used unimodal classification networks for images and texts respectively. We use Wikipedia pre-trained BERT and pre-trained DenseNet on ImageNet [14], and fine-tune them on the training sets. + +The second category of baseline methods include several recently proposed multimodal fusion methods for classification: + +- Compact Bilinear Pooling [19]: multimodal compact bilinear pooling is a fusion technique first used in visual question answering task but can be easily modified to perform standard classification task. +- Compact Bilinear Gated Pooling [32]: this fusion method is an adaptation of the compact bilinear pooling method where an extra attention gate is added on top the compact bilinear pooling module. +- MMBT [31]: recently proposed supervised multimodal bittransformers model for classifying images and text. + +The third category is the score level Score Fusion and late feature fusion Feature Fusion of DenseNet and BERT networks. Score level fusion is one of the most common fusion techniques. It averages the predictions of separate networks trained on the different modalities. Feature Fusion is one of the most effective methods for integrating two + +Table 2. Setting A: Informativeness Task, Humanitarian Categorization Task and Damage Severity Task Evaluations + +
ModelInformativeness TaskHumanitarian Categorization TaskDamage Severity Task
AccMacro F1Weighted F1AccMacro F1Weighted F1AccMacro F1Weighted F1
DenseNet [26]81.5779.1281.2283.4460.4586.9662.8552.3466.10
BERT [15]84.9081.1983.3086.0966.8387.8368.1645.0461.09
Compact Bilinear Pooling[19]88.1286.1887.6189.3067.1890.3366.4861.0370.58
Compact Bilinear Gated Pooling [32]88.7687.5088.8085.3465.9589.4268.7251.4665.34
MMBT [31]82.4881.2782.1585.8264.7888.6665.3652.1269.34
Score Fusion88.1683.4685.2686.9854.0188.9671.2353.4866.26
Feature Fusion87.5685.2086.5589.1767.2891.4067.6040.6256.47
Attention Variant 1 (Ours)89.2985.6887.0488.4164.6090.7171.5155.4169.71
Attention Variant 2 (Ours)88.3486.1287.4289.2367.6391.5663.1358.0369.39
Attention Variant 3 (Ours)88.2086.2287.4787.1864.6790.2468.9957.4269.16
SSE-Cross-BERT-DenseNet (Ours)89.3388.0989.3591.1468.4191.8272.6559.7670.41
+ +Table 3. Setting B: Informativeness Task and Humanitarian Categorization Task Evaluations + +
ModelInformativeness TaskHumanitarian Categorization Task
AccuracyMacro F1Weighted F1AccuracyMacro F1Weighted F1
DenseNet [26]83.3680.9582.9582.8966.6883.13
BERT [15]86.2684.4486.0187.7383.7287.57
Score Fusion87.0385.1986.9091.4183.2691.36
SSE-Cross-BERT-DenseNet (Ours)90.0588.8889.9093.4684.1693.35
Best from Table 289.3388.0989.3591.4867.8791.34
+ +modalities [46]. It concatenates deep layers from modality networks to predict a shared output. We also provide three variations of our attention modules and report their performance: The first variant is to replace cross-attention of Eq. (4) with co-attention of Eq. (5); the second variant is to remove self-attention; the third variant is to change the cross-attention with self-attention modules. + +We compare our model, SSE-Cross-BERT-DenseNet, to the baseline models above. + +# 4.4. Evaluation Metrics + +We evaluate the models in this paper using classification accuracy, $^{2}$ Macro F1-score and weighted F1-score. Note that while in the event of a crisis, the number of samples from different categories often significantly varies, it is important to detect all of them. F1-score and weighted F1-score take both false positives and false negatives into account, and therefore, along with accuracy as an intuitive measure, are proper evaluation metrics for our datasets. + +# 4.5. Training Details + +We use pre-trained DenseNet and BERT as our image and text backbone networks, and fine-tune them separately on text-only and image-only training samples. The details of their implementations can be found in [26] and [15], respectively. We do not freeze the pre-trained weights and train all the layers for both the backbone networks. + +We use the standard SGD optimizer. We start with the base learning rate of $2 \times 10^{-3}$ with a $10 \times$ reduction + +when the dev loss is saturated. We use a batch size of 32. The models were implemented in Keras and Tensorflow-1.4 [1]. In all the applicable experiments, we select hyperparameters with cross-validation on the accuracy of dev set. For the experiments in Setting 3 that we do not have an evaluation set, we tune hyper-parameters on $15\%$ of the training samples. We select $\rho^v,\rho^t$ and $p_0^v,p_0^t$ respectively in the range of $\rho^v,\rho^t\in [10,20000]$ and $p_0^v,p_0^t\in [0,1]$ . + +We employ the following data augmentations on the images during the training stage. Images are resized such that the smallest side is 228 pixels, and then randomly cropped with a $224 \times 224$ patch. In addition, we produce more images by randomly flipping the resulting image horizontally. + +For tweet normalization, we remove double spaces and lower case all characters. In addition, we replace any hyperlink in the tweet with the sentinel word "link". + +# 5. Experimental Results + +# 5.1. Setting A: Excluding The Training Pairs with Inconsistent Labels + +As shown in Table 2, our proposed framework, SSE-Cross-BERT-DenseNet, easily outperforms the standalone DenseNet and BERT models. Compared with baseline methods Compact Bilinear Pooling [19], Compact Bilinear Gated Pooling [32], and MMBT [31], our proposed cross-attention fusion method does enjoy an edge over previous known fusion methods, including the standard score fusion and feature fusion. This edge holds true across Settings A, B and C. In section 5.4, we conduct an ablation study to investigate which components (SSE, cross-attention, and self-attention) have the most impact on model performance. + +One important observation we find across the three tasks is that despite the fact that accuracy percentages are reasonably good for simple feature fusion method, the macro F1 scores improve much more once we add attention mechanisms. + +Table 4. Comparing our proposed method with baselines for Humanitarian Categorization Task in Setting 3. We fix the last occurred crisis namely 'California wildfires' as test data and vary the training data which is specified in the columns. + +
ModelSri Lanka FloodsSri Lanka Floods + Hurricanes Harvey & IrmaSri Lanka Floods + Hurricanes Harvey & Irma + Mexico earthquake
AccuracyMacro F1Weighted F1AccuracyMacro F1Weighted F1AccuracyMacro F1Weighted F1
DenseNet [26]55.7135.7756.8570.3252.2368.5570.3244.8068.79
BERT [15]31.9620.9027.2173.9753.9073.5174.4356.9874.21
Score Fusion56.6236.7757.9681.7456.5481.0381.2855.9080.54
SSE-Cross-BERT-DenseNet (Ours)62.5639.8262.0884.0263.1283.5586.3065.5585.93
+ +Table 5. Ablation Study of our proposed method for Humanitarian Categorization Task in Setting A. + +
ModelTest Set
AccuracyMacro F1Weighted F1
SSE-Cross-BERT-DenseNet (Ours)91.1468.4191.82
- Self-Attention89.2356.5087.70
- Cross-Attention88.4856.3887.10
- Cross-Attention + Co-Attention88.4164.6090.71
- Cross-Attention + Self-Attention86.3058.3385.27
- Dropout83.3754.8382.46
- SSE88.4164.6090.71
- SSE + Shuffling Within Class88.6862.9188.33
- SSE + Mix-up [63]89.1654.6387.37
+ +# 5.2. Setting B: Including The Training Pairs with Inconsistent Labels + +In this setting, we investigate whether our models can perform better if we can make use of more labelled data for un-matched images and texts. Note that this involves training on noisier data than the prior setting. In Table 3, our proposed framework SSE-Cross-BERT-DenseNet beats the best results from Setting A for both the Informativeness Task (89.90 to 89.35 Weighted F1) and the Humanitarian Categorization Task (93.35 to 91.34). The gap between our method versus standalone BERT and DenseNet also widens. Note that the test sets are the same for setting A and setting B while only the training data differs. + +# 5.3. Setting C: Temporal + +This setting is designed to resemble a realistic scenario where the available data is (1) only from the past (i.e. the train / test sets are split in the order they occurred in the real world). (2) train and test sets are not from the same crisis. We find that our proposed model consistently performs better than standalone image and text models (see Table 4). Additionally, performance increases for all models, including ours, with the inclusion of more crisis data to train on. This emphasizes the importance of collecting and labelling more crisis data even if there is no guarantee that the crises we collected data from will be similar to a future one. In the experiments, training crises contain floods, hurricanes and earthquakes but the test crisis is fixed at wildfires. + +# 5.4. Ablation Study + +In our ablation study, we examine each component of the model in Figure 3: namely self-attention on concatenated + +embedding, cross-attention on fusing image feature map & sentence embedding, dropout and SSE regularization. All the experiments in this section are conducted in Setting A. First, we find self-attention plays an important role on the final performance, accuracy drops to 89.23 from 91.14 if self-attention is removed. Second, the choice of cross-attention over co-attention and self-attention is well justified: we see the accuracy performance drops to around 88 by replacing the cross-attention. Third, dropout regularization [52] plays an important role in regularizing the hidden units: if we remove dropout completely, performance suffers a large drop from 91.14 to 83.37. Fourthly, we justify the usage of SSE [60] over the choice of Mixup [63] or within-class shuffling data augmentation. SSE performs better than mixup in terms of accuracy $91.14\%$ versus $89.16\%$ , and even much better in terms of F1 scores, 68.41 versus 54.63 for macro F1 score and 91.82 versus 87.37 for weighted F1 score. + +# 6. Conclusions and Future Work + +In this paper, we presented a novel multimodal framework for fusing image and textual inputs. We introduced a new cross attention module that can filter not-informative or misleading information from modalities and only fuse the useful information. We also presented a multimodal version of Stochastic Shared Embeddings (SSE) to regularize the training process and deal with limited training data. We evaluate this approach on three crisis tasks involving social media posts with images and text captions. We show that our approach not only outperforms image-only and text-only approaches which have been the mainstay in the field, but also other multimodal combination approaches. + +For future work we plan to test how our approach generalizes to other multimodal problems such as sarcasm detection in social media posts [12, 49], as well as experiment with different image and text feature extractors. Given that the CrisisMMD corpus is the only dataset available for this task and it is limited in size, we also aim to construct a larger set, which is a major effort. + +# References + +[1] Mart'in Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. Tensorflow: A system for large-scale machine learning. In 12th USENIX + +Symposium on Operating Systems Design and Implementation (OSDI 16), pages 265-283, 2016. 7 +[2] Mahdi Abavisani, Hamid Reza Vaezi Joze, and Vishal M Patel. Improving the performance of unimodal dynamic hand-gesture recognition with multimodal training. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1165-1174, 2019. 2 +[3] Mahdi Abavisani and Vishal M Patel. Deep multimodal subspace clustering networks. IEEE Journal of Selected Topics in Signal Processing, 12(6):1601-1614, 2018. 2 +[4] Rediet Abebe, Shawndra Hill, Jennifer Wortman Vaughan, Peter M Small, and H Andrew Schwartz. Using search queries to understand health information needs in africa. In Proceedings of the International AAAI Conference on Web and Social Media, volume 13, pages 3-14, 2019. 2 +[5] Kashif Ahmad, Michael Riegler, Konstantin Pogorelov, Nicola Concí, Pál Halvorsen, and Francesco De Natale. Jord: a system for collecting information and monitoring natural disasters by linking social media with satellite imagery. In Proceedings of the 15th International Workshop on Content-Based Multimedia Indexing, page 12. ACM, 2017. 2 +[6] Firoj Alam, Ferda Ofli, and Muhammad Imran. Crisismmd: Multimodal twitter datasets from natural disasters. In Twelfth International AAAI Conference on Web and Social Media, 2018. 5 +[7] Anonymous. {ALBERT}: A lite {bert} for self-supervised learning of language representations. In Submitted to International Conference on Learning Representations, 2020. under review. 3 +[8] Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. Vqa: Visual question answering. In Proceedings of the IEEE international conference on computer vision, pages 2425-2433, 2015. 3 +[9] Raffaella Bernardi, Ruket Cakici, Desmond Elliott, Aykut Erdem, Erkut Erdem, Nazli Ikizler-Cinbis, Frank Keller, Adrian Muscat, and Barbara Plank. Automatic description generation from images: A survey of models, datasets, and evaluation measures. Journal of Artificial Intelligence Research, 55:409-442, 2016. 2 +[10] Terra Blevins, Robert Kwiatkowski, Jamie MacBeth, Kathleen McKeown, Desmond Patton, and Owen Rambow. Automatically processing tweets from gang-involved youth: Towards detecting loss and aggression. In Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers, pages 2196-2206, Osaka, Japan, Dec. 2016. The COLING 2016 Organizing Committee. 2 +[11] Sven Buechel, Anneke Buffone, Barry Slaff, Lyle Ungar, and Joao Sedoc. Modeling empathy and distress in reaction to news stories. arXiv preprint arXiv:1808.10399, 2018. 2 +[12] Santiago Castro, Devamanyu Hazarika, Verónica Pérez-Rosas, Roger Zimmermann, Rada Mihalcea, and Soujanya Poria. Towards multimodal sarcasm detection (an _Obviously_ perfect paper). In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4619-4629, Florence, Italy, July 2019. Association for Computational Linguistics. 8 + +[13] Shizhe Chen and Qin Jin. Multi-modal dimensional emotion recognition using recurrent neural networks. In Proceedings of the 5th International Workshop on Audio/Visual Emotion Challenge, pages 49-56. ACM, 2015. 2 +[14] Jia Deng, R. Socher, Li Fei-Fei, Wei Dong, Kai Li, and Li-Jia Li. Imagenet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), volume 00, pages 248–255, 06 2009. 6 +[15] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018. 1, 3, 7, 8 +[16] Johannes C. Eichstaedt, H Andrew Schwartz, Salvatore Giorgi, Margaret L Kern, Gregory Park, Maarten Sap, Darwin R Labarthe, Emily E Larson, Martin Seligman, Lyle H Ungar, et al. More evidence that twitter language predicts heart disease: A response and replication. 2018. 2 +[17] Johannes C Eichstaedt, Robert J Smith, Raina M Merchant, Lyle H Ungar, Patrick Crutchley, Daniel Preoticiuc-Pietro, David A Asch, and H Andrew Schwartz. Facebook language predicts depression in medical records. Proceedings of the National Academy of Sciences, 115(44):11203-11208, 2018. 2 +[18] Andrea Frome, Greg S Corrado, Jon Shlens, Samy Bengio, Jeff Dean, Marc'Aurelio Ranzato, and Tomas Mikolov. Devise: A deep visual-semantic embedding model. In Advances in neural information processing systems, pages 2121-2129, 2013. 3 +[19] Akira Fukui, Dong Huk Park, Daylen Yang, Anna Rohrbach, Trevor Darrell, and Marcus Rohrbach. Multimodal compact bilinear pooling for visual question answering and visual grounding. arXiv preprint arXiv:1606.01847, 2016. 3, 6, 7 +[20] Timnit Gebru, Jonathan Krause, Yilun Wang, Duyun Chen, Jia Deng, Erez Lieberman Aiden, and Li Fei-Fei. Using deep learning and google street view to estimate the demographic makeup of neighborhoods across the united states. Proceedings of the National Academy of Sciences, 114(50):13108-13113, 2017. 2 +[21] Sharath Chandra Guntuku, Daniel Preotiuc-Pietro, Johannes C Eichstaedt, and Lyle H Ungar. What twitter profile and posted images reveal about depression and anxiety. arXiv preprint arXiv:1904.02670, 2019. 2 +[22] Charles Harding, Francesco Pompei, Dmitriy Burmistrov, H Gilbert Welch, Rediet Abebe, and Richard Wilson. Breast cancer screening, incidence, and mortality across us counties. JAMA internal medicine, 175(9):1483-1489, 2015. 2 +[23] 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 +[24] Jack Hessel, Bo Pang, Zhenhai Zhu, and Radu Soricut. A case study on combining asr and visual features for generating instructional video captions. arXiv preprint arXiv:1910.02930, 2019. 3 +[25] Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolu + +tional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017. 1 +[26] 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. 3, 7, 8 +[27] Ilija Ilievski and Jiashi Feng. Multimodal learning and reasoning for visual question answering. 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 551-562. Curran Associates, Inc., 2017. 3 +[28] Andrew Ilyas. Microfilters: Harnessing twitter for disaster management. In IEEE Global Humanitarian Technology Conference (GHTC 2014), pages 417-424. IEEE, 2014. 3 +[29] Wolfram Inc. Bert trained on bookcorpus and english wikipedia data. https://resources.wolframcloud.com/NeuralNetRepository/resources/BERT-Trained-on-BookCorpus-and-English-Wikipedia-Data. Accessed: 2020-03-30. 3 +[30] Stephen Kelly, Xiubo Zhang, and Khurshid Ahmad. Mining multimodal information on social media for increased situational awareness. 2017. 3 +[31] Douwe Kiela, Suvrat Bhooshan, Hamed Firooz, and Davide Testuggine. Supervised multimodal bittransformers for classifying images and text. arXiv preprint arXiv:1909.02950, 2019.6,7 +[32] Douwe Kiela, Edouard Grave, Armand Joulin, and Tomas Mikolov. Efficient large-scale multi-modal classification. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. 6, 7 +[33] Shamanth Kumar, Geoffrey Barbier, Mohammad Ali Abbasi, and Huan Liu. Tweettracker: An analysis tool for humanitarian and disaster relief. In Fifth international AAAI conference on weblogs and social media, 2011. 2 +[34] Zhen-Zhong Lan, Lei Bao, Shouu-I Yu, Wei Liu, and Alexander G Hauptmann. Multimedia classification and event detection using double fusion. Multimedia tools and applications, 71(1):333-347, 2014. 3 +[35] Kuang-Huei Lee, Xi Chen, Gang Hua, Houdong Hu, and Xiaodong He. Stacked cross attention for image-text matching. In Proceedings of the European Conference on Computer Vision (ECCV), pages 201-216, 2018. 3 +[36] Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, and Kai-Wei Chang. Visualbert: A simple and perform-. mant baseline for vision and language. arXiv preprint arXiv:1908.03557, 2019. 3 +[37] Xukun Li, Doina Caragea, Huaiyu Zhang, and Muhammad Imran. Localizing and quantifying damage in social media images. In 2018 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining (ASONAM), pages 194-201. IEEE, 2018. 2 +[38] Kuan Liu, Yanen Li, Ning Xu, and Prem Natarajan. Learn to combine modalities in multimodal deep learning. arXiv preprint arXiv:1805.11730, 2018. 3 + +[39] Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. Vilbert: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. arXiv preprint arXiv:1908.02265, 2019. 3, 4 +[40] Sreenivasulu Madichetty and M Sridevi. Detecting informative tweets during disaster using deep neural networks. In 2019 11th International Conference on Communication Systems & Networks (COMSNETS), pages 709-713. IEEE, 2019. 2 +[41] Hussein Mouzzannar, Yara Rizk, and Mariette Awad. Damage identification in social media posts using multimodal deep learning. In ISCRAM, 2018. 3 +[42] Ganesh Nalluru, Rahul Pandey, and Hemant Purohit. Relevancy classification of multimodal social media streams for emergency services. In 2019 IEEE International Conference on Smart Computing (SMARTCOMP), pages 121-125. IEEE, 2019. 2 +[43] Jiquan Ngiam, Aditya Khosla, Mingyu Kim, Juhan Nam, Honglak Lee, and Andrew Y Ng. Multimodal deep learning. In Proceedings of the 28th international conference on machine learning (ICML-11), pages 689–696, 2011. 2 +[44] Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving language understanding by generative pre-training. URL https://s3-us-west-2. amazonaws. com/openai-assets/ assets/researchcovers/languageeunsupervised/language understanding paper.pdf, 2018. 3 +[45] Tanzila Rahman, Bicheng Xu, and Leonid Sigal. Watch, listen and tell: Multi-modal weakly supervised dense event captioning. In CVPR, pages 8908-8917, 2019. 2, 3 +[46] Dhanesh Ramachandram and Graham W Taylor. Deep multimodal learning: A survey on recent advances and trends. IEEE Signal Processing Magazine, 34(6):96-108, 2017. 7 +[47] Tim GJ Rudner, Marc Rußwurm, Jakub Fil, Ramona Pelich, Benjamin Bischke, and Veronika Kopacková. Rapid computer vision-aided disaster response via fusion of multiresolution, multisensor, and multitemporal satellite imagery. 2 +[48] Naina Said, Kashif Ahmad, Michael Regular, Konstantin Pogorelov, Laiq Hassan, Nasir Ahmad, and Nicola Conc. Natural disasters detection in social media and satellite imagery: a survey. arXiv preprint arXiv:1901.04277, 2019. 2 +[49] Rossano Schifanella, Paloma de Juan, Joel Tetreault, and LiangLiang Cao. Detecting sarcasm in multimodal social platforms. Proceedings of the 2016 ACM on Multimedia Conference - MM '16, 2016. 8 +[50] Himanshu Shekhar and Shankar Setty. Disaster analysis through tweets. In 2015 International Conference on Advances in Computing, Communications and Informatics (ICACCI), pages 1719-1723. IEEE, 2015. 2 +[51] Richard Socher, Milind Ganjoo, Christopher D Manning, and Andrew Ng. Zero-shot learning through cross-modal transfer. In Advances in neural information processing systems, pages 935-943, 2013. 3 +[52] 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. 8 + +[53] Kevin Stowe, Michael J Paul, Martha Palmer, Leysia Palen, and Kenneth Anderson. Identifying and categorizing disaster-related tweets. In Proceedings of The Fourth International Workshop on Natural Language Processing for Social Media, pages 1-6, 2016. 2 +[54] Weijie Su, Xizhou Zhu, Yue Cao, Bin Li, Lewei Lu, Furu Wei, and Jifeng Dai. Vl-bert: Pre-training of generic visual-linguistic representations. arXiv preprint arXiv:1908.08530, 2019. 3 +[55] Hao Tan and Mohit Bansal. Lxmert: Learning cross-modality encoder representations from transformers. arXiv preprint arXiv:1908.07490, 2019. 3 +[56] Mingxing Tan and Quoc V Le. Efficientnet: Rethinking model scaling for convolutional neural networks. arXiv preprint arXiv:1905.11946, 2019. 3 +[57] Hien To, Sumeet Agrawal, Seon Ho Kim, and Cyrus Shahabi. On identifying disaster-related tweets: Matching-based or learning-based? In 2017 IEEE Third International Conference on Multimedia Big Data (BigMM), pages 330-337. IEEE, 2017. 2 +[58] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008, 2017. 3 +[59] Martin Wöllmer, Angeliki Metallinou, Florian Eyben, Björn Schuller, and Shrikanth Narayanan. Context-sensitive multimodal emotion recognition from speech and facial expression using bidirectional LSTM modeling. In Proc. INTER-SPEECH 2010, Makuhari, Japan, pages 2362-2365, 2010. 2 +[60] Liwei Wu, Shuqing Li, Cho-Jui Hsieh, and James L Sharpnack. Stochastic shared embeddings: Data-driven regularization of embedding layers. In Advances in Neural Information Processing Systems, pages 24-34, 2019. 3, 4, 8 +[61] Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, and Quoc V Le. Xlnet: Generalized autoregressive pretraining for language understanding. arXiv preprint arXiv:1906.08237, 2019. 3 +[62] Jie Yin, Sarvnaz Karimi, Andrew Lampert, Mark Cameron, Bella Robinson, and Robert Power. Using social media to enhance emergency situation awareness. In Twenty-fourth international joint conference on artificial intelligence, 2015. +[63] Hongyi Zhang, Moustapha Cisse, Yann N. Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. In International Conference on Learning Representations, 2018. 8 \ No newline at end of file diff --git a/multimodalcategorizationofcrisiseventsinsocialmedia/images.zip b/multimodalcategorizationofcrisiseventsinsocialmedia/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..775f44ab921f224bdb59729f9f0cc909f2f49286 --- /dev/null +++ b/multimodalcategorizationofcrisiseventsinsocialmedia/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d190ad45f5f76022758bfff243482234969fa9ae655f944ec097ed831304c6e +size 374464 diff --git a/multimodalcategorizationofcrisiseventsinsocialmedia/layout.json b/multimodalcategorizationofcrisiseventsinsocialmedia/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..866a525142f2d327d50861524ee613943f9368f6 --- /dev/null +++ b/multimodalcategorizationofcrisiseventsinsocialmedia/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15bce466e7303045f01d58a83a31912061815131687d555872ad8cdf2bd5b9a9 +size 453086 diff --git a/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/9fa52f02-ca93-41c1-a52c-8c41cef6f2aa_content_list.json b/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/9fa52f02-ca93-41c1-a52c-8c41cef6f2aa_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ebecb4cbd03d6a04dd84d143229138af52534028 --- /dev/null +++ b/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/9fa52f02-ca93-41c1-a52c-8c41cef6f2aa_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05219029c8d0fa3be18c09d69b7c0e6650ff243efc575bbd6a1bd8ff44341fb7 +size 72584 diff --git a/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/9fa52f02-ca93-41c1-a52c-8c41cef6f2aa_model.json b/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/9fa52f02-ca93-41c1-a52c-8c41cef6f2aa_model.json new file mode 100644 index 0000000000000000000000000000000000000000..167de7db0d303eaee209c0b6857124e9ae6ea223 --- /dev/null +++ b/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/9fa52f02-ca93-41c1-a52c-8c41cef6f2aa_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6646e75c0fd22eeefbfa8918b4859695a8f61684c6c028d25a3dc821a67791bb +size 92862 diff --git a/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/9fa52f02-ca93-41c1-a52c-8c41cef6f2aa_origin.pdf b/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/9fa52f02-ca93-41c1-a52c-8c41cef6f2aa_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0a068550f5da6faae1f661ba7f75fa29c5b13bf2 --- /dev/null +++ b/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/9fa52f02-ca93-41c1-a52c-8c41cef6f2aa_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43cac91c2ed8ec068f06fd0951a15bfdb19ba07092b086bfade8e51216dd49d8 +size 4361745 diff --git a/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/full.md b/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/full.md new file mode 100644 index 0000000000000000000000000000000000000000..2b1eb69746cd72d21e4e3b1ea97a1f5df6a2a689 --- /dev/null +++ b/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/full.md @@ -0,0 +1,293 @@ +# Multimodal Future Localization and Emergence Prediction for Objects in Egocentric View with a Reachability Prior + +Osama Makansi1 Özgün Çiçek1 +1University of Freiburg +makansio, cicek, brox@cs.uni-freiburg.de + +Kevin Buchicchio Thomas Brox1 +2IMRA-EUROPE buchicchio@imra-europe.com + +# Abstract + +In this paper, we investigate the problem of anticipating future dynamics, particularly the future location of other vehicles and pedestrians, in the view of a moving vehicle. We approach two fundamental challenges: (1) the partial visibility due to the egocentric view with a single RGB camera and considerable field-of-view change due to the egomotion of the vehicle; (2) the multimodality of the distribution of future states. In contrast to many previous works, we do not assume structural knowledge from maps. We rather estimate a reachability prior for certain classes of objects from the semantic map of the present image and propagate it into the future using the planned egomotion. Experiments show that the reachability prior combined with multi-hypotheses learning improves multimodal prediction of the future location of tracked objects and, for the first time, the emergence of new objects. We also demonstrate promising zero-shot transfer to unseen datasets. + +# 1. Introduction + +Figure 1 shows the view of a driver approaching pedestrians who are crossing the street. To safely control the car, the driver must anticipate where these pedestrians will be in the next few seconds. Will the last pedestrian (in blue) have completely crossed the street when I arrive or must I slow down more? Will the pedestrian on the sidewalk (in orange) continue on the sidewalk or will it also cross the street? + +This important task comes with many challenges. First of all, the future is not fully predictable. There are typically multiple possible outcomes, some of them being more likely than others. The controller of a car must be aware of these multiple possibilities and their likelihoods. If a car crashes into a pedestrian who predictably crosses the street, this will be considered a severe failure, whereas extremely unlikely behaviour, such as the pedestrian in purple turning around and crossing the street in the opposite direction, must be ignored to enable efficient control. The approach + +![](images/a0c548e4a3bbe720bbe00eb8b18b63ff6a09d2097b1062491fd6f16bea6682c4.jpg) +Figure 1. An example from the nuScenes dataset [9]. Given the past observations of pedestrians (colored bounding boxes (top)) and the egomotion of the car (red arrow), our framework predicts multiple modes of their future visualized by a set of bounding boxes and their distribution as an overlaid heatmap. Prediction covers possible options for (2nd row) turning left or right, (3rd row) slowing down or accelerating, (4th row) being on the sidewalk. + +we propose predicts two likely modes for this pedestrian: continuing left or right on the sidewalk. + +Ideally this task can be accomplished directly in the sensor data without the requirement of privileged information such as a third person view, or a street map that marks all lanes, sidewalks, crossings, etc.. Independence of such information helps the approach generalize to situations not covered by maps or extra sensors, e.g., due to changes not yet captured in the map or GPS failures. However, mak + +ing predictions in egocentric views suffers from partial visibility: we only see the context of the environment in the present view - other relevant parts of the environment are occluded and only become visible as the car moves. Figure 1 shows that the effect of the egomotion is substantial even in this example with relatively slow motion. + +In this paper, we approach these two challenges in combination: multimodality of the future and egocentric vision. For the multimodality, we build upon the recent work by Makansi et al. [36], who proposed a technique to overcome mode collapse and stability issues of mixture density networks. However, the work of Makansi et al. assumes a static bird's-eye view of the scene. In order to carry the technical concept over to the egocentric view, we introduce an intermediate prediction which improves the quality of the multimodal distribution: a reachability prior. The reachability prior is learned from a large set of egocentric views and tells where objects of a certain class are likely to be in the image based on the image's semantic segmentation; see Figure 2 top. This prior focuses the attention of the prediction based on the environment. Even more important, we can propagate this prior much more easily into the future - using the egomotion of the vehicle - than a whole image or a semantic map. The reachability prior is a condensation of the environment, which contains the semantic context most relevant to the task. + +The proposed framework of estimating and propagating a multimodal reachability prior is not only beneficial for future localization of a particular object (Figure 2 left), but it also enables the task of emergence prediction (Figure 2 right). For safe operation, it is not sufficient to reason about the future location of the observed objects, but also potentially emerging objects in the scene must be anticipated, if their emergence exceeds a certain probability. For example, passing by a school requires extra care since the probability that a child can jump on the street is higher. Autonomous systems should behave differently near a school exit than on a highway. Predicting emergence of new objects did not yet draw much attention in literature. + +The three tasks in Fig. 2 differ via their input conditions: the reachability prior is only conditioned by the semantic segmentation of the environment and the class of interest. It is independent of a particular object. Future localization includes the additional focus on an object of interest and its past trajectory. These conditions narrow down the space of solutions and make the output distribution much more peaked. Emergence prediction is a reduced case of the reachability prior, where new objects can only emerge from unobserved areas of the scene. + +In this paper (1) we propose a future localization framework in egocentric view by transferring the work by Makansi et al. [36] from bird's-eye view to egocentric observations, where multimodality is even more difficult to + +![](images/5811c6fd3c29270f6a4628e1fd1ca7c9fc70450e20a35f9fe81e8f00cf2094b4.jpg) +Figure 2. Top: The reachability prior (white rectangles) answers the general question of where a pedestrian could be in a scene. Left: Future localization (green rectangles) of a particular pedestrian crossing the street narrows down the solution from the reachability prior by conditioning the solution on past and current observations. The true future is shown as purple box. Right: The emergence prediction (green rectangles) shows where a pedestrian could suddenly appear and narrows down the solution from the reachability prior by conditioning the solution on the current observation of the scene. + +capture. Thus, (2) we propose to compute a reachability prior as intermediate result, which serves as attention to prevent forgetting rare modes, and which can be used to efficiently propagate scene priors into the future taking into account the egomotion. For the first time, (3) we formulate the problem of object emergence prediction for egocentric view with multimodality. (4) We evaluate our approach and the existing methods on the recently largest public nuScenes dataset [9] where the proposed approach shows clear improvements over the state of the art. In contrast to most previous works, the proposed approach is not restricted to a single object category. (5) We include heterogeneous classes like pedestrians, cars, buses, trucks and tricycles. (6) The prediction horizon was tripled from 1 second to 3 seconds into the future compared to existing methods. Moreover, (7) we show that the approach allows zero-shot transfer to unseen and noisy datasets (Waymo [50] and FIT). + +# 2. Related Work + +Bird's-Eye View Future Localization. Predicting the future locations or trajectories of objects is a well studied problem. It includes techniques like the Kalman filter [26], linear regression [39], and Gaussian processes [42, 57, 43, 56]. These techniques are limited to low-dimensional data, which excludes taking into account the semantic context provided by an image. Convolutional networks allow processing such inputs and using them for future localization. + +LSTMs have been very popular due to time series processing. Initial works exploited LSTMs for trajectories to model the interaction between objects [2, 59, 65], for scenes to exploit the semantics [4, 38], and LSTMs with attention to focus on the relevant semantics [46]. + +Another line of works tackle the multimodal nature of the future by sampling through cVAEs [30], GANs [3, 21, 45, 66, 27], and latent decision distributions [31]. Choi et al. [12] model future locations as nonparametric distribution, which can potentially result in multimodality but often collapses to a single mode. Given the instabilities of Mixture Density Networks (MDNs) in unrestricted environments, some works restrict the solution space to a set of predefined maneuvers or semantic areas [15, 24]. Makansi et al. [36] proposed a method to learn mixture densities in unrestricted environments. Their approach first predicts diverse samples and then fits a mixture model on these samples. All these methods have been applied on static scenes recorded from a bird's-eye view, i.e., with full local observability and no egomotion. We build on the technique from Makansi et al. [36] to estimate multimodal distributions in egocentric views. + +Egocentric Future Localization. The egocentric camera view is the typical way of observing the scene in autonomous driving. It introduces new challenges due to the egomotion and the narrow field of view. Multiple works have addressed these challenges by projecting the view into bird's-eye view using 3D sensors [14, 17, 16, 47, 35, 44, 13]. This is a viable approach, but it suffers from nondense measurements or erroneous measurements in case of LIDAR and stereo sensors, respectively. + +Alternative approaches try to work directly in the egocentric view. Yagi et al. [62] utilized the pose, locations, scales and past egomotion for predicting the future trajectory of a person. TraPHic [10] exploits the interaction between nearby heterogeneous objects. DTP [49] and STED [48] use encoder-decoder schemes using optical flow and past locations and scales of the objects. Yao et al. [63] added the planned egomotion to further improve the prediction. For autonomous driving, knowing the planned motion is a reasonable assumption [20], and we also make use of this assumption. All these models work with a deterministic model and fail to account for the multimodality and uncertainty of the future. The effect of this is demonstrated by our experiments. + +The most related work to our approach, in the sense that it works on egocentric views and predicts multiple modes, is the Bayesian framework by Bhattacharyya et al. [7]. It uses Bayesian RNNs to sample multiple futures with uncertainties. Additionally, they learn the planned egomotion and fuse it to the main future prediction framework. NEMO [37] extends this approach by learning a multimodal distribution for the planned egomotion leading to better accuracy. Both + +methods need multiple runs to sample different futures and suffer from mode collapse, i.e., tend to predict only the most dominant mode, as demonstrated by our experiments. + +Egocentric Emergence Prediction. To reinforce safety in autonomous driving, it is important to not only predict the future of the observed objects but also predict where new objects can emerge. Predicting the whereabouts of an emerging object inherits predicting the future environment itself. Predicting the future environment was addressed by predicting future frames [55, 52, 51, 1, 28, 32, 61] and future semantic segmentation [34, 25, 54, 33, 8, 6]. These methods can only hallucinate new objects in the scene in a photorealistic way, but none of them explicitly predicts the structure where new objects can actually emerge. Vondrick et al. [53] consider a higher-level task and predict the probability of a new object to appear in an egocentric view. However, they only predict "what" object to appear but not "where". Fan et al. [19] suggested transferring current object detection features to the future. This way they anticipate both observed and new objects. + +Reachability Prior Prediction. The environment poses constraints for objects during navigation. While some recent works use an LSTM to learn environment constraints from images [38, 60], others [4, 12] choose a more explicit approach by dividing the environment into meaningful grids to learn the grid-grid, object-object and object-grid interactions. Also soft attention mechanisms are commonly used to focus on relevant features of the environments [45, 46]. While these methods reason about static environment constraints within the model proposed, we propose to separate this task and learn a scene prior before the future localization in dynamic scenes. Lee et al [29] proposed a similar module, where a GAN per object class generates multiple locations to place an object photorealistically. + +# 3. Multimodal Egocentric Future Prediction + +Figure 3 shows the pipeline of our framework for the future localization task consisting of three main modules: (1) reachability prior network (RPN), which learns a prior of where members of an object class could be located in semantic map, (2) reachability transfer network (RTN), which transfers the reachability prior from the current to a future time step taking into account the planned egomotion, and (3) future localization network (FLN), which is conditioned on the past and current observations of an object and learns to predict a multimodal distribution of its future location based on the general solution from the RTN. + +Emergence prediction shares the same first two modules and differs only in the third network where we drop the condition on the past object trajectory. We refer to it as emergence prediction network (EPN). The aim of EPN is to learn a multimodal distribution of where objects of a class emerge in the future. + +![](images/1eae35ef8c5946b907a1092ab523fecb82d6cc59e2ea38ef2b5ca573885ddb46.jpg) +Figure 3. Overview of the overall future localization framework. (a) The reachability prior network (RPN) learns the relation between objects of a certain class ID and the static elements of a semantic map by generating multiple bounding box hypotheses. (b) The reachability transfer network (RTN) transfers the reachability prior into the future given the observed image, its semantic, and the planned egomotion. The ground truth for training this network is obtained in a self-supervised manner by running RPN on the future static semantic map. (c) The future localization network (FLN) yields a multimodal distribution of the future bounding boxes of the object of interest through a sampling network (to generate multiple bounding boxes (samples)) and then a fitting network to fit the samples to a Gaussian mixture model (shown as heatmap overlayed on the future image with the means of the mixture components shown as green bounding boxes). The emergence prediction network (EPN) is identical to the FLN, except that it lacks the object-of-interest masks in the input. + +![](images/2e6192c72e4c813b62dbce1414338f4576dabf800080cf16881b9d2c2050fad8.jpg) + +# 3.1. Reachability Prior Network (RPN) + +Given an observed scene from an egocentric view, the reachability prior network predicts where an object of a certain class can be at the same time step in the form of bounding box hypotheses. Let $\pmb{b}_{i,t}^{rpn} = [x,y,w,h]$ for $i\in [1,N]$ be the set of bounding box hypotheses predicted by our RPN at time step $t$ , where $(x,y)$ represents the center coordinates and $(w,h)$ the width and height. + +Since the reachability prior network should learn the relation between a class of objects (e.g., vehicle) and the scene semantics (e.g., road, sidewalk, and so on), we remove all dynamic objects from the training samples. This is achieved by inpainting [64]. Because inpainting on the semantic map causes fewer artifacts, in contrast to inpainting in the raw RGB image [5], the reachability prior is based on the semantic map. On one hand, the semantic map does not show some of the useful details visible in the raw image (e.g. the type of traffic sign or building textures). On the other hand, it is important that the inpainting does not introduce strong artifacts. These would be picked up during training and would bias the result (similar to keeping the original objects in the image). + +For each image $I_{t}$ at time $t$ , we compute its semantic segmentation $S_{t}$ using deeplabV3plus [11] and derive its static semantic segmentation $S_{t}^{\dagger}$ after inpainting all dynamic objects. This yields the training data for the reachability prior network: the static semantic segmentation is the input to the network, and the removed objects of class $c$ are ground-truth samples for the reachability. The network yields multiple + +hypotheses $\pmb{b}_{i,t}^{rpn}$ as output and is trained using the EWTA scheme [36] with the loss: + +$$ +L _ {R P N} = l \left(\boldsymbol {b} _ {i, t} ^ {r p n}, \hat {\boldsymbol {b}} _ {t}\right). \tag {1} +$$ + +$\hat{b}_t$ denotes a ground-truth bounding box of one instance from class $c$ (e.g., vehicle or pedestrian) in image $\pmb{I}_t$ and $l(.)$ denotes the $L_{2}$ norm. EwTA applies this loss to the hypotheses in a hierarchical way. It penalizes all hypotheses (i.e., $i\in [1,N]$ where $N = 20$ ). After convergence, it halves the hypotheses ( $N = 10$ ) and penalizes only the best 10 hypotheses. This halving is repeated until only the best hypothesis is penalized; see Makansi et al. [36] for details. A sample output of the reachability prior network for a car is shown in Figure 4 (top). + +# 3.2. Reachability Transfer Network (RTN) + +When running RPN on the semantic segmentation at time $t$ , we obtain a solution for the same time step $t$ . However, at test time, we require this prior in the unobserved future. Thus, we train a network to transfer the reachability at time $t$ to time $t + \Delta t$ , where $\Delta t$ is the fixed prediction horizon and $e_{t \rightarrow t + \Delta t}$ is the relative pairwise transformation between the pose at time $t$ and $t + \Delta t$ (referred to as planned egomotion) which is represented as a transformation vector (3d translation vector $[t_x, t_y, t_z]$ and rotation quaternions $[q_w, q_x, q_y, q_z]$ ). This transfer network can be learned with a self-supervised loss from a time series + +$$ +L _ {R T N} = \sum_ {i = 1} ^ {N} \left| \boldsymbol {b} _ {i, t + \Delta t} ^ {r t n} - \boldsymbol {b} _ {i, t + \Delta t} ^ {r p n} \right|. \tag {2} +$$ + +![](images/eff1fc162f8f684b39069789b035bd78e7071353a83b28f1b1fc227bbd130e53.jpg) +Figure 4. An example from the Waymo [50] dataset showing the reachability prior for the class car in the current time step (RPN: top), the reachability prior transferred to the future (RTN: middle), and final future localization further conditioned on a specific instance (FLN: bottom). For clarity, we draw the hypotheses on both image and semantic domains. Note that none of our networks has access to the future image or its semantic map (at time $t + \Delta t$ ). + +where $b_{i,t + \Delta t}^{rtn} = RTN(b_{i,t}^{rpn},e_{t\Rightarrow t + \Delta t},I_t,S_t^\dagger)$ is the output of the RTN network. $I_{t}$ is the image and $S_{t}^{\dagger}$ is the static semantic segmentation at time $t$ . Figure 4 (middle) shows the reachability prior (top) transferred to the future. Given the ego motion as moving forward (red arrow) and the visual cues for upcoming traffic light and a right turn, the RTN anticipates that some more cars can be on the street emerging and transforms some of the RPN hypotheses to cover these new locations. + +# 3.3. Future Localization Network (FLN) + +Given an object which is observed for a set of frames from $t - \delta t$ to $t$ , where $\delta t$ denotes the observation period, FLN predicts the distribution of bounding boxes in the future frame $t + \Delta t$ . Figure 3c shows the input to this network: the past images $(I_{t - \delta t}, \dots, I_t)$ , the past semantic maps $(S_{t - \delta t}, \dots, S_t)$ , the past masks of the object of interest $(M_{t - \delta t}, \dots, M_t)$ , the planned egomotion $(e_{t \Rightarrow t + \Delta t})$ , and the reachability prior in the future frame $(b_{i,t + \Delta t}^{rtn})$ . The object masks $M_s$ are provided as images, where pixels inside the object bounding box are object class $c$ and 0 elsewhere. + +We use the sampling-fitting framework from Makansi et al. [36] to predict a Gaussian mixture for the future bounding box of the object of interest. The sampling network generates multiple hypotheses and is trained with EWTA, just like the RPN. The additional fitting network estimates the parameters $(\pi_k,\mu_k,\sigma_k)$ of a Gaussian mixture model with $K = 4$ from these hypotheses, similar to the expectation-maximization algorithm but via a network; see Makansi et + +al. [36] for details. An example of the FLN prediction is shown in figure 4 (bottom). The fitting network is trained with the negative log-likelihood (NLL) loss + +$$ +\boldsymbol {L} _ {n l l} = - \log \left[ \sum_ {k = 1} ^ {K} \pi_ {k} \mathcal {N} \left(\boldsymbol {\mu} _ {k}, \boldsymbol {\sigma} _ {k} ^ {2}\right) \right]. \tag {3} +$$ + +# 3.4. Emergence Prediction Network (EPN) + +Rather than predicting the future of a seen object, the emergence prediction network predicts where an unseen object can emerge in the scene. The EPN is very similar to the FLN shown in figure 3c. The only difference is that the object masks are missing in the input, since the task is not conditioned on a particular object but predicts the general distribution of objects emerging. + +The network is trained on scenes where an object is visible in a later image $I_{t + \Delta t}$ (ground truth), but not in the current image $I_{t}$ . Like for the future localization network, we train the sampling network with EWTA and the fitting network with NLL. + +# 4. Experiments + +# 4.1. Datasets + +Mapillary Vistas [41]. We used the Mapillary Vistas dataset for training the inpainting method from [64] on semantic segmentation and for training our reachability prior network. This dataset contains around $25K$ images recorded in different cities across 6 continents, from different viewpoints, and in different weather conditions. For each image, pixelwise semantic and instance segmentation are provided. The images of this dataset are not temporally ordered, which prevents its usage for training the RTN, FLN, or EPN. + +nuScenes [9]. nuScenes is very large autonomous driving dataset consisting of 1000 scenes with 20 seconds each. We used it for training and evaluating the proposed framework. We did not re-train the reachability prior network on this dataset, as to test generalization of the reachability prior network across different datasets. The nuScenes dataset provides accurate bounding box tracking for different types of traffic objects and the egomotion of the observer vehicle. We used the standard training/validation split (700/150 scenes) of the dataset for training/evaluating all experiments. + +Waymo Open Dataset [50]. Waymo is the most recent autonomous driving dataset and contains 1000 scenes with 20 seconds each. To show zero-shot transfer of our framework (i.e., without re-training the model), we used the standard 202 testing scenes. + +FIT Dataset. We collected 18 scenes from different locations in Europe and relied on MaskRCNN [22] and deep + +sort [58] to detect and track objects, and DSO [18] to estimate the egomotion. This dataset allows testing the robustness to noisy inputs (without human annotation). We will make these sequences and the annotations publicly available. + +# 4.2. Evaluation Metrics + +FDE. For evaluating both future localization and emergence prediction, we report the common Final Displacement Error (FDE), which estimates the $L_{2}$ distance of the centers of two bounding boxes in pixels. + +IOU. We report the Intersection Over Union (IOU) metric to evaluate how well two bounding boxes overlap. + +The above metrics are designed for single outputs, not distributions. In case of multiple hypotheses, we applied the above metrics between the ground truth and the closest mode to the ground truth (known as Oracle [36, 30]). + +NLL. To evaluate the accuracy of the multimodal distribution, we compute the negative log-likelihood of the ground-truth samples according to the estimated distribution. + +# 4.3. Training Details + +We used ResNet-50 [23] as sampling network in all parts of this work. The fitting network consisted of two fully connected layers (each with 500 nodes) with a dropout layer (rate $= 0.2$ ) in between. In the FLN, we observed $\delta t = 1$ second and predicted $\Delta t = 3$ seconds into the future. For the EPN, we observed only one frame and predicted $\Delta t = 1$ second into the future. We used $N = 20$ for all sampling networks, and $K = 4$ and $K = 8$ as the number of mixture components for the FLN and the EPN, respectively. The emergence prediction task requires more modes compared to the future localization task since the distribution has typically more modes in this task. + +# 4.4. Baselines + +As there is only one other work so far on egocentric multimodal future prediction [7], we compare also to unimodal baselines, which are already more established. + +Kalman Filter [26]. This linear filter is commonly used for estimating the future state of a dynamic process through a set of (low-dimensional) observations. It is not expected to be competitive, since it considers only the past trajectory and ignores all other information. + +DTP [49]. DTP is a dynamic trajectory predictor for pedestrians based on motion features obtained from optical flow. We used their best performing framework, which predicts the difference to the constant velocity solution. + +STED [48]. STED is a spatial-temporal encoder-decoder that models visual features by optical flow and temporal features by the past bounding boxes through GRU en + +coders. It later fuses the encoders into another GRU decoder to obtain the future bounding boxes. + +RNN-ED-XOE [63]. RNN-ED-XOE is an RNN-based encoder-decoder framework which models both temporal and visual features similar to STED. RNN-ED-XOE additionally encodes the future egomotion before fusing all information into a GRU decoder for future bounding boxes. + +FLN-Bayesian using [7]. The work by Bhattacharyya et al. [7] is the only multimodal future prediction work for the egocentric scenario in the literature. It uses Bayesian optimization to estimate multiple future hypotheses and their uncertainty. Since they use a different network architecture and data modalities, rather than direct method comparison we port their Bayesian optimization into our framework for fair comparison. We re-trained our FLN with their objective to create samples by dropout during training and testing time as replacement for the EWTA hypotheses. We used the same number of samples, $N = 20$ , as in our standard approach. + +All these baselines predict the future trajectory of either pedestrians [49, 48, 7] or vehicles [63]. Thus, we re-trained them on nuScenes [9] to handle both pedestrian and vehicle classes. Moreover, some baselines utilize the future egomotion obtained from ORB-SLAM2 [40] or predicted by their framework, as in [7]. For a fair comparison, we used the egomotion from nuScenes dataset when re-training and testing their models, thus eliminating the effect of different egomotion estimation methods. + +FLN w/o reachability. To measure the effect of the reachability prior, we ran this version of our framework without RPN and RTN. + +FLN + reachability. Our full framework including all 3 networks: RPN, RTN, FLN. + +Due to the lack of comparable work addressing the emergence prediction task, so far, we conduct an ablation study on the emergence prediction to analyze the effect of the proposed reachability prior on the accuracy of the prediction. + +# 4.5. Egocentric Future Localization + +Table 1 shows a quantitative evaluation of our proposed framework against all the baselines listed above. To distinguish test cases that can be solved with simple extrapolation from more difficult cases, we use the performance of the Kalman filter [26]; see also [63]. A test sample, where the Kalman filter [26] has a displacement error larger than average is counted as challenging. An error more than twice the average is marked very challenging. In Table 1, we show the error only for the whole test set (all) and the very challenging subset (hard). More detailed results are in the supplemental material. + +As expected, deep learning methods outperform the extrapolation by a Kalman filter on all metrics. Both variants of our framework show a significant improvement over all + +
nuScenes [9] (all 11k / hard 1.4k)Waymo [50] (all 47.2k / hard 7.1k)FIT (all 1.4k / hard 223)
FDE ↓IOU ↑NLL ↓FDE ↓IOU ↑NLL ↓FDE ↓IOU ↑NLL ↓
Kalman [26]45.02/179.920.31/0.01-31.69/124.710.39/0.02-38.33/146.500.36/0.03-
DTP [49]35.88/111.490.34/0.05-28.31/82.640.38/0.10-34.99/118.360.37/0.09-
RNN-ED-XOE [63]30.47/78.540.34/0.13-25.23/59.230.36/0.18-35.74/88.580.36/0.17-
STED [48]27.71/82.710.39/0.13-20.73/58.140.42/0.20-31.80/86.580.35/0.16-
FLN-Bayesian using [7]28.51/82.230.37/0.1319.75/28.4423.75/64.670.38/0.1718.80/27.5432.64/87.630.38/0.1620.56/28.83
FLN w/o RPN15.91/47.150.54/0.2919.46/26.8513.20/36.570.54/0.3418.84/26.1918.12/47.920.53/0.3320.38/27.88
FLN + RPN12.82/32.680.55/0.3317.90/24.1710.35/27.150.58/0.3716.63/22.9515.41/32.140.54/0.3919.08/24.73
+ +basielines for the FDE and IOU metrics. When we use FDE or IOU, we use the oracle selection of the hypotheses (i.e, the closest bounding box to the ground truth). Hence, a multimodal method is favored over a unimodal one. Still, such significant improvement indicates the need for multimodality. To evaluate without the bias introduced by the oracle selection, we also report the negative log-likelihood (NLL). + +Both variants of the proposed framework outperform the Bayesian framework on all metrics including the NLL. In fact, the Bayesian baseline is very close to the best unimodal baseline. This indicates its tendency for mode collapse, which we also see qualitatively. The use of the reachability prior is advantageous on all metrics and for all difficulties. + +As the networks (ours and all baselines) were trained on nuScenes, the results on Waymo and FIT include a zero-shot transfer to unseen datasets. We obtain the same ranking for unseen datasets as for the test set of nuScenes. This indicates that overfitting to a dataset is not an issue for this task. We recommend having cross-dataset experiments (as we show) also in future works to ensure that this stays true and future improvements in numbers are really due to better models and not just overfitting. + +Figure 5 shows some qualitative example in four challenging scenarios, where there are multiple options for the future location. (1) A pedestrian starts crossing the street and his future is not deterministic due to different speed estimates. (2) A pedestrian enters the scene from the left and will either continue walking to cross the street or will stop at the traffic light. (3) A tricycle driving from a parking area will continue driving to cross the road or will stop to give way to our vehicle. (4) A car entering the scene from the left will either slow down to yield or drive faster to overpass. + +For all scenarios, we observe that the reachability prior (shown as set of colored bounding boxes) defines the general relation between the object of interest and the static elements of the scene. Similar to the observation from our quantitative evaluation, the Bayesian baseline predicts a single future with some uncertainty (unimodal distribution). Our framework without exploiting the reachability prior (FLN w/o RPN) tends to predict more diverse futures + +Table 1. Result for future localization on the nuScenes [9], the Waymo [50], and our FIT datasets. The bottom three methods predict a multimodal distribution. The other methods are not probabilistic and do not allow evaluation of the NLL. For each cell, we report the average over (all testing scenarios/the very challenging scenarios). The number of all/very challenging scenarios for each dataset is shown in parentheses (top). + +
FDE ↓IOU ↑NLL ↓
EPN w/o RPN21.480.1822.99
EPN + RPN15.890.1921.03
+ +Table 2. Quantitative results for the emergence prediction task on the nuScenes dataset [9]. + +but still lacks predicting many of the modes. The reachability prior helps the approach to cover more of the possible future locations. + +We highly recommend watching the supplementary video, which gives a much more detailed qualitative impression of the results, as it allows the observer to get a much better feeling for the situation than the static pictures in the paper. + +# 4.6. Egocentric Emergence Prediction + +Table 2 shows the ablation study on the importance of using the reachability prior for the task of predicting object emergence in a scene. Similar to future localization, exploiting the reachability prior yields a higher accuracy and captures more of the modes. Two qualitative examples for this task are shown in Figure 6. Examples include scenarios (1) where a vehicle could emerge in the scene from the left street, could pass by or could be oncoming; (2) where a car could emerge from the left, from the right, it could pass by, or could be oncoming. EPN learns not only the location in the image, but also meaningful scales. For instance, the anticipation of passing-by cars has a larger scale compared to expected oncoming cars. The distributions for the two examples are different since more modes for emerging vehicles are expected in the second example (e.g, emerging from the right side). Notably, the reachability prior solution is different from the emergence solution, where close-by cars in front of the egocar are part of the reachability prior solution but are ruled out, since a car cannot suddenly appear there. More results are provided in the supplemental material. + +# 5. Conclusions + +In this work, we introduced a method for predicting future locations of traffic objects in egocentric views without + +![](images/ce95955e6a12092992d232f05e70f6d9e1e0b5628dec10395811550a3d16caf4.jpg) +Figure 5. Results for future localization on Waymo [50] (1st row) and nuScenes [9] (2-4 rows). For each row (scenario), we show (a) the observed trajectory of the object of interest (pink) and the planned egomotion (red arrow) to the future (red circle indicates no egomotion), (b) the reachability prior resulted from the RTN in the future frame, (c) a heatmap overlayed on the future image and the mean prediction (green bounding box) visualizing the distribution predicted by the Bayesian method and the ground-truth bounding box (pink), (d-e) both variants of our future localization framework. + +![](images/f75d92e9a8db1b2d655a9ba1db82903024fa236e0b3caea89dd1e4f7d124445c.jpg) +Figure 6. Sample results for emergence prediction on nuScenes [9]. For each row (scenario), we show (a) the observed image and the planned egomotion to the future (red circle indicates no egomotion), (b) the reachability prior from the RTN in the future frame, (c-d) both variants of the emergence prediction framework. + +predefined assumptions on the scene and by taking into account the multimodality of the future. We showed that a reachability prior and multi-hypotheses learning help overcome mode collapse. We also introduced a new task relevant for autonomous driving: predicting locations of suddenly emerging objects. Overall, we obtained quite good results even in difficult scenarios, but careful qualitative in + +spection of many results still shows a lot of potential for improvement on future prediction. + +# 6. Acknowledgments + +This work was funded in parts by IMRA Europe S.A.S. and the German Ministry for Research and Education (BMBF) via the project Deep-PTL. + +# References + +[1] Sandra Aigner and Marco Krner. Futuregan: Anticipating the future frames of video sequences using spatio-temporal 3d convolutions in progressively growing gans. arXiv preprint arXiv:1810.01325, 2018. +[2] A. Alahi, K. Goel, V. Ramanathan, A. Robicquet, L. Fei-Fei, and S. Savarese. Social lstm: Human trajectory prediction in crowded spaces. In CVPR, 2016. +[3] Javad Amirian, Jean-Bernard Hayet, and Julien Pettre. Social ways: Learning multi-modal distributions of pedestrian trajectories with gans. In CVPR Workshops, 2019. +[4] Federico Bartoli, Giuseppe Lisanti, Lamberto Ballan, and Alberto Del Bimbo. Context-aware trajectory prediction. arXiv preprint arXiv:1705.02503, 2017. +[5] Lorenzo Berlincioni, Federico Becattini, Leonardo Galteri, Lorenzo Seidenari, and Alberto Del Bimbo. Semantic road layout understanding by generative adversarial inpainting. arXiv preprint arXiv:1805.11746, 2018. +[6] Apratim Bhattacharyya, Mario Fritz, and Bernt Schiele. Bayesian prediction of future street scenes through importance sampling based optimization. arXiv preprint arXiv:1806.06939, 2018. +[7] A. Bhattacharyya, M. Fritz, and B. Schiele. Long-term onboard prediction of people in traffic scenes under uncertainty. In CVPR, June 2018. +[8] Apratim Bhattacharyya, Mario Fritz, and Bernt Schiele. Bayesian prediction of future street scenes using synthetic likelihoods. In ICLR, 2019. +[9] 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. +[10] Rohan Chandra, Uttaran Bhattacharya, Aniket Bera, and Dinesh Manocha. Traphic: Trajectory prediction in dense and heterogeneous traffic using weighted interactions. In CVPR, June 2019. +[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. +[12] Chiho Choi and Behzad Dariush. Looking to relations for future trajectory forecast. In ICCV, 2019. +[13] Chiho Choi, Abhishek Patil, and Srikanth Malla. Drogon: A causal reasoning framework for future trajectory forecast. arXiv preprint arXiv:1908.00024, 2019. +[14] Henggang Cui, Thi Nguyen, Fang-Chieh Chou, Tsung-Han Lin, Jeff Schneider, David Bradley, and Nemanja Djuric. Deep kinematic models for physically realistic prediction of vehicle trajectories. arXiv preprint arXiv:1908.00219, 2019. +[15] Henggang Cui, Vladan Radosavljevic, Fang-Chieh Chou, Tsung-Han Lin, Thi Nguyen, Tzu-Kuo Huang, Jeff Schneider, and Nemanja Djuric. Multimodal trajectory predictions for autonomous driving using deep convolutional networks. arXiv preprint arXiv:1809.10732, 2018. + +[16] N. Deo, A. Rangesh, and M. M. Trivedi. How would surround vehicles move? a unified framework for maneuver classification and motion prediction. T-IV, June 2018. +[17] Nemanja Djuric, Vladan Radosavljevic, Henggang Cui, Thi Nguyen, Fang-Chieh Chou, Tsung-Han Lin, and Jeff Schneider. Short-term motion prediction of traffic actors for autonomous driving using deep convolutional networks. arXiv preprint arXiv:1808.05819, 2018. +[18] J. Engel, V. Koltun, and D. Cremers. Direct sparse odometry. In arXiv:1607.02565, 2016. +[19] Chenyou Fan, Jangwon Lee, and Michael S. Ryoo. Forecasting hands and objects in future frames. In ECCV, September 2018. +[20] D. Gonzlez, J. Prez, V. Milans, and F. Nashashibi. A review of motion planning techniques for automated vehicles. T-ITS, April 2016. +[21] Agrim Gupta, Justin Johnson, Li Fei-Fei, Silvio Savarese, and Alexandre Alahi. Social gan: Socially acceptable trajectories with generative adversarial networks. In CVPR, 2018. +[22] K. He, G. Gkioxari, P. Dollr, and R. Girshick. Mask r-cnn. In ICCV, pages 2980-2988, Oct 2017. +[23] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, June 2016. +[24] Yeping Hu, Wei Zhan, and Masayoshi Tomizuka. Probabilistic prediction of vehicle semantic intention and motion. arXiv preprint arXiv:1804.03629, 2018. +[25] Xiaojie Jin, Huaxin Xiao, Xiaohui Shen, Jimei Yang, Zhe Lin, Yunpeng Chen, Zequn Jie, Jiashi Feng, and Shuicheng Yan. Predicting scene parsing and motion dynamics in the future. In NIPS, pages 6915-6924, 2017. +[26] R. E. Kalman. A new approach to linear filtering and prediction problems. ASME Journal of Basic Engineering, 1960. +[27] Vineet Kosaraju, Amir Sadeghian, Roberto Martin-Martin, Ian Reid, S. Hamid Rezatofighi, and Silvio Savarese. Socialbigat: Multimodal trajectory forecasting using bicyclegan and graph attention networks. arXiv preprint arXiv:1907.03395, 2019. +[28] Yong-Hoon Kwon and Min-Gyu Park. Predicting future frames using retrospective cycle gan. In CVPR, June 2019. +[29] Donghoon Lee, Sifei Liu, Jinwei Gu, Ming-Yu Liu, Ming-Hsuan Yang, and Jan Kautz. Context-aware synthesis and placement of object instances. In NIPS, 2018. +[30] Namhoon Lee, Wongun Choi, Paul Vernaza, Christopher B Choy, Philip HS Torr, and Manmohan Chandraker. Desire: Distant future prediction in dynamic scenes with interacting agents. In CVPR, pages 336-345, 2017. +[31] Yuke Li. Which way are you going? imitative decision learning for path forecasting in dynamic scenes. In CVPR, June 2019. +[32] Yijun Li, Chen Fang, Jimei Yang, Zhaowen Wang, Xin Lu, and Ming-Hsuan Yang. Flow-grounded spatial-temporal video prediction from still images. In ECCV, 2018. +[33] Pauline Luc, Camille Couprie, Yann Lecun, and Jakob Verbeek. Predicting future instance segmentations by forecasting convolutional features. arXiv preprint arXiv:1803.11496, 2018. + +[34] Pauline Luc, Natalia Neverova, Camille Couprie, Jakob Verbeek, and Yann LeCun. Predicting deeper into the future of semantic segmentation. In ICCV, 2017. +[35] Yuexin Ma, Xinge Zhu, Sibo Zhang, Ruigang Yang, Wenping Wang, and Dinesh Manocha. Trafficpredict: Trajectory prediction for heterogeneous traffic-agents. In AAAI, pages 6120-6127, 2019. +[36] Osama Makansi, Eddy Ilg, Ozgun Cicek, and Thomas Brox. Overcoming limitations of mixture density networks: A sampling and fitting framework for multimodal future prediction. In CVPR, June 2019. +[37] Srikanth Malla and Chiho Choi. Nemo: Future object localization using noisy ego priors. arXiv preprint arXiv:1909.08150, 2019. +[38] Huynh Manh and Gita Alaghband. Scene-lstm: A model for human trajectory prediction. arXiv preprint arXiv:1808.04018, 2018. +[39] P. McCullagh and J.A. Nelder. Generalized Linear Models, Second Edition. Chapman & Hall/CRC Monographs on Statistics & Applied Probability. Taylor & Francis, 1989. +[40] R. Mur-Artal and J. D. Tards. Orb-slam2: An open-source slam system for monocular, stereo, and rgb-d cameras. IEEE Transactions on Robotics, 2017. +[41] Gerhard Neuhold, Tobias Ollmann, Samuel Rota Bulò, and Peter Kontschieder. The mapillary vistas dataset for semantic understanding of street scenes. In ICCV, 2017. +[42] A. O'Hagan. Curve fitting and optimal design for prediction. Journal of the Royal Statistical Society: Series B (Methodological), 40(1):1-24, 1978. +[43] Carl Edward Rasmussen and Christopher K. I. Williams. Gaussian Processes for Machine Learning (Adaptive Computation and Machine Learning). The MIT Press, 2005. +[44] Nicholas Rhinehart, Rowan McAllister, Kris Kitani, and Sergey Levine. Precog: Prediction conditioned on goals in visual multi-agent settings. In ICCV, 2019. +[45] Amir Sadeghian, Vineet Kosaraju, Ali Sadeghian, Noriaki Hirose, Hamid Rezatofighi, and Silvio Savarese. Sophie: An attentive gan for predicting paths compliant to social and physical constraints. In CVPR, 2019. +[46] Amir Sadeghian, Ferdinand Legros, Maxime Voisin, Ricky Vesel, Alexandre Alahi, and Silvio Savarese. Car-net: Clairvoyant attentive recurrent network. In ECCV, 2018. +[47] Shashank Srikanth, Junaid Ahmed Ansari, Karnik Ram R, Sarthak Sharma, Krishna Murthy J., and Madhava Krishna K. Infer: Intermediate representations for future prediction. arXiv preprint arXiv:1903.10641, 2019. +[48] Olly Styles, Tanaya Guha, and Victor Sanchez. Multiple object forecasting: Predicting future object locations in diverse environments. arXiv preprint arXiv:1909.11944, 2019. +[49] O. Styles, A. Ross, and V. Sanchez. Forecasting pedestrian trajectory with machine-annotated training data. In IV, June 2019. +[50] Pei Sun, Henrik Kretzschmar, Xerxes Dotiwalla, Aurelien Chouard, Vijaysai Patnaik, Paul Tsui, James Guo, Yin Zhou, Yuning Chai, Benjamin Caine, Vijay Vasudevan, Wei Han, Jiquan Ngiam, Hang Zhao, Aleksei Timofeev, Scott Ettinger, Maxim Krivokon, Amy Gao, Aditya Joshi, Yu Zhang, + +Jonathon Shlens, Zhifeng Chen, and Dragomir Anguelov. Scalability in perception for autonomous driving: Waymo open dataset, 2019. +[51] Ruben Villegas, Jimei Yang, Seunghoon Hong, Xunyu Lin, and Honglak Lee. Decomposing motion and content for natural video sequence prediction. In ICLR, 2017. +[52] Ruben Villegas, Jimei Yang, Yuliang Zou, Sungryull Sohn, Xunyu Lin, and Honglak Lee. Learning to generate long-term future via hierarchical prediction. In ICML, 2017. +[53] Carl Vondrick, Hamed Pirsiavash, and Antonio Torralba. Anticipating visual representations from unlabeled video. In CVPR, pages 98-106, 2016. +[54] Suhani Vora, Reza Mahjourian, Soeren Pirk, and Anelia Angelova. Future segmentation using 3d structure. arXiv preprint arXiv:1811.11358, 2018. +[55] J. Walker, A. Gupta, and M. Hebert. Patch to the future: Unsupervised visual prediction. In CVPR, 2014. +[56] J. M. Wang, D. J. Fleet, and A. Hertzmann. Gaussian process dynamical models for human motion. TPAMI, 30(2):283-298, 2008. +[57] C. K. I. Williams. Prediction with gaussian processes: From linear regression to linear prediction and beyond. In Learning and Inference in Graphical Models, pages 599-621. Kluwer, 1997. +[58] Nicolai Wojke, Alex Bewley, and Dietrich Paulus. Simple online and realtime tracking with a deep association metric. arXiv preprint arXiv:1703.07402, 2017. +[59] Y. Xu, Z. Piao, and S. Gao. Encoding crowd interaction with deep neural network for pedestrian trajectory prediction. In CVPR, pages 5275-5284, 2018. +[60] H. Xue, D. Q. Huynh, and M. Reynolds. Ss-lstm: A hierarchical LSTM model for pedestrian trajectory prediction. In WACV, 2018. +[61] Tianfan Xue, Jiajun Wu, Katherine Bouman, and Bill Freeman. Visual dynamics: Probabilistic future frame synthesis via cross convolutional networks. In NIPS, pages 91-99, 2016. +[62] T. Yagi, K. Mangalam, R. Yonetani, and Y. Sato. Future person localization in first-person videos. In CVPR, June 2018. +[63] Y. Yao, M. Xu, C. Choi, D. J. Crandall, E. M. Atkins, and B. Dariush. Egocentric vision-based future vehicle localization for intelligent driving assistance systems. In ICRA, May 2019. +[64] Jiahui Yu, Zhe Lin, Jamei Yang, Xiaohui Shen, Xin Lu, and Thomas S. Huang. Generative image inpainting with contextual attention. In CVPR, June 2018. +[65] Pu Zhang, Wanli Ouyang, Pengfei Zhang, Jianru Xue, and Nanning Zheng. Sr-lstm: State refinement for lstm towards pedestrian trajectory prediction. In CVPR, 2019. +[66] Tianyang Zhao, Yifei Xu, Mathew Monfort, Wongun Choi, Chris Baker, Yibiao Zhao, Yizhou Wang, and Ying Nian Wu. Multi-agent tensor fusion for contextual trajectory prediction. In CVPR, June 2019. \ No newline at end of file diff --git a/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/images.zip b/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..3cf97953adcd5cfd37934f72fc7c74c6a8377dbf --- /dev/null +++ b/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0be51a9b6c295cbfc0feee7bfb1e76fcdabbbf9c3fdc4fab83088fe18cee3fc1 +size 629102 diff --git a/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/layout.json b/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0418c3987c7568dd19714b386eb5b9c44211af21 --- /dev/null +++ b/multimodalfuturelocalizationandemergencepredictionforobjectsinegocentricviewwithareachabilityprior/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59812be99b0607cd5e1ef4eebda04f6467a9066337de8aa6ac5b265714ad5539 +size 343365 diff --git a/multipleanchorlearningforvisualobjectdetection/b4f6a0d8-5896-4dc8-ae72-b494274284b7_content_list.json b/multipleanchorlearningforvisualobjectdetection/b4f6a0d8-5896-4dc8-ae72-b494274284b7_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f71e98892a663136c7b18c04e27fb029b9c8a540 --- /dev/null +++ b/multipleanchorlearningforvisualobjectdetection/b4f6a0d8-5896-4dc8-ae72-b494274284b7_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83046b946b142962e87a3f63cc859a5af6e3fdd2a19c1080a4d598d7b70bdbc4 +size 77255 diff --git a/multipleanchorlearningforvisualobjectdetection/b4f6a0d8-5896-4dc8-ae72-b494274284b7_model.json b/multipleanchorlearningforvisualobjectdetection/b4f6a0d8-5896-4dc8-ae72-b494274284b7_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b810721f8a8bec81e08dee8935749c1a0f4fb033 --- /dev/null +++ b/multipleanchorlearningforvisualobjectdetection/b4f6a0d8-5896-4dc8-ae72-b494274284b7_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ecee0fdf02091c35f8f3c7f7bd07707694ca50f39dc090b66cc98352e6a0daf +size 92874 diff --git a/multipleanchorlearningforvisualobjectdetection/b4f6a0d8-5896-4dc8-ae72-b494274284b7_origin.pdf b/multipleanchorlearningforvisualobjectdetection/b4f6a0d8-5896-4dc8-ae72-b494274284b7_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..de1138c67c9363222cbf1de498841da198abafca --- /dev/null +++ b/multipleanchorlearningforvisualobjectdetection/b4f6a0d8-5896-4dc8-ae72-b494274284b7_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2542eedb5ef9379619af061bcb5d4f7214f06e0120f32d569f9305532cb792f6 +size 558524 diff --git a/multipleanchorlearningforvisualobjectdetection/full.md b/multipleanchorlearningforvisualobjectdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5602b7ce4570f03fdaa9f94b1c1aa1a596addf22 --- /dev/null +++ b/multipleanchorlearningforvisualobjectdetection/full.md @@ -0,0 +1,339 @@ +# Multiple Anchor Learning for Visual Object Detection + +Wei $\mathrm{Ke}^{*1,2}$ , Tianliang Zhang $^{*3}$ , Zeyi Huang $^{2}$ , Qixiang Ye $^{\dagger 3}$ , Jianzhuang Liu $^{4}$ , and Dong Huang $^{2}$ + +$^{1}$ Xi'an Jiaotong University, Xi'an, China + +$^{2}$ Carnegie Mellon University, Pittsburgh, US + +3University of Chinese Academy of Sciences, Beijing, China + +4 Shenzhen Institutes of Advanced Technology, Shenzhen, China + +wei.ke@xjtu.edu.cn, zhangtianliang17@mails.ucas.ac.cn, zeyih@andrew.cmu.edu + +qxye@ucas.ac.cn, jz.liu@siat.ac.cn, donghuang@cmu.edu + +# Abstract + +Classification and localization are two pillars of visual object detectors. However, in CNN-based detectors, these two modules are usually optimized under a fixed set of candidate (or anchor) bounding boxes. This configuration significantly limits the possibility to jointly optimize classification and localization. In this paper, we propose a Multiple Instance Learning (MIL) approach that selects anchors and jointly optimizes the two modules of a CNN-based object detector. Our approach, referred to as Multiple Anchor Learning (MAL), constructs anchor bags and selects the most representative anchors from each bag. Such an iterative selection process is potentially NP-hard to optimize. To address this issue, we solve MAL by repetitively depressing the confidence of selected anchors by perturbing their corresponding features. In an adversarial selection-depression manner, MAL not only pursues optimal solutions but also fully leverages multiple anchors/features to learn a detection model. Experiments show that MAL improves the baseline RetinaNet with significant margins on the commonly used MS-COCO object detection benchmark and achieves new state-of-the-art detection performance compared with recent methods. + +# 1. Introduction + +Convolutional Neural Network (CNN) based object detectors have achieved unprecedented advances in the past few years [9, 8, 27, 25, 21, 17, 18]. In both recent two-stage and single-stage object detectors, the bounding box classification and localization modules are highly integrated: they + +![](images/8c068c231de6bf52c2baf1876693fd44153b0e435ab1b0136d362b97bd2ad7be.jpg) + +![](images/1cec7c309b68ddb595cfc410455e6d8c08661640768841b00c7de97216790c0f.jpg) + +![](images/1ccf24f5449fd60d386262ea2a2218818aa5b154523a080a976cf72ab1fecf88.jpg) +(a) Baseline + +![](images/f5121276ebee95553ee25ae26c6b84535ccf53c8a9a1df344758af9a2250851f.jpg) +(b) MAL +Figure 1: Detection outputs of the baseline detector (RetinaNet) and the Multiple Anchor Learning (MAL), before and after NMS. The baseline detector may produce bounding boxes with high localization IoU with a low classification score (the yellow bbox), or low localization IoU with a high classification score (the red bbox), which lead to suboptimal results after NMS. MAL produces bounding boxes with high co-occurrence of top classification and localization, leading to better detection results after NMS. + +are conducted on the shared local features, and are optimized over the sum of the loss functions. + +To provide rich candidates of shared local features, a prevalent approach is the introduce hand-crafted dense anchors [18] on the convolutional feature maps. These anchors create a uniform distribution of bounding box scales and aspect ratios, enabling objects with various scales and + +aspect ratios to be equally represented in training a detector. + +However, optimization under a fixed set of hand-crafted anchors significantly limits the possibility to jointly optimize classification and localization. During training, detectors leverage spatial alignment, i.e., Intersection over Unit (IoU) between objects and anchors, as the sole criterion to assign anchors. Each assigned anchor independently supervises network learning for classification and localization. Without direct interactions of the two optimizations, the detections of accurate localization may have lower classification confidence, and be suppressed by the following Non-Maximum Suppression (NMS) procedure (see the baseline example in Fig. 1). + +Recent remedy for the problem includes IoU-Net [13] and FreeAnchor [34]. However, it remains using independent classification and localization confidence during the training procedure. FreeAnchor selects anchors according to a joint probability over classification and localization. Nevertheless, the matching procedure based on maximum likelihood estimation (MLE) is not optimal considering the non-convexity of the problem. + +In this paper, we present Multiple Anchor Learning (MAL), an automatic anchor learning approach that jointly optimizes object classification and localization from the perspective of anchor-object matching. In training phase of MAL, an anchor bag for each object is constructed by choosing the top ranked anchor with IoUs between anchors and the object bounding box. MAL evaluates positive anchors in each bag by combining their classification and localization scores. In each training iteration, MAL uses all positive anchors to optimize the training loss but selects the high/top-scored anchors as the solutions. This leads to high co-occurrence of top classification and localization (see the MAL example in Fig. 2). + +MAL is optimized over an anchor selection loss based on Multiple Instance Learning (MIL) [23]. However, the iterative selection process under conventional MIL is potentially NP-hard to optimize. Selecting the top-scored instance (anchor) in each learning iteration could produce sub-optimal solutions, e.g., falsely localized object parts. To address this issue, we solve MAL by repetitively depressing the confidence of top-scored anchors by perturbing their features, which tends to that potential optimal solutions, i.e., positive anchors of lower confidence, have an opportunity to participate in learning. By upgrading the supervision from independent anchors to multiple anchors, MAL fully leverages multiple anchors/features to learn a better detector. The contributions of this work include: + +- We propose an Multiple Anchor Learning (MAL) approach, jointly optimizing classification and localization modules for object detection by evaluating and selecting anchors. +- We propose a selection-depression optimization strategy, providing an elegant-yet-effective way to prevent + +MAL from getting stuck into sub-optimal solutions during detector training. + +- We improve state-of-the-arts with significant margins on the commonly used MS COCO dataset. + +# 2. Related Work + +Various taxonomies [20] have been used to categorize the large amount of CNN-based object detection methods, e.g., one-stage [27] vs. two-stage [18], single-scale features [27] vs. multi-scale representation [17, 16, 24], and handcrafted architectures [21] vs. Network Architecture Search (NAS) [7]. In this paper, we review the related works from the perspective of object localization. + +# 2.1. Anchor-Based Method + +Training a detector requires to generate a set of bounding boxes along with their classification labels associated with the objects in an image. However, it is not trivial for CNNs to directly predict an order-less set of arbitrary cardinals [32]. One commonly used strategy is to introduce anchors, which employs a divide-and-conquer strategy to match objects with convolutional features, spatially. + +Anchor Assignment. Anchor-based detection methods include the well-known Faster R-CNN [27], FPN [17], RetinaNet [18], SSD [21], DSSD [6], andYOLO [26]. In these detectors, a large amount of anchors are scattered over convolutional feature maps so that they can match objects of various aspect ratios and scales. During training, the anchors are assigned to objects (positive anchors) or backgrounds (negative anchors) by threshold their IoUs with the ground-truth bounding boxes [27]. During inference, anchors independently predict object bounding boxes, where the box with the highest classification score is retained after the NMS procedure. + +Despite of the simplicity, these approaches rely on the assumption that anchors are optimal for both object classification and localization. For objects of partially occlusion and irregular shapes, however, such heuristics are implausible and they could miss the best anchors/features [34]. + +Anchor Optimization. To pursue optimal feature-object matching, MetaAnchor [32] learns to predict anchors from the arbitrary customized prior boxes with a subnet. GuidedAnchoring [31] leverages semantic features to guide the prediction of anchors while replacing dense anchors with predicted anchors. FreeAnchor [34] upgrades handcrafted anchor assignment to "free" anchor matching. This approach formulates detector training as a maximum likelihood estimation (MLE) procedure. Its goal is to learn features that best explain a class of objects in terms of both classification and localization. IoU-Net [13] selects anchors while predicting the IoU between a detected bounding box and a ground-truth box. Combined with an + +![](images/e3532e60b5a605172f79a14b7744c689765efbc03cb0e4ec30ba0190f5cbfa47.jpg) +Figure 2: The main idea of MAL. In the feature pyramid network, an anchor bag $A_{i}$ is constructed for each object $b_{i}$ . Together with the network parameter learning, i.e., back-propagation, MAL evaluates the joint classification and localization confidence of each anchor in $A_{i}$ . Such confidence is used for anchor selection and indicates the importance of anchors during network parameter evolution. + +IoU-guided NMS, IoU-Net reduces the suppression failure caused by the misleading classification confidences. Gaussian YOLO [3] introduces localization uncertainty that indicates the reliability of anchors/bounding boxes. By using the estimated localization uncertainty during inference, this approach improves classification and localization accuracy. + +All above approaches have taken some steps towards anchor learning. Nevertheless, how to efficiently select optimal anchors remains to be further elaborated. Considering a non-convex objective function which could cause sub-optimal solutions, we propose an adversarial selection-depression strategy to alleviate this issue. + +# 2.2. Anchor-Free Method + +Instead of using anchors as bases to conduct detection, researchers have recently explored anchor-free approaches, which operates on individual cells of the convolutional feature maps. FCOS leverages cell-level supervision and center-ness bounding-box regression [29] for object detection. CornerNet [15] and CenterNet [5] replace bounding box supervision with key-point supervision. Extreme point [35] and RepPoint [33] use point sets to predict object bounding boxes. + +As a new direction for object detection, anchor-free methods show great potential for extreme object scales and aspect ratios, without constraints set by hand-craft anchors. However, without the anchor box as the reference point, direct regression of bounding boxes from convolutional features remains a very challenging problem. As an anchor-based approach, MAL outperforms the current top anchor-free detectors such as CenterNet and CornerNet. + +# 3. The Proposed Approach + +MAL is implemented based on RetinaNet [18] network architecture. MAL upgrades RetinaNet by finding optimal selection of anchors/features for both classification and localization. In what follows, we briefly revisit RetinaNet on + +its original mechanism in object classification and localization. We then elaborate how MAL improve classification and localization by evaluating anchors. We finally propose an anchor selection-depression strategy to pursue optimal solutions of MAL. + +# 3.1. RetinaNet Revisit + +RetinaNet is a representative architecture of single-stage detectors with state-of-the-art performance. A RetinaNet detector is made up of a backbone network and two subnets, one for object classification and other for object localization. Feature Pyramid Network (FPN) is used at the end of RetinaNet backbone network. From each feature map in the feature pyramid, a classification subnet predicts category probabilities while a box regression subnet predicts object locations using anchor boxes as the reference locations. The input features of the two subnets are shared across the feature pyramid levels for efficiency. Considering the extreme imbalance of foreground-background classes, presented as positive-negative anchors after anchor-object matching, Focal Loss is adopted to prevent the vast number of easy negatives from overwhelming the detector during training. + +Let $x \in \mathcal{X}$ be an input image with label $y \in \mathcal{Y}$ , where $\mathcal{X}$ is the training image set and $\mathcal{Y}$ is the label set of the categories. Without loss of generality, denote $B$ as the ground-truth bounding boxes of the objects in a positive image. $b_{i} \in B$ consists of the class label $b_{i}^{cls}$ and the spatial position $b_{i}^{loc}$ . The classification confidence $a_{j}^{cls}$ and bounding-box output $a_{j}^{loc}$ of the anchor $a_{j}$ are predicted by the classification and the box regression subnets, respectively. The anchors in an image are divided into positive ones $a_{j+}$ if their IoUs with the ground-truth boxes are larger than a threshold, and negative ones $a_{j-}$ otherwise. Anchors are used to supervise network learning, as + +$$ +\theta^ {*} = \arg \max _ {\theta} \left(f _ {\theta} \left(a _ {j +}, b _ {i} ^ {c l s}\right) - \gamma f _ {\theta} \left(a _ {j -}, b _ {i} ^ {c l s}\right)\right), \tag {1} +$$ + +where $f_{\theta}(\cdot)$ denotes the classification procedure, and $\gamma$ is + +![](images/bf1adb2fa6bf1681e5124c0197dedfd11c048888b56187543b68f112b7d9e2c7.jpg) +Figure 3: MAL implementation. During training, it includes the additional anchor selection and anchor depression modules added to RetinaNet. During test, it uses exactly the same architecture as RetinaNet. “ $U$ ” and “ $V$ ” respectively denote convolutional feature maps before and after depression. “ $M$ ” and “ $M'$ ” respectively denote an activation map before and after depression. + +a factor to balance the importance of negative/positive anchors. Simultaneously, positive anchors are used to optimize the object localization, as + +$$ +\theta^ {*} = \arg \max _ {\theta} g _ {\theta} \left(a _ {j +}, b _ {i} ^ {l o c}\right), \tag {2} +$$ + +where $\theta$ denotes the network parameters, and $g_{\theta}(\cdot)$ denotes the bounding-box regression procedure. Eq. 1 and Eq. 2 are actually implemented by minimizing the Focal Loss, $\mathcal{L}_{cls}(a_j,b_i^{cls})$ , and the Smooth-L1 loss, $\mathcal{L}_{loc}(a_j,b_i^{loc})$ , + +During network learning, each assigned anchor independently supervises the learning for object classification and object localization, without considering whether the detection and localization are compatible on assigned anchors. This could cause the anchors of accurate localization but with lower classification confidence to be suppressed by the following Non-Maximum Suppression (NMS) procedure. + +# 3.2. Multiple Anchor Learning + +To alleviate the drawbacks of independent anchor optimization, we propose the Multiple Anchor Learning (MAL) approach, Fig. 2. In each learning iteration, MAL selects high-scored instances in an anchor bag to update the model. After updating, the model evaluates each instance with new confidence. Model learning and anchor selection iteratively perform towards final optimization. + +To fulfill this purpose, we first construct an anchor bag $A_{i}$ for the $i^{th}$ object. The anchor bag includes the top- $k$ anchors according to the IoUs between the anchors and the ground truth. Together with network parameter learning, i.e., back-propagation, MAL evaluates the joint classification and localization confidence of each anchor in $A_{i}$ . Such confidence is used for anchor selection and indicates the importance of anchors during network parameter evolution. For simplicity, consider solely the learning upon positive anchors, while that for negative anchors follows Eq. 1. + +MAL has the following objective function: + +$$ +\begin{array}{l} \left\{\theta^ {*}, a _ {i} ^ {*} \right\} = \arg \max _ {\theta , a _ {j} \in A _ {i}} F _ {\theta} \left(a _ {j}, b _ {i}\right) \\ = \arg \max _ {\theta , a _ {j} \in A _ {i}} f _ {\theta} \left(a _ {j}, b _ {i} ^ {c l s}\right) + \beta g _ {\theta} \left(a _ {j}, b _ {i} ^ {l o c}\right), \tag {3} \\ \end{array} +$$ + +where $f_{\theta}(.)$ and $g_{\theta}(.)$ give the classification and localization scores, respectively, and $\beta$ is a regularization factor. It is towards selecting a best positive anchor $a_{i}^{*}$ for the $i^{th}$ object, as well as learning the network parameters $\theta^{*}$ . + +The objective function defined in Eq. 3 is converted to a loss function as: + +$$ +\begin{array}{l} \left\{\theta^ {*}, a _ {i} ^ {*} \right\} = \arg \min _ {\theta , a _ {j} \in A _ {i}} \mathcal {L} _ {d e t} \left(a _ {j}, b _ {i}\right) \\ = \arg \min _ {\theta , a _ {j} \in A _ {i}} \mathcal {L} _ {c l s} \left(a _ {j}, b _ {i} ^ {c l s}\right) + \beta \mathcal {L} _ {r e g} \left(a _ {j}, b _ {i} ^ {l o c}\right), \tag {4} \\ \end{array} +$$ + +where $\mathcal{L}_{cls}$ and $\mathcal{L}_{reg}$ are the classification and detection losses, respectively, as defined in Section 3.1. The loss for negative anchors follows the Focal Loss defined in [18]. + +# 3.3. Selection-Depression Optimization + +Optimizing Eq. 3 or Eq. 4 with Stochastic Gradient Descent (SGD) is a non-convex problem, which could cause a sub-optimal anchor selection. To alleviate the problem and select optimal anchors, we propose repetitively depressing the confidence of selected anchors by perturbing their corresponding features. Such a learning strategy, referred to as selection-depression optimization, solves the MAL problem in an adversarial manner. + +Anchor Selection. According to $F_{\theta}(a_j, b_i)$ , the conventional MIL algorithm tends to select the top-scored anchor. Nevertheless, in the context of object detection, selecting a top-scored anchor from each bag is difficult, as validated by the continuation MIL method [30]. Instead of selecting the highest-scored anchor in Eq. 3 in the training phase, we propose an "All-to-Top-1" anchor selection strategy from each + +anchor bag for back-propagation. When learning proceeds, we linearly decrease the number from $|A_i|$ (number of anchors in a bag) to 1. Formally, let $\lambda = t / T$ , where $t$ and $T$ are the current and total numbers of iterations for training. Then let $\phi(\lambda)$ indicate the indices of high-ranked anchors and $|\phi(\lambda)| = |A_i| * (1 - \lambda) + 1$ . Finally, Eq. 3 is re-written as: + +$$ +\left\{\theta^ {*}, a _ {i} ^ {*} \right\} = \arg \max _ {\theta , a _ {j} \in A _ {i}} \sum_ {j \in \phi (\lambda)} F _ {\theta} (a _ {j}, b _ {i}), \tag {5} +$$ + +Along this pipeline, MAL leverages multiple anchors/features within the object region to learn a detection model in early training epochs, and converges to use a single optimal anchor at the last epoch. + +Anchor Depression. Inspired by the inverted attention network [12], we developed an anchor depression procedure to perturb the features of selected anchors in order to decrease their confidence (see more Fig. 3). To further optimize the training losses, MAL is forced to learn stronger features for selected anchors. The rational is to endow unselected anchors with extra chances to participate the training. Formally, we denote the feature map and the attention map as $U$ and $M$ , where $M$ is computed as $M = \sum_{l} w_{l} * U_{l}$ with $w$ being the global average pooling of $U$ and $l$ being the channel index of $U$ . We then generate a new depressed attention map $M' = (1 - \mathbb{1}_{P}) * M$ by cutting down the high values to zero, where $\mathbb{1}$ is the 0-1 indicator function. and $P$ is the high-value position. The feature map is perturbed as: + +$$ +V = \left(\mathbf {1} + M ^ {\prime}\right) \circ U _ {l}, \tag {6} +$$ + +where $\mathbf{1}$ is the identity matrix and $\circ$ denotes the elementwise multiplication. With the continuation strategy, the depression in Eq. 6 is reformulated as: + +$$ +V = \left(\mathbf {1} + \left(1 - \mathbb {1} _ {\psi (\lambda)}\right) * M\right) \circ U _ {l}, \tag {7} +$$ + +where $\psi (\lambda)$ indicates how many pixels to be perturbed. + +# 3.4. Implementation + +The implementation of an MAL detector is based on the RetinaNet detector where the features of the input image are extracted by a FPN backbone [17]. The anchor generation settings are the same as those of RetinaNet, i.e., 9 anchors with three sizes $\{2^0, 2^{1/3}, 2^{2/3}\}$ and three aspect ratios $\{1:2, 1:1, 2:1\}$ for each pixel on the feature maps. Across the levels, the anchors cover the scale range from 32 to 813 pixels with respect to the input image. + +During the feed-forward procedure of the network training, we calculate the detection confidence of each anchor, $F_{\theta}(a_j,b_i)$ , to minimize the detection loss defined in Eq. 4. According to the confidence, top- $k$ anchors are selected. The network parameters are then updated under the supervision of the selected anchors. After anchor selection, anchor + +![](images/c0837acf3842b2f70beb7526ed7db669e02408a79589203a43e5444d63f809a3.jpg) +Figure 4: Optimization analysis. In the first curve, MAL selects a sub-optimal anchor and gets stuck into a local minimum. In the second curve, anchor depression increases the loss so that MAL continues the optimization. In this way, MAL has a greater chance to find optimal solutions. + +![](images/33645d1c775bce0844bbab6b0dc2e18d8c3986b7b427544b7dfb65110039e9ed.jpg) + +depression is carried out, as described in Section 3.3. In the next iteration, anchor selection is carried out again to select high-scored anchors. + +The inference procedure of our approach is exactly the same as RetinaNet, i.e., we use the learned network parameters to predict classification scores and object bounding boxes, which are fed to a NMS procedure for object detection. As MAL is only applied in the detector training procedure to learn more representative features, our learned detector achieves performance improvement with negligible additional computation cost. + +# 3.5. Optimization Analysis + +The anchor selection-depression strategy approximates an adversarial procedure. The selection operation finds top-scored anchors that minimize the detection loss $\mathcal{L}_{det}$ . The depression operation perturbs the corresponding features of selected anchors so that their confidence decreases and the detection loss increases again. The selection-depression strategy helps the learner find better solutions for the nonconvex objective function of MAL. As illustrated by the first curve of Fig. 4, MAL selects a sub-optimal anchor and gets stuck into a local minimum of the loss function. In the second curve, the anchor depression increases the loss, so that the local minimum is "filled". Consequently, MAL continues to find the next local minimum. After learning converges, MAL has a better chance to find optimal solutions. + +# 4. Experiments + +In this section, we present experimental results of the proposed Multiple Anchor Learning approach on the bounding-box detection track of the challenging COCO + +benchmark [19]. We follow the common practice and use $\sim 118\mathrm{k}$ images for training, $5\mathrm{k}$ for validation and $\sim 20\mathrm{k}$ for testing without provided annotations (test-dev). AP is computed over ten different IoU thresholds, i.e., 0.5: 0.05: 0.95, with all categories. It is the commonly used evaluation metric for object detection. + +# 4.1. Experimental Setting + +We utilize ResNet-50, ResNet-101, and ResNeXt-101 with FPN as backbones. The batch normalization layers are fixed to be frozen in the training phase. We use a minibatch of 2 images per GPU, thus making a total mini-batch of 16 images on 8 GPUs. The initial learning rate is set to 0.01 and decreased by a factor of 10 after 90k and 120k for the 135k setting (ResNet-50), and 120k and 160k for the 180k setting (ResNet-101 and ResNeXt-101). The synchronized Stochastic Gradient Descent (SGD) is adopted for network optimization. The weight decay of 0.0001 and the momentum of 0.9 are used. A linear warmup strategy is adopted in the first 500 iterations. We set the weight parameter $\beta = 0.75$ experimentally. Following [34], we assign anchors to ground-truth using IoU threshold of 0.5, and to background if their IoUs are in [0, 0.4). + +# 4.2. Ablation Study + +For ablation study, we used ResNet-50 as the backbone. All detection performances were evaluated on the COCOMinval dataset (5k images). Firstly, we visualize the effectiveness of MAL in Fig. 5 on feature activation maps. Comparing MAL with RetinaNet, MAL activates more parts on the object and suppresses the more parts in the background. It demonstrates that MAL improved features for better object detection. + +Anchor Selection: Without the depression component of MAL, we evaluate the selection component individually first. We compare the results of different $k$ for anchor bag construction, as shown in Table 1a. The AP is stable when $k = 40, 50,$ or 60. We choose 50 anchors in the following experiments. The results of different anchor selection strategies are shown in Table 1b. It improves AP from $35.46\%$ to $38.14\%$ when anchor bags are used instead of the scattered anchors in RetinaNet, as $\mathrm{MAL} + \mathrm{S}(\mathrm{all})$ in Table 1b. In the RetinaNet, if an anchor is with good localization but without the highest score, it does not affect the network parameters. While using the anchor bags, this kind of anchor has potential to be selected for detector learning. By the continuation optimization which selects all anchors at the beginning and gradually reduces the selected anchors to the top-1, the performance is further improved to $38.39\%$ as $\mathrm{MAL} + \mathrm{S}(\mathrm{all - top1})$ in Table 1b. It verifies that continuation optimization is also efficient in MAL. + +Anchor Depression: We only add the depression component to RetinaNet to find the preferable indicator func + +![](images/9f0371ff4fe372ceb5c3c97da1089be5ca0f3a79118ddc91529be2c3c9f35dde.jpg) + +![](images/8c89a6778472d399f9d72f334485a586a632f67fbbdf82dd349e6484b24d5652.jpg) + +![](images/16cbaf9e18a3624a209cd4aa11b6d1910a64053072fef30bddce16a11dab93d4.jpg) + +![](images/82560034a610897151e109ff57c674cc1cb0ab82f9c9293da30cd56c701cfaa9.jpg) + +![](images/890c9b522342f3297611553f17560a7abdb8c55126e9178021141f5e760f98b5.jpg) +10k + +![](images/b7a132f4b21654a6f8186dd0efcf262c7fe62294a62341a3a2371237c8fc964b.jpg) + +![](images/31eee2a6f72742a03c9ad48762b5277b58cd6b016a2cd07954d7f30ec3e28c34.jpg) + +![](images/3c9718ad6df2c985151c9dc13196bdeadc024358df93e2186978c1379b2b06f6.jpg) + +![](images/06ee1c76d7ad55975bb131bfe26c6cfd86506c7fd58526b4126c86e78a6652ad.jpg) +#50k +Figure 5: The activation map comparison between RetinaNet (the first and third rows) and MAL (the second and fourth rows). The attention maps at the $10\mathrm{k}$ , $50\mathrm{k}$ and $90\mathrm{k}$ iterations are overlaid on input images. As highlighted by red boxes at the $90\mathrm{k}th$ iteration, MAL gets better attention maps which activate more parts in the bicycle image and suppress irrelevant parts in the cat image. + +![](images/1f6d15e52f351bc934d4255b75c3bc2698aa0d9ee739393cb99b661ea30a51dc.jpg) + +![](images/2a07bdd7536d98e0301f783eaa3d0e208170c1cfa45549c62fc4798f890271ca.jpg) + +![](images/9be01fd9fb11d3cb19ae087dc5f0c46cb7e52d982a66dd353f023e89a232ec40.jpg) + +![](images/4a7798d53d9da26b6fb443d5cbb9fde96feddf4ebd41793d908ef89cc7795a36.jpg) +#90k + +tion $\psi (\lambda)$ . We employ three kinds of indicator function. The first one is the constant function, which means keeping the same depression ratio in the whole training phase. We depress the top $50\%$ pixels in the attention map. The AP decreases a little from $35.46\%$ to $35.25\%$ , as MAL+D(constant) shown in Table 1c. The reason is that at the beginning of the training phase, the parameters of the network are randomly initialized, and the depression is meaningless for the adversarial learning. If a step function is utilized for $\psi (\lambda)$ , which increases the depression part from $0.0\%$ to $50.0\%$ by step, the performance is increased to $35.88\%$ , as MAL+D(step) shown in Table 1c. It illustrates that the detector should be optimized in a way before depression. The third one is the symmetric step function, which increases the depression part from $0.0\%$ to $50\%$ and then decreases it from $50\%$ to $0.0\%$ . It achieves the best performance of $36.18\%$ , as MAL+D(symmetric step) shown in Table 1c. + +Selection-Depression: The efficient combination of selection and depression is shown in Fig. 6. We compare the AP, $\mathrm{AP}_{75}$ , and $\mathrm{AP}_{50}$ . The AP is increased to $36.2\%$ with the depression component and to $38.4\%$ with the selection component. When the adversarial manner is taken between selection and the depression, the AP is further improved to $39.2\%$ , which is $3.7\%$ (35.5% vs. $39.2\%$ ) performance gain compared with the original RetinaNet. The $\mathrm{AP}_{75}$ and $\mathrm{AP}_{50}$ have the same trend of growth as the AP. + +Localization Improvement: In Fig. 7, we show an error factor analysis [2] of the localization results. It can be seen that poor localization (Loc) hinders the improvement of detection performance for objects of irregular shapes, i.e., tilted and slender objects. Compared with the baseline + +
MethodAP\( AP_{50} \)\( AP_{75} \)
MAL(k=40)38.2756.6740.81
MAL(k=50)38.3956.8141.14
MAL(k=60)38.0856.1140.18
+ +(a) Detection performance upon different anchor numbers $k$ in each anchor bag. + +
MethodAP\( AP_{50} \)\( AP_{75} \)
RetinaNet35.4651.6139.37
MAL+S(all)38.1456.8140.81
MAL+S(all-top1)38.3956.8141.14
+ +(b) Anchor selection strategy $\phi (\lambda)$ . "S" denotes "Selection". We compare selecting all instances and all-top1 instance. + +
MethodAP\( AP_{50} \)\( AP_{75} \)
MAL+D(constant)35.2551.7238.92
MAL+D(step)35.8852.3439.63
MAL+D(symmetric step)36.1852.6639.88
+ +(c) Depression strategy $\psi (\lambda)$ . "D" denotes "Depression". The constant function, step function, and symmetric step function are compared. + +![](images/65ae6d56b5f775b13a18b5290b876ac9f2bb27cf69ca68372f02dfc8e8366394.jpg) +Figure 6: Ablation studies of the anchor selection and depression modules on the COCO-minval dataset. On the metrics AP, $AP_{75}$ and $AP_{50}$ , MAL outperforms the baseline detector (RetinaNet) with significant margins. "S" and "D" respectively denote "Selection" and "Detection". + +
MethodBackboneAP\( AP_{50} \)\( AP_{75} \)
RetinaNet [18]ResNet-5035.551.639.4
MAL (ours)ResNet-5039.258.042.3
RetinaNet [18]ResNet-10139.159.142.3
MAL (ours)ResNet-10143.662.847.1
RetinaNet [18]ResNeXt-10140.861.144.1
MAL (ours)ResNeXt-10145.965.449.7
+ +Table 2: Performance comparison with the baseline method (single-scale results) on the MS-COCO test-dev dataset. MAL improves the baseline with significant margins. + +method, MAL significantly reduces the localization error (blue part in Fig. 7) of these objects. For instance, the area under curve (AUC) decreases from $15.7\%$ ( $45.5\% - 29.8\%$ ) to $11.6\%$ ( $58.7\% - 47.1\%$ ) for the toothbrush category and from $13.6\%$ ( $63.3\% - 49.7\%$ ) to $10.6\%$ ( $74.8\% - 64.2\%$ ) for the kite category. + +# 4.3. Comparison with State-of-the-Art Detectors + +Keeping the best setting in the ablation study, we compare the proposed MAL with the baseline, i.e., RetinaNet, in Table 2. For ResNet-50, MAL improves the baseline from $35.5\%$ to $39.2\%$ with $3.7\%$ improvement. For ResNet101 and ResNeXt-101, the improvements are $4.5\%$ and $4.1\%$ , respectively. It illustrates that MAL achieves reliable + +![](images/320b8a587975e139783f16fdaa17a6cd8cfe5c499c83132c9cc9acbcc4c87c8c.jpg) +Table 1: Ablation study on the COCO minval dataset with the backbone ResNet50. We show the AP, $\mathrm{AP}_{50}$ , and $\mathrm{AP}_{75}$ (\%). + +![](images/f25b7970c007936087a0b96f09c3f3a92f2c681f61b6882b959df10daaf5b9f1.jpg) +(c) Baseline (label=kite) + +![](images/1d4cc088a09f5cdd811b8129b20636060b165536c416ff7221545aec2bedbfb3.jpg) + +![](images/a7d6b3c46fdfc492f71a769632acaf5d6323f6c0e5a7508d2bbad5c4f9d24949.jpg) +(d) MAL (label=kite) +Figure 7: Quantitative evaluation of detection performance. Top row: performance comparison on toothbrush detection. Bottom row: performance summary for the kit category. + +gains with various of backbones. + +In Table 3, MAL is compared with the state-of-the-art detectors of two-stage methods and one-stage methods on the MS COCO test dataset, which are arranged in the increasing order of AP. For fair comparison, we re-scale the images such that their shorter sides are 800 pixels and the longer sides not more than 1333 pixels. + +For one-stage methods, we compare the state-of-the-art including YOLO [25, 26], SSD [21], FCOS [29], FreeAnchor [34] and CenterNet [5]. With the ResNet-101 backbone, MAL achieves $43.6\%$ AP of single-scale, which outperforms the anchor-free approach FCOS [29] by $2.1\%$ $(43.6\%$ vs. $41.5\%)$ . With the ResNeXt-101 backbone, MAL achieves $45.9\%$ AP of single scale, which achieves $1.1\%$ $(45.9\%$ vs. $44.8\%)$ gain compared with the recent FreeAnchor [34]. It also outperforms state-of-the-art CenterNet [5] by $1.0\%$ AP $(45.9\%$ vs. $44.9\%)$ . Note that CenterNet uses the Hourglass-104 backbone which has much more network parameters than ResNeXt-101. These are significant margins for the challenging object detection task. The multi-scale testing APs of MAL are further improved to $45.0\%$ and $47.0\%$ with ResNet-101 and + +
MethodBackboneAP\( AP_{50} \)\( AP_{75} \)\( AP_S \)\( AP_M \)\( AP_L \)
Two-stage methods
Faster R-CNN+++ [11]ResNet-10134.955.737.415.638.750.9
Faster R-CNN w FPN [17]ResNet-10136.259.139.018.239.048.2
Faster R-CNN w TDM [28]Inception-ResNet-v2-TDM36.857.739.216.239.852.1
Deformable R-FCN [4]Inception-ResNet-v237.558.040.819.440.152.5
Mask R-CNN [10]ResNeXt-10139.862.343.422.143.251.2
IoU-Net [13]ResNet-10140.659.0----
Cascade RCNN [1]ResNet-10142.862.146.323.745.555.2
Grid R-CNN w/ FPN [22]ResNeXt-10143.263.046.625.146.555.2
One-stage methods
YOLOv2 [25]DarkNet-1921.644.019.25.022.435.5
SSD513 [21]ResNet-10131.250.433.310.234.549.8
YOLOv3 [26]Darknet-5333.057.934.418.335.441.9
DSSD513 [21]ResNet-10133.253.335.213.035.451.1
GA-RetinaNet [31]ResNet-5037.156.940.020.140.148.0
MetaAnchor [32]ResNet-5037.9-----
RetinaNet [18]ResNet10139.159.142.321.842.750.2
CornerNet [15]Hourglass-10440.656.443.219.142.854.3
RetinaNet [18]ResNeXt-10140.861.144.124.144.251.2
FCOS [29]ResNet-10141.560.745.024.444.851.6
FoveaBox [14]ResNeXt-10142.161.945.224.946.855.6
AB+FSAF [36]ResNeXt-10142.963.846.326.646.252.7
FreeAnchor [34]ResNeXt-10144.864.348.427.047.956.0
CenterNet [5]Hourglass-10444.962.448.125.647.457.4
ours
MALResNet-10143.662.847.125.046.955.8
MALResNeXt-10145.965.449.727.849.157.8
MAL (multi-scale)ResNet-10145.063.748.928.048.057.0
MAL (multi-scale)ResNeXt-10147.066.151.230.250.158.9
+ +Table 3: Performance comparison with the state-of-the-art methods on the MS-COCO test-dev dataset (single-scale results unless explicitly stated). MAL achieves new state-of-the-art performance. As a one-stage detector, MAL also outperforms most two-stage detectors. + +# ResNeXt101, respectively. + +Table 3 also compares MAL with representative two-stage detectors including Faster-RCNN with FPN [17], Mask R-CNN [10], IoU-Net [13], and Grid R-CNN [22]. MAL outperforms most two-stage detectors. Particularly, it outperforms the recent Grid R-CNN detector by $2.7\%$ (45.9 vs. $43.2\%$ ) with the same backbone. As a one-stage detector with simpler implementation, MAL shows great potential to surpass two-stage detectors. + +# 5. Conclusion + +We have proposed an elegant and effective training approach, referred to as Multiple Anchor Learning (MAL), for visual object detection. By selecting anchors to jointly optimize bounding box classification and localization, MAL upgrades the standard hand-crafted anchor assignment mechanism to a learnable object-anchor matching mechanism. We proposed a simple selection-depression strategy to al + +leviate the sub-optimization issue of MAL. MAL improved object detection with significant margins compared with the baseline detector RetinaNet, achieves the best result on MSCOCO among single-stage methods, and outperforms many recent two-stage approaches. Such improvements root in not only the optimal selection of anchors but also implicit feature assembling based on a bag of anchors. Our work presents a promising direction to relax anchor design in learning a visual object detection. + +# Acknowledgement + +This work was partially supported by the Intelligence Advanced Research Projects Activity (IARPA) via Department of Interior/ Interior Business Center (DOI/IBC) contract number D17PC00340. This work was also supported in part by the National Natural Science Foundation of China under Grant 61836012 and 61671427. + +# References + +[1] Zhaowei Cai and Nuno Vasconcelos. Cascade r-cnn: Delving into high quality object detection. In IEEE CVPR, pages 6154-6162, 2018. 8 +[2] Kai Chen, Jiaqi Wang, Jiangmiao Pang, Yuhang Cao, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jiarui Xu, Zheng Zhang, Dazhi Cheng, Chenchen Zhu, Tianheng Cheng, Qijie Zhao, Buyu Li, Xin Lu, Rui Zhu, Yue Wu, Jifeng Dai, Jingdong Wang, Jianping Shi, Wanli Ouyang, Chen Change Loy, and Dahua Lin. MMDetection: Open mmlab detection toolbox and benchmark. arXiv:1906.07155, 2019. 6 +[3] Jiwoong Choi, Dayoung Chun, Hyun Kim, and Hyuk-Jae Lee. Gaussian yolov3: An accurate and fast object detector using localization uncertainty for autonomous driving. In IEEE ICCV, pages 502-511, 2019. 3 +[4] Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable convolutional networks. In IEEE ICCV, page 764-773, 2017. 8 +[5] Kaiwen Duan, Song Bai, Lingxi Xie, Honggang Qi, Qingming Huang, and Qi Tian. Centernet: Object detection with keypoint triplets. In IEEE CVPR, 2019. 3, 7, 8 +[6] Cheng-Yang Fu, Wei Liu, Ananth Ranga, Ambrish Tyagi, and Alexander C. Berg. DSSD: Deconvolutional single shot detector. In arXiv preprint arXiv:1701.06659. 2 +[7] Golnaz Ghiasi, Tsung-Yi Lin, and Quoc V. Le. NAS-FPN: learning scalable feature pyramid architecture for object detection. In IEEE CVPR, pages 7036-7045, 2019. 2 +[8] Ross B. Girshick. Fast R-CNN. In IEEE ICCV, pages 1440-1448, 2015. 1 +[9] Ross B. Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In IEEE CVPR, pages 580-587, 2014. 1 +[10] Kaiming He, Georgia Gkioxari, Piotr Dolkar, and Ross B. Girshick. Mask R-CNN. In IEEE ICCV, pages 2980-2988, 2017. 8 +[11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE CVPR, pages 770-778, 2016. 8 +[12] Zeyi Huang, Wei Ke, and Dong Huang. Improving object detection with inverted attention. arXiv:1903.12255, 2019. 5 +[13] Borui Jiang, Ruixuan Luo, Jiayuan Mao, Tete Xiao, and Yun-ting Jiang. Acquisition of localization confidence for accurate object detection. In ECCV, pages 784–799, 2018. 2, 8 +[14] Tao Kong, Fuchun Sun, Huaping Liu, Yuning Jiang, and Jianbo Shi. Foveabox: Beyond anchor-based object detector. arXiv:1904.03797, 2019.8 +[15] Hei Law and Jia Deng. Cornernet: Detecting objects as paired keypoints. In ECCV, pages 765-781, 2018. 3, 8 +[16] Yanghao Li, Yuntao Chen, Naiyan Wang, and Zhaoxiang Zhang. Scale-aware trident networks for object detection. In IEEE ICCV, pages 502-511, 2019. 2 +[17] Tsung-Yi Lin, Piotr Dólar, Ross B. Girshick, Kaiming He, Bharath Hariharan, and Serge J. Belongie. Feature pyramid + +networks for object detection. In IEEE CVPR, pages 936-944, 2017. 1, 2, 5, 8 +[18] Tsung-Yi Lin, Priya Goyal, Ross B. Girshick, Kaiming He, and Piotr Dollar. Focal loss for dense object detection. In IEEE ICCV, pages 2999-3007, 2017. 1, 2, 3, 4, 7, 8 +[19] Tsung-Yi Lin, Michael Maire, Serge J. Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólár, and C. Lawrence Zitnick. Microsoft COCO: common objects in context. In ECCV, 2014. 6 +[20] Li Liu, Wanli Ouyang, XiaogangWang, Paul Fieguth, Jie Chen, Xinwang Liu, and Matti Pietikainen. Deep learning for generic object detection: A survey. Int. J. Comp. Vis., 2019. 2 +[21] 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. 1, 2, 7, 8 +[22] Xin Lu, Buyu Li, Yuxin Yue, Quanquan Li, and Junjie Yan. Grid R-CNN. In IEEE CVPR, 2019. 8 +[23] Oded Maron and Tomás Lozano-Pérez. A framework for multiple-instance learning. In NeurIPS, pages 570-576, 1997. 2 +[24] Junran Peng, Ming Sun, Zhaoxiang Zhang, Tieniu Tan, and Junjie Yan. Pod: Practical object detection with scale-sensitive network. In IEEE ICCV, pages 6054-6063, 2019. 2 +[25] Joseph Redmon, Santosh Kumar Divvala, Ross B. Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In IEEE CVPR, pages 779-788, 2016. 1, 7, 8 +[26] Joseph Redmon and Ali Farhadi. YOLO9000: better, faster, stronger. In IEEE CVPR, pages 6517-6525, 2017. 2, 7, 8 +[27] Shaoqing Ren, Kaiming He, Ross B. Girshick, and Jian Sun. Faster R-CNN: towards real-time object detection with region proposal networks. In NeurIPS, pages 91-99, 2015. 1, 2 +[28] Abhinav Shrivastava, Rahul Sukthankar, Jitendra Malik, and Abhinav Gupta. Beyond skip connections: Top-down modulation for object detection. arXiv:1612.06851, 2016. 8 +[29] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. Fcos: Fully convolutional one-stage object detection. arXiv:1904.01355, 2019. 3, 7, 8 +[30] Fang Wan, Chang Liu, Wei Ke, Xiangyang Ji, Jianbin Jiao, and Qixiang Ye. C-MIL: continuation multiple instance learning for weakly supervised object detection. In IEEE CVPR, pages 2199-2208, 2019. 4 +[31] Jiaqi Wang, Kai Chen, Shuo Yang, Chen Change Loy, and Dahua Lin. Region proposal by guided anchoring. In IEEE CVPR, pages 2965-2974, 2019. 2, 8 +[32] Tong Yang, Xiangyu Zhang, Zeming Li, Wenqiang Zhang, and Jian Sun. Metaanchor: Learning to detect objects with customized anchors. In NeurIPS, pages 320-330, 2018. 2, 8 +[33] Ze Yang, Shaohui Liu, Han Hu, Liwei Wang, and Stephen Lin. Repoints: Point set representation for object detection. In IEEE ICCV, pages 502-511, 2019. 3 +[34] Xiaosong Zhang, Fang Wan, Chang Liu, Rongrong Ji, and Qixiang Ye. FreeAnchor: Learning to match anchors for visual object detection. In NeurIPS, 2019. 2, 6, 7, 8 + +[35] Xingyi Zhou, Jiacheng Zhuo, and Philipp Krahenbuhl. Bottom-up object detection by grouping extreme and center points. In IEEE CVPR, pages 850-859, 2019. 3 +[36] Chenchen Zhu, Yihui He, and Marios Savvides. Feature selective anchor-free module for single-shot object detection. In IEEE CVPR, pages 840-849, 2019. 8 \ No newline at end of file diff --git a/multipleanchorlearningforvisualobjectdetection/images.zip b/multipleanchorlearningforvisualobjectdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..3731f2ff9ab6cd5630a173ecb8c82fde7935977d --- /dev/null +++ b/multipleanchorlearningforvisualobjectdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3dac263d2eb964f77002b0cbca9f6a1348dd24e382691efa5192422b4401a4c +size 658349 diff --git a/multipleanchorlearningforvisualobjectdetection/layout.json b/multipleanchorlearningforvisualobjectdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f42972f76dd68455ef0ec91fe34daff03e71c711 --- /dev/null +++ b/multipleanchorlearningforvisualobjectdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4afd73a66e686a70aadae0d6a9f57a6d05c814b46e8467cab9e31885398c089b +size 442232 diff --git a/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/562334c5-99e7-4640-a29b-df10a26e7edf_content_list.json b/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/562334c5-99e7-4640-a29b-df10a26e7edf_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..840acf03b955026a37cbe90fd58a5617cf2ca2d4 --- /dev/null +++ b/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/562334c5-99e7-4640-a29b-df10a26e7edf_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fab6d7537bf37dd6218fca9c52415eabea6a961d7fd66b8eee2c8b6864ef3de2 +size 68122 diff --git a/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/562334c5-99e7-4640-a29b-df10a26e7edf_model.json b/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/562334c5-99e7-4640-a29b-df10a26e7edf_model.json new file mode 100644 index 0000000000000000000000000000000000000000..5c65f468462e1c01a3337d2ef8123ecc61e62073 --- /dev/null +++ b/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/562334c5-99e7-4640-a29b-df10a26e7edf_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34c9754d8982430e70f8d7ad6c1c40a3ff43a9f5e7d75e34cb81aecfecb9071a +size 82030 diff --git a/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/562334c5-99e7-4640-a29b-df10a26e7edf_origin.pdf b/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/562334c5-99e7-4640-a29b-df10a26e7edf_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..84bb8c5e28f348b46cdad2f4b5901b9585ceb3f8 --- /dev/null +++ b/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/562334c5-99e7-4640-a29b-df10a26e7edf_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8367f0e6e8af63a15db941d168035a97202d4e884e01f7856ba9e35073227e7e +size 1259475 diff --git a/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/full.md b/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b3ab733ab0630a1b03983d632f702340f3cd4154 --- /dev/null +++ b/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/full.md @@ -0,0 +1,272 @@ +# Multi-scale Domain-adversarial Multiple-instance CNN for Cancer Subtype Classification with Unannotated Histopathological Images + +Noriaki Hashimoto $^{1\dagger}$ , Daisuke Fukushima $^{1\dagger}$ , Ryoichi Koga $^{1}$ , Yusuke Takagi $^{1}$ , Kaho Ko $^{1}$ , Kei Kohno $^{2}$ , Masato Nakaguro $^{2}$ , Shigeo Nakamura $^{2}$ , Hidekata Hontani $^{1}$ , Ichiro Takeuchi $^{1,3*}$ , $^{1}$ Nagoya Institute of Technology, $^{2}$ Nagoya University Hospital, $^{3}$ RIKEN + +# Abstract + +We propose a new method for cancer subtype classification from histopathological images, which can automatically detect tumor-specific features in a given whole slide image (WSI). The cancer subtype should be classified by referring to a WSI, i.e., a large-sized image (typically 40,000 $\times$ 40,000 pixels) of an entire pathological tissue slide, which consists of cancer and non-cancer portions. One difficulty arises from the high cost associated with annotating tumor regions in WSIs. Furthermore, both global and local image features must be extracted from the WSI by changing the magnifications of the image. In addition, the image features should be stably detected against the differences of staining conditions among the hospitals/specimens. In this paper, we develop a new CNN-based cancer subtype classification method by effectively combining multiple-instance, domain adversarial, and multi-scale learning frameworks in order to overcome these practical difficulties. When the proposed method was applied to malignant lymphoma subtype classifications of 196 cases collected from multiple hospitals, the classification performance was significantly better than the standard CNN or other conventional methods, and the accuracy compared favorably with that of standard pathologists. + +# 1. Introduction + +In this study, we propose a novel convolutional neural network (CNN)-based method for cancer subtype classification by using digital pathological images of hematoxylin-and-eosin (H&E) stained tissue specimens as inputs. Since a whole slide image (WSI) obtained by digitizing an entire pathological tissue slide is too large to feed into a CNN [22, 31, 18, 8], it is common to extract a large number of patches from the WSI [9, 12, 27, 37, 19, 34, 5, 38, 2, 17]. If it can be known whether each patch is a tumor region or + +not, the CNN can be trained by using each patch as a labeled training instance. However, the cost to annotate each of a large number of patch labels is too high. When patch label annotation is not available, cancer subtype classification tasks are challenging in the following three respects. + +The first difficulty is that tumor and non-tumor regions are mixed in a WSI. Therefore, when pathologists actually conduct subtype classification, it is necessary to find out which part of the slide contains the tumor region, and perform subtype classification based on the features of the tumor region. The second practical difficulty is that staining conditions vary greatly depending on the specimen conditions and the hospital from which the specimen was taken. Therefore, pathologists perform tumor region identification and subtype classification by carefully considering the different staining conditions. The last difficulty is that different features of tissues are observed when the magnification of the pathological image is changed. Pathologists conduct diagnosis by changing the magnification of a microscope repeatedly to find out various features of the tissues. + +In order to develop a practical CNN-based subtype classification system, our main idea is to introduce mechanisms that mimic these pathologist's actual practices. To address the above three difficulties simultaneously, we effectively combine multiple instance learning (MIL), domain adversarial (DA) normalization, and multi-scale (MS) learning techniques. Although each of these techniques has been studied in the literatures, we demonstrate that their effective and careful combination enables us to develop a CNN-based system that performs significantly better than the standard CNN or other conventional methods. + +We applied the proposed method to malignant lymphoma subtype classifications of 196 cases collected from 80 hospitals, and demonstrated that the accuracy of the proposed method compared favorably with standard pathologists. It was also confirmed that the proposed method not only performed better than conventional methods, but also performed subtype classification in a similar way to pathologists in the sense that the method correctly paid attention to tumor regions in images of various different scales. + +The main contributions of our study are as follows. First, we developed a novel CNN-based digital pathology image classification method by effectively combining MIL, DA and MS approaches. Second, we applied the proposed method to malignant lymphoma classification tasks with 196 WSIs of H&E stained histological tissue slides, collected for the purpose of consultation by an expert pathologist on malignant lymphoma. Finally, as a result of confirmation by immunostaining in the above malignant lymphoma subtype classification tasks, it was confirmed that the proposed method performed subtype classification by correctly paying attention to the true tumor regions from images at various different scales of magnification. + +# 2. Preliminaries + +Here we present our problem setup and three related techniques that are incorporated into the proposed method in the next section. In this paper, we use the following notations. For any natural number $N$ , we define $[N] := \{1, \ldots, N\}$ . We call a vector for which the elements are non-negative and sum-to-one a probability vector. Given two probability vectors $p, q$ , $\mathcal{L}(p, q)$ represents their cross entropy. + +# 2.1. Problem setup + +Consider a training set for a binary pathological image classification problem obtained from $N$ patients. We denote the training set as $\{(\mathbb{X}_n,\mathbb{Y}_n)\}_{n = 1}^N$ , where $\mathbb{X}_n$ is the whole slide image (WSI) and $\mathbb{Y}_n$ is the two-dimensional class label one-hot vector of the $n^{\mathrm{th}}$ patient for $n\in [N]$ . We also define a set of $N$ -dimensional vectors $\{\mathbb{D}_n\}_{n = 1}^N$ for which the $n^{\mathrm{th}}$ element is one and the others are zero. Since each WSI is too huge to directly feed into a CNN, a patch-based approach is usually employed. In this paper, we consider patches with $224\times 224$ pixels. + +In cancer pathology, since tumor and non-tumor regions are mixed, not all patches from a positive-class slide contain positive class-specific (tumor) information. Thus, we borrow an idea from multiple instance learning (MIL) (the detail of MIL will be described in § 2.2). Specifically, we consider a group of patches, and assume that each group from a positive class slide contains at least a few patches having positive class-specific information, whereas each group from a negative class slide does not contain any patches having positive-class specific information. Furthermore, when pathologists diagnose patients, they observe the glass slide at multiple different scales. To mimic this, we consider patches with multiple different scales. + +We denote the groups of patches at different scales as follows. We use the notation $s \in [S]$ to indicate the index of scales (e.g., if scales 10x and 20x are considered, $S = 2$ ). The set of groups (called bags in MIL framework) in the $n^{\text{th}}$ WSI is denoted by $\mathcal{B}_n$ for $n \in [N]$ . Then, each group + +(bag) $b \in \mathcal{B}_n$ is characterized by a set of patches (called instances in the MIL framework) $\mathcal{T}_b^{(s)}$ for $b \in \mathcal{B}_n$ and $s \in [S]$ , where the superscript $(s)$ indicates that these patches are taken from scale $s$ . Figure 1 illustrates the notions of a WSI, groups (bags), patches (instances), and scales. + +# 2.2. Multiple instance learning (MIL) + +Multiple-instance learning (MIL) is a type of weakly supervised learning problem, where instance labels are not observed but labels for groups of instances called bags are observed. In the binary classification setting, a positive label is assigned to a bag if the bag contains at least one positive instance, while a negative label is assigned to a bag if the bag only contains negative instances. Figure 2 illustrates MIL for a binary classification problem. Various models and learning algorithms for MIL have been studied in the literatures [14, 26, 40, 1, 24, 7, 36]. + +MIL has been successfully applied to classification problems with histopathological images [10, 13, 20, 11, 32, 6]. For example, for binary classification of malignant and benign patients, WSIs for malignant patients contain both malignant and benign patches, while WSIs for benign patients only contain benign patches. If we regard the WSIs for malignant/benign patients as positive/negative bags and malignant/benign patches as positive/negative instances, respectively, the above binary classification problem can be interpreted as an MIL problem. The MIL framework is useful in histopathological image classification when no annotation is made for each extracted patch. Our main idea in this paper is to use MIL framework in order to automatically identify multiple regions of interest at multiple different scales. + +# 2.3. Domain-adversarial neural network + +Slide-wise differences in staining conditions, as illustrated in Fig. 3, highly degrade the classification accuracy. To overcome this difficulty, appropriate pre-processing such as color normalization [30, 25, 21, 4, 39] or color augmentation [23, 29] would be required. Color normalization adjusts the color of input images to the target color distribution. Color augmentation suppresses the effect of outlying colors by generating augmented images while slightly changing the color of an original image. + +Domain-adversarial (DA) [15] training has been proposed to ignore the differences among training instances that do not contribute to the classification task. In the histopathological image classification setting, Lafarge et al. [23] introduced a DA training approach, and demonstrated that it was superior to color augmentation, stain normalization, and their combination. In the proposed method, we use a DA training approach within the MIL framework for histopathological image classification by regarding each patient as an individual domain so that the staining condition of each patient's slide can effectively be ignored. + +![](images/edd6c24fb43ffe145cbc202adf628aaf13698ea20910b86bc90602a39ce1cc91.jpg) +Figure 1: A brief illustration of the notions of a WSI, bags, instances (patches), and scales. A large number of $224 \times 224$ -pixel image patches are extracted from an entire WSI at multiple different scales. In the problem setup considered in this paper, instance class labels are not observed, but the class labels for groups of instances called bags are observed. It is important to note that each bag contains patches taken at multiple different scales. This enables us to detect multiple regions of interest from multiple different scale images. + +![](images/7fc00c571dccf28dd74027744ae926b376f895d2e9c4d7753232d41c49601236.jpg) +Figure 2: Explanation of MIL. Positive bags are generated from WSIs with positive subtype labels and negative bags are generated from WSIs with negative subtype labels. Only the image patches of class-specific regions, such as tumors in positive-class WSIs, are regarded as positive instances. + +# 2.4. Multi-scale pathology image analysis + +Pathologists observe different features at different scales of magnification. For example, global tissue structure and detailed shapes of nuclei can be seen at low and high scales of magnification, respectively. Although most of the existing studies on histopathological image analysis use a fixed single scale, some studies use multiple scales [3, 16, 35, 33]. + +When multi-scale images are available in histopathological image analysis, a common approach is to use them hierarchically from low resolution to high resolution. Namely, a low-resolution image is first used to detect regions of interest, and then high-resolution images of the detected regions + +![](images/e12541c86d64543970bf4b37f7265978bd70d32abfdb80f2bf1758d2ca095f14.jpg) +Figure 3: Entire WSIs of H&E stained tissues prepared at different facilities. Variety in staining conditions can be seen among different staining protocols. + +are used for further detailed analysis. Another approach is to automatically select the appropriate scale from the image itself. For example, Tokunaga et al. [33] employed a mixture-of-expert network, where each expert was trained with images of different scale, and the gating network selected which expert should be used for segmentation. + +In this study, we noted that expert pathologists conduct + +diagnosis by changing the magnification of a microscope repeatedly to find out various features of the tissues. This indicates that the analysis of multiple regions at multiple scales plays a significant role in subtype classification. In order to mimic this pathologists' practice, we propose a novel method to use multiple patches at multiple different scales within the MIL framework. In contrast to the hierarchical or selective usage of multi-scale images, our approach uses multi-scale images simultaneously. + +# 3. Proposed method + +In the proposed method, the subtype of each patient is predicted based on the H&E stained WSI by summarizing the predicted class labels of the bags taken from the WSI. Specifically, given a test WSI $\mathbb{X}_n$ , the class label probability is simply predicted as $P(\hat{\mathbb{Y}}_n = 1) = p_1 / (p_1 + p_0)$ , where + +$$ +p _ {1} = \exp \left(\frac {1}{| \mathcal {B} _ {n} |} \sum_ {b \in \mathcal {B} _ {n}} \log P (\hat {Y _ {b}} = 1)\right), +$$ + +$$ +p _ {0} = \exp \left(\frac {1}{| \mathcal {B} _ {n} |} \sum_ {b \in \mathcal {B} _ {n}} \log P (\hat {Y _ {b}} = 0)\right). +$$ + +Here, $P(\hat{Y}_b = 1)$ and $P(\hat{Y}_b = 0)$ are the class label probabilities of the bag $b \in \mathcal{B}_n$ . + +The bag's class label probability is obtained as the output of the proposed CNN network, as depicted in Fig. 4. It consists of the following three building blocks. Feature extractor $G_{\mathrm{f}}: \boldsymbol{x} \mapsto \boldsymbol{h}$ is a CNN which maps a $224 \times 224$ -pixel image $\boldsymbol{x}$ into a $Q$ -dimensional feature vector $\boldsymbol{h}$ . It is denoted as $\boldsymbol{h} = G_{\mathrm{f}}(\boldsymbol{x}; \theta_{\mathrm{f}})$ where $\theta_{\mathrm{f}}$ is the set of trainable parameters. Bag class label predictor $G_{\mathrm{y}}: \{\pmb{h}_i\}_{i \in \mathcal{I}_b} \mapsto P(\hat{Y}_b)$ is an NN with an attention mechanism [20] that maps the set of feature vectors in a bag $b$ into the probabilities of the bag class label $\hat{Y}_b$ . $G_{\mathrm{y}}(\cdot; \theta_{\mathrm{y}})$ is characterized by a set of trainable parameters $\theta_{\mathrm{y}}$ , where $(\boldsymbol{V}, \boldsymbol{w}) \in \theta_{\mathrm{y}}$ are the sets of parameters for the attention network. Using $Q'$ -dimensional feature vectors $\{\pmb{h}_i'\}_{i \in \mathcal{I}_b}$ generated through the fully connected layer, the attention weighted feature vector $z \in \mathbb{R}^{Q'}$ is obtained as $z = \sum_{i \in \mathcal{I}_b} a_i h_i'$ , where each attention is defined as + +$$ +a _ {i} = \frac {\exp \left(\boldsymbol {w} ^ {\top} \tanh (\boldsymbol {V h} _ {i} ^ {\prime})\right)}{\sum_ {j \in \mathcal {I} _ {b}} \exp \left(\boldsymbol {w} ^ {\top} \tanh (\boldsymbol {V h} _ {j} ^ {\prime})\right)}, i \in \mathcal {I} _ {b}. +$$ + +Domain predictor $G_{\mathrm{d}}: \pmb{h} \mapsto P(\hat{d})$ is a simple NN that maps a feature vector $\pmb{h}$ into domain label probabilities $P(\hat{d})$ . It is denoted as $G_{\mathrm{d}}(\pmb{h}; \theta_{\mathrm{d}})$ , where $\theta_{\mathrm{d}}$ is the set of trainable parameters. Training of the proposed CNN network is conducted in two stages. In the first stage, a single-scale DA-MIL network (the top one in Fig. 4) is trained to obtain the feature extractor $G_{\mathrm{f}}(\cdot; \theta_{\mathrm{f}}^{(s)})$ for each scale $s \in [S]$ . Then, in + +the second stage, a multi-scale DA-MIL network (the bottom one in Fig. 4) is trained by plugging the $S$ trained feature extractors into the network. + +# 3.1. Stage1: single-scale learning + +In stage 1, a single-scale DA-MIL network is trained for each scale $s \in [S]$ to predict the bag class labels where each bag only contains patches from the image of scale $s$ . Here we modified the DA regularization [15] in order to apply it to only image patches with lower attention weights of MIL. The training task of a single-scale DA-MIL network is formulated as the following minimization problem: + +$$ +\begin{array}{l} \left(\hat {\theta} _ {\mathrm {f}} ^ {(s)}, \hat {\theta} _ {\mathrm {y}} ^ {(s)}, \hat {\theta} _ {\mathrm {d}} ^ {(s)}\right) \leftarrow \arg \min _ {\theta_ {\mathrm {f}} ^ {(s)}, \theta_ {\mathrm {y}} ^ {(s)}, \theta_ {\mathrm {d}} ^ {(s)}} \sum_ {n = 1} ^ {N} \sum_ {b \in \mathcal {B} _ {n}} \mathcal {L} (\mathbb {Y} _ {n}, P (\hat {Y} _ {b} ^ {(s)})) \\ - \lambda \sum_ {n = 1} ^ {N} \sum_ {b \in \mathcal {B} _ {n}} \frac {1}{\left| \mathcal {I} _ {b} ^ {(s)} \right|} \sum_ {i \in \mathcal {I} _ {b} ^ {(s)}} \beta_ {i} \mathcal {L} \left(\mathbb {D} _ {n}, G _ {\mathrm {d}} \left(\boldsymbol {h} _ {i}; \theta_ {\mathrm {d}} ^ {(s)}\right)\right), \tag {1} \\ \end{array} +$$ + +where + +$$ +\begin{array}{l} P (\hat {Y} _ {b} ^ {(s)}) = G _ {\mathrm {y}} \left(\{G _ {\mathrm {f}} (\boldsymbol {x} _ {i}; \theta_ {\mathrm {f}} ^ {(s)}) \} _ {i \in \mathcal {I} _ {b} ^ {(s)}}; \theta_ {\mathrm {y}} ^ {(s)}\right), \\ \beta_ {i} = \max _ {a _ {j}} \{a _ {j} | j \in \mathcal {I} _ {b} ^ {(s)} \} - a _ {i}. \\ \end{array} +$$ + +In eq. (1), the first term is the loss function for bag class label prediction, while the second term is the penalty function for DA regularization, which is weighted by attentions for each instance. The loss function is simply defined by the cross entropy between the true class label and predicted class label probability. Here, the bag class label is predicted by only using instances for which the attentions are large. The DA regularization term is also defined by the cross entropy between the domain label and the predicted domain label probability. By penalizing the domain prediction capability using DA regularization, the feature extractor $G_{\mathrm{f}}(\cdot;\theta_{\mathrm{f}}^{(s)})$ for each $s \in [S]$ is trained so that the difference in staining conditions can be ignored. + +# 3.2. Stage2: multi-scale learning + +In stage 2, a multi-scale DA-MIL network is trained to predict the bag class label where each bag contains instances (patches) across different scales. The bag class label is predicted as + +$$ +P (\hat {Y} _ {b}) = G _ {\mathrm {y}} \left(\{\{G _ {\mathrm {f}} (\pmb {x} _ {i}; \hat {\theta} _ {\mathrm {f}} ^ {(s)}) \} _ {i \in \mathcal {I} _ {b} ^ {(s)}} \} _ {s = 1} ^ {S}; \theta_ {\mathrm {y}} ^ {(\mathrm {a l l})}\right), +$$ + +where the set of feature extractors $G_{\mathrm{f}}(\cdot ;\hat{\theta}_{\mathrm{f}}^{(s)})$ , $s\in [S]$ which were already trained in the first stage, are plugged in. The training of the set of parameters $\theta_{\mathrm{y}}^{\mathrm{(all)}}$ is formulated as the following minimization problem: + +$$ +\hat {\theta} _ {y} ^ {(\text {a l l})} \leftarrow \arg \min _ {\theta_ {y} ^ {(\text {a l l})}} \sum_ {n = 1} ^ {N} \sum_ {b \in \mathcal {B} _ {n}} \mathcal {L} \left(\mathbb {Y} _ {n}, P (\hat {Y} _ {b})\right). \tag {2} +$$ + +![](images/7b755dc5afc3b61e84fc8b92bbe4aa4f75a2d35498e82ae176d3993b09919b46.jpg) +DA-MIL + +![](images/0af015bacd3f14a60f988155e213aa559150505b602d838e2042e18525c7e931.jpg) +MS-DA-MIL +Figure 4: An illustration of the structure of the proposed network. Single scale DA-MIL networks are trained in stage 1 for each scale $s \in [S]$ (top). A multi-scale DA-MIL (MS-DA-MIL) network is trained in stage 2 (bottom). Loss function $\mathcal{L}_{\mathrm{bag}}$ and $\mathcal{L}_{\mathrm{d}}$ are the loss functions for the predicted bag labels and domain labels in eq. (1). In MS-DA-MIL, feature extractors $G_{\mathrm{f}}^{(s)}$ , which were domain-adversarially trained with DA-MIL are employed to generate feature vectors from the instances in bags $\mathcal{I}_b^{(s)}$ and those feature vectors for all $S$ scales are aggregated for calculating attention weights. + +# 3.3. Algorithm + +The algorithm of our proposed method is described in Algorithm 1. Each parameter update is conducted by using the instances (patches) in each bag as a mini-batch. + +# 4. Experiments + +Dataset Our experimental database of malignant lymphoma was composed of 196 clinical cases, which represented difficult lymphoma cases from 80 different institutions, and had been sent to an expert pathologist for diag + +nostic consultation. As malignant lymphoma has a lot of subtypes, in addition to observing an H&E stained tissue, serial sections from the same patient's sample are immunohistochemically stained to confirm its expression patterns for final decision making. It is expected that predicting various subtypes of malignant lymphoma is quite difficult by analyzing only the H&E stained tissue images and its difficulty was not revealed. We use the cases with only five typical types of malignant lymphoma: diffuse large B-cell lymphoma (DLBCL), angioimmunoblastic T-cell lymphoma (AITL), classical Hodgkin's lymphoma mixed cellu + +![](images/cd95161b2ac0ef9cd206ce727c45ba95cb8ca6e011ff60cb5777cc9c0febce63.jpg) + +![](images/50a027f7adb918f6ce26ff71044925420f76c51739ceb78db6e45f6b5c9f5e15.jpg) + +![](images/d961ea3c5f8cd7a555b3bf15749c0b15a30344a637af3dad7e68ff919f0643dd.jpg) + +![](images/faa45cf4c23cc843c70956ffd7b3b2f2e308d0b4bec8772575093b6ec2546df6.jpg) +Figure 5: Visualization of attention weights in DA-MIL and corresponding IHC stained tissues: The left column is original H&E stained tissue images, the center column is visualized attention weights and the right column is CD20 stained tissue images of the same case. Attention weights in each bag are normalized between 0 to 1, and heat map from blue to red is assigned to between 0 to 1. The attention-weight map in the upper row is generated from $10\mathrm{x}$ WSI, and the lower one is from $20\mathrm{x}$ WSI. We can confirm that the red regions in the visualization results correspond to the stained regions with brown in CD20 IHC stained tissue specimens. + +![](images/1467d4d3845070fcd11032166913e02f65f99435cd9f7b8ecc071108e0e0bef9.jpg) + +![](images/853195dcc47ddb7cea9a4f36159439f18479b456353b59a0816ffebe8d378446.jpg) + +larity (HLMC) and classical Hodgkin's lymphoma nodular sclerosis (HLNS). In addition, DLBCL is classified into two subtypes; germinal center B-cell (GCB) and non-germinal center B-cell (non-GCB) types. In this experiment, as a first step, we perform two-class classification, which discriminates DLBCL consisting both GCB and non-GCB types from the other three non-DLBCL classes including AITL, HLMC and HLNS. In applying our proposed method to this classification problem, DLBCL and non-DLBCL are respectively defined as positive and negative classes, as explained in the previous sections. Here, the positive instance means that an instance has the capability to discriminate DLBCL from non-DLBCL, and it should be in tumor regions of DLBCL cases because non-tumor regions in DLBCL are expected to have similar features to those in nontumor regions in non-DLBCL cases. Hence, a bag indicates a set of image patches extracted from a WSI, where positive instances represent images from tumor regions in DLBCL and negative instances represent images from non-tumor regions in DLBCL and all patches in non-DLBCL. As the total number of DLBCL cases was 98, the same number of non-DLBCL cases were selected from AITL, HLMC and HLNS cases. All glass slides of the H&E stained tissue specimens collected as mentioned above were scanned with an Aperio ScanScopeXT (Leica Biosystems, Germany) at $20\mathrm{x}$ magnification $(0.50\mathrm{um / pixel})$ + +Experimental setup In the experiments, we used 10x (1.0 um/pixel) and 20x-magnification (0.50 um/pixel) images, + +that is, the scale parameter $S$ was set to 2. We split the dataset mentioned above into $60\%$ training data, $20\%$ validation data and $20\%$ test data, with consideration of patient-wise separation. In order to generate bags, 100 of $224 \times 224$ -pixel image patches were randomly extracted from tissue regions in a WSI for each scale. The maximum number of bags generated from each WSI was determined as 50. In extracting image patches for multi-scale, the same regions were selected for each scale as shown in Fig. 1, and we obtained a total of 200 image patches of 100 regions for each bag in our experiment. In the case where the total number of image patches included in a WSI was less than 3,000, data augmentation was performed by rotating image patches by 90, 180 and 270 degrees. In the training step, the network trained a bag and renewed parameters for one iteration, and training was performed in 10 epochs where image patches in bags were shuffled for each training epoch. The domain-regularization parameter $\lambda$ was determined for each epoch as $\lambda = \frac{2}{1 + \exp(-10r)} - 1$ , with $r = \frac{\text{Current epoch } m}{\text{Total epochs } M} \times \alpha$ , where $\alpha$ is a hyperparameter, where the best parameter $\alpha$ that showed the highest accuracy on the validation data was set for testing. In this experiment, VGG16 [31] pre-trained with ImageNet was employed as the feature extractor $G_{\mathrm{f}}(\cdot; \theta_{\mathrm{f}})$ and the dimension of the output features was $Q = 25,088$ . In the label predictor $G_{\mathrm{y}}(\cdot; \theta_{\mathrm{y}})$ , a 25,088-dimensional vector was converted into a 512-dimensional vector by the fully connected layer, before the attention mechanism, namely $Q'$ was set to 512. In the attention network, the numbers of input and hidden units were 512 and 128, respectively. For + +Algorithm 1 Parameter update in MS-DA-MIL training. +Input: training set $\{(\mathbb{X}_n,\mathbb{Y}_n)\}_{n = 1}^N$ with domain label $\{\mathbb{D}_n\}_{n = 1}^N$ , learning rate $\eta$ , domain regularization parameter $\lambda$ , train epochs $M$ $\%$ stage 1: train feature extractor $G_{\mathrm{f}}(\cdot ;\theta_{\mathrm{f}}^{(s)})$ , class predictor $G_{\mathrm{y}}(\cdot ;\theta_{\mathrm{y}}^{(s)})$ , domain predictor $G_{\mathrm{d}}(\cdot ;\theta_{\mathrm{d}}^{(s)})$ +for $m = 1$ to $M$ do +for $s = 1$ to $S$ do +for $n = 1$ to $N$ do +for $b = 1$ to $|\mathcal{B}_n|$ do + $\{h_i\}_{i\in \mathcal{I}_b^{(s)}}\gets \{G_{\mathrm{f}}(\pmb {x}_i;\theta_{\mathrm{f}}^{(s)})\}_{i\in \mathcal{I}_b^{(s)}}$ $\mathcal{L}_{\mathrm{bag}}\gets \mathcal{L}\left(\mathbb{Y}_n,G_{\mathrm{y}}(\{h_i\}_{i\in \mathcal{I}_b^{(s)}};\theta_{\mathrm{y}}^{(s)})\right)$ $\mathcal{L}_{\mathrm{d}}\gets \frac{1}{|\mathcal{I}_b^{(s)}|}\sum_{i\in \mathcal{I}_b^{(s)}}\mathcal{L}\left(\mathbb{D}_n,G_{\mathrm{d}}(\pmb {h}_i;\theta_{\mathrm{d}}^{(s)})\right)$ $\mathcal{L}'_{\mathrm{d}}\gets \frac{1}{|\mathcal{I}_b^{(s)}|}\sum_{i\in \mathcal{I}_b^{(s)}}\beta_i\mathcal{L}\left(\mathbb{D}_n,G_{\mathrm{d}}(\pmb {h}_i;\theta_{\mathrm{d}}^{(s)})\right)$ $\beta_{i} = \max_{a_{j}}\{a_{j}|j\in \mathcal{I}_{b}^{(s)}\} -a_{i}$ $\theta_{\mathrm{y}}^{(s)}\gets \theta_{\mathrm{y}}^{(s)} - \eta \frac{\partial L_{\mathrm{bag}}}{\partial\theta_{\mathrm{y}}^{(s)}}$ $\theta_{\mathrm{d}}^{(s)}\gets \theta_{\mathrm{d}}^{(s)} - \eta \lambda \frac{\partial L_{\mathrm{d}}}{\partial\theta_{\mathrm{d}}^{(s)}}$ $\theta_{\mathrm{f}}^{(s)}\gets \theta_{\mathrm{f}}^{(s)} - \eta \left(\frac{\partial L_{\mathrm{bag}}}{\partial\theta_{\mathrm{f}}^{(s)}} -\lambda \frac{\partial L_{\mathrm{d}}^{\prime}}{\partial\theta_{\mathrm{f}}^{(s)}}\right)$ +end for +end for +end for +end for + $\%$ stage 2: train class predictor $G_{\mathrm{y}}(\cdot ;\theta_{\mathrm{y}}^{(\mathrm{all})})$ +for $m = 1$ to $M$ do +for $n = 1$ to $N$ do +for $b = 1$ to $|\mathcal{B}_n|$ do + $L_{\mathrm{all}}\gets \mathcal{L}(\mathbb{Y}_n,P(\hat{Y}_b))$ $P(\hat{Y}_b) = G_{\mathrm{y}}(\{\{G_{\mathrm{f}}(\pmb {x}_i;\theta_{\mathrm{f}}^{(s)})\}_{i\in \mathcal{I}_b^{(s)}}\}_{s = 1}^S;\theta_{\mathrm{y}}^{(\mathrm{all})})$ $\theta_{\mathrm{y}}^{(\mathrm{all})}\gets \theta_{\mathrm{y}}^{(\mathrm{all})} - \eta \frac{\partial L_{\mathrm{all}}}{\partial\theta_{\mathrm{y}}^{(\mathrm{all})}}$ +end for +end for +end for +Output: neural network. $\{\{\theta_{\mathrm{f}}^{(s)}\}_{s = 1}^S,\theta_{\mathrm{y}}^{(\mathrm{all})}\}$ + +the domain predictor $G_{\mathrm{d}}(\cdot ;\theta_{\mathrm{d}})$ , a 25,088-dimensional vector was reduced to a 1,024-dimensional vector by the fully connected layer, and a domain label was predicted from it. The variety of staining conditions could have occurred even if the slides were produced at the same institution, so we regarded each patient as an individual domain in DA learning, and assigned different domain labels to each slide. Parameters in the network were optimized by SGD momentum [28], where the learning rate and momentum were set to 0.0001 and 0.9, respectively. + +Results Table 1 shows the classification results of each method, where the values are the means and standard errors determined by 5-fold cross validation. In the table, "patch-based" indicates a CNN classification method whereby the same corresponding label to a case was given for all image patches extracted from the WSI, and where pre-trained VGG16 was used as a CNN model. The output probability $P_{\mathrm{patch}}$ of the patch-based method is defined as $P_{\mathrm{patch}}(\hat{\mathbb{Y}}_n = 1) = p_{1\_ \mathrm{patch}} / (p_{1\_ \mathrm{patch}} + p_{0\_ \mathrm{patch}})$ , where + +$$ +p _ {\mathrm {1 - p a t c h}} = \exp \left(\frac {1}{| \mathcal {I} _ {n} |} \sum_ {i \in \mathcal {I} _ {n}} \log P (\hat {y} _ {i} = 1)\right), +$$ + +$$ +p _ {0 \mathrm {- p a t c h}} = \exp \left(\frac {1}{| \mathcal {I} _ {n} |} \sum_ {i \in \mathcal {I} _ {n}} \log P (\hat {y} _ {i} = 0)\right). +$$ + +Here, $\mathcal{I}_n$ is a set of image patches extracted from the $n^{\mathrm{th}}$ WSI, and $P(\hat{y}_i = 1)$ is the probability for an input image patch $\pmb{x}_i$ to be classified to DLBCL. The maximum number of $224\times 224$ -pixel image patches extracted from each WSI was set to 5,000, as the case had instances from the same number of regions. DA-MIL in the table has the same meaning as MS-DA-MIL with scale parameter $S = 1$ . We confirmed that MS-DA-MIL showed the highest classification accuracy compared with those of patch-based and attentionMIL. In particular, it was confirmed that the classification accuracy of MS-DA-MIL was higher than that of DA-MIL, which could provide us with encouragement to make use of multi-scale input for pathology image classification. + +In addition, we visualized the distribution of attention weights, which were calculated for correctly classified cases into DLBCL. Figure 5 shows the images of an H&E stained tissue, corresponding attention-weight map and CD20 immunohistochemically stained tissue specimen for a serial section of the same case. For the attention-weight maps in the middle columns of Fig. 5, attention weights were normalized between 0 to 1 in each bag, and blue to red (0 to 1) heat map was generated. Thus, red regions in the attention-weight maps represent the highest contribution for classification in each bag. Because CD20 is an IHC staining that neoplastic B-cells mainly react and shows strong positivity, we can visually confirm the validity of the attention weights of the proposed DA-MIL. In CD20 stained images, positive regions are stained in brown by diaminobenzidine and negative regions are stained in blue by hematoxylin. In comparison to those images, we can see that the attention weights showed higher values in the CD20-positive regions. On the other hand, CD20-negative regions showed low values in the attention-weight maps, and image patches in such regions did not contribute to classification. According to the above results, we showed the appropriate assignment of attention weights. Figure 6 shows the images of an H&E image and its attention-weight maps calculated by MS-DA + +![](images/0a0a51c2716ab4f71a47116aa11572187cbd154d16814eebf1d3af673f6ab1f3.jpg) + +![](images/09a345e0799e86fa4d9d6cb102110ec45e477754abb4d768768878a84c11b821.jpg) + +![](images/3fc3a8b71344c49c6be74a6c7d2557825ad97e708d08ab8b401703f599acb141.jpg) + +![](images/56c7701dbf0e199d56c8bd1748ad3b63a5b326e5e90fb92403ecd0d6a1283a23.jpg) +Figure 6: Visualization of attention weights in MS-DA-MIL inputs: The left column is the original H&E stained tissue images, and the center and right-hand columns are the visualized attention weights for $10\mathrm{x}$ and $20\mathrm{x}$ by MS-DA-MIL, respectively. We can confirm that one scale had a higher contribution for classification than the other, which means that class-specific features exist at different magnification scales depending on the individual cases. + +![](images/c290a0c0d3c86390cd183577afff5db57de7ba7d22584c286565cc19213967f9.jpg) + +![](images/66ed10750aa6212b225112c7e72932480e859e25e2536ecc03b2714e6a711142.jpg) + +Table 1: Comparison of the validation measurement among conventional and proposed methods at each magnification scale, where each result shows the mean value and standard error determined by 5-fold cross validation. Patch-based, attention-based MIL, DA-MIL and MS-DA-MIL were compared, and our proposed method MS-DA-MIL showed the highest accuracy. + +
MethodMagnificationAccuracyPrecisionRecall
Patch-based10x0.740±0.0300.812±0.0540.641±0.049
Patch-based20x0.754±0.0230.799±0.0330.692±0.057
Attention-based MIL10x0.811±0.0180.860±0.0460.772±0.071
Attention-based MIL20x0.826±0.0220.909±0.0440.742±0.061
DA-MIL (ours)10x0.836±0.0120.927±0.0370.743±0.046
DA-MIL (ours)20x0.857±0.0140.927±0.0390.793±0.061
MS-DA-MIL (ours)10x, 20x0.871±0.0280.927±0.0250.813±0.066
+ +MIL. Similarly to DA-MIL, attention weights in each bag were normalized from 0 to 1, and attention-weight maps for each scale were generated with heat map. As we can see in Fig. 6, one of them has high attention weights in the $10\mathrm{x}$ image, while the other shows high attention weights in the $20\mathrm{x}$ image. Therefore, there exists appropriate magnification to obtain class-specific features depending on the cases, and MS-DA-MIL could consider this and show the effectiveness of multi-scale input analysis. + +# 5. Conclusion + +We proposed a new CNN for cancer subtype classification from unannotated histopathological images which effectively combines MI, DA, and MS learning frameworks + +in order to mimic the actual diagnosis process of pathologists. When the proposed method was applied to malignant lymphoma subtype classifications of 196 cases, the performance was significantly better than that of standard CNN or other conventional methods, and the accuracy compared favorably with that of standard pathologists. + +# Acknowledgment + +This work was partially supported by Hori Sciences and Arts Foundation to N.H., S.N., H.H. and I.T., MEXT KAKENHI 26108003 to H.H., 17H00758, 16H06538 to I.T., JST CREST JPMJCR1502 to I.T. and RIKEN Center for Advanced Intelligence Project to I.T. + +# References + +[1] S. Andrews, I. Tsochantaridis, and T. Hofmann. Support vector machines for multiple-instance learning. In Advances in neural information processing systems, pages 577-584, 2003. 2 +[2] P. Bandi, O. Geessink, Q. Manson, M. Van Dijk, M. Balkenhol, M. Hermsen, B. E. Bejnordi, B. Lee, K. Paeng, A. Zhong, et al. From detection of individual metastases to classification of lymph node status at the patient level: the camelyon17 challenge. IEEE transactions on medical imaging, 38(2):550-560, 2018. 1 +[3] B. E. Bejnordi, G. Litjens, M. Hermsen, N. Karssemeijer, and J. A. van der Laak. A multi-scale superpixel classification approach to the detection of regions of interest in whole slide histopathology images. In Medical Imaging 2015: Digital Pathology, volume 9420, page 94200H. International Society for Optics and Photonics, 2015. 3 +[4] B. E. Bejnordi, G. Litjens, N. Timofeeva, I. Otte-Höller, A. Homeyer, N. Karssemeijer, and J. A. van der Laak. Stain specific standardization of whole-slide histopathological images. IEEE transactions on medical imaging, 35(2):404-415, 2015. 2 +[5] B. E. Bejnordi, M. Veta, P. J. Van Diest, B. Van Ginneken, N. Karssemeijer, G. Litjens, J. A. Van Der Laak, M. Hermsen, Q. F. Manson, M. Balkenhol, et al. Diagnostic assessment of deep learning algorithms for detection of lymph node metastases in women with breast cancer. Jama, 318(22):2199-2210, 2017. 1 +[6] G. Campanella, M. G. Hanna, L. Geneslaw, A. Miraflor, V. W. K. Silva, K. J. Busam, E. Brogi, V. E. Reuter, D. S. Klimstra, and T. J. Fuchs. Clinical-grade computational pathology using weakly supervised deep learning on whole slide images. Nature medicine, 25(8):1301-1309, 2019. 2 +[7] Z. Chen, Z. Chi, H. Fu, and D. Feng. Multi-instance multilabel image classification: A neural approach. Neurocomputing, 99:298-306, 2013. 2 +[8] F. Chollet. Xception: Deep learning with depthwise separable convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1251-1258, 2017. 1 +[9] D. C. Ciresan, A. Giusti, L. M. Gambardella, and J. Schmidhuber. Mitosis detection in breast cancer histology images with deep neural networks. In International Conference on Medical Image Computing and Computer-assisted Intervention, pages 411-418. Springer, 2013. 1 +[10] E. Cosatto, P.-F. Laquerre, C. Malon, H.-P. Graf, A. Saito, T. Kiyuna, A. Marugame, and K. Kamijo. Automated gastric cancer diagnosis on h&e-stained sections; ltraining a classifier on a large scale with multiple instance machine learning. In Medical Imaging 2013: Digital Pathology, volume 8676, page 867605. International Society for Optics and Photonics, 2013. 2 +[11] H. D. Couture, J. S. Marron, C. M. Perou, M. A. Troester, and M. Niethammer. Multiple instance learning for heterogeneous images: Training a cnn for histopathology. In International Conference on Medical Image Computing and + +Computer-Assisted Intervention, pages 254-262. Springer, 2018. 2 +[12] A. Cruz-Roa, A. Basavanhally, F. González, H. Gilmore, M. Feldman, S. Ganesan, N. Shih, J. Tomaszewski, and A. Madabhushi. Automatic detection of invasive ductal carcinoma in whole slide images with convolutional neural networks. In Medical Imaging 2014: Digital Pathology, volume 9041, page 904103. International Society for Optics and Photonics, 2014. 1 +[13] K. Das, S. Conjeti, A. G. Roy, J. Chatterjee, and D. Sheet. Multiple instance learning of deep convolutional neural networks for breast histopathology whole slide classification. In 2018 IEEE 15th International Symposium on Biomedical Imaging (ISBI 2018), pages 578-581. IEEE, 2018. 2 +[14] T. G. Dietterich, R. H. Lathrop, and T. Lozano-Pérez. Solving the multiple instance problem with axis-parallel rectangles. Artificial intelligence, 89(1-2):31-71, 1997. 2 +[15] Y. Ganin, E. Ustinova, H. Ajakan, P. Germain, H. Larochelle, F. Laviolette, M. Marchand, and V. Lempitsky. Domain-adversarial training of neural networks. The Journal of Machine Learning Research, 17(1):2096-2030, 2016. 2, 4 +[16] Y. Gao, W. Liu, S. Arjun, L. Zhu, V. Ratner, T. Kurc, J. Saltz, and A. Tannenbaum. Multi-scale learning based segmentation of glands in digital colonrectal pathology images. In Medical Imaging 2016: Digital Pathology, volume 9791, page 97910M. International Society for Optics and Photonics, 2016. 3 +[17] S. Graham, M. Shaban, T. Qaiser, N. A. Koohbanani, S. A. Khurram, and N. Rajpoot. Classification of lung cancer histology images using patch-level summary statistics. In Medical Imaging 2018: Digital Pathology, volume 10581, page 1058119. International Society for Optics and Photonics, 2018. 1 +[18] 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. 1 +[19] L. Hou, D. Samaras, T. M. Kurc, Y. Gao, J. E. Davis, and J. H. Saltz. Patch-based convolutional neural network for whole slide tissue image classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2424-2433, 2016. 1 +[20] M. Ilse, J. M. Tomczak, and M. Welling. Attention-based deep multiple instance learning. arXiv preprint arXiv:1802.04712, 2018. 2, 4 +[21] A. M. Khan, N. Rajpoot, D. Treanor, and D. Magee. A nonlinear mapping approach to stain normalization in digital histopathology images using image-specific color deconvolution. IEEE Transactions on Biomedical Engineering, 61(6):1729-1738, 2014. 2 +[22] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097-1105, 2012. 1 +[23] M. W. Lafarge, J. P. Pluim, K. A. Eppenhof, P. Moeskops, and M. Veta. Domain-adversarial neural networks to address the appearance variability of histopathology images. In *Deep + +Learning in Medical Image Analysis and Multimodal Learning for Clinical Decision Support, pages 83-91. Springer, 2017. 2 +[24] C. H. Li, I. Gondra, and L. Liu. An efficient parallel neural network-based multi-instance learning algorithm. The Journal of Supercomputing, 62(2):724-740, 2012. 2 +[25] M. Macenko, M. Niethammer, J. S. Marron, D. Borland, J. T. Woosley, X. Guan, C. Schmitt, and N. E. Thomas. A method for normalizing histology slides for quantitative analysis. In 2009 IEEE International Symposium on Biomedical Imaging: From Nano to Macro, pages 1107-1110. IEEE, 2009. 2 +[26] O. Maron and T. Lozano-Pérez. A framework for multiple-instance learning. In Advances in neural information processing systems, pages 570-576, 1998. 2 +[27] H. S. Mousavi, V. Monga, G. Rao, and A. U. Rao. Automated discrimination of lower and higher grade gliomas based on histopathological image analysis. Journal of pathology informatics, 6, 2015. 1 +[28] N. Qian. On the momentum term in gradient descent learning algorithms. Neural networks, 12(1):145-151, 1999. 7 +[29] A. Rakhlin, A. Shvets, V. Iglovikov, and A. A. Kalinin. Deep convolutional neural networks for breast cancer histology image analysis. In International Conference Image Analysis and Recognition, pages 737-744. Springer, 2018. 2 +[30] E. Reinhard, M. Adhikhmin, B. Gooch, and P. Shirley. Color transfer between images. IEEE Computer graphics and applications, 21(5):34-41, 2001. 2 +[31] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 1, 6 +[32] P. Sudharshan, C. Petitjean, F. Spanhol, L. E. Oliveira, L. Heutte, and P. Honeine. Multiple instance learning for histopathological breast cancer image classification. Expert Systems with Applications, 117:103-111, 2019. 2 +[33] H. Tokunaga, Y. Teramoto, A. Yoshizawa, and R. Bise. Adaptive weighting multi-field-of-view cnn for semantic segmentation in pathology. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 12597-12606, 2019. 3 +[34] D. Wang, A. Khosla, R. Gargeya, H. Irshad, and A. H. Beck. Deep learning for identifying metastatic breast cancer. arXiv preprint arXiv:1606.05718, 2016. 1 +[35] R. Wetteland, K. Engan, T. Eftestøl, V. Kvikstad, and E. A. Janssen. Multiscale deep neural networks for multiclass tissue classification of histological whole-slide images. arXiv preprint arXiv:1909.01178, 2019. 3 +[36] J. Wu, Y. Yu, C. Huang, and K. Yu. Deep multiple instance learning for image classification and auto-annotation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3460–3469, 2015. 2 +[37] Y. Xu, Z. Jia, Y. Ai, F. Zhang, M. Lai, I. Eric, and C. Chang. Deep convolutional activation features for large scale brain tumor histopathology image classification and segmentation. In 2015 IEEE international conference on acoustics, speech and signal processing (ICASSP), pages 947-951. IEEE, 2015. 1 + +[38] Y. Xu, Z. Jia, L.-B. Wang, Y. Ai, F. Zhang, M. Lai, I. Eric, and C. Chang. Large scale tissue histopathology image classification, segmentation, and visualization via deep convolutional activation features. BMC bioinformatics, 18(1):281, 2017. 1 +[39] F. G. Zanjani, S. Zinger, B. E. Bejnordi, J. A. van der Laak, et al. Histopathology stain-color normalization using deep generative models. 2018. 2 +[40] Z.-H. Zhou and M.-L. Zhang. Neural networks for multi-instance learning. In Proceedings of the International Conference on Intelligent Information Technology, Beijing, China, pages 455-459, 2002. 2 \ No newline at end of file diff --git a/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/images.zip b/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..3ae8f237b1b185e929f35f621ce7a4dd358b8547 --- /dev/null +++ b/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6756a26ada36cae34c0f1d7837b9d452990de3c47d5ceb45768cc1668d082e99 +size 546510 diff --git a/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/layout.json b/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f3aa058a1b4ad11cfb451c030ad2943a94a987d5 --- /dev/null +++ b/multiscaledomainadversarialmultipleinstancecnnforcancersubtypeclassificationwithunannotatedhistopathologicalimages/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:354b769bc8b2f8fef623ba67305011c62173fd1c5f5bc4dfe41ba472106af028 +size 385370 diff --git a/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/be40a050-980c-448b-9f30-50e35676f426_content_list.json b/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/be40a050-980c-448b-9f30-50e35676f426_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..cfd3a75ea544106e06dc56d5ebd3360b013e62b3 --- /dev/null +++ b/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/be40a050-980c-448b-9f30-50e35676f426_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b54bb1f5b3805beacc1e0ce07794bbf65d7dcb1208a8be99940cdb96dd76756c +size 82324 diff --git a/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/be40a050-980c-448b-9f30-50e35676f426_model.json b/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/be40a050-980c-448b-9f30-50e35676f426_model.json new file mode 100644 index 0000000000000000000000000000000000000000..1906ed7324e855c2a53b3360848847be6dd8051d --- /dev/null +++ b/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/be40a050-980c-448b-9f30-50e35676f426_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76901f9bed31fef0e46879d573f57fa8fd7cf131ab6394f1c91333111cb93e29 +size 99024 diff --git a/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/be40a050-980c-448b-9f30-50e35676f426_origin.pdf b/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/be40a050-980c-448b-9f30-50e35676f426_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6a2cd14fe9126f33692690fc3095df7176f4a0ed --- /dev/null +++ b/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/be40a050-980c-448b-9f30-50e35676f426_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:489fa164a626f7791d4d029e8d211ae2ca19094e8d93e98c3bb40f80516d041a +size 912656 diff --git a/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/full.md b/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..000d773f97576cc357ca7b20c34e946fd3e08ed8 --- /dev/null +++ b/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/full.md @@ -0,0 +1,360 @@ +# Multiview-Consistent Semi-Supervised Learning for 3D Human Pose Estimation + +Rahul Mitra* + +IIT Bombay + +rmitter@cse.iitb.ac.in + +Nitesh B. Gundavarapu* + +UC San Diego + +nbgunday@ucsd.edu + +Abhishek Sharma + +Axogyan AI + +abhisharayiya@gmail.com + +Arjun Jain + +IISc Bangalore + +arjun Jain@iisc.ac.in + +# Abstract + +The best performing methods for 3D human pose estimation from monocular images require large amounts of in-the-wild 2D and controlled 3D pose annotated datasets which are costly and require sophisticated systems to acquire. To reduce this annotation dependency, we propose Multiview-Consistent Semi Supervised Learning (MCSS) framework that utilizes similarity in pose information from unannotated, uncalibrated but synchronized multi-view videos of human motions as additional weak supervision signal to guide 3D human pose regression. Our framework applies hard-negative mining based on temporal relations in multi-view videos to arrive at a multi-view consistent pose embedding. When jointly trained with limited 3D pose annotations, our approach improves the baseline by $25\%$ and state-of-the-art by $8.7\%$ , whilst using substantially smaller networks. Lastly, but importantly, we demonstrate the advantages of the learned embedding and establish view-invariant pose retrieval benchmarks on two popular, publicly available multi-view human pose datasets, Human 3.6M and MPI-INF-3DHP, to facilitate future research. + +# 1. Introduction + +Over the years, the performance of monocular 3D human pose estimation has improved significantly due to increasingly sophisticated CNN models [55, 35, 46, 45, 30, 49]. For training, these methods depend on the availability of large-scale 3D-pose annotated data, which is costly and challenging to obtain, especially under in-the-wild setting for articulated poses. The two most popular 3D-pose annotated datasets, Human3.6M [15] (3.6M samples) and MPIINF-3DHP [29] (1.3M samples), are biased towards indoor-like environment with uniform background and illumination. Therefore, 3D-pose models trained on these datasets don't generalize well for real-world scenarios [8, 55]. + +Limited training data, or costly annotation, poses seri + +ous challenges to not only deep-learning based methods, but other machine-learning methods as well. Semi-supervised approaches [10, 22, 24, 14] have been extensively used in the past to leverage large-scale unlabelled datasets along with small labelled dataset to improve performance. Semisupervised methods try to exploit the structure/invariances in the data to generate additional learning signals for training. Unlike classical machine-learning models that use fixed feature representation, deep-learning models can also learn a suitable feature representation from data as part of the training process. This unique ability calls for semisupervised approaches to encourage better feature representation learning from large-scale unlabelled data for generalization. Intuitively it's more appealing to leverage semisupervised training signals that are more relevant to the final application. Therefore, given the vast diversity of computer-vision tasks, it remains an exciting area of research to innovate novel semi-supervision signals. + +To this end, we leverage projective multiview consistency to create a novel metric-learning based semi-supervised framework for 3D human-pose estimation. Multiview consistency has served as a fundamental paradigm in computer vision for more than 40 years and gave rise to some of the most used algorithms such as stereo [42], structure from motion [20], motion capture [32], simultaneous localization and mapping [4], etc. From human-pose estimation perspective, the intrinsic 3D-pose of the human-body remains the same across multiple different views. Therefore, a deep-CNN should ideally be able to map 2D-images corresponding to a common 3D-pose, captured from different viewpoints, to nearby points in an embedding space. Intuitively, such a deep-CNN is learning feature representations that are invariant to different views of the human-pose. Therefore, we posit that perhaps it can learn to project 2D images, from different viewpoints, into a canonical 3D-pose space in $\mathbb{R}^N$ . In Fig. 1b, we show a few embedding distances between different images from the Human 3.6M dataset [15] and provide empirical evidence to the aforementioned hypothesis via a novel cross-view pose-retrieval experiment. Unfortunately, embedding-vectors, $x$ , from such a space do not translate directly to + +the 3D coordinates of human-pose. Therefore, we learn another transformation function from embedding to pose space and regress with small 3D-pose supervision while training. Since, the embedding is shared between the pose-supervision and semi-supervised metric-learning, it leads to better generalizable features for 3D-pose estimation. We name our proposed framework as Multiview Consistent Semi-Supervised learning, or MCSS for short. + +The proposed framework fits really well with the practical requirements of our problem because it's relatively easy to obtain real-world time-synchronized video streams of humans from multiple viewpoints vs. setting up capture rigs for 3D-annotated data out in-the-wild. An alternative approach could be to setup a calibrated multi-camera capture rig in-the-wild and use triangulation from 2D-pose annotated images to obtain 3D-pose. But, it still requires hand-annotated 2D-poses or an automated 2D-pose generation system. In [19], a pre-trained 2D-pose network has been used to generate pseudo 3D-pose labels for training a 3D-pose network. Yet another approach exploits relative camera extrinsics for cross-view image generation via a latent embedding [39]. We, on the other hand, don't assume such requirements to yield a more practical solution for the limited data challenge. + +We use MCSS to improve 3D-pose estimation performance with limited 3D supervision. In Sec. 5, we show the performance variation as 3D supervision is decreased. Sec. 6 demonstrates the richness of view-invariant MCSS embedding for capturing human-pose structure with the help of a carefully designed cross-view pose-retrieval task on Human3.6M and MPI-INF-3DHP to serve as a benchmark for future research in this direction. To summarize our contribution, we + +- Propose a novel Multiview-Consistent Semi-Supervised learning framework for 3D-human-pose estimation. +- Achieve state-of-the-art performance on Human 3.6M dataset with limited 3D supervision. +- Formulate a cross-view pose-retrieval benchmark on Human3.6M and MPI-INF-3DHP datasets. + +# 2. Related Work + +This section first reviews prior approaches for learning human-pose embedding followed by a discussion of previous weakly supervised methods for monocular 3D human pose estimation to bring out their differences with our approach. + +# 2.1. Human Pose Embedding + +Historically, human-posed embeddings have been employed in tracking persons [50, 25]. Estimation of 3D human pose and viewpoint from input silhouettes via learning + +a low dimension manifold is shown in [9]. 2D-pose regression and retrieval by pose similarity embedding is shown in [23, 33], but requiring 2D-pose labels. In [44], the need for 2D-pose labels is eliminated by using human motion videos and temporal ordering as weak supervision. Unlike the aforementioned approaches, we learn a 3D-pose embedding by leveraging intrinsic 3D-pose consistency from synchronized multi-view videos. In [47], a 3D-pose embedding is learnt using an over-complete auto-encoder for better structure preservation, but it still required 3D-pose annotations. + +# 2.2. Weakly Supervised 3D Human Pose Estimation + +Majority of the supervised 3D-pose Estimation algorithms [30, 28, 49, 37, 46, 54, 45, 55, 43] require 3D-pose labels in conjunction with either 2D-pose labels or a pretrained 2D pose estimator to learn a deep-CNN mapping from images or predicted 2D-pose to 3D-pose. Some methods refine these pose estimates using either temporal cues, anthropometric constraints, geometric constraints or additional supervision [8, 53, 52, 3, 26, 12]. A complete decoupling between 2D and 3D pose estimation is presented in [52] with the use of generative lifting network followed by a back-projection constraint to achieve generalization. Another line of work focuses on augmenting 2D/3D-pose labels using mesh representation [16, 17, 3, 21, 34] or a dense pose representation [1, 11] to improve pose estimation. All the aforementioned approaches require large amount of annotated 2D and/or 3D labels while our method is designed for limited 3D-pose labels only. + +Strong 2D and Limited/no 3D Supervision In recent years, weak-supervision from limited 3D-pose labels along with in-the-wild 2D-pose labels has gained popularity, because labelling 2D-pose is easier than labelling 3D-pose [36, 19, 40, 6, 51, 5]. A weak-supervision in the form of reprojection constraints on the predicted 3D pose is proposed [36]. Mostly, such approaches take advantage of multi-view images during training by means of geometric constraints [40, 19, 5], domain adaptation and adversarial constraints [5], or cross-view reprojection constraints [6]. In [6], a latent 3D-pose embedding is learned by reconstructing 2D-pose from the embedding in a different view. A shallow network with limited 3D-pose supervision is learned to regress 3D-pose from the embedding. A network with pre-trained weights for 2D-pose estimation is used for 3D-pose estimation in [40] followed by multi-view geometric consistency loss. Pseudo 3D-pose labels are generated in [19] for training, while adversarial losses between the 2D skeleton and re-projection of predicted 3D-pose on different views is used for learning in [5]. In [51], starting with 2D pose inputs, a lifting network is trained with siamese loss on the embedding from multiple views to achieve a weak supervision for 3D-pose. Unlike us, [40, 5, 19] require strong 2D + +![](images/76d4e758c48a997b94f529413b0ad68b1222526c9e792b76a0a1d1659a0399d1.jpg) + +![](images/ca72f2632ce7ef0ed75f80f3aacb30a5b668247e6ee4c76b764485e15e1ab20c.jpg) +Figure 1: (a) Framework for learning our pose embedding and subsequent canonical pose estimation. $x_{\text{anchor}}$ and $x_{\text{positive}}$ are a batch of anchor and positive image pairs taken from different camera views. $x_{\text{supervise}}$ is the batch of images with 3D-pose supervision. $\mathcal{F}$ - ResNet based feature extractor. $\mathcal{G}$ maps features extracted from $\mathcal{F}$ to embedding $\phi$ . The Hard Negative Sampling module performs in-batch hard mining as given in Eq. 1. Module $\mathcal{H}$ regresses pose $\hat{p}$ from our embedding $\phi$ . See Sec. 3.1, 3.2 for details. (b) Distances between a few images in our learned embedding space. Each column represents images in the same pose from different view. Images across rows have different poses. The numbers between a pair of images represent its embedding distance. The distance is low for pairs with the same pose irrespective of viewpoint and high for those having different poses. + +pose estimation systems trained on MPII or COCO datasets while [36, 51, 6] directly work on 2D-pose detections. We, on the other hand, don't need any 2D-pose labels or pretrained 2D-pose estimation systems. + +Limited/no 2D and Limited 3D Supervision - To alleviate the need for a large amount of 2D-pose labels, [39, 38] learn an unsupervised geometry aware embedding and estimate 3D-pose from embedding with limited 3D supervision. Novel view synthesis using multi-view synchronized videos of human motions is used to learn a geometry-aware embedding. These methods, however, still require camera extrinsics and background extraction and perform worse than our approach. Our approach falls in the same category as we don't use any 2D-pose labels. We utilize synchronized videos from multiple views to learn a pose embedding with limited 3D-pose labels such that similar pose samples are mapped close to each other in the embedding space. Unlike [39], we don't require camera extrinsics or background extraction. + +# 3. Proposed Approach + +Our proposed MCSS approach consists of two modules-i) Multiview-consistent metric-learning from time synchronised videos (Sec. 3.1) and ii) 3D-pose regression with limited 3D supervision (Sec. 3.2). Both the modules are jointly trained as shown in Fig. 1a and explained in Sec. 3.1, 3.2. Metric-learning acts as semi- supervision signal to reduces the dependency on large-scale 3D-pose labels while pose + +regression encourages the network to learn pose-specific features. + +# 3.1. Multiview-Consistent Metric Learning + +We utilize the Hardnet framework [31] to learn pose embedding. The datasets used for training is divided into images belonging to one of $S = \{S_1, S_2, \ldots, S_n\}$ set of subjects. $\mathcal{P} \subset \mathbb{R}^{16 \times 3}$ is the set of all possible poses and each pose is viewed from $\mathcal{V} = \{v_1, v_2, \ldots, v_q\}$ viewpoints. For training hardnet, each batch consists of paired anchor $(\mathcal{X}_p^{v_a}(S_i) \in \mathcal{X})$ and positive $(\mathcal{X}_p^{v_b}(S_i) \in \mathcal{X})$ images, from subject $S_i$ , with the same pose, $p \in \mathcal{P}$ , taken from two different viewpoints $v_a$ and $v_b$ , here $\mathcal{X} \subset \mathbb{R}^{3 \times 256 \times 256}$ is the set of images. + +We pass both the anchor and positive images through feature extractor $(\mathcal{F}_{\theta_{\mathcal{F}}}: \mathcal{X} \to \Psi; \Psi \subset \mathbb{R}^{512 \times 4 \times 4})$ to generate features $\{\psi_p^{v_a}, \psi_p^{v_b}\} \in \Psi$ . The feature extractor network is parameterised by $\theta_{\mathcal{F}}$ . The features are then finally passed through an embedding generating network $(\mathcal{G}_{\theta_{\mathcal{G}}}: \Psi \to \Phi; \Phi \subset \mathbb{R}^{dim_{\phi}}$ ; where $dim_{\phi}$ is dimension of our embedding). Let's assume we feed anchor and positive images to $\mathcal{F}$ in batches of $m$ . Once corresponding features $\{\phi_{p_1}^{v_{a_1}}, \ldots, \phi_{p_m}^{v_{a_m}}\}$ and $\{\phi_{p_1}^{v_{b_1}}, \ldots, \phi_{p_m}^{v_{b_m}}\}$ are computed, we create a distance matrix $D$ of size of $m \times m$ with $D(i,j) = \| \phi_{p_i}^{v_{a_i}} - \phi_{p_j}^{v_{b_j}} \|_2$ . Negatives $\phi_{p_{j_{min}}}^{v_{k_{min}}}$ and $\phi_{p_{k_{min}}}^{v_{k_{min}}}$ for each of $\phi_{p_i}^{v_{a_i}}$ and $\phi_{p_i}^{v_{b_i}}$ are then sampled from the current batch which lie closest in the embedding space from $\phi_{p_i}^{v_{a_i}}$ and $\phi_{p_i}^{v_{b_i}}$ respectively. Mathematically, the sampling + +is formulated in Eq. 1. Here, $\beta$ denotes the minimum distance between a hard-mined negative and an anchor/positive in embedding space. The threshold $\beta$ is necessary for stable training and to avoid similar poses as negatives. + +$$ +j_{min} = \operatorname *{arg min}_{j\neq i}\delta (D(i,j))* D(i,j); +$$ + +$$ +k _ {\text {m i n}} = \underset {k \neq i} {\arg \min } \delta (D (k, i)) * D (k, i) \tag {1} +$$ + +$$ +\delta (x) = 1 \text {i f} x > \beta , 0 \text {o t h e r w i s e} +$$ + +$$ +D _ {m i n} ^ {i} = \min (D (i, j _ {m i n}), D (k _ {m i n}, i)) +$$ + +The average contrastive loss is given in Eq. 2, with $\alpha$ being the margin. + +$$ +\mathcal {L} _ {c n s t r} = \frac {1}{m} \sum_ {i = 1} ^ {m} D (i, i) + \max \left(0, \alpha - D _ {\min } ^ {i}\right) \tag {2} +$$ + +Note that the above learning framework has the following two objectives, namely, a) to bring the anchors and its positives closer and b) to separate out the negatives from its anchors and positives. Intuitively, the goal is to learn embedding that captures 3D-pose information while ignoring irrelevant information, such as subject appearance or background. To this end, we propose the following mini-batch selection mechanism to promote the aforementioned goal: + +# 3.1.1 Mini-batch Selection + +We compose each mini-batch using anchor and positive pairs from the same subject, and in many cases with overlapping backgrounds, and the negatives are also from the same subject since Hardnet chooses the hardest negatives from the same mini-batch. The presented mini-batch selection scheme encourages the resulting embedding to capture pose information while discarding subject-appearance and background features when separating the hardest negatives from anchors and positives. It's due to the inclusion of same personal-appearance and background in both the negatives and anchor/positives, which cannot be used to separate negatives. We take care to not include temporally close images in a mini-batch by sub-sampling and appropriately choosing $\beta$ . Specific hyper-parameter choices are detailed in supplementary material. In Sec. 6, we show pose retrieval ability of the learned embedding to show that it has indeed successfully captured 3D-pose information. + +# 3.2. Pose Regression + +Most 3D-pose estimation approaches focus on regressing for pose in the local camera coordinate system [55, 35, 49, 28, 46, 52, 40]. In our framework, however, 2D-images captured from different views are all mapped to nearby embedding locations, if their intrinsic 3D-poses are the same. + +Therefore, 3D-pose regression using our embedding is ambiguous because the local camera coordinate system is lost. Moreover, the relation from our embedding to the view-specific 3D-pose is one-to-many. In order to address this issue, we make use of the MoCap system's global coordinate to represent the 3D-poses instead of view-specific 3D-poses. Hence, synchronous frames captured from different views are labelled as one global-coordinate 3D-pose. However, different frames can contain poses which are rigid transformations of one another with same 2D projections. In such cases, the mapping from our embedding to 3D-pose is again an ill-posed one-to-many mapping. In Fig. 2, an example of such ambiguity is illustrated. + +![](images/a8e09f0cf0ddbd33c420e8e18fbacde89a2c7de170e41ed1420ccd7f3ee759d1.jpg) +Figure 2: Top view of the bottom half of a human skeleton taken at two different time instants and view points. The left and middle images show two poses having different joint co-ordinates when presented in the global pose while having same projections in their respective cameras. On the contrary its canonical pose provides a uniform representation. + +![](images/6e7d17cfddbbc77e5a9296983b9568bfd2a3a9824142393dbec793e45b7304b2.jpg) + +![](images/637a773a1388c9da65059f5a6fa2e94e8ae6dd89bbfd009ac41ab4c0c77e1846.jpg) + +# 3.2.1 Canonical Pose Representation + +In order to resolve the aforementioned ambiguities, we formulate a multiview-consistent and rigid rotation invariant 3D-pose representation and refer to it as canonical pose. Canonical pose is obtained by constraining the bone connecting the pelvis to the left hip joint to be always parallel to XZ plane. In Human3.6M dataset, the upward direction is $+Z$ axis while XY plane forms the horizontal. Therefore, we rotate the skeleton about the $+Z$ axis until the above mentioned bone is parallel to the XZ plane. We don't require any translation since the joint positions are relative to the pelvis. Mathematically, the transformation from global to canonical is given in Eq. 3, + +$$ +\hat {u} = \frac {p _ {l h} ^ {g l b} - p _ {r o o t} ^ {g l b}}{\| p _ {l h} ^ {g l b} - p _ {r o o t} ^ {g l b} \|}; u _ {\hat {x y}} = \frac {\hat {u} _ {\hat {x}} \hat {\hat {i}} + \hat {u} _ {\hat {y}} \hat {\hat {j}}}{\| \hat {u} _ {\hat {x}} \hat {\hat {i}} + \hat {u} _ {\hat {y}} \hat {\hat {j}} \|} \tag {3} +$$ + +$$ +\theta = \cos^ {- 1} (\hat {u _ {x y}} \cdot \hat {i}); p ^ {c a n} = R _ {\theta} ^ {z} * p ^ {g l b} +$$ + +where, $p_{root}^{glb}$ and $p_{lh}^{glb}$ are the root and left-hip joint respectively in the global representation. The unit vector along $(p_{lh}^{glb} - p_{root}^{glb})$ is represented as $\hat{u}$ , and $\theta$ is the required + +angle of rotation along the $+Z$ -axis to obtain the canonical pose representation. A positive side-effect of canonical pose representation vs. view-specific representation is that our predicted canonical pose doesn't change orientation with variations in camera view. Similar ground-plane rotations to achieve a rotation-invariant pose has also been used in [49]. Note that the canonical pose is constructed directly from MoCap system's coordinates and doesn't require camera extrinsics. Finally, we regress for canonical pose from the latent embedding $\Phi$ with the help of a shallow network $(\mathcal{H}_{\theta_{\mathcal{H}}}: \Phi \to \mathcal{P})$ , as shown in Fig. 1a. The loss-function is L1-norm between the predicted, $\hat{p}$ , and target, $p \in \mathcal{P}$ , canonical 3D-pose: $\mathcal{L}_{\text{pose}} = \| p - \hat{p} \|_1$ . + +# 4. Implementation and Training Details + +We use the first 4 residual blocks of an ImageNet [41] pre-trained ResNet-18 as our backbone. In addition, we modify the batch-norm (BN) layers by turning off the affine parameters as suggested in [31, 48]. For an input image of size $224 \times 224$ pixels, the output of ResNet is a $512 \times 7 \times 7$ blob, which is further down-sample by 2 using a max-pool operation to get $\Psi$ . The embedding network $\mathcal{G}$ is FC layers followed by L2-normalization and it maps $\Psi$ to an embedding of dimension $dim_{\phi}$ (128 in our case), following the approach of [31, 48]. + +For 3D-posed regression, the input data is normalized for each joint. The pose regression network $\mathcal{G}$ consists of FC layers FC(128, 48), with $\Phi \subset \mathbb{R}^{128}$ . The margin $\alpha$ for $\mathcal{L}_{\text{connst}}$ is set at 0.6 and $\beta$ at 0.3. Adam [18] optimized is used with default parameters (0.9, 0.99) with initial learning rate $10^{-3}$ . The model is trained for 40 epochs with a drop in learning-rate by 0.1 at every 20 epochs. In our joint training frame work, ratio of the batch size for metric learning to pose regression is kept at 3:1 with batch size for regression is 22. A schematic diagram of our network architecture is shown in Fig. 1a. + +# 4.1. Datasets + +We use the popular Human3.6M [15] and MPI-INF-3DHP [29] datasets for our experiments. + +- Human3.6M [15] contains 3.6 million frames captured from an indoor MoCap system with 4 cameras $(\mathcal{V})$ . It comprises of 11 subjects $(S)$ , each performing 16 actions with each action having 2 sub-actions. Following the standard Protocol 2 [46], we use subjects (S1, S5, S6, S7, S8) for training and (S9, S11) for testing. Like several other methods, we also use cropped subjects' using bounding-boxes provided with the dataset and temporal sub-sampling is done to include every $5^{th}$ and $64^{th}$ frame for training and testing phase, respectively. + +- MPI-INF-3DHP [29] is generated from a MoCap system with 12 synchronized cameras in both indoor and outdoor settings. It contains 8 subjects(S) with diverse clothing. We use the 5 chest height cameras( $\nu$ ) for both training and test purposes. Since the test set doesn't contain annotated multi-view data, we use S1-S6 for training and S7-S8 for evaluation. + +# 5. Quantitative Evaluation for Pose Estimation + +We perform the same quantitative experiment as presented in [39] to assess the benefits of the learned embedding in 3D-pose estimation on the Human 3.6M dataset. We evaluate using three well adopted metrics, MPJPE, PA-MPJPE and Normalized MPJPE (N-MPJPE) (introduced in [40]) which incorporates a scale normalization to make the evaluation independent of person's height. We compare our proposed approach and its variants against a baseline which only uses $\mathcal{L}_{\text {pose }}$ . In addition, we compare our method against the approach proposed by Rhodin et al. [39] and [40], although it estimates human poses in the camera coordinate system. We also report the performance of Rhodin et al. [39] using ResNet-18 as the feature extractor instead of ResNet-50. It is to be noted that [39] uses additional information at training time in the form of relative camera rotation and background extraction which requires sophisticated, well calibrated setup. We acknowledge the existence of more accurate methods like [5, 19, 7] on Human3.6M when abundant 2D and limited 3D labels are available. For comparison with these approaches, however, we report results from [6] that requires limited 3D supervision but complete 2D supervision from both Human3.6M and MPII [2] dataset. Since, our focus is advancing the research in monocular 3D-pose estimation without using 2D labels under limited 3D-pose labels, we restrict our comparison to cases with limited supervision from both 2D and 3D labels. We don't include the results of [36] as it requires multiple temporally adjacent frames at inference-stage and uses pre-trained 2D-pose estimation models learned from large-scale 2D-pose annotated datasets. Note: We do not predict rotations required to convert from canonical pose to camera pose. Hence we use the canonical representation in MCSS(ours) and the camera coordinate representation in other methods for all evaluations in this section. In order to show performance variation as a function of 3D-pose supervision, we report N-MPJPE values for models trained using different amount of 3D-pose labels, in Fig. 3. In this experiment, 3D-pose supervision is reduced gradually using all 5 subjects, to $5\%$ S1. MCSS clearly outperforms the baseline by a margin of 37.34 N-MPJPE when only S1 is used for supervision. Moreover, MCSS degrades gracefully as 3D-pose supervision is reduced, which validates the importance of $\mathcal{L}_{\text {constrt }}$ in providing weak supervision to capture 3D-pose. Qualitative comparison of our method against the + +
SupervisionMethodN-MPJPEMPJPEPA-MPJPE
AllRhodin [40]*63.3066.8051.60
Chen [6]*NA80.2058.20
Baseline95.0797.9077.18
Rhodin [40]95.40NANA
Rhodin [39]115.00NANA
MCSS(Ours)92.6094.2572.48
S1Rhodin [40]*78.20NANA
Chen [6]*NA91.9068.00
Baseline149.28154.78113.69
Rhodin [40]NA153.30128.60
Rhodin [39]122.60131.7098.20
Rhodin [39]-Res18136.00NANA
MCSS(Ours)111.94120.9590.76
+ +![](images/e22057f31d8d41978676d888f53de12ae9bdd69123302ddfcac2b5b1943f7a89.jpg) +Figure 3: N-MPJPE vs. 3D-posed supervision on test split (S9,S11) of Human3.6M. Our proposed model outperforms the baseline and the current state-of-the-art Rhodin et al. [39]. + +baseline is shown in Fig. 3. + +In Tab. 1, we compare MPJPE, N-MPJPE and PA-MPJPE values of our approach against the baseline and [39]. Clearly, our method outperforms [39] by 22.4 + +N-MPJPE when fully supervised on 3D data and by 10.7 N-MPJPE with 3D-pose supervision limited to S1. For MPJPE however, the margin is 10.75. Interestingly as mentioned in [39], the performance of [40] drastically falls when pretrained model from strong 2D-pose supervision is not used (reported in Tab. 1 as Rhodin $[40]^*$ and Rhodin [40]). + +Table 1: Comparing N-MPJPE and MPJPE values between different approaches on Human 3.6M dataset when supervised on all 5 subjects and on only S1. Note: Pre-trained ImageNet weights are used to initialize the networks by all the methods. Methods or its variants marked with “*” are supervised with large amount of in-the-wild 2D annotations from the MPII [2] dataset either during training or by means of a pre-trained 2D pose estimator. All other methods use much weaker supervision by assuming no 2D annotations and MCSS outperforms the state-of-the-art [39] in such settings. NA is assigned against a method if the corresponding result is not reported by the authors. + +
SupervisionMethodN-MPJPE
S1MCSS111.94
MCSS-global157.30
MCSS-ResNet34115.85
+ +Table 2: N-MPJPE values when pose estimation is done in Mocap's (MCSS-global) and canonical(MCSS) representations when only subject S1 is used for supervision. Performance of using ResNet-34 as back-end is reported against MCSS-ResNet34. + +As part of ablation studies, we also compare the performance of our learning framework when target pose is represented in MoCap's(global pose) against our canonical representation in Tab. 2. We observe dramatic decrease in performance, 45 MPJPE, which validates the importance of canonical representation. We also show the results for a deeper ResNet-34 [13] back-end network. We observe a slight drop in performance, 3 MPJPE points, perhaps due to over-fitting. + +An additional benefit of our proposed framework is in the use of a much smaller ResNet-18 feature extractor as compared to ResNet-50 used in Rhodin et al [39]. This affords an inference time of $24.8\mathrm{ms}$ vs. $75.3\mathrm{ms}$ by [39] on a NVIDIA 1080Ti GPU. Note that Rhodin et al. [39] shows degradation in performance when using the smaller ResNet-18 backbone. We attribute it to direct latent embedding similarity learning instead of generative modelling that requires more representation capacity. + +Pose Estimation From Novel Viewpoint We study the impact of our semi-supervised framework when regressing canonical pose from unseen viewpoints. To this end, we train and test our model on disjoint sets of viewpoints from Human3.6M [15] dataset. In Tab. 3, the model is trained with our unsupervised loss $\mathcal{L}_{cnstr}$ using all the views and with our supervised loss $\mathcal{L}_{pose}$ on images from a subset of viewpoints 1, 2 and 3 (See details in Tab. 2 caption). At test time, we only use images from viewpoint 4 of the Human3.6M test split. We observe a minor increase in error of $4.5\mathrm{mm}$ even when pose supervision is from only from two viewpoints. + +# 6. Analysis of Learned Embedding + +In this section, we demonstrate the quality of our learned embedding in capturing 3D human-pose by showing i) pose + +![](images/b891061b860660ddd455f37df3af8aea93586e2c83658c1eb74d08ca9f465d05.jpg) +nnnnne + +![](images/99606e977d20562451fbafd8ec62c1aa40a4f17f665c79588d6ebd61a1030640.jpg) + +![](images/eadef810d1a7bb16a1292da22360f6f4ba5417e83b27a6dd8e7b3d0e726b6d25.jpg) + +![](images/52c12bd9a68be52c163f90d19fb2862be79fbe786f589366a17a5c516f4fbfad.jpg) + +![](images/86d6489d1d3cd3b0cf0f440086ca0b819137400b32316bb333848019b7d089cb.jpg) + +![](images/2cbf48ade157db4641c48b2628454f8240cb03efb5b2dbfa879b9602227b22c9.jpg) + +![](images/9db79a8b545d294e06d5462dd75a47bf41e123f34d4b82e110dd4537a096d7f1.jpg) + +![](images/beae299df6702a792dd14a0c9fbddd1713ee9adcf2191b4045d1e03ba5b2091a.jpg) + +![](images/39d2d0f85d6ae3fbf4ef643a3eebbd722fe3e818ab3131bc7506be0be76ac78e.jpg) + +![](images/c05dcc5fc4197e9bae1fec9033d6362f0534903ce7f7a257c1fd1c66d37a7344.jpg) +Ours + +![](images/23fe417875262a117bc698ac1b1c83b19e14790971c6a3f5ce8fe40eba873f47.jpg) + +![](images/b1425b8c234ca37e04d2da28bc9a54a450fcfb0b70f96abc9625b3d54f6d35ad.jpg) + +![](images/3ec0f95de02c398632d96772939250d2ae538a16719fd86562a68a05b262c0f6.jpg) + +![](images/245fa54f628bf8b32e67227aca539d88e5802245e2e3449acd53cb97692e0528.jpg) + +![](images/dc5dedeafffe59b0bd2e487af5fa6c257f454620e564a8d64539ac269ca28d50.jpg) + +![](images/d1e7eda0a03f2eae64ccf3b60ffc2cdbf87a2fdb046df7ab97a46e158c928726.jpg) + +![](images/db8a7a36fa41af87aa4fe36aa3642da0ef77d115bab8cea0458d867ba313a3b2.jpg) + +![](images/779a79ecea73d9bc3a2a9784015e928d2f69fd4937aa46ef0db8fe96263cebb0.jpg) + +![](images/742a6e02f575a930dee36484458dc7fc095cc49e2038dd32d20258680dea63fd.jpg) +Baaee + +![](images/9e01cbc2790ab67524434b9b10980ac1c4120ff47c4db70a277023823d20430d.jpg) +Figure 4: Qualitative results on canonical pose estimation by our proposed framework (MCSS) against our Baseline on Human 3.6M test split (S9, S11). Both the models are trained with supervision from labels of subject S1. Our method produces more accurate estimates for even for challenging poses like 'sitting' and 'bending'. + +![](images/95788a99b25a34510cb867f511314b512fc46fbd91abb0c0f7ff78f0c78da174.jpg) + +![](images/cdb83a722c8ec661b0be9366c85cb4a82d3a9edf46f2c31705200ebe803c63b2.jpg) + +![](images/c1e322653600c3c6a331d0052da87a4596eaff85841f9cba78e3e702ae5f7612.jpg) + +![](images/2f11ff09cf206858a3c5a1b84f1ad178fd431b1df22234a81d6a0ad9ad6d1efd.jpg) + +![](images/9fc0d0de133ea46d3f0d40e358ecb77c4dcb45d26c3c4dcb3922210babb4af8b.jpg) + +![](images/80d90c8a8eae255b43029eca14f97e568b24c5279567e621c58a5abc62e47664.jpg) + +![](images/eb7d2a9faed49e23a56be84f90f2fbdb11c069596552343a8d419d354e2f3f54.jpg) + +
SupervisionMethodN-MPJPEPA-MPJPE
S1MCSS-V1234111.791.9
MCSS-V123112.492.1
Baseline-V123158.6116.1
MCSS-V12116.695.1
Baseline-V12159.4122.5
+ +Table 3: N-MPJPE and PA-MPJPE values when pose estimation is performed on unseen viewpoints. Pose supervision is done only from subject S1 with varying number of views. Our weakly supervised loss $\mathcal{L}_{cnstr}$ is applied to all the views. MCSS-V1234 represents the model trained with $\mathcal{L}_{pose}$ (supervised loss) on all views. In MCSS-V123 and Baseline-V123, the supervised loss is from views (1, 2, 3) and so on. Testing is always on images from viewpoint 4. + +based cluster formation in our embedding space through retrieval tasks, ii) the correlation between embedding and pose distances. We additionally provide T-SNE [27] plots of our learned embedding space and qualitative results on view invariant pose retrieval in the supplementary. + +# 6.1. Cross-View and Cross-Subject Pose Retrieval + +Our learned embedding tries to project similar pose-samples close to each other irrespective of the subject, viewpoint and background. To validate this claim, we seek motivation from [44], [23] and propose Mean-PA-MPJPE@ $K$ to measure the Procrustes Aligned Mean Per Joint Position Error (PA-MPJPE) of $K$ closest neighbours from different views. Since, similar poses in terms of the intrinsic human-body pose can still have different orientations, we use Procrustes Aligned MPJPE to remove this artifact. We compare our model against an Oracle, which uses ground truth 3D-pose labels. Given a query image, we ensure that the + +retrieval database contains images taken from viewpoints other than that of the query image. It is done to clearly bring out the view invariance property of the proposed embedding. First, we report the Mean-PA-MPJPE@ $K$ between query pose and its $K$ nearest neighbors in the embedding space. In Fig. 5, we show the comparison of Mean-PA-MPJPE@ $K$ of retrieved poses when retrieval is done from images with: + +Case 1: all test subjects including that of query's. + +Case 2: all test subjects except that of query's - cross. + +We report our results relative to the Oracle. The nearly horizontal plots with low errors suggest that our model picks poses similar to that of the Oracle irrespective of $K$ . The error rate is slightly higher for $K = 1,2$ since our model + +![](images/5eafcc0b735d28c72c520cd780cf9691ad60ad8909af3845d78c4e930442cfbc.jpg) + +![](images/083ac5a3de0e34786ef7857258672bd9b4ead209c6540c1da14e9f49c07f3818.jpg) +Figure 5: Mean-PA-MPJPE for increasing number of retrievals $K$ on Human3.6M dataset. Prefix 'Cross-' indicates retrieval done on different subjects from that of query. $\mathcal{L}_{\text{pose}}$ is from subject S1 in both the cases. All values reported are relative to an Oracle. Low values indicate our retrieved poses are similar to that of the Oracle. PAMPJPE is in mm. + +retrieves images from clusters and does not always pick the one with the lowest error as done by the oracle. The error is lower for Case 1 than Case 2 due to the presence of images in the query database that share the exact same pose as that of query, but from different viewpoints. We can also note that upon $\mathcal{L}_{\text{pose}}$ from S1, the clustering and mean MPJPE improves in both same subject, Case 1, and cross-subject, Case 2, settings falling in line with our expectation that small amount of pose supervision improves clustering. + +
MethodK=1K=5K=10K=20
\( \mathcal{L}_{cnstr} \)48.4062.4656.2955.63
Cross-\( \mathcal{L}_{cnstr} \)82.2983.5380.6576.00
+ +Table 4: Mean-PA-MPJPE (mm) for increasing number of retrievals (K) on MPI-INF-3DHP dataset after finetuning with $\mathcal{L}_{cnstr}$ . Prefix Cross- indicates retrieval is done on subject other than query's. All values are reported with respect to the Oracle. + +# 6.2. Correlation between Embedding and Pose + +In this section, we illustrate the variation exhibited by our learned embedding with change in human pose. To this end, we plot mean embedding distance between a query image and stacks of images with increasing pose difference with that of the query in Fig. 6. Both the query and the image stacks belong to the same subject. One can observe a clear positive co-relation between embedding distance and corresponding pose difference. Further, same view and different view show similar correlations with poses justifying the fact that our learned embedding is multi-view consistent. + +# 6.3. Generalization & Limitations: + +To test cross-dataset generalization, we applied a model trained on Human 3.6M dataset and performed cross-view pose retrievals on MPI-INF-3DHP dataset. We obtained a mean MPJPE of $119.6\mathrm{mm}$ and $101.9\mathrm{mm}$ for $K = 10$ and $K = 20$ respectively. Further fine-tuning with $\mathcal{L}_{conrst}$ using multi-view images from MPI-INF-3DHP improved the performance to $62.46\mathrm{mm}$ and $56.29\mathrm{mm}$ , see Tab. 4. The dip in performance on cross dataset can be attributed to the fact that our feature extractor and embedding generating network has learnt a mapping from Human 3.6M images to a pose space and the same mapping is not applicable to the domain of MPI-INF-3DHP images because of huge variation in appearance and more challenging variations of poses. However, upon adding $\mathcal{L}_{conrst}$ , as shown in Tab. 4 the weak supervision generalizes to new dataset. + +![](images/f2f86e8fd19983f521e7ea344460bc510727da3b9d97c8f19ca7fb82029f5bf3.jpg) + +![](images/697fe8ab0b7b55d96a62ee0216492b9062e22536ec508cdf46ab7d8a3b82431e.jpg) +Figure 6: Variation of mean embedding distance with increasing pose variation. We use the show results on (S9,S11) with model being trained with $\mathcal{L}_{cnstr}$ on (S1,S5,S6,S7,S8) and $\mathcal{L}_{pose}$ on (S1). Images are stacked in bins based on the MPJPE difference of their corresponding poses with that of the query. On the Y-axis, the mean embedding distance between the query and the image stacks is plotted. In Same View, the query image and image stacks belong to the same viewpoint while in Different View, belong to different viewpoints. The results are averaged over 200 random queries for each subject. + +# 7. Conclusion and Future Work + +In this paper, we demonstrated a novel Multiview-Consistent Semi-Supervised learning approach to capture 3D human structure for pose estimation and retrieval tasks. With the help of our semi-supervised framework, the need for 3D-pose is reduced. It enables our method to outperform contemporary weakly-supervised approaches even while using a smaller network. Furthermore, we provided strong benchmarks for view-invariant pose retrieval on publicly available datasets. + +In future, we plan to use multi-view synchronised videos captured in-the-wild from a larger set of viewpoints to improve generalisation further. We also plan to extend our framework to capture very fine grained pose variations with our embedding by learning distributions of pose variations in temporally consecutive frames using limited 3D annotations. + +Acknowledgement: This work was supported by grants from Mercedes-Benz Research & Development India (RD/0117-MBRDI00-001). We would also like to thank Anurag Mundhada and Rishabh Dabral for helping with initial discussions and visualizations. + +# References + +[1] Riza Alp Güler, Natalia Neverova, and Iasonas Kokkinos. Denseospe: Dense human pose estimation in the wild. In CVPR, pages 7297-7306, 2018. 2 +[2] 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. 5, 6 +[3] Anurag Arnab, Carl Doersch, and Andrew Zisserman. Exploiting temporal context for 3d human pose estimation in the wild. In CVPR, pages 3390-3399, 2019. 2 +[4] Raja Chatila and Jean-Paul Laumond. Position referencing and consistent world modeling for mobile robots. In ICRA, pages 138-145, 1985. 1 +[5] Ching-Hang Chen, Ambrish Tyagi, Amit Agrawal, Dylan Drover, Rohith MV, Stefan Stojanov, and James M Rehg. Unsupervised 3d pose estimation with geometric self-supervision. In CVPR, pages 5707-5717, 2019. 2, 5 +[6] Xipeng Chen, Kwan-Yee Lin, Wentao Liu, Chen Qian, and Liang Lin. Weakly-supervised discovery of geometry-aware representation for 3d human pose estimation. In CVPR, pages 10887-10896, 2019. 2, 3, 5, 6 +[7] Xipeng Chen, Kwan-Yee Lin, Wentao Liu, Chen Qian, and Liang Lin. Weakly-supervised discovery of geometry-aware representation for 3d human pose estimation. In CVPR, pages 10887-10896, 2019. 5 +[8] Rishabh Dabral, Anurag Mundhada, Uday Kusupati, Safeer Afaqque, Abhishek Sharma, and Arjun Jain. Learning 3d human pose from structure and motion. In ECCV, pages 679-696, 2018. 1, 2 +[9] Ahmed Elgammal and Chan-Su Lee. Inferring 3d body pose from silhouettes using activity manifold learning. In CVPR, 2004. 2 +[10] Rob Fergus, Yair Weiss, and Antonio Torralba. Semi-supervised learning in gigantic image collections. In NIPS, pages 522-530, 2009. 1 +[11] Riza Alp Guler and Iasonas Kokkinos. Holopose: Holistic 3d human reconstruction in-the-wild. In CVPR, pages 10876-10886, 2019. 2 +[12] 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 10897-10906, 2019. 2 +[13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. 6 +[14] Seunghoon Hong, Hyeonwoo Noh, and Bohyung Han. Decoupled deep neural network for semi-supervised semantic segmentation. In NIPS, pages 1495-1503, 2015. 1 +[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. In T-PAMI, pages 1325-1339, 2013. 1, 5, 6 +[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. 2 + +[17] Angjoo Kanazawa, Jason Y Zhang, Panna Felsen, and Jitendra Malik. Learning 3d human dynamics from video. In CVPR, pages 5607-5616, 2019. 2 +[18] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In arXiv, 2014. 5 +[19] Muhammed Kocabas, Salih Karagoz, and Emre Akbas. Self-supervised learning of 3d human pose using multi-view geometry. In CVPR, pages 1077–1086, 2019. 2, 5 +[20] Jan J Koenderink and Andrea J Van Doorn. Affine structure from motion. In JOSA A, 1991. 1 +[21] Nikos Kolotouros, Georgios Pavlakos, Michael J Black, and Kostas Daniilidis. Learning to reconstruct 3d human pose and shape via model-fitting in the loop. In CVPR, pages 2252-2261, 2019. 2 +[22] Yevhen Kuznietsov, Jorg Stuckler, and Bastian Leibe. Semi-supervised deep learning for monocular depth map prediction. In CVPR, pages 2215-2223, 2017. 1 +[23] Suha Kwak, Minsu Cho, and Ivan Laptev. Thin-slicing for pose: Learning to understand pose without explicit pose estimation. In CVPR, pages 4938-4947, 2016. 2, 7 +[24] Wei-Sheng Lai, Jia-Bin Huang, and Ming-Hsuan Yang. Semi-supervised learning for optical flow with generative adversarial networks. In NIPS, page 353-363, 2017. 1 +[25] Chan-Su Lee and Ahmed Elgammal. Modeling view and posture manifolds for tracking. In CVPR, pages 1-8, 2007. 2 +[26] Chen Li and Gim Hee Lee. Generating multiple hypotheses for 3d human pose estimation with mixture density network. In CVPR, pages 9879-9887, 2019. 2 +[27] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. In JMLR, 2008. 7 +[28] Julieta Martinez, Rayat Hossain, Javier Romero, and James J Little. A simple yet effective baseline for 3d human pose estimation. In CVPR, pages 2659-2668, 2017. 2, 4 +[29] 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. 1, 5 +[30] 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. In TOG, 2017. 1, 2 +[31] Anastasiia Mishchuk, Dmytro Mishkin, Filip Radenovic, and Jiri Matas. Working hard to know your neighbor's margins: Local descriptor learning loss. In NIPS, page 4829-4840, 2017. 3, 5 +[32] Thomas B Moeslund and Erik Granum. A survey of computer vision-based human motion capture. In CVIU, 2001. 1 +[33] Greg Mori, Caroline Pantofaru, Nisarg Kothari, Thomas Leung, George Toderici, Alexander Toshev, and Weilong Yang. Pose embeddings: A deep architecture for learning to match human poses. In arXiv, 2015. 2 +[34] Mohamed Omran, Christoph Lassner, Gerard Pons-Moll, Peter V. Gehler, and Bernt Schiele. Neural body fitting: Uni + +fying deep learning and model-based human pose and shape estimation. In 3DV, pages 484-494, 2018. 2 +[35] Georgios Pavlakos, Xiaowei Zhou, Konstantinos G Derpanis, and Kostas Daniilidis. Coarse-to-fine volumetric prediction for single-image 3d human pose. In CVPR, pages 1263-1272, 2017. 1, 4 +[36] 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 7745-7754, 2019. 2, 3, 5 +[37] Alin-Ionut Popa, Mihai Zanfir, and Cristian Sminchisescu. Deep multitask architecture for integrated 2d and 3d human sensing. In CVPR, pages 4714-4723, 2017. 2 +[38] Helge Rhodin, Victor Constantin, Isinsu Katircioglu, Mathieu Salzmann, and Pascal Fua. Neural scene decomposition for multi-person motion capture. In CVPR, pages 7695-7705, 2019. 3 +[39] Helge Rhodin, Mathieu Salzmann, and Pascal Fua. Unsupervised geometry-aware representation for 3d human pose estimation. In ECCV, pages 765-782, 2018. 2, 3, 5, 6 +[40] Helge Rhodin, Jörg Spörri, Isinsu Katircioglu, Victor Constantin, Frédéric Meyer, Erich Müller, Mathieu Salzmann, and Pascal Fua. Learning monocular 3d human pose estimation from multi-view images. In CVPR, pages 8437-8446, 2018. 2, 4, 5, 6 +[41] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. Imagenet large scale visual recognition challenge. In IJCV, 2015. 5 +[42] Steven M Seitz, Brian Curless, James Diebel, Daniel Scharstein, and Richard Szeliski. A comparison and evaluation of multi-view stereo reconstruction algorithms. In CVPR, pages 519-528, 2006. 1 +[43] Saurabh Sharma, Pavan Teja Varigonda, Prashast Bindal, Abhishek Sharma, and Arjun Jain. Monocular 3d human pose estimation by generation and ordinal ranking. In ICCV, pages 2325-2334, 2019. 2 +[44] Omer Sumer, Tobias Dencker, and Bjorn Ommer. Self-supervised learning of pose embeddings from spatiotemporal relations in videos. In ICCV, pages 4308-4317, 2017. 2, 7 +[45] Xiao Sun, Jiaxiang Shang, Shuang Liang, and Yichen Wei. Compositional human pose regression. In ICCV, pages 2621-2630, 2017. 1, 2 +[46] Xiao Sun, Bin Xiao, Fangyin Wei, Shuang Liang, and Yichen Wei. Integral human pose regression. In ECCV, pages 536-553, 2018. 1, 2, 4, 5 +[47] Bugra Tekin, Isinsu Katircioglu, Mathieu Salzmann, Vincent Lepetit, and Pascal Fua. Structured prediction of 3d human pose with deep neural networks. In BMVC, pages 130.1-130.11, 2016. 2 +[48] Yurun Tian, Bin Fan, and Fuchao Wu. L2-net: Deep learning of discriminative patch descriptor in euclidean space. In CVPR, pages 6128-6136, 2017. 5 +[49] Denis Tome, Chris Russell, and Lourdes Agapito. Lifting from the deep: Convolutional 3d pose estimation from a single image. In CVPR, pages 5689-5698, 2017. 1, 2, 4, 5 + +[50] Raquel Urtasun, David J Fleet, and Pascal Fua. 3d people tracking with gaussian process dynamical models. In CVPR, pages 238-245, 2006. 2 +[51] Marton Véges, Viktor Varga, and András Lörincz. 3d human pose estimation with siamese equivariant embedding. In Neurocomputing, pages 194-201, 2019. 2, 3 +[52] Bastian Wandt and Bodo Rosenhahn. Repnet: Weakly supervised training of an adversarial reprojection network for 3d human pose estimation. In CVPR, pages 7774-7783, 2019, 2, 4 +[53] Keze Wang, Liang Lin, Chenhan Jiang, Chen Qian, and Pengxu Wei. 3d human pose machines with self-supervised learning. In T-PAMI, 2019. 2 +[54] Long Zhao, Xi Peng, Yu Tian, Mubbasir Kapadia, and Dimitris N Metaxas. Semantic graph convolutional networks for 3d human pose regression. In CVPR, pages 3420-3430, 2019, 2 +[55] Xingyi Zhou, Qixing Huang, Xiao Sun, Xiangyang Xue, and Yichen Wei. Weakly-supervised transfer for 3d human pose estimation in the wild. In ICCV, pages 398-407, 2017. 1, 2, 4 \ No newline at end of file diff --git a/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/images.zip b/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..5e92875d9c3fe96881fe843df17204d2ffbf0d9e --- /dev/null +++ b/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24a146cf8819b1b60a16be1b8470c82dc86c224f855156287c3d63d59161f2e2 +size 379719 diff --git a/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/layout.json b/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f121a38d757547210a03dcb6d7485ded2177cc06 --- /dev/null +++ b/multiviewconsistentsemisupervisedlearningfor3dhumanposeestimation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:93ee6b4d480f02ff2b3b8205ae5c18523e4809b58ea917a0ae3c618cb31fe23a +size 442194 diff --git a/musicgestureforvisualsoundseparation/34f74f88-f44e-49bf-921e-0bbb214eb547_content_list.json b/musicgestureforvisualsoundseparation/34f74f88-f44e-49bf-921e-0bbb214eb547_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e83faf59967b7dd4685f36d45a47596028d15b76 --- /dev/null +++ b/musicgestureforvisualsoundseparation/34f74f88-f44e-49bf-921e-0bbb214eb547_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a516e206dc157235c8a9923fb84dfb05aa8c6a8328067f574ffe604e1ec2238 +size 67676 diff --git a/musicgestureforvisualsoundseparation/34f74f88-f44e-49bf-921e-0bbb214eb547_model.json b/musicgestureforvisualsoundseparation/34f74f88-f44e-49bf-921e-0bbb214eb547_model.json new file mode 100644 index 0000000000000000000000000000000000000000..678a4a6952ea4b3496be75b6e3fee69d90522a10 --- /dev/null +++ b/musicgestureforvisualsoundseparation/34f74f88-f44e-49bf-921e-0bbb214eb547_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9561b20055560165e89ef8eb89359a6864bb0c03ca3b26114f57b82637f88b85 +size 87623 diff --git a/musicgestureforvisualsoundseparation/34f74f88-f44e-49bf-921e-0bbb214eb547_origin.pdf b/musicgestureforvisualsoundseparation/34f74f88-f44e-49bf-921e-0bbb214eb547_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b335f0b4a87cc26c6a9c79ecedf069bd35af26b8 --- /dev/null +++ b/musicgestureforvisualsoundseparation/34f74f88-f44e-49bf-921e-0bbb214eb547_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:250abf47673a765df4f0e3fe59ea6e3424c69b0a3c580a4b2f00c8e0a94d5fca +size 1160392 diff --git a/musicgestureforvisualsoundseparation/full.md b/musicgestureforvisualsoundseparation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..99eb10933d56b5b994abc371a22070a4eb3bfe5a --- /dev/null +++ b/musicgestureforvisualsoundseparation/full.md @@ -0,0 +1,302 @@ +# Music Gesture for Visual Sound Separation + +Chuang Gan $^{1,2}$ , Deng Huang $^{2}$ , Hang Zhao $^{1}$ , Joshua B. Tenenbaum $^{1}$ , Antonio Torralba $^{1}$ $^{1}$ MIT, $^{2}$ MIT-IBM Watson AI Lab + +![](images/484524d170e4b56d81149e05ac1a526c60851e87d5a8e1355753a09bb6def47c.jpg) + +![](images/86bd88783ebd648331c2fa5a31838c83e545cd6e1efa87d329cfdefcbc462412.jpg) + +![](images/7505037fb6c054b1fd6acafa54b27426eeaa8f45898583f899507a6b7e54fae3.jpg) + +![](images/21c61766de986151ed7342f374c5ecb240090f8b5bd60e3c8bb6a597a2d429a6.jpg) +Figure 1: We propose to leverage explicit body dynamics motion cues for visual sound separation in music performances. We show that our new model can perform well on both heterogeneous and homogeneous music separation tasks. + +![](images/fccbefdf1a51f542db8c7ceb2de355881e70adbc1298110003bd1d2c4fd9cebc.jpg) + +![](images/03d54104ade02d0b43d58c63f63ad10adb57441ae23cadf983642cd38e991eaa.jpg) + +# Abstract + +Recent deep learning approaches have achieved impressive performance on visual sound separation tasks. However, these approaches are mostly built on appearance and optical flow like motion feature representations, which exhibit limited abilities to find the correlations between audio signals and visual points, especially when separating multiple instruments of the same types, such as multiple violins in a scene. To address this, we propose "Music Gesture," a keypoint-based structured representation to explicitly model the body and finger movements of musicians when they perform music. We first adopt a context-aware graph network to integrate visual semantic context with body dynamics, and then apply an audio-visual fusion model to associate body movements with the corresponding audio signals. Experimental results on three music performance datasets show: 1) strong improvements upon benchmark metrics for hetero-musical separation tasks (i.e. different instruments); + +2) new ability for effective homo-musical separation for piano, flute, and trumpet duets, which to our best knowledge has never been achieved with alternative methods. + +# 1. Introduction + +Music performance is a profoundly physical activity. Body and instrument interact in nuanced gestures to produce unique sounds [21]. When performing, pianists may strike the keys at a lower register or "tickle the ivory" up high; Violin players may move vigorously through a progression while another player sways gently with a melodic base; Flautists press a combination of keys to produce a specific note. As humans, we have the remarkable ability to distinguish different sounds from one another, and associate the sound we hear with the corresponding visual perception from the musician's bodily gestures. + +Inspired by this human ability, we propose "Music Gesture" (shown in Figure 1), a structured keypoint-based + +visual representations to make use of the body motion cues for sound source separation. Our model is built on the mix-and-separate self-supervised training procedure initially proposed by Zhao et al. [56]. Instead of purely relying on visual semantic cues [56, 17, 19, 52] or low-level optical-flow like motion representations [55], we consider to exploit the explicit human body and hand movements in the videos. To achieve this goal, we design a new framework, which consists of a video analysis network and an audio-visual separation network. The video analysis network extracts body dynamics and semantic context of musical instruments from video frames. The audio-visual separation network is then responsible for separating each sound source based on the visual context. In order to better leverage the body dynamic motions for sound separations, we further design a new audio-visual fusion module in the middle of the audio-visual separation network to adjust sound features conditioned on visual features. + +We demonstrate the effectiveness of our model on three musical instrument datasets, URMP [31], MUSIC [56] and AtinPiano [35]. Experimental results show that by explicitly modeling the body dynamics through the keypoint-based structured visual representations, our approach performs favorably against state-of-the-art methods on both hetero-musical and homo-musical separation task. In summary, our work makes the following contributions: + +- We pave a new research direction on exploiting body dynamic motions with structured keypoint-based video representations to guide the sound source separation. +- We propose a novel audio-visual fusion module to associate human body motion cues with the sound signals. +- Our system outperforms previous state-of-the-arts approaches on hetero-musical separation tasks by a large margin. +- We show that the keypoint-based structured representations open up new opportunities to solve harder homo-musical separation problem for piano, flute, and trumpet duets. + +# 2. Related Work + +Sound separation. Sound separation is a central problem in the audio signal processing area [33, 22], while the classic solutions for it are based on Non-negative Matrix Factorization (NMF) [51, 11, 47]. These are not very effective as they rely on low-level correlations in the signals. Deep learning based methods are taking over in the recent years. Simpson et al. [46] and Chandra et al. [9] proposed CNN models to predict time-frequency masks for music source separation and enhancement. Another challenging problem in speech separation is identity permutation: a spectrogram classification model could not deal with the case with arbitrary number of speakers talking simultaneously. To solve + +this problem, Hershey et al. [24] proposed Deep Clustering and Yu et al. [54] proposed a speaker-independent training framework. + +Visual sound separation. Our work falls into the category of visual sound separation. Early works [5] leveraged the tight associations between audio and visual onset signal to perform audio-visual sound attribution. Recently, Zhao et al. [56] proposed a framework that learns from unlabeled videos to separate and localize sounds with the help of visual semantics cues. Gao et al. [17] combined deep networks with NMF for sound separation. Ephrat et al. [12] and Owens et al. [37] proposed to used vision to improve the quality of speech separation. Xu et al. [52] and Gao et al. [19] further improved the models with recursive models and co-separation loss. Those works all demonstrated how semantic appearances could help with sound separation. However, these methods have limited capabilities to capture the motion cues, thus restricts their applicability to solve harder sound source separation problems. + +Most recently, Zhao et al. [55] proposed to leverage temporal motion information to improve the vision sound separation. However, this algorithm has not yet seen wide applicability to sound separation on real mixtures. This is primarily due to the trajectory and optical flow like motion features they used are still limited to model the human-object interactions, thus can not provide strong visual conditions for the sound separation. Our work overcomes these limitations in that we study the explicit body movement cues using structured keypoint-based structured representations for audio-visual learning, which has never been explored in the audio-visual sound separation tasks. + +Audio-visual learning. With the emergence of deep neural networks, bridging signals of different modalities becomes easier. A series of works have been published in the past few years on audio-visual learning. By learning audio model and image model jointly or separately by distillation, good audio/visual representations can be achieved [38, 4, 2, 32, 14, 30]. Another interesting problem is sounding object localization, where the goal is to associate sounds in the visual input spatially [26, 25, 3, 43, 56]. Some other interesting directions include biometric matching [36], sound generation for videos [57], auditory vehicle tracking [16], emotion recognition [1], audio-visual co-segmentation [42], audio-visual navigation [15], and 360/stereo sound from videos [18, 34]. + +Audio and body dynamics. There are numerous works to explore the associations between speech and facial movements [7, 6]. Multi-model signals extracted from face and speech has been used to do facial animations using speech [28, 49], generate high-quality talking face from audio [48, 27] separate mixed speech signals of multiple + +![](images/701b64278d10d030fb27df05b38242e8caf41ab51019256be55c5aced2af72ee.jpg) +Figure 2: An overview of our model architecture. It consists of two components: a video analysis network and a visual audio separation network. The video analysis network first takes video frames to extract global context and keypoint coordinates; Then a GCN is applied to integrate the body dynamic with semantic context, and outputs a latent representation. Finally, an audio-visual separation network separates sources from the mixture audio conditioned on the visual features. + +speakers [12], on/off screen audio source separation[37], and lip reading from raw videos [10]. In contrast, the correlations between body pose with sound were less explored. The most relevant to us are recent works on predicting body dynamics from music [44] and body rhythms from speech [20]. This is the inverse of our goal to separate sound sources using body dynamic cues. + +# 3. Approach + +We first formalize the visual sound separation task and summarize our system pipeline in Section 3.1. Then we present the video analysis network for learning structured representation (Section 3.2) and audio-visual separation model (Section 3.3). Finally, we introduce our training objective and inference procedures in Section 3.4. + +# 3.1. Pipeline Overview + +Our goal is to associate the body dynamics with the audio signals for sound source separation. We adopt the commonly used "mix-and-separate" self-supervised training procedure introduced in [56]. The main idea of this training procedure is to create synthetic training data by mixing arbitrary sound sources from different video clips. Then the learning objective is to separate each sound from + +mixtures conditioned on its associated visual context. + +Concretely, our framework consists of two major components: a video analysis network and a audio-visual separation network (see Figure 2). During training, we randomly select $N$ video clips with paired video frames and audio signal $\{V_k, S_k\}$ , and then mix their audios by linear combinations of the audio inputs to form a synthetic mixture $S_{mix} = \sum_{k=1}^{N} S_k$ . Given a video clip $V_k$ , the video analysis network extracts global context and body dynamic features from videos. The audio-visual separation network is then responsible for separating its audio signal $S_k$ from the mixture audio $S_{mix}$ conditioned on the corresponding visual context $V_k$ . To be noted, we trained the neural network in a supervised fashion, but it learned from unlabeled video data. Therefore, we consider the training pipeline as self-supervised learning. + +# 3.2. Video Analysis Network + +Our proposed video analysis network integrates keypoint-based structured visual representations, together with global semantic context features. + +Visual semantic and keypoint representations. To extract global semantic features from video frames, we use ResNet-50 [23] to extract the features after the last spatial + +average pooling layer from the first frame of each video clip. Therefore, we obtain a 2048-dimensional context feature vector for each video clip. We also aim to capture the explicit movement of the human body parts and hand fingers through the keypoint representations. To achieve that, we adopt the AlphaPose toolbox [13] to estimate the 2D locations of human body joints. For estimation of hand pose, we first apply a pre-trained hand detection model and then use the OpenPose [8] hand API [45] to estimate the coordinates of hand keypoints. As a result, we extract 18 keypoints for human body and 21 keypoints for each hand. Since the keypoints estimation in videos in the wild is challenging and noisy, we maintain both 2D coordinates $(X,Y)$ and the confidence score of each estimated keypoint. + +Context-Aware Graph CNN. Once the visual semantic feature and keypoints are extracted from the raw video, we adopt a context-aware Graph CNN (CT-GCN) to fuse the semantic context of instruments and human body dynamics. This architecture is designed for the non-grid data, suitable for explicitly modeling the spatial-temporal relationships among different keypoints on the body and hands. + +The network architecture design is inspired by previous work on action recognition [53] and human shape reconstruction [29]. Similar to [53], we start by constructing a undirected spatial-temporal graph $G = \{V, E\}$ on a human skeleton sequence. In this graph, each node $v_{i} \in \{V\}$ corresponds to a keypoint of the human body; edges reflect the natural connectivity of body keypoints. + +The input features for each node is represented as 2D coordinates and the confidence score of a detected keypoint over time $T$ . To model the spatial-temporal body dynamics, we first apply a Graph Convolution Network to encode the pose at each time step independently. Then, we perform a standard temporal convolution on the resulting tensor to fuse the temporal information. The encoded pose feature $f_{v}$ is defined as follows: + +$$ +f _ {v} = \hat {A} X W _ {s} W _ {t}, \tag {1} +$$ + +where $X \in R^{N \times T \times D_n}$ is the input features, $W_s$ and $W_t$ are the weight matrices of spatial graph convolution and 2D convolution, and $\hat{A} \in R^{N \times N}$ is the row-normalized adjacency matrix of the graph; $N$ represents the number of keypoints; $D_n$ represents the feature dimension for each input node. Inspired by previous work [53], we define the adjacency matrix based on the joint connections of the body and fingers. The output of the GCNs is updated features of each keypoint node. + +To further incorporate the visual semantic cues, we concatenated the visual appearance context features to each node feature as the final output of the video analysis network. The context-aware graph CNN is capable of modeling both semantic context and body dynamics, thus providing strong visual cues to guide sound separations. There + +could be other model designs options. We leave this to future work. + +# 3.3. Audio-Visual Separation Network + +Finally, we have an audio-visual separation network, which takes the spectrogram of mixture audio with visual representation produced by the video analysis network as input, to predict a spectrogram mask and generate the audio signal for the selected video. + +Audio Network. We adopt a U-Net style architecture [41], namely an encoder-decoder network with skip connections for the audio network. It consists of 4 dilated convolution layers and 4 dilated up-convolution layers. All dilated convolutions and up-convolutions use $3 \times 3$ spatial filters with stride 2, dilation 1 and followed by a BatchNorm layer and a Leaky ReLU. The input of the audio network is a 2D time-frequency spectrogram of mixture sound and the output is a same-size binary spectrogram mask. We infuse the visual features into the middle part of the U-Net for guiding the sound separation. + +Audio-visual fusion. To better leverage body dynamic cues to guide the sound separation, we adopt a self-attention [50] based cross-modal early fusion module to capture the correlations between body movement with the sound signals. As shown in Figure 3, the fused feature $z_{t}$ at each time step $t$ is defined as follows: + +$$ +h _ {t} = \operatorname {S o f t m a x} \left(f _ {s} ^ {t} \cdot f _ {v} ^ {t T}\right) f _ {v} ^ {t} + f _ {s} ^ {t}, \tag {2} +$$ + +$$ +z _ {t} = M L P \left(h _ {t}\right) + h _ {t}, \tag {3} +$$ + +where $f_{s}^{t} \in R^{F \times D_{s}}$ and $f_{v}^{t} \in R^{N \times D_{v}}$ represents visual and sound features at time step $t$ . $F, D_{v}$ , and $D_{s}$ denote the frequency bases of the sound spectrogram, the dimensions of visual features, and the dimension of sound features, respectively. The softmax computation is along the dimension of visual feature channels. The visual feature is then weighted by attention matrix and concatenated with the sound feature. We further add a multi-layer perceptron (MPL) with residual connection to produce the output features. The MLP is + +![](images/ae84daeb8b260e9da6fd21fda20ca7787d440dde3c47adee335e52cea71b65fc.jpg) +Figure 3: Audio-visual fusion module of the model in Figure 2. + +implemented with two fully-connected layers with a ReLU activation function. This attention mechanism enforces the model to focus more on the discriminative body keypoints, and associate them with the corresponding sound components on the spectrogram. + +# 3.4. Training and Inferences + +The learning objective of our model is to estimate a binary mask $M_{k}$ . The ground truth mask of $k$ -th video is calculated whether the target sound is the dominant component in the input mixed sound on magnitude spectrogram $S$ , i.e., + +$$ +M _ {k} (t, f) = \llbracket S _ {k} (t, f) \geq S _ {m i x} (t, f) \rrbracket , \quad \forall k = (1, \dots , N), \tag {4} +$$ + +where $(t, f)$ represents the time-frequency coordinates in the sound spectrogram. The network is trained by minimizing the per-pixel sigmoid cross entropy loss between the estimated masks and the ground-truth binary masks. Then the predicted mask is thresholded and multiplied with the input complex STFT coefficients to get a predicted sound spectrogram. Finally, we apply an inverse short-time Fourier Transform (iSTFT) with the same transformation parameters on the predicted spectrogram to reconstruct the waveform of separated sound. + +During testing, our model takes a single realistic multisource video to perform sound source separation. We first localize human in the video frames. For each detected person, we use the video analysis network to extract visual feature to isolate the portion of the sound belonging to this musician from the mixed audio. + +# 4. Experiments + +In this section, we discuss our experiments, implementation details, comparisons and evaluations. + +# 4.1. Dataset + +We perform experiments on three video music performance datasets, namely MUSIC-21[55], URMP [31] and AtinPiano [35]. MUSIC-21 is an untrimmed video dataset crawled by keyword query from Youtube. It contains music performances belonging to 21 categories. This dataset is relatively clean and collected for the purpose of training and evaluating visual sound source separation models. URMP [31] is a high quality multi-instrument video dataset recorded in studio and provides ground truth labels for each sound source. AtinPiano [35] is a dataset where the piano video recordings are filmed in a way that camera is looking down on the keyboard and hands. + +# 4.2. Hetero-musical Separation + +We first evaluate the model performance in the task of separating sounds from different kinds of instruments on + +the MUSIC dataset. + +Baseline and evaluation metrics + +We consider 5 state-of- + +the-art systems to compare against. + +- NMF [51] is a well-established pipeline for audio-only source separation based on matrix factorization; +- Deep Separation [9] is a CNN-based audio-only source separation approach; +- MIML [17] is a model that combines NMF decomposition and multi-instance multi-label learning; +- Sound of Pixels [56] is a pioneering work that uses vision for sound source separations; +- Co-separation [19] devices a new model that incorporates an object-level co-separation loss into the mix-and-separate framework [56]; +- Sound of Motions [55] is a recently proposed self-supervised model which leverages trajectory motion cues. + +We adopt the blind separation metrics, including signal-to-distortion ratio (SDR), and signal-to-interference ratio (SIR) to quantitatively compare the quality of the sound separation. The results reported in this paper were obtained by using the open-source mir_eval [40] library. + +Experimental Setup Following the experiment protocol in Zhao et al. [55], we split all videos on MUSCI dataset into a training set and a test set. We train and evaluate our model using mix-2 and mix-3 samples, which contain 2 and 3 sound sources of different instruments in mixtures. Since the real mix video data with multiple sounds on the MUSIC dataset do not have ground-truth labels for quantitative evaluation, we construct a synthetic testing set by mixing solo videos. The result of model performances are reported on a validation set with 256 pairs of sound mixtures, the same as [55]. We also perform a human study on the real mixtures on MUSIC and URMP dataset to measure human's perceptual quality. + +Implementation Details We implement our framework using Pytorch. We first extract a global context feature from a video clip using ResNet-50 [23] and the coordinates of body and hand key points for each frame using OpenPose [8] and AlphaPose [13]. Our GCN model consists of 11-layers with residual connections. When training the graph CNN network, we first pass the keypoint coordinates to a batch normalization layer to keep the scale of the input same. During training, we also randomly move the coordinates as data augmentation to avoid overfitting. + +For the audio data pre-processing, we first re-sample the audio to $11\mathrm{kHz}$ . During training, we randomly take a 6-second video clip from the dataset. The audio-visual separation network takes a 6-second mixed audio clip as input, and transforms it into spectrogram by Short Time Fourier Transform (STFT). We set the frame size and hop size as + +
Methods2-Mix3-Mix
SDRSIRSDRSIR
NMF [51]2.786.702.012.08
Deep Separation [9]4.757.00--
MIML [17]4.256.23--
Sound of Pixels [56]7.5213.013.658.77
Co-Separation [19]7.6413.83.948.93
Sound of Motion [55]8.3114.824.879.48
Our10.1215.815.4111.47
+ +1022 and 256, respectively. The spectrogram is then fed into a U-Net with 4 dilated convolution and 4 deconvolution layers. The output of U-Net is an estimated binary mask. We set a threshold of 0.7 to obtain a binary mask, and then multiply it with the input mixture sound spectrogram. An iSTFT with the same parameters as the STFT is applied to obtain the final separated audio waveforms. + +We train our model using SGD optimizer with 0.9 momentum. The audio separation Network and the fusion module use a learning rate of 1e-2; the ST-GCN Network and Appearance Network use a learning rate of 1e-3. + +Quantitative Evaluation. Table 1 summarizes the comparison results against state-of-the-art methods on MUSIC. We observe that our method consistently outperforms all baselines in separation accuracy, as captured across metrics. Remarkably, our system outperforms a previous state-of-the-art algorithm [55] by 1.8dB on 2-mix and 0.6dB on 3-mix source separation in term of SDR score. These quantitative results suggest that our model can successfully exploit the explicit body dynamic motions to improve the sound separation quality. + +Qualitative evaluation on real mixtures. Our quantitative results demonstrate that our model achieves better results than baselines. However, these metrics are limited in their ability to reflect the actual perceptual quality of the sound separation result on real-world videos. Therefore, we further conduct a subjective human study using real mixture videos from MUSIC and URMP datasets on Amazon Mechanical Turk (AMT). + +Specifically, we compare sound separation results of our own model with best baseline system [55] The AMT workers are required to compare these two systems and answer the following question: "Which sound separation result is better?." We randomly shuffle the orders of two models to + +Table 1: Sound source separation performance ( $N = 2,3$ mixture) on different instruments. Compared to previous approaches, our models with body dynamic motion information perform better in sound separation. + +
Method2-Mix3-Mix
Sound of Motions [55]24%16%
Ours76%84%
+ +Table 2: Human evaluation results for the sound source separation on mixtures of the different instruments. + +
MethodSDR
Ours w/o fusion9.64
Ours w/o RGB10.22
Our10.12
+ +Table 3: Ablated study on SDR metric for mixtures of 2 different instruments. + +avoid shortcut solutions. Each job is performed independently by 3 AMT workers. Results are shown in Table 2 using majority voting. From this table, we find workers favor our system for both 2-mix and 3-mix sound separation. + +# 4.3. Ablated study + +In this section, we perform in-depth ablation studies to evaluate the impact of each component of our model. + +Keypoint-based representation. The main contribution of our paper is to use explicit body motions through keypoint-based structure representations for source separation. To further understand the ability of these representations, we conduct an ablated study using the keypoint-based structure representation only, without the RGB context features. Interestingly, we can observe that keypoint-based representations alone could also achieve very strong results (see Table 3). We hope our findings could inspire more works using structured keypoint-based representations for the audio-visual scene analysis tasks. + +Visual-Audio Fusion Module. We propose a novel attention based audio-visual fusion model. To verify its efficacy, we replace this module with Feature-wise Linear Modulation (FiLM) [39] used in [55]. The comparison results are shown in Table 3. We can find that the proposed audio-visual fusion module brings 0.5dB improvement in term of SDR metric on 2-mix sound source separation. + +# 4.4. Homo-musical Separation + +In this section, we conduct experiments on a more challenging task, sound separation when sound is generated by the same instruments. + +Experiment Setup We select 5 kinds of musical instruments whose sounds are closely related to body dynamic: trumpet, flute, piano, violin, and cello for evaluation. + +Inspired by previous work [55, 37], we also adopt a 2-stage curriculum learning strategy to train the sound separation model of the same instruments. In particular, we first pre-train the model on multiple instrument separation, then learn to separate the same instrument. We compare our model against SoM [55], since previous appearance based models fail to produce meaningful results in this challenging setting. The results are measured by both automatic SDR scores and human evaluations on AMT. + +Results Analysis. Results are shown in Table 4 and Table 5. From these tables, we have three key observations: 1) our proposed model consistently outperforms the SoM system [55] for all five instruments measured by both automatic and human evaluation metrics; 2) The quantitative results on separating violin and cello duets are close (See Table 4). However, we find that the SoM system is quite brittle when testing on the real mixtures. People tend to vote our system more on real mixtures, as shown in Table 5; 3) The SoM provides much inferior results on trumpet, piano, and flute duets compared to our model, since the gap is larger than $3\mathrm{dB}$ . This is not very surprising since separating duet of these three instruments mainly relies on hand pose movements. It is very hard for the trajectory and optical flow features to capture such fine-grained hand movements. Our approach can overcome this challenge in that we explicit model the body motions by tracking the coordinates changes of hand keypoints. These results further validate the efficacy of body dynamics motions on solving more and harder visual sound separation problems. + +# 4.5. Visualizations + +As a further analysis, we would like to understand how body keypoints matters the sound source separation. Figure 4 visualize the learned attention map of keypoints in the audio-visual fusion module. We observe that our model tends to focus more on hand keypoints when separating gui + +
InstrumentSoM [55]Ours
trumpet1.84.9
flute1.55.3
piano0.83.8
violin6.36.7
cello5.46.1
+ +Table 4: Sound source separation performance on duets of the same instruments under the SDR metric. + +
InstrumentSoM [55]Ours
trumpet18%82%
flute14%86%
piano30%70%
violin26%74%
cello28%72%
+ +Table 5: Human evaluation result for the sound source separation on mixture of the same instruments. + +tar and flute sounds, while pays more attention to elbows when separating the cello and violin. + +Fig 5 shows qualitative results comparison between our model and the previous state-of-the-art SoM [55] on separating 3 different instruments and 2 same instruments. The first row shows the video frame example, the second row shows the spectrogram of the audio mixture. The third to fifth rows show ground truth masks, masks predicted by SoM, and masks predicted by our method. The sixth to eighth rows show the ground truth spectrogram and comparisons of predicted spectrogram after applying masks on the input spectrogram. We can observe that our system produces cleaner sound separation outputs. + +Though the results are remarkable and constitute a noticeable step towards more challenging visual sound separation, our system is still far from perfect. We observed that + +![](images/fc6aa5100e4ccaf677f183c48917d7763c8b314248d578756e274312cd87d098.jpg) +Figure 4: The attention map of body keypoints. Brighter color means higher attention score. + +![](images/123bf2c9785a25ea493c568cf65ee2e1721ed4aa3b0ae329e69bc874cb21b730.jpg) +Figure 5: Qualitative results on visual sound separation compared with Sound of Motions (SoM) [55]. + +our method is not resilient against camera viewpoint change and body part occlusions of the musician. We conjecture that unsupervised learning of keypoints from raw images for visual sound separation might be a promising direction to explore for future work. + +# 5. Conclusions and Future Work + +In this paper, we show that keypoint-based structured visual representations are powerful for visual sound separation. Extensive evaluations show that, compared to previous appearance and low-level motion-based models, we are able to perform better on audio-visual source separation of dif + +ferent instruments; we can also achieve remarkable results on separating sounds of same instruments (e.g. piano, flute, and trumpet), which was impossible before. We hope our work will open up avenues of using structured visual representations for audio-visual scene analysis. In their future, we plan to extend our approach to more general audio-visual data with more complex human-object interactions. + +Acknowledgement This work is supported by ONR MURI N00014-16-1-2007, the Center for Brain, Minds, and Machines (CBMM, NSF STC award CCF-1231216), and IBM Research. + +# References + +[1] Samuel Albanie, Arsha Nagrani, Andrea Vedaldi, and Andrew Zisserman. Emotion recognition in speech using cross-modal transfer in the wild. ACM Multimedia, 2018. 2 +[2] Relja Arandjelovic and Andrew Zisserman. Look, listen and learn. In 2017 IEEE International Conference on Computer Vision (ICCV), pages 609-617. IEEE, 2017. 2 +[3] Relja Arandjelović and Andrew Zisserman. Objects that sound. arXiv preprint arXiv:1712.06651, 2017. 2 +[4] Yusuf Aytar, Carl Vondrick, and Antonio Torralba. Sound-net: Learning sound representations from unlabeled video. In Advances in Neural Information Processing Systems, pages 892-900, 2016. 2 +[5] Zohar Barzelay and Yoav Y Schechner. Harmony in motion. In Computer Vision and Pattern Recognition, 2007. CVPR'07. IEEE Conference on, pages 1-8. IEEE, 2007. 2 +[6] Matthew Brand. Voice puppetry. In Proceedings of the 26th annual conference on Computer graphics and interactive techniques, pages 21-28, 1999. 2 +[7] Christoph Bregler, Michele Covell, and Malcolm Slaney. Video rewrite: driving visual speech with audio. 1997. 2 +[8] 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. 4, 5 +[9] Pritish Chandna, Marius Miron, Jordi Janer, and Emilia Gómez. Monoaural audio source separation using deep convolutional neural networks. In ICLVASS, pages 258-266, 2017. 2, 5, 6 +[10] Joon Son Chung, Andrew W Senior, Oriol Vinyals, and Andrew Zisserman. Lip reading sentences in the wild. In CVPR, pages 3444-3453, 2017. 3 +[11] Andrzej Cichocki, Rafal Zdunek, Anh Huy Phan, and Shunichi Amari. Nonnegative matrix and tensor factorizations: applications to exploratory multi-way data analysis and blind source separation. John Wiley & Sons, 2009. 2 +[12] Ariel Ephrat, Inbar Mosseri, Oran Lang, Tali Dekel, Kevin Wilson, Avinatan Hassidim, William T Freeman, and Michael Rubinstein. Looking to listen at the cocktail party: a speaker-independent audio-visual model for speech separation. ACM Transactions on Graphics (TOG), 37(4):112, 2018. 2, 3 +[13] Hao-Shu Fang, Shuqin Xie, Yu-Wing Tai, and Cewu Lu. RMPE: Regional multi-person pose estimation. In ICCV, 2017. 4, 5 +[14] Chuang Gan, Naiyan Wang, Yi Yang, Dit-Yan Yeung, and Alex G Hauptmann. Devnet: A deep event network for multimedia event detection and evidence recounting. In CVPR, pages 2568-2577, 2015. 2 +[15] Chuang Gan, Yiwei Zhang, Jiajun Wu, Boqing Gong, and Joshua B Tenenbaum. Look, listen, and act: Towards audio-visual embodied navigation. ICRA, 2020. 2 +[16] Chuang Gan, Hang Zhao, Peihao Chen, David Cox, and Antonio Torralba. Self-supervised moving vehicle tracking with stereo sound. In ICCV, pages 7053-7062, 2019. 2 + +[17] Ruohan Gao, Rogerio Feris, and Kristen Grauman. Learning to separate object sounds by watching unlabeled video. In ECCV, 2018. 2, 5, 6 +[18] Ruohan Gao and Kristen Grauman. 2.5 d visual sound. arXiv preprint arXiv:1812.04204, 2018. 2 +[19] Ruohan Gao and Kristen Grauman. Co-separating sounds of visual objects. ICCV, 2019. 2, 5, 6 +[20] Shiry Ginosar, Amir Bar, Gefen Kohavi, Caroline Chan, Andrew Owens, and Jitendra Malik. Learning individual styles of conversational gesture. In CVPR, pages 3497-3506, 2019. 3 +[21] Rolf Inge Godoy and Marc Leman. Musical gestures: Sound, movement, and meaning. Routledge, 2010. 1 +[22] Simon Haykin and Zhe Chen. The cocktail party problem. Neural computation, 17(9):1875-1902, 2005. 2 +[23] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 3, 5 +[24] John R Hershey, Zhuo Chen, Jonathan Le Roux, and Shinji Watanabe. Deep clustering: Discriminative embeddings for segmentation and separation. In Acoustics, Speech and Signal Processing (ICASSP), 2016 IEEE International Conference on, pages 31-35. IEEE, 2016. 2 +[25] John R. Hershey and Javier R. Movellan. Audio vision: Using audio-visual synchrony to locate sounds. In S. A. Solla, T. K. Leen, and K. Müller, editors, Advances in Neural Information Processing Systems 12, pages 813–819. MIT Press, 2000. 2 +[26] Hamid Izadinia, Imran Saleemi, and Mubarak Shah. Multimodal analysis for identification and segmentation of moving-sounding objects. IEEE Transactions on Multimedia, 15(2):378-390, 2013. 2 +[27] Amir Jamaludin, Joon Son Chung, and Andrew Zisserman. You said that?: Synthesising talking faces from audio. International Journal of Computer Vision, pages 1-13, 2019. 2 +[28] Tero Karras, Timo Aila, Samuli Laine, Antti Herva, and Jaakko Lehtinen. Audio-driven facial animation by joint end-to-end learning of pose and emotion. ACM Transactions on Graphics (TOG), 36(4):94, 2017. 2 +[29] Nikos Kolotouros, Georgios Pavlakos, and Kostas Dani-ilidis. Convolutional mesh regression for single-image human shape reconstruction. In CVPR, pages 4501–4510, 2019. 4 +[30] Bruno Korbar, Du Tran, and Lorenzo Torresani. Co-training of audio and video representations from self-supervised temporal synchronization. arXiv preprint arXiv:1807.00230, 2018. 2 +[31] Bochen Li, Xinzhao Liu, Karthik Dinesh, Zhiyao Duan, and Gaurav Sharma. Creating a multitrack classical music performance dataset for multimodal music analysis: Challenges, insights, and applications. IEEE Transactions on Multimedia, 21(2):522-535, 2018. 2, 5 +[32] Xiang Long, Chuang Gan, Gerard De Melo, Jiajun Wu, Xiao Liu, and Shilei Wen. Attention clusters: Purely attention based local feature integration for video classification. In CVPR, pages 7834-7843, 2018. 2 + +[33] Josh H McDermott. The cocktail party problem. Current Biology, 19(22):R1024-R1027, 2009. 2 +[34] Pedro Morgado, Nuno Nvasconcelos, Timothy Langlois, and Oliver Wang. Self-supervised generation of spatial audio for 360 video. In NIPS, 2018. 2 +[35] Amit Moryossef, Yanai Elazar, and Yoav Goldberg. At your fingertips: Automatic piano fingering detection, 2020. 2, 5 +[36] Arsha Nagrani, Samuel Albanie, and Andrew Zisserman. Seeing voices and hearing faces: Cross-modal biometric matching. arXiv preprint arXiv:1804.00326, 2018. 2 +[37] Andrew Owens and Alexei A Efros. Audio-visual scene analysis with self-supervised multisensory features. ECCV, 2018. 2, 3, 7 +[38] Andrew Owens, Jiajun Wu, Josh H McDermott, William T Freeman, and Antonio Torralba. Ambient sound provides supervision for visual learning. In European Conference on Computer Vision, pages 801-816. Springer, 2016. 2 +[39] Ethan Perez, Florian Strub, Harm De Vries, Vincent Dumoulin, and Aaron Courville. Film: Visual reasoning with a general conditioning layer. arXiv preprint arXiv:1709.07871, 2017. 7 +[40] Colin Raffel, Brian McFee, Eric J Humphrey, Justin Salamon, Oriol Nieto, Dawen Liang, Daniel PW Ellis, and C Colin Raffel. mir.eval: A transparent implementation of common mir metrics. In In Proceedings of the 15th International Society for Music Information Retrieval Conference, ISMIR. Citeseer, 2014. 5 +[41] 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 +[42] Andrew Rouditchenko, Hang Zhao, Chuang Gan, Josh McDermott, and Antonio Torralba. Self-supervised audio-visual co-segmentation. In ICASSP 2019-2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 2357-2361. IEEE, 2019. 2 +[43] Arda Senocak, Tae-Hyun Oh, Junsik Kim, Ming-Hsuan Yang, and In So Kweon. Learning to localize sound source in visual scenes. arXiv preprint arXiv:1803.03849, 2018. 2 +[44] Eli Shlizerman, Lucio Dery, Hayden Schoen, and Ira Kemelmacher-Shlizerman. Audio to body dynamics. In CVPR, pages 7574-7583, 2018. 3 +[45] Tomas Simon, Hanbyul Joo, Iain Matthews, and Yaser Sheikh. Hand keypoint detection in single images using multiview bootstrapping. In CVPR, 2017. 4 +[46] Andrew JR Simpson, Gerard Roma, and Mark D Plumbley. Deep karaoke: Extracting vocals from musical mixtures using a convolutional deep neural network. In International Conference on Latent Variable Analysis and Signal Separation, pages 429-436. Springer, 2015. 2 +[47] Paris Smaragdis and Judith C Brown. Non-negative matrix factorization for polyphonic music transcription. In Applications of Signal Processing to Audio and Acoustics, 2003 IEEE Workshop on., pages 177-180. IEEE, 2003. 2 +[48] Supasorn Suwajanakorn, Steven M Seitz, and Ira Kemelmacher-Shlizerman. Synthesizing obama: learn + +ing lip sync from audio. ACM Transactions on Graphics (TOG), 36(4):95, 2017. 2 +[49] Sarah Taylor, Taehwan Kim, Yisong Yue, Moshe Mahler, James Krahe, Anastasio Garcia Rodriguez, Jessica Hodgins, and Iain Matthews. A deep learning approach for generalized speech animation. ACM Transactions on Graphics (TOG), 36(4):93, 2017. 2 +[50] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NIPS, pages 5998-6008, 2017. 4 +[51] Tuomas Virtanen. Monaural sound source separation by nonnegative matrix factorization with temporal continuity and sparseness criteria. IEEE transactions on audio, speech, and language processing, 15(3):1066-1074, 2007. 2, 5, 6 +[52] Xudong Xu, Bo Dai, and Dahua Lin. Recursive visual sound separation using minus-plus net. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 2 +[53] Sijie Yan, Yuanjun Xiong, and Dahua Lin. Spatial temporal graph convolutional networks for skeleton-based action recognition. In AAAI, 2018. 4 +[54] Dong Yu, Morten Kolbæk, Zheng-Hua Tan, and Jesper Jensen. Permutation invariant training of deep models for speaker-independent multi-talker speech separation. In Acoustics, Speech and Signal Processing (ICASSP), 2017 IEEE International Conference on, pages 241-245. IEEE, 2017. 2 +[55] Hang Zhao, Chuang Gan, Wei-Chiu Ma, and Antonio Torralba. The sound of motions. ICCV, 2019. 2, 5, 6, 7, 8 +[56] Hang Zhao, Chuang Gan, Andrew Rouditchenko, Carl Vondrick, Josh McDermott, and Antonio Torralba. The sound of pixels. In *The European Conference on Computer Vision (ECCV)*, September 2018. 2, 3, 5, 6 +[57] Yipin Zhou, Zhaowen Wang, Chen Fang, Trung Bui, and Tamara L Berg. Visual to sound: Generating natural sound for videos in the wild. arXiv preprint arXiv:1712.01393, 2017. 2 \ No newline at end of file diff --git a/musicgestureforvisualsoundseparation/images.zip b/musicgestureforvisualsoundseparation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..a84308c80c682b9559f2f6080779e519e95c474e --- /dev/null +++ b/musicgestureforvisualsoundseparation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f189aa648db0d37afe835c64ff82700f7e4183acc3281516591c63cd8abddeb2 +size 643610 diff --git a/musicgestureforvisualsoundseparation/layout.json b/musicgestureforvisualsoundseparation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..452a8bd2d37c8213ac00c5cce4581722b2531ea9 --- /dev/null +++ b/musicgestureforvisualsoundseparation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95c0ab5f9302efea80764942fdb6d356dc4e9a7c6be9cd59506aad9e0628dadf +size 331165 diff --git a/nasfcosfastneuralarchitecturesearchforobjectdetection/79a4edf5-3b22-4630-b44f-a57292a0b1b8_content_list.json b/nasfcosfastneuralarchitecturesearchforobjectdetection/79a4edf5-3b22-4630-b44f-a57292a0b1b8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..3c4ada8c83a02b218f5adcae94d5f77f640152cb --- /dev/null +++ b/nasfcosfastneuralarchitecturesearchforobjectdetection/79a4edf5-3b22-4630-b44f-a57292a0b1b8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e046b6b649f310f25c14c0516d366dbf32429ab8ea00e53dc313e4080eaee8e +size 67709 diff --git a/nasfcosfastneuralarchitecturesearchforobjectdetection/79a4edf5-3b22-4630-b44f-a57292a0b1b8_model.json b/nasfcosfastneuralarchitecturesearchforobjectdetection/79a4edf5-3b22-4630-b44f-a57292a0b1b8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..0c54349b5d4375e7678a6ffa774e6cce345b21ca --- /dev/null +++ b/nasfcosfastneuralarchitecturesearchforobjectdetection/79a4edf5-3b22-4630-b44f-a57292a0b1b8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc0424a9f81308da2e7fccef328da1e4b84ce54d8113f8721a238378fc8b5d59 +size 81784 diff --git a/nasfcosfastneuralarchitecturesearchforobjectdetection/79a4edf5-3b22-4630-b44f-a57292a0b1b8_origin.pdf b/nasfcosfastneuralarchitecturesearchforobjectdetection/79a4edf5-3b22-4630-b44f-a57292a0b1b8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..91f9e00c4cb23c58172d7af1b9d8a12b90261aff --- /dev/null +++ b/nasfcosfastneuralarchitecturesearchforobjectdetection/79a4edf5-3b22-4630-b44f-a57292a0b1b8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a55773e9edd79cff678b9be0e0561297d004b48889c80b6fcedb05d09b6510e +size 537243 diff --git a/nasfcosfastneuralarchitecturesearchforobjectdetection/full.md b/nasfcosfastneuralarchitecturesearchforobjectdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..50ecae75dc81936a496c358f59c3a0c4bc872b2f --- /dev/null +++ b/nasfcosfastneuralarchitecturesearchforobjectdetection/full.md @@ -0,0 +1,281 @@ +# NAS-FCOS: Fast Neural Architecture Search for Object Detection* + +Ning Wang†‡, Yang Gao†‡, Hao Chen, Peng Wang†‡, Zhi Tian, Chunhua Shen, Yanning Zhang†‡ † School of Computer Science, Northwestern Polytechnical University, China + +$\ddagger$ National Engineering Lab for Integrated Aero-Space-Ground-Ocean Big Data Application Technology, China + $\diamond$ The University of Adelaide, Australia + +# Abstract + +The success of deep neural networks relies on significant architecture engineering. Recently neural architecture search (NAS) has emerged as a promise to greatly reduce manual effort in network design by automatically searching for optimal architectures, although typically such algorithms need an excessive amount of computational resources, e.g., a few thousand GPU-days. To date, on challenging vision tasks such as object detection, NAS, especially fast versions of NAS, is less studied. Here we propose to search for the decoder structure of object detectors with search efficiency being taken into consideration. To be more specific, we aim to efficiently search for the feature pyramid network (FPN) as well as the prediction head of a simple anchor-free object detector, namely FCOS [24], using a tailored reinforcement learning paradigm. With carefully designed search space, search algorithms and strategies for evaluating network quality, we are able to efficiently search a top-performing detection architecture within 4 days using 8 V100 GPUs. The discovered architecture surpasses state-of-the-art object detection models (such as Faster R-CNN, RetinaNet and FCOS) by 1.5 to 3.5 points in AP on the COCO dataset, with comparable computation complexity and memory footprint, demonstrating the efficacy of the proposed NAS for object detection. + +# 1. Introduction + +Object detection is one of the fundamental tasks in computer vision, and has been researched extensively. In the past few years, state-of-the-art methods for this task are based on deep convolutional neural networks (such as Faster R-CNN [20], RetinaNet [11]), due to their impressive performance. Typically, the designs of object detection networks are much more complex than those for image classification, because the former need to localize and classify multiple objects in an image simultaneously while the latter + +only need to output image-level labels. Due to its complex structure and numerous hyper-parameters, designing effective object detection networks is more challenging and usually needs much manual effort. + +On the other hand, Neural Architecture Search (NAS) approaches [4, 17, 32] have been showing impressive results on automatically discovering top-performing neural network architectures in large-scale search spaces. Compared to manual designs, NAS methods are data-driven instead of experience-driven, and hence need much less human intervention. As defined in [3], the workflow of NAS can be divided into the following three processes: 1) sampling architecture from a search space following some search strategies; 2) evaluating the performance of the sampled architecture; and 3) updating the parameters based on the performance. + +One of the main problems prohibiting NAS from being used in more realistic applications is its search efficiency. The evaluation process is the most time consuming part because it involves a full training procedure of a neural network. To reduce the evaluation time, in practice a proxy task is often used as a lower cost substitution. In the proxy task, the input, network parameters and training iterations are often scaled down to speedup the evaluation. However, there is often a performance gap for samples between the proxy tasks and target tasks, which makes the evaluation process biased. How to design proxy tasks that are both accurate and efficient for specific problems is a challenging problem. Another solution to improve search efficiency is constructing a supernet that covers the complete search space and training candidate architectures with shared parameters [15, 18]. However, this solution leads to significantly increased memory consumption and restricts itself to small-to-moderate sized search spaces. + +To our knowledge, studies on efficient and accurate NAS approaches to object detection networks are rarely touched, despite its significant importance. To this end, we present a fast and memory saving NAS method for object detection networks, which is capable of discovering top-performing architectures within significantly reduced search time. Our + +overall detection architecture is based on FCOS [24], a simple anchor-free one-stage object detection framework, in which the feature pyramid network and prediction head are searched using our proposed NAS method. + +Our main contributions are summarized as follows. + +- In this work, we propose a fast and memory-efficient NAS method for searching both FPN and head architectures, with carefully designed proxy tasks, search space and evaluation strategies, which is able to find top-performing architectures over 3,000 architectures using 28 GPU-days only. + +Specifically, this high efficiency is enabled with the following designs. + +- Developing a fast proxy task training scheme by skipping the backbone finetuning stage; + +- Adapting progressive search strategy to reduce time cost taken by the extended search space; + +- Using a more discriminative criterion for evaluation of searched architectures. + +- Employing an efficient anchor-free one-stage detection framework with simple post processing; + +- Using NAS, we explore the workload relationship between FPN and head, proving the importance of weight sharing in head. +- We show that the overall structure of NAS-FCOS is general and flexible in that it can be equipped with various backbones including MobileNetV2, ResNet-50, ResNet-101 and ResNeXt-101, and surpasses state-of-the-art object detection algorithms using comparable computation complexity and memory footprint. More specifically, our model can improve the AP by $1.5 \sim 3.5$ points on all above models comparing to their FCOS counterparts. + +# 2. Related Work + +# 2.1. Object Detection + +The frameworks of deep neural networks for object detection can be roughly categorized into two types: one-stage detectors [12] and two-stage detectors [6, 20]. + +Two-stage detection frameworks first generate class-independent region proposals using a region proposal network (RPN), and then classify and refine them using extra detection heads. In spite of achieving top performance, the two-stage methods have noticeable drawbacks: they are computationally expensive and have many hyperparameters that need to be tuned to fit a specific dataset. + +In comparison, the structures of one-stage detectors are much simpler. They directly predict object categories and + +bounding boxes at each location of feature maps generated by a single CNN backbone. + +Note that most state-of-the-art object detectors (including both one-stage detectors [12, 16, 19] and two-stage detectors [20]) make predictions based on anchor boxes of different scales and aspect ratios at each convolutional feature map location. However, the usage of anchor boxes may lead to high imbalance between object and non-object examples and introduce extra hyper-parameters. More recently, anchor-free one-stage detectors [9, 10, 24, 29, 30] have attracted increasing research interests, due to their simple fully convolutional architectures and reduced consumption of computational resources. + +# 2.2. Neural Architecture Search + +NAS is usually time consuming. We have seen great improvements from 24,000 GPU-days [32] to 0.2 GPU-day [28]. The trick is to first construct a supernet containing the complete search space and train the candidates all at once with bi-level optimization and efficient weight sharing [13, 15]. But the large memory allocation and difficulties in approximated optimization prohibit the search for more complex structures. + +Recently researchers [1, 5, 23] propose to apply single-path training to reduce the bias introduced by approximation and model simplification of the supernet. DetNAS [2] follows this idea to search for an efficient object detection architecture. One limitation of the single-path approach is that the search space is restricted to a sequential structure. Single-path sampling and straight through estimate of the weight gradients introduce large variance to the optimization process and prohibit the search for more complex structures under this framework. Within this very simple search space, NAS algorithms can only make trivial decisions like kernel sizes for manually designed modules. + +Object detection models are different from single-path image classification networks in their way of merging multilevel features and distributing the task to parallel prediction heads. Feature pyramid networks (FPNs) [4, 8, 11, 14, 27], designed to handle this job, plays an important role in modern object detection models. NAS-FPN [4] targets on searching for an FPN alternative based on one-stage framework RetinaNet [12]. Feature pyramid architectures are sampled with a recurrent neural network (RNN) controller. The RNN controller is trained with reinforcement learning (RL). However, the search is very time-consuming even though a proxy task with ResNet-10 backbone is trained to evaluate each architecture. + +Since all these three kinds of research ([2, 4] and ours) focus on object detection framework, we demonstrate the differences among them that DetNAS [2] aims to search for the designs of better backbones, while NAS-FPN [4] searches the FPN structure, and our search space contains + +# both FPN and head structure. + +To speed up reward evaluation of RL-based NAS, the work of [17] proposes to use progressive tasks and other training acceleration methods. By caching the encoder features, they are able to train semantic segmentation decoders with very large batch sizes very efficiently. In the sequel of this paper, we refer to this technique as fast decoder adaptation. However, directly applying this technique to object detection tasks does not enjoy similar speed boost, because they are either not in using a fully-convolutional model [11] or require complicated post processing that are not scalable with the batch size [12]. + +To reduce the post processing overhead, we resort to a recently introduced anchor-free one-stage framework, namely, FCOS [24], which significantly improve the search efficiency by cancelling the processing time of anchor-box matching in RetinaNet. + +Compared to its anchor-based counterpart, FCOS significantly reduces the training memory footprint while being able to improve the performance. + +# 3. Our Approach + +In our work, we search for anchor-free fully convolutional detection models with fast decoder adaptation. Thus, NAS methods can be easily applied. + +# 3.1. Problem Formulation + +We base our search algorithm upon a one-stage framework FCOS due to its simplicity. Our training tuples $\{(\mathbf{x},Y)\}$ consist of input image tensors $\mathbf{x}$ of size $(3\times H\times W)$ and FCOS output targets $Y$ in a pyramid representation, which is a list of tensors $\mathbf{y}_l$ each of size $((K + 4 + 1)\times H_l\times W_l)$ where $H_{l}\times W_{l}$ is feature map size on level $p$ of the pyramid. $(K + 4 + 1)$ is the output channels of FCOS, the three terms are length- $K$ one-hot classification labels, 4 bounding box regression targets and 1 centerness factor respectively. + +The network $g: \mathbf{x} \rightarrow \hat{Y}$ in original FCOS consists of three parts, a backbone $b$ , FPN $f$ and multi-level subnets we call prediction heads $h$ in this paper. First backbone $b: \mathbf{x} \rightarrow C$ maps the input tensor to a set of intermediate-leveled features $C = \{\mathbf{c}_3, \mathbf{c}_4, \mathbf{c}_5\}$ , with resolution $(H_i \times W_i) = (H/2^i \times W/2^i)$ . Then FPN $f: C \rightarrow P$ maps the features to a feature pyramid $P = \{\mathbf{p}_3, \mathbf{p}_4, \mathbf{p}_5, \mathbf{p}_6, \mathbf{p}_7\}$ . Then the prediction head $h: \mathbf{p} \rightarrow \mathbf{y}$ is applied to each level of $P$ and the result is collected to create the final prediction. To avoid overfitting, same $h$ is often applied to all instances in $P$ . + +Since objects of different scales require different effective receptive fields, the mechanism to select and merge intermediate-leveled features $C$ is particularly important in object detection network design. Thus, most researches [16, + +[20] are carried out on designing $f$ and $h$ while using widely-adopted backbone structures such as ResNet [7]. Following this principle, our search goal is to decide when to choose which features from $C$ and how to merge them. + +To improve the efficiency, we reuse the parameters in $b$ pretrained on target dataset and search for the optimal structures after that. For the convenience of the following statement, we call the network components to search for, namely $f$ and $h$ , together the decoder structure for the objection detection network. + +$f$ and $h$ take care of different parts of the detection job. $f$ extracts features targeting different object scales in the pyramid representations $P$ , while $h$ is a unified mapping applied to each feature in $P$ to avoid overfitting. In practice, people seldom discuss the possibility of using a more diversified $f$ to extract features at different levels or how many layers in $h$ need to be shared across the levels. In this work, we use NAS as an automatic method to test these possibilities. + +# 3.2. Search Space + +Considering the different functions of $f$ and $h$ , we apply two search space respectively. Given the particularity of FPN structure, a basic block with new overall connection and $f$ 's output design is built for it. For simplicity, sequential space is applied for $h$ part. + +We replace the cell structure with atomic operations to provide even more flexibility. To construct one basic block, we first choose two layers $\mathbf{x}_1$ , $\mathbf{x}_2$ from the sampling pool $X$ at $\mathrm{id}1$ , $\mathrm{id}2$ , then two operations $\mathrm{op}1$ , $\mathrm{op}2$ are applied to each of them and an aggregation operation $\mathrm{agg}$ merges the two output into one feature. To build a deep decoder structure, we apply multiple basic blocks with their outputs added to the sampling pool. Our basic block $bb_{t}: X_{t-1} \to X_{t}$ at time step $t$ transforms the sampling pool $X_{t-1}$ to $X_{t} = X_{t-1} \cup \{\mathbf{x}_{t}\}$ , where $\mathbf{x}_{t}$ is the output of $bb_{t}$ . + +The candidate operations are listed in Table 1. We include only separable/depth-wise convolutions so that the decoder can be efficient. In order to enable the decoder to apply convolutional filters on irregular grids, here we have also included deformable $3 \times 3$ convolutions [31]. For the aggregation operations, we include element-wise sum and concatenation followed by a $1 \times 1$ convolution. + +The decoder configuration can be represented by a se + +
IDDescription
0separable conv 3 × 3
1separable conv 3 × 3 with dilation rate 3
2separable conv 5 × 5 with dilation rate 6
3skip-connection
4deformable 3 × 3 convolution
+ +Table 1.Unary operations used in the search process. + +quence with three components, FPN configuration, head configuration and weight sharing stages. We provide detailed descriptions to each of them in the following sections. The complete diagram of our decoder structure is shown in Fig. 1. + +# 3.2.1 FPN Search Space + +As mentioned above, the FPN $f$ maps the convolutional features $C$ to $P$ . First, we initialize the sampling pool as $X_0 = C$ . Our FPN is defined by applying the basic block 7 times to the sampling pool, $f := bb_1^f \circ bb_2^f \circ \dots \circ bb_7^f$ . To yield pyramid features $P$ , we collect the last three basic block outputs $\{\mathbf{x}_5, \mathbf{x}_6, \mathbf{x}_7\}$ as $\{\mathbf{p}_3, \mathbf{p}_4, \mathbf{p}_5\}$ . + +To allow shared information across all layers, we use a simple rule to create global features. If there is some dangling layer $\mathbf{x}_t$ which is not sampled by later blocks $\{bb_i^T | i > t\}$ nor belongs to the last three layers $t < 5$ , we use element-wise add to merge it to all output features + +$$ +\mathbf {p} _ {i} ^ {*} = \mathbf {p} _ {i} + \mathbf {x} _ {t}, i \in \{3, 4, 5 \}. \tag {1} +$$ + +Same as the aggregation operations, if the features have different resolution, the smaller one is upsampled with bilinear interpolation. + +To be consistent with FCOS, $\mathbf{p}_6$ and $\mathbf{p}_7$ are obtained via a $3\times 3$ stride-2 convolution on $\mathbf{p}_5$ and $\mathbf{p}_6$ respectively. + +# 3.2.2 Prediction Head Search Space + +Prediction head $h$ maps each feature in the pyramid $P$ to the output of corresponding $y$ , which in FCOS and RetinaNet, consists of four $3 \times 3$ convolutions. To explore the potential of the head, we therefore extend a sequential search space for its generation. Specifically, our head is defined as a sequence of six basic operations. Compared with candidate operations in the FPN structures, the head search space has two slight differences. First, we add standard convolution modules (including conv1x1 and conv3x3) to the head sampling pool for better comparison. Second, we follow the design of FCOS by replacing all the Batch Normalization (BN) layers to Group Normalization (GN) [25] in the operations sampling pool of head, considering that head needs to share weights between different levels, which causes BN invalid. The final output of head is the output of the last (sixth) layer. + +# 3.2.3 Searching for Head Weight Sharing + +To add even more flexibility and understand the effect of weight sharing in prediction heads, we further add an index $i$ as the location where the prediction head starts to share weights. For every layer before stage $i$ , the head $h$ will create independent set of weights for each FPN output level, otherwise, it will use the global weights for sharing purpose. + +Considering the independent part of the heads being extended FPN branch and the shared part as head with adaptive-length, we can further balance the workload for each individual FPN branch to extract level-specific features and the prediction head shared across all levels. + +# 3.3. Search Strategy + +RL based strategy is applied to the search process. We rely on an LSTM-based controller to predict the full configuration. We consider using a progressive search strategy rather than the joint search for both FPN structure and prediction head part, since the former requires less computing resources and time cost than the latter. The training dataset is randomly split into a meta-train $D_{t}$ and meta-val $D_{v}$ subset. To speed up the training, we fix the backbone network and cache the pre-computed backbone output $C$ . This makes our single architecture training cost independent from the depth of backbone network. Taking this advantage, we can apply much more complex backbone structures and utilize high quality multilevel features as our decoder's input. We find that the process of backbone finetuning can be skipped if the cached features are powerful enough. Speedup techniques such as Polyak weight averaging are also applied during the training. + +The most widely used detection metric is average precision (AP). However, due to the difficulty of object detection task, at the early stages, AP is too low to tell the good architectures from the bad ones, which makes the controller take much more time to converge. To make the architecture evaluation process easier even at the early stages of the training, we therefore use negative loss sum as the reward instead of average precision: + +$$ +\begin{array}{l} R (a) = - \sum_ {(x, Y) \in D _ {v}} \left(L _ {c l s} (x, Y | a) \right. \tag {2} \\ + L _ {r e g} (x, Y | a) + L _ {c t r} (x, Y | a)) \\ \end{array} +$$ + +where $L_{cls}$ , $L_{reg}$ , $L_{ctr}$ are the three loss terms in FCOS. Gradient of the controller is estimated via proximal policy optimization (PPO) [22]. + +# 4. Experiments + +# 4.1. Implementation Details + +# 4.1.1 Searching Phase + +We design a fast proxy task for evaluating the decoder architectures sampled in the searching phase. PASCAL VOC is selected as the proxy dataset, which contains 5715 training images with object bounding box annotations of 20 classes. Transfer capacity of the structures can be illustrated since the search and full training phase use different datasets. The VOC training set is randomly split into a meta-train + +![](images/481555da89f255380e7f6a49cbc9d81a95679ee35ff37728bd6f7ee0c7cbe29d.jpg) +Figure 1. A conceptual example of our NAS-FCOS decoder. It consists of two sub networks, an FPN $f$ and a set of prediction heads $h$ which have shared structures. One notable difference with other FPN-based one-stage detectors is that our heads have partially shared weights. Only the last several layers of the predictions heads (marked as yellow) are tied by their weights. The number of layers to share is decided automatically by the search algorithm. Note that both FPN and head are in our actual search space; and have more layers than shown in this figure. Here the figure is for illustration only. + +set with 4,000 images and a meta-val set with 1715 images. For each sampled architecture, we train it on metatron and compute the reward (2) on meta-val. Input images are resized to short size 384 and then randomly cropped to $384 \times 384$ . Target object sizes of interest are scaled correspondingly. We use Adam optimizer with learning rate $8e-4$ and batch size 200. Polyak averaging is applied with the decay rates of 0.9. The decoder is evaluated after 300 iterations. As we use fast decoder adaptation, the backbone features are fixed and cached during the search phase. To enhance the cached backbone features, we first initialize them with pre-trained weights provided by open-source implementation of FCOS and then finetune on VOC using the training strategies of FCOS. Note that the above finetuning process is only performed once at the beginning of the search phase. + +A progressive strategy is used for the search of $f$ and $h$ . We first search for the FPN part and retain the original head. All operations in the FPN structure have 64 output channels. The decoder inputs $C$ are resized to fit output channel width of FPN via $1 \times 1$ convolutions. After this step, a searched FPN structure is fixed and the second stage searching for the head will be started based on it. Most parameters for searching head are identical to those for searching FPN structure, with the exception that the output channel width is adjusted from 64 to 128 to deliver more information. + +For the FPN search part, the controller model nearly converged after searching over 2.8K architectures on the proxy task as shown in Fig. 2. Then, the top-20 best performing architectures on the proxy task are selected for the next full training phase. For the head search part, we choose the best searched FPN among the top-20 architectures and pre-drop its features. It takes about 600 rounds for the controller to + +![](images/8b92e269cf80369bee50a8688fc36a07ee0d6a054e52ba07a14bbbcd65226d6e.jpg) +Figure 2. Performance of reward during the proxy task, which has been growing throughout the process, indicating that the model of reinforcement learning works. + +nearly converge, which is much faster than that for searching FPN architectures. After that, we select for full training the top-10 heads that achieve best performance on the proxy task. In total, the whole search phase can be finished within 4 days using 8 V100 GPUs. + +# 4.1.2 Full Training Phase + +In this phase, we fully train the searched models on the MS COCO training dataset, and select the best one by evaluating them on MS COCO validation images. Note that our training configurations are exactly the same as those in FCOS for fair comparison. Input images are resized to short size 800 and the maximum long side is set to be 1333. The models are trained using 4 V100 GPUs with batch size 16 for 90K iterations. The initial learning rate is 0.01 and reduces to one tenth at the 60K-th and 80K-th iterations. The improving tricks are applied only on the final model (w/improv). + +
DecoderBackboneFLOPs (G)Params (M)AP
FPN-RetinaNet @256MobileNetV2133.411.330.8
FPN-FCOS @256MobileNetV2105.49.831.2
NAS-FCOS (ours) @128MobileNetV239.35.932.0
NAS-FCOS (ours) @128-256MobileNetV295.69.933.8
NAS-FCOS (ours) @256MobileNetV2121.816.134.7
FPN-RetinaNet @256R-50198.033.636.1
FPN-FCOS @256R-50169.932.037.4
NAS-FCOS (ours) @128R-50104.027.837.9
NAS-FCOS (ours) @128-256R-50160.431.839.1
NAS-FCOS (ours) @256R-50189.638.439.8
FPN-RetinaNet @256R-101262.452.537.8
FPN-FCOS @256R-101234.350.941.5
NAS-FCOS (ours) @256R-101254.057.343.0
FPN-FCOS @256X-64x4d-101371.289.643.2
NAS-FCOS (ours) @128-256X-64x4d-101361.689.444.5
FPN-FCOS @256 w/improvementsX-64x4d-101371.289.644.7
NAS-FCOS (ours) @128-256 w/improvementsX-64x4d-101361.689.446.1
+ +Table 2. Results on test-dev set of MS COCO after full training. R-50 and R-101 represents ResNet backbones and X-64x4d-101 represents ResNeXt-101 (64 × 4d). All networks share the same input image resolution. FLOPs and parameters are being measured on 1088 × 800, which is the median of the input size on COCO. For RetinaNet and FCOS, we use official models provided by the authors. For our NASFCOS, @128 and @256 means that the decoder channel width is 128 and 256 respectively. @128-256 is the decoder with 128 FPN width and 256 head width. The same improving tricks used on the newest FCOS version are used in our model for fair comparison. + +![](images/3ad176997488ed35bffd3b4b8377e0493df16d44a38e4f0dfeed7b0b14da226e.jpg) +Figure 3. Our discovered FPN structure. $C_2$ is omitted from this figure since it is not chosen by this particular structure during the search process. + +# 4.2. Search Results + +The best FPN structure is illustrated in Fig. 3. The controller identifies that deformable convolution and concatenation are the best performing operations for unary and aggregation respectively. From Fig. 4, we can see that the controller chooses to use 4 operations (with two skip connections), rather than the maximum allowed 6 operations. Note that the discovered "dconv + 1x1 conv" structure achieves a good trade-off between accuracy and FLOPs. Compared with the original head, our searched head has + +![](images/c1efaf61371dc7c4a5d539ab49478a86ab954bb684b30fdc89d5390ce065f109.jpg) +Figure 4. Our discovered Head structure. + +fewer FLOPs/Params (FLOPs 79.24G vs. 89.16G, Params 3.41M vs. 4.92M) and significantly better performance (AP 38.7 vs. 37.4). + +We use the searched decoder together with either lightweight backbones such as MobileNet-V2 [21] or more powerful backbones such as ResNet-101 [7] and ResNeXt-101 [26]. To balance the performance and efficiency, we implement three decoders with different computation budgets: one with feature dimension of 128 (@128), one with 256 (@256) and another with FPN channel width 128 and prediction head 256 (@128-256). The results on the COCO test-dev with short side being 800 is shown in Table 2. The searched decoder with feature dimension of 256 (@256) surpasses its FCOS counterpart by 1.5 to 3.5 points in AP under different backbones. The one with 128 channels (@128) has significantly reduced parameters and calculation, making it more suitable for resource-constrained environments. In particular, our searched model with 128 channels and MobileNetV2 backbone suparsses the original FCOS with the same backbone by 0.8 AP points with only 1/3 FLOPS. The third type of decoder (@128-256) achieves a good balance between accuracy and parameters. Note that our searched model outperforms the strongest FCOS variant by 1.4 AP points (46.1 vs. 44.7) with slightly smaller FLOPs and Params. The comparison of FLOPs and + +![](images/86ee1fd12e3b5b29ee6c0989a38ed9259e9a594cbd49284e19ad39919a1643c4.jpg) +Figure 5. Trend graph of head weight sharing during search. The coordinates in the horizontal axis represent the number of the statistical period. A period consists of 50 head structures. The vertical axis represents the proportion of heads that fully share weights in 50 structures. + +![](images/7bfdbf413fe4d2466f6a591eafa3e1d824299efec8cffd91330ea19e8986a945.jpg) +Figure 6. Correlation between the search reward obtained on the VOC meta-val dataset and the AP evaluated on COCO-val. + +number of parameters with other models are illustrated in Fig. 7 and Fig. 8 respectively. + +In order to understand the importance of weight sharing in head, we add the number of layers shared by weights as an object of the search. Fig. 5 shows a trend graph of head weight sharing during search. We set 50 structures as a statistical cycle. As the search deepens, the proportion of fully shared structures increases, indicating that on the multi-scale detection model, head weight sharing is a necessity. + +We also demonstrate the comparison with other NAS methods for object detection in Table 3. Our method is able to search for twice more architectures than DetNAS [2] per GPU-day. Note that the AP of NAS-FPN [4] is achieved by stacking the searched FPN 7 times, while we do not stack our searched FPN. Our model with ResNeXt-101 (64x4d) as backbone outperforms NAS-FPN by 1.3 AP points while using only 1/3 FLOPs and less calculation cost. + +![](images/8c2de3d3859847d34e29d5b2ef98c30ce7cab0488018f3c47e7be73789fee2a4.jpg) +Figure 7. Diagram of the relationship between FLOPs and AP with different backbones. Points of different shapes represent different backbones. NAS-FCOS@128 has a slight increase in precision which also gains the advantage of computation quantity. One with 256 channels obtains the highest precision with more computation complexity. Using FPN channel width 128 and prediction head 256 (@128-256) offers a trade-off. + +![](images/2c1a06ce1e1f7c22fe944de16caccdaa5edb86f94ccfde064365a2c8613e33a1.jpg) +Figure 8. Diagram of the relationship between parameters and AP with different backbones. Adjusting the number of channels in the FPN structure and head helps to achieve a balance between accuracy and parameters. + +We further measure the correlation between rewards obtained during the search process with the proxy dataset and APs attained by same architectures trained on COCO. Specifically, we randomly sample 15 architectures from all the searched structures trained on COCO with batch size 16. Since full training on COCO is time-consuming, we reduce the iterations to $60\mathrm{K}$ . The model is then evaluated on the COCO 2017 validation set. As visible in Fig. 6, there is a strong correlation between search rewards and APs obtained from COCO. Poor- and well-performing architectures can be distinguished by the rewards on the proxy task very well. + +# 4.3. Ablation Study + +# 4.3.1 Design of Reinforcement Learning Reward + +As we discussed above, it is common to use widely accepted indicators as rewards for specific tasks in the search, + +
ArchFLOPs (G)Search Cost (GPU-day)Searched ArchsAP
NAS-FPN @256 R-50>325.0333×#TPUs17000<38.0
NAS-FPN 7@256 R-501125.5333×#TPUs1700044.8
DetNAS-FPN-Faster-44220040.2
DetNAS-RetinaNet-44220033.3
NAS-FCOS (ours) @256 R-50189.628300039.8
NAS-FCOS (ours) @128-256 X-64x4d-101361.628300046.1
+ +![](images/0171c77e3678606662ac5287f8098f82718b6ba431ffdead139dfb7033b0f1e9.jpg) +Figure 9. Comparison of two different RL reward designs. The vertical axis represents AP obtained from the proxy task on the validation dataset. + +Table 3. Comparison with other NAS methods. For NAS-FPN, the input size is $1280 \times 1280$ and the search cost should be timed by their number of TPUs used to train each architecture. Note that the FLOPs and AP of NAS-FPN @256 here are from Figure 11 in NAS-FPN [4], and NAS-FPN 7@256 stacks the searched FPN structure 7 times. The input images are resized such that their shorter size is 800 pixels in DetNASNet [2] and our models. + +
DecoderSearch SpaceAP
FPN-FCOS @256-37.4
NAS-FCOS @256h only38.7
NAS-FCOS @256f only38.9
NAS-FCOS @256f + h39.8
+ +Table 4. Comparisons between APs obtained under different search space with ResNet-50 backbone. + +such as mIOU for segmentation and AP for object detection. However, we found that using AP as reward did not show a clear upward trend in short-term search rounds (blue curve in Fig. 9). We further analyze the possible reason to be that the controller tries to learn a mapping from the decoder to the reward while the calculation of AP itself is complicated, which makes it difficult to learn this mapping within a limited number of iterations. In comparison, we clearly see the increase of AP with the validation loss as RL rewards (red curve in Fig. 9). + +# 4.3.2 Effectiveness of Search Space + +To further discuss the impact of the search spaces $f$ and $h$ , we design three experiments for verification. One is to search $f$ with the original head being fixed, one is to search + +$h$ with the original FPN being fixed and another is to search the entire decoder $(f + h)$ . As shown in Table 4, it turns out that searching $f$ brings slightly more benefits than searching $h$ only. And our progressive search which combines both $f$ and $h$ achieves a better result. + +# 4.3.3 Impact of Deformable Convolution + +As aforementioned, deformable convolutions are included in the set of candidate operations for both $f$ and $h$ , which are able to adapt to the geometric variations of objects. For fair comparison, we also replace the whole standard $3 \times 3$ convolutions with deformable $3 \times 3$ convolutions in FPN structure of the original FCOS and repeat them twice, making the FLOPs and parameters nearly equal to our searched model. The new model is therefore called DeformFPN-FCOS. It turns out that our NAS-FCOS model still achieves better performance (AP = 38.9 with FPN search only, and AP = 39.8 with both FPN and Head searched) than the DeformFPN-FCOS model (AP = 38.4) under this circumstance. + +# 5. Conclusion + +In this paper, we have proposed to use Neural Architecture Search to further optimize the process of designing object detection networks. It is shown in this work that top-performing detectors can be efficiently searched using carefully designed proxy tasks, search strategies and model evaluation metrics. The experiments on COCO demonstrate the efficiency of our discovered model NAS-FCOS and its flexibility to be used with various backbone architectures. + +# Acknowledgements + +NW, YG, PW's participation in this work were in part supported by the National Natural Science Foundation of China (No.61876152, No.U19B2037). CS' participation was in part supported by ARC DP project "Deep Learning that Scales". + +# References + +[1] Han Cai, Ligeng Zhu, and Song Han. Proxylessnas: Direct neural architecture search on target task and hardware. In Proc. Int. Conf. Learn. Representations, 2019. +[2] Yukang Chen, Tong Yang, Xiangyu Zhang, Gaofeng Meng, Chunhong Pan, and Jian Sun. DetNAS: Neural architecture search on object detection. In Proc. Advances in Neural Inf. Process. Syst., 2019. +[3] Thomas Elsken, Jan Hendrik Metzen, and Frank Hutter. Neural architecture search: A survey. In J. Mach. Learn. Res., 2019. +[4] Golnaz Ghiasi, Tsung-Yi Lin, Ruoming Pang, and Quoc V. Le. NAS-FPN: Learning scalable feature pyramid architecture for object detection. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., 2019. +[5] Zichao Guo, Xiangyu Zhang, Haoyuan Mu, Wen Heng, Zechun Liu, Yichen Wei, and Jian Sun. Single path one-shot neural architecture search with uniform sampling. In arXiv preprint arXiv:1904.00420, 2019. +[6] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 2961-2969, 2017. +[7] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In Proc. Eur. Conf. Comp. Vis., pages 630-645, 2016. +[8] Alexander Kirillov, Ross Girshick, Kaiming He, and Piotr Dollr. Panoptic feature pyramid networks. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., 2019. +[9] Tao Kong, Fuchun Sun, Huaping Liu, Yuning Jiang, and Jianbo Shi. Foveabox: Beyond anchor-based object detector. In arXiv preprint arXiv:1904.03797, 2019. +[10] Hei Law and Jia Deng. Cornernet: Detecting objects as paired keypoints. In Proc. Eur. Conf. Comp. Vis., pages 734-750, 2018. +[11] Tsung-Yi Lin, Piotr Dollar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 2117-2125, 2017. +[12] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólár. Focal loss for dense object detection. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 2980-2988, 2017. +[13] Chenxi Liu, Liang-Chieh Chen, Florian Schroff, Hartwig Adam, Wei Hua, Alan Yuille, and Li Fei-Fei. Auto-deeplab: Hierarchical neural architecture search for semantic image segmentation. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., 2019. +[14] Huanyu Liu, Chao Peng, Changqian Yu, Jingbo Wang, Xu Liu, Gang Yu, and Wei Jiang. An end-to-end network for panoptic segmentation. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., 2019. +[15] Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. In Proc. Int. Conf. Learn. Representations, 2019. +[16] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander Berg. + +SSD: Single shot multibox detector. In Proc. Eur. Conf. Comp. Vis., pages 21-37, 2016. +[17] Vladimir Nekrasov, Hao Chen, Chunhua Shen, and Ian Reid. Fast neural architecture search of compact semantic segmentation models via auxiliary cells. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., 2019. +[18] Hieu Pham, Melody Y. Guan, Barret Zoph, Quoc V. Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. In Proc. Int. Conf. Mach. Learn., 2018. +[19] Joseph Redmon and Ali Farhadi. Yolov3: An incremental improvement. In arXiv preprint arXiv:1804.02767, 2018. +[20] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. In Proc. Advances in Neural Inf. Process. Syst., pages 91-99, 2015. +[21] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zh-moginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 4510-4520, 2018. +[22] John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. In arXiv preprint arXiv:1707.06347, 2017. +[23] Dimitrios Stamoulis, Ruizhou Ding, Di Wang, Dimitrios Lymberopoulos, Bodhi Priyantha, Jie Liu, and Diana Marculescu. Single-path NAS: Designing hardware-efficient convnets in less than 4 hours. In arXiv preprint arXiv:1904.02877, 2019. +[24] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. FCOS: Fully convolutional one-stage object detection. In Proc. IEEE Int. Conf. Comp. Vis., 2019. +[25] Yuxin Wu and Kaiming He. Group normalization. In Proc. Eur. Conf. Comp. Vis., pages 3-19, 2018. +[26] Saining Xie, Ross Girshick, Piotr Dollr, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., 2017. +[27] Ting Zhao and Xiangqian Wu. Pyramid feature attention network for saliency detection. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., 2019. +[28] Hongpeng Zhou, Minghao Yang, Jun Wang, and Wei Pan. BayesNAS: A bayesian approach for neural architecture search. In Proc. Int. Conf. Mach. Learn., 2019. +[29] Xingyi Zhou, Dequan Wang, and Philipp Krahenbuhl. Objects as points. In arXiv preprint arXiv:1904.07850, 2019. +[30] Chenchen Zhu, Yihui He, and Marios Savvides. Feature selective anchor-free module for single-shot object detection. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., 2019. +[31] Xizhou Zhu, Han Hu, Stephen Lin, and Jifeng Dai. Deformable convnets v2: More deformable, better results. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., 2019. +[32] Barret Zoph and Quoc V. Le. Neural architecture search with reinforcement learning. In Proc. Int. Conf. Learn. Representations, 2017. \ No newline at end of file diff --git a/nasfcosfastneuralarchitecturesearchforobjectdetection/images.zip b/nasfcosfastneuralarchitecturesearchforobjectdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f57a39c9dc0e29a888df2f6a50ed919efc9392ef --- /dev/null +++ b/nasfcosfastneuralarchitecturesearchforobjectdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5af28f388b48e32362fe26a04e1de2404574ff1f3ce22824271637731a0b8728 +size 409556 diff --git a/nasfcosfastneuralarchitecturesearchforobjectdetection/layout.json b/nasfcosfastneuralarchitecturesearchforobjectdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..04e4e7855472931a3bb766b27d867d08e572f673 --- /dev/null +++ b/nasfcosfastneuralarchitecturesearchforobjectdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f192e6d10d0b61131373afb921baa4823eab706002b5e20db6f194de8c2a24f2 +size 358362 diff --git a/nestedscaleeditingforconditionalimagesynthesis/13c575f9-7a5f-4222-bbd3-d11d279e2ba2_content_list.json b/nestedscaleeditingforconditionalimagesynthesis/13c575f9-7a5f-4222-bbd3-d11d279e2ba2_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..bad83d412d3d903554d8f9d9ff38208cf6ca9734 --- /dev/null +++ b/nestedscaleeditingforconditionalimagesynthesis/13c575f9-7a5f-4222-bbd3-d11d279e2ba2_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5561b45bcbb3d4e85c705ec0b52aa769626fa0c07fe838459061c72717a5e8b8 +size 73539 diff --git a/nestedscaleeditingforconditionalimagesynthesis/13c575f9-7a5f-4222-bbd3-d11d279e2ba2_model.json b/nestedscaleeditingforconditionalimagesynthesis/13c575f9-7a5f-4222-bbd3-d11d279e2ba2_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b1440894409979be34356991dc34fb7775e62f87 --- /dev/null +++ b/nestedscaleeditingforconditionalimagesynthesis/13c575f9-7a5f-4222-bbd3-d11d279e2ba2_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:085bd232838ef4d77581188610d7313b7d548f9cec10f055e04c727aed363a24 +size 93875 diff --git a/nestedscaleeditingforconditionalimagesynthesis/13c575f9-7a5f-4222-bbd3-d11d279e2ba2_origin.pdf b/nestedscaleeditingforconditionalimagesynthesis/13c575f9-7a5f-4222-bbd3-d11d279e2ba2_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d1d27c0e9c0c2b932c51b9f1602bf61b89d6e52e --- /dev/null +++ b/nestedscaleeditingforconditionalimagesynthesis/13c575f9-7a5f-4222-bbd3-d11d279e2ba2_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b517de88c41814fefe6d06ea937dd6985b58b81dbfb9c695a498580870014740 +size 1026119 diff --git a/nestedscaleeditingforconditionalimagesynthesis/full.md b/nestedscaleeditingforconditionalimagesynthesis/full.md new file mode 100644 index 0000000000000000000000000000000000000000..350f756e204085e7d1a59758eadf7da487d8ea27 --- /dev/null +++ b/nestedscaleeditingforconditionalimagesynthesis/full.md @@ -0,0 +1,314 @@ +# Nested Scale-Editing for Conditional Image Synthesis + +Lingzhi Zhang* Jiancong Wang* Yinshuang Xu Jie Min Tarmily Wen James C. Gee Jianbo Shi + +![](images/127744e22123250cebf3acc2b502e9b4925c78a25cc78d372150ab151e7bc0e3.jpg) +University of Pennsylvania +Figure 1: Our approach enables scale-specific visual editorings in conditional image synthesis. We can choose to surgically manipulate coarse-level structural information or fine-level details in Cat2Dog translation and image outpainting tasks. + +# Abstract + +We propose an image synthesis approach that provides stratified navigation in the latent code space. With a tiny amount of partial or very low-resolution image, our approach can consistently out-perform state-of-the-art counterparts in terms of generating the closest sampled image to the ground truth. We achieve this through scale-independent editing while expanding scale-specific diversity. Scale-independence is achieved with a nested scale disentanglement loss. Scale-specific diversity is created by incorporating a progressive diversification constraint. We introduce semantic persistency across the scales by sharing common latent codes. Together they provide better control of the image synthesis process. We evaluate the effectiveness of our proposed approach through various tasks, including image outpainting, image superresolution, and cross-domain image translation. + +# 1. Introduction + +Imagine that we want to identify a person based on the appearance of their eyes and nose, or a lower resolution image, as shown in figure 1. One solution may be to outpaint the entire face, conditioned on the partial information available. + +We want to be as imaginative and as detailed as possible to give us a greater chance of success in finding the right person. These tasks are multimodal in nature, i.e., a single input corresponds to many plausible outputs. + +Conditional image synthesis approaches aim to solve this problem by sampling stochastic latent codes to generate images in a GAN setting. However, these image synthesis methods of sampling operate as uncontrollable "black boxes". During inference, we can only hope that a sampled random variable generates the ideal image we desire; otherwise, we need to keep sampling. + +We propose a steerable conditional image synthesis approach. Inspired by the steerable filtering in the wavelet process [48], we wish to 'steer' the image synthesis across the spatial scales consistently. While in steerable filtering we are concerned with angular edge orientation, in our domain, we focus on object semantics. Specifically, we aim to create visual information from a coarse-level structure to fine-level texture. The key objectives are 1) scale-independence: we learn disentangled representations that model scale-specific visual details, and 2) diversity/model covering: we ensure that the decoder covers diverse variations presented on ground truth images. + +To implement the scale-independent objective, we take inspiration from the Laplacian image pyramid decomposi + +![](images/70d98c3b319338f2d01926500d8e132faca021c37dad6933583bf8333c96a1c4.jpg) + +![](images/53da3d67502a3389c0e42fb27b5173a528f9e0df5c13fa369318fdc51142a12a.jpg) + +![](images/8dbe08546c37168035b182c33e3051d4d2e3345115bb2f6957b15d17acf8d0e0.jpg) +Figure 2: Demonstration of an application scenario in which a user interactively recovers a facial identity by sampling scale-specific visual details using our proposed approach. Image you look at this occluded face, you might have a rough mental picture of someone. We can edit the image at multi-scale to recover the identity. + +![](images/20bdd6b115932413fc74becb4b843fce5bd6beed4a60a4f126d554ad9722101c.jpg) + +![](images/14643dfd98c236db629376ae16be3f373e065af8b52b5c7085ff0925b1a42a73.jpg) + +![](images/6a1f2e38b1761e40569c5c53498122d701045c0ff683e6c761fd20bb6ec75e2c.jpg) + +![](images/39bd335c5090dd4baf502b43c2eb5f0b687646f0bd36378cb786b98ef2c24307.jpg) + +![](images/5b22a3f53c52e0174c18b2734db1e7c40439b267abaec053d90310ad5faa37ae.jpg) + +tion: our algorithm essentially learns to generate progressively more refined image along spatial scales, with each level of refinement independent of each other. To implement the diversity objective, we extend a successful diversity constraint [36] to multi-scale and ensure scale-specific diversity. + +Unlike current multi-scale noise injection methods [7, 25], our multi-scale injected noises share same latent variable during training. This introduces semantic persistency, meaning the decoder expects latent variables on different scales to have similar semantic meaning. Semantic-persistence can play a major role in search efficiency, since it enables stratified navigation in the latent code space. Fig.2 illustrates the stratified navigation process for face superresolution. We first coarsely sample a widespread set of latent random variables to find an image roughly matching the ground truth. Because of our scale-independent representation, we can efficiently edit the image by adjusting any of the latent variable at a specific scale and edit the image information at the corresponding scale. Therefore we can generate a refined image by adjusting the existing latent variable at next scale and repeat, until final scale is reached. This is the ideal steering behavior we seek. + +In summary, we highlight our contributions as follows: + +- We are the first to propose a multi-scale feature disentanglement loss and a progressive diversification regularization to achieve scale-specific control for conditional image synthesis. +- To the best of our knowledge, our work is the first to utilize diverse conditional image generation for identity recovery. We developed three evaluation metrics for identity recovery in diverse conditional synthesis scenarios. +- We evaluate our aforementioned development on tasks of image outpainting, image superresolution, and mul + +timodal image translation. Our methods achieve competitive image quality and diversity compared to state-of-the-art counterparts, while consistently outperforming them in terms of identity recovery. + +# 2. Related Work + +# 2.1. Multimodal Conditional Generation + +Deep generative models have been widely used in many conditional image synthesis tasks, such as super-resolution [9,28,54,60-62], inpainting missing regions [21,35,43,44, 56,58,59,65], style transfer [15,18,22,34,39], image blending [40,49,55,66], and text-to-image [23,32,46]. The majority of these tasks are in nature multimodal, where single input condition may correspond to multiple plausible outputs. BicycleGAN [68] first proposed to model this one-to-many distribution by explicitly encoding the target domain into a compact Gaussian latent distribution from which the generator samples. During inference, the generator maps a random variable drawn from the latent distribution, combined with the given input, to the output. StackedGAN and its variant StackedGAN++ [63, 64] proposed to use a hierarchical generator which incorporates conditional code on multiple scales and were able to generate high quality synthetic images. DRIT [31] and MUNIT [20] proposed to disentangle the features into domain-invariant content codes and domain-specific style codes for unpaired imagedto-image translations. During inference, the sampled style codes combined with the content code can be transformed into many plausible outputs. + +Although the above approaches can generate multimodal outputs given a conditional input, there is no explicit constraint to prevent the generator from mapping the various sampled random variables to similar outputs, which is known as mode collapse. Two concurrent works aim to al + +leviate this issue by proposing diversity regularization techniques for generative training. Mode Seeking GAN (MSGAN) [41] proposes to maximize the ratio of two sampled images over the corresponding latent variables. Normalized Diversification (NDiv) [36] proposes to enforce the generator to preserve the normalized pairwise distance between the sparse samples from a latent distribution to the corresponding high-dimensional output space. + +In addition to image synthesis, other applications with multimodal predictions include but are not limited to predicting uncertain motion flows in the future [14, 51, 57], hallucinating diverse body pose affordance in 2D [52] and 3D [33] scenes. + +Different from previous work, our focus is to achieve scale-specific control for image synthesis and progressively inject stochasticity into different scales of the synthesized image. Therefore, our proposed techniques can be readily added into these orthogonal previous approaches. We demonstrate that our techniques work with face outpainting, face superresolution, and multimodal animal translation with modified MUNIT [20]. + +# 2.2. Feature Disentanglement + +Recently there is increasing interest in disentanglement of distinct image characteristics for image synthesis. [26, 29, 53] attempt to decouple image style and content, while [12, 13, 38] target object shape and appearance. These approaches explicitly incorporate two codes that denote the two characteristics, respectively, into the generative model and introduce a guided loss or incorporate the invariance constraint to orthogonalize the two codes, while our method disentangles the scale-specific variations from global structural feature to local texture feature through hierarchical input of latent variables into the generative model. + +Besides the disentanglement of two specific characteristics, several prior efforts [4, 5, 8, 10, 17] have explored partially or fully interpretable representations of independent factors for generative modeling. Some current work learn representations of the specific attribute by supervised learning [2, 45] with a conditioning discriminator. Our method focuses on multi-scale disentanglement through unsupervised learning, which is distinct from the concept of disentangling specific semantic factors. + +[24] has first proposed synthesize images from low-resolution scale to higher-resolution scale in a progressive manner. Similarly, other closely related work is [7] and [25]. [7] pioneered the use of the hierarchical generator with latent codes injected at each level for multi-scale control of image synthesis and further advanced in [25]. Both [7] and [25], however, only target unconditional image synthesis and do not explicitly enforce diversity of outputs. Our work extends to conditional synthesis and incorporates explicit diversity constraints. + +Since the purpose and definition of disentanglement in our method are different from previous work, the existing metrics for evaluating disentanglement [4,11,17,25,27] are not appropriate for measuring feature disentanglement for our method. We therefore develop a new means to quantify the hierarchical disentanglement for our approach. + +# 3. Methods + +Multimodal conditional image synthesis combines a given input conditional code with sampled latent codes drawn from a compact latent space (usually a standard normal or uniform distribution) and decodes the combination into an output image. Unlike previous efforts [20, 36, 41, 68], we propose a cascading disentangled decoder inspired by Laplacian image pyramid [1]. With a central multi-scale backbone, it generates output images at every feature spatial scale through a single convolutional layer. We enforce the generated images at every scale to be average-pooled back into a lower-resolution generated image. By doing so, we distill features at each spatial scale to only focus on image details — similar to a Laplacian image — at the corresponding spatial resolution. With these scale-independent features, we can inject random variables into each scale of the image features to model the scale-specific stochasticity of image details. + +# 3.1. Multiscale Disentanglement + +To enable scale-specific editing of visual contents, we need a model that has a disentangled latent code representation. This implies that visual content on specific scales can be modified by changing corresponding latent codes, while visual contents on other scales remain unaffected. + +In a decoder network that receives only a single latent code at the coarsest scale, the single latent code controls image generation at all scales and hence changing the code will affect all scales. This motivates the multi-latent code design: injecting latent codes on all spatial scales and allowing each individual latent code to control the image on corresponding scales. Let $Z_{0}$ denote the random base latent code, and $Z_{1} = A_{1}(Z_{0}), Z_{2} = A_{2}(Z_{0}), Z_{k} = A_{k}(Z_{0})$ , and the latent variable at each scale level $i \in \{1 \dots k\}$ , where $A_{i}$ is an affine mapping matrix. Intuitively, the latent code at coarse scale may mostly affect global structure while latent code at fine scale is more likely to alter local texture at its respective scale. Such behavior can be seen in [7] and [25]. + +However, this design does not guarantee that visual information represented by the latent code at different scales are disentangled. For example, latent code at coarse scale might control texture and color that are also affected by latent code at fine scale. With such a decoder, it is still difficult to edit the scale-specific visual information while keeping information on other scales unchanged. + +![](images/7f0588a251fcd8168a31ac8abb2dcd8ca4613a2b8296f4f0fdc66a235a98e195.jpg) +Figure 3: Our decoder network takes a conditional code and a single random variable as inputs. A single latent variable is injected into multi-scale feature representations through the first several shared layers of MLPs. Then that output is injected into different affine transformation layers with Adaptive Instance Normalization (AdaIN) [19]. At every spatial scale, a single convolutional layer is used to decode a real image at each corresponding resolution. Our proposed disentanglement loss enforces the generated images at every scale to be averaged-pooled back into a lower-resolution generated image. At each iteration, we sample four latent variables and generate four images at each spatial scale, where we also enforce the pairwise distance between sampled images and latent variables to encourage diverse synthesized outputs. + +Therefore, we propose a simple but effective approach to disentangle features at each layer of the decoder to only control the visual information at the corresponding spatial scale. At each layer in the decoder, we add a single convolution layer to synthesize an image at the corresponding spatial resolution. Then, we enforce that each synthesized image, when downsampled, matches the synthesized image at the previous spatial scale. We call this constraint a multi-scale disentanglement loss $L_{\text{disent}}$ . Specifically, we use average pooling to downsample the synthesized image and pixel-wise Euclidean distance to constraint the down-sampling consistency. Our intuition is that, by doing so, the features at each layer are not allowed to change any visual information at the previous or deeper layers. In this way, we distill each level of features to only edit the visual information at its corresponding spatial scale. + +Formally, we denote $S$ as the downsampling operation on image $x$ , specifically, average $2 \times 2$ pooling with stride of 2. The loss function of progressive downsampling consistency is defined as follows, + +$$ +\mathcal {L} _ {\text {d i s e n t}} = \sum_ {i = 1} ^ {n - 1} d \left(S \left(G _ {i + 1} (c, z)\right), G _ {i} (c, z)\right), \tag {1} +$$ + +where $n$ is the number of resolution scales, $c$ is the conditional code, $z$ is random variable, and $G_{i}$ is the generator, whose subscript refers to the network layers that + +are responsible for synthesizing images at each scale. For $G_{i}(2 \leq i \leq n)$ , they have iterative format: + +$$ +G _ {i} (c, z) = U \left[ G _ {i - 1} (c, z), A _ {i} (z) \right] \tag {2} +$$ + +and, + +$$ +G _ {1} (c, z) = U [ c, A _ {1} (z) ]. \tag {3} +$$ + +where $\mathrm{U}$ denotes the Upsampling Module. + +At each spatial scale, we also applied conditional GAN to synthesize photo-realistic images, where the loss functions are as follows, + +$$ +\begin{array}{l} \mathcal {L} _ {G A N} = E _ {\mathbf {x} \sim p _ {\mathrm {d a t a}} (\mathbf {x})} \left[ \sum_ {i = 1} ^ {n} \log \left(D _ {i} \left(S ^ {n - i} (\mathbf {x}) | c\right)\right) \right] \tag {4} \\ + E _ {\mathbf {z} \sim p (\mathbf {z})} \left[ \sum_ {i = 1} ^ {n} l o g (1 - D _ {i} (G _ {i} (\mathbf {z}, c))) \right]. \\ \end{array} +$$ + +The similar multi-scale adversarial loss has been applied in SinGAN [47] as well. + +# 3.2. Progressive Diversification + +To avoid mode collapse and increase diversity of the synthesized images, we leverage the normalized diversification [36], which forces the normalized pairwise distance of generative outputs to be at least as large as that of the corresponding latent variables. + +![](images/1553a34a2c8e4f4337096479427b635c81a188cd3296c698bb06fb212ff7cde4.jpg) +Best Identity Recovery + +![](images/1d54242608ccbb1a17ab2addae9a511cfc5adb4213ae45deaa3c8164bdc7361d.jpg) +Figure 4: Qualitative comparison for multimodal image outpainting. + +
MethodQuality ↓Diversity ↑Identity
Shortest Distance ↓Recovery Count(%) ↑Landmark Alignment ↓
BicycleGAN64.1330.0930.23315.345.914
MSGAN56.9980.2320.23728.934.754
Ndiv68.8550.3190.25620.955.126
Ours55.8540.3330.22834.784.540
+ +Table 1: Quantitative Comparison with state-of-the-art approaches in multimodal image outpainting task. + +Here we introduce normalized diversification in a progressive manner, that is, we add normalized diversification loss at each layer of the hierarchical decoder. In comparison, previous work [36,41,42] applied the diversity penalty only at the final scale output of the model, which enforces in a brute force way the final output diversity but does not prevent individual levels of the model from mode collapse (for a 3-layer model where latent code $z$ is injected at each level, previous efforts only enforce that the final output varies by $z$ , but allow individual layers to collapse. For example, the first layer of the model utilizes the $z$ while second and third layer ignore $z$ entirely). + +Mode collapses at individual levels prevent us from exactly controlling the diversity on a specific level of structure or texture for synthesized data. Thus, we propose progressive diversification, effectively unfolding manifold topology for different scales. In this way, we achieve not only independent multi-scale control during the generative process but also guarantee latent that the code $z$ introduces variation on every scale, likely from structure to texture. + +The inserted progressive normalized diversification can + +be formulated as loss function 5. + +$$ +\mathcal {L} _ {N d i v} = \sum_ {k = 1} ^ {n} \frac {1}{N ^ {2} - N} \sum_ {i = 1} ^ {N} \sum_ {j = 1} ^ {N} \max \left(\alpha D _ {i j} ^ {z} - D _ {i j} ^ {G _ {k} (z, c)}\right), \tag {5} +$$ + +where $N$ is the number of samples to calculate the normalized pairwise distance matrix and $D_{ij}^{z}$ , $D_{ij}^{G_k(z|y)}$ are defined as elements in normalized pairwise distance matrix $D^{z}, D^{G_{k}(z|y)} \in \mathbb{R}^{N \times N}$ of $z_{i_{i=1}}^{N} \sim p(z)$ : + +$$ +D _ {i j} ^ {z} = \frac {d \left(z _ {i} - z _ {j}\right)}{\sum_ {j} d \left(z _ {i} - z _ {j}\right)} \tag {6} +$$ + +$$ +D _ {i j} ^ {G _ {k} (z, c)} = \frac {d (G _ {k} (z , c) _ {i} - G _ {k} (z , c) _ {j})}{\sum_ {j} d (G _ {k} (z , c) _ {i} - G _ {k} (z , c) _ {j})}. +$$ + +Here, $d$ the latent variable is the Euclidean distance, and for generative outputs is the pixel-wise Euclidean distance. + +# 4. Experiments + +The proposed approaches were evaluated through their performance on various tasks, including image outpainting, image superresolution, and dog2cat/cat2dog translation. In + +![](images/70a0a9766825f0c39b144a714cb2d08451157aad1cf79adfe6960a0fea4818b5.jpg) +Figure 5: Qualitative comparison for multimodal image superresolution + +![](images/a37752ee1a7666ad1e480a1c0b5302accb65b8e55152d211664afebe7e55dc56.jpg) + +
MethodQuality ↓Diversity ↑Identity
Shortest Distance ↓Recovery Count(%) ↑Landmark Alignment ↓
BicycleGAN40.8370.0190.12926.497.062
MSGAN49.6470.04380.13129.485.907
Ndiv81.42130.07580.1435.605.938
Ours46.3460.06770.12538.434.261
+ +Table 2: Quantitative Comparison with state-of-the-art approaches in multimodal image superresolution task. + +addition to conventional quality and diversity assessment, we propose to evaluate the extent to which diverse sampling can improve identity recovery, especially in the context of facial recognition. We believe that this is a first attempt that aims to apply diverse synthesis for better recognition. Our premise is that given a conditional code containing only partial information of the ground truth image, a decoder capable of generating diverse output can produce at least one or more results that is close to or recovers the ground truth image, as long as sufficient latent code is sampled. This property would be useful in many difficult recognition situations, such as identifying criminals in largely occluded or very low-resolution images. Diverse sampling would provide a set of candidates, which can then be narrowed down further by human reviewers. We describe next three newly proposed evaluation metrics in this work for identity recovery. + +# 4.1. Evaluation Metrics + +To perform evaluation of our approach, we use the following metrics. + +FID. We use FID [16] to evaluate the quality of generated data. This metric applies the Inception Network [50] to ex + +tract features from real and synthesized data, and then calculates the Frechet distance between the two distributions of collected real and synthesized features, respectively. A lower FID score indicates less discrepancy between real and synthesized data and hence higher quality. + +LPIPS. We apply LPIPS [67] to quantify the diversity, which calculates the pairwise average feature distance across the whole generated dataset. We use AlexNet [30] pretrained on ImageNet [6] to extract features. Larger values of the pairwise LPIPS score indicate increased image diversity. + +Identity Recovery. To quantify how well diverse sampling recovers the true facial identity, we propose to evaluate the distance between the most similar sampled output and the ground truth image. First, we compute the shortest embedding distance between a set of sampled outputs and the ground truth, where the embedding distance is given by LPIPS. We average this shortest embedding distance across all training examples, which we denote as Shortest Distance in Table (1) and (2). We also count the chance that each method generates the most similar outputs under evaluation of this embedding distance, and denote this as Recovery Count. We also evaluate the identity recovery of + +![](images/09f7ece3b99acfd59ceb5b9e656f4aa3b577c8c3e512739dfce05bdedd7b93ed.jpg) +Figure 6: Qualitative comparison against the state-of-the-art in multi-modal translation for cat/dog identity recovery. The input (left column) indicates a MUNIT content code. Only one channel of the content code is shown for easier. + +![](images/0fe55fca807f82be4c06e1638dd3f81c2bf0fea5732241b8778529bccd0709c2.jpg) +Best Identity Recovery + +
MethodQuality ↓Diversity ↑Identity
Shortest Distance ↓Recovery Count(%) ↑
MUNIT [20]15.740.5330.44515.0
Ours21.220.5470.39385.0
+ +Table 3: Quantitative comparison with state-of-the-art approaches on the cross-modal image-to-image translation task. + +face images using facial landmarks, which are obtained using a pretrained facial landmark detector [3]. Specifically, the similarity between a sampled output and the ground truth is given by the mean squared error distance between the corresponding 68 facial landmark locations for the sampled and ground-truth images. We refer to this evaluation as Landmark Alignment. + +# 4.2. Image Outpainting + +We first present experimental results in an image outpainting task, where the goal is to fill in large areas of missing pixels in a highly occluded image, which may have many different solutions for a given input. In terms of model implementations, we only need to add our proposed multiscale disentanglement and diversification into a standard conditional encoder-decoder. The experiment is conducted over the CelebA dataset [37] with cropped 128x128 images. + +We compare our model with the current state-of-the-art multimodal conditional synthesis approaches, including BicycleGAN [68], MSGAN [41], and NDiv [36]. The experimental results show that our model can generate the best results in terms of image quality, diversity as well as identity, as shown in Table.1. In our qualitative comparison figure.4, we show that one of the sampled image could best recover the ground truth facial identity. We think that this is because our model can sample not only very diverse but also realistic images. + +# 4.3. Image Super-Resolution + +Another multimodal conditional synthesis we run on face data is super-resolution. While most of other super-resolution approaches model this task as a deterministic image-to-image process, we consider super-resolution from + +a very low resolution image as a one-to-many process because of its uncertainty in nature. For example, the 16x16 low resolution in Figure.5 can be very difficult to identified. Even for human, it is very difficult to tell what is the ground true high-resolution image is. Or, every human would probably have a different answer. In this task, we use bilinearly downsampled 16x16 image as low-resolution input and 128x128 image as high-resolution output in CelebA dataset [37]. + +Our implementation of superresolution model is similar to image outpainting, but we start to decode image at scale of 16x16, which is the same as input resolution. The disentanglement and diversification is added at every other higher resolution scale. As seen from Table. (2), even though our approach does not reach the best quality or diversity, but it achieves the best identity score. We think that the simply measuring quality or diversity separately is not sufficient. BicycleGAN has the best quality but lack diversity, so it is difficult to "hit" the ground truth image. NDiv has the largest diversity but lacks quality, and thus it is also very difficult to recover the realistic ground truth image. In contrast, our model can produce reasonably large diversity and good quality, and thus has the highest chance to recover the ground truth image. Our implementation of super-resolution model is similar to image outpainting, but we start to decode image at scale of 16x16, which is the same as input resolution. The disentanglement and diversification is added at every other higher resolution scale. As seen from Table. (2), even though our approach does not reach the best quality or diversity, but it achieves the best identity score. We think that the simply measuring quality or diversity separately is not sufficient. BicycleGAN [68] has the best quality but lack diversity, so it is difficult to "hit" the + +![](images/aa1774d449155ee544038c597a71d08291c4ce425b235afd09f2bb5251d9b287.jpg) +Figure 7: This figure demonstrates how much the generated image would change by varying noise injection at a specific resolution scale. This is implemented by sampling a reference code, and only varying random variable at one scale at a time and fixing the random variables at the other scales constant. + +![](images/926ffb02320dd643c5a3b401467cd0a611d64198b70dc03bfc7f1ea8f425b53f.jpg) + +ground truth image. NDiv [36] has the largest diversity but lacks quality, and thus it is also very difficult to recover the realistic ground truth image. In contrast, our model can produce reasonably large diversity and good quality, and thus has the highest chance to recover the ground truth image. + +# 4.4. Dog to Cat Image Translation + +We conduct an unpaired cross-modal image translation using the MUNIT backbone [20] on the cat and dog dataset from [31]. This dataset contains 1264 training/100 testing dog and 771 training/100 testing cat images. We modify the MUNIT backbone for multi latent codes injection and implemented the disentanglement loss and progressive diversification loss as mentioned in section 3.1 and 3.2. Detailed network architecture before and after modification can be found in the supplemental material. We compare FID and LPIPS of our model against the original MUNIT model trained on the cat and dog dataset and report the performance in Table.3. For identity recovery evaluation, we pass the ground truth image through the content encoder from the MUNIT framework and derive a content code, which is recombined with sampled latent codes and decoded into images. Quantitatively, we evaluate identity recovery using the LPIPS metric from 4.1. Qualitative results of identity recovery is demonstrated in Fig.6. + +# 4.5. Multi-scale Disentanglement Evaluation + +To quantify the multiscale disentanglement, we evaluate perceptual variations on output images against different noise varying scales. In specific, for scale $k$ in our $n$ scale decoder, a given fixed input condition code $c$ , we sample a center latent code $z$ . We fixed the input latent codes on every scale to be $z$ except for for scale $k$ , where we sample 10 latent codes centered around $z$ and generate 10 different output images. Pairwise perceptual distances (using LPIPS) among these 10 images are calculated. We calculate the pairwise perceptual distance for scale $k$ across 1000 dif + +ferent input condition codes and averaged them. We plotted the averaged perceptual distance against the scale on Fig.7. For a general decoder (left) without the disentanglement constraint, the perceptual variation were not monotonically decreasing along the scale. Our scale disentangled decoder (right) on the other hand achieves multiscale disentanglement: latent codes at finer scales monotonically introduce less variation to the image, therefore editing latent code at finer level has little effect on visual information on coarse scale. + +# 5. Conclusion + +We develop a conditional image synthesis network that enables scale-specific and diverse control of image content. We instantiate our design with a cascading decoder network. We couple it with multi-scale feature disentanglement constraints and a progressive diversification regularization. In addition, we gain semantic persistency in the decoder by sharing latent code across scales during training. This allows for stratified navigation and search within latent code space, and motivate the task of identity recovery. We propose three evaluation metrics for identity recovery within conditional image synthesis scenarios. On tasks of image outpainting, image superresolution, and multimodel image translation, our method consistently outperforms state-of-the-art counterparts in terms of identity recovery, while having competitive image quality and diversity. Hence we believe our method may potentially be useful in extreme image recognition situations, such as recognizing criminals in largely occluded or very low-resolution images, and finding lost pets from low quality surveillance images. + +# Acknowledgement + +We gratefully appreciate the support from Honda Research Institute Curious Minded Machine Program. We also gratefully acknowledge a GPU donation from NVIDIA. + +# References + +[1] Edward H Adelson, Charles H Anderson, James R Bergen, Peter J Burt, and Joan M Ogden. Pyramid methods in image processing. RCA engineer, 29(6):33-41, 1984. 4323 +[2] Grigory Antipov, Moez Baccouche, and Jean-Luc Dugelay. Face aging with conditional generative adversarial networks. In 2017 IEEE International Conference on Image Processing (ICIP), pages 2089-2093. IEEE, 2017. 4323 +[3] Adrian Bulat and Georgios Tzimiropoulos. Super-fan: Integrated facial landmark localization and super-resolution of real-world low resolution faces in arbitrary poses with gans. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 109-117, 2018. 4327 +[4] Tian Qi Chen, Xuechen Li, Roger B Grosse, and David K Duvenaud. Isolating sources of disentanglement in variational autoencoders. In Advances in Neural Information Processing Systems, pages 2610-2620, 2018. 4323 +[5] 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. 4323 +[6] 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. 4326 +[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. 4322, 4323 +[8] Jeff Donahue, Philipp Krahenbuhl, and Trevor Darrell. Adversarial feature learning. arXiv preprint arXiv:1605.09782, 2016. 4323 +[9] Chao Dong, Chen Change Loy, Kaiming He, and Xiaou Tang. Image super-resolution using deep convolutional networks. IEEE transactions on pattern analysis and machine intelligence, 38(2):295-307, 2016. 4322 +[10] Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Olivier Mastropietro, Alex Lamb, Martin Arjovsky, and Aaron Courville. Adversarily learned inference. arXiv preprint arXiv:1606.00704, 2016. 4323 +[11] Cian Eastwood and Christopher KI Williams. A framework for the quantitative evaluation of disentangled representations. 2018. 4323 +[12] Patrick Esser, Johannes Haux, and Bjorn Ommer. Unsupervised robust disentangling of latent characteristics for image synthesis. In Proceedings of the IEEE International Conference on Computer Vision, pages 2699-2709, 2019. 4323 +[13] 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. 4323 +[14] Ruohan Gao, Bo Xiong, and Kristen Grauman. Im2flow: Motion hallucination from static images for action recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5937-5947, 2018. 4323 + +[15] Leon A Gatys, Alexander S Ecker, and Matthias Bethge. Image style transfer using convolutional neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2414-2423, 2016. 4322 +[16] 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. 4326 +[17] Irina Higgins, Loic Matthew, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. beta-vae: Learning basic visual concepts with a constrained variational framework. ICLR, 2(5):6, 2017. 4323 +[18] Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In Proceedings of the IEEE International Conference on Computer Vision, pages 1501-1510, 2017. 4322 +[19] Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In Proceedings of the IEEE International Conference on Computer Vision, pages 1501-1510, 2017. 4324 +[20] Xun Huang, Ming-Yu Liu, Serge Belongie, and Jan Kautz. Multimodal unsupervised image-to-image translation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 172-189, 2018. 4322, 4323, 4327, 4328 +[21] Satoshi Iizuka, Edgar Simo-Serra, and Hiroshi Ishikawa. Globally and locally consistent image completion. ACM Transactions on Graphics (ToG), 36(4):107, 2017. 4322 +[22] 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. 4322 +[23] Justin Johnson, Agrim Gupta, and Li Fei-Fei. Image generation from scene graphs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1219–1228, 2018. 4322 +[24] Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of gans for improved quality, stability, and variation. arXiv preprint arXiv:1710.10196, 2017. 4323 +[25] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4401-4410, 2019. 4322, 4323 +[26] Hadi Kazemi, Seyed Mehdi Iranmanesh, and Nasser Nasrabadi. Style and content disentanglement in generative adversarial networks. In 2019 IEEE Winter Conference on Applications of Computer Vision (WACV), pages 848-856. IEEE, 2019. 4323 +[27] Hyunjik Kim and Andriy Mnih. Disentangling by factorising. arXiv preprint arXiv:1802.05983, 2018. 4323 +[28] Jiwon Kim, Jung Kwon Lee, and Kyoung Mu Lee. Accurate image super-resolution using very deep convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1646-1654, 2016. 4322 + +[29] Dmytro Kotovenko, Artsiom Sanakoyeu, Sabine Lang, and Bjorn Ommer. Content and style disentanglement for artistic style transfer. In Proceedings of the IEEE International Conference on Computer Vision, pages 4422-4431, 2019. 4323 +[30] 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. 4326 +[31] Hsin-Ying Lee, Hung-Yu Tseng, Jia-Bin Huang, Maneesh Singh, and Ming-Hsuan Yang. Diverse image-to-image translation via disentangled representations. In Proceedings of the European Conference on Computer Vision (ECCV), pages 35-51, 2018. 4322, 4328 +[32] Wenbo Li, Pengchuan Zhang, Lei Zhang, Qiuyuan Huang, Xiaodong He, Siwei Lyu, and Jianfeng Gao. Object-driven text-to-image synthesis via adversarial training. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 12174-12182, 2019. 4322 +[33] Xueting Li, Sifei Liu, Kihwan Kim, Xiaolong Wang, Ming-Hsuan Yang, and Jan Kautz. Putting humans in a scene: Learning affordance in 3d indoor environments. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 12368-12376, 2019. 4323 +[34] Yijun Li, Chen Fang, Jimei Yang, Zhaowen Wang, Xin Lu, and Ming-Hsuan Yang. Universal style transfer via feature transforms. In Advances in neural information processing systems, pages 386-396, 2017. 4322 +[35] Guilin Liu, Fitsum A Reda, Kevin J Shih, Ting-Chun Wang, Andrew Tao, and Bryan Catanzaro. Image inpainting for irregular holes using partial convolutions. In Proceedings of the European Conference on Computer Vision (ECCV), pages 85–100, 2018. 4322 +[36] Shaohui Liu, Xiao Zhang, Jianqiao Wangni, and Jianbo Shi. Normalized diversification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 10306-10315, 2019. 4322, 4323, 4324, 4325, 4327, 4328 +[37] 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. 4327 +[38] Dominik Lorenz, Leonard Bereska, Timo Milbich, and Björn Ommer. Unsupervised part-based disentangling of object shape and appearance. arXiv preprint arXiv:1903.06946, 2019. 4323 +[39] Fujun Luan, Sylvain Paris, Eli Shechtman, and Kavita Bala. Deep photo style transfer. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4990-4998, 2017. 4322 +[40] Fujun Luan, Sylvain Paris, Eli Shechtman, and Kavita Bala. Deep painterly harmonization. In Computer Graphics Forum, volume 37, pages 95-106. Wiley Online Library, 2018. 4322 +[41] Qi Mao, Hsin-Ying Lee, Hung-Yu Tseng, Siwei Ma, and Ming-Hsuan Yang. Mode seeking generative adversarial networks for diverse image synthesis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1429-1437, 2019. 4323, 4325, 4327 + +[42] Takeru Miyato, Toshiki Kataoka, Masanori Koyama, and Yuichi Yoshida. Spectral normalization for generative adversarial networks. arXiv preprint arXiv:1802.05957, 2018. 4325 +[43] Kamyar Nazeri, Eric Ng, Tony Joseph, Faisal Qureshi, and Mehran Ebrahimi. Edgeconnect: Generative image inpainting with adversarial edge learning. arXiv preprint arXiv:1901.00212, 2019. 4322 +[44] Deepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell, and Alexei A Efros. Context encoders: Feature learning by inpainting. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2536-2544, 2016. 4322 +[45] Guim Perarnau, Joost Van De Weijer, Bogdan Raducanu, and Jose M Álvarez. Invertible conditional gans for image editing. arXiv preprint arXiv:1611.06355, 2016. 4323 +[46] Scott Reed, Zeynep Akata, Xinchen Yan, Lajanugen Logeswaran, Bernt Schiele, and Honglak Lee. Generative adversarial text to image synthesis. arXiv preprint arXiv:1605.05396, 2016. 4322 +[47] Tamar Rott Shaham, Tali Dekel, and Tomer Michaeli. Singan: Learning a generative model from a single natural image. In Proceedings of the IEEE International Conference on Computer Vision, pages 4570-4580, 2019. 4324 +[48] Eero P Simoncelli and William T Freeman. The steerable pyramid: A flexible architecture for multi-scale derivative computation. In Proceedings., International Conference on Image Processing, volume 3, pages 444-447. IEEE, 1995. 4321 +[49] Yi-Hsuan Tsai, Xiaohui Shen, Zhe Lin, Kalyan Sunkavalli, Xin Lu, and Ming-Hsuan Yang. Deep image harmonization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3789-3797, 2017. 4322 +[50] Catherine Wah, Steve Branson, Peter Welinder, Pietro Perona, and Serge Belongie. The caltech-ucsd birds-200-2011 dataset. 2011. 4326 +[51] Jacob Walker, Carl Doersch, Abhinav Gupta, and Martial Hebert. An uncertain future: Forecasting from static images using variational autoencoders. In European Conference on Computer Vision, pages 835-851. Springer, 2016. 4323 +[52] Xiaolong Wang, Rohit Girdhar, and Abhinav Gupta. Binge watching: Scaling affordance learning from sitcoms. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2596-2605, 2017. 4323 +[53] Xiaolong Wang and Abhinav Gupta. Generative image modeling using style and structure adversarial networks. In European Conference on Computer Vision, pages 318-335. Springer, 2016. 4323 +[54] 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. 4322 +[55] Huikai Wu, Shuai Zheng, Junge Zhang, and Kaiqi Huang. Gp-gan: Towards realistic high-resolution image blending. In Proceedings of the 27th ACM International Conference on Multimedia, pages 2487-2495, 2019. 4322 + +[56] 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. 4322 +[57] Tianfan Xue, Jiajun Wu, Katherine Bouman, and Bill Freeman. Visual dynamics: Probabilistic future frame synthesis via cross convolutional networks. In Advances in neural information processing systems, pages 91-99, 2016. 4323 +[58] Raymond A Yeh, Chen Chen, Teck Yian Lim, Alexander G Schwing, Mark Hasegawa-Johnson, and Minh N Do. Semantic image inpainting with deep generative models. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5485-5493, 2017. 4322 +[59] 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. 4322 +[60] Xin Yu and Fatih Porikli. Ultra-resolving face images by discriminative generative networks. In European Conference on Computer Vision, pages 318-333. Springer, 2016. 4322 +[61] Xin Yu and Fatih Porikli. Face hallucination with tiny unaligned images by transformative discriminative neural networks. In AAAI, volume 2, page 3, 2017. 4322 +[62] Xin Yu and Fatih Porikli. Hallucinating very low-resolution unaligned and noisy face images by transformative discriminative autoencoders. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3760-3768, 2017. 4322 +[63] Han Zhang, Tao Xu, Hongsheng Li, Shaoting Zhang, Xiaogang Wang, Xiaolei Huang, and Dimitris N Metaxas. Stackgan: Text to photo-realistic image synthesis with stacked generative adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 5907-5915, 2017. 4322 +[64] Han Zhang, Tao Xu, Hongsheng Li, Shaoting Zhang, Xiaogang Wang, Xiaolei Huang, and Dimitris N Metaxas. Stackgan++: Realistic image synthesis with stacked generative adversarial networks. IEEE transactions on pattern analysis and machine intelligence, 41(8):1947-1962, 2018. 4322 +[65] Lingzhi Zhang, Jiancong Wang, and Jianbo Shi. Multimodal image outpainting with regularized normalized diversification. In The IEEE Winter Conference on Applications of Computer Vision, pages 3433-3442, 2020. 4322 +[66] Lingzhi Zhang, Tarmily Wen, and Jianbo Shi. Deep image blending. In The IEEE Winter Conference on Applications of Computer Vision, pages 231-240, 2020. 4322 +[67] 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. 4326 +[68] Jun-Yan Zhu, Richard Zhang, Deepak Pathak, Trevor Darryll, 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. 4322, 4323, 4327 \ No newline at end of file diff --git a/nestedscaleeditingforconditionalimagesynthesis/images.zip b/nestedscaleeditingforconditionalimagesynthesis/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..990be4a42773d519fbb5816e7826413558f049d7 --- /dev/null +++ b/nestedscaleeditingforconditionalimagesynthesis/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:893a8f62aba2604d77d2879427769463d00b5ea1c139c1c3bdf159936c7395c0 +size 789020 diff --git a/nestedscaleeditingforconditionalimagesynthesis/layout.json b/nestedscaleeditingforconditionalimagesynthesis/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d2c5b3ea42ef5a7dbf69af9f097f60f375d699c1 --- /dev/null +++ b/nestedscaleeditingforconditionalimagesynthesis/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75f3e011663330a9c4d38d38b5c574cab9fa4f8d229340c92e002c53b6e612ae +size 344550 diff --git a/nestedvaeisolatingcommonfactorsviaweaksupervision/541c3b54-866e-4c39-8dc7-fac3a67f24d3_content_list.json b/nestedvaeisolatingcommonfactorsviaweaksupervision/541c3b54-866e-4c39-8dc7-fac3a67f24d3_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..565572f69f6ad836df614dfe36a484b43f050a3e --- /dev/null +++ b/nestedvaeisolatingcommonfactorsviaweaksupervision/541c3b54-866e-4c39-8dc7-fac3a67f24d3_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a8a6c9cfb3f8799e7ed2cd7647b4978e58afef8c9a52781953e37684dc80a25 +size 84360 diff --git a/nestedvaeisolatingcommonfactorsviaweaksupervision/541c3b54-866e-4c39-8dc7-fac3a67f24d3_model.json b/nestedvaeisolatingcommonfactorsviaweaksupervision/541c3b54-866e-4c39-8dc7-fac3a67f24d3_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b08e60fca2bc95e94f687acd998f160be54530c3 --- /dev/null +++ b/nestedvaeisolatingcommonfactorsviaweaksupervision/541c3b54-866e-4c39-8dc7-fac3a67f24d3_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c324d9991754cee4d17bfe540601607cda24d62d60b6e4e5be7b4ec23e3fbeb +size 111648 diff --git a/nestedvaeisolatingcommonfactorsviaweaksupervision/541c3b54-866e-4c39-8dc7-fac3a67f24d3_origin.pdf b/nestedvaeisolatingcommonfactorsviaweaksupervision/541c3b54-866e-4c39-8dc7-fac3a67f24d3_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4e86fd4db84073936a8b86a05d0ca0f746d8a6f0 --- /dev/null +++ b/nestedvaeisolatingcommonfactorsviaweaksupervision/541c3b54-866e-4c39-8dc7-fac3a67f24d3_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:799b694cb77630e744649186d2f8e9af77ba52a9ba05631f9d85488eb2d7023f +size 426850 diff --git a/nestedvaeisolatingcommonfactorsviaweaksupervision/full.md b/nestedvaeisolatingcommonfactorsviaweaksupervision/full.md new file mode 100644 index 0000000000000000000000000000000000000000..47419de5e22b7678255ca6431ee88ba4caa0beed --- /dev/null +++ b/nestedvaeisolatingcommonfactorsviaweaksupervision/full.md @@ -0,0 +1,335 @@ +# NestedVAE: Isolating Common Factors via Weak Supervision. + +Matthew J. Vowels + +m.j.vowels@surrey.ac.uk + +Necati Cihan Camgoz + +n.camgoz@surrey.ac.uk + +Richard Bowden + +r.bowden@surrey.ac.uk + +Centre for Vision, Speech and Signal Processing +University of Surrey +Guildford, UK + +# Abstract + +Fair and unbiased machine learning is an important and active field of research, as decision processes are increasingly driven by models that learn from data. Unfortunately, any biases present in the data may be learned by the model, thereby inappropriately transferring that bias into the decision making process. We identify the connection between the task of bias reduction and that of isolating factors common between domains whilst encouraging domain specific invariance. To isolate the common factors we combine the theory of deep latent variable models with information bottleneck theory for scenarios whereby data may be naturally paired across domains and no additional supervision is required. The result is the Nested Variational AutoEncoder (NestedVAE). Two outer VAEs with shared weights attempt to reconstruct the input and infer a latent space, whilst a nested VAE attempts to reconstruct the latent representation of one image, from the latent representation of its paired image. In so doing, the nested VAE isolates the common latent factors/causes and becomes invariant to unwanted factors that are not shared between paired images. We also propose a new metric to provide a balanced method of evaluating consistency and classifier performance across domains which we refer to as the Adjusted Parity metric. An evaluation of NestedVAE on both domain and attribute invariance, change detection, and learning common factors for the prediction of biological sex demonstrates that NestedVAE significantly outperforms alternative methods. + +# 1. Introduction + +One of the goals of representation learning is to achieve an embedding that informatively captures the underlying factors of variation in data [10]. However, many techniques for learning such embeddings have been found to also learn unwanted or confounding factors, irrelevant or detrimental to the intended task(s) [54]. Such factors can include distribution specific bias, which impairs the generalizability of a model across empirical samples or in the face of distri + +![](images/527e9d376b83a73d5b55bc77b228784d86e0f6b49db27d431c9ce142368ca3ab.jpg) +Figure 1. Top-level architecture of NestedVAE. Images (or alternative data modality) are paired according to shared attributes or domains. Latent representations $\mathbf{z}_i$ and $\mathbf{z}_j$ for images $\mathbf{x}_i$ and $\mathbf{x}_j$ are derived and fed to a secondary 'nested' VAE. Using the principles from Information Bottleneck theory, a sufficient and minimal representation $\mathbf{z}_s$ for $\mathbf{z}_j$ may be derived from $\mathbf{z}_i$ and vice versa. $\mathbf{z}_s$ may therefore be interpreted as representing the common factors, or common causes for the two images. Sufficiency indicates it contains the information common to both, and minimality indicates that it is invariant to information specific to each. + +butional shift [14, 54, 74, 11], or bias associated with culturally sensitive or legally protected characteristics such as race, age, gender or sex [55, 17, 53, 36, 71, 57, 65, 15]. + +Indeed, the prevalence of reports of systemic bias arising from the use of machine learning algorithms is increasing [35, 66, 77]. Furthermore, conceptually distinct factors, such as object type and pose, may be entangled in the embedding, despite a prior expectation that they ought to be factorized. Learning models that solve these problems is therefore important from a number of converging engineering and societal perspectives [55]. In terms of engineer- + +![](images/2b2b7fcce06bf23dcf5e45a74a8b3f5b883eed293ef698793af88d69c5f40ac1.jpg) +(a) + +![](images/f095e5c0393d2e6e79b23073402992d0f697a1a400f86895c99aae4385de9482.jpg) +(b) +Figure 2. Probabilistic Graphic Model for (a) inferring the common factors $\mathbf{z}_{\mathbf{s}}$ from pairs of images $\mathbf{x}_i$ and $\mathbf{x}_j$ and (b) the inference and generative processes of a VAE. Dotted lines indicate inference and solid lines indicate generation. $\phi$ and $\theta$ are the VAE encoder (inference) and decoder (generation) parameters respectively. + +ing, we may wish for our models to be informative, to be invariant to nuisance factors, to perform well and generalize across domains, and to disentangle independent factors of variation. From a societal perspective, we may wish to achieve statistical and demographic parity such that our models do not reflect or amplify any unfairness present in our data or in society itself [65, 91, 35, 66]. + +Success at these overlapping tasks has implications for a range of more specific downstream tasks including attribute transfer [80, 81, 33, 39, 94], person re-identification [8, 27], change detection [32] adversarial robustness [37], and machine learning based decision processes [55, 9, 63]. + +The contributions of this work are as follows: + +- A unified interpretation of prior work on bias, disentanglement, fairness, domain/attribute invariance, and common causes. +- A novel deep latent variable model (Figure 1) called the Nested Variational Autoencoder (NestedVAE) that combines deep, amortized variational inference [43] and Information Bottleneck (IB) theory [82, 83]. +- A demonstration that NestedVAE achieves significant improvements in classification and regression by learning the common factors between domains. +- A novel metric for evaluating regression and classification parity across domains, referred to as the Adjusted Parity Metric, that accounts for predictive performance and the variation in performance across domains. + +# 2. Formulation + +# 2.1. Problem Formulation + +We consider the problem of encoding an informative, latent representation $\mathbf{z} \sim p(\mathbf{z})$ from observation $\mathbf{x} \sim p(\mathbf{x}|\mathbf{z},\mathbf{c})$ such that $\mathbf{z}$ is invariant to some irrelevant/nuisance/confounding covariate $\mathbf{c}$ [58]. From a statistical parity perspective, we wish to be able to use the latent + +representation for some arbitrary downstream prediction of label $\mathbf{y}$ such that $p(\hat{y} = y|\mathbf{c},\mathbf{z}) = p(\hat{y} = y|\mathbf{z})\forall y,\mathbf{c},\mathbf{z}$ [56]. We therefore wish for $\mathbf{z}\perp \perp \mathbf{c}$ and $y\perp \perp \mathbf{c}$ . From a domain invariance perspective, we wish learning to transfer as much as possible between the different domains, where each domain is associated with its own confounders or covariates. In other words, the learnt latent representation should be independent of nuisance or confounding factors, thereby resulting in downstream task performance that is invariant to these factors. Further, the resulting representation will represent the latent factors common to each domain. + +For the development of NestedVAE, we consider the incorporation of weak supervision whereby the supervision takes the form of data pairs [75]. Scenarios for which natural pairings occur or may be straightforwardly derived include: time series data whereby individuals appearing in frames from the same scene vary in terms of pose and expression but maintain identity [23, 26]; pairings within domains where the domains may be hospitals or patients and the data may be medical images [54]; pairings arising from dyadic interactions such as conversations [40]; and pairings of data representing images of objects (e.g. hands from sign language data) from multiple viewpoints. Without loss of generality we primarily consider the application of computer vision with face images, whereby the images are paired according to sex. + +For the following formalization we assume two domains, although the model can be extended to include any number of domains for which we can form pairs. The Probabilistic Graphic Model (PGM) corresponding with our world model is depicted in Figure 2a. We assume that each image $\mathbf{x}_i\in X_1$ and $\mathbf{x}_j\in X_2$ has latent factors/causes $\mathbf{z}_i$ and $\mathbf{z}_j$ specific to the respective domains $X_{1}$ or $X_{2}$ , as well as shared factors/causes $\mathbf{z}_s$ common to both domains. From the perspective of learning domain invariance, $\mathbf{z}_i$ and $\mathbf{z}_j$ represent confounders $\mathbf{c}_i$ and $\mathbf{c}_j$ respectively, and $X_{1}$ and $X_{2}$ represent different domains to which the representation $\mathbf{z}_s$ should be agnostic/invariant. From the perspectives of causal modelling, $\mathbf{z}_i$ and $\mathbf{z}_j$ are domain specific latent causes, and $\mathbf{z}_s$ are common latent causes [50]. This is similar to the confounding additive noise model [38, 50] where $\mathbf{x}_i = f_i(\mathbf{z}_i) + g_i(\mathbf{z}_s) + \epsilon_i$ and $\mathbf{x}_j = f_j(\mathbf{z}_j) + g_j(\mathbf{z}_s) + \epsilon_j$ , $f$ and $g$ are arbitrary functions, and $\epsilon$ is additive noise. + +For each pair of images we wish to learn a representation $\mathbf{z}_{\mathrm{s}}$ that represents only the common factors between images in the pair. In order to do so, we leverage the information gain achieved from specific pairings in order to infer $\mathbf{z}_s$ from $\mathbf{z}_i$ and $\mathbf{z}_j$ , and take inspiration from the information bottleneck perspective [82, 83, 65, 2]. To do so, we model the shared and common factors as a Markov chain: + +$$ +\mathbf {z} _ {i} \longrightarrow \mathbf {z} _ {s} \longrightarrow \mathbf {z} _ {j} \text {s . t .} p \left(\mathbf {z} _ {j} \mid \mathbf {z} _ {i}, \mathbf {z} _ {s}\right) = p \left(\mathbf {z} _ {j} \mid \mathbf {z} _ {s}\right) \tag {1} +$$ + +The Data Processing Inequality [20] means that $\mathbf{z}_s$ cannot contain more information about $\mathbf{z}_j$ than $\mathbf{z}_i$ [2]. The + +information about $\mathbf{z}_j$ in $\mathbf{z}_s$ can therefore only be what is common to both $\mathbf{z}_i$ and $\mathbf{z}_j$ . The image pairings are formed as non-ordered combinations such that we pair $\mathbf{x}_i$ with $\mathbf{x}_j$ but also $\mathbf{x}_j$ with $\mathbf{x}_i$ . As such, our task becomes that of predicting $\mathbf{z}_j$ from $\mathbf{z}_i$ via $\mathbf{z}_s$ . Finally, if we make the (albeit strong) assumption that $\mathbf{z}_i \approx \mathbf{z}_j + \epsilon$ , where $\epsilon$ represents random perturbations specific to the respective domain, then we can apply VAEs to the task of learning the minimal and sufficient representation $\mathbf{z}_s$ by seeking to generate $\mathbf{z}_i$ from $\mathbf{z}_j$ , and vice versa. Sufficiency describes the Markov chain condition in Eq. 1 whereby $I(\mathbf{z}_s; \mathbf{z}_j) = I(\mathbf{z}_i; \mathbf{z}_j)$ , and minimality describes the fact that there is minimal redundant information in the representation [2, 20]. In other words, $\mathbf{z}_s$ only contains the information in $\mathbf{z}_j$ which is also in $\mathbf{z}_i$ . + +# 2.2. VAEs + +We now turn our attention to VAEs. For a detailed review of the theory, interested readers are directed to [24, 43, 70]. The PGM for the inference and generation (or, equivalently, encoding and decoding) processes of the VAE is shown in Figure 2b. Following the theory for variational inference [12] for a distribution of latent variables $\mathbf{z}$ , we start by sampling $\mathbf{z} \sim p(\mathbf{z})$ and generate dataset $X$ of images $\mathbf{x} \in \mathbb{R}^N$ with reconstructed/generated distribution $p_{\theta}(\mathbf{x}|\mathbf{z})$ . We may derive an inferred posterior for the conditional latent distribution as $q_{\phi}(\mathbf{z}|\mathbf{x})$ that approximates the true conditional inference distribution $p_{\theta}(\mathbf{z}|\mathbf{x})$ . Both $q_{\phi}(\mathbf{z}|\mathbf{x})$ and $p_{\theta}(\mathbf{x}|\mathbf{z})$ are parameterised by neural network encoder and decoder parameters $\phi$ and $\theta$ respectively [85, 24, 93]. The approximating distribution $q$ is chosen to circumvent the intractability of the integral when computing (in order to maximize) the marginal likelihood $p(\mathbf{x}) = \int p_{\theta}(\mathbf{x}|\mathbf{z}) p(\mathbf{z}) d\mathbf{z}$ and is introduced according to the identity trick: + +$$ +\log p (\mathbf {x}) = \log \int p _ {\theta} (\mathbf {x} | \mathbf {z}) \frac {p (\mathbf {z})}{q _ {\phi} (\mathbf {z} | \mathbf {x})} q _ {\phi} (\mathbf {z} | \mathbf {x}) d \mathbf {z} \tag {2} +$$ + +This may be further manipulated to establish a lower bound on the marginal log likelihood $\log p(\mathbf{x})$ : + +$$ +\log p _ {\theta} (\mathbf {x}) = +$$ + +$$ +\begin{array}{l} \mathbb {E} _ {\mathbf {z} \sim q _ {\phi} (\mathbf {z} | \mathbf {x})} \left[ \log p _ {\theta} (\mathbf {x} | \mathbf {z}) \right] - \operatorname {K L} \left[ q _ {\phi} (\mathbf {z} | \mathbf {x}) | | p (\mathbf {z}) \right] + \dots \tag {3} \\ \dots + \mathrm {K L} \left[ q _ {\phi} (\mathbf {z} | \mathbf {x}) | | p _ {\theta} (\mathbf {z} | \mathbf {x}) \right] \\ \end{array} +$$ + +The last term on the right hand side of Eq. 3 represents the divergence between our true inference distribution and our choice of approximating distribution, and forms what is known as the 'approximation gap' between the true log likelihood, and its estimation [61]. Once we choose our approximating distribution and optimise it, we are unable to reduce this divergence further. This term is usually omitted such that we are left with what is known as either the Variational Lower Bound (VLB) or the Evidence Lower Bound + +(ELBO), which serves as a proxy for the log-likelihood. We can then maximize the ELBO as follows [43, 47]: + +$$ +\max _ {\theta , \phi} \mathbb {E} _ {\mathbf {x}} \left[ \mathcal {L} _ {\mathrm {E L B O}} (x) \right] = +$$ + +$$ +\max _ {\theta , \phi} \mathbb {E} _ {\mathbf {x}} \left[ \mathbb {E} _ {\mathbf {z} \sim q _ {\phi} (\mathbf {z} | \mathbf {x})} [ \log p _ {\theta} (\mathbf {x} | \mathbf {z}) ] - \beta \mathrm {K L} (q _ {\phi} (\mathbf {z} | \mathbf {x}) \| p (\mathbf {z})) \right] \tag {4} +$$ + +The first term on the RHS of Eq. 4 encourages reconstruction accuracy, and the Kullback-Liebler divergence term (weighted by parameter $\beta$ [33]) acts as a prior regularizer, penalising approximations for $q_{\phi}(\mathbf{z}|\mathbf{x})$ that do not resemble the prior. The objective is therefore to maximise the lower bound to the marginal log-likelihood of $\mathbf{x}$ over the latent distribution $\mathbf{z}$ [33], which is assumed to be Gaussian with identity covariance $\mathbf{z} \sim \mathcal{N}(0, \mathbf{I})$ . If sample quality is not of primary concern, there is some incentive to weaken the decoder capacity in order to maintain pressure to encode useful information in the latent space (i.e. increase $I(x;z)$ ) and to prevent decoupling of the decoder from the encoder [59]. The assumption of Gaussianity means that Eq. 4 may be written using an analytical reduction of the KL divergence term [47]: + +$$ +\begin{array}{l} \underset {\theta , \phi} {\max} \mathbb {E} _ {\mathbf {x}} \left[ \mathcal {L} _ {\mathrm {E L B O}} (x) \right] = \underset {\theta , \phi} {\max} \mathbb {E} _ {\mathbf {x}} \left[ \mathbb {E} _ {\mathbf {z} \sim q _ {\phi} (\mathbf {z} | \mathbf {x})} \left[ \log p _ {\theta} (\mathbf {x} | \mathbf {z}) \right] - \right. \\ \left. \frac {\beta}{2} \left(\sum_ {i} \left([ \Sigma_ {\phi} (\mathbf {x}) ] _ {i i} - \ln [ \Sigma_ {\phi} (\mathbf {x}) ] _ {i i}\right) + \left\| \boldsymbol {\mu} _ {\phi} (\mathbf {x}) \right\| _ {2} ^ {2}\right) \right] \tag {5} \\ \end{array} +$$ + +In Eq. 5 the $[\Sigma_{\phi}(\mathbf{x})]_{ii}$ indicates the diagonal covariance, and $\pmb{\mu}_{\phi}(\mathbf{x})$ is the mean. Both the mean and covariance are learned by the network encoder and parameterize a multivariate Gaussian that forms the inferred latent distribution $q_{\phi}(\mathbf{z}|\mathbf{x})$ . The decoder network samples from $\mathbf{z} \sim q_{\phi}(\mathbf{z}|\mathbf{x})$ using the reparameterization trick [24] such that $\mathbf{z} = \mu_{\phi}(\mathbf{x}) + \epsilon \sqrt{\Sigma_{\phi}(\mathbf{x})}$ where we redefine $\epsilon = \mathcal{N}(0,\mathbf{I})$ . One interpretation of disentanglement posits it is achieved if $q_{\phi}(\mathbf{z}) = \int q_{\phi}(\mathbf{z}|\mathbf{x}) p(\mathbf{x}) d\mathbf{x} = \prod_{i} q_{i}(\mathbf{z}_{i})$ [47]. + +Applying VAEs to our task: we can learn the latent factors $\mathbf{z}_i$ and $\mathbf{z}_j$ for images $\mathbf{x}_i \sim X_1$ and $\mathbf{x}_j \sim X_2$ respectively. The following section describes the means to utilise these embeddings to learn the shared factors $\mathbf{z}_s$ . + +# 2.3. Combining VAEs and Information Bottleneck + +VAEs are closely related to information bottleneck theory through the Information Bottleneck Lagrangian [85, 5, 4, 65]: + +$$ +\mathcal {L} (p (\mathbf {z} | \mathbf {x})) = H (\mathbf {y} | \mathbf {z}) + \beta I (\mathbf {z}; \mathbf {x}) \tag {6} +$$ + +Notice that $H$ , the Shannon entropy of the conditional distribution, is equivalent to the cross-entropy reconstruction term in Eq. 4, except that in VAEs the target $\mathbf{y}$ is $\mathbf{x}$ and + +the network generates a reconstruction $\hat{\mathbf{x}}\sim p(\hat{\mathbf{x}} |\mathbf{z})$ . Further, notice that $I(\mathbf{z};\mathbf{x}) = \mathbb{E}_{\mathbf{x}}\mathrm{KL}\left[q_{\phi}(\mathbf{z}|\mathbf{x})||p(\mathbf{z})\right]$ which is the prior regularizer in Eq. 4. Finally the $\beta$ term is proposed to be learned via Lagrangian optimization [2] although, for VAEs, it may also be annealed during training [16] or evaluated as a hyperparameter [33]. + +Making the assumption that $\mathbf{z}_i\approx \mathbf{z}_j + \epsilon$ , we can reapply the VAE model to this problem. As such, we apply an 'outer' VAE to the problem of learning $\mathbf{z}_i$ and $\mathbf{z}_j$ and a 'nested' VAE to the problem of learning the common factors $\mathbf{z}_s$ . The full loss function over $\mathbf{x}_i\sim X_1$ and $\mathbf{x}_j\sim X_2$ is simply a combination of the outer and nested VAE objectives for each image in a pair, and is presented in Eq. 7. Here, $\phi_{1}$ $\theta_{1}$ ,and $\phi_{2}$ $\theta_{2}$ are the encoder and decoder parameters for the 'outer' and 'nested' VAEs respectively. We have assumed the same prior distribution $p(\mathbf{z})$ and the same approximating distribution family $q$ for both outer and nested VAEs. + +$$ +\begin{array}{l} \max _ {\theta_ {1}, \phi_ {1}, \theta_ {2}, \phi_ {2}} \mathbb {E} _ {\mathbf {x} _ {i} \sim X _ {1}, \mathbf {x} _ {j} \sim X _ {2}} \left[ \mathcal {L} _ {\text {N e s t e d}} \right] = \\ \max _ {\theta_ {1}, \phi_ {1}, \theta_ {2}, \phi_ {2}} \mathbb {E} _ {\mathbf {x} _ {i j} \sim X _ {1}, X _ {2}} \left[ \gamma \left(\mathcal {L} (\mathbf {x} _ {i}, \mathbf {z} _ {i}) + \mathcal {L} (\mathbf {x} _ {j}, \mathbf {z} _ {j})\right) + \dots \right. \\ \left. \dots \lambda \left(\mathcal {L} \left(\mathbf {z} _ {i}, \mathbf {z} _ {s}\right) + \mathcal {L} \left(\mathbf {z} _ {j}, \mathbf {z} _ {s}\right)\right) \right] \tag {7} \\ \end{array} +$$ + +Here, $\gamma$ and $\lambda$ are hyperparameters that weight the outer and nested VAE ELBO functions respectively. Note that we optimise over all parameters $\phi_{1}$ , $\theta_{1}$ , $\phi_{2}$ and $\theta_{2}$ jointly. In summary, we propose to use VAEs to simultaneously learn both the latent factors $\mathbf{z}_i$ for image $\mathbf{x}_i$ and the latent factors $\mathbf{z}_j$ for image $\mathbf{x}_j$ , while ensuring a sufficient and minimal representation $\mathbf{z}_{\mathrm{s}}$ exists between these latent factors. The network architecture is depicted in Figure 1. Note that, in practice, we find that feeding the nested VAE the latent codes $\mu_{i}$ and $\mu_{j}$ rather than $\mathbf{z}_i$ and $\mathbf{z}_j$ occasionally yields better performance. Furthermore, we also find that the $\beta$ KL weight for the nested VAE should be set close to, or equal to zero for the best results. This is coherent with the application of IB to the derivation of common factors and therefore does not contradict the formulation: $\mathbf{z}_s$ is being derived from the commonality between the parameters $\mu_{i}$ and $\mu_{j}$ of the latent random variables $\mathbf{z}_i$ and $\mathbf{z}_j$ , which have already been regularized by the outer VAE. We can therefore adjust the IB aspect of NestedVAE in Eq. 1 to: + +$$ +\boldsymbol {\mu} _ {i} \xrightarrow {q (z | \mu_ {i})} \mathbf {z} _ {s} \xrightarrow {p (\mu_ {j} | z)} \boldsymbol {\mu} _ {j} \tag {8} +$$ + +# 3. Prior Work: A Unifying Perspective + +Previous work has aimed to achieve a range of seemingly distinct goals which include disentanglement, domain/attribute invariance, fair encodings and bias reduction, generalization, and common causes. In this section, we review examples of such work, whilst drawing attention to the significant commonality between the goals. By noting the commonality, we hope that progress in one area may be leveraged to make progress in the others. + +We have identified the problem of achieving domain invariance, which is to transfer learning between domains whilst being invariant to the confounders and covariates unique to each domain. When such confounders are considered to be 'sensitive' attributes, achieving domain invariance may also be considered to be achieving bias reduction, fairness, or demographic parity; when such confounders cause distributional shift, achieving invariance may be considered to be achieving model generalization. Such tasks either require that the confounding information is 'forgotten' or ignored, or that it be disentangled from the domain invariant (i.e. task relevant) factors. However, the task of forgetting is often treated as being distinct from disentanglement. We argue that these tasks complement each other: one researcher's disentangled, generative attribute may be another's confounder. For instance, in facial recognition, the identity of an individual should be predicted from an image in such a way that the prediction is invariant to the head-pose and facial expression; it does not benefit the model to provide a different identity representation for a different head-pose. For such an application, a method may either 'learn to forget' head-pose, or to disentangle headpose from identity such that the information encoding identity is independent of, and separable from, the information for pose. In both disentanglement and domain invariance, task-relevant information needs to be separated from task-irrelevant information. + +Furthermore, many of the models utilized for disentanglement are deep latent variable models [33, 46, 16, 26, 93, 47, 56]. Such models aim to infer the generative or causal factors behind the observed data. As such, using these models to identify factors which are common between domains (as NestedVAE does) becomes equivalent both to identifying the common causes as well as to identifying the factors which generalize across domains. Much of the prior work on unsupervised disentanglement [33, 73, 75, 26, 16, 93, 47, 56] therefore also indirectly contributes to the field of domain invariance and fairness. Indeed, recent work [55] has specifically explored the connection between disentanglement and fairness. + +Previous research has sought to disentangle and/or learn invariant representations by incorporating supervision with fully supervised VAEs [46, 21], semi-supervised VAEs [57, 65, 54, 76], adversarial training [30, 31, 27, 74, 90, 88, 48, 60, 69, 94, 3], Shannon Mutual Information regularization [44, 68] and paired images with auxiliary classifiers [14, 8]. In other scenarios, we may only have access to indirect supervision for c e.g. in the form of grouped or paired images [81, 25, 1] or pairwise similarities [19, 18]. In such cases, previous work has incorporated such weak supervision into VAEs [72, 23, 13, 19, 87], cycle-consistent networks [39, 51], autoencoders [25], and autoencoders with adversarial training [80]. In scenarios whereby no supervi + +sion is available to assist in learning invariant embeddings, unsupervised approaches are possible which may involve testing for disentanglement and interventional robustness [79, 56]. Existing methods that aim to achieve domain invariance and/or disentanglement therefore vary in the level of incorporation of supervision. + +Acquiring high quality labelled datasets is both time consuming and expensive, and supervised methods such as those that require labels for class, domain, and/or covariate (e.g. as for [3, 54]) may not always be feasible. Disentanglement may allow for an embedding to be learned such that the undesired covariate is identifiable or extricable at a later time for a specific downstream task. However, the efficacy of completely unsupervised methods for disentanglement has recently been shown to vary as much by random-seed as by architecture and design [56]. + +Given the disadvantages of both fully supervised and fully unsupervised methods, it is pertinent to consider methods that incorporate minimal levels of weak supervision. Despite some overlap between definitions [29], weak supervision is generally used to describe the scenario whereby labels are available but the labels only relate to a limited number of factors [80]. Semi-supervision, in contrast, describes the scenario whereby fully informative labelling is available but only for a subset of the data [42]. Whilst adversarial methods have been shown to work well for 'forgetting' information, they are also notoriously difficult and unreliable to train [65, 52, 26]. Further, previous work has highlighted that adversarial training is unnecessary, and that non-adversarial training can achieve comparable or better results [65, 26]. Given the disadvantages of adversarial training and the comparable success of VAEs, we consider developing a new method using the VAE as a foundation. VAEs are a form of latent variable model [43] and are therefore suitable for the task of deriving invariant representations from observations with limited supervision. + +The closest prior work to ours in terms of architectural similarity is probably Joint Autoencoders for Disentangle-ment (JADE) [8]. JADE pairs images according to a common label, feeds each image through a separate VAE and uses a partition from each VAE latent space to predict the shared label, thereby attempting to disentangle label relevant information from label irrelevant information. JADE is evaluated according to its capacity for transfer learning from one, data abundant domain (the full MNIST dataset [49]) to a data scarce domain (chosen to be a reduced version SVHN dataset [67]). The NestedVAE differs in that we do not use labels indicating the domain, thereby significantly weakening the level of explicit supervision. Work by [23] pairs images according to whether or not they derive from the same video sequence, and is classified by the researchers as being an unsupervised method. We take a similar approach with NestedVAE by pairing images, but + +broaden the input pairings beyond those from the same video sequence to those that are from two domains but that share some common attribute(s). The result is a network that ' forgets' information specific to each domain, and learns factors common to both without adversarial training, and with only minimal, weak supervision. + +# 4. Evaluation of NestedVAE + +In light of the overlap between domain/attribute invariance, fairness, and bias reduction discussed in the previous section, we evaluate NestedVAE on a range of tasks. NestedVAE is first evaluated for domain/attribute invariance and change detection on a synthetic dataset with ground-truth factors: rotated MNIST [28, 49]. For this first evaluation, NestedVAE is compared against $\beta$ -VAE [33] (which increases the pressure on the KL-divergence loss), infoVAE [93] (which minimises maximum mean discrepancy) and DIP-VAE-I and DIP-VAE-II [47]. For a non-synthetic evaluation, we test for fairness and bias reduction with biological sex prediction across individuals of different race using the UTKFace dataset [92], and compare with $\beta$ -VAE and DIP-VAE-I. Additional results can be found in the supplementary material. + +# 4.1. Adjusted Parity Metric + +For evaluation of domain invariance we propose a (to the best of our knowledge) new parity metric that accounts for both discrepancies in accuracy between domains as well as classifier accuracy or normalized regressor performance. The metric is referred to in this work as the adjusted parity metric (adjusted for accuracy) and is defined as follows: + +$$ +\Delta_ {\mathrm {a d j}} = \bar {S} (1 - 2 \sigma_ {\mathrm {a c c}}) \tag {9} +$$ + +Here, $\bar{S}$ is the average accuracy $^2$ of the classifier over the domains, normalized to be between [0,1] according to the baseline accuracy of a random prediction. For example, if we have equal chance of predicting any of the 10 MNIST digits by random chance, the baseline is 0.1. $\sigma_{\mathrm{acc}}$ is the standard deviation of the normalized classifier accuracies. Any classifier that is minimally consistent or minimally accurate will have $\Delta_{\mathrm{adj}} = 0$ and any classifier that is maximally consistent and maximally accurate will have $\Delta_{\mathrm{adj}} = 1$ . This metric was motivated by the fact that although a representation may be domain or attribute invariant, this does not imply that it is also a good classifier: it must also be informative for the intended task. + +# 4.2. Models + +For the purposes of the evaluations in this work, the VAEs that constitute NestedVAE do not deviate from the + +![](images/b67d29cda0b30d2bcb5f9db79d91e7a7a40c4d23490a107fc22aae0287e91ec8.jpg) +Figure 3. UMAP projections of the representations learned from the rotated MNIST dataset by NestedVAE and $\beta$ VAE. The representations are coloured according to digit class (left) and rotation domain (right). It can be seen that NestedVAE representations contain significantly less information about rotation than do the $\beta$ VAE representations. Best viewed in color. + +
Transfer DomainNested (ours)β-VAEinfoVAEDIP-VAE-IDIP-VAE-II
Digit Classification (higher is better)0°0.708±0.2110.551±0.2620.629±0.1410.561±0.2130.519±0.274
15°0.696±0.2020.546±0.2610.633±0.1320.597±0.1890.527±0.270
30°0.714±0.1520.555±0.2510.657±0.0760.602±0.2060.539±0.244
45°0.738±0.1240.575±0.2120.681±0.0560.587±0.2080.510±0.275
60°0.721±0.1270.573±0.2030.682±0.0570.577±0.2240.487±0.278
75°0.647±0.2500.509±0.2490.588±0.1830.417±0.2030.488±0.253
Δadj Parityn/a0.6640.5250.6030.4860.492
Rotation Classification (lower is better)0°0.373±0.0290.530±0.0110.523±0.0050.511±0.0120.541±0.007
15°0.343±0.0080.534±0.0050.516±0.0080.493±0.0070.547±0.005
30°0.295±0.0500.534±0.0070.546±0.0050.494±0.0050.538±0.006
45°0.316±0.0250.532±0.0060.540±0.0010.493±0.0070.541±0.003
60°0.321±0.0140.534±0.0050.542±0.0060.495±0.0070.549±0.007
75°0.347±0.0570.517±0.0120.509±0.0100.496±0.0160.518±0.012
+ +Table 1. Average F1-scores and standard errors over 10 runs for digit class (higher is better) and rotation domain (lower is better) classification. NestedVAE is compared against $\beta$ -VAE [33], infoVAE [93], and DIP-VAE-II [47]. For digit classification, 'Transfer domain' refers to the test domain used for classifying the image representations, and this domain is not used during training (i.e. domain $0^{\circ}$ means the network has been trained on domains $15^{\circ} - 75^{\circ}$ and is being tested on data from domain $0^{\circ}$ ). For rotation classification, the setup is similar in that it represents the domain on training not used during training, although all domains are used for testing (i.e. domain $0^{\circ}$ means the network has been trained on domains $15^{\circ} - 75^{\circ}$ and is being tested on data from ALL domains). We see that NestedVAE learns more informative representations for digit classification than the alternatives, as well as 'forgetting' more domain specific information. $\bar{\Delta}_{\mathrm{adj}}$ is the average parity metric presented in Eq. 9. Best results are shown in bold. + +'vanilla' implementations, in that they have isotropic Gaussian priors and approximating distributions [43]. The outer VAE $\beta$ KL weight is increased gradually from zero and then annealed during training [78, 33, 16]. Other more exotic formulations of the VAE may certainly be implemented within the NestedVAE formulation (e.g. see [5, 34, 84, 58, 93, 22, 47]). However, the focus of this work is on the adaptation of the general VAE framework for purposes of domain invariance, rather than the optimality of the VAE itself. Full details of the NestedVAE network architectures used for the experiments can be found in the supp. material. + +# 4.3. Rotated MNIST + +The rotated MNIST training dataset is generated as follows [28, 54]: for each digit class, 100 random samples are drawn and 6 rotations of $\{0^{\circ}, 15^{\circ}, 30^{\circ}, 45^{\circ}, 60^{\circ}, 75^{\circ}\}$ are applied resulting in $(100 \times 10 \times 6) = 6000$ images (one tenth the size of the original MNIST training set). This is repeated to produce a non-overlapping test set of the same structure. For each training pair, a random digit class is chosen and two images are chosen with that digit class across a randomly selected pair of (different) rotations. Each ro + +tation group is treated as a domain to which the learned embedding should be invariant. The network is trained on data from 5 out of 6 of the rotation domains, and tested for digit classification performance on the remaining domain (for which the network has seen no samples from the same distribution during training) using a Random Forest classification algorithm. This is then repeated until the network has been trained and tested on all combinations of domains. If the network achieves domain transfer, we should see a good digit classification performance on the test domain. If the network achieves attribute invariance, we should see poor rotation classification performance across all domains. + +NestedVAE is then evaluated for its usefulness at change detection using the same methodology as [32]. Images are alternately paired according to shared or not shared digit class. If the pair shares the digit class, a '0' ground-truth label is generated, representing no change. If the pair does not share the same digit class, a '1' label is generated, representing a change. The L2 norm is calculated between the representations of the images in each pair, and a k-means clustering algorithm is trained on the L2 distance and evaluated against the labels. + +Finally, the Uniform Manifold Approximation Projection (UMAP) [62] algorithm is applied to assess domain invariance visually. UMAP is a more recent, more efficient algorithm for manifold projection than the well-known t-distributed Stochastic Neighbor Embedding (tSNE) [86]. The results are compared against the best alternative from the quantitative evaluation. + +In terms of model parameter values, for $\beta$ -VAE, $\beta = 4$ and is annealed during training (as suggested by [33, 16]), for DIP-VAE-I, $\lambda_{od} = 10$ and $\lambda_d = 100$ , for DIP-VAE-II, $\lambda_{od} = \lambda_d = 250$ , and for InfoVAE $\alpha = 0$ and $\lambda_v = 500$ (as suggested by [93]) where all $\alpha$ , $\lambda$ -parameters represent a weight on the respective component(s) of the models' objective functions. All models were trained for 100 epochs with an Adam optimizer [41], a learning rate of 0.0008 and a batch size of 64. NestedVAE had an inner latent dimensionality of 8, whilst the outer VAE had a latent dimensionality of 10. The nested and outer VAE weights $\gamma = \delta = 0.5$ . All alternative models had a latent dimensionality of 10. + +Rotated MNIST Results: The results for domain and attribute invariance on rotated MNIST dataset are shown in Table 1. The results show that NestedVAE is significantly better at learning domain irrelevant information (digit class) as well as being much better at forgetting domain specific information (rotation), than the alternative methods. The Adjusted Parity results are presented in the row labelled $\bar{\Delta}_{\mathrm{adj}}$ . Note that, because F1 ranges from [0,1], we do not need to normalize F1 according to that of a random prediction before computing the Adjusted Parity. The results for the adjusted parity metric $\bar{\Delta}_{\mathrm{adj}}$ demonstrate that Nested-VAE outperforms the alternatives. + +The UMAP projections are shown in Figure 3. This figure demonstrates that a 2D projection of the rotated MNIST embeddings may be clearly clustered according to digit labels (left). However, when the projections are coloured according to rotation labels (right), it can be seen that $\beta$ -VAE encodes rotation vertically, whilst NestedVAE has, as intended, learned embeddings that are invariant to rotation. + +The results for the change detection task are shown in Table 2. Nested VAE is evaluated against 7 other methods, some of which are specifically designed for change detection and which utilise significantly more powerful network architectures than ours [32, 13, 60]. It can be seen that NestedVAE outperforms the best alternative. + +
MethodAccuracy
Outlier AutoEncoder[89]0.5427
VAE [43]0.5495
Clustering AutoEncoder [7]0.5514
Reconstruction Prob. VAE [6]0.5724
Adversarial VAE [60]0.5834
Multi-Level VAE [13]0.6072
Rare-Event VAE [32]0.7166
NestedVAE (ours)0.7380
+ +Table 2. Change detection accuracy on rotated MNIST. L2 distances between pairs of representations where images are paired according to whether they contain the same (no change) or different (change) digits. K-means clustering is then used to group the representation distances. Alternative results taken from [32]. The best result is shown in bold. + +# 4.4.UTKFace + +The UTKFace dataset [92] comprises $+20\mathrm{k}$ images with labels for race (White, Black, Asian, Indian, or other) and sex (male or female). Previous work has noted the bias in gender prediction software [15, 45, 64], particularly in relation to the accuracy of gender prediction for white individuals compared to the (significantly lower) accuracy for black individuals. We note a distinction between biological sex and gender, and assume that any labels in UTKFace are actually for biological sex. This is because, despite UTKFace referring to gender, the actual labels are for 'male' and 'female' which are terms more sensitively attributed to sex (see [17] for a discussion on the sociological aspects of gender). + +
MethodΔadj Parity (Female)Δadj Parity (Male)
β-VAE0.4100.537
DIPVAE-I0.3940.547
NestedVAE (ours)0.6410.699
+ +Table 3. This table shows the Adjusted Parity calculated from F1 scores across race using the UTKFace dataset. Methods with high Adjusted Parity are methods which have high F1 score for the prediction of biological sex and which are consistent across race. Best results are shown in bold. NestedVAE outperforms alternatives. + +The dataset is first restricted to comprise only white and black individuals. This is done in order to reduce the ambiguity associated with the definition of race across ethnicity, as applied in UTKFace, which uses labels such as 'Indian' or 'Other'. Next, the dataset is split into train and test sets, and the training set is further reduced in size such that the number of white individuals is equal to the number of black individuals. We then create 5 versions of the training dataset, whereby the proportion of white individuals is increased from $50\%$ to $100\%$ . The model is trained on each of these versions and embeddings for the test set are generated by passing the test set images through the trained model. Gradient boosting classifiers are used to predict sex across white and black individuals and we present the corresponding F1 classification scores and Area Under Receiver Operator Characteristic (AU-ROC) scores. + +In terms of model parameter values, for $\beta$ -VAE, $\beta = 4$ and is annealed during training (as suggested by [33, 16]), for DIP-VAE-I, $\lambda_{od} = 10$ and $\lambda_{d} = 100$ . The models were trained for 1000 epochs with an ADAM optimizer with a learning rate of 0.001 and a batch size of 64. NestedVAE had an inner latent dimensionality of 50, whilst the outer VAE had a latent dimensionality of 256. The nested and outer VAE weights $\gamma = \delta = 0.5$ . All alternative models had a latent dimensionality of 50. A hyperparameter search yielded gradient boosting classifier parameters as follows: maximum features=50; maximum depth=5; learning rate=0.25, number of estimators=300, minimum samples per split=0.7. Averages and standard deviations are acquired over 5 runs. + +UTKFace Results: The results for Adjusted Parity are shown in Table 3. These results provide a measure of consistency and performance (F1 score) of the classifier for the prediction of biological sex across race domains. It can be seen that NestedVAE outperforms alternatives, and also shows the smallest discrepancy in Adjusted Parity between female and male classification performance (0.699 for male, compared with 0.641 for female). Notably, sex is poorly predicted using embeddings from the other models. The poor prediction could be because the alternative models have embedded sex as a continuous variable (e.g. degrees of masculinity/femininity) which is entangled with other appearance dimensions, whereas NestedVAE has been explicitly trained using binary pairings of sex, thereby providing significant inductive bias. The results for the Area Under Receiver Operator Characteristic (AU-ROC) score are shown in Figure 4. These results demonstrate the classifier performance for predicting biological sex for black individuals and white individuals using embeddings from models trained on data varying in the proportion of white and black individuals. Interestingly, we do not see a large variation across the training sets, suggesting that the information about sex encoded in the network embeddings is not sub + +stantially confounded by race. Nevertheless, NestedVAE clearly outperforms the alternative methods by a significant margin in its ability to isolate the common factors (i.e. factors relating to sex). + +![](images/76c2d35cf83888bd5e710f18dfad14ad51a5592c0183e9a840e33c3797ae93b8.jpg) +Figure 4. Area Under Receiver Operator Characteristic (AU-ROC) scores for models trained on datasets with varying proportions of white and black individuals. NestedVAE significantly outperforms alternatives. Best viewed in color. + +# 5. Conclusion and Further Work + +NestedVAE provides a means to learn representations that are invariant to the covariates specific to domains, whilst being able to isolate the common causes across domains. The method combines the theory of deep latent variable VAE models with Information Bottleneck principle and is trained on pairs of images with common factors and where the two images in a pair are sampled from different domains. Results demonstrate NestedVAE's superior performance for achieving domain invariance, change detection, and sex prediction. We have also presented a new (to the best of our knowledge) 'adjusted parity metric' in order to facilitate comparison between methods with significantly different classification performance. + +The principles behind NestedVAE can be applied to more exotic VAEs, and even non-VAEs. Further work should explore the application of the principles to different models. + +# 6. Acknowledgements + +This work received funding from the SNSF Sinergia project 'SMILE' (CRSII2_160811), the European Union's Horizon2020 research and innovation programme under grant agreement no. 762021 'Content4All' and the EPSRC project 'ExTOL' (EP/R03298X/1). This work reflects only the author's view and the Commission is not responsible for any use that may be made of the information it contains. + +# References + +[1] A. Abid and J. Zou. Contrastive variational autoencoder enhances salient features. arXiv:1902.04601v1, 2019. +[2] A. Achille and S. Soatto. Emergence of invariance and disentanglement in deep representations. Journal of Machine Learning Research, 18, 2018. +[3] E. Adeli, Q. Zhao, A. Pfefferbaum, E. V. Sullivan, L. Fei-Fei, J. C. Niebles, and K. M. Pohl. Bias-resilient neural network. arXiv:1910.03676v1, 2019. +[4] A. A. Alemi, I. Fischer, J. V. Dillon, and K. Murphy. Deep variational information bottleneck. arXiv:1612.00410v7, 2017. +[5] A. A. Alemi, B. Poole, I. Fischer, J. V. Dillon, R. A. Saurous, and K. Murphy. Fixing a broken ELBO. arXiv:1711.00464v3, 2018. +[6] J. An and S. Cho. Variational autoencoder based anomaly detection using reconstruction probability. SNU Data Mining Center Tech. Report, 2015. +[7] C. Aytekin, X. Ni, F. Cricri, and E. Aksu. Clustering and unsupervised anomaly detection with L2 normalized deep autoencoder representations. arXiv:1802.00187, 2018. +[8] E. Banijamali, A. H. Karimi, A. Wong, and A. Ghodsi. Jade: Joint autoencoders for dis-entanglement. arXiv:1711.09163v1, 2017. +[9] S. Barocas, M. Hardt, and A. Narayanan. *Fairness and machine learning*. fairmlbook.org, 2019. +[10] Y. Bengio, A. Courville, and P. Vincent. Representation learning: A review and new perspectives. IEEE Transactions on pattern analysis and machine intelligence, 2013. +[11] Y. Bengio, T. Deleu, N. Rahaman, N. R. Ke, S. Lachapelle, O. Bilaniuk, A. Goyal, and C. Pal. A meta-transfer objective for learning to disentangle causal mechanisms. arXiv:1901.10912v2, 2019. +[12] C. M. Bishop. Pattern Recognition and Machine Learning. Springer, New York, 2006. +[13] D. Bouchacourt, R. Tomioka, and S. Nowozin. Multi-level variational autoencoder: learning disentangled representations from grouped observations. arXiv:1705.08841v1, 2017. +[14] K. Bousmalis, G. Trigeorgis, N. Silberman, D. Krishnan, and D. Erhan. Domain separation networks. arXiv:1608.06019, 2016. +[15] J. Buolamwini and T. Gebru. Gender Shades: Intersectional accuracy disparities in commercial gender classification. Proc. of Machine Learning Research, 81:1-15, 2018. +[16] C. P. Burgess, I. Higgins, A. Pal, L. Matthew, N. Watters, G. Desjardins, and A. Lerchner. Understanding disentangling in Beta-VAE. arXiv:1804.03599v1, 2018. +[17] Y. T. Cao and H. Daume III. Toward gender-inclusive coreference resolution. arXiv:1910.13913v2, 2019. +[18] J. Chen and K. Batmanghelich. Robust ordinal VAE: employing noisy pairwise comparisons for disentanglement. arXiv:1910.05898v1, 2019. +[19] J. Chen and K. Batmanghelich. Weakly supervised disentanglement by pairwise similarities. arXiv:1906.01044v1, 2019. +[20] T. M. Cover and J. A. Thomas. Elements of information theory. John Wiley and Sons Inc., New York, 2006. + +[21] E. Creager, D. Madras, J-H. Jacobsen, M. A. Weis, K. Swersky, T. Pitassi, and R. Zemel. Flexibly fair representation learning by disentanglement. arXiv:1906.02589v1, 2019. +[22] C. Cremer, Q. Morris, and D. Duvenaud. Reinterpreting importance-weighted autoencoders. arXiv:1704.02916v2, 2017. +[23] E. Denton and V. Birodkar. Unsupervised learning of disentangled representations from video. NIPS, 2017. +[24] C. Doersch. Tutorial on variational autoencoders. arXiv:1606.05908v2, 2016. +[25] Z. Feng, X. Wang, C. Ke, A. Zeng, D. Tao, and M. Song. Dual swap disentangling. 32nd Conference on Neural Information Processing Systems (NeurIPS), 2018. +[26] A. Gabbay and Y. Hosen. Demystifying inter-class disentanglement. arXiv:1906.11796v2, 2019. +[27] Y. Ganin, E. Ustinova, H. Ajakan, H. Larochelle, F. Laviolette, M. Marchand, and V. Lempitsky. Domain-adversarial training of neural networks. arXiv:1505.07818, 2016. +[28] M. Ghifary, W. B. Kleijn, M. Zhang, and D. Balduzzi. Domain generalization for object recognition with multi-task autoencoders. ICCV, (2551-2559), 2015. +[29] I. Goodfellow, Y. Bengio, and A. Courville. Deep Learning. MIT Press, Cambridge, Massachusetts, 2016. +[30] I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. arXiv:1406.2661, 2014. +[31] N. Hadad, L. Wolf, and M. Shahar. A two-step disentanglement method. CVPR, 2018. +[32] R. Hamaguchi, K. Sakurada, and R. Nakamura. Rare event detection using disentangled representation learning. CVPR, 2019. +[33] I. Higgins, L. Matthew, A. Pal, C. Burgess, X. Glorot, M. Botvinick, S. Mohamed, and A. Lerchner. Beta-VAE: Learning basic visual concepts with a constrained variational framework. *ICLR*, 2017. +[34] M. D. Hoffman and M. J. Johnson. ELBO surgery: yet another way to carve up the variational evidence lower bound. 30th Conference on Neural Information Processing Systems, 2016. +[35] K. Holstein, J. W. Vaughan, H. Daume III, M. Dudik, and H. Wallach. Improving fairness in machine learning systems: what do industry practitioners need? arXiv:1812.05239v2, 2019. +[36] A. Howard and J. Borenstein. The ugly truth about ourselves and our robot creations: the problem of bias and social inequity. Science and engineering ethics, 24(5):1521-1536, 2018. +[37] U. Hwang, J. Park, H. Jang, S. Yoon, and N. I. Cho. PuVAE: a variational autoencoder to purify adversarial examples. arXiv:1903.00585, 2019. +[38] D. Janzing, J. Peters, J. Mooij, and B. Scholkopf. Identifying confounders using additive noise models. *Porceedings of the 25th Conference on Uncertainty in Artificial Intelligence*, 2009. +[39] A. H. Jha, S. Anand, M. Singh, and V. S. R. Veeravasarapu. Disentangling factors of variational with cycle-consistent variational auto-encoders. ECCV, 2018. + +[40] David A. Kenny, Deborah A. Kashy, and William L. Cook. Dyadic data analysis. Methodology in the social sciences. Guilford Press, New York, 2006. +[41] D. P. Kingma and J. L. Ba. Adam: a method for stochastic optimization. arXiv:1412.6980v9, 2017. +[42] D. P. Kingma, D. J. Rezende, S. Mohamed, and M. Welling. Semi-supervised learning with deep generative models. arXiv:1406.5298, 2014. +[43] D. P. Kingma and M. Welling. Auto-encoding variational Bayes. arXiv:1312.6114v10, 2014. +[44] J. Klys, J. Snell, and R. Zemel. Learning latent subspaces in variational autoencoders. 32nd Conference on Neural Information Processing Systems (NeurIPS), 2018. +[45] A. Kortylewski, B. Egger, A. Morel-Forster, A. Schneider, T. Gereg, C. Blumer, C. Reyneke, and T. Vetter. Can synthetic faces undo the damage of dataset bias to face recognition and facial landmark detection? arXiv:1811.08565v2, 2019. +[46] T. D. Kulkarni, W. Whitney, P. Kohli, and J. B. Tenenbaum. Deep convolutional inverse graphics network. arXiv:1503.03167v4, 2015. +[47] A. Kumar, P. Sattigeri, and A. Balakrishnan. Variational inference of disentangled latent concepts from unlabeled observations. arXiv:1711.00848v3, 2018. +[48] G. Lample, N. Zeghidour, N. Usunier, A. Bordes, L. Denoyer, and M.A. Ranzato. Fader networks: Manipulating images by sliding attributes. arXiv:1706.00409, 2018. +[49] Y. LeCun, C. Cortes, and C. J. Burges. MNIST handwritten digit database. AT&T Labs, 2010. +[50] C. M. Lee, C. Hart, J. G. Richens, and S. Johri. Leveraging directed causal discovery to detect latent common causes. arXiv:1910.10174v1, 2019. +[51] H.Y. Lee, H.Y. Tseng, J.B. Huang, M. Singh, and M.H. Yang. Diverse image-to-image translation via disentangled representations. arXiv:1808.00948, 2018. +[52] J. Lezama. Overcoming the disentanglement vs reconstruction trade-off via Jacobian supervision. *ICLR*, 2019. +[53] H. Liu, J. Dacon, W. Fan, H. Liu, and J. Liu, Z.and Tang. Does gender matter? towards fairness in dialogue systems. arXiv:1910.10486v1, 2019. +[54] M. Ilse, J. M. Tomczak, C. Louizos, and M. Welling. DIVA: domain invariant variational autoencoders. arXiv:1905.10427, 2019. +[55] F. Locatello, G. Abbati, T. Rainforth, T. Bauer, S. Bauer, B. Scholkopf, and O. Bachem. On the fairness of disentangled representations. arXiv:1905.13662v1, 2019. +[56] F. Locatello, S. Bauer, M. Lucic, G. Ratsch, S. Gelly, B. Scholkopf, and Bachem O. Challenging common assumptions in the unsupervised learning of disentangled representations. arXiv:1811.12359v3, 2019. +[57] C. Louizos, K. Swersky, Y. Li, M. Welling, and R. Zemel. The variational fair autoencoder. arXiv:1511.00830, 2017. +[58] C. Louizos and M. Welling. Structured and efficient variational deep learning with matrix Gaussian posteriors. arXiv:1603.04733v5, 2016. +[59] T. Lucas and J. Verbeek. Auxiliary guided autoregressive variational autoencoders. arXiv:1711.11479, 2018. + +[60] M. Mathieu, J. Zhao, P. Sprechmann, A. Ramesh, and Y. LeCun. Disentangling factors of variation in deep representations using adversarial training. arXiv:1611.03383v1, 2016. +[61] P.A. Mattei and J. Frellsen. Leveraging the exact likelihood of deep latent variable models. arXiv:1802.04826v4, 2018. +[62] L. McInnes and J. Healy. UMAP: uniform manifold approximation and projection for dimension reduction. arXiv:1802.03426v1, 2018. +[63] N. Mehrabi, F. Morstatter, N. Saxena, K. Lerman, and A. Galstyan. A survey on bias and fairness in machine learning. arXiv:1908.09635, 2019. +[64] M. Merler, N. Rather, R. Feris, and J. R. Smith. Diversity in faces. arXiv:1901.10436v6, 2019. +[65] D. Moyer, S. Gao, R. Brekelmans, G. V. Steeg, and A. Galstyan. Invariant representations without adversarial training. NeurIPS, 2018. +[66] R. Nabi, D. Malinsky, and I. Shpitser. Optimal training of fair predictive models. arXiv:1910.04109v1, 2019. +[67] Y. Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y. Ng. Reading digits in natural iages with unsupervised feature learning. NIPS, 2011. +[68] B. T. M. Phuong, N. Kushman, S. Nowozin, R. Tomioka, and M. Welling. The mutual autoencoder: controlling information in latent code representations. *ICLR*, 2018. +[69] O. Press, T. Galatni, S. Benaim, and L Wolf. Emerging disentanglement in auto-encoder based unsupervised image content transfer. ICLR, 2019. +[70] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deep generative models. arXiv:1401.4082, 2014. +[71] A. Rose. Are face-detection cameras racist? Time Business, 2010. +[72] A. Ruiz, O. Martinez, X. Binefa, and J. Verbeek. Learning disentangled representations with reference-based variational autoencoders. arXiv:1901.08534v1, 2019. +[73] A. Sepliarskaia, J. Kiseleva, and M. de Rijke. Evaluating disentangled representations. arXiv:1910.05587v1, 2019. +[74] S. Shankar, V. Piratla, S. Chakrabarti, S. Chaudhuri, P. Jyothi, and S. Sarawagi. Generalizing across domains via cross-gradient training. arXiv:1804.10745.v2, 2018. +[75] R. Shu, Chen Y., A. Kumar, S. Ermon, and B. Poole. Weakly supervised disentanglement with guarantees. arXiv:1910.09772v1, 2019. +[76] N. Siddharth, B. Paige, V. de Meent, A. Desmaison, F. Wood, N. D. Goodman, P. Kohli, and P. H. Torr. Learning disentangled representations with semi-supervised deep generative models. arXiv:1706.00400, 2017. +[77] D. Slack, S. Hilgard, E. Jia, S. Singh, and H. Lakkaraju. How can we fool LIME and SHAP? adversarial attacks on post hoc explanation methods. arXiv:1911.02508v1, 2019. +[78] C. K. Sonderby, T. Raiko, L. Maaloe, S. K. Sonderby, and O Winther. How to train deep variational autoencoders and probabilistic ladder networks. arXiv:1602.02282v1, 2016. +[79] R. Suter, D. Miladinovic, S. Bauer, and B. Scholkopf. Interventional robustness of deep latent variable models. arXiv:1811.00007v1, 2018. + +[80] A. Szabo, Q. Hu, T. Portenier, and P. Favaro. Challenges in disentangling independent factors of variation. arXiv:1711.02245v1, 2017. +[81] A. Szabo, Q. Hu, T. Portenier, M. Zwicker, and P. Favaro. Understanding degeneracies and ambiguities in attribute transfer. ECCV, 2018. +[82] N. Tishby, F. C. Pereira, and W. Bialek. The information bottleneck method. arXiv:physics/0004057v1, 2000. +[83] N. Tishby and N. Zaslavsky. Deep learning and the information bottleneck principle. arXiv:1503.02406v1, 2015. +[84] J. M. Tomczak and M. Welling. VAE with a VampPrior. arXiv:1705:07120v5, 2018. +[85] M. Tschannen, O. Bachen, and M. Lucic. Recent advances in autoencoder-based representation learning. arXiv:1812.05069v1, 2018. +[86] L. van der Maaten and G. E. Hinton. Visualizing data using t-SNE. Journal of Machine Learning Research, 9:2579-2605, 2008. +[87] M. J. Vowels, N. C. Camgoz, and R. Bowden. Gated variational autoencoders: Incorporating weak supervision to encourage disentanglement. arXiv:1911.06443v1, 2019. +[88] H. Wang, Z. He, Z. C. Lipton, and E. P. Xing. Learning robust representations by projecting supervicial statistics out. ICLR, 2019. +[89] Y. Xia, X. Cao, F. Wen, G. Hua, and J. Sun. Learning discriminative reconstructions for unsupervised outlier removal. ICCV, 2015. +[90] Q. Xie, Z. Dai, Y. Du, E. Hovy, and G. Neubig. Controllable invariance through adversarial feature learning. arXiv:1705.1122v3. +[91] R. Zemel, Y. L. Wu, K. Swersky, T. Pitassi, and C. Dwork. Learning fair representations. Proc. of the 30th International Conference on Machine Learning, 28, 2013. +[92] Z. Zhang, Y. Song, and H. Qi. Age progression/regression by conditional adversarial autoencoder. arXiv:1702.08423, 2017. +[93] S. Zhao, J. Song, and S. Ermon. InfoVAE: Balancing learning and inference in variational autoencoders. arXiv:1706.02262v3, 2018. +[94] Sun Zheng. Disentangling latent space for VAE by label relevant/irrelevant dimensions. CVPR, 2018. \ No newline at end of file diff --git a/nestedvaeisolatingcommonfactorsviaweaksupervision/images.zip b/nestedvaeisolatingcommonfactorsviaweaksupervision/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..fcee667d27d0018ea8d268028354b96299abdf1e --- /dev/null +++ b/nestedvaeisolatingcommonfactorsviaweaksupervision/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61ac1842463e7953b9f26b121731e8657c5bf2e0b61f0f6d54fc849b4c059bed +size 411389 diff --git a/nestedvaeisolatingcommonfactorsviaweaksupervision/layout.json b/nestedvaeisolatingcommonfactorsviaweaksupervision/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..52c4dcd9f9d4188fe7e95740aeb643307e266554 --- /dev/null +++ b/nestedvaeisolatingcommonfactorsviaweaksupervision/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:234234db84d2469c15ff7880ec1036356aaf74971e0231bac23de553f0b80ab6 +size 508780 diff --git a/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/dc51fcfb-762a-4f4b-8dd6-2598dfac7f3b_content_list.json b/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/dc51fcfb-762a-4f4b-8dd6-2598dfac7f3b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d4282c210d795704a2a479f820c60399ee72183c --- /dev/null +++ b/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/dc51fcfb-762a-4f4b-8dd6-2598dfac7f3b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87621a9be1e5cd557865857512eaacaa1e207bdaa32a38b2ff5d0bc201fb5f92 +size 85180 diff --git a/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/dc51fcfb-762a-4f4b-8dd6-2598dfac7f3b_model.json b/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/dc51fcfb-762a-4f4b-8dd6-2598dfac7f3b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..693ab3a4db5d831bee8c6606d4de4ec50b243397 --- /dev/null +++ b/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/dc51fcfb-762a-4f4b-8dd6-2598dfac7f3b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2e98748d30e922bc10df96f43a8c626e361f915530c7bb65b05bd24fd82e747 +size 109483 diff --git a/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/dc51fcfb-762a-4f4b-8dd6-2598dfac7f3b_origin.pdf b/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/dc51fcfb-762a-4f4b-8dd6-2598dfac7f3b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bf65c49d651e896ec7d8e9ca9898d7f173614f0d --- /dev/null +++ b/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/dc51fcfb-762a-4f4b-8dd6-2598dfac7f3b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf9cb6578d511a3298c86187f475eec4a6db5f48aee221df79ba3c10917b76f4 +size 2907113 diff --git a/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/full.md b/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..474462f0454e4c0a75e982bd3aec12d507ccbf30 --- /dev/null +++ b/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/full.md @@ -0,0 +1,366 @@ +# NETNet: Neighbor Erasing and Transferring Network for Better Single Shot Object Detection + +Yazhao Li $^{1}$ , Yanwei Pang $^{1*}$ , Jianbing Shen $^{2}$ , Jiale Cao $^{1}$ , Ling Shao $^{2}$ + +$^{1}$ Tianjin Key Laboratory of Brain-inspired Intelligence Technology, School of Electrical and Information Engineering, Tianjin University, Tianjin, China + +$^{2}$ Inception Institute of Artificial Intelligence, Abu Dhabi, UAE + +1{lyztju, pyw, connor}@tju.edu.cn, 2{shenjianbingcg@gmail.com, ling.shao@ieee.org} + +# Abstract + +Due to the advantages of real-time detection and improved performance, single-shot detectors have gained great attention recently. To solve the complex scale variations, single-shot detectors make scale-aware predictions based on multiple pyramid layers. However, the features in the pyramid are not scale-aware enough, which limits the detection performance. Two common problems in single-shot detectors caused by object scale variations can be observed: (1) small objects are easily missed; (2) the salient part of a large object is sometimes detected as an object. With this observation, we propose a new Neighbor Erasing and Transferring (NET) mechanism to reconfigure the pyramid features and explore scale-aware features. In NET, a Neighbor Erasing Module (NEM) is designed to erase the salient features of large objects and emphasize the features of small objects in shallow layers. A Neighbor Transferring Module (NTM) is introduced to transfer the erased features and highlight large objects in deep layers. With this mechanism, a single-shot network called NETNet is constructed for scale-aware object detection. In addition, we propose to aggregate nearest neighboring pyramid features to enhance our NET. NETNet achieves $38.5\%$ AP at a speed of 27 FPS and $32.0\%$ AP at a speed of 55 FPS on MS COCO dataset. As a result, NETNet achieves a better trade-off for real-time and accurate object detection. + +# 1. Introduction + +With the emergence of deep neural networks [26, 43, 7], object detection built on deep networks has achieved significant progress both in detection accuracy [13, 5, 27] and detection efficiency [39, 40, 18]. Despite this success, complex scale variations in practical scenes exist as a fundamental challenge and a bottleneck for accurate object de + +![](images/df80dcca782b225e0cc742a71c5490262a395ad160bec7d926c1011d65ab8298.jpg) + +![](images/eea58eda9736e5404db466049043cb1a379c02e0b689503aae9f6d7e919c2f5b.jpg) + +![](images/fd67499ff998364a6df1de59a165eca04a9450e542bbbf129494e3112acaf1ab.jpg) + +![](images/12dd8129e0438de851fc18dff101d0bce9b24f1d0722958833897b6711ec4197.jpg) + +![](images/28b99d90d50648f932903e800b64066585463cb3381ab35d53fec8a3c937e707.jpg) +(a) baseline +(c) ours +(I) Tackle false negative problem + +![](images/17eab7e49da26abfa10f3714c10dbe1360d690186f8fd662e601e8de5405581b.jpg) +(b) baseline feature +(d) our feature + +![](images/74a82842cbf5442a950c7606e261301cf299bd3d8723335fa887c312f7f08990.jpg) +(e) baseline +(g)ours +(II) Tackle part false positive problem + +![](images/e01486ed7fad5bad84ebe5c60ccc0798903f99a26e213268bd5c48c904dc9a68.jpg) +(f) baseline feature +(h) our feature + +Figure 1. Two common detection problems for baseline SSD [35] and the solution using our NETNet. The visualized features are extracted from the first pyramid layer for detecting small objects. (I) False negative problem. The small objects (tennis racket, sports ball) are missed in (a) because features of small objects are not salient on the corresponding pyramid features (b). Our NETNet can detect small objects with high confidence by erasing the features of large objects and focusing on small objects as (c, d). (II) Part false positive problem. The head is detected as another person in baseline because this part region is highlighted on the features (f) for detecting small objects. Our NETNet can solve this problem by suppressing the salient part features of large objects, as (h). + +tection [44, 45, 20]. Beneficial from an optimal trade-off between real-time detection efficiency and accurate detection performance, single-shot detectors [35, 31] have gained increased popularity recently. + +Exploring multi-level features is essential [36, 58, 50] to tackle complex scale variations. The single-shot detector SSD [35] has been proposed and developed based on pyramid feature representation. SSD implements scale-aware object detection by detecting different-sized objects within different layers of the pyramid, which is motivated by the fact that deep-layer features with small feature resolution contain more semantic information for large objects, while the features for small objects are found in the shallow layers with large feature resolution [24, 59]. Therefore, shallow layers are responsible for detecting small objects and + +deep layers are devoted to detecting large objects. Based on feature pyramid, some methods explore to further enhance the feature representation by fusing multi-scale features using an extra feature pyramid, which has proven useful [25, 12, 30, 31, 22] for improving detection performance. Although single-shot detectors have made great progress by adopting the feature pyramid, several failure cases, such as missing small objects and poor localization [17, 23], still exist limiting detection performance. + +In most previous single-shot detectors, features are scale-confused instead of scale-aware even on one specific pyramid layer. For example, in some shallow layers of a feature pyramid, features for both small and large objects exist. As shown in Fig. 1, in the shallow features (b) used for detecting small objects, the large-object features dominate the main saliency, weakening the small-object features and thus preventing the detection of small objects (e.g., the sports ball from (a) is not detected in the final result). Additionally, some parts of large objects have strong response regions on shallow features. For example, the head region in Fig. 1(e) is highlighted in (f), which leads to the wrongly detection of the head region. Thus, the features are scale-confused making it difficult to solve these two problems, i.e., false negative problem and part false positive problem. + +With this observation, we propose to generate scale-aware features for better single-shot object detection. To achieve this, redundant features are erased to alleviate feature scale-confusion. Thus, we only retain features of small objects in the shallow layers, erasing features of large objects. Then, we use these small-scale-aware features to detect small objects. As shown in Fig. 1(d), most of the features of large objects are removed. The features of small objects are thus emphasized, enabling the small sports ball to be detected precisely. The salient features of large objects can also be suppressed to alleviate the part false positive problem, as shown in (h). Meanwhile, transferring these erased features to a suitable scale (i.e., large-scale) space could enhance the features of large objects and improve the overall detection performance. + +The main contributions of our method are as follows: We propose a Neighbor Erasing and Transferring (NET) mechanism to generate scale-aware features. Two modules, the Neighbor Erasing Module (NEM) and Neighbor Transferring Module (NTM), are designed in our NET mechanism to unmix the scale confusion and enhance feature aggregation, respectively. The NEM, embedded with a reversed gate-guided erasing procedure, is to extract and erase the large object features from the shallow layers. Then, the large object features are transferred to the deep pyramid layers by the NTM for enhancing the deep features. With our NET mechanism, a modified single-shot network, NET-Net, is constructed by simultaneously embedding the scale-aware features and the scale-aware prediction. In NETNet, + +![](images/539309c4da4099a94844db7696e0aa14317e61964bbbca7f69678a411b7e312d.jpg) + +![](images/481268f874e0dc1e055f1a37ab4bc77014d34b2ee0a24f51021b9248152f482d.jpg) + +![](images/71e713f30c7fc7667db1f6fe000c9f380f48225477748424e0c898deedd7be81.jpg) +Figure 2. Different detectors for object detection. + +![](images/6f4ec20b5c5b6f79b311a4de8e6a65f20b5a9d2ebfc8fa9b34982c05cdcdeada.jpg) + +we enrich the pyramid features by introducing a Nearest Neighbor Fusion Module (NNFM). As a result, our NETNet is capable of achieving fast and accurate object detection with a better trade-off than previous single-shot detectors. + +# 2. Related Work + +Scale-agnostic detectors. Most recent object detectors are built upon deep networks. The regions with CNN features (R-CNN) methods [14, 13] integrate a CNN into object detection and achieve promising performance. As a two-stage method, the Faster R-CNN [41] proposes a lightweight network for generating proposals and construct the detection network as a complete end-to-end network. Methods likeYOLO [39], Faster R-CNN [13], R-FCN [5], and other variants [29, 6, 1] have made significant progress for improving detection accuracy and efficiency. As shown in Fig. 2(a), this type of methods detect all objects of various scales by utilizing the deepest single-scale high-level features. Thus, these detectors are scale-agnostic detectors. + +Scale-aware detectors. Due to the complex scale variations, many researchers have explored to exploit multi-scale pyramid features for object detection [30, 10] as well as other visual tasks [37, 48, 46, 51]. SSD [35] is a single-shot (i.e., single-stage) detector that proposes to make scale-aware prediction based on multi-layer pyramid features. Features in shallow layers are used for detecting small objects and features in deep layers for large objects. RF-BNet [33] embeds multi-scale receptive fields to enhance feature discriminability. DES [59] enriches the semantics of object features through a semantic segmentation branch and a global activation module. FPN [30], DSSD [10], and RONet [24] involve extra top-down feature pyramids and detect objects on each scale of these pyramids as shown in Fig. 2(c). Most recent methods [31, 21, 19, 61, 60] have explored the advantages of the pyramid features and have achieved promising results. Kong et al. [22] proposed to reconfigure the pyramid features by aggregating multi-layer features and reassigning them into different levels. Recent TridentNet [28] attempts to generate scale-specific features through a parallel multi-branch architectures as shown in Fig. 2(b) by embedding different receptive fields, which + +achieves promising improvement on two-stage detectors. + +Different from these methods, we propose to generate scale-aware features for single-shot object detection by introducing an erasing and transferring mechanism. The adversarial erasing strategy has also been investigated in weakly supervised object localization [54, 57], weakly supervised semantic segmentation [16], and salient object detection [4]. In these methods, the well recognized regions are erased to refine the prediction results iteratively. Different from them, we propose to reconfigure the pyramid features to scale-aware features by removing the scale-uncorrelated features using an erasing strategy. The erased features in shallow layers are further transferred to enhance features in deep layers, instead of discarding them as previous erasing methods. Besides, attention mechanism has been widely explored recently [53, 11, 49, 52, 9]. We introduce an attention to guide the erasing and transferring. As shown in Fig. 2(d), we aim to reconfigure the pyramid features to scale-aware features and alleviate the scale-confusion using the Erasing and Transferring operation. We then build a single-shot scale-aware detector for more accurate object detection. + +# 3. NET Mechanism + +To tackle complex scale variations, we propose to generate scale-aware features for object detection. As can be observed from Fig. 1(b) and (f), features in the shallow pyramid layers contain detailed information for both large objects and small objects. However, features for large objects are more salient, which causes small objects to be missed in Fig. 1(a) and the part false positive problem in Fig. 1(e). Instead of applying feature fusion as previous top-down feature pyramids [30, 10], we propose a NET mechanism to reconfigure the basic pyramid features to scale-aware features for scale-aware object detection. As shown in Fig. 3(a), in the NET mechanism, a feature erasing module (i.e., NEM) and a feature transferring module (i.e., NTM) are contained. The NEM is designed to remove large-object features from the shallow layers and emphasize the features of small objects. Then the NTM is used to transfer these features to enhance the deep features. Because our method aims to generate scale-aware features for scale-aware prediction, we take the typical single-shot detector SSD [35] as our baseline in which a pyramid from the backbone network is adopted for multi-scale prediction. We first analyze the feature pyramid in the baseline SSD. Then, we present the details of our NEM and NTM in the NET mechanism. + +# 3.1. Basic Feature Pyramid + +In SSD, a feature pyramid is explored to detect objects with different scales. We denote the objects with a specific scale $s^{th}$ as $x_{s}$ . The objects for all $S$ scales are represented + +as $X = \{x_{1}, x_{2}, \ldots, x_{S}\}$ , where $x_{1}$ represents objects with smallest scale and $x_{S}$ refers to objects with largest scale. + +SSD detects objects in a pyramidal hierarchy by exploiting multiple CNN layers, with each layer is responsible for detecting objects of a specific scale [38]. In the feature pyramid with $S$ layers, we denote the features from $s^{th}$ layer as $p_s$ and express all the pyramid features as $P = \{p_1, p_2, \dots, p_S\}$ , where $p_1$ represents features with largest resolution in the shallow pyramid layer for detecting small objects $x_1$ . With feature pooling in the pyramid, feature resolution is decreased from $p_1$ to $p_S$ . Obviously, information for small objects are gradually discarded from shallow to deep layers. Because of the small input image size (e.g., $300 \times 300$ ) for SSD, the deep layers (e.g., with spatial size $5 \times 5$ ) only contain features for large objects. Thus, we can approximately get: + +$$ +p _ {s} = f _ {s} \left(x _ {s}, x _ {s + 1},..., x _ {S}\right), \tag {1} +$$ + +where $f_{s}(x)$ represents the feature extraction of the pyramid. The feature scale-confusion in a shallow layer ( $e.g., p_{1}$ contains features for various-scale objects) makes detecting small objects difficult and leads to much part detection, as shown in Fig. 1. We propose to reconfigure the pyramid features to be scale-aware features and solve these problems. + +# 3.2. Neighbor Erasing Module + +To alleviate feature scale-confusion, we propose a Neighbor Erasing Module (NEM) to filter out the redundant features. Suppose two adjacent pyramid layers, $s^{th}$ layer and $(s + 1)^{th}$ layer. Obviously, features in the $s^{th}$ layer $p_{s} = f_{s}(x_{s}, x_{s + 1}, \dots, x_{S}) \in \mathbb{R}^{h_{s} \times w_{s} \times c_{s}}$ have more information for objects $x_{s}$ than features in the $(s + 1)^{th}$ layer $p_{s + 1} = f_{s + 1}(x_{s + 1}, \dots, x_{S}) \in \mathbb{R}^{h_{s + 1} \times w_{s + 1} \times c_{s + 1}}$ , where $(h_{s} > h_{s + 1}, w_{s} > w_{s + 1})$ . Based on this feature distribution, we can generate features $\tilde{p}_{s} = f_{s}(x_{s})$ for objects with scale $s$ from the pyramid feature $p_{s}$ , by erasing features $p_{es} = f_{s}(x_{s + 1}, \dots, x_{S})$ of objects in a scale range of $[s + 1, S]$ as: + +$$ +\tilde {p} _ {s} = p _ {s} \ominus p _ {e s} = f _ {s} \left(x _ {s}, \dots , x _ {S}\right) \ominus f _ {s} \left(x _ {s + 1}, \dots , x _ {S}\right), \tag {2} +$$ + +with an element-wise subtraction operation $\ominus$ . + +Noticing that pyramid feature $p_{s+1}$ only contains information for objects with a scale range of $[s+1, S]$ , we therefore use $p_{s+1}$ to guide the feature erasing in Eq. 2. Specifically, we extract the feature $p_{es}$ from $p_s$ by: + +$$ +p _ {e s} = p _ {s} \odot \mathcal {F} _ {s + 1 \rightarrow s} (p _ {s + 1}), \tag {3} +$$ + +where $\odot$ refers to Hadamard product. $\mathcal{F}_{s + 1\to s}(p_{s + 1})$ can be represented as a soft spatial gate $g_{s + 1}^{s}\in [0,1]^{h_{s}\times w_{s}\times c}$ ( $c$ is from $\{1,c_s\}$ ). We generate this gate by using the features from the $(s + 1)^{th}$ pyramid layer and adopt it to guide suppressing features of objects $\{x_{s + 1},\dots,x_S\}$ in $p_s$ . In our implementation, we calculate this spatial gate as: + +$$ +g _ {s + 1} ^ {s} = \mathcal {F} _ {s + 1 \rightarrow s} \left(p _ {s + 1}\right) = \frac {1}{1 + e ^ {- \mathcal {G} \left(\mathcal {U} \left(p _ {s + 1}\right) ; W _ {s + 1} ^ {s}\right)}}, \tag {4} +$$ + +![](images/f30a0a03df3c5cb2ea9644dd85e1a4e1fa7d9eb0e38930b5b8fabf1bd5caf029.jpg) +Figure 3. The Neighbor Erasing and Transferring (NET) mechanism (a), with (b) Neighbor Erasing Module (NEM), and (c) Neighbor Transferring Module (NTM). After NETM, $\tilde{p}_s$ highlights small objects, and deep feature $\tilde{p}_{s + 1}$ contains more information for larger objects. + +where $\mathcal{U}(p_{s + 1})$ upsamples $p_{s + 1}$ to $p_{s + 1}^s\in \mathbb{R}^{h_s\times w_s\times c_{s + 1}}$ to keep the consistent spatial resolution between the gate $g_{s + 1}^s$ and feature $p_s$ . We implement the gate function $\mathcal{G}(.)$ with learnable weights $W_{s + 1}^s$ . + +In actual, since $\mathcal{G}(.)$ can be represented as a self-attention function [53] in which attention for objects can be extracted from the input features, we can construct it based on the spatial attention mechanism in [53] and [11]. Alternately, we can choose to use max pooling or average pooling along channel direction to generate a spatial attention map ( $c = 1$ ) like that in [55] as: + +$$ +\mathcal {G} \left(p _ {s + 1} ^ {s}\right) = \mathcal {P} _ {\max } \left(p _ {s + 1} ^ {s}\right) \text {o r} \mathcal {P} _ {\text {a v g}} \left(p _ {s + 1} ^ {s}\right), \tag {5} +$$ + +or combining max pooling $\mathcal{P}_{max}(.)$ and average pooling $\mathcal{P}_{avg}(.)$ by a convolution layer with $W_{s+1}^{s}$ . In our implementation, we use a $1 \times 1 \times c_{s}$ convolution layer $\mathcal{C}_{1 \times 1}$ as: + +$$ +\mathcal {G} \left(p _ {s + 1} ^ {s}\right) = \mathcal {C} _ {1 \times 1} \left(p _ {s + 1} ^ {s}; W _ {s + 1} ^ {s}\right), \tag {6} +$$ + +to generate a channel-wise spatial gate for extracting and suppressing the features of larger objects in $p_{s}$ , since it is proved an optimal trade-off between precision and efficiency as Sec. 5.1. In summary, we generate the scale-aware features $\tilde{p}_{s}$ for smaller objects $x_{s}$ by suppressing the features of larger objects via a reversed gate as: + +$$ +\tilde {p} _ {s} = f _ {s} \left(x _ {s}\right) = p _ {s} \ominus p _ {e s} = p _ {s} \ominus \left(p _ {s} \odot g _ {s + 1} ^ {s}\right). \tag {7} +$$ + +# 3.3. Neighbor Transferring Module + +As discussed above, in the pyramid feature $p_{s}$ , some detailed information for objects $\{x_{s + 1}, x_{s + 2}, \dots, x_{S}\}$ is also contained. Although this detailed information disturbs features for detecting smaller objects $x_{s}$ , it is helpful for enhancing the features of larger objects $x_{n}$ ( $n > s$ ) for more accurate classification and localization. Therefore, we propose to transfer these features from a shallow layer ( $e.g., p_{s}$ ) to a deep layer ( $e.g., p_{s + 1}$ ). + +As formulated in Sec. 3.2, the soft spatial gate $g_{s+1}^s$ generated by $p_{s+1}$ has larger activation values on the regions for objects $\{x_{s+1}, \ldots, x_S\}$ . Thus, $p_{es}$ in Eq. 3 helps extract the + +detailed information of these larger objects. We then transfer this detailed information $p_{es}$ and obtain the new pyramid features $\tilde{p}_{s+1} \in \mathbb{R}^{h_{s+1} \times w_{s+1} \times c_{s+1}}$ as: + +$$ +\begin{array}{r l}\tilde {p} _ {s + 1}&= \mathcal {T} _ {s \rightarrow s + 1} \left(p _ {e s}, p _ {s + 1}\right)\\&= \mathcal {C} _ {1 \times 1} \left(\mathcal {D} \left(p _ {e s}\right); W _ {s} ^ {s + 1}\right) \oplus p _ {s + 1},\end{array}\tag {8} +$$ + +composed of a downsampling operation $\mathcal{D}(.)$ to match the feature resolution and a convolutional layer $\mathcal{C}_{1\times 1}$ with learnable $W_{s}^{s + 1}\in \mathbb{R}^{1\times 1\times c_s\times c_{s + 1}}$ to maintain the consistent channel number. We perform an element-wise sum operation $\oplus$ to enhance $p_{s + 1}$ by combining the detailed information from $p_{es}$ . We illustrate this Neighbor Transferring Module (NTM) in Fig. 3(c). The enhanced feature $\tilde{p}_{s + 1}$ is used as the new pyramid feature for the subsequent scale-aware features generation and scale-aware object detection. + +# 4. Single-Shot Detector: NETNet + +Single-shot object detectors like SSD [35] directly carry out regression and classification based on predefined anchors. This provides the SSD with a better trade-off to achieve real-time detection and promising performance. However, SSD performs poorly for detecting small objects and also suffers from inaccurate localization, as shown in Fig. 1. To solve these problems, we design a new single-shot object detection network, called NETNet embedding the proposed NET mechanism as a scale-aware detector. + +In NETNet, we build our backbone network as that of SSD. Taking the network with an input image size $300 \times 300$ as an example, we show the main network architecture of NETNet in Fig. 4(a). Features of six pyramid levels $\{p_1, p_2, p_3, p_4, p_5, p_6\}$ with resolutions $\{38 \times 38, 19 \times 19, 10 \times 10, 5 \times 5, 3 \times 3, 1 \times 1\}$ are extracted from the backbone as the basic feature pyramid. Based on the basic pyramid, we construct our NET Module (NETM) to generate scale-aware features and solve the aforementioned scale problems. In implementation, there are some scale-overlaps [34, 62] between the nearest neighbor pyramid lev + +(a) The main architecture of NETNet +![](images/cec3701bfdb8dc54338c9e842f39a4112c8864e212207a704daa599872914886.jpg) +Downsample $\oplus$ Element-wise sum U Upsample +$p_{s}$ Pyramid Feature $p_{fs}$ Enhanced Feature by fusion +$\mathrm{DH}_{\#}$ Detection Head C,1x1 Convolution layer +NNFM Nearest Neighbor Fusion Module + +(b) Nearest Neighbor Fusion Module +Figure 4. The proposed NETNet. (a) The main architecture of NETNet. We illustrate this architecture with an input size of $300 \times 300$ . Six pyramid layers are used for building detectors, as in SSD [35]. The embedded NNFM (b) is used for feature fusion before NETM. +![](images/f6d2fd1cf6db38a9e50c0a9661c78455490ba9793b29cf33ee712238afdea7d5.jpg) +NETM Neighbor Erasing and Transferring Module + +els $(e.g., p_1$ and $p_2)$ , when configuring the detection anchors and assigning ground truth. Therefore, we build the NETM in a skip manner. Additionally, considering that the scale-overlaps make features for one object existing in the nearest neighboring pyramid layers complementary, we introduce a Nearest Neighbor Fusion Module (NNFM) as shown in Fig. 4(b) to enhance the pyramid features firstly by fusing the nearest neighboring pyramid features. Based on the NNFM and NETM, six different detection heads for box regression and classification, are built upon the scale-aware features to construct our scale-aware detector NETNet. We present the details of NETM and NNFM as follows. + +# 4.1. NETM in a Skip Manner + +In typical single-shot detectors, features in the shallow layers (e.g., $p_1$ with larger feature resolution $38 \times 38$ ) are used for detecting smaller objects, while features in deeper layers (e.g., $p_3$ with smaller resolution $10 \times 10$ ) are used for detecting larger objects. Because features with small resolutions (e.g., $3 \times 3$ ) have large receptive fields and less spatial information, we finally embed two NETMs in NETNet for feature erasing and transferring without using features $p_5$ and $p_6$ . Due to the anchor configuration in SSD, two anchors in the nearest pyramid layers (e.g., $p_1$ and $p_2$ ) may share the same ground truth. That is, one small object should be detected in $p_1$ and $p_2$ simultaneously. To avoid disturbing the overlapped supervision, our NETNet is elaborately designed by embedding two skipped NETMs. + +One NETM is built upon the pyramid features of $p_1$ and $p_3$ . To erase the features of larger objects from the shallow layer $p_1$ , we first upsample $p_3$ and use a $1 \times 1$ convolution to generate soft spatial gate as Eq. 4 for larger objects. We evaluate the effects of several different spatial attention methods and choose channel-wise spatial attention as Eq. 6. Then, an erasing operation in Eq. 7 generates features for smaller objects. We also embed a light fusion module into + +NETM to make the generated scale-aware features more robust. The fusion module is constructed as a residual block as in [15] by stacking $(1\times 1,3\times 3$ , and $1\times 1$ convolutional layers) with a skip connection. When applying the transferring module NTM, we first acquire the detailed information $p_{es}$ that is helpful for larger objects from $p_1$ as Eq. 3. Then, this detailed information enhances the features $p_3$ as Eq. 8. The other NETM is built upon pyramid features of $p_2$ and $p_4$ with the similar configuration. + +# 4.2. Nearest Neighbor Fusion Module + +As pointed out in feature pyramid studies [19, 38], features from neighboring pyramid layers are complementary. Thus, incorporating context information from different layers promotes feature representation. Combining features from top to bottom is typically done to build a feature pyramid [10]. However, since our purpose is to remove large-object features from the shallow layers and generate scale-aware features, introducing other more scale features may increase the feature scale-confusion problem. Therefore, we propose a more effective fusion module, NNFM, to enhance the pyramid features. + +As shown in Fig. 4(b), in NNFM, only features from the adjacent pyramid layers are fused as: + +$$ +p _ {f s} = \mathcal {H} _ {s - 1} \left(p _ {s - 1}\right) \oplus \mathcal {H} _ {s} \left(p _ {s}\right) \oplus \mathcal {H} _ {s + 1} \left(p _ {s + 1}\right), \tag {9} +$$ + +where we denote the fused features of $s^{th}$ pyramid layer as $p_{fs} \in \mathbb{R}^{h_s \times w_s \times c_s}$ . $\mathcal{H}_{s-1}$ is constructed by a pooling layer and a $1 \times 1$ convolutional layer. $\mathcal{H}_s$ is constructed by a $1 \times 1$ convolutional layer. $\mathcal{H}_{s+1}$ is constructed by a bilinear upsampling layer and a $1 \times 1$ convolutional layer. Finally, these features are fused by an element-wise sum operation. Thus, we enhance the $p_2$ features by aggregating complementary information from $p_1, p_2$ , and $p_3$ , instead of using the features $\{p6, p5, p4, p3, p2\}$ like a top-down pyramid network. Performing NNFM will not aggravate the feature + +
MethodsAP\( AP_{50} \)\( AP_{75} \)\( AP_s \)\( AP_m \)\( AP_l \)
Baseline SSD25.141.826.16.328.343.3
NEM29.448.930.413.232.244.3
NTM25.842.426.96.528.544.4
NETM30.449.731.413.433.045.6
NETM + TDP30.649.931.912.833.046.3
NETNet31.150.532.413.635.045.4
+ +Table 1. Evaluation for NETM and NNFM on COCO minival. + +
MethodsAPAP50AP75APsAPmAPl
Max Attention28.747.329.911.531.443.4
Mean Attention28.847.629.612.532.043.9
Global Attention29.348.630.512.532.044.2
NEM29.448.930.413.232.244.3
+ +scale-confusion, since the information of tiny objects from $p_1$ is discarded using pooling operation and the information of larger objects from $p_3$ will be erased by the subsequent NEM. As a result, the features of objects which should be detected on $p_2$ , are enhanced by fusing the complementary information with NNFM. + +# 5. Experiments + +Dataset: We evaluate our method on the benchmark detection dataset, MS COCO [32] dataset (i.e., COCO). It has 80 object categories and more than $140\mathrm{k}$ images. Following [35, 30], we train our NETNet on the union (trainval35k) of $80\mathrm{k}$ training images and a $35\mathrm{k}$ subset of validation images, and conduct ablation evaluations on the remaining $5\mathrm{k}$ validation images (minival). The final results are obtained by testing on the $20\mathrm{k}$ test images (test-dev) and submitted to the official server. The variations in scale of objects in COCO are complex. $\mathrm{AP}_s$ , $\mathrm{AP}_m$ , and $\mathrm{AP}_l$ evaluate the detection precision for three scales of objects. + +Training protocols: We re-implement the SSD [35] as our baseline based on a Pytorch framework. All the models are trained over 160 epochs with the same training loss as SSD. For ablation experiments, we set the initial learning rate as 0.002 and decrease it by a factor of 0.1 after the $90^{th}$ , $120^{th}$ , and $140^{th}$ epochs, respectively. We follow [33], using a warm-up learning rate in the first 5 epochs. We set the weight decay to 0.0005 and the momentum to 0.9. Each model is trained with a batch size of 32 on 2 GPUs. + +# 5.1. Ablation Study + +Configuration of NETNet. For ablation experiments, we construct NETNet with a VGG-16 backbone pretrained on ImageNet [42], and train the models with an input size of $300 \times 300$ . Following SSD, we truncate the final fully connected layers of the backbone and add a series of smaller convolutional layers to construct the feature pyramid. + +Table 2. Evaluation for different attention methods of NEM. + +
MethodsAP\( AP_{50} \)\( AP_{75} \)\( AP_s \)\( AP_m \)\( AP_l \)
Baseline SSD25.141.826.16.328.343.3
\( NEM_{13} \)28.948.730.212.831.044.4
\( NEM_{24} \)28.546.630.010.631.744.5
NNEM29.148.830.112.731.944.4
NEM29.448.930.413.232.244.3
+ +Table 3. Evaluation for different configurations of NEM. + +# Evaluation of NETNet: + +Overall NEM. As shown in Table 1, compared with SSD, NEM yields a large margin of absolute improvement of $4.3\%$ AP. Because our NEM can remove the features of larger objects from the shallow layer to solve feature confusion, features for smaller objects can be activated to improve the performance for detecting smaller objects. We obtain a $6.9\%$ AP improvement for small objects and $3.9\%$ AP improvement for medium objects, which demonstrates the effectiveness of NEM for feature erasing. + +NTM and NETM. We propose to transfer features using NTM to complement the detailed information of larger objects. As shown in Table 1, using only NTM brings a $1.1\%$ improvement for large objects because of the enhanced features for large objects. Combining NEM and NTM promotes each module to learn better features through an adversarial strategy. Our NETM using NEM and NTM further improves the overall AP by $1.0\%$ . + +NNFM. We compare our NNFM with a typical Top-Down Pyramid (TDP) like FPN [30] based on our NETM. When combing the TDP with our NETM, a slight overall improvement, $0.2\%$ AP, is achieved. However, we find the detection performance for small objects degrades by using TDP (from $13.4\%$ AP to $12.8\%$ AP), which may be caused by the feature confusion that is not consistent with our NET mechanism. When combining the NETM with NNFM (i.e., NETNet), a $31.1\%$ AP performance is obtained. Our NNFM further improves the performance for medium objects by a large margin (i.e., $2.0\%$ ). + +# Evaluation of NEM: + +Attention for NEM. We train our network with only two NEMs to evaluate different spatial gate generation methods as discussed in Sec. 3.2. Due to the large computation consumption of self-attention method in [53, 11], we only implement a simplified one as 'Global Attention' by reducing the inner channel number. As presented in Table 2, using attention as Eq. 6 in our NEM, which generates a channel-wise spatial gate for each channel of the shallow pyramid features, obtains a better performance of $29.4\%$ AP. + +NEM on different layers. We evaluate the influence of each NEM and show the results in Table 3. By only adding NEM on $p_1$ and $p_3$ as $\mathrm{NEM}_{13}$ , we obtain a $6.5\%$ AP improvement on $\mathrm{AP}_s$ , which is better than that of $\mathrm{NEM}_{24}$ (on $p_2$ and $p_4$ ) because there are more small objects features in $p_1$ . We obtain a better improvement for medium objects by + +
MethodsBackboneImage SizeTime (ms)FPSAP\( AP_{50} \)\( AP_{75} \)\( AP_s \)\( AP_m \)\( AP_l \)
Anchor-free detectors:
CornerNet [27]Hourglass-104511×5112444.140.556.543.119.442.753.9
CenterNet [8]Hourglass-104511×5113402.944.962.448.125.647.457.4
FCOS [47]Res101-FPN1333×800--41.560.745.024.444.851.6
Single-stage detectors:
SSD300 [35]VGG-16300×30017*58.925.143.125.86.625.941.4
DFPR [22]VGG-16300×300--28.448.229.1---
PFPNet-S300 [19]VGG-16300×300--29.649.631.110.632.044.9
RefineDet320 [56]VGG-16320×3202638.729.449.231.310.032.044.4
RFBNet [33]VGG-16300×30015 (19*)66.730.349.331.811.831.945.9
EFIP [38]VGG-16300×3001471.430.048.831.710.932.846.3
HSD [2]VGG-16320×3202540.033.553.236.115.035.047.8
NETNet (ours)VGG-16300×3001855.632.051.533.613.934.546.2
NETNet+Ref [2]VGG-16320×320--34.953.837.816.337.748.2
DSSD513 [10]ResNet-101513×5131825.533.253.335.213.035.451.1
RetinaNet [31]ResNet-101500×5009011.134.453.136.814.738.548.5
STDN512 [61]DenseNet-169513×513--31.851.033.614.436.143.4
DFPR [22]ResNet-101512×512--34.654.337.314.738.151.9
RefineDet512 [56]ResNet-101512×512--36.457.539.516.639.951.4
SSD512 [35]VGG-16512×5122835.728.848.530.310.931.843.5
DES512 [59]VGG-16512×512--32.853.234.613.936.047.6
RFBNet [33]VGG-16512×51233 (37*)30.334.455.736.417.637.047.6
EFIP [38]VGG-16512×5122934.534.655.836.818.338.247.1
TripleNet [3]ResNet-101512×512--37.459.339.618.539.052.7
NETNet (ours)VGG-16512×5123330.336.757.439.220.239.249.0
NETNet (ours)ResNet-101512×5123727.038.558.641.319.042.353.9
+ +Table 4. Comparison on the COCO test-dev set. The results are reported for the case of single-scale inference. We test the time on a Titan X Pascal GPU with Pytorch 0.3.1. Times with * are obtained by testing in the same environment with NETNet. + +$\mathrm{NEM}_{24}$ . There is some ground truth and feature overlap in $p_1$ and $p_2$ , which yields the improvements for both small and medium objects using each NEM. We obtain the best result by combining them. These results demonstrate the effectiveness of our method for erasing redundant features. + +Skipped NEM. We also construct a model by adding three regular NEMs built upon $(p_1, p_2)$ , $(p_2, p_3)$ , and $(p_3, p_4)$ , respectively. This is a type of nearest neighbor erasing module built upon the features of two nearest neighbor layers. We denote this model as NNEM in Table 3. The NNEM model obtains a lower performance (29.1%) than our NEM (29.4%). Because the same ground truth may be assigned to predefined anchors from two neighboring layers, using NNEM disturbs the ground truth supervision. Using the skipped NEM eases the network training for better results. + +Evaluation of network configurations: We evaluate the performance of NETNet with different configurations. By refining the learning rate (using 0.004 as the initial learning rate), we achieve a final best performance of $31.8\%$ AP with a $300 \times 300$ input size. When we further use the refined prediction procedure in [2], a $34.7\%$ AP performance is obtained. In addition, larger image size and better backbone help improve the performance. With VGG-16 and a $512 \times 512$ size, $36.1\%$ AP is obtained. Using ResNet-101 brings NETNet to a top performance, $38.2\%$ AP. + +# 5.2. Results on COCO Test Set + +We evaluate NETNet on the COCO test-dev set and compare it with previous state-of-the-art methods, as shown in Table 4. Our NETNet outperforms the baseline SSD significantly with only a slight extra time cost. With an input size of $300 \times 300$ and VGG-16, our NETNet obtains $32.0\%$ AP with 55.6 FPS, which outperforms other state-of-the + +![](images/4d8eb45737c18b81eae0a6ff044a90d9df8c0a8db90466d49bd0b24da34be36c.jpg) +Figure 5. Accuracy (mAP) vs. speed (ms) comparison. Methods in the top-left corner have better overall performance. + +art single-shot detectors with a similar configuration. Employing the refinement in [2] helps NETNet obtain a top performance $34.9\%$ AP. When testing with an image size of $512 \times 512$ , NETNet obtains $36.7\%$ (30.3 FPS) with VGG-16 and $38.5\%$ (27.0 FPS) with ResNet-101. Some anchor-free methods achieve better detection accuracy, but they are generally require more than $100\mathrm{ms}$ to process one image. As shown in Fig. 5, our method achieves an better trade-off for accurate detection while maintaining a fast speed. + +# 6. Discussion + +Different from previous pyramid methods, NET mechanism helps reconfigure the basic pyramid to be scale-aware features which are more suitable for scale-aware detection. In another side, because we need use shallow features to generate deep features by progressively convolution opera + +![](images/f19a10d222965daba0a41e004df74054fd4162c505f18394c9a585963b84cb7e.jpg) +(a) baseline + +![](images/76b45d3bdc376b59c6c5b500c0c70ded92ad46c396dc2d17fc78de594fd9cc16.jpg) +(b) ours + +![](images/5de8727df951faf9535ebfaabcc20fd8a620b372e6d25a25c30785c1c0663dea.jpg) +(c) baseline + +![](images/98d6222fd53a00e0b40229a06ef31364c1f53059315d7ffd7900df260177650a.jpg) +(d) ours +Figure 6. Detection results visualization. Our method can alleviate the part false positive problem as (b) and the small objects missing (false negative problem) as (d). + +tions in a network, using a direct hard supervision will force the large object regions in shallow layers of the backbone to be background and harm the feature learning of deep layers. NET works like a soft supervision by introducing a reversed feedback from high-level features for feature erasing, which will not harm the feature learning but enhance the information aggregation in the backbone pyramid. + +In addition, we carry out an error analysis to further demonstrate the effectiveness of our method for solving the false positive (FP) problem and false negative problem (FN, i.e., missing detection). For comparison, we use the detection results on the minival set by SSD and NETNet $(31.8\%)$ AP with VGG-16 and $300\times 300$ image size. + +Tackling FP problem. By treating the predicted box, which has a IoU $< 0.5$ with the ground truth as a FP sample, we conduct a statistical analysis for the FP problem. In total, there are about 20k less FP samples by our method than SSD as shown in Fig. 7(a), which demonstrates our method can alleviate this problem. We further analyze the part false positive (PFP) problem based on the PFP samples under different thresholds $\tau$ . The part rate $p_{\theta}$ is calculated as the ratio of intersection region (between one predicted FP box and the ground truth) over the area of the predicted box. If $p_{\theta} > \tau$ , the FP box is regarded as a PFP sample. As shown in Fig. 7(b), the x-axis denotes the thresholds and y-axis represents the ratio of PFP sample number over total predicted box number. Our method can reduce the PFP error. We visualize some results in Fig. 6 (a) and (b). + +Tackling FN problem. We show the error analysis plots of our baseline SSD and our NETNet in Fig. 8 for small objects. Each plot describes a Precision Recall (PR) curve obtained by eliminating the corresponding detection errors except 'C75' (i.e., $\mathrm{AP}_{75}$ ) and 'C50'(i.e., $\mathrm{AP}_{50}$ ). Thus, the area of each color can measure the corresponding errors. Overall, our method is more significant on small object detection (i.e., $39.8\%$ FN error by NETNet vs $60.8\%$ error by SSD). As shown in Fig. 6(d), our NETNet can detect small objects precisely, and alleviate the FN problem well. + +![](images/79ddf28a6c0718fb3d0ab01f579b5e0ab13076add87949e3517be2fd29c2bedd.jpg) +(a) False positive analysis + +![](images/8e7139a46a917d5ec1b7f7fb075301ef8412233b5ac0ad020dbee67e3f8d6d6a.jpg) +(b) Part false positive analysis +Figure 7. Error analysis for total false positive problem (a) and part false positive problem (b) on COCO minival. + +![](images/e763c07f8bf8ac6dd64a08c13ecda4c629e262af04a0177592989d72f4785a8c.jpg) +(a) SSD + +![](images/b4db613f8d10bda4eb7dd9a5fc46fd87949d8952919f26badb725213cea1fa3b.jpg) +(b) NETNet +Figure 8. Error analysis for (a) baseline SSD and (b) our NETNet on small objects. 'FN' represents the missing detection error (false negative). The overall false negative error can be measured by subtracting the AP value of BG from FN. The overall false negative error is $60.8\%$ for SSD and $39.8\%$ for NETNet. Lower is better. + +# 7. Conclusion + +In this paper, we have proposed a Neighbor Erasing and Transferring (NET) mechanism with feature reconfiguration for tackling complex scale variations in object detection. Scale-aware features are generated by erasing the features of larger objects from the shallow layers and transferring them into deep pyramid layers. We have constructed a single-shot network called NETNet by embedding NETM and NNFM to achieve fast and accurate scale-aware object detection. As demonstrated by experiments on the MS COCO dataset, our NETNet is able to solve the missing detection and part false positive problems effectively, leading to an improved trade-off for real-time and accurate detection. In future work, we consider to explore the advantages of NET on other detectors for scale-aware object detection. + +Acknowledgement This work was supported by the National Key R&D Program of China (Grant Nos. 2018AAA0102800 and 2018AAA0102802), National Natural Science Foundation of China (Grant No. 61632018, Grant Nos. 61906131), Postdoctoral Program for Innovative Talents (No. BX20180214), China Postdoctoral Science Foundation (No. 2018M641647). + +# References + +[1] Zhaowei Cai and Nuno Vasconcelos. Cascade R-CNN: delving into high quality object detection. In CVPR, 2018. 2 +[2] Jiale Cao, Yanwei Pang, Jungong Han, and Xuelong Li. Hierarchical shot detector. In ICCV, 2019. 7 +[3] Jiale Cao, Yanwei Pang, and Xuelong Li. Triply supervised decoder networks for joint detection and segmentation. In CVPR, 2019. 7 +[4] Shuhan Chen, Xiuli Tan, Ben Wang, and Xuelong Hu. Reverse attention for salient object detection. In ECCV, 2018. 3 +[5] Jifeng Dai, Yi Li, Kaiming He, and Jian Sun. R-FCN: object detection via region-based fully convolutional networks. In NeurIPS, 2016. 1, 2 +[6] Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable convolutional networks. In ICCV, 2017. 2 +[7] Xingping Dong and Jianbing Shen. Triplet loss in siamese network for object tracking. In ECCV, pages 472-488, 2018. 1 +[8] Kaiwen Duan, Song Bai, Lingxi Xie, Honggang Qi, Qingming Huang, and Qi Tian. Centernet: Keypoint triplets for object detection. In ICCV, 2019. 7 +[9] Deng-Ping Fan, Wenguan Wang, Ming-Ming Cheng, and Jianbing Shen. Shifting more attention to video salient object detection. In CVPR, 2019. 3 +[10] Cheng-Yang Fu, Wei Liu, Ananth Ranga, Ambrish Tyagi, and Alexander C. Berg. DSSD: Deconvolutional single shot detector. CoRR, abs/1701.06659, 2017. 2, 3, 5, 7 +[11] Jun Fu, Jing Liu, Hajie Tian, Yong Li, Yongjun Bao, Zhiwei Fang, and Hanqing Lu. Dual attention network for scene segmentation. In CVPR, 2019. 3, 4, 6 +[12] Golnaz Ghiasi, Tsung-Yi Lin, and Quoc V. Le. NAS-FPN: learning scalable feature pyramid architecture for object detection. In CVPR, 2019. 2 +[13] Ross B. Girshick. Fast R-CNN. In ICCV, 2015. 1, 2 +[14] Ross B. Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In CVPR, 2014. 2 +[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 5 +[16] Qibin Hou, Peng-Tao Jiang, Yunchao Wei, and Ming-Ming Cheng. Self-erasing network for integral object attention. In NeurIPS, 2018. 3 +[17] Borui Jiang, Ruixuan Luo, Jiayuan Mao, Tete Xiao, and Yun-ting Jiang. Acquisition of localization confidence for accurate object detection. In ECCV, 2018. 2 +[18] Nie Jing, Anwer Rao Muhammad, Cholakkal Hisham, Khan Fahad Shahbaz, Pang Yanwei, and Shao Ling. Enriched feature guided refinement network for object detection. In ICCV, 2019. 1 +[19] Seung-Wook Kim, Hyong-Keun Kook, Jee-Young Sun, Mun-Cheon Kang, and Sung-Jea Ko. Parallel feature pyramid network for object detection. In ECCV, 2018. 2, 5, 7 + +[20] Yonghyun Kim, Bong-Nam Kang, and Daijin Kim. SAN: learning relationship between convolutional features for multi-scale object detection. In ECCV, 2018. 1 +[21] Alexander Kirillov, Ross B. Girshick, Kaiming He, and Piotr Dollár. Panoptic feature pyramid networks. In CVPR, 2019. +[22] Tao Kong, Fuchun Sun, Wen-bing Huang, and Huaping Liu. Deep feature pyramid reconfiguration for object detection. In ECCV, 2018. 2, 7 +[23] Tao Kong, Fuchun Sun, Huaping Liu, Yuning Jiang, and Jianbo Shi. Consistent optimization for single-shot object detection. CoRR, abs/1901.06563, 2019. 2 +[24] Tao Kong, Fuchun Sun, Anbang Yao, Huaping Liu, Ming Lu, and Yurong Chen. RON: reverse connection with objectness prior networks for object detection. In CVPR, 2017. 1, 2 +[25] Tao Kong, Anbang Yao, Yurong Chen, and Fuchun Sun. Hypernet: Towards accurate region proposal generation and joint object detection. In CVPR, 2016. 2 +[26] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In NeurIPS, 2012. 1 +[27] Hei Law and Jia Deng. Cornernet: Detecting objects as paired keypoints. In ECCV, 2018. 1, 7 +[28] Yanghao Li, Yuntao Chen, Naiyan Wang, and Zhaoxiang Zhang. Scale-aware trident networks for object detection. In ICCV, 2019. 2 +[29] Zeming Li, Chao Peng, Gang Yu, Xiangyu Zhang, Yangdong Deng, and Jian Sun. Light-head R-CNN: in defense of two-stage object detector. CoRR, abs/1711.07264, 2017. 2 +[30] Tsung-Yi Lin, Piotr Dólár, Ross B. Girshick, Kaiming He, Bharath Hariharan, and Serge J. Belongie. Feature pyramid networks for object detection. In CVPR, 2017. 2, 3, 6 +[31] Tsung-Yi Lin, Priya Goyal, Ross B. Girshick, Kaiming He, and Piotr Dollar. Focal loss for dense object detection. In ICCV, 2017. 1, 2, 7 +[32] 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. 6 +[33] Songtao Liu, Di Huang, and Yunhong Wang. Receptive field block net for accurate and fast object detection. In ECCV, 2018. 2, 6, 7 +[34] Shu Liu, Lu Qi, Haifang Qin, Jianping Shi, and Jiaya Jia. Path aggregation network for instance segmentation. In CVPR, 2018. 4 +[35] 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, 2016. 1, 2, 3, 4, 5, 6, 7 +[36] Shuai Ma, Yanwei Pang, Jing Pan, and Ling Shao. Preserving details in semantics-aware context for scene parsing. Sci. China Inf. Sci., 2020. 1 +[37] Yanwei Pang, Yazhao Li, Jianbing Shen, and Ling Shao. Towards bridging semantic gap to improve semantic segmentation. In ICCV, 2019. 2 +[38] Yanwei Pang, Tiancai Wang, Rao Muhammad Anwer, Fahad Shahbaz Khan, and Ling Shao. Efficient featurized im + +age pyramid network for single shot detector. In CVPR, 2019.3,5,7 +[39] Joseph Redmon, Santosh Kumar Divvala, Ross B. Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In CVPR, 2016. 1, 2 +[40] Joseph Redmon and Ali Farhadi. Yolov3: An incremental improvement. CoRR, abs/1804.02767, 2018. 1 +[41] Shaoqing Ren, Kaiming He, Ross B. Girshick, and Jian Sun. Faster R-CNN: towards real-time object detection with region proposal networks. In NeurIPS, 2015. 2 +[42] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael S. Bernstein, Alexander C. Berg, and Fei-Fei Li. Imagenet large scale visual recognition challenge. IJCV, 2015. 6 +[43] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. 1 +[44] Bharat Singh and Larry S. Davis. An analysis of scale invariance in object detection. SNIP. In CVPR, 2018. 1 +[45] Bharat Singh, Mahyar Najibi, and Larry S. Davis. SNIPER: efficient multi-scale training. In NeurIPS, 2018. 1 +[46] Hongmei Song, Wenguan Wang, Sanyuan Zhao, Jianbing Shen, and Kin-Man Lam. Pyramid dilated deeper convlstm for video salient object detection. In ECCV, 2018. 2 +[47] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. Fcos: Fully convolutional one-stage object detection. In ICCV, 2019. 7 +[48] Wenguan Wang, Qiuxia Lai, Huazhu Fu, Jianbing Shen, and Haibin Ling. Salient object detection in the deep learning era: An in-depth survey. CoRR, abs/1904.09146, 2019. 2 +[49] Wenguan Wang and Jianbing Shen. Deep visual attention prediction. TIP, 2018. 3 +[50] Wenguan Wang, Jianbing Shen, Ming-Ming Cheng, and Ling Shao. An iterative and cooperative top-down and bottom-up inference network for salient object detection. In CVPR, 2019. 1 +[51] Wenguan Wang, Jianbing Shen, Xingping Dong, and Ali Borji. Salient object detection driven by fixation prediction. In CVPR, 2018. 2 +[52] Wenguan Wang, Shuyang Zhao, Jianbing Shen, Steven C. H. Hoi, and Ali Borji. Salient object detection with pyramid attention and salient edges. In CVPR, 2019. 3 +[53] Xiaolong Wang, Ross B. Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, 2018. 3, 4, 6 +[54] Yunchao Wei, Jiashi Feng, Xiaodan Liang, Ming-Ming Cheng, Yao Zhao, and Shuicheng Yan. Object region mining with adversarial erasing: A simple classification to semantic segmentation approach. In CVPR, 2017. 3 +[55] Sanghyun Woo, Jongchan Park, Joon-Young Lee, and In So Kweon. CBAM: convolutional block attention module. In ECCV, 2018. 4 +[56] Shifeng Zhang, Longyin Wen, Xiao Bian, Zhen Lei, and Stan Z. Li. Single-shot refinement neural network for object detection. In CVPR, 2018. 7 + +[57] Xiaolin Zhang, Yunchao Wei, Jiashi Feng, Yi Yang, and Thomas S. Huang. Adversarial complementary learning for weakly supervised object localization. In CVPR, 2018. 3 +[58] Zhijie Zhang and Yanwei Pang. Cgnet: cross-guidance network for semantic segmentation. Sci. China Inf. Sci., 2020. 1 +[59] Zhishuai Zhang, Siyuan Qiao, Cihang Xie, Wei Shen, Bo Wang, and Alan L. Yuille. Single-shot object detection with enriched semantics. In CVPR, 2018. 1, 2, 7 +[60] Qijie Zhao, Tao Sheng, Yongtao Wang, Zhi Tang, Ying Chen, Ling Cai, and Haibin Ling. M2det: A single-shot object detector based on multi-level feature pyramid network. In AAAI, 2019. 2 +[61] Peng Zhou, Bingbing Ni, Cong Geng, Jianguo Hu, and Yi Xu. Scale-transferrable object detection. In CVPR, 2018. 2, 7 +[62] Yousong Zhu, Chaoyang Zhao, Jinqiao Wang, Xu Zhao, Yi Wu, and Hanqing Lu. Couplenet: Coupling global structure with local parts for object detection. In ICCV, 2017. 4 \ No newline at end of file diff --git a/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/images.zip b/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..e8b3ecb71f6fdd93c8eebf6634cbbd2e1521d23e --- /dev/null +++ b/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8431083e3e7d9273e42cedb74559047f631a83fd5908405fc06859f70bf174cc +size 630352 diff --git a/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/layout.json b/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..7d6164b2f276742d0043ffdb8acf982e60331612 --- /dev/null +++ b/netnetneighborerasingandtransferringnetworkforbettersingleshotobjectdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bdd8d42224a6fdbf931dd4361d8f4c14093b0ef445d9bfde1422fd8f54447bd6 +size 546374 diff --git a/networkadjustmentchannelsearchguidedbyflopsutilizationratio/6c37793a-146b-44cc-9e0c-dde7f9bf95f8_content_list.json b/networkadjustmentchannelsearchguidedbyflopsutilizationratio/6c37793a-146b-44cc-9e0c-dde7f9bf95f8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..6aff110431a59a1991dc219ff8f067711ca3d681 --- /dev/null +++ b/networkadjustmentchannelsearchguidedbyflopsutilizationratio/6c37793a-146b-44cc-9e0c-dde7f9bf95f8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:676aa1790f13d7437337f0ae4e4aed716220691bce83e15893a21d644fb60f65 +size 76300 diff --git a/networkadjustmentchannelsearchguidedbyflopsutilizationratio/6c37793a-146b-44cc-9e0c-dde7f9bf95f8_model.json b/networkadjustmentchannelsearchguidedbyflopsutilizationratio/6c37793a-146b-44cc-9e0c-dde7f9bf95f8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..feaea5d77c1e5b49a1c2e6118228818d2d20b074 --- /dev/null +++ b/networkadjustmentchannelsearchguidedbyflopsutilizationratio/6c37793a-146b-44cc-9e0c-dde7f9bf95f8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7edfa20d7f0a23c8ec60aae337211e479d4b16806dfc27eac8f681035e13acd1 +size 93509 diff --git a/networkadjustmentchannelsearchguidedbyflopsutilizationratio/6c37793a-146b-44cc-9e0c-dde7f9bf95f8_origin.pdf b/networkadjustmentchannelsearchguidedbyflopsutilizationratio/6c37793a-146b-44cc-9e0c-dde7f9bf95f8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e55d8e23e4f418f0ec845427ecfc45cac9dadc7a --- /dev/null +++ b/networkadjustmentchannelsearchguidedbyflopsutilizationratio/6c37793a-146b-44cc-9e0c-dde7f9bf95f8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:04667a8c7ccb03fb0f18b34540e322f9e85572cf3c44e59231aaeee773ce16f8 +size 279400 diff --git a/networkadjustmentchannelsearchguidedbyflopsutilizationratio/full.md b/networkadjustmentchannelsearchguidedbyflopsutilizationratio/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a6786f14291fca2149c4f29b9e04002583dc925f --- /dev/null +++ b/networkadjustmentchannelsearchguidedbyflopsutilizationratio/full.md @@ -0,0 +1,288 @@ +# Network Adjustment: Channel Search Guided by FLOPs Utilization Ratio + +Zhengsu Chen $^{1}$ , Jianwei Niu $^{1}$ , Lingxi Xie $^{2}$ , Xuefeng Liu $^{1}$ , Longhui Wei $^{3}$ , Qi Tian $^{4}$ $^{1}$ Beihang University, $^{2}$ Johns Hopkins University, $^{3}$ Peking University, $^{4}$ Xidian University + +danczs@buaa.edu.cn, niujianwei@buaa.edu.cn, 198808xc@gmail.com, liu_xuefeng@buaa.edu.cn, longhuiwei@pku.edu.cn, wywqtian@gmail.com + +# Abstract + +Automatic designing computationally efficient neural networks has received much attention in recent years. Existing approaches either utilize network pruning or leverage the network architecture search methods. This paper presents a new framework named network adjustment, which considers network accuracy as a function of FLOPs, so that under each network configuration, one can estimate the FLOPs utilization ratio (FUR) for each layer and use it to determine whether to increase or decrease the number of channels on the layer. Note that FUR, like the gradient of a non-linear function, is accurate only in a small neighborhood of the current network. Hence, we design an iterative mechanism so that the initial network undergoes a number of steps, each of which has a small 'adjusting rate' to control the changes to the network. The computational overhead of the entire search process is reasonable, i.e., comparable to that of re-training the final model from scratch. Experiments on standard image classification datasets and a wide range of base networks demonstrate the effectiveness of our approach, which consistently outperforms the pruning counterpart. The code is available at https://github.com/danczs/NetworkAdjustment. + +# 1. Introduction + +In the deep learning era [24], as researchers designed more and more complicated neural networks [23, 35, 14, 19, 50] for various computer vision problems [8, 30], it becomes increasingly important to find efficient architectures that are friendly to real-world applications. The computational overhead of a deep neural network is closely related to its width, i.e., the number of channels on each layer of it. Beyond manually designed networks which have fixed configurations of width [14, 35, 38], researchers have also explored the direction of automatically determining the numbers of channels. Representative methods include network pruning [25, 28, 21] and channel search [40, 1], both of which obtained success in improving the computational + +efficiency (accuracy with respect to overhead) of the network. However, both of these two approaches have some limitations. Network pruning methods usually start with a wide network and try to reduce the channel number of each layer. These methods are mostly not sensitive to specific efficiency criteria (e.g., FLOPs) so that the computational resource is not always assigned to the places that need it most. On the other hand, the main drawbacks of the network search techniques are the computational complexity and search strategy which limit the search space and increase the search cost. + +In this paper, we propose a novel pipeline named network adjustment which starts with a pre-trained network, and simultaneously adds channels to some layers and subtracts channels from some others, with the criterion of the utilization ratio of resources at each layer. Network adjustment stands out from existing approaches in two aspects. First, we can estimate the state of each individual convolutional layer and optimize the channel numbers simultaneously. Therefore, our method is very efficient for channel search. Second, we search the channel configuration with an efficiency-aware strategy, by which we can find computationally efficient networks. The top-level design of our approach is an iterative process, in which each iteration involves training the given network, computing the utilization ratio on each layer, and adjusting the channel numbers accordingly. The computational overhead of the entire process is often comparable to that of training the initial network from scratch, yet we can observe gradual improvements of computational efficiency throughout iterations. + +As a particular example, we aim to optimize the FLOPs (floating point operations) of deep networks, and calculate the FLOPs utilization ratio (FUR) for this purpose. FUR is defined on each layer of a network, measuring the accuracy gain that can be obtained by increasing unit FLOPs on that layer. To compute it, we assume that network accuracy is a function of FLOPs and that FUR, like the gradient of a non-linear function, can be estimated with an acceptable error in a small neighborhood of each state. To mimic a small amount of FLOPs change, we propose a randomized + +approach which discards channels with a small drop probability (also named as SpatialDropout [41]) in each layer individually, and approximate FUR to be the ratio of accuracy drop over FLOPs drop, assuming that SpatialDropout removes the equivalent number (may be a floating point number) of channels. Note that FUR computation only involves network inference and thus executes efficiently. + +We evaluate network adjustment on the standard benchmark of designing efficient networks. On both the CIFAR100 and ImageNet datasets, our approach consistently improves the accuracy of a few popular network backbones, with the FLOPs barely changed. Compared with state-of-the-art structured pruning or channel search algorithms, network adjustment also enjoys advantages in terms of recognition accuracy under the same FLOPs. + +The remainder of this paper is organized as follows. Section 2 briefly reviews the previous literature, and Section 3 elaborates the network adjustment approach. Experiments are shown in Section 4 and conclusions are drawn in Section 5. + +# 2. Related Work + +The number of channels in each layer is an important factor in designing deep neural networks. Researchers started with empirical methods. A popular example is VG-GNet [35] which increases the channel number each time when the spatial resolution is reduced. This strategy was followed by a lot of work with either manual [46, 50, 38, 37] or automatic architecture designs [50, 33, 27, 32]. There also exist methods that increased the channel number gradually with the layer index, such as PyramidNet [11] and DenseNet [19]. To reduce the computational burden, researchers proposed a 'bottleneck' module [14] which reduces the number of channels before a costly computation and recovers it thereafter. Nevertheless, such work requires considerable manual efforts and the designed architectures were believed imperfect in many aspects. + +To explore a larger number of possibilities, the idea of neural architecture search (NAS) was introduced [50, 45], so that the number of channels at each layer is determined with an automatic algorithm guided by general heuristics, e.g., the computational efficiency of the network. A typical example is to optimize a RNN controller to control the strategy of sampling architectures from the large search space [40, 18]. However, the computational burden largely limits the search space of such methods. For acceleration, researchers had to reduce the number of candidates to be used in each layer [1], or trained a wide network beforehand and sampled channels from each layer to mimic the behavior of networks with different widths [10, 3, 36]. Both strategies introduced inaccuracy to the network, which leads to sub-optimal search results. The differentiable methods [27, 2, 47] have not been applied to channel search yet. + +Another line of research lies in channel pruning, which aims to speed up the network by removing a part of channels which contribute little to recognition [25, 28, 21]. The typical pipeline of pruning starts with a well-trained network, on which various criteria are used to measure the importance of a neuron [13, 12], a channel [25, 28], or a layer [44, 43]. After that, less important units are removed and the network gets fine-tuned [25]. Recently, researchers started rethinking the value or working mechanism of network pruning [29, 7], which led to novel designs of pruning approaches [48, 31]. + +# 3. Our Approach + +# 3.1. Problem + +Given a network $\mathbb{N}$ with $L$ convolutional layers, a channel configuration of $\mathbf{c} = (c_{1}, c_{2}, \dots, c_{L})$ , and a FLOPs function, FLOPs(c), the goal is to improve the network performance by adjusting the channel configuration with predefined FLOPs, $F_{0}$ : + +$$ +\mathbf {c} ^ {\star} = \underset {\mathbf {c}} {\arg \max } \operatorname {A c c} _ {\text {v a l}} (\mathbf {c}, \mathbf {W} ^ {\star}) \tag {1} +$$ + +$$ +\text {s . t .} \quad \operatorname {F L O P s} (\mathbf {c}) = F _ {0}, \quad \mathbf {W} ^ {\star} = \underset {\mathbf {W}} {\arg \max } \operatorname {A c c} _ {\operatorname {t r a i n}} (\mathbf {c}, \mathbf {W}) +$$ + +where $\mathbf{W}$ is the parameters of the network and $F_{0}$ is the FLOPs of the initial network. Acctrain and Accval denote the training and validation accuracy, respectively. + +The problem is the channel numbers $\mathbf{c}$ are discrete integers for a network and cannot be solved by optimization algorithms directly. To solve $\mathbf{c}$ like gradient based optimization algorithms, we, therefore, propose a method to estimate the gradients of them, which will be detailed in Section 3.3. The estimated gradients are also named as FLOPs utilization ratios or FLOPs utilization efficiency in this paper. The gradients of $\mathbf{c}$ are positive in general because most networks will benefit from increasing channels. To ensure $\mathrm{FLOPs}(\mathbf{c}) = F_0$ , we increase the channels in the layers with higher FURs and reduce the same amount of FLOPs from the layers with lower FURs. The channel adjustment will be executed iteratively like gradient based optimization algorithms until the FURs are similar in every layer. + +# 3.2. Pipeline: Network Adjustment + +Our method aims to search for more efficient channel configuration by considering the efficiency more accurately. During search, the channel numbers are adjusted iteratively. There are three steps within each iteration: network training, FUR estimation and channel adjustment as shown in Figure 1. First, we optimize the current network on the training set. This process starts from scratch, but the number of epochs can be significantly smaller than a regular, complete training process because we only need to determine the FLOPs utilization efficiency of each layer, which + +![](images/f45480a00e88b0020ef12a58b7bad237d77d5c08c1dbae473f7ed8c2e8ea655a.jpg) +Figure 1. The framework of our channel number search approach (best viewed in color). The leftmost shows the original network, which undergoes an iterative process. In each round, the current network is trained from scratch, after which we estimate the FUR of each layer (marked in different colors) by individually performing SpatialDropout [41] on each layer. A taller bar indicates a higher FUR. After that, we choose the layers (only 1 in this example) with the highest FUR and increase its width, and do the opposite thing for the layers with the lowest FUR. This iteration continues till convergence, or a pre-defined number of iterations has been arrived. + +does not necessarily mean that the network has arrived at a high accuracy. Second, we compute the FLOPs utilization ratio on each layer with the method described in the next part. This process only involves sampling-based inference on the validation set, and is thus relatively fast. Third and last, we use a pre-defined adjusting rate (similar to learning rate) to increase the numbers of channels of a few layers with top-ranked FURs, and decrease the numbers of a few layers with bottom-ranked FURs. The FLOPs of the entire network must remain close to the original amount after each iteration, if not, we use a scale function to slightly increase or decrease the channel numbers of all layers [9]. A typical search process involves a few (e.g., 10) iterations, or it can be terminated if the accuracy is saturated on the validation set. + +The pseudo code is summarized in Algorithm 1. The validation set is usually split from the original training set. The function 'Scale' scales the channel numbers to keep the FLOPs unchanged after adjustment. After search, the network with configuration $\mathbf{c}^*$ will be trained on the full training set and evaluated on the testing set. + +# - Difference from Prior Work + +Before continuing with the technical part, we elaborate the difference between our approach and two families of prior work. The difference between our method and network pruning mainly lies in two aspects. First, pruning methods mostly focus on finding the less important channels and evaluate it with absolute performance drop [48] or reconstruction loss [21]. In contrast, our method considers the channels in a layer as a whole and evaluates the layer with FUR. Second, our method adjusts the channel configuration finely and iteratively while most pruning methods obtain the pruned model from a pre-trained wide model di + +rectly. + +Our method is also different from channel search methods. Although many NAS systems update the channel numbers iteratively [50, 40], their methods usually need hundreds of GPU days to converge. That is because their search systems can only update channel numbers according to the network performance. In our method, we evaluate the FUR in each layer to guide the search process and the search system can converge after a few iterations (e.g., 10). Additionally, limited by memory and computational resource, most NAS systems only search configuration from a few channel number candidates. Our method, however, can learn the channel configuration with an increased degree of freedom. + +# 3.3. FLOPs Utilization Ratio + +Following the above, the FLOPs utilization ratio (FUR) of a layer is defined to be the contribution that a unit amount of FLOPs makes to the network accuracy, i.e., $\partial \mathrm{Acc}_{\mathrm{val}}(\mathbf{c},\mathbf{W}^{\star}) / \partial \mathrm{FLOPs}(\mathbf{c})$ . To compute this quantity, we make use of the channel numbers, $\mathbf{c}$ , as an intermediate variable, and compute two quantities. The first quantity is the gradient of $\mathrm{Acc}_{\mathrm{val}}(\mathbf{c},\mathbf{W}^{\star})$ with respect to $\mathbf{c}$ , denoted as $\partial \mathrm{Acc}_{\mathrm{val}}(\mathbf{c},\mathbf{W}^{\star}) / \partial \mathbf{c}$ . In particular, an element in this vector, $\partial \mathrm{Acc}_{\mathrm{val}}(\mathbf{c},\mathbf{W}^{\star}) / \partial c_l$ , indicates the contribution that a unit channel makes to the final accuracy. The second quantity involves FLOPs(c), and we use another vector, $\mathbf{f}$ , which shares the same dimensionality with $\mathbf{c}$ and each element, $f_{l}$ , denotes the FLOPs in the $l$ -th layer. We have FLOPs(c) = $\sum_{l=1}^{L} f_l + \text{const}$ , where the constant is often determined by the architecture topology. For a convolutional layer, $f_l$ is proportional to the spatial resolution, input and output channel numbers, and the convolutional kernel size of the $l$ -th layer. Similarly, computing $\partial \mathrm{FLOPs}(\mathbf{c}) / \partial c_l$ obtains the contribution that a unit channel makes to the re + +# Algorithm 1 Network Adjustment + +Input: training set $\mathcal{D}_{\mathrm{train}}$ , validation set $\mathcal{D}_{\mathrm{val}}$ , initial channel configuration $\mathbf{c}^{(1)}$ , adjusted layers $K$ , adjusting rate $r_{\mathrm{A}}$ , max iterations $T$ ; + +Output: adjusted channel configuration $\mathbf{c}^{\star}$ + +1: for $t = 1,2,\ldots ,T$ do + +2: Build a network $\mathbb{N}$ with $\mathbf{c}^{(t)}$ ; + +3: Train the network $\mathbb{N}$ on the training set $\mathcal{D}_{\mathrm{train}}$ + +4: Test the network $\mathbb{N}$ and obtain the accuracy $\mathrm{Acc}_{\mathrm{val}}^{(t)}$ on the validation set $\mathcal{D}_{\mathrm{val}}$ ; + +5: Compute the FUR for each layer of $\mathbb{N}$ on the validation set: $\mathbf{F}^{(t)} = (\mathrm{FUR}_1^{(t)},\mathrm{FUR}_2^{(t)},\dots,\mathrm{FUR}_L^{(t)})$ + +6: Sort the elements in $\mathbf{F}^{(t)}$ and obtain a top index set, $\mathcal{I}_{\mathrm{top}}^{(t)}$ , with $K$ largest elements in $\mathbf{F}^{(t)}$ , and a bottom set $\mathcal{I}_{\mathrm{hot}}^{(t)}$ , with $K$ smallest elements in $\mathbf{F}^{(t)}$ ; + +7: $\mathbf{c}^{t + 1} = \mathbf{c}^t$ + +8: for $i$ in $\mathcal{I}_{\mathrm{top}}^{(t)}$ do + +9: $c_{i}^{(t + 1)} = \mathrm{Round}(c_{i}^{(t)} + r_{\mathrm{A}}\cdot c_{i}^{(1)})$ + +10: end for + +11: for $i$ in $\mathcal{I}_{\mathrm{bot}}^{(t)}$ do + +12: $c_{i}^{(t + 1)} = \mathrm{Round}(c_{i}^{(t)} - r_{\mathrm{A}}\cdot c_{i}^{(1)})$ + +13: end for + +14: $\mathbf{c}^{(t + 1)} = \mathrm{Scale}(\mathbf{c}^{(t + 1)})$ ; + +15: end for + +16: $t^{\star} = \arg \max_{t}(\mathbf{A}\mathbf{c}\mathbf{c}_{\mathrm{val}}^{(t)})$ + +17: $\mathbf{c}^{\star} = \mathbf{c}^{(t^{\star})}$ + +Return: $\mathbf{c}^{\star}$ + +source usage. With these quantities, the FUR of the $l$ -th layer is defined as: + +$$ +\mathrm {F U R} _ {l} = \frac {\partial \operatorname {A c c} _ {\text {v a l}} (\mathbf {c} , \mathbf {W} ^ {\star})}{\partial \operatorname {F L O P s} (\mathbf {c})} = \frac {\partial \operatorname {A c c} _ {\text {v a l}} (\mathbf {c} , \mathbf {W} ^ {\star}) / \partial c _ {l}}{\partial \operatorname {F L O P s} (\mathbf {c}) / \partial c _ {l}} \tag {2} +$$ + +Here we have omitted the notation of the network topology, $\mathbb{N}$ , in all terms, for simplicity. + +In writing $\partial \mathrm{Acc}_{\mathrm{val}}(\mathbf{c},\mathbf{W}^{\star}) / \partial c_{l}$ and $\partial \mathrm{FLOPs}(\mathbf{c}) / \partial c_{l}$ , we assume that $c_{l}$ , the number of channels in each layer, can take continuous (non-integer) values. To mimic this behavior, we introduce a probabilistic mechanism which involves adding SpatialDropout [41] to each layer individually, and observing how the network accuracy is affected by this operation. SpatialDropout is proposed as a regularization method and randomly discards channels with a certain probability. To our best knowledge, it is the first time that SpatialDropout is used for channel evaluation. + +To reduce the systematic error in computing FUR, we discard the same FLOPs in every layer. In other words, the change of FLOPs is the same for all layers, by which we can rank the FURs with the accuracy drop directly. Since the data drop probability is continuous, we can simulate + +dropping fractional channels to guarantee that the discarded FLOPs in all layers are the same. + +# 3.4. Towards a Slightly Different Network + +FUR is like the gradient of network performance with respect to FLOPs and is very likely to be accurate only for the current network. Therefore, like the gradient based optimization method, we only slightly adjust the channel numbers in each iteration, so that FURs are still accurate enough. + +Specifically, we increase the channels of the top- $k$ -layers ranked by FURs and reduce the channels in the bottom- $k$ -layers. The hyperparameter $k$ will be deceased during search. The 'adjusting rate' is like the learning rate in gradient based optimization algorithms and is used to adjust the channels in an iteration. It should not be too big (We use 0.1 for most of our experiments). Big adjusting rates may make the search system unstable. + +When the channel configuration is updated, the FUR in each layer will change. To obtain new FUR of the new network, we will retrain the new networks from scratch. Since evaluating a trained network on the validation set is relatively fast, the most time-consuming step in our framework is training a network. In every searching iteration, a network should be trained. For tasks like training big models on ImageNet, this strategy becomes impractical. There are two methods that can tackle this problem: dataset sampling [45] and reducing the training epochs [40]. In our experiment, it is observed that reducing the training epochs has less effect on FUR estimation than dataset sampling. When training for much fewer epochs, the FUR ranking can still be revealed, even though the network performance is relatively low. Hence, we train our model on ImageNet for about ten percent of the full epochs. In this way, the time for search channel numbers on ImageNet is comparable to training a model on ImageNet. + +# 3.5. Implementation Details + +SpatialDropout and network training. As mentioned above, we evaluate the FUR by randomly discarding some channels (SpatialDropout). To make the evaluation reasonable, we should reduce unexpected changes (e.g. the change of data distribution) caused by discarding channels as much as possible, so that the test accuracy can reveal the real effect caused by channel change. Generally speaking, discarding some channels will not sharply degrade the network performance. The network accuracy usually decreases smoothly as the drop probability increases. In fact, even discarding whole layers in residual blocks will not disable a residual network [20, 42]. + +Moreover, we use some tricks to make the neural layers accustomed to data drop. Firstly, Spatial Dropout is used during network training. Since the network is trained with + +![](images/ba5ba720054f3c14de3b58839c8160c683e92868de4a2628c7057b5d1d740494.jpg) +Figure 2. The equivalent structure when utilizing zero padding. Padding zeros to the path with fewer channels is equivalent to introducing a new path to the residual block. + +SpatialDropout, it will not be sensitive to SpatialDropout during test. Secondly, the data distribution is balanced after SpatialDropout like standard Dropout. For example, if $10\%$ of the channels are discarded, the remaining channels will be scaled by $10/9$ . Finally, we reduce the disharmony between BN and data drop. There exists disharmony between BN and dropout [26]. It is demonstrated that Gaussian dropout and using dropout after BN can solve this problem [26]. + +Zero padding for neural layers. For single-path networks like VGGNets, the channel numbers in every layer can be set freely. For multi-path networks like ResNets, there are some constraints on setting channel numbers. Taking residual blocks as an example, since the output of convolutions should be added to the residual shortcut, the channel numbers of these two paths should be the same. To solve this problem, we simply pad zeros to the path with fewer channels. Zero padding not only enables us to set the channel numbers freely in multi-path networks but also introduces some network structure implicitly. As displayed in Figure 2, in residual blocks, padding zeros to shortcut is equivalent to add a convolution path between input and output [11]. Padding zeros to convolution output is equivalent to concatenate an extra shortcut to the output. Therefore, searching channel numbers for multi-path networks with zero padding is also searching the network structure implicitly. + +# 4. Experiments + +# 4.1. Results on CIFAR-100 + +We test our method on CIFAR-100, since the results on CIFAR-100 are more stable than those on CIFAR-10. CIFAR-100 is a publicly available dataset proposed by [22]. The dataset consists of $32 \times 32$ colored natural im + +Table 1. Accuracy $(\%)$ comparison on CIFAR-100 between our approach and other competitors. Here, 'D' indicates the network depth, 'FT' indicates that the searched network is only finetuned, not trained from scratch, and 'KD' is for knowledge distillation. The mark 'imp' indicates our own implementation. Legend: LCCL [5], SFP [15], FPGA [16], TAS [6]. + +
DMethodFTKDAcc (%)FLOPs (M)
20LCCL64.66 (-2.87)27.3
SFP64.37 (-3.25)24.3
FPGM66.86 (-0.76)24.3
TAS✓68.90 (+0.21)22.4
original (imp)69.5240.1
original 0.75×65.9022.7
searched 0.75×69.04 (-0.48)22.4
searched 0.75×✓70.03 (+0.51)22.4
32LCCL67.39 (-2.69)43.2
SFP68.37 (-1.40)40.3
FPGM68.52 (-1.25)40.3
TAS✓68.95 (-1.66)42.5
TAS69.70 (-0.91)42.5
TAS✓72.41 (+1.80)42.5
original (imp)72.5768.4
original 0.75×69.6838.5
searched 0.75×71.93 (-0.64)42.2
searched 0.75×✓73.82 (+1.25)42.2
110LCCL70.78 (-2.01)173
SFP✓71.28 (-2.86)121
FPGM✓72.55 (-1.59)121
TAS✓73.16 (-1.90)120
original (imp)75.68252
original 0.7×73.46119
searched 0.7×74.84 (-0.84)120
searched 0.7×✓75.96 (+0.28)120
+ +ages that fall in 100 classes. There are 50,000 images in the training set and 10,000 images in the testing set. We randomly sample 5,000 images from the training set as the validation set to search the channel numbers. Afterwards, we retrain the searched networks on the whole training set and release the results on the testing set. Data augmentation is conducted during training following the common practice [14, 49]. During search and test, the networks are trained for 200 epochs and SpatialDropout is used for convolutional layers. The learning rate is dropped from 0.15 to 1e-3 with cosine annealing. + +# Comparison to Network Pruning + +The results of our method and some pruning methods are shown in Table 1. To compare our method to the pruning methods, we first narrow down the original networks to a comparable FLOPs level and then search for channel configuration based on the thin networks. + +For network testing, the pruning models are usually + +Table 2. The accuracy (on CIFAR-100) and FLOPs of ResNet-20, throughout a complete iterative process of network adjustment. + +
iteration0 (original network)12345678910
accuracy (%)69.5270.1270.2470.3470.4870.9471.0971.5571.4771.3671.57
FLOPs (M)40.140.539.840.240.140.340.440.340.340.440.2
+ +![](images/d8f0c7088a984c468e31a0787d8667fa13d2198e42db76ee69304860e8948ac7.jpg) +Figure 3. The configuration of ResNet-20 before and after the entire network adjustment process (10 rounds) on CIFAR-100. Red and blue indicate increased and decreased channel numbers, respectively. + +initialized with the weights of the original model (finetuning), which is usually better than training from scratch. Some methods transfer the knowledge in original models by knowledge distillation [17], which usually can significantly improve the pruned networks. Since we aim to search for better channel configuration, our models are mainly evaluated by training from scratch. We also report the knowledge distillation results for a fair comparison. The methods in Table 1 have different baselines. Thus the main criterion is the accuracy drops of the pruning networks compared to their original networks. As can be seen, our searched models outperform most of the pruning methods on accuracy drop. For ResNet-32, although the TAS model with knowledge distillation performs better than our model, our search network outperforms the TAS model when trained from scratch, which demonstrates that our channel configuration is better. For ResNet-110, our searched model that is trained from scratch even performs better than the TAS model with knowledge distillation. + +# Diagnostic Studies + +Different iterations on CIFAR-100. The channel number search results of ResNet-20 on CIFAR-100 is shown in Table 2. As can be seen, the performance of the network is consistently improved in the first seven iterations. Afterwards, the performance gain becomes saturated. Since we have balanced the increase and decrease of FLOPs in different layers, the FLOPs of the network are almost unchanged. Note that the parameters of the networks are increased. It reveals that the network is exploring the unconstrained resources to improve its performance. A similar phenomenon is observed in [4]. We think the exchange of parameters and performance can be a new direction of designing networks. Because for most current devices, FLOPs rather than pa + +Table 3. The searched results for different networks. + +
NetworksmethodAccuracy (%)FLOPs (M)
ResNet-20original69.5240.1
searched71.57 (+2.05)40.2
ResNet-32original72.5768.4
searched74.14 (+1.57)68.2
ResNet-56original74.90125
searched76.15 (+1.25)126
ResNet-110original75.68252
searched76.98 (+1.30)254
ResNet-20 2.0×original75.60160
searched76.87 (+1.27)161
ResNet-20 4.0×original78.84642
searched79.51 (+0.67)641
Plain-20original65.6240.1
searched68.89 (+3.27)40.1
DenseNet-40original76.32282
searched76.95 (+0.63)282
PyramidNet-20original66.5840.4
searched71.53 (+4.95)40.1
+ +rameters are the bottleneck. + +The searched architecture. The searched channel configuration in ResNet-20 is different from the original network both at network-level and substructure-level. The structure of the original ResNet-20 and searched ResNet20 are shown in Figure 3. At network-level, more channels are assigned to the deep layers. It demonstrates that these layers are more efficient in FLOPs utilization. At substructure-level, as for the layers that closed to the in + +put, a more efficient residual block structure is found. In the first residual block, the output channel number of the first layer decreases from 16 to 6. Afterwards, the channel number is increased to 17 by the second convolutional layer. Although the output channel numbers of the block are slightly increased compared to the original block, the FLOPs of the residual block are sharply reduced. In this residual block, reducing the output of the first convolution will decrease the FLOPs of the two convolutional layers at the same time. Reducing the output of the second convolution may only decrease the FLOPs of the second layer, because the output will be added to the residual connection and the FLOPs of the following layer will not change if its channels are fewer than the residual connection. Our method is sensitive to FLOPs utilization and, thus, can find this 'compression-expansion' structure. The result also indicates that our method can not only reset the channel numbers at network-level but also find more efficient substructure in neural networks. + +Without FUR. We study FUR by searching ResNet-20 without it. It means that when evaluating channels, we randomly drop a fixed ratio of channels in each layer and rank the layers by the accuracy drops instead of FURs. Under this setting, the searched ResNet-20, which achieves $71.06\%$ , still outperforms the original network $(69.52\%)$ but performs worse than the network searched with FUR $(71.57\%)$ . At substructure-level, the fixed-ratio network can not learn the 'compression-expansion' structure shown in Figure 3, because it is not aware of the difference of FLOPs utilization between the two convolutional layers. + +Different initialization of channel numbers. To test the effect of the initialization channel numbers, we construct a 20 layer PyramidNet [11]. The channels of this network are linearly increased and the FLOPs are similar to ResNet-20. With the same FLOPs, ResNet-20 outperforms PyramidNet-20 by $2.94\%$ . From the perspective of FLOPs, PyramidNet-20 is a bad initialization of channel configuration for a 20 layer residual network. After channel search, the two searched networks achieve similar performance as shown in Table 3. It indicates that our method can overcome the bad initialization of channel numbers. + +Different depths, different widths, different architectures. We test our model on different width and depth ResNets. When increasing depth, our method still works well. ResNet-32, 56 and 110 outperform the original networks by over $1\%$ . For these deep networks, more FLOPs are assigned to the last several layers like ResNet-20. In ResNet-56 and 110, the 'compression-expansion' structure is learned not only in the first stage but also in the last network stage. ResNet-20 $2.0 \times$ and ResNet-20 $4.0 \times$ are networks widened from ResNet-20 by 2.0 and 4.0. These wide networks can also benefit from channel adjustment. + +Plain-20 is the non-residual version of ResNet-20. The + +searched result on Plain-20 outperforms the original network by $3.27\%$ . The searched channel configuration of DenseNet-40 is different from ResNet-20. More FLOPs are assigned to 28th-36th layers rather than the last several layers. It indicates that the FURs in these layers are higher than the others for the original DenseNet-40. + +Channel configuration transfer. To evaluate the generalization of the searched channel configuration, the searched configuration of ResNet-20 is transferred to ResNet-20 $2.0 \times$ by doubling the channels. The transferred model has the same FLOPs with ResNet-20 $2.0 \times$ and the accuracy is $76.34\%$ on CIFAR-100. Although the transferred model outperforms the original model, it performs worse than the directly searched model ( $76.87\%$ ). It indicates that there are biases when transferring channel configuration among networks with different widths. + +# 4.2. Results on ImageNet + +ILSVRC2012 is a subset of ImageNet database [34]. There are 1.3M, 50K and 150K images in training, validation and testing set. The images fall into 1K categories. We randomly sample 50K images from the training set as the searching validation set. Afterwards, we retrain the searched networks on the whole training set and release the results on the original validation set. The images are augmented with the method in [39]. On ImageNet, networks are trained for 10 epochs in each iteration and the channel number of the first convolutional layer is fixed during search. During the re-training process, ResNet-18 is trained on the full training set for 90 epochs. The learning rate is decayed from 0.1 to 0.001 with cosine annealing. MnasNet is trained for 500 epochs and the learning rate is dropped from 0.075 to 0.0001. + +First, we compare our results to those produced by network pruning. For ResNet-18, the searched model outperforms the original model by $0.91\%$ for top-1 accuracy as shown in Table 4. To compare our method to pruning approaches, we scale the channel numbers in ResNet-18 by a factor of 0.8 and search for channel configuration based on it. The top-1 accuracy of ResNet-18 $0.8 \times$ outperforms the other pruning approaches on accuracy drop and with knowledge distillation, our model performs much better. + +The original and searched ResNet-18 $0.8 \times$ are shown in Figure 4. As can be seen, the first stage also learned the 'compression-expansion' structure and more FLOPs are assigned to the last several layers. In addition, the downsampling layers in the networks are assigned more channels, indicating that the downsampling layers are different from other layers and should be specifically designed. We also show the FURs of some layers during the adjustment process in Figure 5, from which one can observe how the FURs differ from each other in the beginning and gradually become similar during the adjustment. + +Table 4. Top-1 accuracy (%) comparison on ImageNet between our approach and other competitors. Here, 'FT' indicates that the searched network is only fine-tuned, not trained from scratch, and 'KD' is for knowledge distillation. The mark 'imp' indicates our own implementation. Legend: LCCL [5], SFP [15], FPGM [16], TAS [6], AutoSlim [48]. + +
NetworksMethodFTKDTop-1 (%)Top-5 (%)FLOPs (M)Parameters(M)
ResNet-18LCCL66.33 (-3.65)86.94 (-2.29)1.19E3-
SFP67.10 (-3.18)87.78 (-1.85)1.06E3-
FPGM✓68.41 (-1.87)88.48 (-1.15)1.06E3-
TAS✓69.15 (-1.5)89.19 (-0.68)1.21E3-
original (imp)70.3189.451.81E311.7
searched71.22 (+0.91)90.07 (+0.62)1.81E318.5
searched 0.8×69.41 (-0.90)88.71 (-0.74)1.17E311.8
searched 0.8×✓71.00 (+0.69)90.05 (+0.60)1.17E311.8
MnasNetoriginal (imp)74.2191.833123.89
AutoSlim74.60 (+0.60)-3156.00
ours74.88 (+0.67)92.15 (+0.32)3124.96
+ +![](images/132d561b114ba8bed4816db95d0da3e7318d0b5cd3521960ff5e3d22ba298f2c.jpg) +Figure 4. The configuration of ResNet-18 $0.8 \times$ before and after the entire network adjustment process (10 rounds) on ImageNet. Red and blue indicate increased and decreased channel numbers, respectively. + +![](images/b091a93ce0496390a522b51209f29bf0638b157e45fd773b288c75c7f1b12e07.jpg) +Figure 5. FURs of convolutional layers in ResNet-18 $0.8 \times$ We sampled 8 out of 16 layers for better visualization. + +Second, we adjust beyond MnasNet [40], a searched network architecture based on MobileNetV2. By changing the channel configuration, we improve the network performance with the same FLOPs, as shown in Table 4. It indicates that our method can find the more efficient channel configuration compared to a NAS approach in a limited search space. Our method slightly outperforms AutoSlim with fewer parameters. Like ResNet-18 $0.8 \times$ , the searched MnasNet also assigns more FLOPs to the downsampling + +layers, which indicates that the current structure of down-sampling can be further improved. + +# 5. Conclusions + +This paper presents a new pipeline named network adjustment for designing efficient network architectures. Our approach is motivated by the idea of measuring how FLOPs are utilized in a pre-trained model, so that it is possible to adjust the number of network channels according to the efficiency of computational resource utilization. For this purpose, we consider network performance as a function of FLOPs and its 'gradient', FLOPs utilization ratio (FUR), can be estimated and utilized in a small neighborhood. Integrating all the above yields an iterative pipeline, which outperforms state-of-the-art network pruning methods in terms of recognition accuracy under the same amount of computation. Our research puts forward a new point that network accuracy and speed should be optimized jointly, for which network adjustment provides a preliminary solution. More efforts are required along this path. + +Acknowledgements This work was supported by the National Key R&D Program of China (2017YFB1301100), National Natural Science Foundation of China (61772060, U1536107, 61472024, 61572060, 61976012, 61602024), and the CERNET Innovation Project (NGII20160316). + +# References + +[1] Han Cai, Ligeng Zhu, and Song Han. Proxylessnas: Direct neural architecture search on target task and hardware. arXiv preprint arXiv:1812.00332, 2018. +[2] Xin Chen, Lingxi Xie, Jun Wu, and Qi Tian. Progressive differentiable architecture search: Bridging the depth gap between search and evaluation. arXiv preprint arXiv:1904.12760, 2019. +[3] Yukang Chen, Tong Yang, Xiangyu Zhang, Gaofeng Meng, Chunhong Pan, and Jian Sun. Detnas: Neural architecture search on object detection. arXiv preprint arXiv:1903.10979, 2019. +[4] Xiangxiang Chu, Bo Zhang, Ruijun Xu, and Jixiang Li. Fairnas: Rethinking evaluation fairness of weight sharing neural architecture search. arXiv preprint arXiv:1907.01845, 2019. +[5] Xuanyi Dong, Junshi Huang, Yi Yang, and Shuicheng Yan. More is less: A more complicated network with less inference complexity. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5840-5848, 2017. +[6] Xuanyi Dong and Yi Yang. Network pruning via transformable architecture search. arXiv preprint arXiv:1905.09717, 2019. +[7] Jonathan Frankle and Michael Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural networks. arXiv preprint arXiv:1803.03635, 2018. +[8] 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. +[9] 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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1586-1595, 2018. +[10] Zichao Guo, Xiangyu Zhang, Haoyuan Mu, Wen Heng, Zechun Liu, Yichen Wei, and Jian Sun. Single path oneshot neural architecture search with uniform sampling. arXiv preprint arXiv:1904.00420, 2019. +[11] Dongyoon Han, Jiwhan Kim, and Junmo Kim. Deep pyramidal residual networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5927-5935, 2017. +[12] 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. +[13] 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. +[14] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770-778, 2016. + +[15] Yang He, Guoliang Kang, Xuanyi Dong, Yanwei Fu, and Yi Yang. Soft filter pruning for accelerating deep convolutional neural networks. arXiv preprint arXiv:1808.06866, 2018. +[16] 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. +[17] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. +[18] 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 preprint arXiv:1905.02244, 2019. +[19] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, volume 1, page 3, 2017. +[20] Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q Weinberger. Deep networks with stochastic depth. In European Conference on Computer Vision, pages 646-661. Springer, 2016. +[21] 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. +[22] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 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] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. nature, 521(7553):436-444, 2015. +[25] Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. arXiv preprint arXiv:1608.08710, 2016. +[26] Xiang Li, Shuo Chen, Xiaolin Hu, and Jian Yang. Understanding the disharmony between dropout and batch normalization by variance shift. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2682-2690, 2019. +[27] Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. arXiv preprint arXiv:1806.09055, 2018. +[28] Zhuang Liu, Jianguo Li, Zhiqiang Shen, Gao Huang, Shoumeng Yan, and Changshui Zhang. Learning efficient convolutional networks through network slimming. In Proceedings of the IEEE International Conference on Computer Vision, pages 2736-2744, 2017. +[29] Zhuang Liu, Mingjie Sun, Tinghui Zhou, Gao Huang, and Trevor Darrell. Rethinking the value of network pruning. arXiv preprint arXiv:1810.05270, 2018. +[30] 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. + +[31] Sangkug Lym, Esha Choukse, Siavash Zangeneh, Wei Wen, Mattan Erez, and Sujay Shanghavi. Prunetrain: Gradual structured pruning from scratch for faster neural network training. arXiv preprint arXiv:1901.09290, 2019. +[32] Hieu Pham, Melody Y Guan, Barret Zoph, Quoc V Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. arXiv preprint arXiv:1802.03268, 2018. +[33] Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V Le. Regularized evolution for image classifier architecture search. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 4780-4789, 2019. +[34] 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. +[35] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. +[36] Dimitrios Stamoulis, Ruizhou Ding, Di Wang, Dimitrios Lymberopoulos, Bodhi Priyantha, Jie Liu, and Diana Marculescu. Single-path nas: Designing hardware-efficient convnets in less than 4 hours. arXiv preprint arXiv:1904.02877, 2019. +[37] Christian Szegedy, Sergey Ioffe, Vincent Vanhoucke, and Alex Alemi. Inception-v4, inception-resnet and the impact of residual connections on learning. arXiv preprint arXiv:1602.07261, 2016. +[38] 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. +[39] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2818-2826, 2016. +[40] Mingxing Tan, Bo Chen, Ruoming Pang, Vijay Vasudevan, Mark Sandler, Andrew Howard, and Quoc V Le. Mnasnet: Platform-aware neural architecture search for mobile. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2820-2828, 2019. +[41] Jonathan Tompson, Ross Goroshin, Arjun Jain, Yann LeCun, and Christoph Bregler. Efficient object localization using convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 648-656, 2015. +[42] Andreas Veit, Michael J Wilber, and Serge Belongie. Residual networks behave like ensembles of relatively shallow networks. In Advances in Neural Information Processing Systems, pages 550-558, 2016. +[43] Xin Wang, Fisher Yu, Zi-Yi Dou, Trevor Darrell, and Joseph E Gonzalez. Skipnet: Learning dynamic routing in convolutional networks. In Proceedings of the European Conference on Computer Vision (ECCV), pages 409-424, 2018. + +[44] 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. +[45] Bichen Wu, Xiaoliang Dai, Peizhao Zhang, Yanghan Wang, Fei Sun, Yiming Wu, Yuandong Tian, Peter Vajda, Yangqing Jia, and Kurt Keutzer. Fbnet: Hardware-aware efficient convnet design via differentiable neural architecture search. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 10734-10742, 2019. +[46] Saining Xie, Ross Girshick, Piotr Dólár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. arXiv preprint arXiv:1611.05431, 2016. +[47] Yuhui Xu, Lingxi Xie, Xiaopeng Zhang, Xin Chen, Guo-Jun Qi, Qi Tian, and Hongkai Xiong. Pc-darts: Partial channel connections for memory-efficient differentiable architecture search. arXiv preprint arXiv:1907.05737, 2019. +[48] Jiahui Yu and Thomas Huang. Network slimming by slimmable networks: Towards one-shot architecture search for channel numbers. arXiv preprint arXiv:1903.11728, 2019. +[49] Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016. +[50] Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. arXiv preprint arXiv:1707.07012, 2(6), 2017. \ No newline at end of file diff --git a/networkadjustmentchannelsearchguidedbyflopsutilizationratio/images.zip b/networkadjustmentchannelsearchguidedbyflopsutilizationratio/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..11f6880e6999b1d71c5db5c1b7450e706adb3631 --- /dev/null +++ b/networkadjustmentchannelsearchguidedbyflopsutilizationratio/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5fb7ea3d0f265a2ffaeb15d0918cd02744c6640accf96afcd6fc7f655f1218cf +size 480721 diff --git a/networkadjustmentchannelsearchguidedbyflopsutilizationratio/layout.json b/networkadjustmentchannelsearchguidedbyflopsutilizationratio/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e0400ac97b87966c9309350a0c0610a8cb3cb166 --- /dev/null +++ b/networkadjustmentchannelsearchguidedbyflopsutilizationratio/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7de7e69edd2c9bc7e8e98bb63c68b8e258af5e2a810c482bfaf97ebc7f5a628 +size 362867 diff --git a/neuralarchitecturesearchforlightweightnonlocalnetworks/82c25b12-a81d-4057-914b-8aa997760afc_content_list.json b/neuralarchitecturesearchforlightweightnonlocalnetworks/82c25b12-a81d-4057-914b-8aa997760afc_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..256bf75ebbcc6886bcf6bf4a496d16e47f4d697f --- /dev/null +++ b/neuralarchitecturesearchforlightweightnonlocalnetworks/82c25b12-a81d-4057-914b-8aa997760afc_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83b7d29c11c0652e806fe63f1bab2210d8068193bdfc757d204f292783c7cf83 +size 77863 diff --git a/neuralarchitecturesearchforlightweightnonlocalnetworks/82c25b12-a81d-4057-914b-8aa997760afc_model.json b/neuralarchitecturesearchforlightweightnonlocalnetworks/82c25b12-a81d-4057-914b-8aa997760afc_model.json new file mode 100644 index 0000000000000000000000000000000000000000..546e934ed996d85e73f07858489b602bb58933b2 --- /dev/null +++ b/neuralarchitecturesearchforlightweightnonlocalnetworks/82c25b12-a81d-4057-914b-8aa997760afc_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b2790a9e53474b9959e0357b35307eb7ada778bdff3d2832840fa281c0edf50 +size 95322 diff --git a/neuralarchitecturesearchforlightweightnonlocalnetworks/82c25b12-a81d-4057-914b-8aa997760afc_origin.pdf b/neuralarchitecturesearchforlightweightnonlocalnetworks/82c25b12-a81d-4057-914b-8aa997760afc_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2e0dfc5ce0884196319ca7e3c5438e4037e46d58 --- /dev/null +++ b/neuralarchitecturesearchforlightweightnonlocalnetworks/82c25b12-a81d-4057-914b-8aa997760afc_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ccf546a576b9306eae372dd3edbf3da13aa16f6d93b89d168525cb7dbbdd9ee6 +size 480144 diff --git a/neuralarchitecturesearchforlightweightnonlocalnetworks/full.md b/neuralarchitecturesearchforlightweightnonlocalnetworks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f2370958501cffa1a5a8840bdb52ccf6361020ed --- /dev/null +++ b/neuralarchitecturesearchforlightweightnonlocalnetworks/full.md @@ -0,0 +1,327 @@ +# Neural Architecture Search for Lightweight Non-Local Networks + +Yingwei Li $^{1*}$ Xiaojie Jin $^{2}$ Jieru Mei $^{1*}$ Xiaochen Lian $^{2}$ Linjie Yang $^{2}$ Cihang Xie $^{1}$ Qihang Yu $^{1}$ Yuyin Zhou $^{1}$ Song Bai $^{3}$ Alan Yuille $^{1}$ $^{1}$ Johns Hopkins University $^{2}$ ByteDance AI Lab $^{3}$ University of Oxford + +# Abstract + +Non-Local (NL) blocks have been widely studied in various vision tasks. However, it has been rarely explored to embed the NL blocks in mobile neural networks, mainly due to the following challenges: 1) NL blocks generally have heavy computation cost which makes it difficult to be applied in applications where computational resources are limited, and 2) it is an open problem to discover an optimal configuration to embed NL blocks into mobile neural networks. We propose AutoNL to overcome the above two obstacles. Firstly, we propose a Lightweight Non-Local (LightNL) block by squeezing the transformation operations and incorporating compact features. With the novel design choices, the proposed LightNL block is $400 \times$ computationally cheaper than its conventional counterpart without sacrificing the performance. Secondly, by relaxing the structure of the LightNL block to be differentiable during training, we propose an efficient neural architecture search algorithm to learn an optimal configuration of LightNL blocks in an end-to-end manner. Notably, using only 32 GPU hours, the searched AutoNL model achieves $77.7\%$ top-1 accuracy on ImageNet under a typical mobile setting (350M FLOPs), significantly outperforming previous mobile models including MobileNetV2 $(+5.7\%)$ , FBNet $(+2.8\%)$ and MnasNet $(+2.1\%)$ . Code and models are available at https://github.com/LiYingwei/AutoNL. + +# 1. Introduction + +Non-Local (NL) block [2, 39] aims to capture long-range dependencies in deep neural networks, which have been used in a variety of vision tasks such as video classification [39], object detection [39], semantic segmentation [39, 46], image classification [2], and adversarial robustness [41]. Despite the remarkable progress, the general utilization of non-local modules under resource-constrained scenarios such as mobile devices remains underexplored. This may be due to the following two factors. + +![](images/40fab3da737430c62425e5e37ba37b99db9c3975c89e667d78b871735fa88c5d.jpg) +Figure 1. ImageNet Accuracy vs. Computation Cost. Details can be found in Table 3. + +First, NL blocks compute the response at each position by attending to all other positions and computing a weighted average of the features in all positions, which incurs a large computation burden. Several efforts have been explored to reduce the computation overhead. For instance, [7, 22] use associative law to reduce the memory and computation cost of matrix multiplication; Yue et al. [44] use Taylor expansion to optimize the non-local module; Cao et al. [4] compute the affinity matrix via a convolutional layer; Bello et al. [2] design a novel attention-augmented convolution. However, these methods either still lead to relatively large computation overhead (via using heavy operators, such as large matrix multiplications) or result in a less accurate outcome (e.g., simplified NL blocks [4]), making these methods undesirable for mobile-level vision systems. + +Second, NL blocks are usually implemented as individual modules which can be plugged into a few manually selected layers (usually relatively deep layers). While it is intractable to densely embed it into a deep network due to the high computational complexity, it remains unclear where to insert those modules economically. Existing methods have not fully exploited the capacity of NL blocks in relational modeling under mobile settings. + +Taking the two factors aforementioned into account, we aim to answer the following questions in this work: is it pos- + +sible to develop an efficient NL block for mobile networks? What is the optimal configuration to embed those modules into mobile neural networks? We propose AutoNL to address these two questions. First, we design a Lightweight Non-Local (LightNL) block, which is the first work to apply non-local techniques to mobile networks to our best knowledge. We achieve this with two critical design choices 1) lighten the transformation operators (e.g., $1 \times 1$ convolutions) and 2) utilize compact features. As a result, the proposed LightNL blocks are usually $400 \times$ computationally cheaper than conventional NL blocks [39], which is favorable to be applied to mobile deep learning systems. Second, we propose a novel neural architecture search algorithm. Specifically, we relax the structure of LightNL blocks to be differentiable so that our search algorithm can simultaneously determine the compactness of the features and the locations for LightNL blocks during the end-to-end training. We also reuse intermediate search results by acquiring various affinity matrices in one shot to reduce the redundant computation cost, which speeds up the search process. + +Our proposed searching algorithm is fast and delivers high-performance lightweight models. As shown in Figure 1, our searched small AutoNL model achieves $76.5\%$ ImageNet top-1 accuracy with 267M FLOPs, which is faster than MobileNetV3 [16] with comparable performance (76.6% top-1 accuracy with 356M FLOPs). Also, our searched large AutoNL model achieves $77.7\%$ ImageNet top-1 accuracy with 353M FLOPs, which has similar computation cost as MobileNetV3 but improves the top-1 accuracy by $1.1\%$ . + +To summarize, our contributions are three-fold: (1) We design a lightweight and search compatible NL block for visual recognition models on mobile devices and resource-constrained platforms; (2) We propose an efficient neural architecture search algorithm to automatically learn an optimal configuration of the proposed LightNL blocks; 3) Our model achieves state-of-the-art performance on the ImageNet classification task under mobile settings. + +# 2. Related Work + +Attention mechanism. The attention mechanism has been successfully applied to neural language processing in recent years [1, 36, 11]. Wang et al. [39] bridge attention mechanism and non-local operator, and use it to model long-range relationships in computer vision applications. Attention mechanisms can be applied along two orthogonal directions: channel attention and spatial attention. Channel attention [18, 37, 27] aims to model the relationships between different channels with different semantic concepts. By focusing on a part of the channels of the input feature and deactivating non-related concepts, the models can focus on the concepts of interest. Due to its simplicity and effectiveness [18], it is widely used in neural architecture + +search [33, 35, 16, 9]. + +Our work explores in both directions of spatial/channel attention. Although existing works [7, 44, 4, 2, 38] exploit various techniques to improve efficiency, they are still too computationally heavy under mobile settings. To alleviate this problem, we design a lightweight spatial attention module with low computational cost and it can be easily integrated into mobile neural networks. + +Efficient mobile architectures. There are a lot of handcrafted neural network architectures [19, 42, 17, 30, 45, 25] for mobile applications. Among them, the family of MobileNet [17, 30] and the family of ShuffleNet [45, 25] stand out due to their superior efficiency and performance. MobileNetV2 [30] proposes the inverted residual block to improve both efficiency and performance over MobileNetV1 [17]. ShuffleNet [25] proposes to use efficient shuffle operations along with group convolutions to design efficient networks. Above methods are usually subject to trial-and-errors by experts in the model design process. + +Neural Architecture Search. Recently, it has received much attention to use neural architecture search (NAS) to design efficient network architectures for various applications [34, 13, 23, 43, 21]. A critical part of NAS is to design proper search spaces. Guided by a meta-controller, early NAS methods either use reinforcement learning [49] or evolution algorithm [29] to discover better architectures. These methods are computationally inefficient, requiring thousands of GPU days to search. ENAS [28] shares parameters across sampled architectures to reduce the search cost. DARTS [24] proposes a continuous relaxation of the architecture parameters and conducts one-shot search and evaluation. These methods all adopt a NASNet [49] like search space. Recently, more expert knowledge in handcrafting network architectures are introduced in NAS. Using MobileNetV2 basic blocks in search space [3, 40, 33, 35, 31, 14, 26] significantly improves the performance of searched architectures. [3, 14] reduce the GPU memory consumption by executing only part of the super-net in each forward pass during training. [26] proposes an ensemble perspective of the basic block and simultaneously searches and trains the target architecture in the fine-grained search space. [31] proposes a super-kernel representation to incorporate all architectural hyper-parameters (e.g., kernel sizes, expansion rations in MobileNetV2 blocks) in a unified search framework to reuse model parameters and computations. In our proposed searching algorithm, we focus on seeking an optimal configuration of LightNL blocks in low-cost neural networks which brought significant performance gains. + +# 3. AutoNL + +In this section, we present AutoNL: we first elaborate on how to design a Lightweight Non-Local (LightNL) block in + +![](images/69df4bc171cb9dd092bcb4b6b41ba393aeac712cb4e19c8a87eb3ca67812b6f5.jpg) +(a) + +![](images/3bfd1c7ed80f18be72ee5bf8c0124ece31a9df140bc0324acc6729435a52924a.jpg) +(b) +Figure 2. Original NL vs. LightNL Block. (a) A typical architecture of the NL block contains several heavy operators, such as $1 \times 1$ convolution ops and large matrix multiplications. (b) The proposed LightNL block contains much more lightweight operators, such as depthwise convolution ops and small matrix multiplications. + +Section 3.1; then we introduce a novel neural architecture search algorithm in Section 3.2 to automatically search for an optimal configuration of LightNL blocks. + +# 3.1. Lightweight Non-Local Blocks + +In this section, we first revisit the NL blocks, then we introduce our proposed Lightweight Non-Local (LightNL) block in detail. + +Revisit NL blocks. The core component in the NL blocks is the non-local operation. Following [39], a generic non-local operation can be formulated as + +$$ +\mathrm {y} _ {i} = \frac {1}{\mathcal {C} (\mathrm {x})} \sum_ {\forall j} f \left(\mathrm {x} _ {i}, \mathrm {x} _ {j}\right) g \left(\mathrm {x} _ {j}\right), \tag {1} +$$ + +where $i$ indexes the position of input feature $\mathbf{x}$ whose response is to be computed, $j$ enumerates all possible positions in $\mathbf{x}$ , $f(\mathrm{x}_i,\mathrm{x}_j)$ outputs the affinity matrix between $\mathrm{x}_i$ and its context features $\mathrm{x}_j$ , $g(\mathrm{x}_j)$ computes an embedding of the input feature at the position $j$ , and $C(\mathbf{x})$ is the normalization term. Following [39], the non-local operation in Eqn. (1) is wrapped into a NL block with a residual connection from the input feature $\mathbf{x}$ . The mathematical formulation is given as + +$$ +z _ {i} = W _ {z} y _ {i} + x _ {i}, \tag {2} +$$ + +where $W_{z}$ denotes a learnable feature transformation. + +Instantiation. Dot product is used as the function form of $f(x_{i},x_{j})$ due to its simplicity in computing the correlation between features. Eqn. (1) thus becomes + +$$ +\mathrm {y} = \frac {1}{\mathcal {C} (\mathrm {x})} \theta (\mathrm {x}) \theta (\mathrm {x}) ^ {\mathrm {T}} g (\mathrm {x}). \tag {3} +$$ + +Here the shape of $\mathbf{x}$ is denoted as $(H, W, C)$ where $H$ , $W$ and $C$ are the height, width and number of channels, respectively. $\theta(\cdot)$ and $g(\cdot)$ are $1 \times 1$ convolutional layers with $C$ filters. Before matrix multiplications, the outputs of $1 \times 1$ convolution are reshaped to $(H \times W, C)$ . + +Levi et al. [22] discover that for NL blocks instantiated in the form of Eqn. (3), employing the associative law of + +matrix multiplication can largely reduce the computation overhead. Based on the associative rules, Eqn. (3) can be written in two equivalent forms: + +$$ +\mathrm {y} = \frac {1}{\mathcal {C} (\mathrm {x})} \left(\theta (\mathrm {x}) \theta (\mathrm {x}) ^ {\mathrm {T}}\right) g (\mathrm {x}) = \frac {1}{\mathcal {C} (\mathrm {x})} \theta (\mathrm {x}) \left(\theta (\mathrm {x}) ^ {\mathrm {T}} g (\mathrm {x})\right). \tag {4} +$$ + +Although the two forms produce the same numerical results, they have different computational complexity [22]. Therefore in computing Eqn. (3), one can always choose the form with smaller computation cost for better efficiency. + +Design principles. The following part introduces two key principles to reduce the computation cost of Eqn. (3). + +Design principle 1: Share and lighten the feature transformations. Instead of using two different transformations $(\theta$ and $g)$ on the same input feature $\mathbf{x}$ in Eqn. (3), we use a shared transformation in the non-local operation. In this way, the computation cost of Eqn. (3) is significantly reduced by reusing the result of $g(\mathrm{x})$ in computing the affinity matrix. The simplified non-local operation is + +$$ +\mathrm {y} = \frac {1}{\mathcal {C} (\mathrm {x})} g (\mathrm {x}) g (\mathrm {x}) ^ {\mathrm {T}} g (\mathrm {x}). \tag {5} +$$ + +The input feature $\mathbf{x}$ (output of hidden layer) can be seen as the transformation of input data $\mathbf{x}_0$ through a feature transformer $F(\cdot)$ . Therefore Eqn. (5) can be written as + +$$ +\mathrm {y} = \frac {1}{\mathcal {C} (F (\mathrm {x} _ {0}))} g (F (\mathrm {x} _ {0})) g (F (\mathrm {x} _ {0})) ^ {\mathrm {T}} g (F (\mathrm {x} _ {0})). \tag {6} +$$ + +In the scenario of using NL blocks in neural networks, $F(\cdot)$ is represented by a parameterized deep neural network. In contrast, $g(\cdot)$ is a single convolution operation. To further simplify Eqn. (6), we integrate the learning process of $g(\cdot)$ into that of $F(\cdot)$ . Taking advantage of the strong capability of deep neural networks on approximating functions [15], we remove $g(\cdot)$ and Eqn. (6) is simplified as + +$$ +\mathrm {y} = \frac {1}{\mathcal {C} (\mathrm {x})} \mathrm {x x} ^ {\mathrm {T}} \mathrm {x}. \tag {7} +$$ + +At last, we introduce our method to simplify " $W_{z}$ ", another heavy transformation function in Eqn. (2). Recent works [39] instantiate it as a $1\times 1$ convolutional layer. To further reduce the computation cost of NL blocks, we propose to replace the $1\times 1$ convolution with a $3\times 3$ depthwise convolution [17] since the latter is more efficient. Eqn. (2) is then modified to be + +$$ +z = \operatorname {D e p t h w i s e C o n v} (y, W _ {d}) + x, \tag {8} +$$ + +where $W_{d}$ denotes the depthwise convolution kernel. + +Design principle 2: Use compact features for computing affinity matrices. Since x is a high-dimensional feature, directly performing matrix multiplication using the full-sized x per Eqn. (7) leads to large computation overhead. To solve this problem, we propose to downsample x first to obtain a more compact feature which replaces x in Eqn. (7). Since x is a three-dimensional feature with depth (channels), width and height, we propose to downsample x along either channel dimension, spatial dimension or both dimensions to obtain compact features $\mathrm{x_c}$ , $\mathrm{x_s}$ and $\mathrm{x_{sc}}$ respectively. Consequently, the computation cost of Eqn. (7) is reduced. + +Therefore, based on Eqn. (7), we can simply apply the compact features $\{\mathrm{x_c},\mathrm{x_{sc}},\mathrm{x_s}\}$ in the NL block to compute $\mathrm{x_cX_{sc}^T}$ and $\mathrm{x_{sc}^T}\mathrm{x_s}$ as + +$$ +y = \frac {1}{\mathcal {C} (\mathrm {x})} \mathrm {x} _ {c} \mathrm {x} _ {s c} ^ {\mathrm {T}} \mathrm {x} _ {s}. \tag {9} +$$ + +Note that there is a trade-off between the computation cost and the representation capacity of the output (i.e., y) of the non-local operation: using more compact features (with a lower downsampling ratio) reduces the computation cost but the output fails to capture the informative context information in those discarded features; on the other hand, using denser features (with a higher downsampling ratio) helps the output capture richer contexts, but it is more computationally demanding. Manually setting the downsampling ratios requires trial-and-errors. To solve this issue, we propose a novel neural network architecture search (NAS) method in Section 3.2 to efficiently search for the configuration of NL blocks that achieve descent performance under specific resource constraints. + +Before introduce our NAS method, let's briefly summarize the advantages of the proposed LightNL blocks. Thanks to the aforementioned two design principles, our proposed LightNL block is empirically demonstrated to be much more efficient (refer to Section 4) than the conventional NL block [39], making it favorable to be deployed in mobile devices with limited computational budgets. In addition, since the computational complexity of the blocks can be easily adjusted by the downsampling ratios, the proposed LightNL blocks can provide better support on deep learning models at different scales. We illustrate the struc- + +![](images/5720f2aad63d880087af3239e3987ce42920bcd9b2d30c84dd98cdb92496ed63.jpg) +Figure 3. MobileNetV2 vs. MobileNetV2 + LightNL. The proposed LightNL block improves the baseline by $1.6\%$ in ImageNet top-1 accuracy and $2.3\%$ in PASCAL VOC 2012 mIoU. + +ture of the conventional NL block and that of the proposed block in Figure 2. + +# 3.2. Neural Architecture Search for LightNL + +To validate the efficacy and generalization of the proposed LightNL block for deep networks, we perform a proof test by applying it to every MobileNetV2 block. As shown in Figure 3, such a simple way of using the proposed LightNL blocks can already significantly boost the performance on both image classification and semantic segmentation. This observation motivates us to search for a better configuration of the proposed LightNL blocks in neural networks to fully utilize its representation learning capacity. As can be seen in Section 3.1, except for the insert locations in a neural network, the downsampling scheme that controls the complexity of the LightNL blocks is another important factor to be determined. We note that both insert locations and downsampling schedule of LightNL blocks are critical to the performance and computational cost of models. To automate the process of model design and find an optimal configuration of the proposed LightNL blocks, we propose an efficient Neural Architecture Search (NAS) method. Concretely, we propose to jointly search the configurations of LightNL blocks and the basic neural network architectural parameters (e.g., kernel size, number of channels) using a cost-aware loss function. + +Insert location. Motivated by [31], we select several candidate locations for inserting LightNL blocks throughout the network and decide whether a LightNL block should be used by comparing the $L_{2}$ norm of the depthwise convolution kernel $W_{d}$ to a trainable latent variable $t$ : + +$$ +\hat {W} _ {d} = \mathbb {1} \left(\left\| W _ {d} \right\| ^ {2} > t\right) \cdot W _ {d}, \tag {10} +$$ + +where $\hat{W}_d$ replaces $W_d$ to be used in Eqn. (8), and $\mathbb{1}(\cdot)$ is an indicator function. $\mathbb{1}(\cdot) = 1$ indicates that a LightNL block will be used with $\hat{W}_d = W_d$ being the depthwise convolution kernel. Otherwise, $\hat{W}_d = 0$ when $\mathbb{1}(\cdot) = 0$ and thus Eqn. (8) is degenerated to $z = x$ meaning no lightweight non-local block will be inserted. + +![](images/5a6c70e0a94fb716dd2ca6cbefdf52e8703d373ed6eda93ba3f99d479bc04624.jpg) +Figure 4. Illustrate the feature reuse paradigm along channel dimension. + +Instead of manually selecting the value of threshold $t$ , we set it to be a trainable parameter, which is jointly optimized with other parameters via gradient decent. To compute the gradient of $t$ , we relax the indicator function $I(x,t) = \mathbb{1}(x > t)$ to a differentiable sigmoid function $\sigma(\cdot)$ during the back-propagation process. + +Module compactness. As can be seen from Eqn. (7), the computational cost of LightNL block when performing the matrix multiplication is determined by the compactness of downsampled features. Given a search space $R$ which contains $n$ candidate downsampling ratios, i.e., $R = \{r_1, r_2, r_3, \dots, r_n\}$ where $0 \leq r_1 < r_2 < r_3 < \dots < r_n \leq 1$ , our goal is to search for an optimal downsampling ratio $r^*$ for each LightNL block. For the sake of clarity, here we use the case of searching down sampling ratios along the channel dimension to illustrate our method. Note that searching down sampling ratios along other dimensions can be performed in the same manner. + +Different from searching for the insert locations through Eqn. (10), we encode the choice of downsampling ratios in the process of computing affinity matrix: + +$$ +\begin{array}{l} \mathrm {x} _ {\text {a t t}} = \mathbb {1} (r _ {1}) \cdot \mathrm {x} _ {\mathrm {r} _ {1}} \mathrm {x} _ {\mathrm {r} _ {1}} ^ {\mathrm {T}} + \mathbb {1} (r _ {2}) \cdot \mathrm {x} _ {\mathrm {r} _ {2}} \mathrm {x} _ {\mathrm {r} _ {2}} ^ {\mathrm {T}} + \dots \tag {11} \\ + \mathbb {1} (r _ {n - 1}) \cdot \mathrm {x} _ {\mathrm {r} _ {n - 1}} \mathrm {x} _ {\mathrm {r} _ {n - 1}} ^ {\mathrm {T}} + \mathbb {1} (r _ {n}) \cdot \mathrm {x} _ {\mathrm {r} _ {n}} \mathrm {x} _ {\mathrm {r} _ {n}} ^ {\mathrm {T}}, \\ \end{array} +$$ + +where $\mathbf{x}_{\mathrm{att}}$ denotes the computed affinity matrix, $\mathbf{x}_r$ denotes the downsampled feature with downsampling ratio $r$ , and $\mathbb{1}(r)$ is an indicator which holds true when $r$ is selected. By setting the constraint that only one downsampling ratio is used, Eqn. (11) can be simplified as $\mathbf{x}_{\mathrm{att}} = \mathbf{x}_{\mathrm{ri}}\mathbf{x}_{\mathrm{ri}}^{\mathrm{T}}$ when $r_i$ is selected as the downsampling ratio. + +A critical step is how to formulate the condition of $\mathbb{1}(\cdot)$ for deciding which downsampling ratio to use. A reasonable intuition is that the criteria should be able to determine whether the downsampled feature can be used to compute an accurate affinity matrix. Thus, our goal is to define a "similarity" signal that models whether the affinity matrix from the downsampled feature is close to the "ground-truth" affinity matrix, denotes as $\mathrm{x_{gt}x_{gt}^T}$ . Specifically, we write the indicator as + +$$ +\begin{array}{l} \mathbb {1} \left(r _ {1}\right) = \mathbb {1} \left(\left\| \mathrm {x} _ {\mathrm {r} _ {1}} \mathrm {x} _ {\mathrm {r} _ {1}} ^ {\mathrm {T}} - \mathrm {x} _ {\mathrm {r} _ {\mathrm {g t}}} \mathrm {x} _ {\mathrm {g t}} ^ {\mathrm {T}} \right\| ^ {2} < t\right), \\ \mathbb {1} \left(r _ {2}\right) = \mathbb {1} \left(\left\| \mathrm {x} _ {\mathrm {r} _ {2}} \mathrm {x} _ {\mathrm {r} _ {2}} ^ {\mathrm {T}} - \mathrm {x} _ {\mathrm {g t}} \mathrm {x} _ {\mathrm {g t}} ^ {\mathrm {T}} \right\| ^ {2} < t\right) \wedge \neg \mathbb {1} \left(r _ {1}\right), \\ \dots \tag {12} \\ \end{array} +$$ + +$$ +\begin{array}{l} \mathbb {1} \left(r _ {n}\right) = \mathbb {1} \left(\left\| x _ {r _ {n}} x _ {r _ {n}} ^ {T} - x _ {g t} x _ {g t} ^ {T} \right\| ^ {2} < t\right) \\ \wedge \neg \mathbb {1} (r _ {1}) \wedge \neg \mathbb {1} (r _ {2}) \wedge \dots \wedge \neg \mathbb {1} (r _ {n - 1}), \\ \end{array} +$$ + +where $\wedge$ denotes the logical operator AND. An intuitive explanation to the rational of Eqn. (12) is the algorithm always selects the smallest $r$ with which the Euclidean distance between $\mathrm{x_r x_r}^T$ and $\mathrm{x_{gt}x_{gt}}^T$ is lower than threshold $t$ . To ensure $\mathbb{1}(r_n) = 1$ when all other indicators are zeros, we set $\mathrm{x_{gt} = x_{r_n}}$ so that $\mathbb{1}\left(\| \mathrm{x_{r_n}x_{r_n}^T - \mathrm{x_{gt}x_{gt}^T}\|^2 < t\right)\equiv 1$ . Meanwhile, we relax the indicator function to sigmoid when computing gradients and update the threshold $t$ via gradient descent. Since the output of indicator changes with different input feature $\mathbf{X}$ , for better training convergence, we get inspired from batch normalization [20] and use the exponential moving average of affinity matrices in computing Eqn. (12). After the searching stage, the downsampling ratio is determined by evaluating the following indicators: + +$$ +\begin{array}{l} \mathbb {1} \left(r _ {1}\right) = \mathbb {1} \left(\operatorname {E M A} \left(\left\| \mathrm {x} _ {\mathrm {r} _ {1}} \mathrm {x} _ {\mathrm {r} _ {1}} ^ {\mathrm {T}} - \mathrm {x} _ {\mathrm {r} _ {\mathrm {g} t}} \mathrm {x} _ {\mathrm {g} t} ^ {\mathrm {T}} \right\| ^ {2}\right) < t\right), \\ \dots \tag {13} \\ \end{array} +$$ + +$$ +\begin{array}{l} \mathbb {1} \left(r _ {n}\right) = \mathbb {1} \left(\operatorname {E M A} \left(\left\| \mathrm {x} _ {\mathrm {r} _ {n}} \mathrm {x} _ {\mathrm {r} _ {n}} ^ {\mathrm {T}} - \mathrm {x} _ {\mathrm {g t}} \mathrm {x} _ {\mathrm {g t}} ^ {\mathrm {T}} \right\| ^ {2}\right) < t\right) \\ \wedge \neg \mathbb {1} (r _ {1}) \wedge \neg \mathbb {1} (r _ {2}) \wedge \dots \wedge \neg \mathbb {1} (r _ {n - 1}). \\ \end{array} +$$ + +where $\mathrm{EMA(x)}$ denotes the exponential moving averaged value of $x$ . + +From Eqn. (12), one can observe that the output of indicator depends on indicators with smaller downsampling ratio. Based on this finding, we propose to reuse the affinity matrix computed with low-dimensional features (generated with lower downsampling ratios) when computing affinity matrix with high-dimensional features (generated with higher downsampling ratios). Concretely, $\mathbf{x}_{\mathrm{r_i}}$ can be partitioned into $[\mathbf{x}_{\mathrm{r_{i - 1}}},\mathbf{x}_{\mathrm{r_i}\backslash \mathrm{r_{i - 1}}}],i > 1.$ The calculation of affinity matrix using $\mathbf{x}_{\mathrm{r_i}}$ can be decomposed as + +$$ +\begin{array}{l} \mathrm {x} _ {\mathrm {r} _ {\mathrm {i}}} \mathrm {x} _ {\mathrm {r} _ {\mathrm {i}}} ^ {\mathrm {T}} = \left[ \begin{array}{l l} \mathrm {x} _ {\mathrm {r} _ {\mathrm {i} - 1}} & \mathrm {x} _ {\mathrm {r} _ {\mathrm {i}} \backslash \mathrm {r} _ {\mathrm {i} - 1}} \end{array} \right] \left[ \begin{array}{l} \mathrm {x} _ {\mathrm {r} _ {\mathrm {i} - 1}} ^ {\mathrm {T}} \\ \mathrm {x} _ {\mathrm {r} _ {\mathrm {i}} \backslash \mathrm {r} _ {\mathrm {i} - 1}} ^ {\mathrm {T}} \end{array} \right] \tag {14} \\ = \mathrm {x} _ {\mathrm {r} _ {\mathrm {i} - 1}} \mathrm {x} _ {\mathrm {r} _ {\mathrm {i} - 1}} ^ {\mathrm {T}} + \mathrm {x} _ {\mathrm {r} _ {\mathrm {i}} \backslash \mathrm {r} _ {\mathrm {i} - 1}} \mathrm {x} _ {\mathrm {r} _ {\mathrm {i}} \backslash \mathrm {r} _ {\mathrm {i} - 1}} ^ {\mathrm {T}}, \\ \end{array} +$$ + +where $\mathbf{x}_{\mathrm{r_i - 1}}\mathbf{x}_{\mathrm{r_i - 1}}^{\mathrm{T}}$ is the reusable affinity matrix computed with a smaller downsampling ratio (recall that $r_{i - 1} < r_i$ ). This feature reusing paradigm can largely reduce the search overhead since computing affinity matrices with more choices of downsampling ratios does not incur any additional computation cost. The process of feature reusing is illustrated in Figure 4. + +Searching process. We integrate our proposed search algorithm with Single-path NAS [31] and jointly search basic + +architectural parameters (following MNASNet [33]) along with the insert locations and downsampling schemes of LightNL blocks. We search downsampling ratios along both spatial and channel dimensions to achieve better compactness. To learn efficient deep learning models, the overall objective function is to minimize both standard classification loss and the model's computation complexity which is related to both the insert locations and the compactness of LightNL blocks: + +$$ +\min \mathcal {L} (\mathbf {w}, \mathbf {t}) = C E (\mathbf {w}, \mathbf {t}) + \lambda \cdot \log (C C (\mathbf {w}, \mathbf {t})), \tag {15} +$$ + +where $\mathbf{w}$ denotes model weights and $\mathbf{t}$ denotes architectural parameters which can be grouped in two categories: one is from LightNL block including the insert positions and downsampling ratios while the other follows MNas-Net [33] including kernel size, number of channels, etc. $CE(\cdot)$ is the cross-entropy loss and $CC(\cdot)$ is the computation (i.e., FLOPs) cost. We use gradient descent to optimize the above objective function in an end-to-end manner. + +# 4. Experiments + +We first demonstrate the efficacy and efficiency of LightNL by manually inserting it into lightweight models in Section 4.1. Then we apply the proposed search algorithm to the LightNL blocks in Section 4.2. The evaluation and comparison with state-of-the-art methods are done on ImageNet classification [10]. + +# 4.1. Manually Designed LightNL Networks + +Models. Our experiments are based on MobileNetV2 1.0 [30]. We insert LightNL blocks after the second $1 \times 1$ point-wise convolution layer in every MobileNetV2 block. We use $25\%$ channels to compute the affinity matrix for the sake of low computation cost. Also, if the feature map is larger than $14 \times 14$ , we downsample it along the spatial axis with a stride of 2. We call the transformed model MobileNetV2-LightNL for short. We compare the two models with different depth multipliers, including 0.5, 0.75, 1.0 and 1.4. + +Training setup. Following the training schedule in MNasNet [33], we train the models using the synchronous training setup on 32 Tesla-V100-SXM2-16GB GPUs. We use an initial learning rate of 0.016, and a batch size of 4096 (128 images per GPU). The learning rate linearly increases to 0.256 in the first 5 epochs and then is decayed by 0.97 every 2.4 epochs. We use a dropout of 0.2, a weight decay of $1\mathrm{e} - 5$ and Inception image preprocessing [32] of size $224 \times 224$ . Finally, we use exponential moving average on model weights with a momentum of 0.9999. All batch normalization layers use a momentum of 0.99. + +ImageNet classification results. We compare the results between the original MobileNetV2 and MobileNetV2- + +![](images/38f4a5b147581a9719aa8a81c22be94e7c6db34461817858a1a83fd52ffb7841.jpg) +Figure 5. MobileNetV2 vs. MobileNetV2-LightNL. We apply LightNL blocks to MobileNetV2 with different depth multipliers, i.e., 0.5, 0.75, 1.0, 1.4, from left to right respectively. Despite inserting LightNL blocks manually, consistent performance gains can be observed for different MobileNetV2 base models. + +
Non-local ModuleFLOPs / ΔFLOPsAcc (%)
OperatorWrapper
--301M73.4
Wang et al. [39]Wang et al.+6.2G75.2
Levi et al. [22][39]+146M75.2
Zhu et al. [48]+107M-
Eqn. (3)+119M75.2
Eqn. (5)Wang et al.+93M75.1
Eqn. (7)[39]+66M75.0
Eqn. (9)+38M75.0
Eqn. (9)Eqn. (8)+15M75.0
+ +Table 1. Ablation Analysis. We present the comparison of different NL blocks and different variants in our design. The base model is MobileNetV2, which achieves a top-1 accuracy of 73.4 with 301M FLOPs. + +
MethodFLOPs (M)mIoU
MobileNetV230170.6
MobileNetV2-LightNL (ours)31672.9
+ +Table 2. Comparison of FLOPs and mIoU on PASCAL VOC 2012. + +LightNL in Figure 5. We observe consistent performance gain even without tuning the hyper-parameters of LightNL blocks for models with different depth multipliers. For example, when the depth multiplier is 1, the original MobileNetV2 model achieves a top-1 accuracy of $73.4\%$ with 301M FLOPs, while our MobileNetV2-LightNL achieves $75.0\%$ with 316M FLOPs. According to Figure 5, it is unlikely to boost the performance of the MobileNetV2 model to the comparable performance by simply increasing the width to get a 316M FLOPs model. When the depth multiplier is 0.5, LightNL blocks bring a performance gain of $2.2\%$ with a marginal increase in FLOPs (6M). + +Ablation study. To diagnose the proposed LightNL block, we present a step-by-step ablation study in Table 1. As shown in the table, every modification preserves the model performance but reduces the computation cost. By comparing with the baseline model, the proposed LightNL block + +![](images/43cdfeeeff79ce710fc5734d06fe33ffbe669f8f2bed3edb131f476c9976b672.jpg) +Figure 6. Class Activation Map (CAM) [47] for MobileNetV2 and MobileNetV2-LightNL. The three columns correspond to the ground truth, predictions by MobileNetV2 and predictions by MobileNetV2-LightNL respectively. The proposed LightNL block helps the model attend to image regions with more class-specific discriminative features. + +improves ImageNet top-1 accuracy by $1.6\%$ (from $73.4\%$ to $75.0\%$ ), but only increases 15M FLOPs, which is only $5\%$ of the total FLOPs on MobileNetV2. Comparing with the standard NL block, the proposed LightNL block is about $400 \times$ computationally cheaper (6.2G vs. 15M) with comparable performance ( $75.2\%$ vs. $75.0\%$ ). Comparing with Levi et al. [22] which optimized the matrix multiplication with the associative law, the proposed LightNL block is still $10 \times$ computationally cheaper. Compared with a very recent work proposed by Zhu et al. [48] which leverages the pyramid pooling to reduce the complexity, LightNL is around $7 \times$ computationally cheaper. + +CAM visualization. In order to illustrate the efficacy of our LightNL, Figure 6 compares the class activation map [47] for the original MobileNetV2 and MobileNetV2-LightNL. We see that LightNL is capable of helping the model to focus on more relevant regions while it is much computationally cheaper than the conventional counterparts as analyzed above. For example, at the middle top of Figure 6, the model without the LightNL blocks focus on only a part of the sewing machine. When LightNL is applied, the model can "see" the whole machine, leading to more accurate and robust predictions. + +PASCAL VOC segmentation results. To demonstrate the generalization ability of our method, we compare the performance of MobileNetV2 and MobileNetV2-LightNL on the PASCAL VOC 2012 semantic segmentation dataset [12]. Following Chen et al. [8], we use the classification model as a drop-in replacement for the backbone feature extractor in the Deeplabv3 [6]. It is cascaded by an Atrous Spatial Pyramid Pooling module (ASPP) [5] with three $3 \times 3$ convolutions with different atrous rates. The modified architectures share the same computation costs as the backbone models due to the low computation cost of LightNL blocks. All models are initialized with ImageNet pre-trained weights and then fine-tuned with the same train- + +
Model#ParamsFlopsTop-1Top-5
MobileNetV2 [30]3.4M300M72.091.0
MBV2 (our impl.)3.4M301M73.491.4
ShuffleNetV2 [25]3.5M299M72.6-
FBNet-A [40]4.3M249M73.0-
Proxyless [3]4.1M320M74.692.2
MnasNet-A1 [33]3.9M312M75.292.5
MnasNet-A24.8M340M75.692.7
AA-MnasNet-A1 [2]4.1M350M75.792.6
MobileNetV3-L5.4M217M75.2-
MixNet-S [35]4.1M256M75.892.8
AutoNL-S (ours)4.4M267M76.593.1
FBNet-C [40]5.5M375M74.9-
Proxyless (GPU) [3]-465M75.192.5
SinglePath [31]4.4M334M75.092.2
SinglePath (our impl.)4.4M334M74.792.2
FairNAS-A [9]4.6M388M75.392.4
EfficientNet-B0 [34]5.3M388M76.393.2
SCARLET-A [9]6.7M365M76.993.4
MBV3-L (1.25x) [16]7.5M356M76.6-
MixNet-M [35]5.0M360M77.093.3
AutoNL-L (ours)5.6M353M77.793.7
+ +Table 3. Comparison with the state-of-the-art models on ImageNet 2012 Val set. + +ing protocol in [5]. It should be emphasized here that the focus of this part is to assess the efficacy of the proposed LightNL while keeping other factors fixed. It is notable that we do not adopt complex training techniques such as multiscale and left-right flipped inputs, which may lead to better performance. The results are shown in Table 2, LightNL blocks bring a performance gain of 2.3 in mIoU with a minor increase in FLOPs. The results indicate the proposed LightNL blocks are well suitable for other tasks such as semantic segmentation. + +# 4.2.AutoNL + +We apply the proposed neural architecture search algorithm to search for an optimal configuration of LightNL blocks. Specifically, we have five LightNL candidates for + +![](images/e22c4284a9ac222b29611d008a2b7d06ffc8110cda0cb50b3d2c02dcd8483325.jpg) +Figure 7. The searched architecture of AutoNL-L. C and S denote channel downsampling ratio and the stride of spatial downsampling respectively. We use different colors to denote the kernel size (K) of the depthwise convolution and use height to denote the expansion rate (E) of the block. We use the round corner to denote adding SE [18] to the MobileNetV2 block. + +each potential insert location, i.e., sampling $25\%$ or $12.5\%$ channels to compute affinity matrix, sampling along spatial dimensions with stride 1 or 2, inserting a LightNL block at the current position or not. Note that it is easy to enlarge the search space by including other LightNL blocks with more hyper-parameters. In addition, similar to recent work [33, 40, 3, 31], we also search for optimal kernel sizes, optimal expansion ratios and optimal SE ratios with MobileNetV2 block [30] as the building block. + +We directly search on the ImageNet training set and use a computation cost loss and the cross-entropy loss as guidance, both of which are differentiable thanks to the relaxations of the indicator functions during the backpropagation process. It takes 8 epochs (about 32 GPU hours) for the search process to converge. + +Performance on classification. We obtain two models using the proposed neural architecture search algorithm; we denote the large one as AutoNL-L and the small one as AutoNL-S in Table 3. The architecture of AutoNL-L is presented in Figure 7. + +Table 3 shows that AutoNL outperforms all the latest mobile CNNs. Comparing to the handcrafted models, AutoNL-S improves the top-1 accuracy by $4.5\%$ over MobileNetV2 [30] and $3.9\%$ over ShuffleNetV2 [25] while saving about $10\%$ FLOPs. Besides, AutoNL achieves better results than the latest models from NAS approaches. For example, compared to EfficientNet-B0, AutoNL-L improves the top-1 accuracy by $1.4\%$ while saving about $10\%$ FLOPs. Our models also achieve better performance than the latest MobileNetV3 [16], which is developed with several manual optimizations in addition to architecture search. + +AutoNL-L also surpasses the state-of-the-art NL method (i.e., AA-MnasNet-A1) by $2\%$ with comparable FLOPs. Even AutoNL-S improves accuracy by $0.8\%$ while saving $25\%$ FLOPs. We also compare with MixNet, which is a very recent state-of-the-art model under mobile settings, both AutoNL-L and AutoNL-S achieve $0.7\%$ improvement with comparable FLOPs but with much less search time (32 GPU hours vs. 91,000 GPU hours [40], $2,800 \times$ faster). + +We also search for models under different combinations + +![](images/9f23eb9073f6279085008c3f11dfd1d8648e61022e0a7e6fe7f530c4ab7d6ea0.jpg) +Figure 8. Performance comparison on different input resolutions and depth multipliers under extremely low FLOPs. For MobileNetV2 [30], FBNet [40] and our searched models, the tuples of (input resolution, depth multiplier) are (96,0.35), (128,0.5), (192,0.5) and (128,1.0) respectively from left to right. For MNasNet [33], we show the result of 128 input resolution with 1.0 depth multiplier. + +of input resolutions and channel sizes under extremely low FLOPs. The results are summarized in Figure 8. AutoNL achieves consistent improvement over MobileNetV2, FBNet, and MNasNet. For example, when the input resolution is 192 and the depth multiplier is 0.5, our model achieves $69.6\%$ accuracy, outperforming MobileNetV2 by $5.7\%$ and FBNet by $3.7\%$ . + +# 5. Conclusion + +As an important building block for various vision applications, NL blocks under mobile settings remain underexplored due to their heavy computation overhead. To our best knowledge, AutoNL is the first method to explore the usage of NL blocks for general mobile networks. Specifically, we design a LightNL block to enable highly efficient context modeling in mobile settings. We then propose a neural architecture search algorithm to optimize the configuration of LightNL blocks. Our method significantly outperforms prior arts with $77.7\%$ top-1 accuracy on ImageNet under a typical mobile setting (350M FLOPs). + +Acknowledgements This work was partially supported by ONR N00014-15-1-2356. + +# References + +[1] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In ICLR, 2015. 2 +[2] Irwan Bello, Barret Zoph, Ashish Vaswani, Jonathon Shlens, and Quoc V Le. Attention augmented convolutional networks. arXiv preprint arXiv:1904.09925, 2019. 1, 2, 7 +[3] Han Cai, Ligeng Zhu, and Song Han. Proxylessnas: Direct neural architecture search on target task and hardware. In ICLR, 2019. 2, 7, 8 +[4] Yue Cao, Jiarui Xu, Stephen Lin, Fangyun Wei, and Han Hu. Gcnet: Non-local networks meet squeeze-excitation networks and beyond. arXiv preprint arXiv:1904.11492, 2019. 1, 2 +[5] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. TPAMI, 40(4):834-848, 2017. 7 +[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] Yunpeng Chen, Yannis Kalantidis, Jianshu Li, Shuicheng Yan, and Jiashi Feng. A^2-nets: Double attention networks. In NeurIPS, pages 352-361, 2018. 1, 2 +[8] Yukang Chen, Gaofeng Meng, Qian Zhang, Shiming Xiang, Chang Huang, Lisen Mu, and Xinggang Wang. Renas: Reinforced evolutionary neural architecture search. In CVPR, pages 4787-4796, 2019. 7 +[9] Xiangxiang Chu, Bo Zhang, Jixiang Li, Qingyuan Li, and Ruijun Xu. Scarletnas: Bridging the gap between scalability and fairness in neural architecture search. CoRR, abs/1908.06022, 2019. 2, 7 +[10] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. 6 +[11] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: pre-training of deep bidirectional transformers for language understanding. In NAACL, pages 4171–4186, 2019. 2 +[12] Mark Everingham, SM Ali Eslami, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The Pascal visual object classes challenge: A retrospective. IJCV, 111(1):98-136, 2015. 7 +[13] Golnaz Ghiasi, Tsung-Yi Lin, and Quoc V Le. Nas-fpn: Learning scalable feature pyramid architecture for object detection. In CVPR, pages 7036-7045, 2019. 2 +[14] Zichao Guo, Xiangyu Zhang, Haoyuan Mu, Wen Heng, Zechun Liu, Yichen Wei, and Jian Sun. Single path one-shot neural architecture search with uniform sampling. CoRR, abs/1904.00420, 2019. 2 +[15] Kurt Hornik, Maxwell Stinchcombe, and Halbert White. Multilayer feedforward networks are universal approximators. Neural networks, 2(5):359-366, 1989. 3 +[16] 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 preprint arXiv:1905.02244, 2019. 2, 7, 8 +[17] Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andretto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017. 2, 4 +[18] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In CVPR, pages 7132-7141, 2018. 2, 8 +[19] Gao Huang, Shichen Liu, Laurens van der Maaten, and Kilian Q Weinberger. Condensenet: An efficient densenet using learned group convolutions. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 2 +[20] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. 5 +[21] Qing Jin, Linjie Yang, and Zhenyu Liao. Adabits: Neural network quantization with adaptive bit-widths. arXiv preprint arXiv:1912.09666, 2019. 2 +[22] Hila Levi and Shimon Ullman. Efficient coarse-to-fine nonlocal module for the detection of small objects. arXiv preprint arXiv:1811.12152, 2018. 1, 3, 6, 7 +[23] 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, pages 82–92, 2019. 2 +[24] Hanxiao Liu, Karen Simonyan, and Yiming Yang. DARTS: Differentiable architecture search. In ICLR, 2019. 2 +[25] Ningning Ma, Xiangyu Zhang, Hai-Tao Zheng, and Jian Sun. Shufflenet v2: Practical guidelines for efficient cnn architecture design. In ECCV, 2018. 2, 7, 8 +[26] Jieru Mei, Yingwei Li, Xiaochen Lian, Xiaojie Jin, Linjie Yang, Alan Yuille, and Jianchao Yang. Atomnas: Fine-grained end-to-end neural architecture search. In ICLR, 2020. 2 +[27] Jongchan Park, Sanghyun Woo, Joon-Young Lee, and In So Kweon. BAM: bottleneck attention module. In BMVC, page 147, 2018. 2 +[28] Hieu Pham, Melody Y. Guan, Barret Zoph, Quoc V. Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. In ICML, pages 4092-4101, 2018. 2 +[29] Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V. Le. Regularized evolution for image classifier architecture search. In AAAI 2019, pages 4780-4789, 2019. 2 +[30] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zh-moginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In CVPR, 2018. 2, 6, 7, 8 +[31] Dimitrios Stamoulis, Ruizhou Ding, Di Wang, Dimitrios Lymberopoulos, Bodhi Priyantha, Jie Liu, and Diana Marculescu. Single-path nas: Designing hardware-efficient convnets in less than 4 hours. arXiv preprint arXiv:1904.02877, 2019. 2, 4, 5, 7, 8 +[32] Christian Szegedy, Sergey Ioffe, Vincent Vanhoucke, and Alexander A Alemi. Inception-v4, inception-resnet and the impact of residual connections on learning. In AAAI, 2017. 6 + +[33] Mingxing Tan, Bo Chen, Ruoming Pang, Vijay Vasudevan, Mark Sandler, Andrew Howard, and Quoc V Le. Mnasnet: Platform-aware neural architecture search for mobile. In CVPR, 2019. 2, 6, 7, 8 +[34] Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In ICML, pages 6105-6114, 2019. 2, 7 +[35] Mingxing Tan and Quoc V Le. Mixnet: Mixed depthwise convolutional kernels. In BMVC, 2019. 2, 7 +[36] 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. 2 +[37] Fei Wang, Mengqing Jiang, Chen Qian, Shuo Yang, Cheng Li, Honggang Zhang, Xiaogang Wang, and Xiaou Tang. Residual attention network for image classification. In CVPR, pages 6450-6458, 2017. 2 +[38] Huiyu Wang, Yukun Zhu, Bradley Green, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. Axial-deeplab: Standalone axial-attention for panoptic segmentation. arXiv preprint arXiv:2003.07853, 2020. 2 +[39] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, pages 7794-7803, 2018. 1, 2, 3, 4, 6 +[40] Bichen Wu, Xiaoliang Dai, Peizhao Zhang, Yanghan Wang, Fei Sun, Yiming Wu, Yuandong Tian, Peter Vajda, Yangqing Jia, and Kurt Keutzer. Fbnet: Hardware-aware efficient convnet design via differentiable neural architecture search. In CVPR, pages 10734–10742, 2019. 2, 7, 8 +[41] Cihang Xie, Yuxin Wu, Laurens van der Maaten, Alan L Yuille, and Kaiming He. Feature denoising for improving adversarial robustness. In CVPR, 2019. 1 +[42] Guotian Xie, Jingdong Wang, Ting Zhang, Jianhuang Lai, Richang Hong, and Guo-Jun Qi. IGCV2: interleaved structured sparse convolutional neural networks. In CVPR, 2018. 2 +[43] Qihang Yu, Dong Yang, Holger Roth, Yutong Bai, Yixiao Zhang, Alan L Yuille, and Daguang Xu. C2fnas: Coarse-to-fine neural architecture search for 3d medical image segmentation. In CVPR, 2020. 2 +[44] Kaiyu Yue, Ming Sun, Yuchen Yuan, Feng Zhou, Errui Ding, and Fuxin Xu. Compact generalized non-local network. In NeurIPS, pages 6510-6519, 2018. 1, 2 +[45] Xiangyu Zhang, Xinyu Zhou, Mengxiao Lin, and Jian Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6848-6856, 2018. 2 +[46] Hengshuang Zhao, Yi Zhang, Shu Liu, Jianping Shi, Chen Change Loy, Dahua Lin, and Jiaya Jia. Psanet: Point-wise spatial attention network for scene parsing. In ECCV, pages 267-283, 2018. 1 +[47] Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Learning deep features for discriminative localization. In CVPR, pages 2921-2929, 2016. 7 +[48] Zhen Zhu, Mengde Xu, Song Bai, Tengteng Huang, and Xiang Bai. Asymmetric non-local neural networks for semantic segmentation. In ICCV, pages 593-602, 2019. 6, 7 + +[49] Barret Zoph and Quoc V. Le. Neural architecture search with reinforcement learning. In ICLR, 2017. 2 \ No newline at end of file diff --git a/neuralarchitecturesearchforlightweightnonlocalnetworks/images.zip b/neuralarchitecturesearchforlightweightnonlocalnetworks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..eb3b614d2b6f9e677f162012611c37aeda87e599 --- /dev/null +++ b/neuralarchitecturesearchforlightweightnonlocalnetworks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d74a4e4ccb6b658e6d19beade297277b5a5a7c082268ad011eea875ce3e661d +size 493531 diff --git a/neuralarchitecturesearchforlightweightnonlocalnetworks/layout.json b/neuralarchitecturesearchforlightweightnonlocalnetworks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2ea604328cb748a482f538ba3884695f25c961da --- /dev/null +++ b/neuralarchitecturesearchforlightweightnonlocalnetworks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2a9e26500c7db7f248b7e3c6f3c6b9800aedaee4079149ccb87d25c5023a27d +size 430827 diff --git a/neuralblinddeconvolutionusingdeeppriors/8fe02b33-b908-41a3-9c60-4938c6c0a893_content_list.json b/neuralblinddeconvolutionusingdeeppriors/8fe02b33-b908-41a3-9c60-4938c6c0a893_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..fa937c1eecab4149e6e251cb22c9aef9315def36 --- /dev/null +++ b/neuralblinddeconvolutionusingdeeppriors/8fe02b33-b908-41a3-9c60-4938c6c0a893_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6dc526183279ac195c518c9751f11bef66e7771b302f41ad8f5a31504bb99d81 +size 85200 diff --git a/neuralblinddeconvolutionusingdeeppriors/8fe02b33-b908-41a3-9c60-4938c6c0a893_model.json b/neuralblinddeconvolutionusingdeeppriors/8fe02b33-b908-41a3-9c60-4938c6c0a893_model.json new file mode 100644 index 0000000000000000000000000000000000000000..23f3ee659d7f4d20a4a93205f8b027ba9c0cfff2 --- /dev/null +++ b/neuralblinddeconvolutionusingdeeppriors/8fe02b33-b908-41a3-9c60-4938c6c0a893_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:efe09a119ce42487aab8feca867aef82f51c41b571356181c4e35dfa3c676d72 +size 108867 diff --git a/neuralblinddeconvolutionusingdeeppriors/8fe02b33-b908-41a3-9c60-4938c6c0a893_origin.pdf b/neuralblinddeconvolutionusingdeeppriors/8fe02b33-b908-41a3-9c60-4938c6c0a893_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..922d422042a96c68a24334218a1c892f1aacc5ac --- /dev/null +++ b/neuralblinddeconvolutionusingdeeppriors/8fe02b33-b908-41a3-9c60-4938c6c0a893_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:162f1804d7cd8b3527748f28be48c8c51bee432ad8ad67d8833391496e18228f +size 3616450 diff --git a/neuralblinddeconvolutionusingdeeppriors/full.md b/neuralblinddeconvolutionusingdeeppriors/full.md new file mode 100644 index 0000000000000000000000000000000000000000..1ac3c81f587c818b656df9b765788acf936d4b70 --- /dev/null +++ b/neuralblinddeconvolutionusingdeeppriors/full.md @@ -0,0 +1,405 @@ +# Neural Blind Deconvolution Using Deep Priors + +Dongwei Ren $^{1}$ , Kai Zhang $^{2}$ , Qilong Wang $^{1}$ , Qinghua Hu $^{1(\boxtimes)}$ , and Wangmeng Zuo $^{2}$ + +$^{1}$ Tianjin Key Lab of Machine Learning, College of Intelligence and Computing, Tianjin University, Tianjin, China + +$^{2}$ School of Computer Science and Technology, Harbin Institute of Technology, Harbin, China {csdren, huqinghua} $@$ tju.edu.cn + +# Abstract + +Blind deconvolution is a classical yet challenging low-level vision problem with many real-world applications. Traditional maximum a posteriori (MAP) based methods rely heavily on fixed and handcrafted priors that certainly are insufficient in characterizing clean images and blur kernels, and usually adopt specially designed alternating minimization to avoid trivial solution. In contrast, existing deep motion deblurring networks learn from massive training images the mapping to clean image or blur kernel, but are limited in handling various complex and large size blur kernels. To connect MAP and deep models, we in this paper present two generative networks for respectively modeling the deep priors of clean image and blur kernel, and propose an unconstrained neural optimization solution to blind deconvolution. In particular, we adopt an asymmetric Autoencoder with skip connections for generating latent clean image, and a fully-connected network (FCN) for generating blur kernel. Moreover, the SoftMax nonlinearity is applied to the output layer of FCN to meet the nonnegative and equality constraints. The process of neural optimization can be explained as a kind of "zero-shot" self-supervised learning of the generative networks, and thus our proposed method is dubbed SelfDeblur. Experimental results show that our SelfDeblur can achieve notable quantitative gains as well as more visually plausible deblurring results in comparison to state-of-the-art blind deconvolution methods on benchmark datasets and real-world blurry images. The source code is publicly available at https://github.com/csdwren/SelfDeblur. + +# 1. Introduction + +Camera shake during exposure inevitably yields blurry images and is a long-standing annoying issue in digital pho + +![](images/5f07dd45735f7a56f5af7bc86cf1aff7d223c21397ec8eb516af287963efff0d.jpg) + +![](images/3e1616f393c936fb40b56d5129072e258675eec96f85e22182a7b23ba9a87366.jpg) + +![](images/ce044e83d637875e93d1eba0040d811ce765c4cb459bade2704fac404e1cacf7.jpg) +Blurry image +Pan-L0 [27] + +![](images/18010c0e778c6757e895307b17b4603baa1043f688c1e5cf54fed12a024b0e57.jpg) +Xu & Jia [48] +Sun et al. [41] + +![](images/ac3b6fcda0c0a78b7ed3edecd653754e66002e611c7e27301e0568525fb28adb.jpg) +Pan-DCP [29] +Figure 1: Visual quality comparison on a severe blurry image. + +![](images/6d560338b5aacba6ac416cd8633f677ef7b66dfc3c86a269140d775f854b9766.jpg) +SelfDeblur + +tography. The removal of distortion from a blurry image, i.e., image deblurring, is a classical ill-posed problem in low-level vision and has received considerable research attention [2-4,10,19,28,29,32,56]. When the blur kernel is spatially invariant, it is also known as blind deconvolution, where the blurry image $\mathbf{y}$ can be formulated as, + +$$ +\mathbf {y} = \mathbf {k} \otimes \mathbf {x} + \mathbf {n}, \tag {1} +$$ + +where $\otimes$ denotes the 2D convolution operator, $\mathbf{x}$ is the latent clean image, $\mathbf{k}$ is the blur kernel, and $\mathbf{n}$ is the additive white Gaussian noise (AWGN) with noise level $\sigma$ . It can be seen that blind deconvolution should estimate both $\mathbf{k}$ and $\mathbf{x}$ from a blurry image $\mathbf{y}$ , making it remain a very challenging problem after decades of studies. + +Most traditional blind deconvolution methods are based + +on the Maximum a Posterior (MAP) framework, + +$$ +\begin{array}{l} (\mathbf {k}, \mathbf {x}) = \operatorname * {a r g m a x} _ {\mathbf {x}, \mathbf {k}} \Pr \left(\mathbf {k}, \mathbf {x} | \mathbf {y}\right), \\ = \arg \max _ {\mathbf {x}, \mathbf {k}} \Pr (\mathbf {y} | \mathbf {k}, \mathbf {x}) \Pr (\mathbf {x}) \Pr (\mathbf {k}), \tag {2} \\ \end{array} +$$ + +where $\operatorname{Pr}(\mathbf{y}|\mathbf{k},\mathbf{x})$ is the likelihood corresponding to the fidelity term, and $\operatorname{Pr}(\mathbf{x})$ and $\operatorname{Pr}(\mathbf{k})$ model the priors of clean image and blur kernel, respectively. Although many priors have been suggested for $\mathbf{x}$ [2, 15, 27, 56] and $\mathbf{k}$ [19, 22, 24, 29, 29, 34, 41, 50, 56], they generally are handcrafted and certainly are insufficient in characterizing clean images and blur kernels. Furthermore, the non-convexity of MAP based models also increases the difficulty of optimization. Levin et al. [19] reveal that MAP-based methods may converge to trivial solution of delta kernel. Perrone and Favaro [32] show that the success of existing methods can be attributed to some optimization details, e.g., projected alternating minimization and delayed normalization of $\mathbf{k}$ . + +Motivated by the unprecedented success of deep learning in low-level vision [11, 12, 23, 42, 52], some attempts have also been made to solve blind deconvolution using deep convolutional neural networks (CNNs). Given the training set, deep CNNs can either be used to extract features to facilitate blur kernel estimation [1, 38], or be deployed to learn the direct mapping to clean image for motion deblurring [7, 25, 43, 51]. However, these methods do not succeed in handling various complex and large size blur kernels in blind deconvolution. Recently, Ulyanov et al. [45] suggest the deep image prior (DIP) framework, which adopts the structure of a DIP generator network to capture low-level image statistics and shows powerful ability in image denoising, super-resolution, inpainting, etc. Subsequently, Gandelsman et al. [6] combine multiple DIPs (i.e., Double-DIP) for multi-task layer decomposition such as image dehazing and transparency separation. However, Double-DIP cannot be directly applied to solve blind deconvolution due to that the DIP network is designed to generate natural images and is limited to capture the prior of blur kernels. + +In this paper, we propose a novel neural optimization solution to blind deconvolution. Motivated by the DIP network [45], an image generator network $\mathcal{G}_x$ , i.e., an asymmetric Autoencoder with skip connections, is deployed to capture the statistics of latent clean image. Nonetheless, image generator network cannot well characterize the prior on blur kernel. Instead, we adopt a fully-connected network (FCN) $\mathcal{G}_k$ to model the prior of blur kernel. Furthermore, the SoftMax nonlinearity is deployed to the output layer of $\mathcal{G}_k$ , and the non-negative and equality constraints on blur kernel can then be naturally satisfied. By fixing the network structures $(\mathcal{G}_k$ and $\mathcal{G}_x)$ and inputs $(\mathbf{z}_k$ and $\mathbf{z}_x)$ sampled from uniform distribution, blind deconvolution is thus formulated as an unconstrained neural optimization on network parameters of $\mathcal{G}_k$ and $\mathcal{G}_x$ . As illustrated in Fig. 2, given a blurry image $\mathbf{y}$ , the optimization process can also be explained as + +a kind of "zero-shot" self-supervised learning [39] of $\mathcal{G}_k$ and $\mathcal{G}_x$ , and our proposed method is dubbed SelfDeblur. Even though SelfDeblur can be optimized with either alternating optimization or joint optimization, our empirical study shows that the latter performs better in most cases. + +Experiments are conducted on two widely used benchmarks [18, 19] as well as real-world blurry images to evaluate our SelfDeblur. Fig. 1 shows the deblurring results on a severe real-world blurry image. While the competing methods either fail to estimate large size blur kernels or suffer from ringing effects, our SelfDeblur succeed in estimating the blur kernel and generating visually favorable deblurring image. In comparison to the state-of-the-art methods, our SelfDeblur can achieve notable quantitative performance gains and performs favorably in generating visually plausible deblurring results. It is worth noting that our SelfDeblur can both estimate blur kernel and generate latent clean image with satisfying visual quality, making the subsequent non-blind deconvolution not a compulsory choice. + +Our contributions are summarized as follows: + +- A neural blind deconvolution method, i.e., SelfDeblur, is proposed, where DIP and FCN are respectively introduced to capture the priors of clean image and blur kernel. And the SoftMax nonlinearity is applied to the output layer of FCN to meet the non-negative and equality constraints. +- The joint optimization algorithm is suggested to solve the unconstrained neural blind deconvolution model for both estimating blur kernel and generating latent clean image, making the non-blind deconvolution not a compulsory choice for our SelfDeblur. +- Extensive experiments show that our SelfDeblur performs favorably against the existing MAP-based methods in terms of quantitative and qualitative evaluation. To our best knowledge, SelfDeblur makes the first attempt of applying deep learning to yield state-of-the-art blind deconvolution performance. + +# 2. Related Work + +In this section, we briefly survey the relevant works including optimization-based blind deconvolution and deep learning based blind deblurring methods. + +# 2.1. Optimization-based Blind Deconvolution + +Traditional optimization-based blind deconvolution methods can be further categorized into two groups, i.e., Variational Bayes (VB)-based and MAP-based methods. VB-based method [20] is theoretically promising, but is with heavy computational cost. As for the MAP-based methods, many priors have been suggested for modeling clean images and blur kernels. In the seminal work of [2], Chan et al. introduce the total variation (TV) regularization + +![](images/02761fce9ba0a6339b749ce9357a18f8c230a859ed14ebd593af5fea0f4b5a3e.jpg) +Figure 2: Illustration of our SelfDeblur method. The generative networks $\mathcal{G}_x$ and $\mathcal{G}_k$ are deployed to respectively capture the deep priors of blur kernel and latent clean image, and are trained using only the input blurry image. In particular, $\mathcal{G}_x$ is an asymmetric Autoencoder with skip connections, and the Sigmoid nonlinearity is adopted to the output layer for constraining the pixels in $\mathbf{x}$ in the range [0, 1]. $\mathcal{G}_k$ adopts a fully-connected network, where the SoftMax nonlinearity is applied to the output layer for meeting the non-negative and equality constraints, and the 1D output of is reshaped to 2D blur kernel. + +to model latent clean image in blind deconvolution, and motivates several variants based on gradient-based priors, e.g., $\ell_0$ -norm [27] and $\ell_p$ -norm [56]. Other specifically designed regularizations, e.g., $\ell_1 / \ell_2$ -norm [15], patch-based prior [24, 41], low-rank prior [34] and dark channel prior [29, 50] have also been proposed to identify and preserve salient edges for benefiting blur kernel estimation. Recently, a discriminative prior [21] is presented to distinguish the clean image from a blurry one, but still heavily relies on $\ell_0$ -norm regularizer for attaining state-of-the-art performance. As for $\operatorname{Pr}(\mathbf{k})$ , gradient sparsity priors [19, 29, 56] and spectral prior [22] are usually adopted. In order to solve the MAP-based model, several tricks have been introduced to the projected alternating minimization algorithm, including delayed normalization of blur kernel [32], multi-scale implementation [15] and time-varying parameters [56]. + +After blur kernel estimation, non-blind deconvolution is required to recover the latent clean image with fine texture details [15, 22, 27, 29, 41, 49]. Thus, the priors should favor natural images, e.g., hyper-Laplacian [14], GMM [55], non-local similarity [5], e.g., RTF [37], CSF [36] and CNN [16, 53], which are quite different from those used in blur kernel estimation. Our SelfDeblur can be regarded as a special MAP-based method, but two generative networks, i.e., DIP and FCN, are adopted to respectively capture the deep priors of clean image and blur kernel. Moreover, the joint optimization algorithm is effective to estimate blur kernel and generate clean image, making non-blind deconvolution not a compulsory choice for SelfDeblur. + +# 2.2. Deep Learning in Image Deblurring + +Many studies have been given to apply deep learning (DL) to blind deblurring. For example, DL can be used to help the learning of mapping to blur kernel. By imitating the alternating minimization steps in optimization-based methods, Schuler et al. [38] design the deep network architectures for blur kernel estimation. By studying the spectral property of blurry images, deep CNN is suggested to predict the Fourier coefficients [1], which can then be projected to + +estimate blur kernel. In [40], CNN is used to predict the parametric blur kernels for motion blurry images. + +For dynamic scene deblurring, deep CNNs have been developed to learn the direct mapping to latent clean image [17,25,40,43,51]. Motivated by the multi-scale strategy in blind deconvolution, multi-scale CNN [25] and scale-recurrent network [43] are proposed to directly estimate the latent clean image from the blurry image. The adversarial loss is also introduced for better recovery of texture details in motion deblurring [17]. Besides, by exploiting the temporal information between adjacent frames, deep networks have also been applied to video motion deblurring [9,26,30]. However, due to the severe ill-posedness caused by large size and complex blur kernels, existing DL-based methods still cannot outperform traditional optimization-based ones for blind deconvolution. + +Recently, DIP [45] and Double-DIP [6] have been introduced to capture image statistics, and have been deployed to many low-level vision tasks such as super-resolution, inpainting, dehazing, transparency separation, etc. Nonetheless, the DIP network is limited in capturing the prior of blur kernels, and Double-DIP still performs poorly for blind deconvolution. To the best of our knowledge, our SelfDeblur makes the first attempt of applying deep networks to yield state-of-the-art blind deconvolution performance. + +# 3. Proposed Method + +In this section, we first introduce the general formulation of MAP-based blind deconvolution, and then present our proposed neural blind deconvolution model as well as the joint optimization algorithm. + +# 3.1. MAP-based Blind Deconvolution Formulation + +According to Eqn. (1), we define the fidelity term as $-\log (\operatorname*{Pr}(\mathbf{y}|\mathbf{k},\mathbf{x})) = \| \mathbf{k}\otimes \mathbf{x} - \mathbf{y}\| ^2$ . And we further introduce two regularization terms $-\log (\operatorname*{Pr}(\mathbf{x})) = \phi (\mathbf{x})$ and $-\log (\operatorname*{Pr}(\mathbf{k})) = \varphi (\mathbf{k})$ for modeling the priors on latent clean image and blur kernel, respectively. The MAP-based blind deconvolution model in Eqn. (2) can then be reformu + +lated as, + +$$ +\begin{array}{l} (\mathbf {x}, \mathbf {k}) = \arg \min _ {(\mathbf {x}, \mathbf {k})} \| \mathbf {k} \otimes \mathbf {x} - \mathbf {y} \| ^ {2} + \lambda \phi (\mathbf {x}) + \tau \varphi (\mathbf {k}) \tag {3} \\ s. t. 0 \leq x _ {i} \leq 1, \forall i, k _ {j} \geq 0, \sum_ {j} k _ {j} = 1, \forall j, \\ \end{array} +$$ + +where $\lambda$ and $\tau$ are trade-off regularization parameters. Besides the two regularization terms, we further introduce the non-negative and equality constraints for blur kernel $\mathbf{k}$ [29, 32, 41, 56], and the pixels in $\mathbf{x}$ are also constrained to the range [0, 1]. + +Under the MAP-based framework, many fixed and handcrafted regularization terms have been presented for latent clean image and blur kernel [22, 24, 29, 29, 34, 41, 50, 56]. To solve the model in Eqn. (3), projected alternating minimization is generally adopted, but several optimization details, e.g., delayed normalization [32] and multi-scale implementation [15], are also crucial to the success of blind deconvolution. Moreover, once the estimated blur kernel $\hat{\mathbf{k}}$ is obtained by solving Eqn. (3), another non-blind deconvolution usually is required to generate final deblurring result, + +$$ +\mathbf {x} = \arg \min _ {\mathbf {x}} \| \hat {\mathbf {k}} \otimes \mathbf {x} - \mathbf {y} \| ^ {2} + \lambda \mathcal {R} (\mathbf {x}), \tag {4} +$$ + +where $\mathcal{R}(\mathbf{x})$ is a regularizer to capture natural image statistics and is quite different from $\phi (\mathbf{x})$ . + +# 3.2. Neural Blind Deconvolution + +Motivated by the success of DIP [45] and Double-DIP [6], we suggest the neural blind deconvolution model by adopting generative networks $\mathcal{G}_x$ and $\mathcal{G}_k$ to capture the priors of $\mathbf{x}$ and $\mathbf{k}$ . By substituting $\mathbf{x}$ and $\mathbf{k}$ with $\mathcal{G}_x$ and $\mathcal{G}_k$ and removing the regularization terms $\phi (\mathbf{x})$ and $\varphi (\mathbf{k})$ , the neural blind deconvolution can be formulated as, + +$$ +\min _ {\left(\mathcal {G} _ {x}, \mathcal {G} _ {k}\right)} \left\| \mathcal {G} _ {k} \left(\mathbf {z} _ {k}\right) \otimes \mathcal {G} _ {x} \left(\mathbf {z} _ {x}\right) - \mathbf {y} \right\| ^ {2} +$$ + +$$ +s. t. 0 \leq \left(\mathcal {G} _ {x} \left(\mathbf {z} _ {x}\right)\right) _ {i} \leq 1, \forall i, \tag {5} +$$ + +$$ +\left(\mathcal {G} _ {k} \left(\mathbf {z} _ {k}\right)\right) _ {j} \geq 0, \sum_ {j} \left(\mathcal {G} _ {k} \left(\mathbf {z} _ {k}\right)\right) _ {j} = 1, \forall j, +$$ + +where $\mathbf{z}_x$ and $\mathbf{z}_k$ are sampled from the uniform distribution, $(\cdot)_i$ and $(\cdot)_j$ denote the $i$ -th and $j$ -th elements. We note that $\mathbf{z}_k$ is 1D vector, and $\mathcal{G}_k(\mathbf{z}_k)$ is reshaped to obtain 2D matrix of blur kernel. + +However, there remain several issues to be addressed with neural blind deconvolution. (i) The DIP network [45] is designed to capture low-level image statistics and is limited in capturing the prior of blur kernels. As a result, we empirically find that Double-DIP [6] performs poorly for blind deconvolution (see the results in Sec. 4.1.2). (ii) Due to the non-negative and equality constraints, the resulting model in Eqn. (5) is a constrained neural optimization problem and is difficult to optimize. (iii) Although the generative networks $\mathcal{G}_x$ and $\mathcal{G}_k$ present high impedance to image noise, the denoising performance of DIP heavily relies on the additional averaging over last iterations and different optimization runs [45]. Such heuristic solutions, however, + +both bring more computational cost and cannot be directly borrowed to handle blurry and noisy images. + +In the following, we present our solution to address the issues (i)&(ii) by designing proper generative networks $\mathcal{G}_x$ and $\mathcal{G}_k$ . As for the issue (iii), we introduce an extra TV regularizer and a regularization parameter to explicitly consider noise level in the neural blind deconvolution model. + +Generative Network $\mathcal{G}_x$ . The latent clean images usually contain salient structures and rich textures, which requires the generative network $\mathcal{G}_x$ to have sufficient modeling capacity. Fortunately, since the introduction of generative adversarial network [8], dramatic progress has been made in generating high quality natural images [45]. For modeling $\mathbf{x}$ , we adopt a DIP network, i.e., the asymmetric Autoencoder [35] with skip connections in [45], to serve as $\mathcal{G}_x$ . As shown in Fig. 2, the first 5 layers of encoder are skip connected to the last 5 layers of decoder. Finally, a convolutional output layer is used to generate latent clean image. To meet the range constraint for $\mathbf{x}$ , the Sigmoid nonlinearity is applied to the output layer. Please refer to the supplementary file for more architecture details of $\mathcal{G}_x$ . + +Generative Network $\mathcal{G}_k$ . On the one hand, the DIP network [45] is designed to capture the statistics of natural image but performs limited in modeling the prior of blur kernel. On the other hand, blur kernel $\mathbf{k}$ generally contains much fewer information than latent clean image $\mathbf{x}$ , and can be well generated by simpler generative network. Thus, we simply adopt a fully-connected network (FCN) to serve as $\mathcal{G}_k$ . As shown in Fig. 2, the FCN $\mathcal{G}_k$ takes a 1D noise $\mathbf{z}_k$ with 200 dimensions as input, and has a hidden layer of 1,000 nodes and an output layer of $K^2$ nodes. To guarantee the non-negative and equality constraints can be always satisfied, the SoftMax nonlinearity is applied to the output layer of $\mathcal{G}_k$ . Finally, the 1D output of $K^2$ entries is reshaped to a 2D $K \times K$ blur kernel. Please refer to Suppl. for more architecture details of $\mathcal{G}_k$ . + +Unconstrained Neural Blind Deconvolution with TV Regularization. With the above generative networks $\mathcal{G}_x$ and $\mathcal{G}_k$ , we can formulate neural blind deconvolution into an unconstrained optimization form. However, the resulting model is irrelevant with the noise level, making it perform poorly on blurry images with non-negligible noise. To address this issue, we combine both $\mathcal{G}_x$ and TV regularization to capture image priors, and our neural blind deconvolution model can then be written as, + +$$ +\min _ {\mathcal {G} _ {k}, \mathcal {G} _ {x}} \| \mathcal {G} _ {k} (\mathbf {z} _ {k}) \otimes \mathcal {G} _ {x} (\mathbf {z} _ {x}) - \mathbf {y} \| ^ {2} + \lambda \operatorname {T V} \left(\mathcal {G} _ {x} (\mathbf {z} _ {x})\right), \tag {6} +$$ + +where $\lambda$ denotes the regularization parameter controlled by noise level $\sigma$ . Albeit the generative network $\mathcal{G}_x$ is more powerful, the incorporation of $\mathcal{G}_x$ and another image prior generally is beneficial to deconvolution performance. Moreover, the introduction of the noise level related regularization parameter $\lambda$ can greatly improve the robustness in handling blurry images with various noise levels. In partic + +ular, we empirically set $\lambda = 0.1\times \sigma$ in our implementation, and the noise level $\sigma$ can be estimated using [54]. + +# 3.3. Optimization Algorithm + +The optimization process of Eqn. (6) can be explained as a kind of "zero-shot" self-supervised learning [39], where the generative networks $\mathcal{G}_k$ and $\mathcal{G}_x$ are trained using only a test image (i.e., blurry image $\mathbf{y}$ ) and no ground-truth clean image is available. Thus, our method is dubbed SelfDeblur. In the following, we present two algorithms for SelfDeblur, i.e., alternating optimization and joint optimization. + +Alternating Optimization. Analogous to the alternating minimization steps in traditional blind deconvolution [2, 27, 29, 41, 56], the network parameters of $\mathcal{G}_k$ and $\mathcal{G}_x$ can also be optimized in an alternating manner. As summarized in Algorithm 1, the parameters of $\mathcal{G}_k$ are updated via the ADAM [13] by fixing $\mathcal{G}_x$ , and vice versa. In particular, the gradient w.r.t. either $\mathcal{G}_x$ or $\mathcal{G}_k$ can be derived using automatic differentiation [31]. + +Joint Optimization. In traditional MAP-based framework, alternating minimization allows the use of projection operator to handle non-negative and equality constraints and the modification of optimization details to avoid trivial solution, and thus has been widely adopted. As for our neural blind deconvolution, the model in Eqn. (6) is unconstrained optimization, and the powerful modeling capacity of $\mathcal{G}_k$ and $\mathcal{G}_x$ is beneficial to avoid trivial delta kernel solution. We also note that the unconstrained neural blind deconvolution is highly non-convex, and alternating optimization may get stuck at saddle points [44]. Thus, joint optimization is more preferred than alternating optimization for SelfDeblur. Using the automatic differentiation techniques [31], the gradients w.r.t. $\mathcal{G}_k$ and $\mathcal{G}_x$ can be derived. Algorithm 2 summarizes the joint optimization algorithm, where the parameters of $\mathcal{G}_k$ and $\mathcal{G}_x$ can be jointly updated using the ADAM algorithm. Our empirical study in Sec. 4.1.1 also shows that joint optimization usually converges to better solutions than alternating optimization. + +Both alternating optimization and joint optimization algorithms are stopped when reaching $T$ iterations. Then, the estimated blur kernel and latent clean image can be generated using $\mathbf{k} = \mathcal{G}_k^T(\mathbf{z}_k)$ and $\mathbf{x} = \mathcal{G}_x^T(\mathbf{z}_x)$ , respectively. Benefited from the modeling capacity of $\mathcal{G}_x(\mathbf{z}_x)$ , the estimated $\mathbf{x}$ is with visually favorable textures, and it is not a compulsory choice for our SelfDeblur to adopt another non-blind deconvolution method to generate final deblurring result. + +# 4. Experimental Results + +In this section, ablation study is first conducted to analyze the effect of optimization algorithm and network architecture. Then, our SelfDeblur is evaluated on two benchmark datasets and is compared with the state-of-the-art blind deconvolution methods. Finally, we report the results of SelfDeblur on several real-world blurry images. + +Algorithm 1 SelfDeblur (Alternating Optimization) +Input: Blur image y +Output: Blur kernel k and clean image x +1: Sample $\mathbf{z}_x$ and $\mathbf{z}_k$ from uniform distribution with seed 0. +2: $\mathbf{k} = \mathcal{G}_k^0 (\mathbf{z}_k)$ +3: for $t = 1$ to $T$ do +4: $\mathbf{x} = \mathcal{G}_x^{t - 1}(\mathbf{z}_x)$ +5: Compute the gradient w.r.t. $\mathcal{G}_k$ +6: Update $\mathcal{G}_k^t$ using the ADAM algorithm [13] +7: $\mathbf{k} = \mathcal{G}_k^t (\mathbf{z}_k)$ +8: Compute the gradient w.r.t. $\mathcal{G}_x$ +9: Update $\mathcal{G}_x^t$ using the ADAM algorithm [13] +10: end for +11: $\mathbf{x} = \mathcal{G}_x^T (\mathbf{z}_x),\mathbf{k} = \mathcal{G}_x^T (\mathbf{z}_k)$ + +Algorithm 2 SelfDeblur (Joint Optimization) +Input: Blur image y +Output: Blur kernel $\mathbf{k}$ and clean image x +1: Sample $\mathbf{z}_x$ and $\mathbf{z}_k$ from uniform distribution with seed 0. +2: for $t = 1$ to $T$ do +3: $\mathbf{k} = \mathcal{G}_k^{t - 1}(\mathbf{z}_k)$ +4: $\mathbf{x} = \mathcal{G}_x^{t - 1}(\mathbf{z}_x)$ +5: Compute the gradients w.r.t. $\mathcal{G}_k$ and $\mathcal{G}_x$ +6: Update $\mathcal{G}_k^t$ and $\mathcal{G}_x^t$ using the ADAM algorithm [13] +7: end for +8: $\mathbf{x} = \mathcal{G}_x^T (\mathbf{z}_x),\mathbf{k} = \mathcal{G}_x^T (\mathbf{z}_k)$ + +Our SelfDeblur is implemented using Pytorch [31]. The experiments are conducted on a PC equipped with one NVIDIA Titan V GPU. Unless specially stated, the experiments follow the same settings, i.e., $T = 5,000$ , and the noises $\mathbf{z}_x$ and $\mathbf{z}_k$ are sampled from the uniform distribution with fixed random seed 0. Following [45], we further perturb $\mathbf{z}_x$ randomly at each iteration. The initial learning rate is set as 0.01 and is decayed by multiplying 0.5 when reaching 2,000, 3,000 and 4,000 iterations. + +# 4.1. Ablation Study + +Ablation study is conducted on the dataset by Levin et al. [19], which is a popular blind deconvolution benchmark consisting of 4 clean images and 8 blur kernels. Using [54], the average estimated noise level of the blurry images in the dataset is $\sigma \approx 1\times 10^{-5}$ . Thus we simply adopt $\lambda = 1\times 10^{-6}$ on this dataset. + +4.1.1 Alternating Optimization vs. Joint Optimization We first evaluate the performance of SelfDeblur using alternating optimization (SelfDeblur-A) and joint optimization (SelfDeblur-J). Table 1 reports the average PSNR and S-SIM values. In terms of quantitative metrics, SelfDeblur-J significantly outperforms SelfDeblur-A, demonstrating the superiority of joint optimization. In the supplementary file, we provide several failure cases of SelfDeblur-A, where + +![](images/71f7fb9e3bad87ebd698e4e584f35f779cd0a42eefd8011369eb6e66dbdc59a0.jpg) +Figure 3: Intermediate results of estimated blur kernel and latent clean image at iteration $t = 1,20,100,600,2,000$ and 5,000. + +![](images/f4fda683b47978516d2910a98105f421c1f1aec67110d0970987fff11185c5ad.jpg) + +SelfDeblur-A may converge to delta kernel and worse solution while SelfDeblur-J performs favorably on these cases. Therefore, joint optimization is adopted as the default SelfDeblur method throughout the following experiments. + +Table 1: Average PSNR/SSIM comparison of SelfDeblur-A and SelfDeblur-J on the dataset of Levin et al. [19]. + +
SelfDeblur-ASelfDeblur-J
30.53 / 0.874833.07 / 0.9313
+ +# 4.1.2 Network Architecture of $\mathcal{G}_k$ + +In this experiment, we compare the results by considering four kinds of network architectures: (i) SelfDeblur, (ii) Double-DIP [6] (asymmetric Autoencoder with skip connections for both $\mathcal{G}_x$ and $\mathcal{G}_k$ ), (iii) SelfDeblur $_{k-}$ (removing the hidden layer from $\mathcal{G}_k$ ), and (iv) SelfDeblur $_{k+}$ (adding an extra hidden layer for $\mathcal{G}_k$ ). From Table 2 and Fig. 4, SelfDeblur significantly outperforms Double-DIP in estimating blur kernel and latent image. The result indicates that the DIP network is limited to capture the prior of blur kernel, and the simple FCN can be a good choice of $\mathcal{G}_k$ . We further compare SelfDeblur with SelfDeblur $_{k-}$ and SelfDeblur $_{k+}$ . One can see that the FCN without hidden layer (i.e., SelfDeblur $_{k-}$ ) also succeeds in estimating blur kernel and clean image (see Fig. 4), but performs much inferior to SelfDeblur. Moreover, the three-layer FCN (i.e., SelfDeblur $_{k+}$ ) is superior to SelfDeblur $_{k-}$ , but is inferior to SelfDeblur. To sum up, SelfDeblur is a good choice for modeling blur kernel prior. + +Table 2: Quantitavie comparison of SelfDeblur variants with different network structures of $\mathcal{G}_k$ . + +
SelfDeblurSelfDeblurk-SelfDeblurk+Double-DIP
PSNR33.0728.3730.9221.51
SSIM0.93130.83960.88890.5256
+ +![](images/9387b9f59dc4b2ff0de00c90a4817773ae714faff03a17bc3ba70a3eb34ade46.jpg) +SelfDeblur + +![](images/a3cdb53dd4a5c9db47b600de2bc1e3af7ff23dd6e032085e84ab663f1b17dcd1.jpg) +SelfDeblurk + +![](images/673ff762797ea4d17c9309089e5a5b749c5dadef6cf77b3c7e154e091036421e.jpg) +SelfDeblurk+ +Figure 4: Visual comparison of SelfDeblur variants with different network structures of $\mathcal{G}_k$ . + +![](images/fc36f35df558d422cf1e55046c4ee3426c44365f3911b04f8b2405f44794cf53.jpg) +Double-DIP + +# 4.1.3 Visualization of Intermediate Results + +Using an image from the dataset of Levin et al. [19], Fig. 3 shows the intermediate results of estimated blur kernel and clean image at iteration $t =$ + +1, 20, 100, 600, 2, 000 and 5, 000, along with the MSE curve for $\mathbf{k}$ and the PSNR curve for $\mathbf{x}$ . When iteration $t = 20$ , the intermediate result of $\mathbf{x}$ mainly contains the salient image structures, which is consistent with the observation that salient edges is crucial for initial blur kernel estimation in traditional methods. Along with the increase of iterations, $\mathcal{G}_x$ and $\mathcal{G}_k$ begin to generate finer details in $\mathbf{x}$ and $\mathbf{k}$ . Unlike traditional methods, SelfDeblur is effective in simultaneously estimating blur kernel and recovering latent clean image when iteration $t \geq 20$ , making the non-blind deconvolution not a compulsory choice for SelfDeblur. + +# 4.2. Comparison with State-of-the-arts + +# 4.2.1 Results on dataset of Levin et al. [19] + +Table 3: Average PSNR, SSIM, Error Ratio and running time (sec.) comparison on the dataset of Levin et al. [19]. $\triangle$ indicates the method generates final deblurring results using the non-blind deconvolution method from [20]. The running time only includes blur kernel estimation. + +
PSNRSSIMError RatioTime
Known kΔ34.530.94921.0000—
Krishnan et al. Δ [15]29.880.86662.45238.9400
Cho&LeeΔ [4]30.570.89661.71131.3951
Levin et al. Δ [20]30.800.90921.772478.263
Xu&JiaΔ [49]31.670.91631.48981.1840
Sun et al. Δ [41]32.990.93301.2847191.03
Zuo et al. Δ [56]32.660.93321.250010.998
Pan-DCPΔ [29]32.690.92841.2555295.23
SRN [43]23.430.71176.0864N/A
SelfDeblurΔ33.320.94381.2509—
SelfDeblur33.070.93131.1968224.01
+ +Using the dataset of Levin et al. [19], we compare our SelfDeblur with several state-of-the-art blind deconvolution methods, including Krishnan et al. [15], Levin et al. [19], Cho&Lee [4], Xu&Jia [48], Sun et al. [41], Zuo et al. [56] and Pan-DCP [29]. Besides, SelfDeblur is compared with one state-of-the-art deep motion deblurring method SRN [43], which is re-trained on 1,600 blurry images [33] synthesized using eight blur kernels in the dataset of Levin et al. For SelfDeblur, $\lambda = 1\times 10^{-6}$ is set for all the blurry images. Following [41, 56], we adopt the non-blind deconvolution method in [20] to generate final deblurring results. PSNR, SSIM [46] and Error Ratio [20] are used as quantitative metrics. And we also report the running time of blur kernel estimation for each competing method. Our SelfDeblur and SRN are ran on an NVIDIA Titan V GPU, while the other methods are ran on a PC with $3.30\mathrm{GHz}$ Intel(R) + +![](images/6f8a4672bf1edef8b36b5e799e5f5743ee1d9d8e83d523219fa299a730911fb5.jpg) + +![](images/abfe95c7564f9837dcffb71afa220b0ec04e50577ac685d7e974a0b070072e01.jpg) + +![](images/96ae37a9741c841a10bbe14d05d4917b295a7f1169f78d4960ab20df00e8cb1f.jpg) + +![](images/2716800dcfc49fa1d18251a9e8aab155d5a200bb9b772197b5d78309280fda89.jpg) + +![](images/ed45a66a16acda7f02ca8ab5bc971a0e8a806dff5ae7f554e1fb9b6c2de3b308.jpg) +Blurry image +Ground-truth + +![](images/6e62df116177303c33b10e862a508bdf9fa8ad458fdf2d22eb58e179a744d046.jpg) +Zuo et al. $\triangle$ [56] +Sun et al. [41] +Figure 5: Visual comparison on the dataset of Levin et al. [19]. + +![](images/c2deb0f196e090513bdb863c50494b3c00a2635b405fbd47e4d450af47b8f076.jpg) +Xu&Jia[48] +Pan-DCP[29] + +![](images/8bcef3430f49d8e02fc7d0aa192fe94bb797f1d62598764de88c662f9a222048.jpg) +SelfDeblur +SelfDeblur + +Table 4: Average PSNR/SSIM comparison on the dataset of Lai et al. [18], which has 5 categories. The methods marked with $\Delta$ adopt [47] and [14] as non-blind deconvolution after blur kernel estimation in Saturated and the other categories, respectively. + +
ImagesCho&Lee△ [4]Xu&Jia△ [48]Xu et al. △ [49]Michaeli et al. △ [24]Perroe et al. △ [32]Pan-L0△ [27]Pan-DCP△ [29]SelfDeblur△ SelfDeblur
Manmade16.35/0.389019.23/0.654017.99/0.598617.43/0.418917.41/0.550716.92/0.531618.59/0.594220.08/0.7338 20.35/0.7543
Natural20.14/0.519823.03/0.754221.58/0.678820.70/0.511621.04/0.676420.92/0.662222.60/0.698422.50/0.7183 22.05/0.7092
People19.90/0.556025.32/0.851724.40/0.813323.35/0.699922.77/0.734723.36/0.782224.03/0.771927.41/0.8784 25.94/0.8834
Saturated14.05/0.492714.79/0.563214.53/0.538314.14/0.491414.24/0.510714.62/0.545116.52/0.632216.58/0.6165 16.35/0.6364
Text14.87/0.442918.56/0.717117.64/0.667716.23/0.468616.94/0.592716.87/0.603017.42/0.619319.06/0.7126 20.16/0.7785
Avg.17.06/0.480120.18/0.708019.23/0.659318.37/0.518118.48/0.613018.54/0.624819.89/0.665621.13/0.7319 20.97/0.7524
+ +# Xeon(R) CPU. + +Table 3 lists the average metrics of the competing methods. We report the results of SelfDeblur with two settings, i.e., the deblurring results purely by SelfDeblur and those using the non-blind deconvolution from [20], denoted as SelfDeblur $\Delta$ . In terms of PSNR and Error Ratio, SelfDeblur significantly outperforms the competing methods. As for average SSIM, SelfDeblur performs slightly inferior to Sun et al. and Zuo et al. By incorporating with non-blind deconvolution from [20], SelfDeblur $\Delta$ can further boost quantitative performance and outperforms all the other methods. In terms of running time, SelfDeblur is time-consuming due to the optimization of two generative networks, but is comparable with Sun et al. [41] and Pan-DCP [29]. From the visual comparison in Fig. 5, the #4 blur kernel estimated by SelfDeblur is much closer to the ground-truth. As shown in the close-ups, SelfDeblur and SelfDeblur $\Delta$ can recover more visually favorable textures. We also note that both the performance gap and visual + +quality between SelfDeblur and SelfDeblur $\triangle$ are not significant, and thus non-blind deconvolution is not a compulsory choice for our SelfDeblur. + +# 4.2.2 Results on dataset of Lai et al. [18] + +We further evaluate SelfDeblur on the dataset of Lai et al. [18] consisting of 25 clean images and 4 large size blur kernels. The blurry images are divided into five categories, i.e., Manmade, Natural, People, Saturated and Text, where each category contains 20 blurry images. For each blurry image, the parameter $\lambda$ is set according to the noise level estimated using [54]. We compare our SelfDeblur with Cho&Lee [4], Xu&Jia [48], Xu et al. [49], Machaeli et al. [24], Perroe et al. [32], Pan-L0 [27] and Pan-DCP [29]. The results of competing methods except Pan-DCP [29] and ours are duplicated from [18]. The results of Pan-DCP [29] are generated using their default settings. Once the blur kernel is estimated, non-blind deconvolution [14] is applied to the images of Manmade, Natural, People and Text, while [47] + +![](images/d3f58a7f91c99a39def4b3dcdc24414fd99d4835ab58105c1adca5fb7ba06232.jpg) +Blurry image + +![](images/890dac1121d9da4d193b9834afff8f870681024e34f076f357eb75260f7a7748.jpg) +Xu&Jia[48] + +![](images/5240e5e4bc49219363bc5b24cbf73c84c48885b91f349516ead63de2931c5d5b.jpg) +Perrone et al. $\Delta$ [32] + +![](images/60c46c9361f86c9cac6ae86e27602d6a4fd6df2460a0596ee44c13460f2950a5.jpg) +SelfDeblur + +![](images/6c45557631f2ed4e6b920c5542c9ffa40775e65667b9d6ce98bd721b812ba9f0.jpg) +Ground-truth + +![](images/f16604d817e9527e3a87366cc00a32168b1650787e42370e20b8602c7a6b543b.jpg) +Michaeli et al. [48] + +![](images/ff1700031532102f3afabf3c1124df97ca4f62e5e0549f8554766924f3835bde.jpg) +Pan-DCP [32] + +![](images/257da3fc6345e8347043bb01cd4c143c4c68ed60be164dd2696b9586e6f4f874.jpg) +SelfDeblur + +![](images/b083c0118183818db872f7c830a7e841159089edbcecc5d2eb864f0c4c4f0ac0.jpg) +Blurry image + +![](images/5c8c845420ed662516fc67015cb7a4f4990377ebca37af28a538afb2a354ab6f.jpg) +Figure 6: Visual comparison on the dataset of Lai et al. [18]. +Xu&Jia [48] +Figure 7: Visual comparison on two real-world blurry images. + +![](images/e500c46d6ee0530ac55fd8d3ef6318a13ff3408f6624fa6c28a88710bb21a4ad.jpg) +Pan-DCP [29] + +![](images/092ab4d9fb169384cd9e3a7c37d7bb24f1331e43f16d347180f413912a81fb75.jpg) +SelfDeblur + +is used to handle Saturated images. From Table 4, both SelfDeblur and SelfDeblur $\Delta$ can achieve better quantitative metrics than the competing methods. In terms of image contents, our SelfDeblur outperforms the other methods on any of the five categories. From the results in Fig. 6, the blur kernel estimated by our SelfDeblur is more accurate than those by the competing methods, and the deconvolution result is with more visually plausible textures. + +# 4.3. Evaluation on Real-world Blurry Images + +Our SelfDeblur is further compared with Xu&Jia [48] and Pan-DCP [29] on real-world blurry images. From Fig. 7, one can see that the blur kernel estimated by our SelfDeblur contains less noises, and the estimated clean image is with more visually plausible structures and textures. The kernel estimation errors by Xu&Jia and Pan-DCP are obvious, thereby yielding ringing artifacts in the estimated clean images. More results can be found in Suppl. + +# 5. Conclusion + +In this paper, we proposed a neural blind deconvolution method, i.e., SelfDeblur. It adopts an asymmetric Autoen- + +coder and a FCN to respectively capture the deep priors of latent clean image and blur kernel. And the SoftMax nonlinearity is applied to the output of FCN to meet the nonnegative and equality constraints of blur kernel. A joint optimization algorithm is suggested to solve the unconstrained neural blind deconvolution model. Experiments show that our SelfDeblur achieves notable performance gains over the state-of-the-art methods, and is effective in estimating blur kernel and generating clean image with visually favorable textures. + +# Acknowledgements + +This work was supported by the National Natural Science Foundation of China under Grants (Nos. 61801326, 61671182, 61732011 and 61925602), the SenseTime Research Fund for Young Scholars, and the Innovation Foundation of Tianjin University. We also gratefully acknowledge the support of NVIDIA Corporation with the donation of GPU. + +# References + +[1] A. Chakrabarti. A neural approach to blind motion deblurring. In European Conference on Computer Vision, pages 221-235, 2016. 2, 3 +[2] T. F. Chan and C.-K. Wong. Total variation blind deconvolution. IEEE Transactions on Image Processing, 7(3):370-375, 1998. 1, 2, 5 +[3] L. Chen, F. Fang, T. Wang, and G. Zhang. Blind image deblurring with local maximum gradient prior. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1742-1750, 2019. 1 +[4] S. Cho and S. Lee. Fast motion deblurring. ACM Transactions on Graphics, 28(5):145, 2009. 1, 6, 7 +[5] W. Dong, L. Zhang, G. Shi, and X. Li. Nonlocally centralized sparse representation for image restoration. IEEE Transactions on Image Processing, 22(4):1620-1630, 2013. 3 +[6] Y. Gandelsman, A. Shocher, and M. Irani. "double-dip": Unsupervised image decomposition via coupled deep-image-priors. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 2, 3, 4, 6 +[7] H. Gao, X. Tao, X. Shen, and J. Jia. Dynamic scene deblurring with parameter selective sharing and nested skip connections. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3848-3856, 2019. 2 +[8] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems, pages 2672–2680, 2014. 4 +[9] T. Hyun Kim, K. Mu Lee, B. Scholkopf, and M. Hirsch. Online video deblurring via dynamic temporal blending network. In Proceedings of the IEEE International Conference on Computer Vision, pages 4038-4047, 2017. 3 +[10] M. Jin, S. Roth, and P. Favaro. Normalized blind deconvolution. In European Conference on Computer Vision, 2018. 1 +[11] J. Kim, J. Kwon Lee, and K. Mu Lee. Accurate image superresolution using very deep convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1646-1654, 2016. 2 +[12] J. Kim, J. Kwon Lee, and K. Mu Lee. Deeply-recursive convolutional network for image super-resolution. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1637–1645, 2016. 2 +[13] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representation, 2015. 5 +[14] D. Krishnan and R. Fergus. Fast image deconvolution using hyper-Laplacian priors. In Advances in Neural Information Processing Systems, pages 1033-1041, 2009. 3, 7 +[15] D. Krishnan, T. Tay, and R. Fergus. Blind deconvolution using a normalized sparsity measure. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 233-240, 2011. 2, 3, 4, 6 + +[16] J. Kruse, C. Rother, and U. Schmidt. Learning to push the limits of efficient fft-based image deconvolution. In Proceedings of the IEEE International Conference on Computer Vision, pages 4586-4594, 2017. 3 +[17] O. Kupyn, V. Budzan, M. Mykhailych, D. Mishkin, and J. Matas. Deblurgan: Blind motion deblurring using conditional adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8183-8192, 2018. 3 +[18] W.-S. Lai, J.-B. Huang, Z. Hu, N. Ahuja, and M.-H. 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. 2, 7, 8 +[19] A. Levin, Y. Weiss, F. Durand, and W. T. Freeman. Understanding and evaluating blind deconvolution algorithms. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1964-1971, 2009. 1, 2, 3, 5, 6, 7 +[20] A. Levin, Y. Weiss, F. Durand, and W. T. Freeman. Efficient marginal likelihood optimization in blind deconvolution. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2657-2664, 2011. 2, 6, 7 +[21] L. Li, J. Pan, W.-S. Lai, C. Gao, N. Sang, and M.-H. Yang. Learning a discriminative prior for blind image deblurring. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6616-6625, 2018. 3 +[22] G. Liu, S. Chang, and Y. Ma. Blind image deblurring using spectral properties of convolution operators. IEEE Transactions on Image Processing, 23(12):5047-5056, 2014. 2, 3, 4 +[23] R. Liu, S. Cheng, Y. He, X. Fan, Z. Lin, and Z. Luo. On the convergence of learning-based iterative methods for nonconvex inverse problems. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2019. 2 +[24] T. Michaeli and M. Irani. Blind deblurring using internal patch recurrence. In European Conference on Computer Vision, pages 783-798, 2014. 2, 3, 4, 7 +[25] S. Nah, T. Hyun Kim, and K. Mu Lee. Deep multi-scale convolutional neural network for dynamic scene deblurring. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3883-3891, 2017. 2, 3 +[26] S. Nah, S. Son, and K. M. Lee. Recurrent neural networks with intra-frame iterations for video deblurring. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8102-8111, 2019. 3 +[27] J. Pan, Z. Hu, Z. Su, and M.-H. Yang. $l\_ 0$ -regularized intensity and gradient prior for deblurring text images and beyond. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39(2):342-355, 2017. 1, 2, 3, 5, 7 +[28] J. Pan, W. Ren, Z. Hu, and M.-H. Yang. Learning to deblur images with exemplars. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2018. 1 +[29] J. Pan, D. Sun, H. Pfister, and M.-H. Yang. Deblurring images via dark channel prior. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40(10):2315-2328, 2018. 1, 2, 3, 4, 5, 6, 7, 8 + +[30] L. Pan, Y. Dai, M. Liu, and F. Porikli. Simultaneous stereo video deblurring and scene flow estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4382-4391, 2017. 3 +[31] A. Paszke, S. Gross, S. Chintala, G. Chanan, E. Yang, Z. Devito, Z. Lin, A. Desmaison, L. Antiga, and A. Lerer. Automatic differentiation in pytorch. In NIPS Autodiff Workshop: The Future of Gradient-based Machine Learning Software and Techniques, 2017. 5 +[32] D. Perrone and P. 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. 1, 2, 3, 4, 7, 8 +[33] D. Ren, W. Zuo, D. Zhang, L. Zhang, and M.-H. Yang. Simultaneous fidelity and regularization learning for image restoration. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2019. 6 +[34] W. Ren, X. Cao, J. Pan, X. Guo, W. Zuo, and M.-H. Yang. Image deblurring via enhanced low-rank prior. IEEE Transactions on Image Processing, 25(7):3426-3437, 2016. 2, 3, 4 +[35] O. Ronneberger, P. Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical Image Computing and Computer-assisted Intervention, pages 234-241, 2015. 4 +[36] U. Schmidt and S. Roth. Shrinkage fields for effective image restoration. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2774-2781, 2014. 3 +[37] U. Schmidt, C. Rother, S. Nowozin, J. Jancsary, and S. Roth. Discriminative non-blind deblurring. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 604-611, 2013. 3 +[38] C. J. Schuler, M. Hirsch, S. Harmeling, and B. Scholkopf. Learning to deblur. IEEE Transactions on Pattern Analysis and Machine Intelligence, 38(7):1439-1451, 2016. 2, 3 +[39] A. Shocher, N. Cohen, and M. Irani. zero-shot superresolution using deep internal learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3118-3126, 2018. 2, 5 +[40] J. Sun, W. Cao, Z. Xu, and J. Ponce. Learning a convolutional neural network for non-uniform motion blur removal. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 769-777, 2015. 3 +[41] L. Sun, S. Cho, J. Wang, and J. Hays. Edge-based blur kernel estimation using patch priors. In IEEE International Conference on Computational Photography, pages 1-8, 2013. 1, 2, 3, 4, 5, 6, 7 +[42] Y. Tai, J. Yang, and X. Liu. Image super-resolution via deep recursive residual network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, volume 1, page 5, 2017. 2 +[43] X. Tao, H. Gao, X. Shen, J. Wang, and J. Jia. Scale-recurrent network for deep image deblurring. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8174-8182, 2018. 2, 3, 6 + +[44] P. Tseng. Convergence of a block coordinate descent method for nondifferentiable minimization. Journal of optimization theory and applications, 109(3):475-494, 2001. 5 +[45] D. Ulyanov, A. Vedaldi, and V. Lempitsky. Deep image prior. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9446-9454, 2018. 2, 3, 4, 5 +[46] Z. Wang, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli. Image quality assessment: from error visibility to structural similarity. IEEE Transactions on Image Processing, 13(4):600-612, 2004. 6 +[47] O. Whyte, J. Sivic, and A. Zisserman. Deblurring shaken and partially saturated images. International Journal of Computer Vision, 110(2):185-201, 2014. 7 +[48] L. Xu and J. Jia. Two-phase kernel estimation for robust motion deblurring. In European Conference on Computer Vision, pages 157-170, 2010. 1, 6, 7, 8 +[49] L. Xu, S. Zheng, and J. 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. 3, 6, 7 +[50] Y. Yan, W. Ren, Y. Guo, R. Wang, and X. Cao. Image deblurring via extreme channels prior. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4003-4011, 2017. 2, 3, 4 +[51] J. Zhang, J. Pan, J. Ren, Y. Song, L. Bao, R. W. Lau, and M.-H. Yang. Dynamic scene deblurring using spatially variant recurrent neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2521-2529, 2018. 2, 3 +[52] K. Zhang, W. Zuo, Y. Chen, D. Meng, and L. Zhang. Beyond a gaussian denoiser: Residual learning of deep cnn for image denoising. IEEE Transactions on Image Processing, 26(7):3142-3155, 2017. 2 +[53] K. Zhang, W. Zuo, S. Gu, and L. Zhang. Learning deep cnn denoiser prior for image restoration. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3929-3938, 2017. 3 +[54] D. Zoran and Y. Weiss. Scale invariance and noise in natural images. In Proceedings of the IEEE International Conference on Computer Vision, pages 2209-2216, 2009. 5, 7 +[55] D. Zoran and Y. Weiss. From learning models of natural image patches to whole image restoration. In Proceedings of the IEEE International Conference on Computer Vision, pages 479-486, 2011. 3 +[56] W. Zuo, D. Ren, D. Zhang, S. Gu, and L. Zhang. Learning iteration-wise generalized shrinkage-thresholding operators for blind deconvolution. IEEE Transactions on Image Processing, 25(4):1751-1764, 2016. 1, 2, 3, 4, 5, 6, 7 \ No newline at end of file diff --git a/neuralblinddeconvolutionusingdeeppriors/images.zip b/neuralblinddeconvolutionusingdeeppriors/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7cb1ce06aa8c8844042e407f0947de0b3ffa6ff1 --- /dev/null +++ b/neuralblinddeconvolutionusingdeeppriors/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:018eb5392b189d0add67738ae7367397554d552d66fc707dea1104ef8bc33c48 +size 767290 diff --git a/neuralblinddeconvolutionusingdeeppriors/layout.json b/neuralblinddeconvolutionusingdeeppriors/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..36903a04aacd4d510e8607530504e5a1183791a1 --- /dev/null +++ b/neuralblinddeconvolutionusingdeeppriors/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14349c63e5b0a2a0ae88bf2b47038d05dfd2aee3d4d9acbd11cd74b12c6a4994 +size 556429 diff --git a/neuralcagesfordetailpreserving3ddeformations/c300b25a-36b7-4de5-ae79-51257d65e8f0_content_list.json b/neuralcagesfordetailpreserving3ddeformations/c300b25a-36b7-4de5-ae79-51257d65e8f0_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..db43471bd1c8318d7ece385e10a2b282c6ccd342 --- /dev/null +++ b/neuralcagesfordetailpreserving3ddeformations/c300b25a-36b7-4de5-ae79-51257d65e8f0_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e17cadf1fbfe58875c7ca934f0efb1ec61143c4dd098c4448eb00cc61957255 +size 79726 diff --git a/neuralcagesfordetailpreserving3ddeformations/c300b25a-36b7-4de5-ae79-51257d65e8f0_model.json b/neuralcagesfordetailpreserving3ddeformations/c300b25a-36b7-4de5-ae79-51257d65e8f0_model.json new file mode 100644 index 0000000000000000000000000000000000000000..553c8950b93523b96b7c8dfba63fca31e9fc092b --- /dev/null +++ b/neuralcagesfordetailpreserving3ddeformations/c300b25a-36b7-4de5-ae79-51257d65e8f0_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32746c8b2fa2f448cefc097a57b0e78c6ba94eb907eace0276c28725a5191529 +size 98563 diff --git a/neuralcagesfordetailpreserving3ddeformations/c300b25a-36b7-4de5-ae79-51257d65e8f0_origin.pdf b/neuralcagesfordetailpreserving3ddeformations/c300b25a-36b7-4de5-ae79-51257d65e8f0_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e0d8d16f7aee3f649f45b8b992d4cf45d5a20779 --- /dev/null +++ b/neuralcagesfordetailpreserving3ddeformations/c300b25a-36b7-4de5-ae79-51257d65e8f0_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c29faaa49675e6fd69d657d87dbff15946570c6a409b133cdcd3f27e24d04de +size 2150538 diff --git a/neuralcagesfordetailpreserving3ddeformations/full.md b/neuralcagesfordetailpreserving3ddeformations/full.md new file mode 100644 index 0000000000000000000000000000000000000000..340813cd6f8c0b25692ce9a2d5e412093033d523 --- /dev/null +++ b/neuralcagesfordetailpreserving3ddeformations/full.md @@ -0,0 +1,351 @@ +# Neural Cages for Detail-Preserving 3D Deformations + +Wang Yifan $^{1}$ Noam Aigerman $^{2}$ Vladimir G. Kim $^{2}$ Siddhartha Chaudhuri $^{2,3}$ Olga Sorkine-Hornung $^{1}$ + +$^{1}$ ETH Zurich $^{2}$ Adobe Research $^{3}$ IIT Bombay + +# Abstract + +We propose a novel learnable representation for detail-preserving shape deformation. The goal of our method is to warp a source shape to match the general structure of a target shape, while preserving the surface details of the source. Our method extends a traditional cage-based deformation technique, where the source shape is enclosed by a coarse control mesh termed cage, and translations prescribed on the cage vertices are interpolated to any point on the source mesh via special weight functions. The use of this sparse cage scaffolding enables preserving surface details regardless of the shape's intricacy and topology. Our key contribution is a novel neural network architecture for predicting deformations by controlling the cage. We incorporate a differentiable cage-based deformation module in our architecture, and train our network end-to-end. Our method can be trained with common collections of 3D models in an unsupervised fashion, without any cage-specific annotations. We demonstrate the utility of our method for synthesizing shape variations and deformation transfer. + +# 1. Introduction + +Deformation of 3D shapes is a ubiquitous task, arising in many vision and graphics applications. For instance, deformation transfer [25] aims to infer a deformation from a given pair of shapes and apply the same deformation to a novel target shape. As another example, a small dataset of shapes from a given category (e.g., chairs) can be augmented by synthesizing variations, where each variation deforms a randomly chosen shape to the proportions and morphology of another while preserving local detail [29, 32]. + +Deformation techniques usually need to simultaneously optimize at least two competing objectives. The first is alignment with the target, e.g., matching limb positions while deforming a human shape to another human in a different pose. The second objective is adhering to quality metrics, such as distortion minimization and preservation of local geometric features, such as the human's face. These two objectives are contradictory, since a perfect alignment of a deformed source shape to the target precludes preserving the original details of the source. + +![](images/27037cf5b424d8eec531cd837c1e417483fee5feb45e416ed974aacb3233d040.jpg) +Figure 1: Applications of our neural cage-based deformation method. Top: Complex source chairs (brown) deformed (blue) to match target chairs (green), while accurately preserving detail and style with nonhomogeneous changes that adapt different regions differently. No correspondences are used at any stage. Bottom: A cage-based deformation network trained on many posed humans (SMPL) can transfer various poses of novel targets (SCAPE, skeleton, X-Bot, in green) to a very dissimilar robot of which only a single neutral pose is available. A few matching landmarks between the robot and a neutral SMPL human are required. Dense correspondences between SMPL humans are used only during training. + +Due to these conflicting objectives, optimization techniques [17] require parameter tuning to balance the two competing terms, and are heavily reliant on an inferred or manually supplied correspondence between the source and the target. These parameters vary based on the shape category, representation, and the level of dissimilarity between the source and the target. + +To address these limitations, recent techniques train a neural network to predict shape deformations. This is achieved by predicting new positions for all vertices of a template shape [26] or by implicitly representing the deformation as a mapping of all points in 3D, which is then used to map each vertex of a source shape [6, 29]. Examples of the results of some of these methods can be seen in Fig 4, which demonstrates the limitations of such approaches: the predicted deformations corrupt features and exhibit distortion, especially in areas with thin structures, fine details or + +gross discrepancies between source and target. These artifacts are due to the inherent limitations of neural networks to capture, preserve, and generate high frequencies. + +In this paper, we circumvent the above issues via a classic geometry processing technique called cage-based deformation [14, 15, 18], abbreviated to CBD. In CBD, the source shape is enclosed in a very coarse scaffold mesh called the cage (Fig 2). The deformation of the cage is transferred to the enclosed shape by interpolating the translations of the cage vertices. Fittingly, the interpolation schemes in these classic works are carefully designed to preserve details and minimize distortion. + +Our main technical contribution is a novel neural architecture in which, given a source mesh, learnable parameters are optimized to predict both the positioning of the cage around the source shape, as well as the deformation of that cage, which drives the deformation of the enclosed shape in order to match a target shape. The source shape is deformed by deterministically interpolating the new positions of its surface points from those of the cage vertices, via a novel, differentiable, cage-based deformation layer. The pipeline is trained end-to-end on a collection of randomly chosen pairs of shapes from a training set. + +The first key advantage of our method is that cages provide a much more natural space for predicting deformations: CBD is feature-preserving by construction, the degrees of freedom in deformation only depends on the number of vertices on the coarse cage. In short, our network makes a prediction in a low-dimensional space of highly regular deformations. + +The second key advantage is that our method is not tied to a single source shape, nor to a single mesh topology. As the many examples in this paper demonstrate, the trained network can predict and deform cages for similar shapes not observed during training. The target shape can be crude and noisy, e.g., a shape acquired with cheap scanning hardware or reconstructed from an image. Furthermore, dense correspondences between the source and target shapes are not required in general, though they can help when the training set has very varied articulations. Thus the method can be trained on large datasets that are not co-registered and do not have consistently labeled landmarks. + +We show the utility of our method in two main applications. We generate shape variations by deforming a 3D model using other shapes as well as images as targets. We also use our method to pose a human according to a target humanoid character, and, given a few sparse correspondences, perform deformation transfer and pose an arbitrary novel humanoid. See Figures 1, 7, 9 and 4 for examples. + +# 2. Related work + +We now review prior work on learning deformations, traditional methods for shape deformation, and applications. + +Learning 3D deformations. Many recent works in learning 3D geometry have focused on generative tasks, such as synthesis [8, 20] and editing [36] of unstructured geometric data. These tasks are especially challenging if one desires high-fidelity content with intricate details. A common approach to producing intricate shapes is to deform an existing generic [28] or category-specific [7] template. Early approaches represented deformations as a single vector of vertex positions of a template [26], which limited their output to shapes constructable by deforming the specific template, and also made the architecture sensitive to the template tessellation. An alternative is to predict a freeform deformation field over 3D voxels [9, 13, 34]; however, this makes the deformation's resolution dependent on the voxel resolution, and thus has limited capability to adapt to a specific shape categories and source shapes. + +Alternatively, some architectures learn to map a single point at a time, conditioned on some global descriptor of the target shape [7]. These architectures can also work for novel sources by conditioning the deformation field on features of both source and target [6, 29]. Unfortunately, due to network capacity limits, these techniques struggle to represent intricate details and tend to blur high-frequency features. + +Traditional methods for mesh deformation. Research on detail-preserving deformations in the geometry processing community spans several decades and has contributed various formulations and optimization techniques [24]. These methods usually rely on a sparse set of control points whose transformations are interpolated to all remaining points of the shape; the challenge lies in defining this interpolation in a way that preserves details. This can be achieved by solving an optimization problem to reduce the distortion of the deformation such as [23]. However, defining the output deformation as the solution to an intricate non-convex optimization problem significantly limits the ability of a network to learn this deformation space. + +Instead, we use cage-based deformations as our representation, where the source shape is enclosed by a coarse cage mesh, and all surface points are written as linear combinations of the cage vertices, i.e., generalized barycentric coordinates. Many designs have been proposed for these coordinate functions such that shape structure and details are preserved under interpolations [2, 14, 15, 18, 21, 27, 31]. + +Shape synthesis and deformation transfer. Automatically aligning a source shape to a target shape while preserving details is a common task, used to synthesize variations of shapes for amplification of stock datasets [11] or for transferring a given deformation to a new model, targeting animation synthesis [25]. To infer the deformation, correspondence between the two shapes needs to be accounted for, either by explicitly inferring corresponding points [12, 16, 17], or by implicitly conditioning the deformation fields on the latent code of the target shape [6, 9, 29]. Our work builds + +![](images/04eca888881ac01173b25799805ce4034b3f63e42ac3b4e459b86f5aac6f924b.jpg) +Figure 2: Overview. A source $S_{s}$ and a target $S_{t}$ are encoded by the same PointNet encoder $E^{\mathrm{PN}}$ into latent codes $f_{s}$ and $f_{t}$ , resp. An AtlasNet-style decoder $D_{c}^{\mathrm{AN}}$ decodes $f_{s}$ to a source cage $\mathcal{C}_{s}$ in the cage module $\mathcal{N}_{c}$ . Another decoder $D_{d}^{\mathrm{AN}}$ creates the offset for $\mathcal{C}_{s}$ in the deformation module $\mathcal{N}_{d}$ from the concatenation of $f_{s}$ and $f_{t}$ , yielding a deformed cage $\mathcal{C}_{s\rightarrow t}$ . Given a source cage and shape, our novel MVC layer computes the mean value coordinates $\phi^{\mathcal{C}_s}(\mathcal{S}_s)$ , which are used to produce a deformed source shape $S_{s\rightarrow t}$ from the cage deformation $\mathcal{C}_{s\rightarrow t}$ . + +upon the latter learning-based framework, but uses cages to parameterize the space of deformations. + +Gao et al. [4] automate the deformation transfer for unpaired shapes using cycled generative adversarial networks, thus the trained method cannot be easily adapted for new shape targets. Some prior techniques focus on transferring and interpolating attributes between various latent spaces trained for shape generation [5,33]. These generative models are not capable of fully preserving local geometric features, especially if the source is not pre-segmented into simpler primitives (as assumed by [5]). In general, such methods are only expected to perform well if the input shapes are relatively similar to those observed at training time. + +# 3. Method + +We now detail our approach for learning cage-based deformations (CBD). We start with a brief overview of the principles of CBD, and then explain how we train a network to control these deformations from data. The implementation is available at https://github.com/yifita/deep_cage. + +# 3.1. Cage-based deformations + +CBD are a type of freeform space deformations. Instead of defining a deformation solely on the surface $S$ , space deformations warp the entire ambient space in which the shape $S$ is embedded. In particular, a CBD controls this warping via a coarse triangle mesh, called a cage $\mathcal{C}$ , which typically encloses $S$ . Given the cage, any point in ambient space $\mathbf{p} \in \mathbb{R}^3$ is encoded via generalized barycentric coordinates, as a weighted average of the cage vertices $\mathbf{v}_j$ : $\mathbf{p} = \sum \phi_j^{\mathcal{C}}(\mathbf{p}) \mathbf{v}_j$ , where the weight functions $\{\phi_j^{\mathcal{C}}\}$ depend on the relative position of $\mathbf{p}$ w.r.t. to the cage vertices $\{\mathbf{v}_j\}$ . The deformation of any point in ambient space is obtained by simply offsetting the cage vertices and interpolating their new positions $\mathbf{v}_j'$ with the pre-computed weights, i.e. + +$$ +\mathbf {p} ^ {\prime} = \sum_ {0 \leq j < | V _ {c} |} \phi_ {j} ^ {\mathcal {C}} (\mathbf {p}) \mathbf {v} _ {j} ^ {\prime}. \tag {1} +$$ + +Previous works on CBD constructed various formulae to attain weight functions $\{\phi_j^{\mathcal{C}}\}$ with specific properties, such as interpolation, linear precision, smoothness and distortion minimization. We choose mean value coordinates (MVC) [15] for their feature preservation and interpolation properties, as well as simplicity and differentiability w.r.t. the source and deformed cages' coordinates. + +# 3.2. Learning cage-based deformation + +As our goal is an end-to-end pipeline for deforming shapes, we train the network to predict both the source cage and the target cage, in order to optimize the quality of the resulting deformation. Given a source shape $S_{s}$ and a target shape $S_{t}$ , we design a deep neural network that predicts a cage deformation that warps $S_{s}$ to $S_{t}$ while preserving the details of $S_{s}$ . Our network is composed of two branches, as illustrated in Fig 2: a cage-prediction model $\mathcal{N}_c$ , which predicts the initial cage $\mathcal{C}_s$ around $S_{s}$ , and a deformation-prediction model $\mathcal{N}_d$ , which predicts an offset from $\mathcal{C}_s$ , yielding the deformed cage $\mathcal{C}_{s\rightarrow t}$ , i.e. + +$$ +\mathcal {C} _ {s} = \mathcal {N} _ {c} \left(\mathcal {S} _ {s}\right) + \mathcal {C} _ {0}, \quad \mathcal {C} _ {s \rightarrow t} = \mathcal {N} _ {d} \left(\mathcal {S} _ {t}, \mathcal {S} _ {s}\right) + \mathcal {C} _ {s} \tag {2} +$$ + +Since both branches are differentiable, they can be both learned jointly in an end-to-end manner. + +The branches $\mathcal{N}_c$ and $\mathcal{N}_d$ only predict the cage and do not directly rely on the detailed geometric features of the input shapes. Hence, our network does not require high-resolution input nor involved tuning for the network architectures. In fact, both $\mathcal{N}_c$ and $\mathcal{N}_d$ follow a very streamlined design: their encoders and decoders are simplified versions of the ones used in AtlasNet [8]. We remove the batch normalization and reduce the channel sizes, and instead of feeding 2D surface patches to the decoders, we feed a template cage $\mathcal{C}_0$ and the predicted initial cage $\mathcal{C}_s$ to the cage predictor and deformer respectively, and let them predict the offsets. By default, $\mathcal{C}_0$ is a 42-vertex sphere. + +# 3.3. Loss terms + +Our loss incorporates three main terms. The first term optimizes the source cage to encourage positive mean value coordinates. The two latter terms optimize the deformation, the first by measuring alignment to target and the second by measuring shape preservation. Together, these terms comprise our basic loss function: + +$$ +\mathcal {L} = \alpha_ {\mathrm {M V C}} \mathcal {L} _ {\mathrm {M V C}} + \mathcal {L} _ {\text {a l i g n}} + \alpha_ {\text {s h a p e}} \mathcal {L} _ {\text {s h a p e}}. \tag {3} +$$ + +We use $\alpha_{\mathrm{MVC}} = 1$ , $\alpha_{\mathrm{shape}} = 0.1$ in all experiments. + +To optimize the mean value coordinates of the source cage, we penalize negative weight values, which emerge when the source cage is highly concave, self-overlapping, or when some of the shape's points lie outside the cage: + +![](images/791b9c4ed91ecbd6ca78044258d8bbf603518293803eedbc14d260f6ad300f7b.jpg) +Figure 3: Synthesizing variations of source shapes (brown), by deforming them to match targets (green). + +$$ +\mathcal {L} _ {\mathrm {M V C}} = \frac {1}{| \mathcal {C} _ {s} | | \mathcal {S} _ {s} |} \sum_ {i = 1} ^ {| \mathcal {S} _ {s} |} \sum_ {j = 1} ^ {| \mathcal {C} _ {s} |} \left| \min \left(\phi_ {j i}, 0\right) \right| ^ {2}, \tag {4} +$$ + +where $\alpha_{\mathrm{MVC}}$ is the loss weight, and $\phi_{ji}$ denotes the coordinates of $\mathbf{p}_i\in S_s$ w.r.t. $\mathbf{v}_j\in \mathcal{C}_s$ + +$\mathcal{L}_{\mathrm{align}}$ is measured either via chamfer distance in the unsupervised case sans correspondences, or as the L2 distance when supervised with correspondences. + +The above two losses drive the deformation towards alignment with the target, but this may come at the price of preferring alignment over feature preservation. Therefore, we add terms that encourage shape preservation. Namely, we draw inspiration from Laplacian regularizers [7, 19, 29], but propose to use a point-to-surface distance as an orientation-invariant, second-order geometric feature. Specifically, for each point $\mathbf{p}$ on the source shape, we fit a PCA plane to a local neighborhood $\mathcal{B}$ (we use the one-ring of the mesh), and then compute the point-to-plane distance as $d = \| \mathbf{n}^T (\mathbf{p} - \mathbf{p}_{\mathcal{B}})\|$ , where $\mathbf{n}$ denotes the normal of the PCA plane and $\mathbf{p}_{\mathcal{B}} = \frac{1}{|\mathcal{B}|}\sum_{\mathbf{q}\in \mathcal{B}(\mathbf{p})}\mathbf{q}$ is the centroid of the local neighborhood around $\mathbf{p}$ . We then penalize change in the distance $d_{i}$ for each vertex on the surface: + +$$ +\mathcal {L} _ {\mathrm {p 2 f}} = \frac {1}{| \mathcal {S} _ {s} |} \sum_ {i = 1} ^ {| \mathcal {S} _ {s} |} \| d _ {i} - d _ {i} ^ {\prime} \| ^ {2} \tag {5} +$$ + +where $d_i'$ is the distance post deformation. In contrast to the uniform Laplacian, which considers the distance to the centroid and hence yields a non-zero value whenever the local neighborhood is not evenly distributed, the proposed point-to-surface distance better describes the local geometric features. + +For man-made shapes, we use two additional losses that leverage priors of this shape class. First, normal consistency is important for, e.g., preserving the planarity of elements like tabletops. To encourage this, we penalize the angular + +difference of PCA normals before and after deformation: + +$$ +\mathcal {L} _ {\text {n o r m a l}} = \frac {1}{| \mathcal {S} _ {s} |} \sum_ {i} ^ {| \mathcal {S} _ {s} |} (1 - \mathbf {n} _ {i} ^ {T} \mathbf {n} _ {i} ^ {\prime}), \tag {6} +$$ + +where $\mathbf{n}^{\prime}$ denotes the PCA-normal after the deformation. As demonstrated later, this normal penalty considerably improves the perceptual quality of the deformation. Second, similarly to Wang et al. [29], we also use the symmetry loss $\mathcal{L}_{\mathrm{symm}}$ , measured as the chamfer distance between the shape and its reflection around the $x = 0$ plane. We apply this loss to the deformed shape $S_{s\rightarrow t}$ as well as the cage $\mathcal{C}_s$ . Thus, our final shape preservation loss is: $\mathcal{L}_{\mathrm{shape}} = \mathcal{L}_{\mathrm{p2f}} + \mathcal{L}_{\mathrm{normal}} + \mathcal{L}_{\mathrm{symm}}$ for man-made shapes and $\mathcal{L}_{\mathrm{shape}} = \mathcal{L}_{\mathrm{p2f}}$ for characters. + +# 4. Applications + +We now showcase two applications of the trained cage-based deformation network. + +# 4.1. Stock amplification via deformation + +Creating high-quality 3D assets requires significant time, technical expertise, and artistic talent. Once the asset is created, the artist commonly deforms the model to create several variations of it. Inspired by prior techniques on automatic stock amplification [29], we use our method to learn a meaningful deformation space over a collection of shapes within the same category, and then use random pairs of source and target shapes to synthesize plausible variations of artist-generated assets. + +Training details. We train our model on the chair, car and table categories from ShapeNet [3] using the same splitting into training and testing sets as in Grouiex et al. [6]. We then randomly sample 100 pairs from the test set. Each shape is normalized to fit in a unit bounding box and is represented by 1024 points. + +Variation synthesis examples. Fig 3 shows variations generated from various source-target pairs, exhibiting the regularizing power of the cages: even though our training omits all semantic supervision such as part labels, these variations are plausible and do not exhibit feature distortions; fine details, such as chair slats, are preserved. + +Comparisons. We compared our target-driven deformation method to other methods that strive to achieve the same goal. Results are shown in Fig 4. While in many cases alternative techniques do align the deformed shape the target, in all cases they introduce significant artifacts in the deformed meshes. + +We first compare to a non-learning-based approach: non-rigid ICP [10], a classic registration technique that alternates between correspondence estimation and optimization of a non-rigid deformation to best align corresponding points. We show results with the optimal registration parameters we found to achieve detail preservation. Clearly, + +![](images/81a3b33e7142781a6935206af9ffc41014889a15cb8c71451d8235daa4dc69a1.jpg) +Figure 4: Comparison of our method with other non-homogeneous deformation methods. Our method achieves superior detail preservation of the source shape in comparison to optimization-based [10] and learning-based [6,9,29] techniques, while still aligning the output to the target. + +![](images/bc8f571ce2890d67d6d5be836416a558d89ad7f33cdc12e62d570cf15056c09b.jpg) +Figure 5: Quantitative evaluation of our method vs alternative methods. Each point represents a method, embedded according to its average alignment error (Chamfer Distance) and distortion ( $\Delta$ CotLaplacian). Points near the bottom-left corners are better. + +ICP is sensitive to wrong correspondences that cause convergence to artifact-ridden local minima. We also compare to learning-based methods that directly predict per-point transformations and leverage cycle-consistency (CC) [6] or feature-preserving regularization (3DN) [29] to learn low-distortion shape deformations. Both methods blur and omit features, while also creating artifacts by stretching small parts. We also compare to ALIGNNet [9], a method that predicts a freeform deformation over a voxel grid, yielding a volumetric deformation of the ambient space simi + +larly to our technique. Contrary to our method, the coarse voxel grid cannot capture the fine deformation of the surface needed to avoid large artifacts. Our training setup is identical to CC, and we retrained 3DN and ALIGNNet with the same setup using parameters suggested by the authors. + +In Fig 6 we compare our results to the simplest of deformation methods - anisotropic scaling, achieved by simply + +rescaling the source bounding box to match that of the target. While local structure is well preserved, this method cannot account for the different proportion changes required for different regions, highlighting the necessary intricacy of the optimal deformation in this case. + +![](images/0784d9a5ab4dead0617510c4f52657bcf427863699e82ad321a2746d0e4e9b35.jpg) +Figure 6: Comparison of our method with anisotropic scaling. Our method better matches corresponding semantic parts. + +Quantitative comparisons. in Fig 5, we quantitatively evaluate the various methods using two metrics: distance to the target shape, and detail preservation, measured via + +![](images/8deeb901f75ab532287ca73af718617c02145ed7d2605ea1a917a5a63436f256.jpg) +Figure 7: We use our method to deform a 3D shape to match a real 2D image. We first use AtlasNet [8] to reconstruct a 3D proxy target. Despite the poor quality of the proxy, it still serves as a valid target for our network to generate a matching output preserving the fine details of the source. + +chamfer distance (computed over a dense set of 5000 uniformly sampled points) and difference in cotangent Laplacians, respectively. Note that these metrics do not favor any method, since all optimize for a variant of chamfer distance, and none of the methods optimize for the difference in the cotangent Laplacian. Each 2D point in the figure represents one method, with the point's coordinates prescribed with respect to the two metrics, the origin being ideal. This figure confirms our qualitative observations: our method is more effective at shape preservation than most alternatives while still capturing the gross structure of the target. + +Using images as targets. Often, a 3D target is not readily available. Images are more abundant and much easier to acquire, and thus pose an appealing alternative. We use a learning-based single-view reconstruction technique to create a proxy target to use with our method to find appropriate deformation parameters. We use publicly available product images of real objects and execute AtlasNet's SVR reconstruction [8] to generate a coarse 3D proxy as a target. Fig 7 shows that even though the proxy has coarse geometry and many artifacts, these issues do not affect the deformation, and the result is still a valid variation of the source. + +# 4.2. Deformation transfer + +Given a novel 3D model, it is much more time-efficient to automatically deform it to mimic an existing example deformation, than having an artist deform the novel model directly. This automatic task is called deformation transfer. The example deformation is given via a model in a rest pose $S_{s}$ , and a model in the deformed pose $S_{t}$ . The novel 3D model is given in a corresponding rest post $S_{s'}$ . The goal is to deform the novel model to a position $S_{t'}$ so that the deformation $S_{s'} \rightarrow S_{t'}$ is analogous to $S_{s} \rightarrow S_{t}$ . This task can be quite challenging, as the example deformation $S_{t}$ may have very different geometry, or even come from an ad-hoc scan, and thus dense correspondences between $S_{s}$ and $S_{t}$ are unavailable, preventing the use of traditional + +![](images/3c4be48bf62ed2d1704246c50314c2a8aa04be1a2a56fad281f9fa6684eaac32.jpg) +Figure 8: The deformation model, trained to deform a fixed source (left) to various articulations. + +mesh optimization techniques such as [25]. Furthermore, as the novel character $S_{s'}$ may be significantly different from all models observed during training, it is impossible to a priori learn a deformation subspace for $S_{s'}$ unless sufficient pose variations of $S_{s'}$ is available, as in Gao et al. [4]. + +We demonstrate that our learning-based approach can be used to perform deformation transfer on arbitrary humanoid models. The network infers the deformation from the source $S_{s}$ to the target $S_{t}$ , without any given correspondences, and then an optimization-based method transfers this deformation to a novel shape $S_{s'}$ to obtain the desired deformation $S_{t'}$ . Hence, given any arbitrarily-complex novel character, all our method requires are sparse correspondences supplying the necessary alignment between the two rest poses, $S_{s}$ and $S_{s'}$ . We now overview the details of our learned cage-based human deformation model and the optimization technique used to transfer the deformations. + +Learning cage-based human deformation. To train our human-specific deformation model, we use the dataset [7] generated using the SMPL model [1] of 230K models of various humans in various poses. Since our application assumes that the exemplar deformation is produced from a single canonical character, we picked one human in the dataset to serve as $S_{s}$ . Subsequently, since we only have one static source shape $S_{s}$ , we use a static cage $C_{s}$ manually created with 77 vertices, and hence do not need the cage prediction network $N_{c}$ and only use the deformation network $N_{d}$ . We train $N_{d}$ to deform the static $S_{s}$ using the static $C_{s}$ into exemplars $S_{t}$ from the dataset (with targets not necessarily stemming from the same humanoid model as $S_{s}$ ). We then train with the loss in (3), but with one modification: in similar fashion to prior work, during training we use ground truth correspondences and hence replace the chamfer distance with the L2 distance w.r.t the known correspondences. Note that these correspondences are not used at inference time. + +Lastly, during training we also optimize the static source cage $\mathcal{C}_c$ by treating its vertices as degrees of freedom and directly optimizing them to reduce the loss so as to attain a more optimal, but still static cage after training. + +Fig 8 shows examples of human-specific cage deformations predicted for test targets (not observed while training). Note how our model successfully matches poses even without knowing correspondences at inference time, while preserving fine geometric details such as faces and fingers. + +![](images/891a916bf6e60f33dcd7bac09d08386ad3194e6d6a81a9f3ba34c2c1664c9388.jpg) +Figure 9: Deformation transfer. We first learn the cage deformation space for a template source shape (top left) with known pose and body shape variations. Then, we annotate predefined landmarks on new characters in neutral poses (left column, rows 2-4). At test time, given novel target poses (top row, green) without known correspondences to the template, we transfer their poses to the other characters (blue). + +Transferring cage deformations. After training, we have at our disposal the deformation network $\mathcal{N}_d$ and the static $\mathcal{C}_s$ , $\mathcal{S}_s$ . We assume to be given a novel character $S_{s'}$ with 83 landmark correspondences aligning it to $S_s$ , and an example target pose $S_t$ . Our goal is to deform $S_{s'}$ into a new pose $S_{t'}$ that is analogous to the deformation of $S_s$ into $S_t$ . + +We first generate a new cage $\mathcal{C}_{s'}$ for the character $S_{s'}$ . Instead of a network-based prediction, we simply optimize the static cage $\mathcal{C}_s$ , trying to match mean value coordinates between corresponding points of $S_s, S_{s'}$ : + +$$ +\mathcal {L} _ {\text {c o n s i s t e n c y}} = \sum_ {j} \sum_ {(p, q)} \| \phi_ {j} ^ {\mathcal {C} _ {s}} (p) - \phi_ {j} ^ {\mathcal {C} _ {s} ^ {\prime}} (q) \| ^ {2} \tag {7} +$$ + +where $(p,q)$ are corresponding landmarks. We also regularize with respect to the cotangent Laplacian of the cage: + +$$ +\mathcal {L} _ {\mathcal {C} \text {l a p}} = \sum_ {0 \leq j < | \mathcal {C} _ {s} |} \left(\| L _ {\cot} \mathbf {v} _ {j} \| - \| L _ {\cot} \mathbf {v} _ {j} ^ {\prime} \|\right) ^ {2}. \tag {8} +$$ + +Then, we compute $\mathcal{C}_{s'}$ by minimizing $\mathcal{L} = \mathcal{L}_{\mathrm{consistency}} + 0.05\mathcal{L}_{\mathrm{Clap}}$ , with $\mathcal{C}_s$ used as initialization, solved via the Adam optimizer with step size $5 \cdot 10^{-4}$ and up to $10^{4}$ iterations (or until $\mathcal{L}_{\mathrm{consistency}} < 10^{-5}$ ). + +Finally, given the cage $\mathcal{C}_{s'}$ for the novel character, we compute the deformed cage $\mathcal{C}_{s' \to t'}$ , using our trained deformation network, by applying the predicted offset to the optimized cage: $\mathcal{C}_{s' \to t'} = \mathcal{N}_d(S_t, S_{s'}) + \mathcal{C}_{s'}$ . The final deformed shape $S_{t'}$ is computed by deforming $S_{s'}$ using the cage $\mathcal{C}_{s' \to t'}$ via (1). This procedure is illustrated in Fig 10, while more examples can be found in the supplemental material. Due to the agnostic nature of cage-deformations to the underlying shape, we are able to seamlessly combine machine learning and traditional geometry processing to generalize to never-observed characters. To demonstrate the expressiveness of our method, we show examples on extremely dissimilar target characters in Figures 1 and 9. + +![](images/1aa59a6b18103faca7ee0c935d574390212390c1ba147c2364d83f327c37e8d9.jpg) +template source + +![](images/ec1f098e2b5a6ab0bd4196268e287d9b4f9fe4d9dec94488a00d3d35c1cd9750.jpg) +novelsourc + +![](images/09f8367886cc09be76993e4e16c54cf2d30d120a09ef3fa1702b3c0d4c19c0a3.jpg) +transferred deformation: cage and shape + +![](images/94c1df989767cdd273aac6cdeb997bd70b012eb0e3532b226d0630cdfed62edc.jpg) +Figure 10: In deformation transfer, the manually created cage for a template shape (leftmost) is fitted to a novel source shape (second left) by optimizing MVC of a sparse set of aligned landmarks. The learnt deformation can be directly applied to the fitted source cage (columns 3-4), preserving rich geometric features (right). + +![](images/3ffb53342fb7a9bdecff62e8118e26625dfd3cd1e172bc9700474974c2b5df17.jpg) +geometric details + +![](images/488bea78fdd3f2dc4cd2e734f18bcfa9a2fafbbf08c9504244f100d834ee9911.jpg) + +![](images/1e308a7768c99b1fa6d37be8a6c9d5c5235c8a3a17e3b2d2a614ce3337dbeb54.jpg) +Source + +![](images/993349011d1fd76c54e78d50493a31605304cb9c46ddaba48022a544f6bf8124.jpg) +Example 1 +Target + +![](images/2c677c3bf1c09c4fe560a91f80c09044dbd733c76ff190afd8f9fbc8b2b1ece3.jpg) +Opt. + +![](images/e0cdb7efbd059eb7d47a83cb8c5be6d397c3f8d353284b4bad44dd3dff7c9173.jpg) +Ours +Figure 11: Our approach produces more plausible inter-shape correspondences and deformations than per-pair optimization. + +![](images/437ce175d7bba92ae306eba8384ffe2996effa824fe88223047a707d44496bdc.jpg) +Source + +![](images/e973eb8e83d79ecfa6e74218185d6cd64ff5d0fc92978c85fcb5ef5d703f1a15.jpg) +Target + +![](images/ff3fa83cac56291e19c5cd55e00f4f805d81bd314c3c30db53b528ec316e93eb.jpg) +Opt. + +![](images/177fbe6dd6d1d5cd81816a75095a147a75b3d1d31b6a64ef8ec4d6e88c8c687d.jpg) +Ours + +# 5. Evaluation + +In this section, we study the effects and necessity of the most relevant components of our methods. To measure the matching error we use chamfer distance computed on 5000 uniformly resampled points, and to measure the feature distortion we use the distance between cotangent Laplacians. All models are normalized to a unit bounding box. + +Benefit of learning CBD from data. Instead of learning the CBD from a collection of data, one could minimize (3) for a single pair of shapes, which is essentially a non-rigid Iterative-Closest-Point (ICP) parameterised by cage vertices. As shown in Fig 11, when correct correspondence estimation becomes challenging, the optimization alternative produces non-plausible outputs. In contrast, the learnt approach utilizes domain knowledge embedded in the network's parameters [22, 35], amounting to better reasoning about the plausibility of inter-shape correspondences and deformations. The learned domain knowledge can generalize to new data. As demonstrated in Sec 4.2, even though our network is trained with ground-truth correspondences, it is able to automatically associate the source shape to a new target without correspondences during inference, while optimization methods require accurate correspondence estimation for every new target. + +Effect of the negative MVC penalty, $\mathcal{L}_{\mathrm{MVC}}$ . in Fig 12 we show the effect of penalizing negative mean value coordinates. We train our architecture on 300 vase shapes from COSEG [30], while varying the weight $\alpha_{\mathrm{MVC}} \in \{0,1,10\}$ . Increasing this term brings the cages closer to the shapes' convex hulls, leading to more conservative deformations. Quantitative results in Table 1a also suggest that increasing the weight $\alpha_{\mathrm{MVC}}$ favors shape preservation over alignment accuracy. Completely eliminating this term hurts convergence, and increases the alignment error further. + +![](images/b6cac55bfc56b70f606b7d9a9f89eb5dbe185659a0c3e0f12f986b1214b2fa68.jpg) +Source $S_{s}$ Target $S_{t}$ + +![](images/24fa564a106d242a6de04add3e0f6a6ac57ec699670a8d9add3fab2490580efb.jpg) +Source + +![](images/a5ceaadbae4597f68b2edaea006258b8823a9b056f00b015b13cba6423ef7d29.jpg) +Deformed Deformed +Figure 12: Effect of $\mathcal{L}_{\mathrm{MVC}}$ . Higher regularization yields more conservative deformations. + +![](images/7107a2115a759d739ddb8ca14648938ed36be998222cec4c4da79ad4e282ba4f.jpg) +Source Deform +ed Deformed + +![](images/e8ec2123e8b4983a00aa24d0e6797275b3a251b9603cc1c60019ec010f8cadd1.jpg) + +
AblationCDΔCotLaplacian
αMVC = 01.649.04
αMVC = 11.448.74
αMVC = 102.658.27
(a) Effect of the MVC loss, L_MVC
L_shape = L_lap + L.symm5.164.75
L_shape = L_p2f + L.symm4.864.70
L_shape = L_normal + L.symm5.454.33
(b) Effect of the shape preservation losses, L_shape
Nc=Identity3.275.65
Nc=Source-invariant3.1112.05
Nc=Ours3.0610.45
(c) Design choices for cage prediction network, Nc
+ +Table 1: We evaluate effect of different losses $(\mathcal{L}_{\mathrm{MVC}},\mathcal{L}_{\mathrm{shape}})$ and components $(\mathcal{N}_c)$ of our pipeline with respect to chamfer distance (CD, scaled by $10^{2}$ ) and cotangent Laplacian (scaled by $10^{3}$ ). + +Effect of the shape preservation losses, $\mathcal{L}_{\mathrm{shape}}$ . In Fig 13 we compare deformations produced with the full loss $(\mathcal{L}_{\mathrm{shape}} = \mathcal{L}_{\mathrm{p2f}} + \mathcal{L}_{\mathrm{normal}} + \mathcal{L}_{\mathrm{symm}})$ to ones produced with only one of the first two loss terms. While we did not use the Laplacian regularizer $\mathcal{L}_{\mathrm{lap}}$ as in [29], it seems to have an effect equivalent to $\mathcal{L}_{\mathrm{p2f}}$ . As expected, $\mathcal{L}_{\mathrm{normal}}$ prevents bending of rigid shapes. We quantitatively evaluate these regularizers in Table 1b, which suggests that $\mathcal{L}_{\mathrm{p2f}}$ is slightly better as the deformed shape is more aligned with the target than $\mathcal{L}_{\mathrm{lap}}$ , even though shape preservation has not been sacrificed. $\mathcal{L}_{\mathrm{normal}}$ reduces distortion even further. + +Design choices for the cage prediction network, $\mathcal{N}_c$ . The cage prediction network $\mathcal{N}_c$ morphs the template cage mesh (a 42-vertex sphere) into the initial cage enveloping the source shape. In Fig 14 and Table 1c we compare to two alternative design choices for this module: an Identity module retains the template cage, and a source-invariant module in which we optimize the template cage's vertex coordinates with respect to all targets in the dataset, but then use the same fixed cage for testing. Learning source-specific cages produces deformations closest to the target with minimum detail sacrifice. As expected, fixing the template cage produces more rigid deformations, yielding lower distortion at the price of less-aligned results. + +# 6. Conclusion + +We show that classical cage-based deformation provides a low-dimensional, detail-preserving deformation space directly usable in a deep-learning setting. We implement cage + +![](images/bfc3226768569f05b76762ca2867dbcb40faa949591ee8cd2544aa6fe0129922.jpg) +Source $S_{s}$ + +![](images/88a92f6c4d86b802f9808ca26b0a9c0e2f52a173cc9996554eda40c2954d335f.jpg) +Target $S_{t}$ + +![](images/1be4ae4102f4beac1b80de4292073986182201f0a8713206c97694a64f68959c.jpg) +$\mathcal{L}_{\mathrm{lap}}$ + +![](images/4eb85d72745ea50d788197ba7538fb03d72974ecc622f796611f112e27ce6cf0.jpg) +$\mathcal{L}_{\mathrm{p2f}}$ + +![](images/cc753a7ebb26f341b47836d8126c9bab24f364f12ab7f680c8ce0a9a0e6f17d6.jpg) +$\mathcal{L}_{\mathrm{normal}}$ + +![](images/e7dad070594ce122285eab7d431a68769cb4c26c33bdaf9f35a08232444aecb1.jpg) +Figure 13: The effect of different shape preservation losses, note that all results include $\mathcal{L}_{\mathrm{symm}}$ . +Figure 14: The effect of source-cage prediction. We compare our per-instance prediction of $\mathcal{N}_c$ with (1) a static spherical cage (top right) and (2) a single optimized cage prediction over the entire training set (bottom right). Our approach achieves better alignment with the target shape. + +weight computation and cage-based deformation as differentiable network layers, which could be used in other architectures. Our method succeeds in generating feature-preserving deformations for synthesizing shape variations and deformation transfer, and better preserves salient geometric features than competing methods. + +A limitation of our approach is that we focus on the deformation quality produced by the predicted cages: hence, the cage geometry itself is not designed to be comparable to professionally-created cages for 3D artists. Second, our losses are not quite sufficient to always ensure rectilinear/planar/parallel structures in man-made shapes are perfectly preserved (Fig 13). Third, for certain types of deformations other parameterizations might be a more natural choice, such as skeleton-based deformation for articulations, nonetheless the idea presented in this paper can be adopted for similarly. + +Our method provides an extensible and versatile framework for data-driven generation of high detail 3D geometry. In the future we would like to incorporate alternative cage weight computation layers, such as Green Coordinates [18]. Unlike MVC, this technique is not affine-invariant, and thus would introduce less affine distortion for large articulations (see the second row fourth column in Fig 9). We also plan to use our method in other applications such as registration, part assembly, and generating animations. + +# Acknowledgments + +We thank Rana Hanocka and Dominic Jack for their extensive help. The robot model in Figures 1 and 9 is from SketchFab, licensed under CC-BY. This work was supported in part by gifts from Adobe, Facebook and Snap. + +# References + +[1] Federica Bogo, Javier Romero, Matthew Loper, and Michael J Black. FAUST: Dataset and evaluation for 3D mesh registration. In CVPR, pages 3794-3801, 2014. +[2] Stéphane Calderon and Tamy Boubekeur. Bounding proxies for shape approximation. ACM Trans. Graph., 36(4):57, 2017. +[3] 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], 2015. +[4] Lin Gao, Jie Yang, Yi-Ling Qiao, Yu-Kun Lai, Paul L Rosin, Weiwei Xu, and Shihong Xia. Automatic unpaired shape deformation transfer. In SIGGRAPH Asia, 2018. +[5] Lin Gao, Jie Yang, Tong Wu, Yu-Jie Yuan, Hongbo Fu, Yu-Kun Lai, and Hao(Richard) Zhang. SDM-NET: Deep generative network for structured deformable mesh. ACM Trans. Graph., 38(6):243:1-243:15, 2019. +[6] Thibault Groueix, Matthew Fisher, Vladimir Kim, Bryan Russell, and Mathieu Aubry. Unsupervised cycle-consistent deformation for shape matching. In SGP, 2019. +[7] Thibault Groueix, Matthew Fisher, Vladimir G Kim, Bryan C Russell, and Mathieu Aubry. 3D-CODED: 3D correspondences by deep deformation. In ECCV, 2018. +[8] 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 CVPR, 2018. +[9] Rana Hanocka, Noa Fish, Zhenhua Wang, Raja Giryes, Shachar Fleishman, and Daniel Cohen-Or. ALIGNNet: partial-shape agnostic alignment via unsupervised learning. ACM Trans. Graph., 38(1):1, 2018. +[10] 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), 2018. +[11] Qixing Huang, Hai Wang, and Vladlen Koltun. Single-view reconstruction via joint analysis of image and shape collections. ACM Trans. Graph., 34(4):87:1-87:10, 2015. +[12] Qi-Xing Huang, Bart Adams, Martin Wicke, and Leonidas J. Guibas. Non-rigid registration under isometric deformations. In SGP, 2008. +[13] Dominic Jack, Jhony K Pontes, Sridha Sridharan, Clinton Fookes, Sareh Shirazi, Frederic Maire, and Anders Eriksson. Learning free-form deformations for 3D object reconstruction. In ACCV, 2018. +[14] Pushkar Joshi, Mark Meyer, Tony DeRose, Brian Green, and Tom Sanocki. Harmonic coordinates for character articulation. ACM Trans. Graph., 26(3), 2007. +[15] Tao Ju, Scott Schaefer, and Joe Warren. Mean value coordinates for closed triangular meshes. ACM Trans. Graph., 24(3):561-566, 2005. +[16] Hao Li, Linjie Luo, Daniel Vlasic, Pieter Peers, Jovan Popovic, Mark Pauly, and Szymon Rusinkiewicz. Tempo + +rally coherent completion of dynamic shapes. ACM Trans. Graph., 31(1), 2012. +[17] Hao Li, Robert W. Sumner, and Mark Pauly. Global correspondence optimization for non-rigid registration of depth scans. In SGP, 2008. +[18] Yaron Lipman, David Levin, and Daniel Cohen-Or. Green coordinates. ACM Trans. Graph., 27(3), 2008. +[19] Shichen Liu, Tianye Li, Weikai Chen, and Hao Li. Soft Rasterizer: A differentiable renderer for image-based 3D reasoning. In ICCV, 2019. +[20] Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3D reconstruction in function space. In CVPR, 2019. +[21] Leonardo Sacht, Etienne Vouga, and Alec Jacobson. Nested cages. ACM Trans. Graph., 34(6):170:1-170:14, 2015. +[22] Tamar Rott Shaham, Tali Dekel, and Tomer Michaeli. Singan: Learning a generative model from a single natural image. In ICCV, 2019. +[23] Olga Sorkine and Marc Alexa. As-rigid-as-possible surface modeling. In SGP, 2007. +[24] Olga Sorkine and Mario Botsch. Interactive shape modeling and deformation. In EUROGRAPHICS Tutorials, 2009. +[25] Robert W. Sumner and Jovan Popovic. Deformation transfer for triangle meshes. ACM Trans. Graph., 23(3):399-405, 2004. +[26] Qingyang Tan, Lin Gao, Yu-Kun Lai, and Shihong Xia. Variational autoencoders for deforming 3D mesh models. In CVPR, 2018. +[27] Jean-Marc Thiery, Julien Tierny, and Tamy Boubekeur. CageR: Cage-based reverse engineering of animated 3D shapes. Computer Graphics Forum, 31(8):2303-2316, 2012. +[28] 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. +[29] Weiyue Wang, Duygu Ceylan, Radomir Mech, and Ulrich Neumann. 3DN: 3D deformation network. In CVPR, 2019. +[30] Zizhao Wu, Ruyang Shou, Yunhai Wang, and Xinguo Liu. Interactive shape co-segmentation via label propagation. Computers & Graphics, 38:248-254, 2014. +[31] Chuhua Xian, Hongwei Lin, and Shuming Gao. Automatic cage generation by improved OBBs for mesh deformation. The Visual Computer, 28(1):21-33, 2012. +[32] Kai Xu, Honghua Li, Hao Zhang, Daniel Cohen-Or, Yueshan Xiong, and Zhi-Quan Cheng. Style-content separation by anisotropic part scales. ACM Trans. Graph., 29(6):184:1-184:10, 2010. +[33] Kangxue Yin, Zhiqin Chen, Hui Huang, Daniel Cohen-Or, and Hao Zhang. LOGAN: Unpaired shape transform in latent overcomplete space. ACM Trans. Graph., 38(6):198:1-198:13, 2019. +[34] M. E. Yumer and N. J. Mitra. Learning semantic deformation flows with 3D convolutional networks. In ECCV, 2016. +[35] Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In ECCV, 2014. +[36] Chenyang Zhu, Kai Xu, Siddhartha Chaudhuri, Renjiao Yi, and Hao Zhang. SCORES: Shape composition with recursive substructure priors. ACM Trans. Graph., 37(6), 2018. \ No newline at end of file diff --git a/neuralcagesfordetailpreserving3ddeformations/images.zip b/neuralcagesfordetailpreserving3ddeformations/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..1870255735b4e607b32dea990518758b1dac9914 --- /dev/null +++ b/neuralcagesfordetailpreserving3ddeformations/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c0b8b2b2f50522cb6ac27d7e911d6f5fde07f35b515d90145cd0a96e94c21ad +size 558989 diff --git a/neuralcagesfordetailpreserving3ddeformations/layout.json b/neuralcagesfordetailpreserving3ddeformations/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..df49ab840cd159cd8cf7516195ee177c07565a7f --- /dev/null +++ b/neuralcagesfordetailpreserving3ddeformations/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0011486e018e9c6a579bdfccf54e1d032ae53f78d2ce269bfd169aa8d64e817 +size 488245 diff --git a/neuralcontourslearningtodrawlinesfrom3dshapes/53410849-a51d-4e49-908f-05b46a35df7e_content_list.json b/neuralcontourslearningtodrawlinesfrom3dshapes/53410849-a51d-4e49-908f-05b46a35df7e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..756eda1f3d605e507e15fd4def556759119fc701 --- /dev/null +++ b/neuralcontourslearningtodrawlinesfrom3dshapes/53410849-a51d-4e49-908f-05b46a35df7e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3ff579aac30040c78097f189d4254f601c1bdc18fa4c66483a08a2b5a9f25d6 +size 78022 diff --git a/neuralcontourslearningtodrawlinesfrom3dshapes/53410849-a51d-4e49-908f-05b46a35df7e_model.json b/neuralcontourslearningtodrawlinesfrom3dshapes/53410849-a51d-4e49-908f-05b46a35df7e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7822a5bad763b3ecec37dc84b1bd9b61e880f052 --- /dev/null +++ b/neuralcontourslearningtodrawlinesfrom3dshapes/53410849-a51d-4e49-908f-05b46a35df7e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68a6b38e064d75760a11c8d038ef3072030bdb015d4dd72cf9bfbfb73c663c6b +size 97019 diff --git a/neuralcontourslearningtodrawlinesfrom3dshapes/53410849-a51d-4e49-908f-05b46a35df7e_origin.pdf b/neuralcontourslearningtodrawlinesfrom3dshapes/53410849-a51d-4e49-908f-05b46a35df7e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a090022e732a0c08ae652b517b18604b25538272 --- /dev/null +++ b/neuralcontourslearningtodrawlinesfrom3dshapes/53410849-a51d-4e49-908f-05b46a35df7e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5d484029ae3a67ee6b4e996a13eb5fc98314d51c3c4913a291ce191c3f84987 +size 2483735 diff --git a/neuralcontourslearningtodrawlinesfrom3dshapes/full.md b/neuralcontourslearningtodrawlinesfrom3dshapes/full.md new file mode 100644 index 0000000000000000000000000000000000000000..d2a10ddea9e7b33628dd8ae5a2f37e527e9157b3 --- /dev/null +++ b/neuralcontourslearningtodrawlinesfrom3dshapes/full.md @@ -0,0 +1,356 @@ +# Neural Contours: Learning to Draw Lines from 3D Shapes + +![](images/57d34e9a65aa8b1a99dc3d3fe5d24bac7c1449ef66c6e1d8fbd07fca2d6d4160.jpg) +Difan Liu1 + +![](images/cfbc652440a2e67b439bc016ed6ef62bce9a1d254f31dad24d0cda5a6fdc2d46.jpg) +3D model +Figure 1: Given a 3D model (left), our network creates a line drawing that conveys its structure more accurately compared to using other methods individually, such as Occluding Contours [1], Apparent Ridges [22], and pix2pix variants [37]. Please see supplementary material for results on many more models. + +![](images/0be180700b8bb21b5d0313c8ec083905d495dd2356987ff81c0af2064eb468b8.jpg) +1University of Massachusetts Amherst + +![](images/214934705c22ff75bb5500b99440515900db6c12995e27f72407b6612724aee6.jpg) +Occluding Contours + +![](images/377687b5c86097a4ff71f5794c295dd0f3d1f663d11c4ea03ea683a7e607da13.jpg) +Mohamed Nabail1 + +![](images/252d486570becf9838639b014e7d5fae8784abf6714b2a68829df7b37270390e.jpg) +Apparent Ridges + +![](images/d16d0ec238fe2cc2729df64377234945b93d597ab411a5d2a096d66dcba17a2a.jpg) +Aaron Hertzmann2 +Evangelos Kalogerakis1 +$^{2}$ Adobe Research + +![](images/16a2e00a27bb5c504b8176a8808a87b01edec9fc2a7201b12a9745dc6fef67a3.jpg) +pix2pixHD + +![](images/d7b916c1bb94d20cca6acd08fec94c90ed6bfed286eec00f4eeb2cec987ea13d.jpg) + +![](images/e5804d08baef0a3a2789bced1195338c89094e179f5287f5b396d6d10b0d754b.jpg) +Neural Contours + +# Abstract + +This paper introduces a method for learning to generate line drawings from 3D models. Our architecture incorporates a differentiable module operating on geometric features of the 3D model, and an image-based module operating on view-based shape representations. At test time, geometric and view-based reasoning are combined with the help of a neural module to create a line drawing. The model is trained on a large number of crowdsourced comparisons of line drawings. Experiments demonstrate that our method achieves significant improvements in line drawing over the state-of-the-art when evaluated on standard benchmarks, resulting in drawings that are comparable to those produced by experienced human artists. + +# 1. Introduction + +To draw an accurate line drawing of an object, an artist must understand the 3D shape, and select lines that will communicate that shape to a viewer. Modeling how artists perform this process remains an important open problem, intimately tied to 3D shape understanding, visual perception, and image stylization. Recent image stylization and + +image translation algorithms learn styles from examples, but do not take the underlying 3D geometry into account and generally do not capture outline drawing styles well. In contrast, analytic geometry-based algorithms effectively capture basic line drawing properties, and have been used in many computer animation films and games. However, these methods can still fail to capture properties of real drawings, and require parameter tuning for each individual model. + +This paper presents a method for learning to generate line drawings from 3D models. Our model employs two branches. The first branch implements geometric line drawing based on suggestive contours, apparent ridges, ridges, and valleys. Existing geometric line drawing approaches employ hard-to-tune user-specified parameters that need to be determined separately for each object. In contrast, our method learns to automatically select these parameters through a differentiable module. The second branch is represented as a standard image translation network, but using view-based shape representations as input. We show that combining both branches produces the best results. + +A number of challenges exist in developing such an approach. First, classic geometric lines are not readily dif + +ferentiable with respect to their parameters. We combine soft thresholding functions along with image-space rendered maps of differential surface properties. Another major challenge is to combine the different geometric lines with purely learned ones. We show that a ranking module trained to assess the plausibility of the line drawing can be used to drive this combination. Finally, another challenge is to gather suitable training sets. Previous work has performed laborious in-person data collection from artists [3]. While this can provide high-quality datasets, it does not scale well, and it also produces data without much stylistic consistency. Can we train effective drawing models without employing artists to create many drawings? We describe a crowdsourcing approach to gather data using unskilled crowdworkers for ranking evaluations. + +We evaluated our method based on Cole et al.'s [3] artist-created drawings, and find that our crowdsourced training produces state-of-the-art results. We also gathered a new extended test dataset involving more diverse 3D models following Cole et al.'s methodology. In all test datasets, our method generated line drawings that are significantly more accurate and perceptually more similar to artists' drawings compared to prior work, including geometric methods and image translation networks. We also conducted a MTurk evaluation study. We found that crowdworkers selected our line drawings as the best to convey a reference 3D model twice as frequently compared to the other techniques. + +# 2. Related Work + +How do artists create line drawings, and how do people perceive them? This question has been studied in art history [10], philosophy [11], neuroscience [36], and perceptual psychology [15, 24, 26]. Occluding contour algorithms are the foundation of non-photorealistic 3D computer graphics; see [1] for a survey. + +Generalizations of occluding contours improved line drawing algorithms, beginning with the suggestive contours [5, 27], and continuing with Apparent Ridges [22] and several other methods; see [4] for a survey of contour generalizations. Cole et al. [3] performed a thorough study, enlisting human artists to create line drawings of known 3D objects. They found that existing methods could account for the majority of human-drawn lines, but many differences remained between hand-drawn and computer-generated lines. Gryaditskaya et al. [12] collect and analyze professional illustrations of objects. While these analyses yield deep insights into the nature of hand-drawn lines, the synthesis algorithms fail to match the quality of hand-drawn lines, while also requiring several parameters to be set by a user on a case-by-case basis. + +Meanwhile, learned image stylization algorithms in computer vision and computer graphics, e.g., [16, 9, 40, 19], have shown the potential of learning to capture artistic + +styles. However, these methods do not capture dependence on an underlying 3D shape, and often neglect 3D understanding. Few style transfer methods are capable of effective stylization with line drawings. Two exceptions are Im2Pencil [28] and Inoue et al. [17], which separate object outlines from interiors, but do not explicitly consider 3D shape. StyLit stylizes 3D models [7] but does not capture line drawings. + +To date, there has been almost no previous work that learns artistic style for line drawings of 3D models. Lum and Ma [29] proposed an SVM for learning lines from interactive user feedback on a single shape. Kalogerakis et al. [23] proposed learning hatching styles from combinations of surface orientation fields and geometric features. Cole et al. [3] proposed linear combinations of geometric features and decision trees to learn line drawing parameters from a small number of examples. In contrast, we learn a model that combines existing geometric and stylization algorithms, a novel large dataset, and modern neural architectures to produce a state-of-the-art line drawing algorithm. + +# 3. Line Drawing Model + +We first describe our architecture for computing a line drawing from a 3D shape. The model takes a 3D shape and camera as input, and outputs a line drawing. The 3D shape is represented as a triangle mesh that approximates a smooth surface. The output line drawing is specified as a 2D grayscale image. Our architecture has two branches (Figure 3): a "geometry branch" that performs line drawing based on geometric features of the 3D model, and an "image translation branch" that learns lines through image-to-image translation. Parameters for the geometric lines are set at run-time by a "ranking module". Training for the model is described in Section 5. + +# 3.1. Geometry branch + +The first branch of our model is based on classic geometry-based line drawing definitions, namely suggestive contours, ridges, valleys, and apparent ridges. Given a camera viewpoint and 3D shape, each of these formulations contributes to a grayscale pixel intensity map, which are combined to produce the final image $\mathbf{I}$ . Their contributions depend on a set of thresholding parameters. Instead of setting these by hand, we introduce differentiable formulations to allow learning the thresholding parameters. + +The first set of curves produced are Occluding Contours [1]. The model generates a binary mask $\mathbf{I}_C$ with "on" pixels at projections of occluding contours (Figure 2b), computed using the interpolated contour algorithm [16]. Occluding contours are parameter-free, and do not require any learning; they are used in all of our renderings. Another parameter-free set of lines are mesh boundaries, also rendered as a binary mask $\mathbf{I}_B$ . + +![](images/58c96d1bedc7acb7f8145a44b8d55f6f04747698f10d01984a7c5187458d21d3.jpg) +(a) + +![](images/59a4cd23f23c191215f36333dfbfc2060cf4ba8637517010c43755fbdc29b1e8.jpg) + +![](images/e1363717394b99938d0740a8fdc73db55d92bd8595365af0f032fe5ff2a8d714.jpg) + +![](images/929961ab5079c9890b01c2aadf055d333f2ad6e19425c9a5872f05c46d3ab538.jpg) + +![](images/4c5e066c0c9c9668d182e568adf9a800575f3205085150cc3c128c15e1711fb0.jpg) + +![](images/f2bf51525e6d671e3086b46a07b82d9b45ccbee03e54939c89a35973583ed9ec.jpg) +(c) +(d) +Figure 2: Given a 3D shape (a), we show (b) occluding contours, (c,d) unfiltered and filtered suggestive contours, (e,f) unfiltered and filtered ridges and valleys, (g,h) unfiltered and filtered apparent ridges. + +![](images/78e20469b6728d157c2e516a55a39b90eb7145e00d2008367925c498dca9721c.jpg) +(e) +(f) + +![](images/177a031be0c4cdfb4a004f3ca0178084af5f611cf9e3e58286451fa9d0eb8c8c.jpg) +(g) +(h) + +Suggestive Contours (SCs) [5] represent surface points that are occluding contours in nearby views. See DeCarlo [5] for a detailed explanation and definitions. Let $\kappa$ be the radial curvature, and $D\kappa$ be the directional derivative of the radial curvature at a surface point, as defined in [5]. SCs are points where $\kappa = 0$ and $D\kappa > 0$ . For meshes, these curves are computed by interpolation to find the zero set of $\kappa$ . As seen in Figure 2c, rendering all SCs is undesirable. Instead, "weak" SCs are filtered by only rendering SCs with $D\kappa > t_S$ for some threshold $t_S$ , and tapered off below $t_S$ (Figure 2d) [5]. In previous work, this $t_S$ parameter is manually adjusted for each 3D model. In order to determine this threshold automatically, we introduce a formulation that is differentiable with respect to $t_S$ . For a given threshold, the method outputs a per-pixel intensity map $\mathbf{I}_S$ . We build two image-space maps. First, $S(\mathbf{x})$ is a binary map that is 1 at the projections of suggestive contours, and 0 otherwise, where $\mathbf{x}$ indexes pixel locations in the image. Second, $D\kappa(\mathbf{x})$ associates each pixel $\mathbf{x}$ to the directional derivative of the radial curvature at the surface point visible from that pixel. Figure 3 shows these two image-space maps for an input 3D shape. Then, the SC image is computed for each pixel $\mathbf{x}$ as: + +$$ +\mathbf {I} _ {S} (\mathbf {x}, t _ {S}) = S (\mathbf {x}) \max \left(1 - \frac {t _ {S}}{D \kappa (\mathbf {x})}, 0\right) \tag {1} +$$ + +The second term filters out lines with small $D\kappa$ . For $t_S = 0$ , all suggestive contours are displayed, while, as $t_S$ increases, they are eliminated. The inverse function is used rather than a linear dependence, e.g., $\max(D\kappa(\mathbf{x}) - t_S, 0)$ , to produce a sharper tapering, following the implementation in rtsc [34]. DeCarlo et al. [5] also proposed filtering according to the radial direction magnitude, but we did not find that it was much different. + +Ridges and Valleys (RVs) are viewpoint-independent surface extrema; see [30] for a detailed explanation. As with SCs, we introduce a formulation that is differentiable with respect to the filtering function. We introduce a threshold for ridges $(t_R)$ and one for valleys $(t_V)$ . The per-pixel intensity maps showing locations of ridges and valleys are generated as $R(\mathbf{x})$ and $V(\mathbf{x})$ , along with maps $\kappa_1(\mathbf{x}), \kappa_2(\mathbf{x})$ containing the two principal curvatures of the surface point visible from each pixel, respectively. Ridges and valleys are then filtered as: + +$$ +\mathbf {I} _ {R} (\mathbf {x}, t _ {R}) = R (\mathbf {x}) \max \left(1. 0 - \frac {t _ {R}}{\kappa_ {1} (\mathbf {x})}, 0. 0\right) \tag {2} +$$ + +$$ +\mathbf {I} _ {V} (\mathbf {x}, t _ {V}) = V (\mathbf {x}) \max \left(1. 0 - \frac {t _ {V}}{\kappa_ {2} (\mathbf {x})}, 0. 0\right) \tag {3} +$$ + +The interpretation of the formula is similar to SCs and yields RVs consistent with rtsc [34]. Figures 2e and 2f show an example of RVs before and after filtering. + +Apparent Ridges (ARs) [22] are object ridges from a given camera position, e.g., object points that "stick out" to the viewer; see [22] for a detailed description. We define $A(\mathbf{x})$ as the map containing ARs, and filter by the view-dependent curvature $\kappa_{t}(\mathbf{x})$ : + +$$ +\mathbf {I} _ {A} (\mathbf {x}, t _ {A}) = A (\mathbf {x}) \max \left(1. 0 - \frac {t _ {A}}{\kappa_ {t} (\mathbf {x})}, 0. 0\right) \tag {4} +$$ + +Figures 2g and 2h show ARs before and after filtering. + +Line drawing function. Given each of these functions, we define a combined geometric line drawing function $\mathbf{I}_G$ conditioned on the set of parameters $\mathbf{t} = \{t_S, t_R, t_V, t_A\}$ (we drop the pixel id $\mathbf{x}$ for clarity): + +$$ +\mathbf {I} _ {G} (\mathbf {t}) = \max \left(\mathbf {I} _ {S} \left(t _ {S}\right), \mathbf {I} _ {R} \left(t _ {R}\right), \mathbf {I} _ {V} \left(t _ {V}\right), \mathbf {I} _ {A} \left(t _ {A}\right), \mathbf {I} _ {C}, \mathbf {I} _ {B}\right) \tag {5} +$$ + +where the max function operates per pixel independently. + +Preprocessing. In a pre-processing step, we compute the curvatures required for the above lines from the input mesh. using [33]. We normalize object size so that the longest dimension is equal to 1 and the curvature quantities are divided by the their $90th$ percentile value. + +![](images/613331aca233ba9a83bf51257e78d093f6b1b779e4f9b3c674330dec3004aa4b.jpg) +Figure 3: Our network architecture: the input 3D model is processed by a geometry branch operating on curvature features, and an image-based branch operating on view-based representations. Their outputs are combined to create a line drawing, which is in turn evaluated by a ranking module that helps determining optimal line drawing parameters. + +# 3.2. Image translation branch + +An alternative approach to create line drawings from shapes is to use a neural network that directly translates shape representations to 2D images. To simplify the mapping, one can feed view-based shape representations as input to such network (i.e., depth images, shaded renderings), which also allows us to re-purpose existing image-to-image translation networks. Our method also incorporates this generative approach. Specifically, following pix2pixHD [37], we used an image translation network module, shown in Figure 3. Details about the architecture are provided in the supplementary material. As input to the network, we use a combination of view-based representations. First, we use a depth image $\mathbf{E}$ of the shape from the given camera. Then we also compute shaded rendering images representing Lambertian reflectance (diffuse shading) [31] created from the dot product of surface normals with light direction (light is at the camera). We use these shaded renderings because shading features are important predictors of where people draw lines [3]. To increase robustness to rendering artifacts, we also smooth the mesh normals using diffusion [20] with different smoothing parameters (more details in the supplementary material). As a result, we create a stack of six smoothed versions of shaded images $\mathbf{O} = \{\mathbf{O}_1,\mathbf{O}_2,\dots,\mathbf{O}_6\}$ , which are concatenated channelwise with the depth image (Figure 3, bottom left). The resolution of all images is set to $768\times 768$ . We found that using these combined multiple inputs produces better results. + +We also experimented with feeding rendered curvature maps, however, as we discuss in our experiments section, the results did not improve. Finally, since the network outputs per-pixel line probabilities, we use the ridge detection + +procedure of Cole et al. [3] so that the output image $\mathbf{I}_L$ contains cleaner curves. + +# 3.3. Neural Ranking Module + +As discussed earlier, the thresholding parameters $\mathbf{t}$ play an important role in determining the existence and tapering of the geometric lines. The threshold values determine how much intensity each geometric line will contribute to the final image, if at all. Our approach determines the threshold parameters $\mathbf{t}$ at test time, since different 3D models may be best rendered by different combinations of geometric lines. We employ a Neural Ranking Module (NRM) that scores the quality of a given line drawing. Then, at test time, the thresholds $\mathbf{t}$ are set by optimization of the NRM score. + +Specifically, the module is a function of the merged line drawing $\mathbf{I}(\mathbf{t}) = \max (\mathbf{I}_G(\mathbf{t}),\mathbf{I}_L)$ , the depth image of the shape from the given viewpoint $\mathbf{E}$ , and also the multi-scale shaded images $\mathbf{O}$ (Figure 3). The module is a neural network $f(\mathbf{I}(\mathbf{t}),\mathbf{E},\mathbf{O},\phi) = p$ , where $p$ is the output score, and $\phi$ are the learned network parameters. At test time, we aim to maximize this function (i.e., the quality of the drawing) by modifying the parameters $\mathbf{t}$ : + +$$ +\underset {\mathbf {t}} {\arg \max } f (\mathbf {I} (\mathbf {t}), \mathbf {E}, \mathbf {O}) \tag {6} +$$ + +The maximization is done with L-BFGS using analytic gradients $(\partial f / \partial \mathbf{I})\cdot (\partial \mathbf{I} / \partial \mathbf{t})$ , computed from backpropagation since our modules are differentiable. We also impose a nonnegativity constraint on the parameters $\mathbf{t}$ , as specified by the geometric definitions of the lines. To avoid local minima, we try multiple initializations of the parameter set $\mathbf{t}$ through a grid search. + +The function 6 is also used to choose whether to render mesh boundaries $\mathbf{I}_B$ . This is simply a binary check that passes if the function value is higher when boundaries are included in $\mathbf{I}(t)$ . Once the ranking network has determined the optimal parameters $\mathbf{t}_{opt}$ , the final drawing is output as $\mathbf{I}(\mathbf{t}) = \max (\mathbf{I}_G(\mathbf{t}_{opt}),\mathbf{I}_L)$ . We note that the NRM does not adjust the contribution of the image translation module at test time. We tried using a soft thresholding function on its output $\mathbf{I}_L$ , but it did not help. Instead, during training, the image translation module is fine-tuned with supervisory signal from the NRM. We also experimented with directly predicting the parameters $\mathbf{t}$ with a feed-forward network, but we found that this strategy resulted in much worse performance compared to test-time optimization of $\mathbf{t}$ ; see the supplemental material for details. + +NRM architecture. The neural ranking module follows the ResNet-34 architecture. The input is the line drawing $\mathbf{I}$ , depth $\mathbf{E}$ , and shaded maps $\mathbf{O}$ at $768 \times 768$ resolution that are concatenated channel-wise. To handle this input, we added one more residual block after the original four residual blocks of ResNet-34 to downsample the feature map by a factor of 2. The newly added residual block produces a $12 \times 12 \times 1024$ map. After mean pooling, we get a 1024-dimension feature vector. We remove the softmax layer of ResNet-34 and use a fully connected layer to output the "plausibility" value. Details about the architecture can be found in the supplementary material. + +# 4. Dataset + +To train the neural ranking and image translation modules, we need a dataset of line drawings. Although there are a few large-scale human line drawing datasets available online [21, 35], the drawings are not associated to reference 3D shapes and include considerable distortions. An alternative scenario is to ask artists to provide us with line drawings depicting training 3D shapes. However, gathering a large number of human line drawings for training is labor-intensive and time-consuming. Cole et al.'s dataset [3] was gathered this way, and is too small on its own to train a deep model. In contrast, for each training shape, we generated multiple synthetic line drawings using rtsc [34] through several combinations of different lines and thresholds, and asked human subjects to select the best drawing in a relative comparison setting. Since selecting the best drawing can be subjective, we gathered votes from multiple human subjects, and used only training drawings for which there was consensus. Below we describe our dataset, then we describe the losses to train our modules. + +Shape dataset. The first step to create our dataset was to select training 3D shapes from which reference line drawings will be generated. We used three collections: ShapeNet [2], Models Resource [32], and Thingi10K [39]. These + +![](images/452c336073467f356adfd71a366c845b39ed2e72c25a93aace276d3108d2fb8d.jpg) +Figure 4: A snapshot from our MTurk questionnaires used for gathering training line drawing comparisons. The most voted answer is highlighted as red. + +shape collections contain a large variety of human-made and organic objects. In the case of ShapeNet, we sampled a random subset of up to 200 shapes from each category, to avoid category imbalance. All models have oriented ground planes specified. We removed duplicate shapes and avoided sampling low-resolution shapes with fewer than 2K faces. We also processed the meshes by correctly orienting polygons (front-facing with respect to external viewpoints), and repairing connectivity (connect geometrically adjacent but topologically disconnected polygons, weld coincident vertices). The number of shapes in all collections is 23,477. + +Generating candidate line drawings. We select two random camera positions for each 3D model under the constraint that they are elevated 30 degrees from the ground plane, are aligned with the upright axis, and they point towards the centroid of the mesh (i.e., only the azimuth of each camera position is randomized). Then for each of the two camera positions, we generated 256 synthetic line drawings using all possible combinations of suggestive contours, apparent ridges, ridges with valleys under 4 thresholds (e.g. suggestive contours have 4 different thresholds [0.001, 0.01, 0.1, off]), including combinations with and without mesh creases and borders ( $4 \times 4 \times 4 \times 2 \times 2 = 256$ combinations). We also generated additional synthetic line drawings using Canny edges and edge-preserving filtering [8] on rendered shaded images of shapes, each with 4 different edge detection thresholds resulting in 8 more drawings. In total, this process resulted in 264 line drawings for each shape and viewpoint. These line drawings can be similar to each other, so we selected the 8 most distinct ones by applying k-mediods ( $k = 8$ ) and using Chamfer distance between drawn lines as metric to recover the clusters. + +Questionnaires. We then created Amazon MTurk questionnaires, where, on each page, we showed 8 candidate line drawings of a 3D shape, along with rendered images of it from different viewpoints [38] (Figure 4). Each page asked human participants to select the line drawing that best conveyed the rendered shape, and was most likely to be selected by other people as well. We also provided the option not to select any drawing (i.e., if none depicted the shape reliably). + +We employed sentinels (drawings of irrelevant shapes) to filter unreliable participants. We had total 3,739 reliable MTurk participants in our study (see supplementary material for details). For each shape and viewpoint, we gathered votes from 3 different participants. We accepted a drawing for training if it was chosen by at least two users. As a result, we gathered 21,609 training line drawings voted as "best" per shape and viewpoint. A random subset (10% of the original dataset) was kept for hold-out validation. + +# 5. Training + +The goal of our training procedure is to learn the parameters $\phi$ of the neural ranking module, and the parameters $\theta$ of the image translation branch from our training dataset, so that high-quality drawings can be generated for 3D models. + +NRM training. To train the Neural Ranking Module $f$ , we use a ranking loss based on above crowdsourced comparisons. Given a drawing $\mathbf{I}_{best}^{s,c}$ selected as "best" for shape $s$ and viewpoint $c$ , we generate 7 pairwise comparisons consisting of that drawing and every other drawing $\mathbf{I}_{other,j}^{s,c}$ that participated in the questionnaire. We use the hinge ranking loss to train the module [14, 6]: + +$$ +\begin{array}{l} L _ {R} = \sum_ {s, c, j} \max (m - f (\mathbf {I} _ {\text {b e s t}} ^ {s, c}, \mathbf {E}, \mathbf {O}, \phi) \\ + f \left(\mathbf {I} _ {\text {o t h e r}, j} ^ {s, c}, \mathbf {E}, \mathbf {O}, \phi\right), 0) \tag {7} \\ \end{array} +$$ + +where $m$ is the margin set to 1.0. + +Image translation module training. Based on the line drawings selected as "best" per reference shape and viewpoint, we use cross-entropy to train the image translation module. Specifically, we treat the intensity values $\mathbf{I}_{best}$ as target probabilities for drawing, and measure the cross-entropy of the predicted output $\mathbf{I}_L$ and $\mathbf{I}_{best}$ : + +$$ +L _ {c e} = - \sum_ {x} \left(\mathbf {I} _ {b e s t} (x) \log \mathbf {I} _ {L} (x) + \left(1 - \mathbf {I} _ {b e s t} (x)\right) \log \left(1 - \mathbf {I} _ {L} (x)\right)\right) +$$ + +We then further end-to-end fine-tune the image translation module along with the NRM module based on the ranking loss. We also experimented with adding the GAN-based losses of pix2pix [18] and pix2pixHD [37], yet, their main effect was only a slight sharpening of existing lines, without adding or removing any new ones. + +Implementation. For the ranking module, we used the Adam optimizer [25] with learning rate $2 \cdot 10^{-5}$ and batch size 32. For the image translation module, we used Adam with learning rate set to $2 \cdot 10^{-4}$ and batch size 2. The PyTorch implementation and our dataset are available at: + +http://github.com/DifanLiu/NeuralContours + +# 6. Results + +We evaluate our method and alternatives quantitatively and qualitatively. To perform our evaluation, we compare synthesized line drawings with ones drawn by humans for reference shapes. Below, we describe our test datasets, evaluation measures, and comparisons with alternatives. + +Test Datasets. Cole et al. [3] conducted a study in which artists made line drawings intended to convey given 3D shapes. The dataset contains 170 precise human line drawings of 12 3D models under different viewpoints and lighting conditions for each model. Their resolution is $1024 \times 768$ pixels. Since the number of 3D test models is small, we followed the same setup as Cole et al. to gather 88 more human line drawings from 3 artists for 44 3D models under two viewpoints (same resolution), including printing renderings, scanning their line drawings, and aligning them. Our new test dataset includes 13 3D animal models, 10 human body parts, 11 furniture, 10 vehicles and mechanical parts. All 3D models (including the ones from Cole et al.'s dataset) are disjoint from the training and validation sets. + +Evaluation measures. We use precision and recall measures for comparing synthetic drawings to human-made drawings, computed in the manner proposed by Cole et al. [3]. Each drawing is first binarized through thinning and thresholding. Precision is defined as the fraction of drawn pixels in a synthetic drawing that are near any drawn pixel of the human drawing of the same shape under the same viewpoint. Recall is defined as the fraction of pixels in the human drawing that are near any line of the synthetic drawing. Two pixels are "near" if they are within $1\mathrm{mm}$ in the coordinates of the physical page the drawing was made on; this distance was based on measurements of agreement between human drawings in Cole et al.'s dataset. We aggregate precision and recall into F1-score. + +We also report Intersection over Union (IoU) to measure overlap between synthetic and human drawings, based on the same definition of nearness. Lastly, we report the symmetric Chamfer distance, which measures the average distance between lines of synthetic and human drawings. Since both human and synthetic drawings include aligned silhouettes, all measures will appear artificially improved because of them. To avoid this biasing, we remove silhouettes from all human and synthetic drawings and measure performance based on the rest of the lines only. + +Comparisons. We compare our method, Neural Contours (NCs), with several alternatives. (1) Occluding Contours. (2-4) SC-rtsc, RV-rtsc, AR-rtsc using rtsc [34] with the default thresholding parameters; occluding contours are also included in all renderings. (5) all-rtsc renders SCs, RVs, and ARs all together with rtsc [34], using the default parameters. We note that we also tried to tune these parameters using an exhaustive grid search to minimize average Chamfer distance in the training set, but this resulted in worse performance (see supplementary material). (6) decision tree: The method of Cole et al. [3], namely, a decision tree (M5P from Weka [13]) operating on rendered curvature and gradient maps, trained on our dataset. (7) Canny edges extracted from the shaded shape rendering, as suggested by [3]. The edge detection parameters are selected using grid search to minimize average Chamfer distance in our training dataset. (8) pix2pixHD + +![](images/52ba33f0788368e6bd4f583f11f6d32752ef13fba7619f3ac11f78f19d09b727.jpg) +3D model + +![](images/e81562c52aec5f753c2c1da577272b1ac9be1d5068cd8fb8ed4e1a61d0d5f5f8.jpg) +all-rtsc + +![](images/1ed2c3889100b1dd7f5ecde1b551d2e3539932dca87aa441920422dded1e1991.jpg) +AR-rtsc + +![](images/c773f2f1e2e09da02e9163b68906f5fdb782bc8a8b74fa96b5668bdfd5bd5e80.jpg) +RV-rtsc + +![](images/a23baab11c3b9ae3a2bc18730b764f37f0a647e2016e3e02df9871dc4ec84ad4.jpg) +SC-rtsc + +![](images/352f09fdacb4fe324502bfe3834bf3543a973f06a39f82918589133e5925bd04.jpg) +Canny Edges + +![](images/8b8c7a8ba430cca55acc298f39839f9f66bd8235b6fa4866ef02718018e0c7e3.jpg) +Decision Tree + +![](images/bdb72b041de73af28fb92a720c5a65b8aa49af200cd7115b5807936f7b2f30a4.jpg) +pix2pixHD + +![](images/3114dcc167ef494831013fc3ed1e6721a2df132d16a9d2bc9d22f4e4f21db3fc.jpg) +Neural Contours +Figure 5: Comparisons with other methods. Neural Contours are more consistent with underlying shape features. + +![](images/22aec555b88a3765c2d22bbd1293566ce8ef77b252e6736448ec57d8c86af7fc.jpg) +Artist's Drawing + +
MethodIoUCDF1PR
contours31.531.7034.883.022.0
AR-rtsc53.412.5654.152.555.7
RV-rtsc49.812.9652.344.563.5
SC-rtsc40.513.9644.043.944.1
all-rtsc48.212.6352.540.475.1
Decision Tree46.912.1749.938.670.4
Canny Edges51.912.5952.950.455.8
pix2pixHD45.015.7348.769.637.5
NCs57.910.7260.660.860.5
+ +image translation [37], trained to output line drawings from an input depth image and shaded renderings of a shape (same as $\mathbf{E}$ , $\mathbf{O}$ in our method). Training was done on the same dataset ("best" drawings) as ours using the GAN and feature matching loss [37]. The original architecture outputs a $4096 \times 2048$ image through three local enhancer networks. In our case, since the input and output have the same resolution ( $1024 \times 768$ ), we use only the global generator of pix2pixHD. + +Ablation study. We also compare with training the following reduced variants of our method. NC-geometry uses our geometry-based branch and our neural ranker module. NC-image uses the image translation module alone trained with the same losses as ours, and multi-scale shaded images as input. NC-image-noms uses the image translation module alone trained with the same losses as ours, and using a single shaded and depth image as input (no multi-scale shaded images). NC-curv is an alternative image translation module that uses curvature maps rendered in image-space concatenated with the multi-scale shaded images and depth. + +Table 1: Comparisons with competing methods using all drawings from Cole et al.'s dataset. IoU, F1, P, R are reported in percentages, CD is pixel distance. + +
MethodIoUCDF1PR
contours43.524.6349.690.234.3
AR-rtsc59.910.6463.362.664.0
RV-rtsc52.610.7655.347.067.3
SC-rtsc46.612.2750.652.149.1
all-rtsc51.810.7456.543.879.6
Decision Tree49.711.1253.041.174.6
Canny Edges58.011.1661.356.766.7
pix2pixHD50.513.3554.275.142.4
NCs65.28.7167.666.369.0
+ +Table 2: Comparisons with other methods using the most "consistent" human drawings from Cole et al.'s dataset. + +
MethodIoUCDF1PR
contours49.019.1154.992.239.1
AR-rtsc66.89.1969.969.270.7
RV-rtsc64.89.3666.262.870.1
SC-rtsc65.09.8863.361.565.2
all-rtsc64.49.7068.658.682.7
Decision Tree62.18.9361.150.976.6
Canny Edges65.68.5764.659.870.2
pix2pixHD66.09.6268.276.961.2
NCs72.47.2574.674.574.8
+ +Table 3: Comparisons in our new test dataset. + +Results. Tables 1 reports the evaluation measures for Cole et al.'s dataset for competing methods. Specifically, the synthetic drawings are compared with each human line drawing per shape and viewpoint, and the measures are averaged. Since there are artists that draw more consistently than others, we also include Table 2 as an alternative comparison. This table reports the evaluation measures in Cole et al.'s dataset when synthetic drawings are compared only with the most "consistent" human line drawing + +
MethodIoUCDF1PR
NC-geometry60.310.3464.576.955.6
NC-image60.09.9762.965.061.0
NC-image-noms58.410.8560.759.162.3
NC-image-curv56.110.7260.061.059.0
NCs62.89.5465.465.565.4
+ +Table 4: Ablation study. + +per shape and viewpoint, defined as the drawing that has the least Chamfer distance to the rest of the human drawings for that shape and viewpoint. We believe this comparison is more reliable than using all drawings, because in this manner, we disregard any "outlier" drawings, and also get a measure of how well methods match the most consistent, or agreeable, human line drawing. Table 3 also reports the evaluation measures for our new dataset. Based on the results, Neural Contours outperforms all competing methods in terms of IoU, Chamfer Distance, and F1, especially when we compare with the most consistent human drawings. + +Table 4 reports comparisons with reduced variants of our method for the purpose of our ablation study. Our two-branch architecture offers the best performance compared to using the individual branches alone. + +Figure 5 shows characteristic comparisons with competing methods, and Figure 6 shows comparisons with reduced variants of our method. We also include representative human drawings. Both figures indicate that our full method produces lines that convey shape features more similarly to what an artist would do. Figure 1 also shows comparisons with other alternatives. Our method tends to produce more accurate lines that are more aligned with underlying shape features, and with less artifacts. + +Are the two branches learning the same lines? To check this hypothesis, we measure the IoU between the line drawings created from the geometry branch alone and the ones created from the image translation branch. The average IoU is $69.4\%$ . This indicates that the two branches outputs have a partial overlap, but still they have substantial differences. As shown in Figure 6, the geometry branch makes explicit use of surface information in 3D, such as surface curvature, to identify important curves, which appear subtle or vanish in 2D rendered projections. In contrast, the image branch identifies curves that depend on view-based shading information that is not readily available in the 3D geometry (see supplementary material for other examples). + +Which geometric lines are used more in our method? + +The average percentage of SCs, RVs, ARs selected by our geometry-based stylization branch are $32.2\%$ $16.5\%$ $51.3\%$ respectively. It seems that ARs are used more dominantly, while RVs are the least frequent lines. + +User study. We also conducted an Amazon MTurk study as additional perceptual evaluation. Each questionnaire page showed participants shaded renderings of a shape, along with a randomly ordered pair of synthetic drawings: one synthetic drawing from our method, and another from a different one. We asked participants which drawing best conveyed the shown 3D model. Participants could pick either drawing, specify "none", or "both" draw- + +![](images/bebc0cd291041acbd936439229f5158297e936818699239d0a8905a536ff17a6.jpg) +3D model + +![](images/d2dfedcde4876d29fd0701d3b947cb4d77f6d5e9ca826e76492a14edcf9f1d17.jpg) +NC-image-noms + +![](images/a0e13dcf45ced71aa4e8661707b849396cfeb80a38dcfdb3b2569559f993d861.jpg) +NC-image + +![](images/d3596b812c3d0b48761f20d8f773009856d65eaae842b57355751852e6f40074.jpg) +NC-geometry + +![](images/c5f2d6f054ad5e9b9aa60c38a5366062d53c2c9ac5de7dc13626c2ece6dc6cc4.jpg) +Neural Contours + +![](images/ddc9650514c0f074b06626026f4ec08e82432c1de2ea74dd49f449346533d54b.jpg) +Artist's drawing + +![](images/96ed2504c5a470f26e62d2b1bb6633e404dffe93ee7962e3701fcaf116894ec7.jpg) +Figure 6: Comparisons with reduced NCs variants. +Figure 7: User study voting results. + +ings conveyed the shape equally well. We asked questions twice in a random order to verify participants' reliability. We had 187 reliable participants (see supplementary material for details). Figure 7 summarizes the number of votes for the above options. Our method received twice the number of votes compared to the best alternative (ARs) found in this study. + +# 7. Conclusion + +We presented a method that learns to draw lines for 3D models based on a combination of a differentiable geometric module and an image translation network. Surprisingly, since the study by Cole et al. [3], there has been little progress on improving line drawings for 3D models. Our experiments demonstrate that our method significantly improves over existing geometric and neural image translation methods. There are still avenues for further improvements. Mesh artifacts (e.g., highly irregular tessellation) affect curvature estimation and shading, and in turn the outputs of both branches. Learning to repair such artifacts to increase robustness would be fruitful. Predicting drawing parameters in real-time is an open problem. Rendering the lines with learned pressure, texture, or thickness could make them match human drawings even more. Finally, our method does not handle point clouds, which would either require a mesh reconstruction step or learning to extract lines directly from unstructured point sets. + +Acknowledgements. This research is partially funded by NSF (CHS-1617333) and Adobe. Our experiments were performed in the UMass GPU cluster obtained under the Collaborative Fund managed by the Massachusetts Technology Collaborative. We thank Keenan Crane for the Ogre, Snakeboard and Nefertiti 3D models. + +# References + +[1] Pierre Bénard and Aaron Hertzmann. Line drawings from 3D models: A tutorial. Foundations and Trends in Computer Graphics and Vision, 11(1-2), 2019. 1, 2 +[2] Angel X Chang et al. Shapenet: An information-rich 3d model repository. arXiv:1512.03012, 2015. 5 +[3] Forrester Cole, Aleksey Golovinskiy, Alex Limpaecher, Heather Stoddart Barros, Adam Finkelstein, Thomas Funkhouser, and Szymon Rusinkiewicz. Where do people draw lines? ACM Trans. Graph., 27(3), 2008. 2, 4, 5, 6, 8 +[4] Doug DeCarlo. Depicting 3d shape using lines. In Proc. SPIE Human Vision and Electronic Imaging XVII, 2012. 2 +[5] Doug DeCarlo, Adam Finkelstein, Szymon Rusinkiewicz, and Anthony Santella. Suggestive contours for conveying shape. ACM Trans. Graph., 22(3), 2003. 2, 3 +[6] Mostafa Dehghani, Hamed Zamani, Aliaksei Severyn, Jaap Kamps, and W. Bruce Croft. Neural ranking models with weak supervision. In Proc. SIGIR, 2017. 6 +[7] Jakub Fiser, Ondrej Jamriška, Michal Lukáč, Eli Shechtman, Paul Asente, Jingwan Lu, and Daniel Sykora. StyLit: Illumination-guided example-based stylization of 3d renderings. ACM Trans. Graph., 35(4), 2016. 2 +[8] Eduardo SL Gastal and Manuel M Oliveira. Domain transform for edge-aware image and video processing. ACM Trans. Graph., 30(4), 2011. 5 +[9] Leon A Gatys, Alexander S Ecker, and Matthias Bethge. Image style transfer using convolutional neural networks. In Proc. CVPR, 2016. 2 +[10] E. H. Gombrich. Art and Illusion: A Study in the Psychology of Pictorial Representation. Princeton U. Press, 1961. 2 +[11] Nelson Goodman. Languages of Art: An Approach to a Theory of Symbols. Bobbs-Merrill Company, 1968. 2 +[12] Yulia Gryaditskaya, Mark Sypesteyn, Jan Willem Hoftijzer, Sylvia Pont, Frédo Durand, and Adrien Bousseau. Opensketch: A richly-annotated dataset of product design sketches. ACM Trans. Graph., 38(6), 2019. 2 +[13] Mark Hall, Eibe Frank, Geoffrey Holmes, Bernhard Pfahringer, Peter Reutemann, and Ian H. Witten. The weka data mining software: An update. SIGKDD Explor. Newsl., 11(1), 2009. 6 +[14] R. Herbrich, T. Graepel, and K. Obermayer. Support vector learning for ordinal regression. In Proc. ICANN, 1999. 6 +[15] Aaron Hertzmann. Why do line drawings work? a realism hypothesis. Perception, 2020. 2 +[16] Aaron Hertzmann, Charles E. Jacobs, Nuria Oliver, Brian Curless, and David H. Salesin. Image analogies. In Proc. SIGGRAPH, 2001. 2 +[17] Naoto Inoue, Daichi Ito, Ning Xu, Jimei Yang, Brian Price, and Toshihiko Yamasaki. Learning to trace: Expressive line drawing generation from photographs. Computer Graphics Forum, 38(7), 2019. 2 +[18] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In Proc. CVPR, 2017. 6 +[19] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In Proc. ECCV, 2016. 2 + +[20] Thouis R. Jones, Frédo Durand, and Mathieu Desbrun. Noniterative, feature-preserving mesh smoothing. ACM Trans. Graph., 22(3), 2003. 4 +[21] J. Jongejan, H. Rowley, T. Kawashima, J. Kim, and N. Fox-Gieg. The quick, draw dataset. https://quickdraw.withgoogle.com/, 2016.5 +[22] Tilke Judd, Frédo Durand, and Edward Adelson. Apparent ridges for line drawing. ACM Trans. Graph., 2007. 1, 2, 3 +[23] Evangelos Kalogerakis, Derek Nowrouzezahrai, Simon Breslav, and Aaron Hertzmann. Learning hatching for pen-and-ink illustration of surfaces. ACM Trans. Graph., 31(1), 2012. 2 +[24] John M. Kennedy. A Psychology of Picture Perception: Images and Information. Jossey-Bass Publishers, 1974. 2 +[25] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proc. ICLR, 2015. 6 +[26] Jan J Koenderink and Andrea J van Doorn. The shape of smooth objects and the way contours end. Perception, 11(2), 1982. 2 +[27] Yunjin Lee, Lee Markosian, Seungyong Lee, and John F. Hughes. Line drawings via abstracted shading. ACM Trans. Graph., 26(3), 2007. 2 +[28] Yijun Li, Chen Fang, Aaron Hertzmann, Eli Shechtman, and Ming-Hsuan Yang. Im2pencil: Controllable pencil illustration from photographs. In Proc. CVPR, 2019. 2 +[29] Eric B Lum and Kwan-Liu Ma. Expressive line selection by example. The Visual Computer, 21(8-10), 2005. 2 +[30] Yutaka Ohtake, Alexander Belyaev, and Hans-Peter Seidel. Ridge-valley lines on meshes via implicit surface fitting. ACM Trans. Graph., 23(3), 2004. 3 +[31] Bui Tuong Phong. Illumination for computer generated pictures. Commun. ACM, 18(6), 1975. 4 +[32] VG Resource. The models resource, https://www.modelsresource.com/, 2019.5 +[33] Szymon Rusinkiewicz. Estimating curvatures and their derivatives on triangle meshes. In Proc. 3DPVT, 2004. 3 +[34] Szymon Rusinkiewicz and Doug DeCarlo. rtsc library. http://www.cs.princeton.edu/gfx/proj/sugcon/, 2007. 3, 5, 6 +[35] Patsorn Sangkloy, Nathan Burnell, Cusuh Ham, and James Hays. The sketchy database: Learning to retrieve badly drawn bunnies. ACM Trans. Graph., 35(4), 2016. 5 +[36] Bilge Sayim and Patrick Cavanagh. What line drawings reveal about the visual brain. Frontiers in Human Neuroscience, 5, 2011. 2 +[37] Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, Andrew Tao, Jan Kautz, and Bryan Catanzaro. High-resolution image synthesis and semantic manipulation with conditional gans. In Proc. CVPR, 2018. 1, 4, 6, 7 +[38] Michael J Wilber, Iljung S Kwak, and Serge J Belongie. Cost-effective hits for relative similarity comparisons. In Proc. HCOMP, 2014. 5 +[39] Qingnan Zhou and Alec Jacobson. Thingi10k: A dataset of 10,000 3d-printing models. arXiv:1605.04797, 2016. 5 +[40] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proc. ICCV, 2017. 2 \ No newline at end of file diff --git a/neuralcontourslearningtodrawlinesfrom3dshapes/images.zip b/neuralcontourslearningtodrawlinesfrom3dshapes/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..a7948ac7380782cbd46bef4e696f170ddcb79beb --- /dev/null +++ b/neuralcontourslearningtodrawlinesfrom3dshapes/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2dfcd2e5992976902a5f45efde89e951c6913382c5800faffa542d3875aa9e20 +size 704323 diff --git a/neuralcontourslearningtodrawlinesfrom3dshapes/layout.json b/neuralcontourslearningtodrawlinesfrom3dshapes/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..14425964408d752753874761ba0653382eb045e9 --- /dev/null +++ b/neuralcontourslearningtodrawlinesfrom3dshapes/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5905da2eb7d0c72a11216ac732089844f1e4e240439caaad46e376fc2eda4dc8 +size 425602 diff --git a/neuraldataserveralargescalesearchenginefortransferlearningdata/110078a0-779b-44fc-8a4c-8acbe107b97c_content_list.json b/neuraldataserveralargescalesearchenginefortransferlearningdata/110078a0-779b-44fc-8a4c-8acbe107b97c_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a00e27e0db5d0f54403fa9c03965d6f1e8fabbfb --- /dev/null +++ b/neuraldataserveralargescalesearchenginefortransferlearningdata/110078a0-779b-44fc-8a4c-8acbe107b97c_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0559ea1d2954a3de90862586bb6ac5790d0091ccd14a7292434b93de00e65ff +size 88701 diff --git a/neuraldataserveralargescalesearchenginefortransferlearningdata/110078a0-779b-44fc-8a4c-8acbe107b97c_model.json b/neuraldataserveralargescalesearchenginefortransferlearningdata/110078a0-779b-44fc-8a4c-8acbe107b97c_model.json new file mode 100644 index 0000000000000000000000000000000000000000..f8d0a52b6631e2e10a3916238988332a045ac006 --- /dev/null +++ b/neuraldataserveralargescalesearchenginefortransferlearningdata/110078a0-779b-44fc-8a4c-8acbe107b97c_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc8007d81739dac92d8c2b5abf81d1a397e7fbd33d58bbe400523313cdd277d1 +size 108564 diff --git a/neuraldataserveralargescalesearchenginefortransferlearningdata/110078a0-779b-44fc-8a4c-8acbe107b97c_origin.pdf b/neuraldataserveralargescalesearchenginefortransferlearningdata/110078a0-779b-44fc-8a4c-8acbe107b97c_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..21490bb9db09aec80a0b236109d1f8e2ed417787 --- /dev/null +++ b/neuraldataserveralargescalesearchenginefortransferlearningdata/110078a0-779b-44fc-8a4c-8acbe107b97c_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f55ec72463d54038ccafb92c4b8d83f46ca9c62f5aac3c638c748104b4519a13 +size 966076 diff --git a/neuraldataserveralargescalesearchenginefortransferlearningdata/full.md b/neuraldataserveralargescalesearchenginefortransferlearningdata/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8fac64021e8196393f4fe6b8b378f7b3136ba463 --- /dev/null +++ b/neuraldataserveralargescalesearchenginefortransferlearningdata/full.md @@ -0,0 +1,390 @@ +# Neural Data Server: A Large-Scale Search Engine for Transfer Learning Data + +Xi Yan $^{1,2*}$ + +David Acuna $^{1,2,3*}$ + +Sanja Fidler $^{1,2,3}$ + +1University of Toronto + +$^{2}$ Vector Institute + +$^{3}$ NVIDIA + +xi.yan@mail.utoronto.ca, {davidj, fidler}@cs.toronto.edu + +# Abstract + +Transfer learning has proven to be a successful technique to train deep learning models in the domains where little training data is available. The dominant approach is to pretrain a model on a large generic dataset such as ImageNet and finetune its weights on the target domain. However, in the new era of an ever increasing number of massive datasets, selecting the relevant data for pretraining is a critical issue. We introduce Neural Data Server (NDS), a large-scale search engine for finding the most useful transfer learning data to the target domain. NDS consists of a dataserver which indexes several large popular image datasets, and aims to recommend data to a client, an end-user with a target application with its own small labeled dataset. The dataserver represents large datasets with a much more compact mixture-of-experts model, and employs it to perform data search in a series of dataserver-client transactions at a low computational cost. We show the effectiveness of NDS in various transfer learning scenarios, demonstrating state-of-the-art performance on several target datasets and tasks such as image classification, object detection and instance segmentation. Neural Data Server is available as a web-service at http://aidemos.cs.toronto.edu/nds/. + +# 1. Introduction + +In recent years, we have seen an explosive growth of the number and the variety of computer vision applications. These range from generic image classification tasks to surveillance, sports analytics, clothing recommendation, early disease detection, and to mapping, among others. Yet, we are only at the beginning of our exploration of what is possible to achieve with Deep Learning. + +One of the critical components of the new age of computer vision applications is the need for labeled data. To achieve high performance, typically a massive amount of data needs to be used to train deep learning models. Transfer learning provides a promising approach to reduce the need for large-scale labeled data for each target application. In transfer learning, a neural network is pretrained [11, 24, + +![](images/7615ee44170d474b26dd943856393e365e07f5187dbba6ba5397eaa448bd7f5f.jpg) +Figure 1: Neural Data Server: Search engine for finding relevant transfer learning data for the user's target domain. In NDS, a dataserver indexes several popular image datasets, represents them with a mixture-of-experts model, and uses client's target data to determine most relevant samples. Note that NDS indexes available public datasets and does not host them. Data recommendation is done by providing links to relevant examples. + +43] on existing large generic datasets and then fine-tuned in the target domain. While transfer learning is a well studied concept that has been proven successful in many applications [11, 24, 43], deciding which data to use for pretraining the model is an open research question that has received surprisingly little attention in the literature. We argue that this is a crucial problem to be answered in light of the ever increasing scale of the available datasets. + +To emphasize our point, recent efforts on curating computer vision benchmarks1 list over 400 public datasets, ranging from generic imagery, faces, fashion photos, to self-driving data. Furthermore, the dataset sizes are significantly increasing: the recently released OpenImages [31] contains 9M labeled images (600GB in size), and is 20 times larger compared to its predecessor MS-COCO [33] (330K images, 30GB). The video benchmark YouTube8m [1] (1.9B frames, 1.5TB), is $800 \times$ larger compared to Davis [9] (10k frames, 1.8GB), while the recently released autonomous driving dataset nuScenes [10] contains $100 \times$ the number of frames than KITTI [20] which was released in 2012. + +It is evident that downloading and storing these datasets locally is already cumbersome and expensive. This is further amplified by the computational resources required for training neural networks on this massive amount of data. + +![](images/e02f9c907a83c5256b361bddde091ab0d4e7fa20b7da63355f86f5120bb70a8f.jpg) +Client Dataset +Cityscapes + +![](images/e71164c4c4c2171fa012d6b75261d80b433fa37816c59ab75e5a5f5eca208705.jpg) +Selected images from indexed datasets (OpenImages + COCO) + +![](images/bd3d7de31bf27fd8721da15e236b6f05bccca298c2b9960745e4fccf5546d0e5.jpg) +miniModaNet + +![](images/776c846e9baaeb0c6765875fedaf22e0aebce27b9447aa771c09ff353a1d34eb.jpg) + +![](images/8d28843bbef3038617c7ea1a0c7d9d44b2967fea9c7caa8f91da48105907db6f.jpg) +Pascal-VOC + +![](images/3ce58ae9761e9657a94ebba5639894c40d35a702d683f22c7105909757b78769.jpg) +Figure 2: Examples of images from the dataserver (COCO+OpenImages) recommended to each client dataset by our Neural Data Server. + +The latter is an even more pronounced issue in research, where the network architectures are continuously being developed and possibly many need to be tested. Furthermore, for commercial applications, data licensing may be another financial issue to consider. Recent works [23, 37] have also shown that there is not a "the more the better" relationship between the amount of pretraining data and the downstream task performance. Instead, they showed that selecting an appropriate subset of the data was important to achieve good performance on the target dataset. + +In this paper, we introduce Neural Data Server (NDS), a large-scale search engine for finding the most useful transfer learning data to the target domain. One can imagine NDS as a web-service where a centralized server, referred to as the dataserver, recommends data to clients (Fig 1). A client is an end-user with an A.I. application in mind, and has a small set of labeled target data. We assume that each client is only interested in downloading a subset of the server-indexed data that is most relevant to the client's target domain, limited to the user-specified budget (maximum desired size). We further require the transaction between the dataserver and the client to be both computationally efficient and privacy-preserving. This means the client's data should not be visible to the server. We also aim to minimize the amount of dataserver's online computation per client, as it may possibly serve many clients in parallel. + +We index several popular image datasets and represent them using a mixture-of-experts (MoE) model, which we store on the dataserver. MoE is significantly smaller in size than the data itself, and is used to probe the usefulness of data in the client's target domain. In particular, we determine the accuracy of each expert on the target dataset, and recommend data to the client based on these accuracies. + +We experimentally show significant performance improvements on several downstream tasks and domains compared to baselines. Furthermore, we show that with only $20\%$ of pretraining data, our method achieves comparable or better performance than pretraining on the entire dataserver-indexed datasets. We obtain significant im + +provements over ImageNet pretraining by downloading only $26\mathrm{Gb}$ of server's data in cases when training on the entire dataserver (538 Gb) would take weeks. Our Neural Data Server will be made available as a web-service with the aim of improving performance and reducing the development cost of the end-users' A.I. applications. + +# 2. Related Work + +Transfer Learning. The success of deep learning and the difficulty of collecting large scale datasets has recently brought significant attention to the long existing history of transfer learning, cross-domain annotation and domain adaptation [39, 15, 4, 44, 3, 46]. Specifically in the context of neural networks, fine-tuning a pretrained model on a new dataset is the most common strategy for knowledge transfer. + +Most literature in this domain analyzes the effect of pretraining on large-scale datasets [44, 34, 17] with respect to network architectures, network layers, and training tasks [49, 50]. Concurrent with our work, Achille et al. [2] proposes a framework for selecting the best pre-trained feature extractor for a new task from a collection of classifiers. In contrast, our work aims to identify the optimal set of data points for pre-training. Works most related to ours are [16, 37] which show that pretraining on only relevant examples is important to achieve good performance on fine-grained classification tasks. Specifically, in [16] the authors use a predefined similarity metric between the source and target categories in order to greedily select the most similar categories from the source dataset to be used for pretraining. [37], on the other hand, exploits a model pretrained on the source domain to obtain pseudolabels of the target images, and uses these to re-weight the source examples. + +Unlike ours, [16, 37] are limited to classification tasks, and do not easily scale to a constantly growing datacenter (the model needs to be retrained each time a new dataset is added). Thus, their approach does not naturally handle our scenario in which indexed datasets have diverse sets of tasks and labels, and where the number of indexed datasets may grow over time. + +Federated Learning. [35, 8] introduce a distributed ML + +![](images/7858982818de63f887279a9825245df63e4a4d19d4e12fd799ed1b4205d8ecd7.jpg) +Figure 3: Overview of Neural Data Server. NDS consists of a dataserver that represents indexed datasets using a mixture-of-experts model. Experts are sent to client in order to compute accuracies in the client's target domain. These accuracies are then used by dataserver to recommend relevant data samples. + +Algorithm 1 Dataserver's Modules +1: Require representation learning alg. $\mathcal{E}$ , number of experts $K$ +2: $\pmb {g}_\theta \gets \mathrm{HARDGATING}(\mathcal{S},K)$ Sec 3.2: partition S into local subsets to obtain gating +3: $S_{i}\coloneqq \{\pmb {x}\in S|g_{\theta ,i}(\pmb {x}) = 1\}$ +4: procedure MOE({Si},E,K): +5: For $i = 1,\dots,K$ +6: Run $\mathcal{E}$ on $S_{i}$ to obtain expert $e_{\theta_i}$ +7: return $\{e_{\theta_i}\}$ +8: procedure OUTPUTDATA(\{Si},z,budget): +9: $\pmb {w}\gets \mathrm{softmax}(\pmb {z},T = 0.1)$ +10: $\pi (\pmb {x}) = \sum_{i = 1}^{K}w_{i}g_{\theta ,i}(\pmb {x})\frac{1}{|S_{i}|}$ +11: Sample $S_{*}$ from S at rate according to $[\pi_{\pmb{x}_1},\dots,\pi_{\pmb{x}_n}]$ +12: return $S_{*}|_{\mathrm{budget}}$ + +approach with the goal of training a centralized model on decentralized data over a large number of client devices, (i.e., mobile phones). Our work shares a similar idea of restricting the visibility of data in a client-server model. However, in our case the representation of data is centralized (dataserver) and the clients exploit the transfer learning scenario for their own (decentralized) models. + +Active and Curriculum Learning. In active learning [42] one searches over unlabeled data to find optimal samples to be labeled by an oracle, while in curriculum learning [7] subsets of data of increasing difficulty are sought for during training. In both scenarios, data search is performed at each iteration of training a particular model. Search is typically done by running inference on the data samples with the current snapshot of the model and selecting the examples based on uncertainty-based metrics. Our scenario differs in that we do not have the luxury of running inference with the client's model on the massive amount of indexed data as this would induce a prohibitive computational overhead on the dataserver per client. Moreover, we do not assume dataserver to have access to the client's model: this would entail the clients to share their inference code which many users may not be willing to do. + +Learning to Generate Synthetic Images. Related to NDS are also [41, 28, 47, 36]. These approaches aim to bridge the synthetic vs real imagery gap by optimizing/searching over the set of parameters of a surrogate function that interfaces with a synthesizer. + +In NDS, the search has to be done over massive (nonparametric) datasets and further, the target data cannot be sent to the server side. Our method is also significantly + +Algorithm 2 Overview of our Neural Data Server +1: Input: $S$ (source), $\mathcal{T}$ (target), $b$ (desired budget of data) +2: $\{e_{\theta_i}\} \leftarrow \mathrm{MOE}(\mathcal{D}_S, \mathcal{E}, K)$ +3: $z \gets \text{FASTADAPT}(\mathcal{T}, \{e_{\theta_i}\})$ +4: $S_* \gets \text{OUTPUTDATA}(S, z, b)$ +5: return $S_*$ +6: Output: $S_* \in S$ to download +Algorithm 3 Client's Module +1: procedure FASTADAPT( $\mathcal{D}_T$ , $\{e_{\theta_i}\}$ ): +2: For $i = 1, \dots, K$ +3: $z_i \gets \text{PERFORMANCE/FINET}(e_{\theta_i}, \mathcal{T})$ +4: return $z$ + +more computationally efficient. + +# 3. Neural Data Server + +Neural Data Server (NDS) is a search engine that aims to recommend transfer learning data. NDS consists of a dataserver which has access to a massive source dataset(s), and aims to suggest most relevant data samples to a client. A client is an end-user who wants a budget-constrained amount of data to improve the performance of her/his model in the target domain in a transfer learning scenario. We note that the dataserver does not host the data, and thus its recommendations are to be provided as a list ofurls to data samples hosted by the original datasets' providers. + +The dataserver's indexed datasets may or may not be completely labeled, and the types of labels (e.g., segmentation masks, detection boxes) across data samples may vary. The client's target dataset is considered to only have a small set of labeled examples, where further the type of labels may or may not be the same as the labels in the dataserver's dataset(s). The main challenge lies in requiring the dataserver-client transactions to have low computational overhead. As in any search engine that serves information to possibly numerous users, we want the online computation performed by the dataserver to be minimal. Thus we defer most of the computation to be performed on the client's side, while still aiming for this process to be fast. Furthermore, the transactions should ideally be privacy preserving for the client, i.e., the client's data nor the model's architecture are accessible, since the client may have sensitive information such as hospital records or secret tech. In NDS, we represent the dataserver's data using a mixture-of-experts (MoE) trained on a self-supervised task. MoE + +naturally partition the indexed datasets into different subsets and produce classifiers whose weights encode the representation of each of these subsets. The experts are trained offline and hosted on the dataserver for online transactions with the clients. In particular, the experts are sent to each client and used as a proxy to determine the importance of dataserver's data samples for the client's target domain. + +To compute importance, the experts are fast-adapted on the client's dataset, and their accuracy is computed on a simple self-supervised task. We experimentally validate that the accuracy of each adapted expert indicates the usefulness of the data partition used to train the expert. The dataserver then uses these accuracies to construct the final list of data samples that are relevant for the client. Figure 3 provides an illustration while Algorithm 2 summarizes our NDS. + +In Section 3.1 we formalize our problem. In Section 3.2 we describe how we train our mixture-of-experts model and analyze the different choices of representation learning algorithms for the experts (dataserver side). In Section 3.3.1 we propose how to exploit the experts' performance in the client's target domain for data selection. + +# 3.1. Problem Definition + +Let $\mathbb{X}$ denote the input space (images in this paper), and $\mathbb{Y}_a$ a set of labels for a given task $a$ . Generally, we will assume that multiple tasks are available, each associated with a different set of labels, and denote these by $\mathbb{Y}$ . Consider also two different distributions over $\mathbb{X} \times \mathbb{Y}$ , called the source domain $\mathcal{D}_s$ and target domain $\mathcal{D}_t$ . Let $\mathcal{S}$ (dataserver) and $\mathcal{T}$ (client) be two sample sets drawn i.i.d from $\mathcal{D}_s$ and $\mathcal{D}_t$ , respectively. We assume that $|\mathcal{S}| \gg |\mathcal{T}|$ . + +Our problem then relies on finding the subset $S_{*} \in \mathcal{P}(S)$ , where $\mathcal{P}(S)$ is the power set of $S$ , such that $S_{*} \cup \mathcal{T}$ minimizes the risk of a model $h$ on the target domain: + +$$ +\mathcal {S} _ {*} = \underset {\hat {\mathcal {S}} \in \mathcal {P} (S)} {\arg \min } \mathbb {E} _ {(\boldsymbol {x}, \hat {\boldsymbol {y}}) \sim \mathcal {D} _ {t}} [ \mathcal {L} \left(h _ {\hat {\mathcal {S}} \cup \mathcal {T}} (\boldsymbol {x}), \hat {\boldsymbol {y}}\right) ] \tag {1} +$$ + +Here, $h_{\hat{S} \cup \mathcal{T}}$ indicates that $h$ is trained on the union of data $\hat{S}$ and $\mathcal{T}$ . Intuitively, we are trying to find the subset of data from $S$ that helps to improve the performance of the model on the target dataset. However, what makes our problem particularly challenging and unique is that we are restricting the visibility of the data between the dataserver and the client. + +This means that fetching the whole sample set $S$ is prohibitive for the client, as it is uploading its own dataset to the server. We tackle this problem by representing the dataserver's indexed dataset(s) with a set of classifiers that are agnostic of the client (Section 3.2), and use these to optimize equation 1 on the client's side (Section 3.3.1). + +# 3.2. Dataserver + +We now discuss our representation of the dataserver's indexed datasets. This representation is pre-computed offline and stored on the dataserver. + +# 3.2.1 Dataset Representation with Mixture-of-Experts + +We represent the dataserver's data $S$ using the mixture-of-experts model [27]. In MoE, one makes a prediction as: + +$$ +\boldsymbol {y} (\boldsymbol {x}) = \sum_ {i = 1} ^ {K} g _ {\theta , i} (\boldsymbol {x}) e _ {\theta_ {i}} (\boldsymbol {x}) \tag {2} +$$ + +Here, $g_{\theta}$ denotes a gating function $(\sum_{i=1}^{K} g_{\theta,i}(.) = 1)$ , $e_{\theta_i}$ denotes the $i$ -th expert model with learnable weights $\theta_i$ , $x$ an input image, and $K$ corresponds to the number of experts. One can think of the gating function as softly assigning data points to each of the experts, which try to make the best guess on their assigned data points. + +The MoE model is trained by using maximum-likelihood estimation (MLE) on an objective $\mathcal{L}$ : + +$$ +\theta = \underset {\theta} {\arg \min } \mathbb {E} _ {(\boldsymbol {x}, \hat {\boldsymbol {y}}) \sim \mathcal {S}} [ \mathcal {L} (\boldsymbol {y} (\boldsymbol {x}), \hat {\boldsymbol {y}}) ] \tag {3} +$$ + +We discuss the choices for the objective $\mathcal{L}$ in Sec 3.2.2, dealing with the fact that the labels across the source datasets may be defined for different tasks. + +While the MoE objective allows end-to-end training, the computational cost of doing so on a massive dataset is extremely high, particularly when $K$ is considerably large (we need to backpropagate gradients to every expert on every training example). A straightforward way to alleviate this issue is to associate each expert with a local cluster defined by a hard gating, as in [26, 22]. In practice, we define a gating function $g$ that partitions the dataset into mutually exclusive subsets $S_{i}$ , and train one expert per subset. This makes training easy to parallelize as each expert is trained independently on its subset of data. Furthermore, this allows for new datasets to be easily added to the dataserver by training additional experts on them, and adding these to dataserver. This avoids re-training MoE over the full indexed set of datasets. + +In our work, we use two simple partitioning schemes to determine the gating: (1) superclass partition, and (2) unsupervised partition. For superclass partition (1), we represent each class $c$ in the source dataset as the mean of the image features $f_{c}$ for category $c$ , and perform $k$ -means clustering over $\{f_c\}$ . This gives a partitioning where each cluster is a superclass containing a subset of similar categories. This partitioning scheme only applies to datasets with class supervision. For unsupervised partitioning (2), we partition the source dataset using $k$ -means clustering on the image features. In both cases, the image features are obtained from a pretrained neural network (i.e., features extracted from the penultimate layer of a network pre-trained on ImageNet). + +# 3.2.2 Training the Experts + +We discuss two different scenarios to train the experts. In the simplified scenario, the tasks defined for both the dataserver's and client's datasets are the same, e.g., classification. In this case, we simply train a classifier for the + +task for each subset of the data in $S$ . We next discuss a more challenging case where the tasks across datasets differ. + +Ideally, we would like to learn a representation that can generalize to a variety of downstream tasks and can therefore be used in a task agnostic fashion. To this end, we use a self-supervised method to train the MoE. In self-supervision, one leverages a simple surrogate task that can be used to learn a meaningful representation. + +Furthermore, this does not require any labels to train the experts which means that the dataserver's dataset may or may not be labeled beforehand. This is useful if the client desires to obtain raw data and label the relevant subset on its own. To be specific, we select classifying image rotation as the task for self-supervision as in [21], which showed this to be a simple yet powerful proxy for representation learning. Formally, given an image $\pmb{x}$ , we define its corresponding self-supervised label $\pmb{y}$ by performing a set of geometric transformations $\{r(\pmb{x}, j)\}_{j=0}^{3}$ on $\pmb{x}$ , where $r$ is an image rotation operator, and $j$ defines a particular rotation by one of the predefined angles, $\{0, 90, 180, 270\}$ . We then minimize the following learning objective for the experts: + +$$ +\mathcal {L} \left(\theta_ {i}\right) = - \sum_ {\boldsymbol {x} \in \mathcal {S} _ {i}} \sum_ {j = 0} ^ {3} \log e _ {\theta_ {i}} (r (\boldsymbol {x}, j)) _ {j} \tag {4} +$$ + +Here, index $j$ in $e(.)_j$ denotes the output value for class $j$ . + +# 3.3. Dataserver-Client Transactions + +In this section, we describe the transactions between the dataserver and client that determines the relevant subset of the server's data. The client first downloads the experts in order to measure their performance on the client's dataset. If the tasks are similar, we perform a quick adaptation of the experts on the client's side. Otherwise, we evaluate the performance of the experts on the client's data using the surrogate task (i.e image rotation) (Section 3.3.1). The performance of each expert is sent back to the dataserver, which uses this information as a proxy to determine which data points are relevant to the client (Section 3.3.2). We describe these steps in more detail in the following subsections. + +# 3.3.1 FASTADAPT to a Target Dataset (on Client) + +Single Task on Server and Client: We first discuss the case where the dataset task is the same for both the client and the dataserver, e.g., classification. While the task may be the same, the label set may not be (classes may differ across domains). An intuitive way to adapt the experts is to remove their classification head that was trained on the server, and learn a small decoder network on top of the experts' penultimate representations on the client's dataset, as in [50]. For classification tasks, we learn a simple linear layer on top of each pre-trained expert's representation for a few epochs. We then evaluate the target's task performance on a held-out validation set using the adapted experts. We denote the accuracy for each adapted expert $\hat{e}_{\theta_i}$ as $z_{i}$ . + +Diverse Tasks on Server and Client: To generalize to unseen tasks and be further able to handle cases where the labels are not available on the client's side, we propose to evaluate the performance of the common self-supervised task used to train the experts on the dataserver's data. Intuitively, if the expert performs well on the self-supervised task on the target dataset, then the data it was trained on is likely relevant for the client. Specifically, we use the self-supervised experts trained to learn image rotation, and evaluate the proxy task performance (accuracy) of predicting image rotation angles on the target images: + +$$ +z _ {i} = \frac {1}{4 | \mathcal {T} |} \sum_ {\boldsymbol {x} \in \mathcal {T}} \sum_ {j = 0} ^ {3} \mathbb {1} \left(\arg \max _ {k} [ e _ {\theta_ {i}} (\boldsymbol {r} (\boldsymbol {x}, j)) _ {k} ] = = j\right) \tag {5} +$$ + +Here, index $k$ in $e(.)_k$ denotes the output value for class $k$ . + +Note that in this case we do not adapt the experts on the target dataset (we only perform inference). + +# 3.3.2 Data Selection (on Dataserver) + +We now aim to assign a weighting to each of the data points in the source domain $S$ to reflect how well the source data contributed to the transfer learning performance. The accuracies $z$ from the client's FASTADAPT step are normalized to [0, 1] and fed into a softmax function with temperature $T = 0.1$ . These are then used as importance weights $w_{i}$ for estimating how relevant is the representation learned by a particular expert for the target task's performance. We leverage this information to weigh the individual data points $x$ . More specifically, each source data $x$ is assigned a probabilistic weighting: + +$$ +\pi (\boldsymbol {x}) = \sum_ {i = 1} ^ {K} w _ {i} g _ {\theta , i} (\boldsymbol {x}) \frac {1}{| S _ {i} |} \tag {6} +$$ + +Here, $|S_i|$ represents the size of the subset that an expert $e_{\theta_i}$ was trained on. Intuitively, we are weighting the set of images associated to the $i$ -th expert and uniformly sampling from it. We construct our dataset by sampling examples from $S$ at a rate according to $\pmb{\pi} = [\pi_{\pmb{x}_1}, \pi_{\pmb{x}_2}, \dots, \pi_{\pmb{x}_n}]^T$ . + +# 3.4. Relation to Domain Adaptation + +If we assume that the client and server tasks are the same then our problem can be interpreted as domain adaptation in each of the subset $\hat{S} \in \mathcal{P}(S)$ and the following generalization bound from [5] can be used: + +$$ +\varepsilon_ {\mathcal {T}} (h) < \varepsilon_ {\hat {\mathcal {S}}} (h) + \frac {1}{2} d _ {\mathcal {H} \Delta \mathcal {H}} (\hat {\mathcal {S}}, \mathcal {T}) \tag {7} +$$ + +where $\varepsilon$ represents the risk of a hypothesis function $h\in \mathcal{H}$ and $d_{\mathcal{H}\Delta \mathcal{H}}$ is the $\mathcal{H}\Delta \mathcal{H}$ divergence [5], which relies on the capacity of $\mathcal{H}$ to distinguish between data points from $\hat{S}$ and $\mathcal{T}$ , respectively. + +Let us further assume that the risk of the hypothesis function $h$ on any subset $\hat{S}$ is similar such that: $\varepsilon_{\hat{S}}(h) \approx \varepsilon(h) \forall \hat{S} \in \mathcal{P}(S)$ . Under this assumption, minimizing + +equation 1 is equivalent to finding the subset $S_{*}$ that minimizes the divergence with respect to $\mathcal{T}$ . Formally, + +$$ +\mathcal {S} _ {*} = \underset {\hat {\mathcal {S}}} {\arg \min } d _ {\mathcal {H} \Delta \mathcal {H} (\hat {\mathcal {S}}, \mathcal {T})} \tag {8} +$$ + +In practice, it is hard to compute $d_{\mathcal{H}\Delta \mathcal{H}}$ and this is often approximated by a proxy $\mathcal{A}$ -distance [6, 12, 19]. A classifier that discriminates between the two domains and whose risk $\varepsilon$ is used to approximate the second part of the equation 7. + +$$ +\hat {d} _ {\mathcal {H}} \approx \hat {d} _ {\mathcal {A}} \approx 2 (1 - 2 \varepsilon) \tag {9} +$$ + +Note that doing so would require having access to $S$ and $\mathcal{T}$ in at least one of the two sides (i.e. to train the new discriminative classifier) and this is prohibitive in our scenario. In our case, we compute the domain confusion between $\hat{S}$ and $\mathcal{T}$ by evaluating the performance of expert $e_i$ on the target domain. We argue that this proxy task performance (or error rate) is an appropriate proxy distance that serves the same purpose but does not violate the data visibility condition. Intuitively, if the features learned on the subset cannot be discriminated from features on the target domain, the domain confusion is maximized. We empirically show the correlation between the domain classifier and our proposed proxy task performance in our experiments. + +# 4. Experiments + +We perform experiments in the tasks of classification, detection, and instance segmentation. We experiment with 3 datasets on the sever side and 7 on the client side. + +# 4.1. Support for Diverse Clients and Tasks + +In this section, we provide an extensive evaluation of our approach on three different client's scenarios: autonomous driving, fashion and general scenes. In each of them, the client's goal is to improve the performance of its downstream task (i.e., object detection or instance segmentation) by pretraining in a budget-constrained amount of data. Here, the dataserver is the same and indexes the massive OpenImages [31] and MS-COCO [33] datasets. Specifically, our server dataset can be seen as the union of COCO and OpenImages [31, 33] (approx 538 GB) represented in the weights of the self-supervised trained experts (2 GB). + +Autonomous Driving: Here, we use Cityscapes [14] as the client's dataset, which contains 5000 finely annotated images divided into 2975 training and 500 validation images. Eight object classes are provided with per-instance annotation. In practice, this simulates the scenario of a client that wants to crunch its performance numbers by pretraining on some data. This scenario is ubiquitous among state-of-the-art instance and semantic segmentation approaches on the Cityscapes leaderboard [45, 24, 52]. + +Fashion: We use the ModaNet dataset [51] to simulate a client that wants to improve its models' performance in the task of object detection of fashion related objects. ModaNet + +is a large-scale street fashion dataset consisting of 13 classes of objects and 55,176 annotated images. Since the effectiveness of pre-training diminishes with the size of the dataset [23], we create a small version of the dataset for our experiments. This constitutes of 1000 training and 1000 validation images that are randomly selected but keeping the same class distribution of the original dataset. We call it miniModaNet in our experiments. + +General Scenes: We use PASCAL VOC object detection [18] as the client's dataset for this scenario. The task in this case is object detection on 20 object classes. We use the trainval2007 set containing 5011 images for training and evaluate on test2007 containing 4962 images. + +Evaluation: We use Intersection-Over-Union (IoU) to measure client's performance in its downstream task. Specifically, we follow the MS-COCO evaluation style and compute IoU at three different thresholds: a) 0.50, b) 0.75, c) an average of ten thresholds (.5 : .05 : .95). The same evaluation style is used for both, object detection and instance segmentation. Notice however that in the case of instance segmentation, the overlap is based on segmented regions. + +Baselines: In this regime, we compare our approach vs no pretraining, uniform sampling, and pretraining on the whole server dataset (i.e., MS-COCO). In all cases, we initialize with ImageNet pretrained weights as they are widely available and this has become a common practice. + +Implementation Details: Client. We use Mask-RCNN [24] with a ResNet50-FRN backbone detection head as the client's network. After obtaining a subset of $S$ , the client pre-trains a network on the selected subset and uses the pre-trained model as initialization for fine-tuning using the client (target) dataset. For object detection, we pretrain with a 681 class (80 class from COCO, 601 class from OpenImages) detection head using bounding box labels. For instance segmentation, we pre-train with 80 class (for COCO) or 350 class (for OpenImages) detection head using object mask labels. Server. For all self-supervised experts, we use ResNet18 [25], and train our models to predict image rotations. MS-COCO and OpenImages are partitioned into $K = 6$ and $K = 50$ experts, respectively. + +# 4.1.1 Qualitative and Quantitative Results + +Object Detection: Table 1 reports the average precision at various IoU of the client's network pre-trained using data selected using different budgets and methods. First, we see that a general trend of pre-training the network on sampled detection data helps performance when fine-tuning on smaller client detection datasets compared to fine-tuning the network from ImageNet initialization. By pre-training on 90K images from COCO+OpenImages, we observe a $1 - 5\%$ gain in AP at 0.5 IoU across all 3 client (target) datasets. This result is consistent with [32] which suggests that a pretraining task other than classification is beneficial for improving transfer performance on localization tasks. Next, + +
Pretrain Server Data (COCO + OpenImages)Client Dataset
Sampled Data SizeMethodPASCAL-VOC2007miniModaNetCityscapes
File Size# ImagesAPbbAPbb50APbb75APbbAPbb50APbb75APbbAPbb50APbb75
ImageNet Initialization44.3073.6646.4433.4057.9835.0034.9459.8635.69
26GB / 538GB90K (5%)Uniform Sampling NDS47.6176.8851.9535.6458.4039.0936.4961.8836.36
48.3676.9152.5338.8461.2343.8638.4663.7939.59
54GB / 538GB180K (10%)Uniform Sampling NDS48.0577.1752.0435.7858.5039.7136.4161.2237.17
50.2878.6155.4738.9761.3242.9340.0765.8541.14
+ +Table 1: Results for object detection on the 3 client datasets. Scores are measured in %. + +
Pretrain. Sel. MethodTarget Dataset
Stanf. DogsStanf. CarsOxford-IIIIT PetsFlowers 102CUB200 Birds
0%Random Init.23.6618.6032.3548.0225.06
100%Entire Dataset64.6652.9279.1284.1456.99
20%Uniform Sample52.8442.2671.1179.8748.62
NDS (SP+TS)72.2144.4081.4181.7554.00
NDS (SP+SS)73.4644.5382.0481.6254.75
NDS (UP+SS)66.9744.1579.2080.7452.66
40%Uniform Sample59.4347.1875.9682.5852.74
NDS (SP+TS)68.6650.6780.7683.3158.84
NDS (SP+SS)69.9751.4081.5283.2757.25
NDS (UP+SS)67.1649.5279.6983.5157.44
+ +![](images/5b72442d4612d1c820753ea937913c9d3ac169cddc8da77c98d1b6c187e3c26b.jpg) +Figure 4: Relationship between domain classifier and proxy task performance on subsets $\hat{S}$ . + +Table 4: Ablation experiments on gating and expert training. SP=Superclass Partition, UP=Unsupervised Partition, TS=Task-Specific experts (experts trained on classif. labels), and SS=Self-Supervised experts (experts trained to predict image rotation). + +
DataMethodOxford-IIIT PetCUB200 Birds
20%Uniform Samp.71.148.6
KNN + [16]74.451.6
[37]81.354.3
NDS82.054.8
40%Uniform Samp.76.052.7
KNN + [16]78.156.1
[37]81.057.4
NDS81.557.3
Entire ImageNet79.157.0
+ +Table 5: Transfer learning performance on classification datasets comparing data selection methods. + +
Data (# Images)Method\(AP^{bb}\)\(AP^{bb}\)\(AP\)\(AP^{50}\)
0ImageNet Initial.36.262.332.057.6
23KUniform SamplingNDS38.164.934.360.0
40.766.036.161.0
47KUniform SamplingNDS39.865.534.460.0
42.268.136.762.3
59KUniform SamplingNDS39.564.934.960.4
41.766.636.761.9
118KFull COCO41.866.536.562.3
+ +Table 2: Transfer learning results for instance segmentation with Mask R-CNN on Cityscapes by selecting images from COCO. + +
Data (# Images)Method\(AP^{bb}\)\(AP^{bb}\)\(AP\)\(AP^{50}\)
0ImageNet Initial.36.262.332.057.6
118KUniform SamplingNDS37.562.532.857.2
39.965.135.159.8
200KUniform SamplingNDS37.863.132.957.8
40.765.836.161.2
+ +Table 3: Transfer learning results for instance segmentation with Mask R-CNN on Cityscapes by selecting images from OpenImages. + +we see that under the same budget of $90\mathrm{K} / 180\mathrm{K}$ images from the server, pre-training with data selected by NDS outperforms the baseline which uses images randomly sampled from $\mathcal{S}$ for all client datasets. + +Instance Segmentation: Table 2 reports the instance segmentation performance by sampling 23K, 47K, and 59K images from COCO for pre-training on Cityscapes. We can see that pre-training using subsets selected by NDS is $2 - 3\%$ better than the uniform sampling baseline. Furthermore, using $40\%$ (47K/118K), or $50\%$ (59K/118K) images from COCO yields comparable (or better) performance to using the entire $100\%$ (118K) of data. Table 3 shows the results + +of sampling 118K, 200K images from OpenImages dataset as our server dataset. + +Qualitative Results: Figure 6 shows qualitative results on MINIMODANET from detectors pre-trained fromImagenet, uniformly sampled images from $S$ , and images sampled using NDS. In the cases shown, the network pre-trained using the data recommended by NDS shows better localization ability, and is able to make more accurate predictions. + +# 4.2. Support for Diverse Clients Same Task + +For completeness, and in order to compare to stronger baselines that are limited to classification tasks, we also quantitatively evaluate the performance of NDS in the same-client-same-task regime. In this case, the task is set to be classification and the server indexes the Downsampled ImageNet [13] dataset. This a variant of ImageNet [17] resized to $32 \times 32$ . In this case, we use $K = 10$ experts. + +Client's Datasets: We experiment with several small classification datasets. Specifically, we use Stanford Dogs [29], Stanford Cars [30], Oxford-IIIT Pets [40], Flowers 102 [38], and CUB200 Birds [48] as client datasets. + +Implementation Details: We use ResNet18 [25] as our client's network architecture, and an input size of $32 \times 32$ during training. Once subsets of server data are selected, we pre-train on the selected subset and evaluate the performance by fine-tuning on the client (target) datasets. + +Comparison to data selection methods: Cui et al. [16] and Ngiam et al. [37] recently proposed data selection methods for improving transfer learning for classification tasks. In this restricted regime, we can compare to these methods. Specifically, we compare our NDS with [37], where they sample data based on the probability over + +![](images/3beb127111b767f2695e0c5242ef229d32672024892f4f2be89a300c4751b2a4.jpg) +Figure 5: Instance segmentation results on Cityscapes using network pre-trained from ImageNet initialization (left), 47K images uniformly sampled (middle), and 47K images from NDS (right). Notice that the output segmentations generally look cleaner when training on NDS-recommended data. + +![](images/7d466cef3689e06725b63866046dc9a0853d04d6e41b3453a15488a72cdc86a0.jpg) +Figure 6: Object detection results in miniModaNet using network pretrained from ImageNet initialization (left), 90K images uniformly sampled (middle), and 90K images sampled using NDS (right). A score threshold of 0.6 is used to display these images. + +![](images/3435efc951adabb6b067aace5ff971f496e27d48a19ffab3e826ffffada33e00.jpg) + +![](images/4c59501d2966bd49ad63694b145568a34c769151eb524b60a54ecd2a63bc233d.jpg) +Figure 7: Simulating an incrementally growing dataserver, and the time required to "train" a model to represent the server. We NDS compare to the baseline of [37] (which is limited to classification tasks). + +source dataset classes computed by pseudo-labeling the target dataset with a classifier trained on the source dataset. We also create a baseline KNN by adapting Cui et al.'s method [16]. Here, we sample from the most similar categories measured by the mean features of categories between the client and server data. We emphasize that the previous two approaches are limited to the classification task, and cannot handle diverse tasks. Furthermore, they do not scale to datasets beyond classification, and [37] does not scale to a growing dataserver. Our approach achieves comparable results to [37], and can be additionally applied to source datasets with no classification labels such as MS-COCO, or even datasets which are not labeled. + +# 4.3. Ablation Experiments + +Domain Confusion: To see how well the performance of the proxy task reflects the domain confusion, we perform an experiment comparing the proxy task performance and $\hat{d}_{\mathcal{A}}(\hat{\mathcal{S}},\mathcal{T})$ . To estimate $\hat{d}_{\mathcal{A}}$ , we follow the same idea from [6, 12, 19] and for each subset $\hat{S}$ , we estimate the domain confusion. Figure 4 shows the domain confusion vs the proxy task performance using several classification datasets as the target (client) domain. In this plot, the highest average loss corresponds to the subset with the highest domain confusion (i.e., $S_{i}$ that is the most indistinguishable from the target domain). Notice that this correlates with the expert that gives the highest proxy task performance. + +Ablation on gating and expert training: In Table 4, we compare different instantiations of our approach on five client classification datasets. For all instantiations, pretraining on our selected subset significantly outperforms the pre-training on a randomly selected subset of the same size. + +Our result in Table 4 shows that under the same superclass partition, the subsets obtained through sampling according to the transferability measured by self-supervised experts $(\mathrm{SP} + \mathrm{SS})$ yield a similar downstream performance compared to sampling according to the transferability measured by the task-specific experts $(\mathrm{SP} + \mathrm{TS})$ . This suggests that self-supervised training for the experts can successfully be used as a proxy to decide which data points from the source dataset are most useful for the target dataset. + +Scalability: Fig 7 analyzes the (simulated) required training time of the server as a new dataset is being incrementally added to it. We simulate a comparison between [37] (which needs to retrain the model on all datasets each time a dataset is added, and thus scales linearly) and NDS (where expert training is only ran on the additional dataset). + +Limitations and Discussion: A limitation in our method is that the annotation quality/statistics in the dataserver datasets is not considered. This is shown in our instance segmentation experiment where the gains from pre-training on images sampled from OpenImages is smaller than pretraining on MS-COCO. This is likely due to the fact that MS-COCO has on average $\sim 7$ instance annotations per image while OpenImages contains many images without mask annotations or at most $\sim 2$ instance annotations per image. OpenImages has further been labeled semi-automatically and thus in many cases the annotations are noisy. + +# 5. Conclusion + +In this work, we propose a novel method that aims to optimally select subsets of data from a large dataserver given a particular target client. In particular, we represent the server's data with a mixture of experts trained on a simple self-supervised task. These are then used as a proxy to determine the most important subset of the data that the server should send to the client. We experimentally show that our method is general and can be applied to any pre-training and fine-tuning scheme and that our approach even handles the case where no labeled data is available (only raw data). We hope that our work opens a more effective way of performing transfer learning in the era of massive datasets. In the future, we aim to increase the capability of NDS to also support other modalities such as 3D, text and speech. + +Acknowledgments: The authors acknowledge partial support by NSERC. SF acknowledges the Canada CIFAR AI Chair award at Vector Institute. We thanks Relu Patrascu for his continuous infrastructure support. We also thank Amlan Kar, Huan Ling and Jun Gao for early discussions, and Tianshi Cao and Jonah Philion for feedback in the manuscript. + +# References + +[1] Sami Abu-El-Haija, Nisarg Kothari, Joonseok Lee, Apostol Natsev, George Toderici, Balakrishnan Varadarajan, and Sudheendra Vijayanarasimhan. Youtube-8m: A large-scale video classification benchmark. ArXiv, abs/1609.08675, 2016. 1 +[2] Alessandro Achille, Michael Lam, Rahul Tewari, Avinash Ravichandran, Subhransu Maji, Charless C. Fowlkes, Stefano Soatto, and Pietro Perona. Task2vec: Task embedding for meta-learning. 2019 IEEE/CVF International Conference on Computer Vision (ICCV), pages 6429-6438, 2019. 2 +[3] David Acuna, Amlan Kar, and Sanja Fidler. Devil is in the edges: Learning semantic boundaries from noisy annotations. In CVPR, 2019. 2 +[4] David Acuna, Huan Ling, Amlan Kar, and Sanja Fidler. Efficient interactive annotation of segmentation datasets with polygon-rnn++. In CVPR, 2018. 2 +[5] Shai Ben-David, John Blitzer, Koby Crammer, Alex Kulesza, Fernando Pereira, and Jennifer Wortman Vaughan. A theory of learning from different domains. Machine Learning, 79:151-175, 2009. 5 +[6] Shai Ben-David, John Blitzer, Koby Crammer, and Fernando Pereira. Analysis of representations for domain adaptation. In B. Scholkopf, J. C. Platt, and T. Hoffman, editors, NeurIPS, pages 137-144. MIT Press, 2007. 6, 8 +[7] Yoshua Bengio, Jérôme Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In Proceedings of the 26th annual international conference on machine learning, pages 41-48. ACM, 2009. 3 +[8] Keith Bonawitz, Vladimir Ivanov, Ben Kreuter, Antonio Marcedone, H. Brendan McMahan, Sarvar Patel, Daniel Ramage, Aaron Segal, and Karn Seth. Practical secure aggregation for privacy-preserving machine learning. In ACM Conf. on Computer and Communications Security, 2017. 2 +[9] Sergi Caelles, Alberto Montes, Kevis-Kokitsi Maninis, Yuhua Chen, Luc Van Gool, Federico Perazzi, and Jordi Pont-Tuset. The 2018 davis challenge on video object segmentation. ArXiv, abs/1803.00557, 2018. 1 +[10] 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, abs/1903.11027, 2019. 1 +[11] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L. Yuille. Deep convolutional nets, atrous convolution, and fully connected crfs. CoRR, abs/1606.00915, 2016. 1 +[12] Minmin Chen, Kilian Q Weinberger, Zhixiang Xu, and Fei Sha. Marginalizing stacked linear denoising autoencoders. Journal of Machine Learning Research, 16(1):3849-3875, 2015. 6, 8 +[13] Patryk Chrabaszcz, Ilya Loshchilov, and Frank Hutter. A downsampled variant of imagenet as an alternative to the cifar datasets, 2017. 7 + +[14] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. CVPR, pages 3213-3223, 2016. 6 +[15] Gabriela Csurka. Domain adaptation for visual applications: A comprehensive survey. arXiv preprint arXiv:1702.05374, 2017. 2 +[16] Yin Cui, Yang Song, Chen Sun, Andrew Howard, and Serge J. Belongie. Large scale fine-grained categorization and domain-specific transfer learning. CVPR, pages 4109-4118, 2018. 2, 7, 8 +[17] 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, 7 +[18] Mark Everingham, Luc Van Gool, Christopher K. I. Williams, John M. Winn, and Andrew Zisserman. The pascal visual object classes (voc) challenge. International Journal of Computer Vision, 88:303-338, 2009. 6 +[19] Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor S. Lempitsky. Domain-adversarial training of neural networks. J. Mach. Learn. Res., 17:59:1-59:35, 2015. 6, 8 +[20] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In CVPR, 2012. 1 +[21] Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. In ICLR, 2018. 5 +[22] Sam Gross, Marc'Aurelio Ranzato, and Arthur Szlam. Hard mixtures of experts for large scale weakly supervised vision. In CVPR, pages 6865-6873, 2017. 4 +[23] Kaiming He, Ross B. Girshick, and Piotr Dólar. Rethinking imagenet pre-training. CoRR, abs/1811.08883, 2018. 2, 6 +[24] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross B. Girshick. Mask r-cnn. ICCV, pages 2980-2988, 2017. 1, 6 +[25] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CVPR, pages 770-778, 2015. 6, 7 +[26] Geoffrey E. Hinton, Oriol Vinyals, and Jeffrey Dean. Distilling the knowledge in a neural network. ArXiv, abs/1503.02531, 2015. 4 +[27] Robert A. Jacobs, Michael I. Jordan, Steven J. Nowlan, and Geoffrey E. Hinton. Adaptive mixtures of local experts. *Neural Computation*, 3:79–87, 1991. 4 +[28] Amlan Kar, Aayush Prakash, Ming-Yu Liu, Eric Cameracci, Justin Yuan, Matt Rusiniak, David Acuna, Antonio Torralba, and Sanja Fidler. Meta-sim: Learning to generate synthetic datasets. In ICCV, 2019. 3 +[29] Aditya Khosla, Nityananda Jayadevaprakash, Bangpeng Yao, and Li Fei-Fei. Novel dataset for fine-grained image categorization. In CVPR Workshop on Fine-Grained Visual Categorization, Colorado Springs, CO, June 2011. 7 +[30] Jonathan Krause, Michael Stark, Jia Deng, and Li Fei-Fei. 3d object representations for fine-grained categorization. In IEEE Workshop on 3D Representation and Recognition (3dRR-13), Sydney, Australia, 2013. 7 + +[31] 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:1811.00982, 2018. 1, 6 +[32] Hengduo Li, Bharat Singh, Mahyar Najibi, Zuxuan Wu, and Larry S. Davis. An analysis of pre-training on object detection. ArXiv, abs/1904.05871, 2019. 6 +[33] Tsung-Yi Lin, Michael Maire, Serge J. Belongie, Lubomir D. Bourdev, Ross B. Girshick, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollar, and C. Lawrence Zitnick. Microsoft coco: Common objects in context. In ECCV, 2014. 1, 6 +[34] Dhruv Mahajan, Ross Girshick, Vignesh Ramanathan, Kaiming He, Manohar Paluri, Yixuan Li, Ashwin Bharambe, and Laurens van der Maaten. Exploring the limits of weakly supervised pretraining. In ECCV, pages 181-196, 2018. 2 +[35] H. Brendan McMahan, Eider Moore, Daniel Ramage, and Blaise Agüera y Arcas. Federated learning of deep networks using model averaging. ArXiv, abs/1602.05629, 2016. 2 +[36] Bhairav Mehta, Manfred Diaz, Florian Golemo, Christopher J Pal, and Liam Paull. Active domain randomization. arXiv preprint arXiv:1904.04762, 2019. 3 +[37] Jiquan Ngiam, Daiyi Peng, Vijay Vasudevan, Simon Kornblith, Quoc V. Le, and Ruoming Pang. Domain adaptive transfer learning with specialist models, 2018. 2, 7, 8 +[38] M-E. Nilsback and A. Zisserman. Automated flower classification over a large number of classes. In Proc. of the Indian Conference on Computer Vision, Graphics and Image Processing, Dec 2008. 7 +[39] Sinno Jialin Pan and Qiang Yang. A survey on transfer learning. IEEE Trans. on knowledge and data engineering, 22(10):1345-1359, 2009. 2 +[40] O. M. Parkhi, A. Vedaldi, A. Zisserman, and C. V. Jawahar. Cats and dogs. In CVPR, 2012. 7 +[41] Nataniel Ruiz, Samuel Schulter, and Manmohan Chandraker. Learning to simulate. arXiv preprint arXiv:1810.02513, 2018.3 +[42] Burr Settles. Active learning literature survey. Technical report, University of Wisconsin-Madison Department of Computer Sciences, 2009. 3 +[43] Evan Shelhamer, Jonathan Long, and Trevor Darrell. Fully convolutional networks for semantic segmentation. PAMI, 39(4):640-651, Apr. 2017. 1 +[44] Chen Sun, Abhinav Shrivastava, Saurabh Singh, and Abhinav Gupta. Revisiting unreasonable effectiveness of data in deep learning era. In ICCV, pages 843-852, 2017. 2 +[45] Towaki Takikawa, David Acuna, Varun Jampani, and Sanja Fidler. Gated-scnn: Gated shape cnns for semantic segmentation. ArXiv, abs/1907.05740, 2019. 6 +[46] Jonathan Tremblay, Aayush Prakash, David Acuna, Mark Brophy, Varun Jampani, Cem Anil, Thang To, Eric Cameracci, Shaad Boochoon, and Stan Birchfield. Training deep networks with synthetic data: Bridging the reality gap by domain randomization. In CVPR Workshop, pages 969–977, 2018. 2 + +[47] Shashank Tripathi, Siddhartha Chandra, Amit Agrawal, Ambrish Tyagi, James M Rehg, and Visesh Chari. Learning to generate synthetic data via compositing. In CVPR, pages 461-470, 2019. 3 +[48] C. Wah, S. Branson, P. Welinder, P. Perona, and S. Belongie. The Caltech-UCSD Birds-200-2011 Dataset. Technical Report CNS-TR-2011-001, California Institute of Technology, 2011. 7 +[49] Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? In NeurIPS, 2014. 2 +[50] Amir Roshan Zamir, Alexander Sax, William B. Shen, Leonidas J. Guibas, Jagannath Malik, and Silvio Savarese. Taskonomy: Disentangling task transfer learning. CVPR, pages 3712-3722, 2018. 2, 5 +[51] Shuai Zheng, Fan Yang, M. Hadi Kiapour, and Robinson Pi-ramuthu. Modanet: A large-scale street fashion dataset with polygon annotations. In ACM Multimedia, 2018. 6 +[52] Yi Zhu, Karan Sapra, Fitsum A. Reda, Kevin J. Shih, Shawn D. Newsam, Andrew Tao, and Bryan Catanzaro. Improving semantic segmentation via video propagation and label relaxation. In CVPR, 2018. 6 \ No newline at end of file diff --git a/neuraldataserveralargescalesearchenginefortransferlearningdata/images.zip b/neuraldataserveralargescalesearchenginefortransferlearningdata/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..e0f0674f1c13d98569d5fa307b873ee256a23804 --- /dev/null +++ b/neuraldataserveralargescalesearchenginefortransferlearningdata/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9baf2731d5dbdde7cf4a89fbb5c064faa7f96a54df6acd41e38d9668261c2ec8 +size 535273 diff --git a/neuraldataserveralargescalesearchenginefortransferlearningdata/layout.json b/neuraldataserveralargescalesearchenginefortransferlearningdata/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d6c0e3e57405deaea3ce6e4beabda397418376e2 --- /dev/null +++ b/neuraldataserveralargescalesearchenginefortransferlearningdata/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20c55a0e68d0f69270b80ae878be055cab1b21c72796419b7159c2c66e7a0d90 +size 475217 diff --git a/neuralheadreenactmentwithlatentposedescriptors/77bd6f5d-ca49-41be-b0b8-e280365c2a74_content_list.json b/neuralheadreenactmentwithlatentposedescriptors/77bd6f5d-ca49-41be-b0b8-e280365c2a74_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..716d6c168fb24dfac4f44bb6104d8aa399903141 --- /dev/null +++ b/neuralheadreenactmentwithlatentposedescriptors/77bd6f5d-ca49-41be-b0b8-e280365c2a74_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3e8a03985a35bf62cb71a92f8e7982896445c4b23f4d643b7e7afd0b61c2d82 +size 60598 diff --git a/neuralheadreenactmentwithlatentposedescriptors/77bd6f5d-ca49-41be-b0b8-e280365c2a74_model.json b/neuralheadreenactmentwithlatentposedescriptors/77bd6f5d-ca49-41be-b0b8-e280365c2a74_model.json new file mode 100644 index 0000000000000000000000000000000000000000..3023aafef24d999379cf08f21ef36da67f9216a4 --- /dev/null +++ b/neuralheadreenactmentwithlatentposedescriptors/77bd6f5d-ca49-41be-b0b8-e280365c2a74_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de69310b24374091e77a16cdb2ba1cb33e574f3caa4a0a3b3e02834fe8404c4e +size 78003 diff --git a/neuralheadreenactmentwithlatentposedescriptors/77bd6f5d-ca49-41be-b0b8-e280365c2a74_origin.pdf b/neuralheadreenactmentwithlatentposedescriptors/77bd6f5d-ca49-41be-b0b8-e280365c2a74_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..67d615f686503d504f5173dae1386b6d7d1466b9 --- /dev/null +++ b/neuralheadreenactmentwithlatentposedescriptors/77bd6f5d-ca49-41be-b0b8-e280365c2a74_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a9446becae34c47206c66dfabd8b3b0417d3e204bc275d112c0936c1f951bdd +size 924632 diff --git a/neuralheadreenactmentwithlatentposedescriptors/full.md b/neuralheadreenactmentwithlatentposedescriptors/full.md new file mode 100644 index 0000000000000000000000000000000000000000..3e2c03943091609dffd1e199aabcbb44125368c4 --- /dev/null +++ b/neuralheadreenactmentwithlatentposedescriptors/full.md @@ -0,0 +1,242 @@ +# Neural Head Reenactment with Latent Pose Descriptors + +Egor Burkov1,2 Igor Pasechnik1 Artur Grigorev1 Victor Lempitsky1,2 + +$^{1}$ Samsung AI Center, Moscow $^{2}$ Skolkovo Institute of Science and Technology + +# Abstract + +We propose a neural head reenactment system, which is driven by a latent pose representation and is capable of predicting the foreground segmentation alongside the RGB image. The latent pose representation is learned as a part of the entire reenactment system, and the learning process is based solely on image reconstruction losses. We show that despite its simplicity, with a large and diverse enough training dataset, such learning successfully decomposes pose from identity. The resulting system can then reproduce mimics of the driving person and, furthermore, can perform cross-person reenactment. Additionally, we show that the learned descriptors are useful for other pose-related tasks, such as keypoint prediction and pose-based retrieval. + +# 1. Introduction + +Head video reenactment has seen dramatic progress in quality and robustness over the recent years. Current state-of-the-art systems [33, 22, 37, 30, 39, 42, 10, 36, 35] demonstrate compelling nearly photorealistic "talking head" reenactments. The most recent ones are able to accomplish this even when a single image of the target person is available [30, 42, 10, 36, 35], by using deep neural generative networks. In this work, we improve on the pre-existing neural one-shot head reenactment systems in two important ways. First, rather straightforwardly, we augment the previous state-of-the-art reenactment system [42] with the ability to predict foreground segmentation. Such prediction is needed for various scenarios, such as telepresence, where the transfer of the original background to the new environment can be undesirable. + +More importantly, we suggest a new pose representation for neural head reenactment. The representation of the pose plays the key role in the quality of reenactment. Most systems, including [33, 22, 37, 42, 10, 36], are based on keypoint (landmark) representation. The main advantage of such representation is that robust and efficient "off-the + +shelf" landmark detectors are now available [21, 2]. + +Face landmarks, however, suffer from several shortcomings. First, learning a landmark detector requires excessive annotation effort, and the sets of annotated landmarks often miss some important aspects of the pose. E.g. many landmark annotations do not include eye pupils, and as a consequence, the reenactment will not have a full control of the gaze. Second, many of the landmarks do not have an anatomical basis, and their annotation is ambiguous and prone to errors, especially, when they are occluded. In practice, such ambiguity of annotation often translates into temporal instability of keypoint detection that in turn translates into the reenactment results. Finally, as a representation, landmarks are person-specific, as they contain considerable amount of information about pose-independent head geometry. This may be highly undesirable for head reenactment, e.g. if one wants to drive an iconic photograph or painting with the target person having a different head geometry. + +The emergence of large unlabeled datasets of human videos such as [29, 4, 5] allows to learn latent pose-expression descriptors in an unsupervised way. This approach has been first explored in [39, 38], where the latent pose descriptors were learned such that the dense flow between different frames can be inferred from the learned descriptors. In this work, we propose an alternative to the warping-based approach [39, 38]. Our approach learns low-dimensional person-agnostic pose descriptors alongside with medium-dimensional person-specific pose-independent descriptors, by imposing a set of reconstruction losses on video frames over a large collection of videos. Importantly, when evaluating the reconstruction losses, we segment out the background, so that the background clutter and its change across frames does not affect the learned descriptors. + +We show that a simple learning framework based on sampling multiple random frames from the same video paired with the large size of the video dataset allows to learn extractors for both descriptors that work very well for reenactment tasks, including cross-person reenactment. In particular, we show that our reenactment based on the new latent pose representation preserves the identity of the target person much better than when FAb-Net [38] and + +![](images/437373b91e71b4309cbdfe85ba34b13df3d9323d2dcb03353ec7d8521b24e082.jpg) +Figure 1: Being a Mona Lisa. Our system can generate realistic reenactments of arbitrary talking heads (such as Mona Lisa) using arbitrary people as pose drivers (top row). Despite learning in an unsupervised setting, the method can successfully decompose pose and identity, so that the identity of the reenacted person is preserved. + +X2Face [39] pose descriptors are used. Additionally, we analyze the quality of learned latent pose descriptors for such tasks as landmark prediction and pose-based retrieval. + +# 2. Related work + +Face/head reenactment is an active area of research. Here we distinguish between works where changes and augmentations are localized within faces (face reenactment), e.g. [33, 30], and more ambitious approaches that model extended regions including significant portion of clothing, neck, upper garment (head reenactment), e.g. [22, 37, 42]. + +Pose representation is an important aspect of reenactment systems. As mentioned above, most works drive reenactment using landmarks [33, 22, 37, 42, 10, 36]. Another approach is to use facial action units (AU) [9], as is done in face reenactment [30] and head reenactment [35]. Detecting action units still requires manual annotation and supervised learning. The X2Face system [39] uses latent vectors that are learned to be predictable of warping fields. + +A more classic approach is to model face/head pose in the 3D morphable model (3DMM) framework [1] or using a similar approach in 2D (e.g. an active appearance model) [6]. Still, learning 3DMM and fitting a learned 3DMM almost invariably involves detecting landmarks, thus inheriting many of the landmark deficiencies. Alternatively, a dataset of 3D scans is required to build a model for pose/identity disentanglement in 3DMM framework. + +Several recent works have investigated how landmarks can be learned in an unsupervised way [44, 19]. While generally very promising, unsupervised keypoints still contain person-specific information just like supervised keypoints, and therefore are not generally suitable for cross-person reenactment. Same applies to dense, high-dimensional descriptors such as DensePose body descriptor [14], and dense face-only descriptors [15, 34]. Finally, Codec avatars [26] learn person-specific latent pose descriptors and extractors based on the reconstruction losses. However, the transfer + +of such descriptors from person to person was not considered. The recent and parallel work [32] has demonstrated that relative motion of unsupervised keypoints can be used to transfer animations at least in the absence of strong head rotation. Full-fledged comparison of our approach to [32] is left for future work. + +Beyond head/face reenactment, there is a very large body of work on learning disentangled representations. Some representative works that learn latent pose or shape descriptors for arbitrary classes of objects using datasets of videos include [8, 40]. Some approaches (e.g. [24]) aim to learn content-style disentanglement (which may roughly correspond to shape-texture disentanglement) using adversarial [12] and cycle-consistency [45, 17] losses. Alternatively, disentanglement can be obtained by the direct fitting of factorized distributions to data (e.g. [23]). + +# 3. Method + +Our system modifies and expands the reenactment model of Zakharov et al. [42]. First, the ability to predict the segmentation is added. Second, the system learns to perform reenactment based on latent pose vectors rather than keypoints. Below, we provide the details of our system (shown in Figure 2). + +# 3.1. Training pipeline + +As in [42], we learn on the VoxCeleb2 dataset [4] of video sequences. Each sequence contains a talking person, and is obtained from a raw sequence by running a face detector, cropping the resulting face and resizing it to a fixed size ( $256 \times 256$ in our case). Also, as in the case of [42], there is a "meta-learning" stage when a big model responsible for reproducing all people in the dataset is trained through a sequence of training episodes, and a fine-tuning stage, when that "meta-model" is fine-tuned to a tuple of images (or a single image) of a particular person. + +![](images/fbb4348df89691079dd8f5c2c596281d902f395385c4a9f0da1f12b3d080aeae.jpg) +Figure 2: At each step of meta-learning, our system samples a set of frames from a video of a person. The frames are processed by two encoders. The bigger identity encoder is applied to several frames of the video, while the smaller pose embedder is applied to a hold-out frame. The obtained embeddings are passed to the generator network, whose goal is to reconstruct the last (hold-out) frame. Since the capacity of the pose encoder is limited, and since its input does not exactly match other frames w.r.t. identity (thanks to data augmentation), the system learns to extract all pose-independent information through the identity encoder, and uses the smaller encoder to capture only pose-related information, thus achieving pose-identity disentanglement. + +Our changes affect both stages in an analogous way, and we focus on the meta-learning step in the below discussion. + +During each episode of meta-learning we consider a single video sequence. We then fetch $K + 1$ random frames $I_1, \ldots, I_{K + 1}$ from this sequence, as well as $S_{K + 1}$ - a foreground segmentation map for $I_{K + 1}$ , which we precompute using an off-the-shelf semantic segmentation network. The first $K$ images $I_1, \ldots, I_K$ are then fed into a relatively high-capacity convolutional net $F$ , which we call identity encoder. It is analogous to the embedder network in [42] with the exception that it does not accept the keypoints as an input. + +For each image $I_{i}$ , the identity encoder outputs $d_{i}$ -dimensional vector $x_{i} = F(I_{i})$ , which we call the identity embedding of $I_{i}$ . Identity embeddings are expected to contain the pose-independent information about the person (including lighting, clothing, etc.) Given $K$ frames, we obtain a single identity vector $\bar{x}$ by taking the mean of $x_{1}, \ldots x_{K}$ . + +The remaining image $I_{K + 1}$ (the pose source) first undergoes a random pose augmentation transformation $A$ , which is described below. Then, $A(I_{K + 1})$ is passed through a network of much lower capacity, which we call the pose encoder and denote as $G$ . The pose encoder outputs a $d_p$ -dimensional pose embedding $y_{K + 1} = G(A(I_{K + 1}))$ , which we want to be a person-agnostic pose descriptor. + +The transformation $A$ mentioned above is important for pose-identity disentanglement. It keeps person's pose intact but may alter its identity. Namely, it randomly scales the image independently over the horizontal and the vertical axes, and randomly applies content-preserving oper + +ations such as blur, sharpening, contrast change, or JPEG compression. We call $A$ pose augmentation since it is applied on the pose source, and it can be regarded as a form of data augmentation. + +The pose and the identity embeddings are passed to the generator network that tries to reconstruct the image $I_{K + 1}$ as accurately as possible. Whereas [42] used rasterized keypoints (stickman images) to pass the pose into their generator networks, we rely entirely on the AdaIN [16] mechanism to pass both the pose and the identity embeddings to the generator. More specifically, our upsampling generator starts with a constant learnable tensor of size $512 \times 4 \times 4$ and outputs the two tensors: $I^{G}(\bar{x},y_{K + 1})$ of size $3 \times 256 \times 256$ and $S^G (\bar{x},y_{K + 1})$ of size $1 \times 256 \times 256$ , which it tries to match to the foreground part of the image $I_{K + 1}$ and its segmentation mask $S_{K + 1}$ respectively. This is achieved by simply predicting a $4 \times 256 \times 256$ tensor in the final layer. The AdaIN blocks are inserted after each convolution. The AdaIN coefficients are produced by taking the concatenated pose and identity embeddings and passing this $(d_{i} + d_{p})$ -dimensional vector through an MLP with learnable parameters in the spirit of StyleGAN [20]. + +We expect $I^{G}(\bar{x},y_{K + 1})\odot S^{G}(\bar{x},y_{K + 1})$ and $S^G (\bar{x},y_{K + 1})$ produced by the generator to be as close as possible to $I_{K + 1}\odot S_{K + 1}$ and $S_{K + 1}$ , respectively. We achieve this with the help of several loss functions. Segmentation maps are matched with the help of the dice coefficient loss [27]. Head images with background blacked out, on the other hand, are matched using the same combination of losses as in [42]. Namely, there are + +content losses based on matching of ConvNet activations for a VGG-19 model trained for ImageNet classification and a VGGFace model trained for face recognition. Also, $I^{G} \odot S^{G}$ and $I_{K+1} \odot S_{K+1}$ are passed through a projection discriminator (the difference from [42] here is that we again do not provide rasterized keypoints to it) to compute the adversarial loss that pushes images to be realistic, the discriminator feature matching loss, and an embedding match term. + +Reenactment and fine-tuning. Once the model has been meta-learned, it can be used to fit new identities unseen during meta-learning. Thus, given one or more images of a new person, their identity vector $\bar{x}$ can be extracted by passing those images through the identity encoder and averaging the results element-wise. Then, by plugging in a pose vector $y$ extracted from an image of the same or of a different person, we can reenact the person by computing the image $I^{G}(\bar{x}, y)$ and its foreground mask $S^{G}(\bar{x}, y)$ . + +To further reduce the identity gap, we follow [42] and fine-tune the model (namely, the weights of the MLP, the generator, and the discriminator) with the same set of losses as in [42] plus the dice coefficient loss treating the provided set of images of a new person and their segmentation as the ground truth. The estimated identity embedding $\bar{x}$ is kept fixed during the fine-tuning (including it into the optimization did not result in any difference in our experiments, since the number of parameters in the embedding $\bar{x}$ is much smaller than in the MLP and the generator network). The pose embedding network $G$ is also kept fixed during the fine-tuning. + +# 3.2. Disentanglement of pose and identity + +Our key finding is that when applied to a person $X$ the reenactment model trained as discussed above can successfully reproduce the mimics of a person in image $I$ when the pose vector $y = G(I)$ is extracted from an image of the same person $X$ . More surprisingly, the model can also reproduce the mimics when the pose vector is extracted from an image of a different person $Y$ . In this case, the bleeding of identity from this different person is kept to a minimum, i.e. the resulting image still looks like an image of a person $X$ . + +Initially, we expected that such disentanglement of pose and identity should not happen, and that some form of adversarial training [12] or cycle-consistency [45, 17] would be necessary to ensure the disentanglement. It turns out that with (i) low enough capacity of the pose extractor network $G$ , (ii) pose augmentations applied, and (iii) background segmented out, disentanglement happens automatically, and our experiments with extra loss terms such as in e.g. [8] did not produce any further improvement. Apparently, with the three techniques above, the model prefers to extract all + +person-specific details from the identity source frame using the higher-capacity identity extractor network. + +In Section 4 below, we evaluate this disentanglement effect that came as a "pleasant surprise" and show that it is indeed stronger than in the case of other related approaches (i.e. supports cross-person reenactment better with less identity bleeding). + +In supplementary material, we additionally conduct ablation studies to investigate how pose encoder capacity, pose augmentations, segmentation, and latent pose vector dimensionality $d_{p}$ affect the ability of our reenactment system to preserve pose and identity. + +# 3.3. Implementation details + +Our training dataset is a collection of YouTube videos from VoxCeleb2 [4]. There are on the order of 100,000 videos of about 6,000 people. We sampled 1 of every 25 frames from each video, leaving around seven million of total training images. In each image, we re-cropped the annotated face by first capturing its bounding box with the $\mathrm{S}^3\mathrm{FD}$ detector [43], then making that box square by enlarging the smaller side, growing the box's sides by $80\%$ keeping the center, and finally resizing the cropped image to $256 \times 256$ . Human segmentation is obtained by the Graphonomy model [11]. As in [42], we set $K = 8$ thus using the identity vector extracted from eight random frames of a video in order to reconstruct the ninth one based on its pose descriptor. + +In our best model, the pose encoder has the MobileNetV2 architecture [31] and the identity encoder is a ResNeXt-50 $(32 \times 4\mathrm{d})$ [41]. Both have not been tweaked, and so they include batch normalization [18]. The pose and identity embedding sizes, $d_p$ and $d_i$ , are 256 and 512 respectively. No normalization or regularization is applied to the embeddings. The module that transforms them into AdaIN parameters is a ReLU perceptron with spectral normalization and one hidden layer of 768 neurons. + +Our generator is based on that of [42], but without donwsampling blocks, since all inputs are delegated to AdaINs, which are located after each convolution. More precisely, a $512 \times 4 \times 4$ learnable constant tensor is transformed by 2 constant resolution residual blocks, followed by 6 upsampling residual blocks. We start halving the number of channels from the fourth upsampling block so that the tensor of final resolution $(256 \times 256)$ has 64 channels. That tensor is passed through an AdaIN layer, a ReLU, a $1 \times 1$ convolution and a tanh, becoming a 4-channel image. Unlike [42], we do not use self-attention. Spectral normalization [28] is employed everywhere in the generator, the discriminator and the MLP. + +Instead of alternating generator and discriminator updates, a single weight update is carried out for all networks after gradient accumulations from all loss terms. + +We trained the model for 1,200,000 iterations with a + +minibatch of 8 samples spread over two NVIDIA P40 GPUs, which in total takes about two weeks. + +# 4. Results + +Our quantitative evaluation assesses both the relative performance of the pose descriptors using auxiliary tasks, and the quality of cross-person reenactment. Qualitatively, we show examples of reenactment in same-person and cross-person scenarios as well as interpolation results in the learned pose space. The ablation study in the supplementary material shows the effect of different components of our method. + +# 4.1. Compared methods + +Below, we compare our results with the results of the following methods and systems. We consider the following pose descriptors based on various degrees of supervision: + +- Ours. 256-dimensional latent pose descriptors learned within our system. +- X2Face. 128-dimensional driving vectors learned within the X2Face reenactment system [39]. +- FAb-Net. We also evaluate the 256-dimensional FAb-Net descriptors [38] as a pose representation. These are related to ours in that, although not being person-agnostic, they are also learned in an unsupervised way from the VoxCeleb2 video collection. +- 3DMM. We consider a state-of-the-art 3DMM system [3]. This system extracts decomposed rigid pose, face expression, and a shape descriptor using a deep network. The pose descriptor is obtained by concatenating the rigid pose rotation (represented as a quaternion), and the face expression parameters (29 coefficients). + +Our descriptor learns from VoxCeleb2 dataset. X2Face descriptor is trained on a smaller VoxCeleb1 dataset [29], and FAb-Net is learned from both. The 3DMM descriptors are most heavily supervised, as the 3DMM is learned from 3D scans and requires a landmark detector (which is in turn learned in a supervised setting). + +In addition, we consider the following head reenactment systems based on these pose descriptors: + +- Ours. Our full system as described in Section 3. +- X2Face. The X2Face system [39] based on native descriptors and warping-based reenactment. +- X2Face+. In this variant, we use frozen pre-trained X2Face's driving network (up to the driving vector) instead of our pose encoder, and keep the rest of the + +
Accuracy for Top-N queries (%)
DescriptorN=10N=20N=50N=100
FAb-Net45.740.836.635.7
3DMM47.345.641.941.1
X2Face61.055.751.849.4
Ours75.763.857.854.1
+ +Table 1: The accuracy of pose (expression)-based retrieval results using different pose descriptors on the Multi-PIE dataset. See text for more details. + +architecture unchanged from ours. We train the identity encoder, the generator conditioned on X2Face latent pose vector and our identity embedding, and the projection discriminator. + +- FAb-Net+. Same as X2Face+ but with frozen FAb-Net in place of our pose encoder. +- 3DMM+. Same as X2Face+ but with frozen ExpNet [3] in place of our pose encoder, and with pose augmentations disabled. The pose descriptor is constructed from ExpNet's outputs as described above. We additionally normalize these 35-dimensional descriptors by per-element mean and standard deviation computed over the VoxCeleb2 training set. +- FSTH. The original few-shot talking head system of [42] driven by rasterized keypoints. +- $\mathrm{FSTH}+$ . We retrain the system of [42] by making several changes that makes it more comparable with our system and other baselines. The raw keypoint coordinates are put into the generator using AdaIN mechanism (just like in our system). The generator predicts segmentation alongside the image. We also use the same crops, which are different from [42]. + +# 4.2. Descriptor evaluation + +To understand how good are the learned pose descriptors at matching different people in the same pose, we use the Multi-PIE dataset [13], which is not used for training of either of descriptors, but has six emotion class annotations for people in various poses. We restrict the dataset to near-frontal and half-profile camera orientations (namely 08_0, 13_0, 14_0, 05_1, 05_0, 04_1, 19_0), leaving 177,280 images. In each camera orientation group, we randomly choose a query image from it and fetch the closest $N$ images from the same group using cosine similarity of descriptors. We consider a match to be correct if a person with the same emotion label is returned. We repeat this procedure 100 times for each group. In Table 1 we show the overall ratio of correct matches within top-10, top-20, top-50, and top-100 lists. For the 3DMM + +![](images/49f5cab322c6c17e0c1ad896b8241f875385f1d585e99bbafa58390e189f3182.jpg) +Figure 3: Evaluation of reenactment systems in terms of their ability to represent the driver pose and to preserve reference identity (arrows point towards improvement). See text for details. + +descriptor, we only consider the 29 face expression coefficients and ignore the rigid pose information as irrelevant for emotions. + +In this comparison, it can be observed that the latent space of our pose embeddings is better grouped with respect to emotion classes that those of other facial expression descriptors, as our result is much better for top-10 and top-20 metrics, while being similar to X2Face and better than the rest for top-50 and top-100. We believe that FAb-Net's and X2Face's vectors contain identity information (we prove this again below), so they are more likely to be close to vectors representing same or similar person. As for 3DMM, it requires different latent expression vectors to turn different shapes (persons) into the same facial expression by construction; therefore, expression coefficients may easily coincide for different people showing different facial expressions. + +Keypoint prediction. Keypoint regression is not within our target applications, since keypoints contain person-specific information. However, this is a popular task on which unsupervised pose descriptors have compared in the past, so we have also run our method on a standard benchmark on the MAFL [25] test set. To predict keypoints, we use a ReLU MLP with one hidden layer of size 768, and in our case we use both pose and identity embeddings as an input. Using the standard normalized inter-ocular distance, we obtain the distance error of 2.63. This is smaller than the error of 3.44 obtained by FAb-Net, though behind the state-of-the-art of [19] (2.54) for this task. + +# 4.3. Reenactment performance + +Quantitative evaluation. We compare the performance of the seven reenactment systems listed above in the crossperson setting. To do this, we randomly choose 30 people from the test split of VoxCeleb2 and learn talking head models $T_{1}, \ldots, T_{30}$ for them. Each model $T_{k}$ is created from 32 random frames of a video $I_{1}^{k}, \ldots, I_{32}^{k}$ . All models except X2Face are fine-tuned to those 32 frames for 600 optimization steps. Using these models, we compute two metrics per system, identity error $\mathcal{I}_T$ and pose reconstruction error $\mathcal{P}_T$ . + +The identity error $\mathcal{I}_T$ estimates how closely the resulting talking heads resemble the original person $k$ that the model was learned for. For that, we use the ArcFace [7] face recognition network $R$ that outputs identity descriptors (vectors). We compute the averaged reference descriptor $r_k = \frac{1}{32}\sum_{j=1}^{32} R(I_j^k)$ from the fine-tuning dataset $I_1^k, \ldots, I_{32}^k$ , and use the cosine similarity (csim) to compare it with the descriptors obtained from cross-person reenactment results. Cross-person reenactment is performed by driving $T_k$ with all other 29 people. To obtain the final error, we average (one minus) similarities over all 30 people in the test set. Formally, + +$$ +\mathcal{I}_{T} = \frac{1}{30\cdot 29\cdot 32}\sum_{k = 1}^{30}\sum_{\substack{i = 1\\ i\neq k}}^{30}\sum_{j = 1}^{32}\left[1 - \operatorname {csim}\left(R\left(T_{k}(I_{j}^{i})\right),r_{k}\right)\right]. +$$ + +The pose reconstruction error $\mathcal{P}_T$ , on the other hand, is designed to quantify how well the system replays driver's pose and facial expression, and is defined in terms of facial landmarks. Since sets of landmarks can only be compared directly for the same person, we restrict the test dataset to self-reenactment pairs, i.e. we only drive $T_{k}$ with $I^{k}$ . However, because $T_{k}$ has learned on $I_1^k,\ldots ,I_{32}^k$ , we use another 32 hold-out frames from the same video $I_{33}^{k},\ldots ,I_{64}^{k}$ to avoid overfitting. We employ an off-the-shelf 2D facial landmarks prediction algorithm [2] $L$ to obtain landmarks in both the driver $I_{j}^{k}$ and the reenactment result $T_{k}(I_{j}^{k})$ . In our case, a measure $d_{\mathrm{landmarks}}(l_1,l_2)$ of how close landmarks $l_{2}$ approximate reference landmarks $l_{1}$ is the average distance between corresponding landmarks normalized by inter-ocular distance. As before, we compute $d$ for all drivers and average across all 30 people: + +$$ +\mathcal {P} _ {T} = \frac {1}{3 0 \cdot 3 2} \sum_ {k = 1} ^ {3 0} \sum_ {j = 3 3} ^ {6 4} d _ {\mathrm {l a n d m a r k s}} \left(L \left(I _ {j} ^ {k}\right), L \left(T _ {k} (I _ {j} ^ {k})\right)\right). +$$ + +The plot in Figure 3 has these two metrics evaluated for the compared models. A perfect system $T$ would have $\mathcal{I}_T = \mathcal{P}_T = 0$ , i.e. the closer to the lower left corner, the better. In these terms, our full model is strictly better than all systems + +![](images/5f1683cd4778501602fd54489b14f6196c02e72c4c6f8309df6504ae40da7230.jpg) +Figure 4: Reenactment by interpolation between two pose vectors across spherical trajectory in the pose descriptor space. Our system successfully creates visually smooth and identity preserving reenactment. + +except $\mathrm{FSTH+}$ , which is slightly better in one of the metrics but much worse in the other, and which benefits from an external keypoint detector. + +Qualitative comparison. Figure 5 gives a qualitative comparison of the reenactment systems described above. It is evident that FSTH, being driven by rasterized landmarks, relies heavily on the driver's facial proportions, and thus is not person-agnostic. Its modified version $\mathrm{FSTH+}$ does a better job having more representational power around vectorized keypoints; still, there are visible "identity bleeding" (e.g. compare head width in columns 1 and 2) and errors in prominent facial expressions, such as closing eyes. The warping-based method X2Face fails on slight rotations already. + +Two similar methods, X2Face+ and FAb-Net+, both provide strong baselines despite some signs of identity mismatch, for example, traces of eyeglasses in column 7 and long hair seeping in from the pose driver in column 5. It is important to note that although pose descriptors from those methods are not person-agnostic, we still apply pose augmentations during training. In the ablation study below, we demonstrate that cross-person reenactment performance drops dramatically when we remove pose augmentations in these two methods. + +The 3DMM+ method has a very tight bottleneck of interpretable parameters, and therefore its identity gap is very small. However, apparently for the same reason, it is not as good at rendering correct subtle facial expressions. Our full system is able to accurately represent pose driver's facial expression while preserving identity of the target person. + +In addition, we also show reenactment by interpolation in the pose space for our system in Figure 4, which demonstrates smooth pose changes. + +Temporal smoothness. The supplementary video demonstrates the capability of our descriptor to create temporally-smooth reenactment without any temporal smoothing of the extracted pose (provided that the results of bounding box detection are temporally smooth). At the same time, we have found that achieving temporally smooth reenactment with keypoint-driven systems (FSTH, FSTH+) requires a lot of keypoint smoothing. + +# 5. Discussion + +We have presented and evaluated a neural head reenactment that uses latent pose descriptors and is able to achieve realistic reenactment. Unlike the predecessor system [42] that used the keypoints as pose descriptor, our system uses the pose descriptors without explicit supervision purely based on the reconstruction losses. The only weak form of supervision comes from the segmentation masks. Our learned head pose descriptors outperform previous unsupervised descriptors at the tasks of pose-based retrieval, as well as cross-person reenactment. + +Our main, perhaps surprising, finding is that limiting capacity of the pose extraction network in our scheme is sufficient for pose/identity disentanglement. At the same time, it might happen that appropriate use of cyclic and/or adversarial losses may improve disentanglement even better. Perhaps because of the constraint on the network capacity, our pose descriptors and reenactment system has problems + +![](images/f7da6b95a3fc583626c2db2d2f19fab073cb1c6153ff52aaf6ea1257bac8b8b5.jpg) +Figure 5: Comparison of cross-person reenactment for several systems on VoxCeleb2 test set. The top left image is one of the 32 identity source frames. The other images in the top row are pose drivers. Our method better preserves the identity of the target person and successfully transfers the mimics from the driver person. + +with capturing some subtle mimics, especially gaze direction (though it still does a better job than keypoint descriptors that lack gaze representation altogether). Another obvious avenue of research is learning pose descriptor and the + +entire system in a semi-supervised way. + +# References + +[1] V. Blanz, T. Vetter, et al. A morphable model for the synthesis of 3d faces. In Proc. SIGGRAPH, volume 99, pages 187-194, 1999. 2 +[2] A. Bulat and G. Tzimiropoulos. How far are we from solving the 2d & 3d face alignment problem? (and a dataset of 230, 000 3d facial landmarks). In Proc. ICCV, pages 1021-1030, 2017. 1, 6 +[3] F.-J. Chang, A. T. Tran, T. Hassner, I. Masi, R. Nevatia, and G. Medioni. Expnet: Landmark-free, deep, 3d facial expressions. In In proc. FG, pages 122-129. IEEE, 2018. 5 +[4] J. S. Chung, A. Nagrani, and A. Zisserman. Voxceleb2: Deep speaker recognition. In INTERSPEECH, 2018. 1, 2, 4 +[5] J. S. Chung, A. Senior, O. Vinyals, and A. Zisserman. Lip reading sentences in the wild. In Proc. CVPR, pages 3444-3453. IEEE, 2017. 1 +[6] T. F. Cootes, G. J. Edwards, and C. J. Taylor. Active appearance models. T-PAMI, (6):681-685, 2001. 2 +[7] J. Deng, J. Guo, X. Niannan, and S. Zafeiriou. Arcface: Additive angular margin loss for deep face recognition. In Proc. CVPR, 2019. 6 +[8] E. L. Denton and V. Birodkar. Unsupervised learning of disentangled representations from video. In Proc. NeurIPS, pages 4414-4423, 2017. 2, 4 +[9] P. Ekman. Facial action coding system. 1977. 2 +[10] C. Fu, Y. Hu, X. Wu, G. Wang, Q. Zhang, and R. He. High fidelity face manipulation with extreme pose and expression. arXiv preprint arXiv:1903.12003, 2019. 1, 2 +[11] K. Gong, Y. Gao, X. Liang, X. Shen, M. Wang, and L. Lin. Graphonomy: Universal human parsing via graph transfer learning. In CVPR, 2019. 4 +[12] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In Proc. NIPS, 2014. 2, 4 +[13] R. Gross, I. Matthews, J. Cohn, T. Kanade, and S. Baker. Multi-pie. In Proceedings of the IEEE International Conference on Automatic Face and Gesture Recognition. IEEE Computer Society, September 2008. 5 +[14] R. A. Güler, N. Neverova, and I. Kokkinos. DensePose: Dense human pose estimation in the wild. In Proc. CVPR, June 2018. 2 +[15] R. A. Güler, G. Trigeorgis, E. Antonakos, P. Snape, S. Zafeiriou, and I. Kokkinos. DenseReg: Fully convolutional dense shape regression in-the-wild. In CVPR, volume 2, page 5, 2017. 2 +[16] X. Huang and S. Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In Proc. ICCV, 2017. 3 +[17] X. Huang, M.-Y. Liu, S. Belongie, and J. Kautz. Multimodal unsupervised image-to-image translation. In Proc. ECCV, 2018. 2, 4 +[18] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proc. ICML, ICML'15, pages 448-456, 2015. 4 +[19] T. Jakab, A. Gupta, H. Bilen, and A. Vedaldi. Unsupervised learning of object landmarks through conditional image generation. In Proc. NeurIPS, pages 4016-4027, 2018. 2, 6 + +[20] T. Karras, S. Laine, and T. Aila. A style-based generator architecture for generative adversarial networks. In Proc. CVPR, June 2019. 3 +[21] V. Kazemi and J. Sullivan. One millisecond face alignment with an ensemble of regression trees. Proc. CVPR, pages 1867-1874, 2014. 1 +[22] H. Kim, P. Garrido, A. Tewari, W. Xu, J. Thies, M. Nießner, P. Pérez, C. Richardt, M. Zollhöfer, and C. Theobalt. Deep video portraits. In Proc. SIGGRAPH, 2018. 1, 2 +[23] H. Kim and A. Mnih. Disentangling by factorising. In Proc. ICML, pages 2654-2663, 2018. 2 +[24] M. Liu, X. Huang, A. Mallya, T. Karras, T. Aila, J. Lehtinen, and J. Kautz. Few-shot unsupervised image-to-image translation. In Proc. ICCV, 2019. 2 +[25] Z. Liu, P. Luo, X. Wang, and X. Tang. Deep learning face attributes in the wild. In Proc. ICCV, December 2015. 6 +[26] S. Lombardi, J. Saragih, T. Simon, and Y. Sheikh. Deep appearance models for face rendering. ACM Transactions on Graphics (TOG), 37(4):68, 2018. 2 +[27] F. Miletari, N. Navab, and S.-A. Ahmadi. V-net: Fully convolutional neural networks for volumetric medical image segmentation. pages 565-571, 10 2016. 3 +[28] T. Miyato, T. Kataoka, M. Koyama, and Y. Yoshida. Spectral normalization for generative adversarial networks. In International Conference on Learning Representations, 2018. 4 +[29] A. Nagrani, J. S. Chung, and A. Zisserman. Voxceleb: a large-scale speaker identification dataset. In INTER-SPEECH, 2017. 1, 5 +[30] A. Pumarola, A. Agudo, A. M. Martinez, A. Sanfeliu, and F. Moreno-Noguer. Ganimation: Anatomically-aware facial animation from a single image. In Proc. ECCV, pages 818-833, 2018. 1, 2 +[31] M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L.-C. Chen. Mobilenetv2: Inverted residuals and linear bottle-necks. In Proc. CVPR, June 2018. 4 +[32] A. Siarohin, S. Lathuilière, S. Tulyakov, E. Ricci, and N. Sebe. First order motion model for image animation. In Proc. NeurIPS, pages 7135-7145, 2019. 2 +[33] S. Suwajanakorn, S. M. Seitz, and I. Kemelmacher-Shlizerman. Synthesizing Obama: learning lip sync from audio. ACM Transactions on Graphics (TOG), 36(4):95, 2017. 1, 2 +[34] J. Thewlis, S. Albanie, H. Bilen, and A. Vedaldi. Unsupervised learning of landmarks by descriptor vector exchange. In Proc. ICCV, 2019. 2 +[35] S. Tripathy, J. Kannala, and E. Rahtu. Icface: Interpretable and controllable face reenactment using gans. CoRR, abs/1904.01909, 2019. 1, 2 +[36] T. Wang, M. Liu, A. Tao, G. Liu, J. Kautz, and B. Catanzaro. Few-shot video-to-video synthesis. CoRR, abs/1910.12713, 2019. 1, 2 +[37] T.-C. Wang, M.-Y. Liu, J.-Y. Zhu, G. Liu, A. Tao, J. Kautz, and B. Catanzaro. Video-to-video synthesis. Proc. NeurIPS, 2018. 1, 2 +[38] O. Wiles, A. Koepke, and A. Zisserman. Self-supervised learning of a facial attribute embedding from video. In Proc. BMVC, 2018. 1, 5 + +[39] O. Wiles, A. Sophia Koepke, and A. Zisserman. X2face: A network for controlling face generation using images, audio, and pose codes. In Proc. ECCV, September 2018. 1, 2, 5 +[40] F. Xiao, H. Liu, and Y. J. Lee. Identity from here, pose from there: Self-supervised disentanglement and generation of objects using unlabeled videos. In Proc. ICCV, October 2019. 2 +[41] S. Xie, R. Girshick, P. Dollar, Z. Tu, and K. He. Aggregated residual transformations for deep neural networks. In Proc. CVPR, July 2017. 4 +[42] E. Zakharov, A. Shysheya, E. Burkov, and V. Lempitsky. Few-shot adversarial learning of realistic neural talking head models. In Proc. ICCV, October 2019. 1, 2, 3, 4, 5, 7 +[43] S. Zhang, X. Zhu, Z. Lei, H. Shi, X. Wang, and S. Z. Li. S3fd: Single shot scale-invariant face detector. In Proc. ICCV, Oct 2017. 4 +[44] Y. Zhang, Y. Guo, Y. Jin, Y. Luo, Z. He, and H. Lee. Unsupervised discovery of object landmarks as structural representations. In Proc. CVPR, pages 2694-2703, 2018. 2 +[45] J.-Y. Zhu, T. Park, P. Isola, and A. A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proc. ICCV, 2017. 2, 4 \ No newline at end of file diff --git a/neuralheadreenactmentwithlatentposedescriptors/images.zip b/neuralheadreenactmentwithlatentposedescriptors/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..68e5176298c64d297e0d1867083b03d1243773d3 --- /dev/null +++ b/neuralheadreenactmentwithlatentposedescriptors/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7809820ae5c9e06dc18a1b0a8c26acda6807420408e6081b81a591a36b95679 +size 456461 diff --git a/neuralheadreenactmentwithlatentposedescriptors/layout.json b/neuralheadreenactmentwithlatentposedescriptors/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..84bcd07a2248f3cf3e0faadbc3201f97930652bf --- /dev/null +++ b/neuralheadreenactmentwithlatentposedescriptors/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:217f848888ca2652d37a1f7190e67a624d521b04137c66262f656300be9e4b7e +size 329294 diff --git a/neuralimplicitembeddingforpointcloudanalysis/73f9a9df-4813-4ac9-8eac-5747b4cc107b_content_list.json b/neuralimplicitembeddingforpointcloudanalysis/73f9a9df-4813-4ac9-8eac-5747b4cc107b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..aa5b137d87c1cb1463e958768e04e58f9d0d3f1d --- /dev/null +++ b/neuralimplicitembeddingforpointcloudanalysis/73f9a9df-4813-4ac9-8eac-5747b4cc107b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bc85bf889b110a2746f1f8db27f7b99e349fc21f0bcc9c6aa04a7dffd4b9fbb +size 80830 diff --git a/neuralimplicitembeddingforpointcloudanalysis/73f9a9df-4813-4ac9-8eac-5747b4cc107b_model.json b/neuralimplicitembeddingforpointcloudanalysis/73f9a9df-4813-4ac9-8eac-5747b4cc107b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..38073e544005e8c34740503245c085bb9c5df2a1 --- /dev/null +++ b/neuralimplicitembeddingforpointcloudanalysis/73f9a9df-4813-4ac9-8eac-5747b4cc107b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b26fdc6e6cbabc0f836d438c75ca53b58634bde76daf42ec04413341a5c59ba +size 100051 diff --git a/neuralimplicitembeddingforpointcloudanalysis/73f9a9df-4813-4ac9-8eac-5747b4cc107b_origin.pdf b/neuralimplicitembeddingforpointcloudanalysis/73f9a9df-4813-4ac9-8eac-5747b4cc107b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..41eed39c822782e35e640d344efca78183a13315 --- /dev/null +++ b/neuralimplicitembeddingforpointcloudanalysis/73f9a9df-4813-4ac9-8eac-5747b4cc107b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3f0ccf00c60de05e3a1091b3d7b8c17e3c165c34375f48f61cb530377f16bec +size 3257866 diff --git a/neuralimplicitembeddingforpointcloudanalysis/full.md b/neuralimplicitembeddingforpointcloudanalysis/full.md new file mode 100644 index 0000000000000000000000000000000000000000..81e3378584ff87d5b45f719521fe841fd6e36a11 --- /dev/null +++ b/neuralimplicitembeddingforpointcloudanalysis/full.md @@ -0,0 +1,341 @@ +# Neural Implicit Embedding for Point Cloud Analysis + +Kent Fujiwara and Taiichi Hashimoto LINE Corporation + +{kent.fujiwara, taichi Hashimoto}@linecorp.com + +# Abstract + +We present a novel representation for point clouds that encapsulates the local characteristics of the underlying structure. The key idea is to embed an implicit representation of the point cloud, namely the distance field, into neural networks. One neural network is used to embed a portion of the distance field around a point. The resulting network weights are concatenated to be used as a representation of the corresponding point cloud instance. To enable comparison among the weights, Extreme Learning Machine (ELM) is employed as the embedding network. Invariance to scale and coordinate change can be achieved by introducing a scale commutative activation layer to the ELM, and aligning the distance field into a canonical pose. Experimental results using our representation demonstrate that our proposal is capable of similar or better classification and segmentation performance compared to the state-of-the-art point-based methods, while requiring less time for training. + +# 1. Introduction + +Analysis of unstructured point cloud data is one of the central topics in computer vision, as 3-dimensional data of various objects can now be easily captured through commercial sensors. Point clouds play an important role in key areas, such as autonomous driving and robotics, where spatial information of the surrounding environment is critical [4, 31]. Point cloud data can also be interpreted as sets, whose analysis is known to have various applications [48]. + +Unlike 2-dimensional images, 3-dimensional point clouds are generally unordered, unstructured, and represented in an arbitrary coordinate system. Therefore, there is no straightforward method to apply convolutional neural networks to point clouds, despite their recent success in the analysis of 2D data. Many of the current methods attempt to create a regular representation by converting point clouds into voxel data or even rendered images. However, in these cases, information of the original points is lost, making such tasks as point-wise label assignment significantly + +![](images/b1308822590b4c138ae3db74560ab5d53334e5adb5cb5a5d599acbe3cc7b2cd1.jpg) +Figure 1: Proposed representation. A specific type of a neural network, Extreme Learning Machine, is responsible for embedding a local portion of the implicit representation around a point in the point cloud. The trainable weights $\beta$ from the ELMs, concatenated into a single matrix, are the representation of the corresponding point cloud instance (in this case: Stanford Bunny). The representation can be utilized for tasks such as classification and segmentation. + +more difficult. This fact necessitates a different approach to producing a representation of 3D point clouds. + +An ideal representation of point clouds should also be robust to arbitrary changes of the origin location, orientation, and scale of the 3D coordinate system used to describe point cloud data. Conventional methods for 3D point cloud data analysis generally attempt to obtain such representation through data augmentation by applying various transformations and adding perturbations to the training data. + +We propose a novel representation of points clouds that encapsulates the local information around points clouds, and addresses such issues as robustness to coordinate system change, scaling, and permutation. As shown in Fig. 1, the key idea is to embed an implicit function of one point cloud instance into multiple neural networks, whose weights are used as the feature of the point cloud instance. + +We firstly convert each point cloud into an implicit function, the distance field. We acquire the distance field of each instance using a sphere of fixed sampling points, which we call a sampling sphere. We place one sphere on top of each + +point in the point cloud to acquire the distance field. + +We then embed the distance field within each sampling sphere in a neural network to make the implicit representation invariant to sampling point permutation. One network is responsible for representing the distance field within one sampling sphere. The weights from all the networks are concatenated into a matrix to be used as the representation of the corresponding point cloud instance. We enable comparison among the network weights from each instance by employing a specific type of neural network for embedding distance fields: Extreme Learning Machine (ELM). + +The representation, consisting of weights obtained from local embedding networks, can be made invariant to coordinate change and scaling by altering the network components and aligning the distance fields. Scale invariance is achieved by using ReLU activation layer in each ELM, and coordinate invariance by using the canonical coordinates of the sampling points, obtained through aligning the distance field to the canonical space determined by the distribution of the distance values unique to each instance. + +The major contribution of the representation is that it provides a simple method to capture local details. The experiments demonstrate that our method can provide state-of-the-art accuracy, in classification and segmentation, and is robust against perturbations such as rotation and scaling. Our representation required only simple neural networks to conduct these tasks, leading to reduction in training time. + +# 2. Related Work + +With the advances in deep learning techniques and more datasets [35, 2] starting to become available to the public, analysis of point clouds has developed into an important tasks in the field of computer vision. There are various topics in which 3D information is utilized, including shape retrieval [39], correspondence [41] and registration [37]. + +Methods on point cloud data analysis mainly focus on finding a representation that can be used to train neural networks to extract characteristic information regarding point clouds. Current approaches can be categorized into 2 classes: Grid-based methods [47, 23, 42, 13, 8] and Point-based methods [27, 15, 18, 20, 49]. Aside from the two classes, there are also attempts to combine different representations [28], and approaches [45, 1] that embed shapes into a latent space using generative networks [10, 14]. + +Grid-based methods attempt to convert point clouds into regular structures to allow convolution of local information. Voxel-based methods [47, 23] convert point clouds into voxel data. As the voxels are ordered and structured, convolution can be conducted simply by applying 3D filters. However, accuracy of these methods depend heavily on the resolution of voxels. Despite the recent efforts to make volumetric approach more efficient [30, 7, 16], these methods are known to be computationally demanding with larger + +number of voxels. Image-based methods [36, 42, 13] convert points clouds into 2D renderings and use 2D convolutional neural networks to conduct various analyses. Image-based methods are known to be highly successful at shape classification task, as they utilize external pre-trained models, usually trained using various 2D image datasets. However, these methods cannot be applied to tasks such as segmentation, where labels need to be assigned to individual points. The grid-based representations are also covariant to coordinate change, and require data from multiple viewpoints. Some methods convert geometric data to 2D planar data [34, 32]. These methods require the direction of gravity, which is not necessarily available. Our representation does not require such supervision, as we achieve rotational invariance by projection to the canonical pose. + +Point-based methods attempt to directly use the coordinates of the points. PointNet [27] proposed to feed point cloud data directly into a neural network. The method avoids the issue of point permutation by applying a symmetric function in higher dimensional space to obtain a global feature. This proposal has led to a new trend of methods directly operating on points [29, 20]. As PointNet produces a global signature for the entire point cloud, recent methods propose strategies to acquire local information from point clouds. Various methods introduce structures, such as $k$ -d trees and graphs, to capture the local relationship among unstructured points [15, 43, 33, 44, 17]. Other methods propose novel strategies for convolution to gather information from the neighboring points [46, 49, 22, 19, 40]. There are also attempts to introduce various local signatures, such as distance to neighboring points and angle between local surface normals, and use them to represent point clouds [5, 6, 50, 21]. Our method shares the same philosophy of incorporating local information surrounding point clouds. We capture the distance field around each point, and encapsulate it in a fixed-size vector using a neural network. + +Recently, there have been proposals to design unsupervised representations of the point clouds before conducting analyses [9]. Li et al. [18] proposed to first conduct unsupervised learning on each point cloud instance by creating a self-organizing map and identifying a set of nodes unique to each individual. The node information as well as the neighborhood information is used to train a deep neural network. Our method also conducts preprocessing to learn a representation for each instance in an unsupervised manner. We design our embedding strategy to capture the implicit representation around the objects points. The proposed method is also designed to achieve invariance to important elements such as scaling, point permutation, and coordinate change. + +Recent methods use neural networks to embed implicit representation of shapes for modeling purposes [24, 3]. Park et al. [26] use distance field obtained from a set of sampling points to train an auto-decoder, which returns a latent + +![](images/322cf15247c36a06ff8890c744d56788b214509dd6829cd27928a0cbf07e0ca8.jpg) +Figure 2: Implicit representation: Distance field $\Phi$ . Darker colors indicate larger distance. Sampling sphere (black circle in 2D) is placed over each surface point (blue). + +vector corresponding to the provided distance field. The latent vector, along with the sampling coordinates is used to train a deep neural network to learn the distance field of various shapes. Instead of using an auto-decoder to obtain a signature for a given distance field, we propose to use the weights of the neural network as the representation. Our method achieves invariance to sampling point permutation, as well as invariance to scaling of coordinate values. + +# 3. Proposed Method + +We propose a novel method that overcomes the difficulty of creating a representation for unstructured point clouds. Our method consists of two steps: Conversion of point cloud data into an implicit representation, the distance field, and network embedding of the implicit representation. + +# 3.1. Implicit Representation: Distance Field + +There are two reasons behind choosing the distance field as the representation. The first is that it achieves invariance to point permutation. The same set of points results in the same distance field, regardless of the point order. The second reason, which is the key to our method, is that distance is scale-covariant. When the coordinate values are scaled, the distance is also scaled by the same factor. This is critical for achieving scale invariance for embedding distances into a neural network with scale commutative property. + +Given a point cloud $\mathcal{P}$ consisting of $n$ surface points $\mathbf{p} \in \mathbb{R}^3$ , the distance function $\phi$ at a sampling point in the surrounding space $\mathbf{x} \in \mathcal{X}$ is defined as + +$$ +\phi (\mathbf {x}) = \min _ {\mathbf {p} \in \mathcal {P}} \| \mathbf {x} - \mathbf {p} \|. \tag {1} +$$ + +In practice, we prepare what we call a sampling sphere on top of each surface point in the point cloud $\mathcal{P}$ as shown in Fig. 2. The sampling sphere consists of $m$ sampling points $\mathbf{x}$ distributed within the sphere. In this method, the location + +![](images/e7063951c4229ffa3f01dac70a6f703c86b05e859efe1954318bb384221c574f.jpg) +Figure 3: Embedding Neural Network: Extreme Learning Machine. The distance field $\Phi$ for the $i$ -th point is embedded in the ELM. + +of the $m$ sampling points $\mathbf{x}$ are identical among sampling spheres of all the point cloud instances. The coordinates of the sampling points in each sphere are normalized, with the corresponding surface point $\mathbf{p}$ as the center of each sphere. Therefore, the distance within the normalized sphere $i$ is + +$$ +\phi_ {\mathcal {P} _ {i}} (\mathbf {x}) = \min _ {\tilde {\mathbf {p}}} \| \mathbf {x} _ {i} - \tilde {\mathbf {p}} \|. \tag {2} +$$ + +where $\tilde{\mathbf{p}} = \mathbf{p} - \mathbf{p}_i$ is the normalized coordinates of the surface points centered at the $i$ -th point $\mathbf{p}_i$ . + +The distance field, as is, is covariant to coordinate change. When sampling spheres and the target shape is rotated, the coordinates of the sampling points change and but the distance field inside the sphere remains the same. + +We define the radius of each sampling sphere to be relative to the radius of the sphere encapsulating the entire point cloud. If the underlying shape is either partial or open, we define the radius of the sampling spheres to be the average distance from each point to its $k$ -th nearest point, assuming that the density of points are even among all point clouds. + +# 3.2. Parameterization of Implicit Representation + +The distance field from each sampling sphere is then embedded into a neural network so that its weights capture the characteristics of the distances within each sampling sphere. For each surface point $\mathbf{p}$ , we train one neural network to capture the characteristics of the distance field around it. + +A regular neural network has numerous possibilities of weight combinations, as both the input-to-hidden-layer weights $\mathbf{W}$ and the corresponding hidden-to-output-layer weights $\beta$ are simultaneously optimized during training. To enable comparison between the neural network weights, they have to be embedded in the same metric space. We, therefore, employ a specific type of a neural network, namely an Extreme Learning Machine (ELM) [12]. + +In this method, we employ a simple 3-layer ELM. An ELM is a feed forward neural network whose input-to + +![](images/0a578a98d1e86136189d36d5025cb4cce930f271effbb16e238928a05efd16a5.jpg) +Figure 4: Efficient embedding strategy. As the points in the sampling sphere are normalized with respect to the center, the pseudoinverse $\mathbf{H}^{\dagger} = f(\mathbf{W}\mathbf{X})^{\dagger}$ has to be calculated only once. This matrix is multiplied by the distance values obtained from the sampling sphere around each point, providing us with a unique weight $\beta$ for each sampling sphere without repetitive calculation of the pseudoinverse. +Figure 5: Coordinate invariant representation. The original points, which can be considered as the 0-level set of the distance field, are shown. Despite randomly rotating the original model, our method aligns the distance fields. + +hidden-layer weights are fixed $\mathbf{W}$ , as shown in Fig. 3. The input to the ELM is the sampling points $\mathbf{X} \in \mathbb{R}^{m \times 3}$ in each sampling sphere centered around a surface point. We train the ELM to return $\Phi_{\mathcal{P}_i}(\mathbf{X})$ , the distance from the sampling points to the closest point in the point cloud $\mathcal{P}$ . The objective function of ELM is + +$$ +\beta_ {i} ^ {*} = _ {\beta_ {i}} \left\| \Phi_ {\mathcal {P} _ {i}} (\mathbf {X}) - \beta_ {i} ^ {\top} f \left(\mathbf {W X} ^ {\top} + \mathbf {b}\right) \right\| _ {F} ^ {2}, \tag {3} +$$ + +where $\beta_{i}\in \mathbb{R}^{k}$ is the network weights, $f$ is a non-linear activation function, $\mathbf{W}\in \mathbb{R}^{k\times 3}$ is the random weight, and $\mathbf{b}\in \mathbb{R}^k$ is the random bias. To obtain the weights $\beta$ so that the network output matches the target $\Phi_{\mathcal{P}_i}(\mathbf{X})$ , we simply need to solve for the pseudoinverse of $\mathbf{H} = f(\mathbf{W}\mathbf{X} + \mathbf{b})$ to obtain $\beta^{*} = \mathbf{H}^{\dagger}\Phi_{\mathcal{P}}(\mathbf{X})$ , or more robustly, obtain + +$$ +\boldsymbol {\beta} _ {i} ^ {*} = \left(c \mathbf {I} + \mathbf {H} ^ {\top} \mathbf {H}\right) ^ {- 1} \mathbf {H} ^ {\top} \boldsymbol {\Phi} _ {\mathcal {P} _ {i}} (\mathbf {X}), \tag {4} +$$ + +where, $c$ is a constraint added to the diagonal elements of $\mathbf{H}^{\top}\mathbf{H}$ . To reflect the scale, we set $c$ as the variance of the sampling points $\mathbf{X}$ . By definition, we are able to obtain a unique solution $\beta^{*}$ regardless of the permutation of $\mathbf{X}$ . + +We fix $\mathbf{W}$ of all ELMs to a common orthogonalized random matrix, as proposed in a prior work [12]. The weights $\beta$ are determined by the distance field values. We will exploit this characteristic of ELMs to provide a unique set of weights $\beta$ for each sampling sphere. + +# 3.2.1 Fixing W + +We have two purposes behind fixing the input-to-hidden-layer weights $\mathbf{W}$ . The first can be observed from the formulation of ELM. ELM obtains the output value by calculating + +![](images/03cf9772d530aaa63402ecb10b212403828beed3231bfcd651d53465c80614df.jpg) + +$\beta^{\top}f(\mathbf{W}\mathbf{X}^{\top} + \mathbf{b})$ , which is the inner product between a vector $f(\mathbf{W}\mathbf{X}^{\top} + \mathbf{b})$ and the trainable weight $\beta$ . Fixing $\mathbf{W}$ is equivalent to introducing the Euclidean metric to the metric space of $\beta$ Without defining the inner product, trainable weights $\beta$ obtained from ELMs cannot be easily compared. + +The second purpose is efficiency. We can make the training process significantly efficient by taking advantage of the structure of sampling spheres, using the fact that the sampling points in all the spheres are identical and normalized. Generally, calculation of trainable weights $\beta$ requires the pseudoinverse $\mathbf{H}^{\dagger} = (c\mathbf{I} + \mathbf{H}^{\top}\mathbf{H})^{-1}\mathbf{H}^{\top}$ to be calculated as many times as the number of the sampling spheres $n$ . However, as mentioned previously, we use the same set of normalized sampling points to capture the local distance field within each sphere. Therefore, we can define $\mathbf{H} = f(\mathbf{W}\mathbf{X} + \mathbf{b})$ to be the same for all sampling points. This means that the pseudoinverse $\mathbf{H}^{\dagger}$ only has to be calculated once throughout the dataset, as shown in Fig 4. To obtain the weights $\beta$ of all the sampling spheres simultaneously, we concatenate all the distance fields obtained by the sampling spheres into a single matrix, so that + +$$ +\boldsymbol {\beta} ^ {*} = \left(c \mathbf {I} + \mathbf {H} ^ {\top} \mathbf {H}\right) ^ {- 1} \mathbf {H} ^ {\top} \boldsymbol {\Phi} _ {\mathcal {P}} (\mathbf {X}), \tag {5} +$$ + +where $\Phi_{\mathcal{P}}(\mathbf{X}) \in \mathbb{R}^{m \times n}$ and $\beta^{*} \in \mathbb{R}^{k \times n}$ are matrices whose $i$ -th columns contain the distances and the resulting ELM weights from the $i$ -th sampling sphere, respectively. + +# 3.3. Achieving Coordinate and Scale Invariance + +We can design the ELM weights $\beta$ to be invariant to coordinate values and scale. The invariance is achieved by modifying the input to the embedding ELM, and by selecting a specific activation layer for the ELM. + +# 3.3.1 Coordinate Invariance: Canonical Projection + +We project the distance field onto a 4-dimensional canonical space to achieve invariance to rotation. We introduce a + +![](images/291fdc8e9e69a0a36046342343247ece1f508cfe7afa8c6d06f9aa2e1b1fd3b4.jpg) +Figure 6: Network architecture for the proposed representation. The ELM weights containing local distance field information are used as input to train a global feature vector. The feature is fed into subsequent networks to conduct analysis. In the segmentation task, we concatenate the global feature with the original ELM weights corresponding to each point. + +sampling matrix $\mathbf{X} = \left[\mathbf{x}_1,\mathbf{x}_2,\dots ,\mathbf{x}_m\right]^\top \in \mathbb{R}^{m\times 3}$ and the corresponding sampled distance vector $\Phi_{\mathcal{P}}(\mathbf{X}) =$ $\begin{array}{r}\left[\phi (\mathbf{x}_1),\quad \phi (\mathbf{x}_2),\quad \dots ,\phi (\mathbf{x}_m)\right]^{\top}\in \mathbb{R}^{m} \end{array}$ and concatenate them into a matrix $\mathbf{M} = \left[\mathbf{X}\quad \Phi_{\mathcal{P}}(\mathbf{X})\right]$ . We then apply singular value decomposition (SVD) on $\mathbf{M}$ to obtain + +$$ +\mathbf {M} = \mathbf {U S V} ^ {\top}. \tag {6} +$$ + +As the results from SVD may contain sign ambiguity, we propose to transform the data using all the possible sign permutations. Given an input data, we prepare a vector $\mathbf{c}$ consisting of 1 and $-1$ . We apply the signs to $\mathbf{V}^{\top}$ so that + +$$ +\bar {\mathbf {V}} ^ {\top} = \mathbf {V} ^ {\top} \mathbf {C}, \tag {7} +$$ + +where $\mathbf{C}$ is a diagonal matrix with $\mathbf{c}$ as its elements. + +As can be seen by modifying eq. 6 to $\bar{\mathbf{M}} = \mathbf{M}\bar{\mathbf{V}}$ , $\bar{\mathbf{V}}$ is the projection of the data matrix to a 4-dimensional canonical space. The projection allows the distance field to be aligned to a unique pose in the 4D space based on the variance of the distance field, as can be seen in Fig. 5 demonstrates the effect of applying $\bar{\mathbf{V}}$ . We will demonstrate the robustness to surface point density in the experiments. + +The representation in the canonical space is now invariant to rotation up to ambiguity of sign of $\mathbf{V}$ . We resolve this ambiguity by preparing all the variations from possible sign permutations. The input to the ELM is $\bar{\mathbf{X}} = \mathbf{X}\bar{\mathbf{V}}_{\mathbf{X}}$ , the coordinates of the sampling points in the 4D canonical space. $\bar{\mathbf{V}}_{\mathbf{X}}\in \mathbb{R}^{3\times 4}$ is the first three rows of $\bar{\mathbf{V}}$ . The ELM is trained to return the distance vector $\Phi_{\mathcal{P}}(\mathbf{X})$ corresponding to the sampling points. The elements of the distance vector is removed from the input to avoid trivial solutions. + +To efficiently solve for $\bar{\mathbf{V}}_{\mathbf{X}}$ , we place a global sphere surrounding the entire point cloud instance. The distance values within the sphere is used to align each instance to a unique pose. The global sphere is solely used to align the global distance field. After alignment, sampling spheres are placed on surface points to acquire the local distance fields. + +# 3.3.2 Scale Invariance:ReLU Activation Function + +We achieve scale invariance by taking advantage of the scale commutative property of the rectified linear unit (ReLU) [25]. We adopt it as the activation function $f$ of the ELM and remove the bias term from eq. (3). The modified embedding ELM is now denoted as + +$$ +\boldsymbol {\beta} ^ {*} = _ {\boldsymbol {\beta}} \left\| \Phi_ {\mathcal {P}} (\mathbf {X}) - \boldsymbol {\beta} ^ {\top} f \left(\mathbf {W} \bar {\mathbf {X}} _ {b}\right) \right\| _ {F} ^ {2}, \tag {8} +$$ + +where $\bar{\mathbf{X}}_b\in \mathbb{R}^{m\times (4 + 1)}$ is $\bar{\mathbf{X}}$ with an additional column. The extra column is the bias scaled by the standard deviation of all the values in $\bar{\mathbf{X}}$ . In this process, we have removed the bias term and inserted it into the input matrix. + +To prove the scale invariance, we consider the case of applying a scaling factor $s$ to the input $\bar{\mathbf{X}}_b$ . The output $\Phi_{\mathcal{P}}(\mathbf{X})$ is also scaled due to the property of distance. Therefore, eq. (8) is modified to + +$$ +s \Phi_ {\mathcal {P}} (\mathbf {X}) \approx \boldsymbol {\beta} ^ {* ^ {\top}} f \left(\mathbf {W} s \bar {\mathbf {X}} _ {b}\right). \tag {9} +$$ + +As ReLU lets through positive values, the scaling factor $s$ can be moved outside the activation function: + +$$ +s \Phi_ {\mathcal {P}} (\mathbf {X}) \approx s \boldsymbol {\beta} ^ {* ^ {\top}} f \left(\mathbf {W} \bar {\mathbf {X}} _ {b}\right). \tag {10} +$$ + +The scaling factor $s$ cancels each other out, leaving the network weights $\beta$ unchanged. This allows our modified version of ELM to be invariant to scaling of the point clouds. Variants of ReLU, such as LeakyReLU, also preserves this quality, and can be used as the activation function. + +# 4. Experiments + +Our method is implemented with Keras, and all the calculations were executed on an Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz computer with NVIDIA V100 graphics card. We utilized the graphics card to accelerate multiplication of the matrices involved in distance calculation. We + +used a network configuration similar to PointNet [27], as shown in Fig 6. Feature learning network contains 4 shared fully connected layers (1024 nodes). Batch normalization and ReLU are applied after each layer. Batch size is 16. + +# 4.1. Classification Accuracy + +We firstly use the proposed representation to classify the benchmark dataset ModelNet 10/40 [47]. To make the comparison with other methods fair, we first normalize the CAD models in the dataset by setting them to zero-mean, encapsulating the models in a unit sphere, and then uniformly sample over the model surface, as conducted in prior work [27]. 2048 surface points are sampled. The direction of gravity is known in this dataset. For comparison to other methods, we also use the original point cloud data before the proposed projection for calculation of distance fields. + +We prepared 2048 sampling spheres, equivalent to the number of the surface points, and trained one ELM per each sphere to parameterize each instance in the dataset, and converted all the data in the training and testing set to ELM weights. These are used as features representing each individual shape. The fixed random weights are orthogonalized, as conducted in [38], to improve the result of regression. MLP with 3 hidden layers (512, 256, 128 nodes) with dropout (0.4 keep rate) is used as the classification network. + +Table 1 shows the classification accuracy on both ModelNet 10 and ModelNet 40 dataset. We compared our results to some of the state-of-the-art methods. The top half of the table shows the results from methods that rely on the renderings of meshed data of the point clouds. These methods generally conduct pretraining using external datasets. The results of these methods, therefore, cannot be directly compared with point-based methods. The bottom half of the table shows the point-based methods. Our representation achieves the best results on ModelNet 10 and achieves second best on ModelNet 40. The best results were achieved using $m = 1024$ sampling points, embedding ELMs with dimension of $k = 256$ , and sampling spheres with radius of 0.3. Similar to other methods, concatenating the normals and point coordinate information improved the classification result using our representation. However, the scale invariance is lost, as point coordinates vary with scaling, while our representation does not. Using the average distance to $k$ -nearest neighbor ( $k = 256$ ) as the sampling sphere radius achieved similar results: $96.2\%$ and $93.2\%$ for ModelNet 10 and 40 respectively. + +Interestingly, adding noise to our representation, a common data augmentation practice, resulted in a lower accuracy. This is because the embedding using ELM already contains some margin of error, which is essentially equiv- + +Classification Accuracy $(\%)$ + +
MethodPretrainDataMN 10MN 40
MV [36]-90.1
Dom. [42]YesImg-93.8
VIP [11]94.192.0
RotNet [13]98.597.4
Voxel [47]83.577.0
Auth. [34]88.483.9
Kdtree [15]94.091.8
PNet++ [29]-91.9
SONET [18]NonePt+N95.793.4
Pt2Sq [20]95.392.6
PCConv [46]-92.5
KPConv [40]-92.9
RSCNN [21]1-92.9
ShellNet [49]-93.1
OursNoneWeights95.792.2
OursNoneW+Pt+N96.793.2
+ +Table 1: Comparison of results on ModelNet 10 and 40. Our method performs better than most of the state of the art methods with just one representation per instance. + +lent to adding noise directly to the original point cloud data. + +# 4.2. Effects of Elements Pertaining to Embedding + +To observe the effect of each element to the descriptiveness of the resulting representation, we alter the dimension $k$ of ELM weight $\mathbf{W}$ , the radius of the sampling spheres, and the number $m$ of sampling points within each sphere. In each experiment, we fixed two of the elements and changed the third one to see the change in classification accuracy. + +Fig. 7 are the results from the experiment observing the effect of each element for ModelNet 10 and ModelNet 40 datasets. The averages and standard deviations of 10 evaluations from each combination are used in the plot. As can be seen from the results, the classification accuracy is low when all the elements are set too low, which was expected. However, as the elements are set to higher values, the accuracy reaches a peak before showing slight regression in accuracy. More information is involved in the embedding, and ELMs with small number of nodes cannot fully encapsulate the details that the surrounding distance fields present. + +We also note that, theoretically, setting all the elements to a much larger value would result in a finer representation around each surface point, leading to improvement in classification accuracy. However, the size of the data would grow exponentially, requiring heavy memory usage. In this experiment, we set the upper threshold to each of the elements to keep the proposed representation compact. + +While most point classification methods rely on deep + +![](images/2b02032b33b855bf976b24c03dc7474515d7788034f45b0466d1d5c74416c2cb.jpg) +(a) Dimension of $k$ + +![](images/22ad3da2f1ab761f25232f015e5e5abfbcb4b07df61b22ed8c366a9206baa191.jpg) +(b) Radius of sampling sphere +Figure 7: Classification accuracy (\%) change under different settings. (7a) Effect of dimension $k$ of ELM weight. (7b) Effect of sampling sphere radius. (7c) Effect of samplings points in each sphere. + +![](images/5107488d868703eb4a8d34be3c0dc64b9eb19e5178697d2474a8e7f3ab836797.jpg) +(c) Number of sampling points $m$ + +Classification Accuracy $(\%)$ points $(n)$ + +
20481024512256
ModelNet 1096.795.994.393.5
ModelNet 4093.292.791.190.1
+ +Table 2: Classification accuracy after changing number of original point cloud points $n$ . +Classification Accuracy $(\%)$ Maximum Angle + +
0π/4π/23/4πππ/4 sc.
P++ [29]91.936.440.541.144.344.2
SNet [18]93.484.577.479.069.477.1
Ours93.285.884.982.681.883.9
+ +Table 3: Comparison of classification results on ModelNet 40 after perturbation on test data. + +neural network structures, our classification network is relatively simple, requiring shorter time for training. For classification of ModelNet 40 dataset with 512 sample points in each sampling sphere, and with the dimension of the ELM weights set to $k = 256$ , the proposed method requires approximately 110 minutes for training the neural network, compared to approximately 180 minutes for SO-Net, the most efficient method introduced in this paper. + +# 4.3. Robustness to Number of Surface Points + +To observe the robustness of the proposed implicit representation to number of points in the point clouds, we sampled a subset of points from the point clouds before calculating the distance field and used it to train ELMs in the proposed method. We prepared a sampling sphere over each point in the point set, each containing 1024 sampling points within the radius of 0.3, and embedded it in a ELM with + +$k = 256$ . We used the same classification network to obtain the results. As can be seen from the results in Table 2, the method can classify instances relatively accurately. This can be attributed to the fact that the implicit representation, distance field, is robust to the density of the original point cloud. The results demonstrate that our representation takes full advantage of the robustness. + +# 4.4. Effect of Canonical Embedding + +To demonstrate the invariance to various factors such as coordinate change and scale, we test the accuracy of the proposed method when test data is transformed and scaled. This is common in real life situations, as not all objects are upright on the tabletop. We apply random rotation along all three axes and scaling to the test data and observe the effects on the classification accuracy. To make the comparison fair, we did not conduct data augmentation on the training data for any of the methods. Here, we compared our method to representative point-based methods, PointNet++ [29] and SO-Net [18], based on the codes made publicly available. We selected these methods, due to the fact that the calculation efficiency of our method and these methods are relatively high compared to other point-based methods. + +To compare the variance of each representation, we firstly applied random rotation to the test data to observe whether the learnt model can be used to classify rotated data. Table 3 shows the classification accuracy of the three methods after applying random rotation to test data with limits to the maximum angles. The numbers indicate the median values from 10 attempts. When random rotation is applied to all three axes of rotation, Prior methods start to underperform with more rotation. Our method, in contrast, outperforms others even after large amount of rotation is applied. This demonstrates that our representation is aligned in the canonical space, and is only slightly perturbed by sampling noise caused by the rotation. Augmenting training data by applying random rotation only slightly improves the results of prior methods, as there are endless possible + +Intersection over Union (IoU) + +
meanairbagcapcarchairear.guit.kni.lam.lap.mot.mugpist.rock.ska.tab.
P [27]83.783.478.782.574.989.673.091.585.980.895.365.293.081.257.972.880.6
P++ [29]85.182.479.087.777.390.871.891.085.983.795.371.694.181.358.776.482.6
Kd [15]82.380.174.674.370.388.673.590.287.281.094.957.486.778.151.869.980.3
SO [18]84.982.877.888.077.390.673.590.783.982.894.869.194.280.953.172.983.0
Ours85.284.080.488.080.290.777.591.286.482.695.570.093.984.155.675.682.1
+ +Table 4: ShapeNetPart segmentation results from methods using PointNet based architecture. + +![](images/3c93e88c350292ecab1d6deaf93fb37f5fa50e91c8b8b52bfa9ef2df07c2ce0c.jpg) +Figure 8: Visualization of segmentation results using our representation. Top: Ground truth. Bottom: Our results. + +poses that shapes can take. This fact suggests much more data augmentation would be required for other point-based methods to handle all the possible rotational perturbations. The last column compares the classification accuracy after rotational and scale perturbation. Rotation with maximal angle of $\pi /4$ and scaling of 0.5 is applied to all the point cloud coordinates. The results from other methods further degrade, while our method maintains an accuracy of $83.9\%$ . + +# 4.5. Point Cloud Segmentation + +We also verify the descriptiveness of the proposed representation through segmentation of point cloud data based on per-point labels. We use the ShapeNetCore Part dataset for the experiment. The dataset consists of 12145 training data and 2873 test data, consisting of 16 classes and 50 labeled parts. For fair comparison, we follow the protocol indicated in prior works, such as PointNet++ [29] and SO-Net [18]. + +We place the sampling sphere on top of each point in the same manner as in classification process. The parameter from the ELM is used as the local representation of the corresponding point. As shown in Fig. 6, we concatenate the local ELM weights and the intermediate global feature obtained from pooling the output of the first section of the segmentation network. We also use the normals and the original point coordinates along with the concatenated representation and to classify each point. The setting for factors, such as the number of sampling points, ELM di + +mension, and sampling sphere radius, are inherited from the classification experiment: 1024, 256, and 0.3, respectively. + +The segmentation results are visualized in Fig. 8. We compare the results from our representation with state-of-the-art approaches that employ PointNet based network architecture in Table 4. We followed the prior works and used the point intersection over union (IoU) to compare the results. The segmentation result using our representation achieves the best mean IoU and outperforms the state-of-the-art methods in most of the classes. Compared to the results from the SO-Net, our method performs better in 12 of the total 16 categories. As our proposal can be used as a feature along with point coordinates, the representation can be directly inserted into more complex networks [19, 22]. + +# 5. Conclusion + +The proposal is inspired by the observation that if neural networks are capable of learning extremely complex functions that separate various classes accurately, they should also be able to learn a function that represents one shape. The results demonstrate that our proposal is more descriptive, yet more efficient to process than the prior methods. No end-to-end training is conducted, and only unsupervised learning to encapsulate local distance fields is required. Our method is useful for achieving various invariances that made representation of unstructured point complex. + +Our method derives from the belief that shapes should be preprocessed into a unified parametric space rather than trying to manually prepare all possible variations of the shapes through data augmentation. As was demonstrated in the experiment with coordinate and scaling perturbations, many of the current methods fail when the axis of gravitational direction is unknown. Methods proposed to conduct point cloud analysis need to consider various circumstances where the orientation of the point cloud is unavailable. + +The results presented in this paper can theoretically be improved, as the random fixed weights used in the embedding ELMs are not trained to improve the accuracy of the following tasks, such as classification. As future work, we will pursue a method to tune the fixed ELM weights. Finding efficient methods to encapsulate more detailed information is also another direction of research. + +# References + +[1] Amir Arsalan Soltani, Haibin Huang, Jiajun Wu, Tejas D Kulkarni, and Joshua B Tenenbaum. Synthesizing 3d shapes via modeling multi-view depth maps and silhouettes with deep generative networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1511-1519, 2017. +[2] Angel X Chang, Thomas Funkhouser, Leonidas Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, et al. Shapenet: An information-rich 3d model repository. arXiv preprint arXiv:1512.03012, 2015. +[3] Zhiqin Chen and Hao Zhang. Learning implicit fields for generative shape modeling. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5939-5948, 2019. +[4] David M Cole and Paul M Newman. Using laser range data for 3d slam in outdoor environments. In Robotics and Automation, 2006. ICRA 2006. Proceedings 2006 IEEE International Conference on, pages 1556-1563. IEEE, 2006. +[5] Haowen Deng, Tolga Birdal, and Slobodan Ilic. Ppf-foldnet: Unsupervised learning of rotation invariant 3d local descriptors. In Proceedings of the European Conference on Computer Vision (ECCV), pages 602-618, 2018. +[6] Haowen Deng, Tolga Birdal, and Slobodan Ilic. Ppfnet: Global context aware local features for robust 3d point matching. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 195-205, 2018. +[7] Martin Engelcke, Dushyant Rao, Dominic Zeng Wang, Chi Hay Tong, and Ingmar Posner. Vote3deep: Fast object detection in 3d point clouds using efficient convolutional neural networks. In 2017 IEEE International Conference on Robotics and Automation (ICRA), pages 1355-1361, 2017. +[8] Yifan Feng, Haoxuan You, Zizhao Zhang, Rongrong Ji, and Yue Gao. Hypergraph neural networks. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 3558-3565, 2019. +[9] Kent Fujiwara, Ikuro Sato, Mitsuru Ambai, Yuichi Yoshida, and Yoshiaki Sakakura. Canonical and compact point cloud representation for shape classification. arXiv preprint arXiv:1809.04820, 2018. +[10] 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. +[11] Zhizhong Han, Mingyang Shang, Yuhang Liu, and Matthias Zwicker. View inter-prediction gan: Unsupervised representation learning for 3d shapes by learning global shape memories to support local view predictions. In AAAI conference on Artificial Intelligence, 2019. +[12] Guang-Bin Huang, Qin-Yu Zhu, and Chee-Kheong Siew. Extreme learning machine: theory and applications. Neurocomputing, 70(1):489-501, 2006. +[13] Asako Kanezaki, Yasuyuki Matsushita, and Yoshifumi Nishida. Rotationnet: Joint object categorization and pose estimation using multiviews from unsupervised viewpoints. + +In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5010-5019, 2018. +[14] Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. In Proceedings of the Second International Conference on Learning Representations (ICLR 2014), Apr. 2014. +[15] Roman Klokov and Victor Lempitsky. Escape from cells: Deep kd-networks for the recognition of 3d point cloud models. In Proceedings of the IEEE International Conference on Computer Vision, pages 863-872, 2017. +[16] Sudhakar Kumawat and Shanmuganathan Raman. Lp-3dcnn: Unveiling local phase in 3d convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4903–4912, 2019. +[17] Huan Lei, Naveed Akhtar, and Ajmal Mian. Octree guided cnn with spherical kernels for 3d point clouds. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9631-9640, 2019. +[18] Jiaxin Li, Ben M Chen, and Gim Hee Lee. So-net: Self-organizing network for point cloud analysis. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 9397–9406, 2018. +[19] 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. +[20] Xinhai Liu, Zhizhong Han, Yu-Shen Liu, and Matthias Zwicker. Point2sequence: Learning the shape representation of 3d point clouds with an attention-based sequence to sequence network. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 8778-8785, 2019. +[21] Yongcheng Liu, Bin Fan, Shiming Xiang, and Chunhong Pan. Relation-shape convolutional neural network for point cloud analysis. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 8895-8904, 2019. +[22] Jiageng Mao, Xiaogang Wang, and Hongsheng Li. Interpolated convolutional networks for 3d point cloud understanding. In Proceedings of the IEEE International Conference on Computer Vision, pages 1578-1587, 2019. +[23] Daniel Maturana and Sebastian 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. +[24] 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. +[25] 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. +[26] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 165-174, 2019. + +[27] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 652-660, 2017. +[28] Charles R Qi, Hao Su, Matthias Nießner, Angela Dai, Mengyuan Yan, and Leonidas J Guibas. Volumetric and multi-view cnns for object classification on 3d data. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5648-5656, 2016. +[29] Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In Advances in Neural Information Processing Systems, pages 5105-5114, 2017. +[30] Gernot Riegler, Ali Osman Ulusoy, and Andreas Geiger. Octnet: Learning deep 3d representations at high resolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3577-3586, 2017. +[31] Radu Bogdan Rusu, Zoltan Csaba Marton, Nico Blodow, Mihai Dolha, and Michael Beetz. Towards 3d point cloud based object maps for household environments. Robotics and Autonomous Systems, 56(11):927-941, 2008. +[32] Baoguang Shi, Song Bai, Zhichao Zhou, and Xiang Bai. Deeppano: Deep panoramic representation for 3-d shape recognition. IEEE Signal Processing Letters, 22(12):2339-2343, 2015. +[33] Martin Simonovsky and Nikos Komodakis. Dynamic edge-conditioned filters in convolutional neural networks on graphs. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3693-3702, 2017. +[34] Ayan Sinha, Jing Bai, and Karthik Ramani. Deep learning 3d shape surfaces using geometry images. In European Conference on Computer Vision, pages 223-240, 2016. +[35] Shuran Song, Samuel P Lichtenberg, and Jianxiong Xiao. Sun rgb-d: A rgb-d scene understanding benchmark suite. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 567-576, 2015. +[36] 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. +[37] Gary KL Tam, Zhi-Quan Cheng, Yu-Kun Lai, Frank C Langbein, Yonghuai Liu, David Marshall, Ralph R Martin, XianFang Sun, and Paul L Rosin. Registration of 3d point clouds and meshes: a survey from rigid to nonrigid. IEEE transactions on visualization and computer graphics, 19(7):1199-1217, 2013. +[38] Jiexiong Tang, Chenwei Deng, and Guang-Bin Huang. Extreme learning machine for multilayer perceptron. IEEE transactions on neural networks and learning systems, 27(4):809-821, 2016. +[39] Johan WH Tangelder and Remco C Veltkamp. A survey of content based 3d shape retrieval methods. In Shape Modeling Applications, 2004, pages 145-156, 2004. +[40] Hugues Thomas, Charles R Qi, Jean-Emmanuel Deschaud, Beatz Marcotegui, François Goulette, and Leonidas J + +Guibas. Kpconv: Flexible and deformable convolution for point clouds. In Proceedings of the IEEE International Conference on Computer Vision, pages 6411-6420, 2019. +[41] 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. Wiley Online Library, 2011. +[42] Chu Wang, Marcello Pelillo, and Kaleem Siddiqi. Dominant set clustering and pooling for multi-view 3d object recognition. In Proceedings of the British machine vision conference, 2017. +[43] Peng-Shuai Wang, Yang Liu, Yu-Xiao Guo, Chun-Yu Sun, and Xin Tong. O-cnn: Octree-based convolutional neural networks for 3d shape analysis. ACM Transactions on Graphics (TOG), 36(4):72, 2017. +[44] Yue Wang, Yongbin Sun, Ziwei Liu, Sanjay E Sarma, Michael M Bronstein, and Justin M Solomon. Dynamic graph cnn for learning on point clouds. ACM Transactions on Graphics (TOG), 38(5):1-12, 2019. +[45] Jiajun Wu, Chengkai Zhang, Tianfan Xue, Bill Freeman, and Josh Tenenbaum. Learning a probabilistic latent space of object shapes via 3d generative-adversarial modeling. In Advances in Neural Information Processing Systems, pages 82–90, 2016. +[46] Wenxuan Wu, Zhongang Qi, and Li Fuxin. Pointconv: Deep convolutional networks on 3d point clouds. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9621-9630, 2019. +[47] Zhirong Wu, Shuran Song, Aditya Khosla, Fisher Yu, Linguang Zhang, Xiaou Tang, and Jianxiong Xiao. 3d shapenets: A deep representation for volumetric shapes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1912-1920, 2015. +[48] Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabas Poczos, Ruslan R Salakhutdinov, and Alexander J Smola. Deep sets. In Advances in Neural Information Processing Systems, pages 3394-3404, 2017. +[49] Zhiyuan Zhang, Binh-Son Hua, and Sai-Kit Yeung. Shellnet: Efficient point cloud convolutional neural networks using concentric shells statistics. In Proceedings of the IEEE International Conference on Computer Vision, pages 1607–1616, 2019. +[50] Hengshuang Zhao, Li Jiang, Chi-Wing Fu, and Jiaya Jia. Pointweb: Enhancing local neighborhood features for point cloud processing. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5565-5573, 2019. \ No newline at end of file diff --git a/neuralimplicitembeddingforpointcloudanalysis/images.zip b/neuralimplicitembeddingforpointcloudanalysis/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ee2fdc70350dfd5ab88319ddb15ed12123ce7797 --- /dev/null +++ b/neuralimplicitembeddingforpointcloudanalysis/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52019d075de65d23cbf0cc2db0d268b03bbb10242fece3c7e5e8b966cbc4a905 +size 426510 diff --git a/neuralimplicitembeddingforpointcloudanalysis/layout.json b/neuralimplicitembeddingforpointcloudanalysis/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d740f6ac5cef6984a6d0835abb93e153bc001ddf --- /dev/null +++ b/neuralimplicitembeddingforpointcloudanalysis/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a42a112e4ad1332f2b2d344a90d2751faaaf610ec24c19eb9b027b861a5d10b5 +size 414972 diff --git a/neuralnetworkpruningwithresidualconnectionsandlimiteddata/0a740047-4922-41db-87a6-96090d41ec11_content_list.json b/neuralnetworkpruningwithresidualconnectionsandlimiteddata/0a740047-4922-41db-87a6-96090d41ec11_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f34bfe782747375e370aa98e72d086e7ee1dcc50 --- /dev/null +++ b/neuralnetworkpruningwithresidualconnectionsandlimiteddata/0a740047-4922-41db-87a6-96090d41ec11_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc57189c2b28d9540591c2eacd39d856f865b2b5a790833d1b77b23aef46fc82 +size 79313 diff --git a/neuralnetworkpruningwithresidualconnectionsandlimiteddata/0a740047-4922-41db-87a6-96090d41ec11_model.json b/neuralnetworkpruningwithresidualconnectionsandlimiteddata/0a740047-4922-41db-87a6-96090d41ec11_model.json new file mode 100644 index 0000000000000000000000000000000000000000..1f6b65661f27227d376efddaa3e765f0a0fa27ec --- /dev/null +++ b/neuralnetworkpruningwithresidualconnectionsandlimiteddata/0a740047-4922-41db-87a6-96090d41ec11_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d85000403354cc4797c200c71fa6519957014f9cf0f253ff320794845ca8e84 +size 97608 diff --git a/neuralnetworkpruningwithresidualconnectionsandlimiteddata/0a740047-4922-41db-87a6-96090d41ec11_origin.pdf b/neuralnetworkpruningwithresidualconnectionsandlimiteddata/0a740047-4922-41db-87a6-96090d41ec11_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3f1df4192b843309eefd66bc32b2bb4242fe6026 --- /dev/null +++ b/neuralnetworkpruningwithresidualconnectionsandlimiteddata/0a740047-4922-41db-87a6-96090d41ec11_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:890e2bb7e37d8fc8bae1ebb00f97355da26dace54b024eafb82c31cd5747b427 +size 474513 diff --git a/neuralnetworkpruningwithresidualconnectionsandlimiteddata/full.md b/neuralnetworkpruningwithresidualconnectionsandlimiteddata/full.md new file mode 100644 index 0000000000000000000000000000000000000000..63b19a0e0e3dedd342f54c3798774770c2dbfc03 --- /dev/null +++ b/neuralnetworkpruningwithresidualconnectionsandlimiteddata/full.md @@ -0,0 +1,339 @@ +# Neural Network Pruning with Residual-Connections and Limited-Data + +Jian-Hao Luo Jianxin Wu* + +National Key Laboratory for Novel Software Technology Nanjing University, Nanjing, China + +luojh@lamda.nju.edu.cn, wujx2001@nju.edu.cn + +# Abstract + +Filter level pruning is an effective method to accelerate the inference speed of deep CNN models. Although numerous pruning algorithms have been proposed, there are still two open issues. The first problem is how to prune residual connections. We propose to prune both channels inside and outside the residual connections via a KL-divergence based criterion. The second issue is pruning with limited data. We observe an interesting phenomenon: directly pruning on a small dataset is usually worse than fine-tuning a small model which is pruned or trained from scratch on the large dataset. Knowledge distillation is an effective approach to compensate for the weakness of limited data. However, the logits of a teacher model may be noisy. In order to avoid the influence of label noise, we propose a label refinement approach to solve this problem. Experiments have demonstrated the effectiveness of our method (CURL, Compression Using Residual-connections and Limited-data). CURL significantly outperforms previous state-of-the-art methods on ImageNet. More importantly, when pruning on small datasets, CURL achieves comparable or much better performance than fine-tuning a pretrained small model. + +# 1. Introduction + +Deep neural networks have now become the dominating method in various computer vision fields, such as image recognition [10, 20, 35] and object detection [5], and we have witnessed a great improvement in model accuracy. But, deploying a large CNN model on resource constrained devices like mobile phones is still challenging. Due to overparameterization, it is both storage and time consuming to run a cumbersome large model on small devices. + +Network pruning is a useful tool to obtain a satisfactory balance between inference speed and model accuracy. Among these methods, filter level pruning aims to remove + +![](images/585fa4c1db930019cf77487d695e1fa1a9217577a156d5756a252480e7e237f7.jpg) +(a) bottleneck + +![](images/5f07cfc81abd807ab484d736b15855758f52b3189b5600b224d8875953cbefc5.jpg) +(b) hourglass +Figure 1. Illustration of residual block pruning with different strategies. (a) Bottleneck structure of residual blocks. (b) Only prune channels inside the bottleneck, generating an hourglass structure. (c) Prune channels both inside and outside the residual connection, generating a shape similar to an opened wallet. + +![](images/b5f43990f12e2e2edd4d9e4f5c4347273c4ded99bfdb0663494ab1b291f5cada.jpg) +(c) wallet + +the whole unimportant filters according to a certain criterion. This strategy will not damage the original model structure and is attracting more and more attention recently. + +Although numerous filter level pruning algorithms have been proposed, there are still several open issues. First, pruning residual connections is very difficult. As illustrated in Fig. 1, most previous pruning methods only prune filters inside the residual connection, leaving the number of output channels unchanged. With a smaller target model (i.e., more filters pruned), the original bottleneck structure will become an hourglass. Obviously, representation ability of middle layers inside the hourglass structure is severely handicapped. Therefore, pruning channels both inside and outside the residual connection is more preferred for accelerating networks. Then, the pruned block is still bottleneck or in an opened wallet shape. + +As illustrated in the experiments section, the wallet structure has more advantages compared with hourglass: 1) it is more accurate thanks to a larger pruning space; 2) it is faster even with the same number of FLOPs; 3) it can save more storage space because more weights will be pruned. + +The second issue is about pruning models with limited data. Most current pruning methods only report their results on toy datasets (e.g., MNIST [21], CIFAR [19]) or large scale datasets (e.g., ImageNet [33]), ignoring an important real application scenario: pruning models on small datasets which have few images per category. This is a very common + +requirement, because we will not apply ImageNet in a real application. Directly pruning on a target dataset (which is usually small) is necessary. + +In order to get a small model on a target small dataset, there are two different ways: 1) compress the network using the large dataset (or using a small network trained from scratch on the large dataset), and then fine-tune on the target small dataset; 2) directly prune the model without access to the large dataset. In many real-world scenarios, the only choice is to compress the network using the small dataset and fine-tune on the same small dataset. + +But, the reality is that directly pruning on a small dataset usually has a significantly lower accuracy than fine-tuning a small model which is pruned or trained from scratch on the large scale dataset. This phenomenon widely exists in various networks and datasets. For example, as shown in ThiNet [29], fine-tuning a pruned model which is compressed on ImageNet is a better choice when transferring to other domains. They found that the accuracy of directly pruning on CUB200 [36] is only $66.90\%$ , while fine-tuning a pruned ImageNet model can achieve $69.43\%$ . A dilemma is that directly pruning on the target dataset is often the case in real-world applications, where large datasets are either proprietary or too expensive to be used by ordinary users. + +In this paper, we propose CURL, namely Compression Using Residual-connections and Limited-data, to address both issues. In order to prune the channels outside of the residual connection, we show that all the blocks in the same stage should be pruned simultaneously due to the shortcut connection. We propose a KL-divergence based criterion to evaluate the importance of these filters. The channels inside and outside the residual connections will both be pruned, leading to a wallet shaped structure. Experiments on ImageNet show that the proposed residual block pruning method outperforms the previous state-of-the-art. To address the problem caused by the lack of enough training data, we propose to combine knowledge distillation [14] and mixup [40] together and enlarge the training dataset via image transformation. We also propose a novel method to correct the noise in the logits of the teacher model. All the techniques greatly improve the accuracy of directly pruning with limited data. + +Our contributions are summarized as follows. + +- We propose a novel way to compress residual blocks. We prune not only channels inside the residual branch, but also channels of its output activation maps (both the identity branch and the residual branch). The resulting wallet-shaped structure shows more advantages than previous hourglass-shaped structure. +- Data augmentation is very effective in model finetuning with limited data. We show that combining data augmentation and knowledge distillation can achieve + +better performance. To avoid the influence of label noise, we propose a label refinement strategy which can further improve the accuracy. + +# 2. Related Work + +Pruning is an effective method to accelerate model inference speed and to reduce model size. Recent developments on network pruning can be roughly divided into two categories, non-structured and structured pruning. + +In the early stage, researchers mainly focused on non-structured pruning. Han et al. [8, 9] proposed a magnitude-based pruning method to remove redundant weights. Connections with small absolute values are regarded as unimportant and are discarded. In order to compensate for the unexpected loss, Guo et al. [7] incorporated the splicing operation into network pruning. Once the pruned connections are found to be important, they could be recovered at any time. + +However, the weakness of non-structured pruning is obvious. Due to the cache and memory access issues caused by irregular connections, its actual inference speed will be adversely affected. Therefore, structured pruning such as filter level pruning is more preferred. + +In filter level pruning, the whole filter is discarded if it is considered to be unimportant. Importance evaluation criterion plays a crucial role in the success of pruning. Li et al. [22] introduced previous magnitude based criterion into filter level pruning and calculated importance scores according to its $\ell_1$ -norm. He et al. [13] proposed to select filters by a LASSO regression based method and least square reconstruction. Luo et al. [29] calculated filter importance based on statistics computed from its next layer. He et al. [12] calculated the geometric median of the filters within one layer to prune filters with redundant information. + +There are also some explorations without explicitly calculating the importance of each filter. Liu et al. [25] imposed $\ell_1$ regularization on the scaling factors of batch normalization layers to select unimportant channels. Huang and Wang [15] also introduced scaling factors into the model training process. By forcing some of the factors to zero, the unimportant filters will be pruned. Luo et al. [28] designed an efficient channel selection layer to find less important filters in an end-to-end manner. He et al. [11] leveraged reinforcement learning to efficiently sample the design space and achieved better compression performance. Yu et al. [39] proposed slimmable neural networks, a general method to train a single CNN model executable at different widths. Although this approach is not designed for pruning, the output dimensions of residual blocks are reduced. But, except slimmable networks, the pruned models of the above filter pruning methods are all hourglass shaped. + +To sum up, these pruning methods achieve pretty good results on toy datasets or large scale datasets and contribute + +![](images/52e2cb1f4929cc74a2f79345adb0a1426e3612400375e0da137e7d3d6bcc3188.jpg) +Figure 2. Illustration of residual block pruning strategy. Our method prunes not only channels inside the residual block (red numbers), but also channels of its output (green numbers). The first two numbers in each rectangle (convolutional layer) represent the number of output and input channels in a layer, respectively. This figure is best viewed in color. + +a lot to the development of network pruning. But they all ignored the problem of pruning with limited data, and the pruned models are hourglass shaped. To the best of our knowledge, this is the first attempt to solve the problem of pruning networks on a small limited dataset. + +# 3. Our Method + +In this section, we will propose our method, CURL, which stands for Compression Using Residual-connections and Limited-data. As its name implies, CURL consists of two major parts: prune residual-connections and prune with limited small-scale data. + +# 3.1. Prune Residual-Connections + +The first step is to evaluate the importance of each filter, and prune away some less important filters to get a small model. We will give a quick recap of residual-connections, including its structure and the weakness of current evaluation criterion. Then, our new method will be presented. + +# 3.1.1 Recap of Residual-Connections + +Fig. 2 illustrates our strategy for residual block pruning. The left part shows a typical residual structure of ResNet [10]. Suppose there are two residual blocks in the current stage. Each block consists of three convolutional layers (including the batch normalization layer and the ReLU activation layer). Usually, a down-sample layer is necessary to process the different activation sizes and channel numbers between two stages. + +Due to the existence of the shortcut connection, the channel numbers of all residual blocks in a stage need to be consistent in order for the sum operations to be valid. Hence, pruning residual connection is very difficult. Most previous studies only focus on reducing channels inside the residual block (as shown in the red numbers of Fig. 2), leaving the output dimension unchanged. + +However, there is a great need for residual connection's pruning. Firstly, pruning both inside and outside channels is faster than only pruning inside channels during inference, even though their FLOPs are the same. Secondly, since the activation map of each block is reduced, we can save more memory spaces. Last but not least, reducing residual output means our pruning space is enlarged. We can achieve higher accuracy with the same compression ratio. + +In order to reduce the output dimension, all the blocks in the same stage should be pruned simultaneously (as well as the down-sample layer). This is not a simple task, which can not be finished with previous method. Most of the previous importance evaluation criterion only focus on single layer (e.g., the ThiNet method [29]), and ignore the relation of other layers. Hence, we should design a new importance criterion that can evaluate multiple filters simultaneously. + +# 3.1.2 The Proposed Pruning Method + +Inspired by ThiNet [29], we propose a new method that can evaluate filter importance globally. The main idea of ThiNet is to minimize the reconstruction error of the next layer's output. Similarly, our goal is to minimize the information loss of the last layer (i.e., softmax layer). + +Let us take Fig. 2 as an example. The output dimension of residual blocks is 256. Now we want to evaluate the importance score of each channel. A natural idea is to remove the output channels one by one, and calculate the information loss after channel removal. Due to the structure constraint, the output channels of each residual block should be removed simultaneously. For example, the first output channel of block 1, block 2 and the down-sample layer should be removed simultaneously in Fig. 2. + +Inspired by network slimming [25], we will reset the parameters of the BN layers to remove the corresponding filters. The output channel of each block is calculated by + +$$ +y _ {i} = \gamma \frac {x _ {i} - \mu_ {\mathcal {B}}}{\sqrt {\sigma_ {\mathcal {B}} ^ {2} + \epsilon}} + \beta , \tag {1} +$$ + +where $\gamma, \beta, \mu_{\mathcal{B}}, \sigma_{\mathcal{B}}$ are the batch-normalization [16] parameters. Since BN is channel independent, we can simply set $\gamma = \beta = 0$ and the corresponding output channel will be zeroed out. It means the corresponding filters of each output block are removed. + +Then, we will evaluate the performance change before/after channel removal. Hence, we need a proxy dataset. + +Naturally, the proxy dataset could be the training dataset. However, using all the training images can be messy and time-consuming. We randomly select 256 images from the training dataset, and extract the prediction probability (the output of the softmax layer) on these 256 images. + +Let $p$ be the output probability of the original network, and $q$ be the probability after channel removal. A popular method to compare the similarity of two probability distributions is KL-divergence. We calculate the filter importance score as + +$$ +s = \mathrm {D} _ {\mathrm {K L}} (p \| q) = \sum_ {i = 1} ^ {n} p _ {i} \log \frac {p _ {i}}{q _ {i}}. \tag {2} +$$ + +If the current filter is redundant, $s$ will approach 0. Removing this filter has almost no influence to the prediction results. Conversely, a larger value of $s$ means the current dimension is more important. Hence, using the KL-divergence to denote the importance score is reasonable. It can reflect the information loss of removing some filters. This step will be repeated 256 times, resulting in 256 importance scores, one for each channel. + +As for those channels inside the residual block (red numbers of Fig. 2), the process is easier. We only need to erase one filter of the current layer at each step. Finally, filter scores in all layers will be sorted in the ascending order. The top $k$ filters will be removed, leading to a pruned small model. In practice, the value of $k$ depends on the available computational or storage budget. To prevent any extreme issues (e.g., there are only few filters left in a layer after pruning), the smallest compression rate of each layer should not be smaller than a threshold (e.g., 0.3). + +The benefits of our pruning method are obvious. First, it is a global criterion which can evaluate the impact of all filters simultaneously. Such kind of global criterion makes possible the pruning of residual connections. Secondly, there is no direct correlation between importance score and filter location. In previous magnitude-based methods (e.g., $\ell_1$ -norm of each filter [22]), the magnitude of importance scores among layers are different. Hence, a fixed compression ratio should be specified for each layer. However, we can achieve an adaptive compression. How many filters should be removed entirely depends on the scores. + +# 3.2. Prune with Limited Data + +The pruned small model is then fine-tuned on the target dataset. Fine-tuning with limited small-scale data is challenging. Data-augmentation (e.g., mixup [40]) plays an important role in this step. As aforementioned, ImageNet pretraining is a crucial augmentation method which achieves much higher accuracy than directly pruning on the small dataset. The major difference between ImageNet and small dataset is the number of training examples. In order to compensate for this gap, we use several image transformation + +![](images/686a33dd08e766eab52a09384a2fad33a06c9e44ba116fd0f1754b3ebb74dd10.jpg) +(a) the original image + +![](images/e4ad89cea4aa4bcbed1ca8fed8a2294b0ceaf31e7f202e4d43bf37d23646af71.jpg) +(b) rotate + +![](images/2cd051601cad6e996a4aa8aa920ff9e20986aed9d67137be1675aaab30caf23c.jpg) +(c) cutout [4] + +![](images/aa3f1ffc549525c7d25541ff339cbed50b84565c72b69c37d17aa8b364ef442b.jpg) +(d) $2\times 2$ shuffle [3] + +![](images/d56efc35e1203554f2b28a512f3765f4f416c9e5925d3e5fe194dc5087483ebb.jpg) +(e) $3 \times 3$ shuffle [3] + +![](images/870ff0c6e916e6eef67645cc925767f7215ed9b1d724da26a5d535a9e64717a2.jpg) +(f) $4\times 4$ shuffle [3] +Figure 3. Visualization of the expanded dataset. + +techniques to expand the training dataset and fine-tune the pruned small model with knowledge distillation [14]. However, the logits may be noisy (since the teacher model has not seen these augmented data). We then propose a label refinement method to update these noisy logits. + +# 3.2.1 Data Expansion + +Since the main difficulty of fine-tuning on small dataset is caused by limited data, a natural idea is to generate or collect more training images. For example, Chen et al. [2] exploited GAN to generate training samples. However, training the generator network can be a more challenging issue, especially for real images with large resolution. Here, we adopt a simpler method to expand the training dataset. + +Fig. 3 shows examples of data expansion results. We use three different image transformation techniques: + +- Rotate: randomly rotate the original images $r$ degrees, where $r \in [0,360)$ . +- Cutout [4]: cut out a rectangle patch from the original image pixels with random location. The side length of rectangle is randomly selected from $[0.2, 0.5]$ times the original image size. +- Shuffle [3]: uniformly partition the image into $N \times N$ sub-regions, and shuffle these partitioned local regions. We use three different partition sizes, namely $2 \times 2$ , $3 \times 3$ , $4 \times 4$ . + +Our motivation behind these transformation is that the most discriminative information often lies in local image patches (e.g., leg color of a bird) for object recognition problems. In order to find these discriminative regions, the network should pay more attention to local patches rather than global information. Hence, we can cut out some regions or even shuffle the whole image to remove the influence of global information (i.e., background). + +# 3.2.2 Label Refinement + +We use knowledge distillation [14] to fine-tune the small model. The original large model plays the role of a teacher model and the pruned small model is the student model. A typical strategy is to train the student model under the supervision of soft target (the logits of teacher models) and hard target (the groundtruth label). However, because the teacher model has not seen the new data, its output (logits) may be noisy. + +Inspired by PENCIL [38] and R2-D2 [37], we can update the noisy logits during model training via SGD. However, updating logits is dangerous. The quality of soft targets can be updated to become worse if the student model is not accurate enough. To avoid this situation, we divide the whole training process into two steps: fine-tuning on original small dataset with knowledge distillation plus mixup and fine-tuning on expanded dataset with label refinement. Note that the expanded new data and our proposed refinement method are only used in step 2. + +Step 1: knowledge distillation with mixup. Knowledge distillation [14] and mixup [40] are two widely used techniques, which are really helpful for the training with limited data. We propose to combine these two techniques together. First, a new input is generated via mixup: + +$$ +\tilde {x} = \lambda x _ {i} + (1 - \lambda) x _ {j}, \quad \tilde {y} = \lambda y _ {i} + (1 - \lambda) y _ {j}, \tag {3} +$$ + +where $(x_{i},y_{i})$ and $(x_{j},y_{j})$ are two random examples, $\lambda \in [0,1]$ is drawn from a Beta distribution. The new input $\tilde{x}$ is then fed into teacher and student models. Let $u$ denote the output logits of the teacher model, and $v$ denote the student's output. Our total loss is calculated as: + +$$ +\mathcal {L} = \alpha T ^ {2} \mathcal {L} _ {\mathrm {K L}} (p, q) + (1 - \alpha) \mathcal {L} _ {\mathrm {C E}} (q, \tilde {y}), \tag {4} +$$ + +where $p = \mathrm{softmax}(u / T)$ , $q = \mathrm{softmax}(v / T)$ are the softmax output under temperature $T$ . $\mathcal{L}_{\mathrm{KL}}$ and $\mathcal{L}_{\mathrm{CE}}$ denote KL-divergence loss and cross-entropy loss, respectively. $\alpha \in [0,1]$ controls the balance between losses. With these two techniques, the pruned small model can converge into a good local minima. + +Step 2: knowledge distillation with label refinement. We then fine-tune the small model on our expanded dataset and update logits to remove label noises. Fig. 4 illustrates the framework of our label refinement process. The soft target (i.e., teacher model's logits) of each image in our expanded dataset will be extracted first, and stored in memory. Our loss function is designed as: + +$$ +\mathcal {L} = \alpha T ^ {2} \mathcal {L} _ {\mathrm {K L}} (q, p) + (1 - \alpha) \mathcal {L} _ {\mathrm {C E}} (q, y). \tag {5} +$$ + +The notations are the same as Eq. (4). Note that mixup is not used here. The major difference with knowledge distillation is that we use a reversed KL-divergence loss to encourage the model to pay more attention to label refinement, + +![](images/4138f4c85a075bb4f0676d3367a44fb4c7a4bfc733f4bc3c6f1b1be911280623.jpg) +Figure 4. Illustration of label refinement. The soft target (teacher model's logits) will also be updated during model fine-tuning. Solid and dashed arrows denote forward and backward propagation, respectively. + +as in [37, 38]. During model fine-tuning, the soft-target will also be updated via SGD: + +$$ +u \leftarrow u - \eta \cdot \nabla_ {u} \mathcal {L}, \tag {6} +$$ + +where $\eta$ is the learning rate for updating $u$ , $\nabla_u\mathcal{L}$ denotes the gradient of the loss function $\mathcal{L}$ with respected to $u$ which is calculated via back-propagation. + +# 4. Experiments + +In this section, we will evaluate the performance of CURL. In order to compare CURL with state-of-the-art methods, we first test the effectiveness on ImageNet [33]. ResNet50 [10] will be pruned on this dataset. Then, more results on small-scale datasets will be presented. Our method achieves better or comparable performance on these datasets than small models with ImageNet pretraining. Finally, we will end this section with ablation studies. All the experiments were conducted with PyTorch [32]. + +# 4.1. Pruning ResNet50 on ImageNet + +Implementation details. We follow the previous training settings. For a fair comparison, all the fine-tuning techniques introduced in Section 3.2 are not used here. In other words, we do not use mixup, knowledge distillation or dataset expansion techniques in the ImageNet experiment. Once the filter importance has been evaluated by CURL, we will remove all unimportant filters of all layers. The pruned model is then fine-tuned with 100 epochs. Data argumentation strategy and parameter settings are the same as PyTorch official examples. We adopt a large mini-batch size 512. The initial learning rate is set to 0.1. Warmup [6] and cosine learning rate decay [27] are also used here. Since the output of the last stage is closely related to prediction, we will not prune the output dimension of the last residual stage (i.e., the output channel number is still 2048). + +Table 1 shows the pruning results of ResNet50. We test model accuracy using 1-crop validation: the shorter side is resized to 256, followed by a $224 \times 224$ center crop and + +Table 1. Comparison results of pruning ResNet50 on ImageNet. + +
MethodTop-1 Acc.Top-5 Acc.MACs#Param.
ResNet5076.15%92.87%4.09G25.56M
ThiNet-30 [29]68.42%88.30%1.10G8.66M
GAL-1-joint [24]69.31%89.12%1.11G10.21M
GDP-0.5 [23]69.58%90.14%1.57G-
Taylor-FO [30]71.69%-1.34G7.90M
Slimmable NN [39]72.10%90.57%1.05G6.92M
AutoPruner [28]73.05%91.25%1.39G12.60M
CURL73.39%91.46%1.11G6.67M
+ +Table 2. Summary of 4 small datasets. + +
Dataset NameMeta-Class#Train#Val.#Categories
CUB200-2011 [36]Birds59945794200
Oxford Pets [31]Pets & Dogs3680366937
Stanford Dogs [17]Dogs120008580120
Stanford Car [18]Cars81448041196
+ +mean-standard normalization. The accuracy of the last epoch will be reported. Obviously, CURL is significantly better than previous state-of-the-art. Our method obtains a higher accuracy even with fewer MACs (Multiply-ACumulate operations) and parameters. + +In order to demonstrate our motivation for residual connection pruning, we also test the actual inference speed on a NVIDIA Tesla M40 GPU. AutoPruner [28] only prunes channels inside the residual block. With a small compression rate (more filters will be removed), the middle layer of a residual block will be very thin, leading the bottleneck structure into hourglass. By contrast, we prune both channels inside and outside residual blocks. The pruned structure is still bottleneck or opened wallet. + +Wallet is not only more accurate than hourglass (which has been demonstrated above), but also faster even with the same number of MACs. For a fair comparison, we adjust the threshold to obtain a new model with 1.39G MACs and 7.83M parameters. The inference time of hourglass on M40 GPU to process a mini-batch of 256 images is 0.21s, while wallet only cost 0.19s. More importantly, the model size of wallet is much smaller than hourglass (nearly halved). Hence, memory consumption could be greatly reduced with our pruned structure. + +# 4.2. Pruning on Small-Scale Datasets + +We then prune large models on small datasets. Our goal is to demonstrate that directly pruning with limited data using CURL could achieve comparable or even better performance than those small models pruned or trained with ImageNet. Two widely used network, namely ResNet50 [10] and MobileNetV2 [34], will be pruned on four small-scale datasets. Table 2 summarizes the information of these four datasets, including training and validation sizes. + +Baseline setting. We adopt three baselines for comparison: 1) Fine-tune the large model which is pretrained on ImageNet. This is a typical approach to get a classification network on a target task. 2) Fine-tune a small model which is pretrained (MobileNetV2-0.5) or pruned (ResNet50-CURL, the CURL model in Table 1) on ImageNet. This is a compromise due to the difficulty of pruning with limited data. 3) Directly prune the fine-tuned large model (i.e., baseline 1) on the target small dataset using the slimmable neural network method [39]. During fine-tuning, the models are trained with the mini-batch size of 32 for 300 epochs. Learning rate is initialized as 0.001, and reduced with cosine schedule. Warmup is used in the first 5 epochs. Mixup is also adopted with $\alpha = 1$ . Other parameter settings and data argumentation strategies are the same as PyTorch official examples. + +Implementation details of CURL. The fine-tuning process of CURL is divided into two steps. For a fair comparison, the total fine-tuning epochs are still 300. In the first step, the pruned model is trained with mixup and knowledge distillation in 200 epochs. The temperature $T$ of knowledge distillation is set to 2, $\alpha$ in Eq. (4) is set to 0.7, and learning rate is 0.01. Warmup and cosine decay schedule are also used. In the second step, since the dataset is enlarged 6 times, we train the small model with 16 epochs $(16 \times 6 \approx 100)$ . Because logits will be updated during fine-tuning, the model is not sensitive to temperature, we set $T = 1$ here. The value of $\alpha$ is not changed. The learning rate for pruned network is set to 0.0001 and reduced using cosine schedule. As for the learning rate $\eta$ for updating logits, we set it to 1 and will not change during training. Other parameter settings are the same as those used in baselines. The pruning strategy for ResNet is the same as experiment on ImageNet. As for MobileNetV2, all the bottleneck will be pruned. Note that the second layer of each bottleneck is depth-wise convolution, which means the input dimension should be the same as its output. Hence, the first two layers of each residual block will be pruned simultaneously. + +Table 3 shows results on these four datasets. Performance comparison between the second and third lines prove that with limited training data, directly pruning on a small dataset is usually worse than fine-tuning a small model trained or pruned on ImageNet. In other words, ImageNet pretraining is still a strong technique to get a more accurate model with limited data. However, this technique may not be applicable in many real-world applications. Training on large scale datasets is cumbersome and time-consuming, too. The original large dataset may be even not available in many real-world scenarios. + +In stark contrast, the proposed CURL approach works well on most datasets. Our method achieves comparable or even better performance than fine-tuning small models trained or pruned on ImageNet. When MobileNetV2-1.0 + +Table 3. Pruning results on small-scale datasets. In each model, there are 4 methods: 1) fine-tune the large model which is trained on ImageNet; 2) fine-tune the small model which is trained or pruned on ImageNet; 3) directly prune the large model on small dataset using slimmable neural network [39]; 4) directly prune the large model on small dataset using CURL. + +
ModelMethodCUB200-2011 [36]Pets [31]Dogs [17]Car [18]
Acc.MACsAcc.MACsAcc.MACsAcc.MACs
MobileNetV2MobileNetV2-1.078.77%299.77M89.94%299.56M78.94%299.67M87.27%299.76M
MobileNetV2-0.573.96%96.12M86.32%95.91M72.15%96.02M81.50%96.11M
Slimmable NN [39]72.20%96.12M83.37%95.91M67.81%96.02M87.02%96.11M
CURL78.72%96.07M86.89%95.91M74.72%96.04M87.64%96.15M
ResNet50ResNet5084.76%4.09G92.59%4.09G83.82%4.09G91.89%4.09G
ResNet50-CURL81.33%1.11G90.84%1.11G81.60%1.11G88.60%1.11G
Slimmable NN [39]80.05%1.05G89.67%1.05G77.80%1.05G91.47%1.05G
CURL83.64%1.10G90.30%1.11G79.79%1.11G92.19%1.11G
+ +Table 4. Pruning MobileNetV2 on CUB200 with different fine-tuning methods. Here, "nothing" indicates a standard fine-tuning process, "KD" is knowledge distillation, and "scratch" denotes training from scratch. + +
Methodnothing+mixup+KD+mixup&KDoursscratch
Acc. (%)70.7673.8977.8777.9978.7264.39
+ +model is pruned, CURL outperforms MobileNetV2-0.5 on all datasets by a large margin. It is worth mentioning that on Oxford Car, CURL is even better than the original large model. This result demonstrates that the proposed CURL method is really useful when prune with limited data. + +As for ResNet, since ResNet50-CURL is a very strong baseline (ResNet50-CURL achieves the best performance on ImageNet compared with previous state-of-the-art and it is already trained using CURL), the advantage of directly pruning on small dataset is not so significant. However, we can still achieve better results than ResNet50-CURL on CUB200-2011 and Oxford Car. + +# 4.3. Ablation Studies + +To explore the impact of different modules of CURL, we will perform an ablative study in this section. Three major modules, namely fine-tuning strategy, pruning criterion and label refinement will be studied. All the ablation studies are conducted on CUB200-2011 [36] with the MobileNetV2 [34] model. + +# 4.3.1 Impact of Fine-Tuning Strategy + +We first study the impact of different fine-tuning strategies. The large fine-tuned model (MobileNetV2-1.0) is evaluated and pruned by CURL, generating a small but not accurate model. Then the pruned model is fine-tuned using several different strategies with 300 epochs. Other parameter settings are the same as in previous experiments. + +Table 4 summarizes the results of different fine-tuning methods. A standard approach is to train the small model + +without augmentation techniques like mixup or knowledge distillation. Unfortunately, the final accuracy is only $70.76\%$ , which is much worse than MobileNetV2-0.5 finetuned by the same approach $(72.97\%)$ . If mixup is used, the accuracy can be improved to $73.89\%$ , but still worse than MobileNetV2-0.5 fine-tuned with mixup $(73.96\%)$ . Note that if we prune the model using Slimmable NN [39] with the same fine-tuning strategy, its accuracy is only $72.20\%$ (see Table 3 for more details). This phenomenon suggests that our KL-divergence based criterion, i.e., Eq. (2), works well in evaluating filter importance. On the other hand, these results also demonstrate our motivation: directly pruning on a small dataset is usually worse than fine-tuning a small model which is trained or pruned on the large dataset. Although our pruning method outperforms previous state-of-the-art on ImageNet, fine-tuning on small dataset is still very challenging due to the lack of enough training data. + +Knowledge distillation contributes a lot to the success of pruning with limited data as shown in [1]. If we equip the standard fine-tuning approach with knowledge distillation, the final accuracy can be improved to $77.87\%$ . If we combine mixup and knowledge distillation together, the accuracy can be further improved to $77.99\%$ . Based on these observations, we propose to enlarge the training dataset with image transformation methods, and update teacher model's logits with label refinement. Finally, the pruned small model can reach an accuracy of $78.72\%$ , which is almost the same as unpruned large model $(78.77\%)$ . Please note that the combination of mixup and knowledge distillation, and the updating of teacher's logits are both novel approaches proposed in our CURL in the network compression field. + +The last experiment is about training from scratch. We randomly initialize the weights of pruned network structure and train the model by 1000 epochs with mixup. Starting from 0.05, the value of learning rate is also reduced by cosine schedule. Other parameter settings are the same as previous ones. However, the accuracy of training from scratch is only $64.39\%$ , much lower than any pruned results. + +Table 5. Pruning MobileNetV2 on CUB200 with different evaluation criterion. We prune $50\%$ filters of the middle layers of the last bottleneck. The accuracy is tested without fine-tuning. + +
MethodRandomWeight SumΔLossKL-Div. (Ours)
Acc.6.80%8.25%21.83%66.33%
+ +This phenomenon is reasonable, because training with limited data is very challenging. Recently, a study [26] suggests that training the same network from scratch could achieve comparable or better performance than pruning. They think the real value of pruning is to find a better network structure rather than important filters. This conclusion may be correct with enough training time and data. However, when the conditions are not applicable (e.g., training with limited data), this conclusion will fail to hold true. In this situation, finding important filters becomes more valuable. To sum up, our pruning method provides a feasible solution for how to obtain a small model with limited data and how to get rid of the dependence on the large dataset, which is really important in many real-world applications. + +# 4.3.2 Impact of Pruning Criterion + +We then study the impact of different criterion for evaluating filter importance, i.e., Eq. (2). We focus on the last bottleneck structure of MobileNetV2. There are two layers (point-wise convolution and depth-wise convolution) in this block. Due to the structure constraint of depth-wise convolution, we should prune these two layers simultaneously. + +The easiest way to finish this task is to randomly discard channels. We randomly prune $50\%$ filters of these two layers and get $6.80\%$ top-1 accuracy on CUB200 without fine-tuning (as shown in Table 5). Starting from this simplest baseline, we then focus on how to design a better way to evaluate the importance of multiple filters. + +One possible solution is to extend previous magnitude-based criterion. Weight sum [22] is such kind of a method which calculates filter importance based on its $\ell_1$ -norm. Here, we simply add the scores of two filters together: $s_i = \| W_i^1\| _1 + \| W_i^2\| _1$ , where $W_{i}^{1}$ and $W_{i}^{2}$ denote filter $i$ of the first (point-wise convolution) and second (depthwise convolution) hidden layers, respectively. However, the extended version of weight sum is only a little better than the random strategy (8.25% vs. 6.80%). + +We then consider data-driven criteria and concentrate on the output of the network. A natural idea is evaluating the change of accuracy. If removing some filters has no influence to the model accuracy, then we can regard them as unimportant. However, this approach is impractical. We find that model accuracy is not sensitive to one or two filters. Most channels will get the same score after evaluation. Since accuracy is closely related to loss, we can replace ac + +Table 6. Pruning results on several small datasets with/without the proposed label refinement method. + +
ModelRefinement?CUB200PetsDogsCar
MobileNetV2X77.43%86.65%74.02%87.15%
✓78.72%86.89%74.72%87.64%
ResNet50X82.88%90.32%78.65%91.77%
✓83.64%90.30%79.79%92.19%
+ +curacy change with loss change and calculate the score as $s_i = \mathcal{L}_{\text{pruned}} - \mathcal{L}_{\text{unpruned}}$ . The performance of this criterion is $21.83\%$ . Although this result is significantly better than random and weight sum, accuracy of the pruned network is still not satisfying. + +Inspired by knowledge distillation, we propose a KL-divergence based criterion to evaluate the information loss of the pruned model. With this criterion, the accuracy is dramatically improved to $66.33\%$ . + +# 4.3.3 Impact of Label Refinement + +In order to compensate for the gap of limited data, we propose a label refinement technique. The original dataset is enlarged by 6 times via several image transformation methods. The fine-tuned model is then trained on this enlarged dataset with knowledge distillation. Due to label noise, soft target will also be updated during training. + +Table 6 illustrates the effectiveness of our label refinement strategy. Compared with standard knowledge distillation equipped with mixup, using our label refinement method can achieve better performance on most datasets. + +Updating soft target can further improve model accuracy. For examples, if we set $\eta = 0$ (do not update soft target) and fine-tune the pruned MobileNetV2 on the expanded CUB200 dataset, the accuracy is $78.56\%$ , slightly lower than the result of updating soft target $(78.72\%)$ . In this work, we adopt a simple method to process label noise of soft target. How to correct the misleading wrong labels is still worth exploring. If a more advanced algorithm is used, the model accuracy can be further improved. + +# 5. Conclusion + +In this paper, we proposed a novel filter level pruning method to accelerate the inference speed of deep CNN models. Different from previous pruning strategies, we prune both channels inside and outside the residual connections via a KL-divergence based criterion. We also propose a label refinement approach to avoid the influence of label noise. With the proposed CURL method, we can directly prune models on the small dataset and achieve comparable or even better results than fine-tuning a small model pruned or trained on the large scale dataset, which is of great value in many real-world scenarios. + +# References + +[1] Haoli Bai, Jiaxiang Wu, Irwin King, and Michael Lyu. Few shot network compression via cross distillation. arXiv preprint arXiv:1911.09450, 2019. 7 +[2] Hanting Chen, Yunhe Wang, Chang Xu, Zhaohui Yang, Chuanjian Liu, Boxin Shi, Chunjing Xu, Chao Xu, and Qi Tian. Data-free learning of student networks. In ICCV, pages 3514-3522, 2019. 4 +[3] Yue Chen, Yalong Bai, Wei Zhang, and Tao Mei. Destruction and construction learning for fine-grained image recognition. In CVPR, pages 5157-5166, 2019. 4 +[4] Terrance DeVries and Graham W Taylor. Improved regularization of convolutional neural networks with cutout. arXiv preprint arXiv:1708.04552, 2017. 4 +[5] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In CVPR, pages 580-587, 2014. 1 +[6] Priya Goyal, Piotr Dólar, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch SGD: Training ImageNet in 1 hour. arXiv preprint arXiv:1706.02677, 2017. 5 +[7] Yiwen Guo, Anbang Yao, and Yurong Chen. Dynamic network surgery for efficient DNNs. In NeurIPS, pages 1379-1387, 2016. 2 +[8] Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and Huffman coding. In ICLR, 2015. 2 +[9] Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. In NeurIPS, pages 1135-1143, 2015. 2 +[10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. 1, 3, 5, 6 +[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 ECCV, volume 11211 of LNCS, pages 815-832, 2018. 2 +[12] Yang He, Ping Liu, Ziwei Wang, Zhilan Hu, and Yi Yang. Filter pruning via geometric median for deep convolutional neural networks acceleration. In CVPR, pages 4340-4349, 2019. 2 +[13] Yihui He, Xiangyu Zhang, and Jian Sun. Channel pruning for accelerating very deep neural networks. In ICCV, pages 1389-1397, 2017. 2 +[14] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. In Deep Learning and Representation Learning Workshop, NIPS, 2014. 2, 4, 5 +[15] Zehao Huang and Naiyan Wang. Data-driven sparse structure selection for deep neural networks. In ECCV, volume 11220 of LNCS, pages 317-334, 2018. 2 +[16] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, pages 448-456, 2015. 3 +[17] Aditya Khosla, Nityananda Jayadevaprakash, Bangpeng Yao, and Li Fei-Fei. Novel dataset for fine-grained image + +categorization. In First Workshop on Fine-Grained Visual Categorization, CVPR, 2011. 6, 7 +[18] Jonathan Krause, Michael Stark, Jia Deng, and Li Fei-Fei. 3d object representations for fine-grained categorization. In 4th IEEE Workshop on 3D Representation and Recognition, ICCV, 2013. 6, 7 +[19] Alex Krizhevsky. Learning multiple layers of features from tiny images. Master's thesis, University of Toronto, 2009. 1 +[20] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet classification with deep convolutional neural networks. In NeurIPS, pages 1097-1105, 2012. 1 +[21] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278-2324, 1998. 1 +[22] Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. In ICLR, 2017. 2, 4, 8 +[23] Shaohui Lin, Rongrong Ji, Yuchao Li, Yongjian Wu, Feiyue Huang, and Baochang Zhang. Accelerating convolutional networks via global & dynamic filter pruning. In IJCAI, pages 2425-2432, 2018. 6 +[24] 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 CVPR, pages 2790-2799, 2019. 6 +[25] Zhuang Liu, Jianguo Li, Zhiqiang Shen, Gao Huang, Shoumeng Yan, and Changshui Zhang. Learning efficient convolutional networks through network slimming. In ICCV, pages 2736-2744, 2017. 2, 3 +[26] Zhuang Liu, Mingjie Sun, Tinghui Zhou, Gao Huang, and Trevor Darrell. Rethinking the value of network pruning. In ICLR, 2019. 8 +[27] Ilya Loshchilov and Frank Hutter. SGDR: Stochastic gradient descent with warm restarts. In *ICLR*, 2017. 5 +[28] 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. 2, 6 +[29] Jian-Hao Luo, Jianxin Wu, and Weiyao Lin. ThiNet: A filter level pruning method for deep neural network compression. In ICCV, pages 5058-5066, 2017. 2, 3, 6 +[30] Pavlo Molchanov, Arun Mallya, Stephen Tyree, Iuri Frosio, and Jan Kautz. Importance estimation for neural network pruning. In CVPR, pages 11264-11272, 2019. 6 +[31] Omkar M Parkhi, Andrea Vedaldi, Andrew Zisserman, and CV Jawahar. Cats and dogs. In $CVPR$ , pages 3498-3505, 2012. 6, 7 +[32] 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 Autodiff Workshop, NIPS, 2017. 5 +[33] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet large scale visual recognition challenge. IJCV, 115(3):211–252, 2015. 1, 5 + +[34] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zh-moginov, and Liang-Chieh Chen. MobileNetV2: Inverted residuals and linear bottlenecks. In CVPR, 2018. 6, 7 +[35] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. 1 +[36] Catherine Wah, Steve Branson, Peter Welinder, Pietro Perona, and Serge Belongie. The Caltech-UCSD birds-200-2011 dataset. Technical Report CNS-TR-2011-001, California Institute of Technology, 2011. 2, 6, 7 +[37] Guo-Hua Wang and Jianxin Wu. Repetitive repression deep decipher for semi-supervised learning. arXiv preprint arXiv:1908.04345, 2019. 5 +[38] Kun Yi and Jianxin Wu. Probabilistic end-to-end noise correction for learning with noisy labels. In CVPR, pages 7017-7025, 2019. 5 +[39] Jiahui Yu, Linjie Yang, Ning Xu, Jianchao Yang, and Thomas Huang. Slimmable neural networks. In ICLR, 2019. 2, 6, 7 +[40] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. In ICLR, 2018. 2, 4, 5 \ No newline at end of file diff --git a/neuralnetworkpruningwithresidualconnectionsandlimiteddata/images.zip b/neuralnetworkpruningwithresidualconnectionsandlimiteddata/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..23eee46c38bee131240870e9e9209735d32be1e9 --- /dev/null +++ b/neuralnetworkpruningwithresidualconnectionsandlimiteddata/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:745f9835567aaa2da885908cd178269e3b4787864ef371fc986acc44e4eb54d5 +size 340849 diff --git a/neuralnetworkpruningwithresidualconnectionsandlimiteddata/layout.json b/neuralnetworkpruningwithresidualconnectionsandlimiteddata/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..80936c853a2f58cafc9eb13cd75fc0618cd50ee2 --- /dev/null +++ b/neuralnetworkpruningwithresidualconnectionsandlimiteddata/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dbcd5a080dac6dfd9a3d421450ca7f87b5e00c707073d6e8a6d7695c809bfeaf +size 379811 diff --git a/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/34604bf6-853a-46f3-929e-dc5a604c3be6_content_list.json b/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/34604bf6-853a-46f3-929e-dc5a604c3be6_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..0f75a2e3e8f2c6739d158b669efd570850642293 --- /dev/null +++ b/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/34604bf6-853a-46f3-929e-dc5a604c3be6_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5077e084bbbd869772108b1a6fe76ac341ad977ee68a18e0febd3516a33343f1 +size 74607 diff --git a/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/34604bf6-853a-46f3-929e-dc5a604c3be6_model.json b/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/34604bf6-853a-46f3-929e-dc5a604c3be6_model.json new file mode 100644 index 0000000000000000000000000000000000000000..5f1f1d411fb930dadee6991253a941214a31f307 --- /dev/null +++ b/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/34604bf6-853a-46f3-929e-dc5a604c3be6_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:171ecce9b9f732ae8c60bc48e6abc530e45c6abf065dac8e6c1b945942880f6a +size 92422 diff --git a/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/34604bf6-853a-46f3-929e-dc5a604c3be6_origin.pdf b/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/34604bf6-853a-46f3-929e-dc5a604c3be6_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..dd44764f1c566fa809eb46082dd3231918130496 --- /dev/null +++ b/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/34604bf6-853a-46f3-929e-dc5a604c3be6_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:702838bc981a69863f76c7225156da0c80fe77489be55537afe281eca1bf5105 +size 1454214 diff --git a/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/full.md b/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/full.md new file mode 100644 index 0000000000000000000000000000000000000000..309bc8301bb9ba1ca0e92f3ee07d92bd588f73e5 --- /dev/null +++ b/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/full.md @@ -0,0 +1,308 @@ +# Neural Networks Are More Productive Teachers Than Human Raters: Active Mixup for Data-Efficient Knowledge Distillation from a Blackbox Model + +Dongdong Wang $^{1*}$ Yandong Li $^{1*}$ Liqiang Wang $^{1}$ Boqing Gong $^{2}$ $^{1}$ University of Central Florida ${}^{2}$ Google + +{daniel.wang, liyandong}@Knights.ucf.edu lwang@cs.ucf.edu bgong@google.com + +# Abstract + +We study how to train a student deep neural network for visual recognition by distilling knowledge from a black-box teacher model in a data-efficient manner. Progress on this problem can significantly reduce the dependence on large-scale datasets for learning high-performing visual recognition models. There are two major challenges. One is that the number of queries into the teacher model should be minimized to save computational and/or financial costs. The other is that the number of images used for the knowledge distillation should be small; otherwise, it violates our expectation of reducing the dependence on large-scale datasets. To tackle these challenges, we propose an approach that blends mixup and active learning. The former effectively augments the few unlabeled images by a big pool of synthetic images sampled from the convex hull of the original images, and the latter actively chooses from the pool hard examples for the student neural network and query their labels from the teacher model. We validate our approach with extensive experiments. + +# 1. Introduction + +Data curation is one of the most important steps for learning high-performing visual recognition models. However, it is often tedious and sometimes daunting to collect large-scale relevant data that have sufficient coverage of the inference-time scenarios. Additionally, labeling the collected data is time-consuming and costly. + +Given a new task, how can we learn a high-quality machine learning model in a more data-efficient manner? We believe the answer varies depending on specific application scenarios. In this paper, we focus on the case that there exists a blackbox teacher model whose capability covers our task of interest. Indeed, there are many high-performing generic visual recognition models available as Web-based + +![](images/96e63d7977a5361378b42f699e5ffd36608d6ce28ce1bade7c57899103a024d8.jpg) + +![](images/abf406fe3b3ac6a755ca763f2ea85a2347e57c1732235660819d46965dccd6b8.jpg) +Figure 1. Data-efficient blackbox knowledge distillation. Given a blackbox teacher model and a small set of unlabeled images, we propose to employ mixup [49] and active learning [28] to train a high-performing student neural network in a data-efficient manner (b) so that we do not need to re-do the heavy and expensive data curation used to train the teacher model (a). + +APIs, in our smart devices, or even as an obsolete model built by ourselves some while ago. The challenge is, however, we often have limited knowledge about their specifics, e.g., not knowing the exact network architecture or weights. Moreover, it could be computationally and/or financially expensive to query the models and read out their outputs for a large-scale dataset. + +To this end, we study how to distill a blackbox teacher model for visual recognition into a student neural network in a data-efficient manner. Our objective is three-fold. First of all, we would like the distilled student network to perform well as the teacher model as possible at the inference time. Besides, we try to minimize the number of queries to the blackbox teacher model to save costs. Finally, we also shall use as a small number of examples as possible to save + +data collection efforts. It is hard to collect abundant data for rare classes or privacy-critical applications. + +We propose to blend active learning [44, 28] and image mixup [49] to tackle the data-efficient knowledge distillation from a blackbox teacher model. The main idea is to synthesize a big pool of images from the few training examples by mixup and then use active learning to select from the pool the most helpful subset to query the teacher model. After reading out the teacher model's outputs, we simply treat them as the "groundtruth labels" of the query images and train the student neural network with them. + +Image mixup [49, 13, 1] was originally proposed for data augmentation to improve the generalization performance of a neural recognition network. It synthesizes a virtual image by a convex combination of two training images. While the resultant image may become cluttered and semantically meaningless, it resides near the manifold of the natural images — unlike white-noise images. Given 1000 images, we can construct $O(10^{5})$ pairs, each of which can further generate tens to thousands of virtual images depending on the coefficients in the convex combination. We conjecture that the big pool of mixup images provides good coverage of the manifold of natural images. Hence, we expect that a student network that imitates the blackbox teacher on the mixup images can give rise to similar predictions over the test images as the teacher model does. + +Instead of querying the blackbox teacher model by all the mixup images, we resort to active learning to improve the querying efficiency. We first acquire the labels of the small number of original images from the blackbox teacher model and use them for training the student network. We then apply the student network to all the mixup images to identify the subset with which the current student network is the most uncertain. Notably, if two mixup images are synthesized from the same pair of original images, we keep only the one with higher uncertainty. We query labels for this subset, merge it into the previously labeled data, and then re-train the student network. We iterate this procedure of subset selection, querying the blackbox teacher model, and training the student neural network multiple times until reaching a stopping criterion. + +To the best of our knowledge, we are the first to distill knowledge from a blackbox teacher model while underscoring the need for data-efficiency and query-efficiency. We empirically validate our approach by contrasting it to both vanilla and few/zero-shot knowledge distillation methods. Experiments show that, despite the blackbox teacher in our work, our approach performs on par or better than the competing methods that learn from whitebox teachers. + +Note that the mixup images are often semantically meaningless, making them almost impossible for human raters to label. However, the blackbox teacher model returns predictions for them regardless, and the student network still gains + +from such fake image-label pairs. In this sense, we say that the blackbox teacher model is more productive than human raters in teaching the student network. + +# 2. Related Work + +Knowledge Distillation. Knowledge distillation is proposed in [16] to solve model compression problems, thus relieving the burden of ensemble learning. This work suggests that class probabilities, as "dark knowledge", are very useful to retain the performance of original network, and thus, light-weight substitute model could be trained to distill this knowledge. This approach is very useful and has been justified to solve a variety of complex application problems, such as pose estimation [37, 46, 33], lane detection [17], real-time streaming [31], object detection [6], video representation [41, 10, 11], and so forth. Furthermore, this approach is able to boost the performance of deep neural network with improvement on efficiency [35] and accuracy [25]. Accordingly, lots of research is conducted to enhance its performance from the perspective of training strategy [45, 20], distillation scheme [15, 4], or network properties [34], etc. + +However, there is an important issue. Traditional knowledge distillation requires lots of original training data which are very difficult to be obtained. To alleviate this data demand, few-shot knowledge distillation is proposed to retain teacher model performance with pseudo samplers which are generated in adversarial manner [21]. Another approach called data free knowledge distillation leverages extra activation records from teacher model to reconstruct original datasets, thus recovering teacher model [30]. Recently, a zero-knowledge distillation method is developed by synthesizing data with gradient information of teacher network [32]. Nevertheless, these approaches require the gradient information of teacher network, which enables them intractable in the real world. + +Blackbox Optimization. Blackbox optimization is developed based on zero knowledge in the gradient information of queried models and widely used to solve practical problems. Recently, this work is widely used in deep learning, especially model attack. A rich line of blackbox attacking approaches [3, 18, 36, 2, 29] are explored by accessing the input-output pairs of classifiers, most of which are focusing on attacks resulting from accessing the data. [8] instead investigates that the adversaries are capable of recovering sensitive data by model inversion. However, there is no work for blackbox knowledge distillation. + +Active Learning. Active learning is a learning process by interaction between oracle and learner agents. This strategy is widely used to solve learning problems which exhibit + +costly data labelling since it could exploit existing data information to efficiently improve obtained model, thus reducing the number of queries. Lots of effective approaches are proposed to optimize this process, such as uncertainty-based [28, 48, 9] and margin-based methods [7, 38]. Form the review by [12], uncertainty-based methods, despite simple, are able to obtain good performance. + +Mixup. Zhang et al. first proposed mixup to improve the generalization of deep neural network [49]. Between-Class learning [42] (BC learning) was proposed for deep sound recognition, and then, they extended this approach to image classification [43]. Following them, Pairing Samples [19] was proposed as a data augmentation approach by taking an average of two images for each pixel. More recently, an approach called AutoAugment [5], explores improving data augmentation policies by automatically searching. + +# 3. Approach + +We present our approach to the data-efficient knowledge distillation from a blackbox teacher model in detail in this section. Given a blackbox teacher model and a small number of unlabeled images, the approach iterates over the following three steps: 1) constructing a big candidate pool of synthesized images from the small number of unlabeled images, 2) actively choosing a subset from the pool with which the current student network is the most uncertain, 3) querying the blackbox teacher model to acquire labels for this subset and to re-train the student network. + +# 3.1. Constructing a Candidate Pool + +In real-world applications, data collection could consume a huge amount of time due to various reasons, such as privacy concerns, rare classes, data quality, etc. Instead of relying on a big dataset of real images, we begin with a small number of unlabeled images and use the recently proposed mixup [49] to augment this initial image pool. + +Given two natural images $x_{i}$ and $x_{j}$ , mixup generates multiple synthetic images by a convex combination of the two with different coefficients, + +$$ +\hat {x} _ {i j} (\lambda) = \lambda x _ {i} + (1 - \lambda) x _ {j}, \tag {1} +$$ + +where the coefficient $\lambda \in [0,1]$ . Note that this notation also includes the original unlabeled data $x_{i}$ and $x_{j}$ when $\lambda = 1$ and $\lambda = 0$ , respectively. + +This technique comes handy and effective for our work. It can exponentially expand the size of the initial image pool. Suppose we have collected 1000 natural images, and we generate 10 mixup images for each image pair by varying the coefficient $\lambda$ . We then arrive at a pool of about $10^{6}$ images in total. Besides, this pool of synthetic images also provides good coverage of the manifold of natural images. + +Indeed, this pool can be viewed as a dense sampling of the convex hull of the natural images we have collected. The test images likely fall into or close to this convex hull if the collected images are diverse and representative. Hence, we expect the student neural network to generalize well to the inference-time data by enforcing it to imitate the blackbox teacher model on the mixup images. + +# 3.2. Actively Choosing a Subset to Query the Teacher Model + +Let $\{\hat{x}_{ij}(\lambda),\lambda \in [0,1],i\neq j\}$ denote the augmented pool of images. It is straightforward to query the teacher model to obtain the (soft) labels for these synthetic images and then train the student network with them. However, this brute-force strategy incurs high computational and financial costs. Instead, we employ active learning to reduce the cost. + +We define the student neural network's confidence over an input $x$ as + +$$ +C _ {1} (x) := \max _ {y} P _ {S} (y | x), \tag {2} +$$ + +where $P_{S}(y|x)$ is the probability of the input image $x$ belonging to the class $y$ predicted by the current student network. Intuitively, the less confidence the student network has over the input $x$ , the more the student network can gain from the teacher model's label for the input. + +Therefore, we could rank all the synthetic images in the candidate pool according to the student network's confidence on them, and then choose the top ones as the query subset. However, this simple strategy results in near-duplicated images, for example $\hat{x}_{ij}(\lambda = 0.5)$ and $\hat{x}_{ij}(\lambda = 0.55)$ . We avoid this situation by choosing at most one image from any pair of images. + +In particular, instead of ranking the synthetic images, we rank image pairs in the candidate pool. We define the confidence of the student network over an image pair $x_{i}$ and $x_{j}$ as the following, + +$$ +C _ {2} \left(x _ {i}, x _ {j}\right) := \min _ {\lambda} C _ {1} \left(\hat {x} _ {i j} (\lambda)\right), \quad \lambda \in [ 0, 1 ], \tag {3} +$$ + +which depends on a coefficient $\lambda^{*}$ for the image pair. Hence, we obtain a confidence score and its corresponding coefficient for any pair of the original images. The synthetic image $\hat{x}_{ij}(\lambda^{*})$ is selected into the query set if the confidence score $C_2(x_i,x_j)$ is among the lowest $k$ ones. We study the size of the query set in the experiments. + +# 3.3. Training the Student Network + +With the actively selected query set of images, we query the blackbox teacher model and read out its soft predictions as the labels for the images. We then merge them with the previous training set, if there is, to train the student network + +Algorithm 1 Data-efficient blackbox knowledge distillation +INPUT: Pre-trained teacher model $\mathcal{M}^T$ +INPUT: A small set of unlabeled images $X = \{x_{i}\}_{i = 1}^{n}$ +INPUT: Hyper-parameters (learning rate, subset size, etc.) +OUTPUT: Student network $\mathcal{M}^S$ +1: Query $\mathcal{M}^T$ and acquire labels $Y_{0}$ for all images in $X$ +2: Train an initial student network $\mathcal{M}_0^S$ with $(X,Y_0)$ +3: Construct a synthetic image pool $\mathcal{P} = \{\hat{x}_{ij}(\lambda)\}$ by using the unlabeled images $X$ with eq. (1) +4: Initialize $\mathcal{P}_1^s = X,\mathcal{V}_1 = \mathcal{V}_0$ +5: for $t = 1,2\dots ,T$ do +6: Select a subset $\Delta \mathcal{P}_t^s$ from $\mathcal{P}$ with lowest confidence scores $\{C_2(x_i,x_j)\}$ returned by student $\mathcal{M}_{t - 1}^S$ +7: Query $\mathcal{M}^T$ , acquire labels $\Delta \mathcal{V}_t$ for all images $\Delta \mathcal{P}_t^s$ +8: $\mathcal{P}_t^s\gets \mathcal{P}_t^s\cup \Delta \mathcal{P}_t^s,\mathcal{V}_t\gets \mathcal{V}_t\cup \Delta \mathcal{V}_t$ +9: Train a new student network $\mathcal{M}_t^S$ with $(\mathcal{P}_t^s,\mathcal{V}_t)$ +10: Update $\mathcal{P}\gets \mathcal{P}\cdot \Delta \mathcal{P}_t^s$ +11: end for + +using a cross-entropy loss. The soft probabilistic labels returned by the teacher model give rise to slightly better results than the hard labels, so we shall use the soft labels in the experiments below. + +# 3.4. Overall Algorithm + +Algorithm 1 presents the overall procedure of our approach to the data-efficient blackbox knowledge distillation. Beginning with a teacher model $\mathcal{M}^T$ and a few unlabeled images $X = \{x_{1}, x_{2}, \dots, x_{n}\}$ , we firstly train an initial student network $\mathcal{M}_0^S$ with $(X, Y_0)$ , where $Y_0$ contains the labels for the images in $X$ and is obtained by querying the teacher model. We then construct a big pool of synthetic images $\mathcal{P}$ with mixup [49] (eq. (1)) to facilitate the active learning stage. We iterate the following steps until the accuracy of the student network converges. 1) Actively select a subset $\Delta \mathcal{P}_t^s$ of the synthetic images $\mathcal{P}$ with the lowest confidence scores, $C_2(x_i, x_j)$ , as predicted by the current student network so that the resulting subset $\Delta \mathcal{P}_t^s$ contains hard samples for the current student network $\mathcal{M}_{t-1}^S$ . 2) Acquire labels $\Delta \mathcal{Y}_t$ of the selected subset of synthetic images $\Delta \mathcal{P}_t^s$ by querying the teacher model. 3) Train a new student network $\mathcal{M}_t^S$ with all the labeled images thus far, $(\mathcal{P}_t^s, \mathcal{Y}_t)$ . Note that, in Line 6 of Algorithm 1, we only keep one synthetic image for any pair $(x_i, x_j)$ of the original images to reduce redundancy. + +# 4. Experiments + +We design various experiments to test our approach, including both comparison experiments with state-of-the-art knowledge distillation methods and ablation studies. Additionally, we also challenge our approach when the available + +data is out of the distribution of the main task of interest. In practice, across all experiments, we select $\lambda \in \{0.3, 0.7\}$ (with an interval of 0.04) to generate synthetic images to produce more diverse mixup images. + +# 4.1. Comparison Experiments + +Since our main objective is to explore how to train a high-performing student neural network from a blackbox teacher model in a data-efficient manner, it is worth comparing our approach with existing knowledge distillation methods although they were developed for other setups. The comparison can help review how data-efficient our approach is given the blackbox teacher model. + +# 4.1.1 Experiment Setting + +Datasets. We run experiments on MNIST [26], Fashion-MNIST [47], CIFAR-10 [22], and Places365-Standard [50], which are popular benchmark datasets for image classification. The MNIST dataset contains 60K training images and 10K testing images about ten handwritten digits. The image resolution is $28 \times 28$ . Fashion-MNIST is composed of 60K training and 10K testing fashion product images of the size $28 \times 28$ . CIFAR-10 consists of 60K (50K training images and 10K test images) $32 \times 32$ RGB images in 10 classes, with 6K images per class. In addition to evaluating the proposed approach on the above described low-resolution images, we also test our approach on Places365-Standard, which is a challenging dataset for natural scene recognition. It has 1.8M training images and 18,250 validation images in 365 classes. We use the resolution of $256 \times 256$ for Places365-Standard in the following experiments. + +Evaluation Metric. We mainly use the classification accuracy as the evaluation metric. Additionally, we also propose a straightforward metric to measure how much "knowledge" the student network distills from the teacher model. This metric is computed as the ratio between the student network's classification accuracy and the teacher's accuracy, and we call it the distillation success rate. + +Blackbox Teacher Models. For each task except Places365-Standard, we prepare a teacher model by following the training setting provided in [32]. For Places365-Standard, there is no training setting reference for the knowledge distillation research yet, so we use a pre-trained model from the dataset repository [50] as our teacher model. On MNIST and Fashion-MNIST, we use the LeNet-5 architecture [27] as the teacher model and optimize it to achieve $99.29\%$ and $90.80\%$ top-1 accuracies, respectively. On CIFAR-10, we have an AlexNet [24] as the teacher model and train it to obtain $83.07\%$ top-1 accuracy. As shown in Table 1, the above teacher + +![](images/c8ebf0b71a2901911b33fa5bfcbf142aa767e43c39112ac2841f1a61b87a4947.jpg) +Figure 2. Mixup images whose confidence scores (cf. eq. (3)) are the lowest among all candidates in the third iteration. For each mixup image, we show the top three labels and probabilities returned by the blackbox teacher model. + +![](images/5c95da2574be92a7a6bc7cc37bfc3b2d8e25f58cc7c4bff8d8016854b798f59b.jpg) +Figure 3. Different mixup images from the same pair of the original images by varying the mixup coefficient $\lambda$ . We show the top three labels and probabilities predicted by the teacher model for each of them. It is interesting to see how the top-1 label changes from Hockey Arena, to Baseball Field, and to Golf Course. + +models are comparable to the teacher models in [32]: $83.03\%$ vs. $83.07\%$ on CIFAR-10, $99.34\%$ vs. $99.29\%$ on MNIST, and $90.84\%$ vs. $90.87\%$ on Fashion-MNIST. For Places365-Standard, the teacher model is a ResNet-18 [14] and yields $53.68\%$ top-1 accuracy. + +Competing Methods. We identify three existing relevant methods for comparison. + +- One is zero-shot knowledge distillation (ZSKD) [32], which distills a student neural network with zero training example from a whitebox teacher model. It synthesizes data by backpropagating gradients to the input through the whitebox teacher network. +- The second method is few-shot knowledge distillation (FSKD) [21], which augments the training images by generating adversarial examples. It is the most relevant work to ours, but it depends on the computationally expensive adversarial examples [40] and has no active learning scheme to reduce the query cost at all. The original work assumes a whitebox teacher neural network so that it is straightforward to produce the adver + +sarial examples, whereas there exist blackbox attack methods [29, 3]. + +- The third is the vanilla knowledge distillation [16], which accesses the whole training set of the teacher model and is somehow an upper bound of our method. + +# 4.1.2 Quantitative Results + +Table 1 shows the comparison results. For simplicity, we run the active learning stage for only one step (i.e., $T = 1$ in Algorithm 1). Section 4.2 presents the results of running it for multiple steps. + +Accuracy. Our approach significantly outperforms FSKD over all the datasets. On CIFAR-10, MNIST, and Fashion-MNIST, ours yields $41\%$ , $18\%$ , and $14\%$ success rate improvements over FSKD, respectively. On Places365-Standard, whose images are high-resolution about natural scenes, we also outperform FSKD by $14\%$ success rate. Compared to ZSKD, which relies on a whitebox teacher network, our approach also shows higher accuracies and success rates except on MNIST. We were not able to re + +Table 1. Comparison results on Places365-Standard, CIFAR-10, MNIST, and Fashion-MNIST. The "Teacher" column reports the teacher model's accuracy on the test sets, "KD Accuracy" is the student network's test accuracy, "Success" stands for the distillation success rates, "Black/White" indicates whether or not the teacher model is blackbox, "Queries" lists the numbers of queries into the teacher models, and "Unlabeled Data" shows the numbers of original training images used in the experiments. (* results reported in the original paper) + +
Task (Model)TeacherKD AccuracySuccessBlack/WhiteQueriesUnlabeled Data
Places365-Standard (ZSKD) [32]-----0
Places365-Standard (FSKD [21])53.6938.1871.11White480,00080,000
Places365-Standard (KD)53.6949.0190.35Black1,800,0001,800,000
Places365-Standard (Ours)53.6945.7185.14Black480,00080,000
CIFAR-10 (ZSKD) [32]83.03*69.56*83.78White>2,000,0000
CIFAR-10 (FSKD [21])83.0740.5848.85White40,0002,000
CIFAR-10 (KD)83.0780.0196.31Black50,00050,000
CIFAR-10 (Ours)83.0774.6089.87Black40,0002,000
MNIST (ZSKD) [32]99.34*98.77*99.42White>1,200,0000
MNIST (FSKD [21])99.2980.4381.01White24,0002,000
MNIST (KD)99.2999.0599.76Black60,00060,000
MNIST (Ours)99.2998.7499.45Black24,0002,000
Fashion-MNIST(ZSKD) [32]90.84*79.62*87.65White>2,400,0000
Fashion-MNIST (FSKD [21])90.8068.6475.60White48,0002,000
Fashion-MNIST (KD)90.8087.7996.69Black60,00060,000
Fashion-MNIST(Ours)90.8080.9089.10Black48,0002,000
+ +produce ZSKD on Places365-Standard because its images are all high-resolution, making it computationally infeasible to generate a large number of gradient-based inputs. Similarly, the advantage of ours over ZSKD is larger on CIFAR-10 than other MNIST or Fashion-MNIST, probably because the CIFAR-10 images have a higher resolution. In contrast, the computation cost of our active mixup approach does not depend on the input resolution. Overall, the results indicate that active mixup has a higher potential to solve the larger-scale knowledge distillation in a data-efficient manner. + +Queries. Our approach saves orders of queries into the teacher model compared to ZSKD. For example, we only query the blackbox teacher model up to 40K times for CIFAR-10. In contrast, ZSKD requires more than 2M queries and yet yields lower accuracy than ours. The big difference is not surprising because the gradient-based inputs in ZSKD are less natural than or representative of the test images than our mixup images. Besides, ZSKD incurs additional queries into the whitebox teacher model every time it produces an input. + +# 4.1.3 Qualitative Intermediate Results + +We show some mixup images in Figures 2 and 3. These images are selected from the candidate pool constructed using the natural images in the Places365-Standard training set. Figure 2 shows some mixup images with low confidence scores. They can potentially benefit the student + +network more than the other candidate images if we use them to query the teacher model. Figure 3 demonstrates some mixup images synthesized from the same pair of natural images by varying the mixup coefficient $\lambda$ . It is interesting to see that the mix of "Hockey Arena" and "Golf Course" leads to a "Baseball Field" at $\lambda = 0.46$ predicted by the blackbox teacher model. This indicates that our active mixup approach can effectively augment the originally small training set by not only bringing in new synthetic images but also comprehensive coverage of classes. + +# 4.2. Ablation Study + +We select CIFAR-10 and Places365-Standard to study our approach in detail since they represent the small-scale and large-scale settings, respectively. For CIFAR-10, we switch to VGG-16 [39] as the blackbox teacher model, which gives rise to $93.31\%$ top-1 accuracy. + +# 4.2.1 Data-Efficiency and Query-Efficiency + +We investigate how the results of our active mixup approach change as we vary the total number of unlabeled real images (data-efficiency) and the number of synthetic images selected by the active learning scheme (query-efficiency). Here we run only one step of the active learning stage $(T = 1$ in Algorithm 1) to save computation cost. Tables 2 and 3 show the results on CIFAR-10 and Places365-Standard, respectively. Each entry in the tables is a classification accuracy on the test set, and it is obtained by a + +student network which we distill by using the corresponding number of unlabeled real images (Real images) and the number of selected synthetic images (Selected Syn.). + +Table 2. Classification accuracy on CIFAR-10 with different numbers of real images and selected synthetic images. + +
Real images +Selected Syn.0.5K1K2K4K8K16K
044.7256.8768.0976.5983.6186.89
5K66.9771.6777.7681.7685.7687.05
10K73.6077.2781.2783.2786.5688.79
20K77.4481.1884.1986.2988.0789.01
40K82.2884.2586.0687.7189.0090.49
80K85.1886.5387.8988.7189.6190.96
160K86.5688.9489.4290.2690.8791.51
+ +Table 3. Classification accuracy on Places365-Standard with different numbers of real images and selected synthetic images. + +
Real images +Selected Syn.20K40K80K
100K40.7241.9543.52
200K41.1542.8644.77
400K41.9443.4245.71
+ +We can see that the more synthetic images we select by their confidence scores (cf. eq. (3)), the higher-quality the distilled student network is. It indicates that the mixup images can effectively boost the performance of our method. Meanwhile, the higher the number of unlabeled real images we have, the higher the distillation success rate we can achieve. What's more interesting is that, when the number of synthetic images is high (e.g., 160K), the gain is diminishing as we increase the number of real images. Hence, depending on the application scenarios, we have the flexibility to trade-off the real images and synthetic images for achieving a certain distillation success rate. + +We can take a closer look at Tables 2 and 3 to obtain an understanding about the "market values" of the selected synthetic images. In Table 2, 10K selected synthetic images and 8K unlabeled real images yield $86.56\%$ accuracy; 20K synthetic images and 4K real images lead to $86.29\%$ accuracy; and 40K synthetic images with 2K real examples give rise to $86.06\%$ accuracy. The accuracies are about the same. There is a similar trend along the off-diagonal entries in Table 3, implying that if we reduce the number of real images by half, we can complement it by doubling the size of synthetic images to maintain about the same distillation success rate. + +# 4.2.2 Active Mixup vs. Random Search + +We design another experiment to compare active mixup with the random search to understand the effectiveness of + +our active learning scheme. We keep 500 real images for CIFAR-10 and $20\mathrm{K}$ for Places365-Standard. We then use them to construct 100K and 300K synthetic images, respectively. For a fair comparison, we let random search and active mixup share the same sets of natural images. Since our active learning scheme avoids selecting redundant images by using the improved confidence score in eq. (3), we also equip the random search such capability by using a single mixup coefficient of $\lambda = 0.5$ to construct the synthetic images. This guarantees that, like our approach, no two synthetic images selected by the random search are from the same pair of real images. + +![](images/2b69856e3c70f15dbc88e30d1df336682902a72f645b2c223f44c02c4bcca2c4.jpg) +Figure 4. Test accuracy of student networks vs. number of queries into the blackbox teacher model on CIFAR-10 (left) and Places365-Standard (right). We use 500 and $20\mathrm{K}$ natural images for the two datasets, respectively. The plot for CIFAR-10 starts from first active learning stage $(t = 1$ in Algorithm 1) and the one for Places365 starts from the initial student network training by natural images. The initial student network for CIFAR-10 trained by using natural images only yields $43.67\%$ accuracy. + +![](images/30afa65399a9635ae0308b5c797a4b8a5a5fd6a5c54b5f12759ef600c4ab5f7d.jpg) + +Figure 4 shows the comparison results of our active mixup and the random search. On CIFAR-10, we select $10\mathrm{K}$ synthetic images every time and run the active learning stage for 10 steps ( $T = 10$ in Algorithm 1). On Places365-Standard, we run it for six steps and choose $50\mathrm{K}$ synthetic images per step. We can see that active mixup significantly outperforms random search over the whole course of knowledge distillation, verifying its effectiveness on improving the query-efficiency. More concretely, $80\mathrm{K}$ actively selected synthetic images yield $86.76\%$ accuracy, which is about the same as what $160\mathrm{K}$ randomly selected synthetic images can achieve on CIFAR-10. Similarly, $40\mathrm{K}$ synthetic images by active mixup lead to $84.2\%$ accuracy, on par with the $85.18\%$ accuracy by $80\mathrm{K}$ randomly chosen synthetic images. + +# 4.2.3 Active Mixup vs. Vanilla Active Learning + +Our active learning scheme (eq. (3)) improves upon the vanilla score-based active learning (eq. (2)) by selecting only one synthetic image at most from any pair of real images. This change is necessary because two nearly dupi + +cated synthetic images could both have very low scores according to eq. (2). + +To quantitatively compare the two active learning methods, we run another experiment by replacing our active learning scheme with the vanilla version. The candidate pool is the same as ours, i.e., mixup images generated by varying $\lambda \in \{0.3, 0.7\}$ with an interval of 0.04. Figure 4 shows the results on both CIFAR-10 and Place365-Standard. + +Generally, the vanilla active learning yields lower accuracy than our active mixup and the random search. This shows that the vanilla score-based active learning even fails to improve upon random search because it selects nearly duplicated synthetic images to query the teacher model. In contrast, our active mixup consistently performs the better than the vanilla active learning and random search. The prominent gap justifies that the constraint by $C_2$ in eq. (3) is crucial in our approach. + +# 4.3. Active Mixup with Out-of-Domain Data for Blackbox Knowledge Distillation + +In real-world applications, it may be hard to collect real training images for some tasks, e.g., due to privacy concerns. Under such scenarios, we have to use out-of-domain data to distill the student neural network. Hence, we further challenge our approach by revealing some images that are out of the domain of the training images of the blackbox teacher model. + +We conduct this experiment on CIFAR-10 by providing our approach some training images in CIFAR-100 [23]. To reduce information leak, we exclude the images that belong to the CIFAR-10 classes and keep 2K images to construct the candidate pool. Equipped with these synthetic images, we run active mixup to distill student neural networks from a blackbox teacher model for CIFAR-10. The teacher model is VGG-16, which yields $93.31\%$ accuracy on the CIFAR-10 test set. + +Table 4. CIFAR-10 classification accuracy by the student neural networks which are distilled by using out-of-domain data. + +
Selected Syn.10K20K40K80K
Accuracy (%)64.1071.3977.8983.03
+ +Table 4 shows the results of different numbers of selected synthetic images. We still run only one iteration of the active learning to save computation costs. The best distillation performance is $83\%$ top-1 accuracy and success rate is $88.9\%$ . Comparing the result to Table 2, especially the entry $(87.89\%)$ of 80K selected synthetic images and 2K real images, we can see that our approach leads to about the same performance by using the out-of-domain data as the in-domain data. + +Table 5. CIFAR-10 classification accuracy by the student neural networks which are distilled by using out-of-domain data. We set the number of selected synthetic images to 40K and vary the numbers of real images. + +
Real images500100015002000
Accuracy (%)70.2174.6075.5477.89
+ +To better understand how different factors influence the distillation performance, we also decouple the number of available real images from the number of selected synthetic images in Table 5. We fix the number of selected synthetic images to $40\mathrm{K}$ and vary the numbers of real images. Not surprisingly, the more real images there are, the higher distillation accuracy the active mixup achieves. Furthermore, the number of synthetic images still plays a prominent role in distillation accuracy, according to Table 4. Without the original training data, mixup augmentation is probably more critical to enhancing the distillation performance than otherwise. + +# 5. Discussion and Conclusion + +In this paper, we formalize a novel problem, knowledge distillation from a blackbox teacher model in a data-efficient manner, which we think is more realistic than previous knowledge distillation setups. There are two key challenges to this problem. One is that the available examples are insufficient to represent the vast variation in the original training set of the teacher model. The other is that the blackbox teacher model often implies that it is financially and computationally expensive to query. + +To deal with the two challenges, we propose an approach combining mixup and active learning. Although neither of them is new by itself, combining them is probably the most organic solution to our problem setup for the following reasons. First of all, we would like to augment the few available examples. Unlike conventional data augmentations (e.g., cropping, adding noise), which only probe the regions around the available examples, mixup provides a continuous interpolation between any pairwise examples. As a result, mixup allows the student model to probe diverse regions of the input space. We then employ active learning to reduce the query transactions to the teacher model. Extensive experiments verify the effectiveness of our approach to the data-efficient blackbox knowledge distillation. + +# 6. Acknowledgements + +This work was supported in part by NSF-1741431 and NSF-1836881. + +# References + +[1] David Berthelot, Nicholas Carlini, Ian Goodfellow, Nicolas Papernot, Avital Oliver, and Colin Raffel. Mixmatch: A holistic approach to semi-supervised learning. arXiv preprint arXiv:1905.02249, 2019. 2 +[2] Wieland Brendel, Jonas Rauber, and Matthias Bethge. Decision-based adversarial attacks: Reliable attacks against black-box machine learning models. arXiv preprint arXiv:1712.04248, 2017. 2 +[3] Pin-Yu Chen, Huan Zhang, Yash Sharma, Jinfeng Yi, and Cho-Jui Hsieh. Zoo: Zeroth order optimization based blackbox attacks to deep neural networks without training substitute models. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, pages 15-26. ACM, 2017. 2, 5 +[4] Jang Hyun Cho and Bharath Hariharan. On the efficacy of knowledge distillation. In Proceedings of the IEEE International Conference on Computer Vision, pages 4794-4802, 2019. 2 +[5] Ekin D Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V Le. Autoaugment: Learning augmentation policies from data. arXiv preprint arXiv:1805.09501, 2018. 3 +[6] Jiajun Deng, Yingwei Pan, Ting Yao, Wengang Zhou, Houqiang Li, and Tao Mei. Relation distillation networks for video object detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 7023-7032, 2019. 2 +[7] Melanie Ducoffe and Frederic Precioso. Adversarial active learning for deep networks: a margin based approach. arXiv preprint arXiv:1802.09841, 2018. 3 +[8] 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. 2 +[9] Yarin Gal, Riashat Islam, and Zoubin Ghahramani. Deep bayesian active learning with image data. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 1183-1192. JMLR.org, 2017. 3 +[10] Chuang Gan, Boqing Gong, Kun Liu, Hao Su, and Leonidas J Guibas. Geometry guided convolutional neural networks for self-supervised video representation learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5589-5597, 2018. 2 +[11] Chuang Gan, Hang Zhao, Peihao Chen, David Cox, and Antonio Torralba. Self-supervised moving vehicle tracking with stereo sound. In Proceedings of the IEEE International Conference on Computer Vision, pages 7053-7062, 2019. 2 +[12] Daniel Gissin and Shai Shalev-Shwartz. Discriminative active learning. arXiv preprint arXiv:1907.06347, 2019. 3 +[13] Hongyu Guo, Yongyi Mao, and Richong Zhang. Mixup as locally linear out-of-manifold regularization. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 3714-3722, 2019. 2 +[14] 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. 5 +[15] Byeongho Heo, Jeesoo Kim, Sangwoo Yun, Hyojin Park, No-jun Kwak, and Jin Young Choi. A comprehensive overhaul of feature distillation. arXiv preprint arXiv:1904.01866, 2019. 2 +[16] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. 2, 5 +[17] Yuenan Hou, Zheng Ma, Chunxiao Liu, and Chen Change Loy. Learning lightweight lane detection cnns by self attention distillation. In Proceedings of the IEEE International Conference on Computer Vision, pages 1013-1021, 2019. 2 +[18] Andrew Ilyas, Logan Engstrom, Anish Athalye, and Jessy Lin. Black-box adversarial attacks with limited queries and information. arXiv preprint arXiv:1804.08598, 2018. 2 +[19] Hiroshi Inoue. Data augmentation by pairing samples for images classification. arXiv preprint arXiv:1801.02929, 2018.3 +[20] Xiao Jin, Baoyun Peng, Yichao Wu, Yu Liu, Jiaheng Liu, Ding Liang, Junjie Yan, and Xiaolin Hu. Knowledge distillation via route constrained optimization. arXiv preprint arXiv:1904.09149, 2019. 2 +[21] Akisato Kimura, Zoubin Ghahramani, Koh Takeuchi, Tomoharu Iwata, and Naonori Ueda. Few-shot learning of neural networks from scratch by pseudo example optimization. arXiv preprint arXiv:1802.03039, 2018. 2, 5, 6 +[22] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images, 2009. 4 +[23] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. Technical report, Cite-seer, 2009. 8 +[24] 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 +[25] Jogendra Nath Kundu, Nishank Lakkakula, and R Venkatesh Babu. Um-adapt: Unsupervised multi-task adaptation using adversarial cross-task distillation. In Proceedings of the IEEE International Conference on Computer Vision, pages 1436-1445, 2019. 2 +[26] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278-2324, 1998. 4 +[27] Yann LeCun et al. Lenet-5, convolutional neural networks. URL: http://yann.lecun.com/exdb/lenet, 20:5, 2015. 4 +[28] David D Lewis and William A Gale. A sequential algorithm for training text classifiers. In SIGIR94, pages 3-12. Springer, 1994. 1, 2, 3 +[29] Yandong Li, Lijun Li, Liqiang Wang, Tong Zhang, and Boqing Gong. Nattack: Learning the distributions of adversarial examples for an improved black-box attack on deep neural networks. arXiv preprint arXiv:1905.00441, 2019. 2, 5 +[30] Raphael Gontijo Lopes, Stefano Fenu, and Thad Starner. Data-free knowledge distillation for deep neural networks. arXiv preprint arXiv:1710.07535, 2017. 2 + +[31] Ravi Teja Mullapudi, Steven Chen, Keyi Zhang, Deva Ramanan, and Kayvon Fatahalian. Online model distillation for efficient video inference. In Proceedings of the IEEE International Conference on Computer Vision, pages 3573-3582, 2019. 2 +[32] Gaurav Kumar Nayak, Konda Reddy Mopuri, Vaisakh Shaj, Venkatesh Babu Radhakrishnan, and Anirban Chakraborty. Zero-shot knowledge distillation in deep networks. In International Conference on Machine Learning, pages 4743-4751, 2019. 2, 4, 5, 6 +[33] Xuecheng Nie, Yuncheng Li, Linjie Luo, Ning Zhang, and Jiashi Feng. Dynamic kernel distillation for efficient pose estimation in videos. In Proceedings of the IEEE International Conference on Computer Vision, pages 6942-6950, 2019. 2 +[34] Baoyun Peng, Xiao Jin, Jiaheng Liu, Dongsheng Li, Yichao Wu, Yu Liu, Shunfeng Zhou, and Zhaoning Zhang. Correlation congruence for knowledge distillation. In Proceedings of the IEEE International Conference on Computer Vision, pages 5007-5016, 2019. 2 +[35] Mary Phuong and Christoph H Lampert. Distillation-based training for multi-exit architectures. In Proceedings of the IEEE International Conference on Computer Vision, pages 1355-1364, 2019. 2 +[36] Tim Salimans, Jonathan Ho, Xi Chen, and Ilya Sutskever. Evolution strategies as a scalable alternative to reinforcement learning. arXiv preprint arXiv:1703.03864, 2017. 2 +[37] Muhamad Risqi U Saputra, Pedro PB de Gusmao, Yasin Almalioglu, Andrew Markham, and Niki Trigoni. Distilling knowledge from a deep pose regressor network. In Proceedings of the IEEE International Conference on Computer Vision, pages 263-272, 2019. 2 +[38] Burr Settles, Mark Craven, and Soumya Ray. Multiple-instance active learning. In Advances in neural information processing systems, pages 1289-1296, 2008. 3 +[39] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 6 +[40] 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. 5 +[41] Mohammad Tavakolian, Hamed R Tavakoli, and Abdenour Hadid. Awsd: Adaptive weighted spatiotemporal distillation for video representation. In Proceedings of the IEEE International Conference on Computer Vision, pages 8020-8029, 2019. 2 +[42] Yuji Tokozume, Yoshitaka Ushiku, and Tatsuya Harada. Learning from between-class examples for deep sound recognition. arXiv preprint arXiv:1711.10282, 2017. 3 +[43] Yuji Tokozume, Yoshitaka Ushiku, and Tatsuya Harada. Between-class learning for image classification. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 3 +[44] Simon Tong and Daphne Koller. Support vector machine active learning with applications to text classification. Journal of machine learning research, 2(Nov):45-66, 2001. 2 + +[45] Frederick Tung and Greg Mori. Similarity-preserving knowledge distillation. In Proceedings of the IEEE International Conference on Computer Vision, pages 1365-1374, 2019. 2 +[46] Chaoyang Wang, Chen Kong, and Simon Lucey. Distill knowledge from nrsfm for weakly supervised 3d pose learning. In Proceedings of the IEEE International Conference on Computer Vision, pages 743-752, 2019. 2 +[47] Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017. 4 +[48] Yazhou Yang and Marco Loog. A benchmark and comparison of active learning for logistic regression. Pattern Recognition, 83:401-415, 2018. 3 +[49] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017. 1, 2, 3, 4 +[50] Bolei Zhou, Agata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 million image database for scene recognition. IEEE transactions on pattern analysis and machine intelligence, 2017. 4 \ No newline at end of file diff --git a/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/images.zip b/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..d52b269796fae0f55adc2434587fb37eebafae09 --- /dev/null +++ b/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87fd062494a0472ab8721a40f2d243b8813ede0042c43656a647661d6d9426e6 +size 484545 diff --git a/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/layout.json b/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6a54e6912a506978b8c8d54591023f2b925557e8 --- /dev/null +++ b/neuralnetworksaremoreproductiveteachersthanhumanratersactivemixupfordataefficientknowledgedistillationfromablackboxmodel/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:372f84f45f02f3bcf22ae7b40d87c488fdec08c4179d67f686eeed0e9b48b262 +size 394292 diff --git a/neuralpointcloudrenderingviamultiplaneprojection/d4f63e73-d18c-4114-bf8b-5e16f36f84a8_content_list.json b/neuralpointcloudrenderingviamultiplaneprojection/d4f63e73-d18c-4114-bf8b-5e16f36f84a8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..651fd1aa8492e49d1aae325386950d16d3f19ab6 --- /dev/null +++ b/neuralpointcloudrenderingviamultiplaneprojection/d4f63e73-d18c-4114-bf8b-5e16f36f84a8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9af9a506a10273e2361686d50eaf5853adff7ab0bae8f8d9f2ca03288991223a +size 70843 diff --git a/neuralpointcloudrenderingviamultiplaneprojection/d4f63e73-d18c-4114-bf8b-5e16f36f84a8_model.json b/neuralpointcloudrenderingviamultiplaneprojection/d4f63e73-d18c-4114-bf8b-5e16f36f84a8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..cf939807c2bf70156610052deeba6eef8080bf4c --- /dev/null +++ b/neuralpointcloudrenderingviamultiplaneprojection/d4f63e73-d18c-4114-bf8b-5e16f36f84a8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6361a534629d6606dfc57df5ab21807219490f725c5f003b679fde17e6c6a5dd +size 88887 diff --git a/neuralpointcloudrenderingviamultiplaneprojection/d4f63e73-d18c-4114-bf8b-5e16f36f84a8_origin.pdf b/neuralpointcloudrenderingviamultiplaneprojection/d4f63e73-d18c-4114-bf8b-5e16f36f84a8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a1aaf5694daaa1bb158cf258b92665dff1f7d3d5 --- /dev/null +++ b/neuralpointcloudrenderingviamultiplaneprojection/d4f63e73-d18c-4114-bf8b-5e16f36f84a8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28846b3327c3a9de78dff50c81505f1518c8803f6968167a8df9605bed208309 +size 652749 diff --git a/neuralpointcloudrenderingviamultiplaneprojection/full.md b/neuralpointcloudrenderingviamultiplaneprojection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ee5548eb6bdd488a3827d98f0ed3cbdaecf0adeb --- /dev/null +++ b/neuralpointcloudrenderingviamultiplaneprojection/full.md @@ -0,0 +1,326 @@ +# Neural Point Cloud Rendering via Multi-Plane Projection + +Peng Dai $^{1*}$ + +Yinda Zhang $^{2*}$ + +Zhuwen Li $^{3*}$ + +Shuaicheng Liu $^{1\dagger}$ + +Bing Zeng1 + +1University of Electronic Science and Technology of China + +2Google Research + +$^{3}$ Nuro Inc + +# Abstract + +We present a new deep point cloud rendering pipeline through multi-plane projections. The input to the network is the raw point cloud of a scene and the output are image or image sequences from a novel view or along a novel camera trajectory. Unlike previous approaches that directly project features from 3D points onto 2D image domain, we propose to project these features into a layered volume of camera frustum. In this way, the visibility of 3D points can be automatically learnt by the network, such that ghosting effects due to false visibility check as well as occlusions caused by noise interferences are both avoided successfully. Next, the 3D feature volume is fed into a 3D CNN to produce multiple planes of images w.r.t. the space division in the depth directions. The multi-plane images are then blended based on learned weights to produce the final rendering results. Experiments show that our network produces more stable renderings compared to previous methods, especially near the object boundaries. Moreover, our pipeline is robust to noisy and relatively sparse point cloud for a variety of challenging scenes. + +# 1. Introduction + +Rendering is on high demand for many graphics and vision applications. To produce high quality rendering, various physical understanding of the scene has to be established, such as scene geometry [9], scene textures [3], materials [44], illuminations [47], all of which require tremendous efforts to obtain. After the construction of rendering essentials, a photo-realistic view of the modeled scene is generated through expensive rendering process such as ray tracing [13] and radiance simulation [45]. + +Image based rendering (IBR) techniques [16, 29, 32], alternatively, try to render a novel view based on the given images and their approximated scene geometries through image warping [30] and image inpainting [23]. The scene + +![](images/c07c0d62222d93acdba94dea3d5e590b1a44708c7e11e285df3a813f2fe3b68c.jpg) +Figure 1. Our method synthesize images in novel view by using neural point cloud rendering. + +structure approximation often adopts simplified forms such that the rendering process becomes relatively cheaper than physically based renderings. However, IBR requires the novel view to stay close to the original views in order to avoid rendering artifacts. Instead of purely based on images, point-based graphics(PBG) [28, 18, 17] simplify the scene structures by replacing the surface mesh with point cloud or surfels [35], such that the heavy geometry constructions can be avoid. + +On the other hand, many deep learning approaches show strong capability in inpainting [31], refining [36], and even constructing images from only a few indications [34, 2]. Such capabilities can be considered as a complement to IBR, namely neural IBR [20], to overcome the challenging during image synthesize. For examples, the empty regions caused by view change can be compensated through high quality inpainting [48]. + +Recently, combining advantages of simplified geometry representation and neural capabilities become a new trend, yielding neural rendering methods [4, 7, 20, 20, 33]. It directly learns to render end-to-end, which bypass complicated intermediate representations. Previous work used mostly 3D volume as representation [39]. However, the memory complexity of 3D volume is cubic, and thus these + +approaches are not scalable and usually only work for small objects. Recently, there is a trend to build neural rendering pipeline from 3D point cloud, which is more scalable for relatively larger scenes. However, 3D point cloud often contains strong noise due to both depth measurements [46] and camera calibrations [49], which interference the visibility check when projected onto 2D image plane and results in jittering artifacts if a series of images are generated along a given 3D camera trajectory. On the other hand, this type of methods often require a lot of points for a reliable z-buffer check as well as the requirement of full coverage of all camera viewpoints. Even though the memory usage is linear with the number of points, the huge number still cause unaffordable memory and storage. Aliev et al. [1] proposed a neural point-based graphics approach that directly project 3D geometry onto the 2D plane for neural descriptor encoding, which not only ignores the visibility check but also suffers from noise interferences, resulting ghosting artifacts as well as strong temporal jitters. + +In this paper, we propose a novel deep point cloud rendering pipeline through multi-plane projection, which is more robust to depth noise and can work with relatively sparse point cloud. In particular, instead of directly projecting features from 3D points onto 2D image domain using perspective geometry [19], we propose to project these features into a layered volume in the camera frustum. By doing so, all the features from points in the camera's field-of-view are maintained, thus useful features are not occluded accidentally by other points due to noisy interferences. The 3D feature volume are then fed into a 3D CNN to produce multiple planes of images, which corresponds to different space depths. The layered images are blended subsequently according to learned weights. In this way, the network can fix the point cloud errors in the 3D space rather than work on projected 2D images where visibility has already lost. In addition, the network can pick information accurately from the projected full feature volume to facilitate the rendering. + +Extensive experiments evaluated on the popular dataset, such as ScanNet [8] and Matterport 3D [6], show that our model produces more temporal coherent rendering results comparing to previous methods, especially near the object boundary. Moreover, the system can learn effectively from more points, but still performs reasonably well given relatively sparse point cloud. + +To recap, we propose a deep learning based method to render images from point cloud. Our main contributions are summarized as: + +- 3D points are projected to a layered volume such that occlusions and noises can be handled appropriately. +- Not only the rendered single view is superior in terms of image quality, but also the rendered image sequences are temporally more stable. + +- Our system works reasonably well with respect to relatively sparse point cloud. + +# 2. Related Work + +# 2.1. Model-based rendering + +Model based rendering requires the construction of 3D models, such as multi-view structure-from-motion for point cloud recovery [19], surface reconstruction and meshing [43]. When performance is preferred, ray tracing [13] is used to simulate the transmission of light in the space, such that can better interact with the environment, e.g., geometry [40], material [10], BRDF [14], lighting [22], and produce more realistic rendering. However, each estimation step is prone to errors, which leads to the render artifacts. Moreover, such methods not only require a lot of knowledge of the scene, but also are notoriously slow. + +# 2.2. Image-based rendering + +Image based rendering(IBR) [16, 29, 32, 38] aims to produce a novel view from given images through warping [30] and blending [10], which is a computationally efficient approach compared with classical rendering pipeline. Multiple view geometry [19] is applied for camera parameter estimation or some variant that bypasses the 3D reconstruction [40], such as adopting epipolar constraints [15]. Recently, deep learning has been proved to be more effective in replacing the warping and blending of traditional approaches in the IBR pipeline [12, 20]. However, the quality of rendered novel view still depends heavily on the distribution of existing views, sparse samples or large viewpoint drift would produce unsatisfactory results. Adopting light field cameras is one solution to alleviate such problems [26]. + +# 2.3. Deep image synthesis + +Deep methods for 2D image synthesize has achieved very promising results, such as autoencoders [21], PixelCNN [42] and image-to-image translation [24]. The most exciting results are produced based on generative adversarial networks [51, 34]. Most of the generators adopt encoder-decode architecture with skip connections to facilitate feature propagation [37]. However, these approaches cannot be directly applied to the rendering task, as the underlying 3D structures cannot be exploited for 2D image translations. + +# 2.4. Neural rendering + +Recently, deep learning are used to renovating the rendering [41]. Nvidia [5] uses deep learning to denoise a relatively fast low-quality rendering. More fundamentally, many successes have been achieved by neural rendering that directly learn representation from input and produce desired output, such as DeepVoxel [39] and Neural Point Based Graphics(NPG) [1]. Most of them rely on a 3D volume + +![](images/211fb672bfe2826fa8870ca75f0a962e9fb28384217c42152ff3789c63ba7a98.jpg) +Figure 2. Overview of our proposed method. Our method is divided into two parts, the multi-plane based voxelization (left) and multi-plane rendering(right). For the first part, point clouds are re-projected into camera coordinate system to form frustum region and voxelization plus aggregation operations are adopted to generate a multi-plane 3D representation, which will be concatenated with normalized view direction and sent to render network. For the second part, the concatenated input is feed into a 3D neural render network to predict the product with 4 channels (i.e. RGB + blend weight) and the final output is generated by blending all planes. The training process is under the supervision of perceptual loss, and both network parameters and point clouds features are optimized according to the gradient. + +intermediate representation. The DeepVoxel cannot render large scenes, such as room environment. The most related work is NPG [1]; it also proposes to render images from point cloud, by projecting learned features from points to the 2D image plane according to perspective geometry, and train a 2D CNN to produce the color image. The method learns complete and view-dependent appearance, however, it suffers from visibility verification problem due to directly 3D projection, and is also sensitive to point cloud noises. We project 3D points to a layered 3D volume to overcome such problems. + +# 3. Method + +# 3.1. Overview + +Our deep learning framework receives a point cloud representation of a scene and generates photo-realistic images from an arbitrary camera viewpoint. The overview of the framework is illustrated in Fig. 2. The whole framework consists of two modules: multi-plane based voxelization and multi-plane rendering. The multi-plane based voxelization module divides the 3D space of the camera view frustum into voxels w.r.t. image dimensions and a pre-defined number of depth planes. The voxels then aggregates features of points inside it with geometric rules. The 3D feature volume is then fed into the multi-plane rendering module, which is a 3D CNN, to generate one color image plus a blending weight per plane on the depth dimension of the volume. The final output is a weighted blending of multiplane images. It is worth noting that the point cloud feature representation and the network are jointly optimized in an end-to-end fashion. The remaining part of this section describes details of these two modules. + +# 3.2. Learnable point cloud features + +Our input is a 3D point cloud representation of the scene. To be sufficient for rendering, each 3D point should contain both position and appearance feature. The position feature is obtained from 3D reconstruction, and one simple way to collect appearance feature is to keep the RGB value from the corresponding image pixel. However, one point may show different RGB intensities when observed from different views due to view-depend effects (e.g., reflection and highlight). To solve this problem, we learn a 8-dimensional vector as the appearance feature jointly with the network parameters. To this end, we update this feature by propagating gradient to the input [1, 41], such that the appearance feature can be automatically learned from data. + +Since the object appearance is often view-depend, we further take view direction between camera position and point clouds in 3D space into consideration. Thus, we concatenate the normalized view direction of the point as an additional feature vector to each point, following [1]. Note that this feature is not trainable as the point position. + +# 3.3. Multi-plane based voxelization + +Layered voxels on camera frustum. The image dimension is denoted as $H \times W$ . With a known camera projection matrix, each pixel is lifted to 3D space to form a frustum with near and far planes specified by the minimum and maximum depth of the projected point cloud. The frustum is further divided into $P$ small ones along the $z$ -axis uniformly as shown in Fig. 3 (a). As a result, we will obtain $P \times H \times W$ frustum voxels. + +Feature aggregation The next step is to aggregate feature from the point cloud into the camera frustum volume. Since one frustum voxel may contain multiple 3D points, we need + +![](images/4aa1ee3f3518a2d87ae3e39c8888ae9629e612aafcfad14b1458c8fcb4d37426.jpg) +Figure 3. 3D space voxelization and aggregation. (a) Multi-plane voxelization. Point clouds under camera view are restricted into a frustum region specified by the minimum and maximum depth planes, and such region can be uniformly split into small frustum voxels according to image size $(H,W)$ and predefined number of planes $P$ , where $l$ indicates length of frustum. (b) Aggregation. To illustrate, we take one frustum voxel for example. In oredr to aggregate points in one frustum voxel, we calculate two kinds of distance. $D_{1(p,h,w)}^{i}$ is the distance between points and pixel center in parallel direction and $D_{2(p,h,w)}^{i}$ calculates depth difference between points and minimum depth value in this voxel in vertical direction. Further, we can define the blend weight $w_{(p,h,w)}^{i}$ of each point on the basis of these two distance. Finally, the blend weights are applied to aggregate multiple points into a new point. + +an efficient and effective way to aggregate features. Aliev et al. [1] propose to take the feature from the point closest to camera along the ray, however, this is not robust against geometry error and may result in temporal jitters or accidentally wrong occlusions. In contrast, we maintain all the features available in the camera frustum thanks to the 3D volume. To achieve sub-voxel performance, we vote each point feature to nearby voxels according to the distance to the voxel center. Specifically, the feature in a voxel with coordinate in volume $(p,h,w)$ is calculated as: + +$$ +F _ {(p, h, w)} = \frac {\sum_ {i} w _ {(p , h , w)} ^ {i} \times F _ {(p , h , w)} ^ {i}}{\sum_ {i} w _ {(p , h , w)} ^ {i}}, \tag {1} +$$ + +$$ +w _ {(p, h, w)} ^ {i} = \left(1 - D _ {1 (p, h, w)} ^ {i}\right) ^ {a} \times \left(\frac {1}{1 + D _ {2 (p , h , w)} ^ {i}}\right) ^ {b}, \quad (2) +$$ + +where $F^i$ is the feature of the $i$ th point in a voxel, and $w_{(p,h,w)}^i$ is the blending weight of point $i$ to voxel $(p,h,w)$ . $D_1 \in (0,1/\sqrt{2})$ is the distance between the point projection on image to the corresponding pixel center of voxel $(p,h,w)$ , and $D_2 \in (0,l)$ is the depth difference between point and minimum depth point in this voxel. Parameters $a$ and $b$ control the blending weight on direction parallel and vertical to the image plane. When $b \to +\infty$ , it turns into Aliev et al. [1] where a point is picked via z-buffer. The mo + +tivation of Eq. 2 is to assign larger weights to points closer to camera or pixel center. We found it work well empirically. Other formulations reflecting similar property could also work properly. + +# 3.4. Multi-plane rendering + +We adopt the U-Net-like [37] 3D convolutional neural network as the back-bone network. The 3D convolution effectively exploits information from neighboring pixel and depth, which naturally handle projection error caused by geometry noise. In addition to that we also adopt dilated convolution in the last layer of encoder (left part of U-Net) to capture more image context. As the output of our network, we predict multi-plane RGB images plus their blending weights. The final output image $I$ is obtained by + +$$ +I = \sum_ {p} I _ {p} \cdot \alpha_ {p}, \tag {3} +$$ + +where $p$ indicates a plane, and $I_{p}$ and $\alpha_{p}$ are the corresponding plane predictions. Please refer to supplementary material for more details of the network architecture. + +# 3.5. Loss function + +To measure the difference between network prediction and the ground truth image, we use perceptual loss [7, 25], which we found practically works better than other common candidates, e.g. $\ell_1$ , $\ell_2$ , SSIM. In particular, we use feature vector from 'input', 'conv1-2', 'conv2-2', 'conv3-2', 'conv4-2', 'conv5-2' layers from a VGG-19 pre-trained on ImageNet dataset [11]. The perceptual loss is defined as a weighted sum of the $\ell_1$ loss on each feature maps. Specifically, the loss function is defined as follows: + +$$ +L \left(P _ {f}, \theta\right) = \sum_ {l} \lambda_ {l} \| \Phi_ {l} \left(I _ {g}\right) - \Phi_ {l} \left(f \left(P _ {f}; \theta\right)\right) \| _ {1}, \tag {4} +$$ + +where $P_{f}$ represents point features, $I_{g}$ is ground-truth image, $\theta$ is network parameters, $f$ is our point cloud renderer, $\phi_{l}$ is a set of VGG-19 layers and $\lambda_{l}$ is weight used to balance different layers. + +# 3.6. Feature optimization. + +Inspired by Thies et al. [41] and Aliev et al. [1], the appearance feature on each point can be updated via backpropagation. Note that the aggregated voxel features are a weighted combination of point features, and thus gradient on the point feature using the chain rule is $-l_{r} \times w_{(p,h,w)}^{i} \times g_{(p,h,w)}$ . where $g_{(p,h,w)}$ is gradient derived from the loss function and $l_{r}$ indicates the learning rate. + +# 4. Experiments + +We evaluate our framework on various datasets and show qualitative and quantitative results. Particularly, we test the system robustness against noise in data that heavily degrades performance of previous methods. + +# 4.1. Datasets. + +ScanNet [8] contains RGBD scans of indoor environments. We follow the training and testing split of Aliev et al. [1]. In particular, one frame is picked from every 100 frames for testing (e.g., frame 100, 200, 300...). The rest of frames are used for training. To avoid including frames that are too similar to the training set, the neighbors (with in 20 frames) of every testing frame are removed from training. Regarding the scene point cloud, we randomly lift $15\%$ pixels from the depth map into the 3D space to create a point cloud, which contains around 50 million points per scene. We then simplify it using volumetric sampling, leading to 8.9 million points per scene in average. + +Matterport 3D [6] contains RGBD panoramas captured at multiple locations in indoor scenes. Each panorama is composed of 18 regular RGBD images viewing toward different directions. For each scene, we randomly pick 1/100 of the views for testing and leave the others for training. Note that overall this dataset is more challenging due to the sparse point cloud and large variation of camera viewpoints. + +# 4.2. Data preparation and training details + +For each scene, our network is trained for 21 epochs over 1,925 images on average, using Adam optimizer [27]. During training, $l_{r}$ is initialized as 0.01, which will be decreased every 7 epochs, and the learning rate decreasing follows $0.01 \rightarrow 0.005 \rightarrow 0.001$ . $(P, H, W)$ are set to (32,480,640) for ScanNet dataset and (32,512,640) for Matterport 3D dataset according to the image resolution provided by the datasets. Point feature dimension is set as 11 and initialized as 0.5 (5 dimensions) + RGB (3 dimensions) + viewpoint direction (3 dimensions), note that only the first 8 dimensions will be updated. The hyperparameters $a, b$ in Eq. 2 are set to 1, and $\lambda_{l}$ in Eq. 4 following Chen et al. [7]. The training process is accomplished on one GeForce 1080 Ti, which takes on average 41.5 hours per scene. + +# 4.3. Rendering results + +We first compare our method to two competitors, Neural Point-based Graphic(NPG) [1] and Pix2Pix [24]. Specifically, NPG is a deep rendering approach that project 3D point features onto 2D image planes via a z-buffer and run 2D convolutions for neural rendering. They adopt U-Net like structure with gate convolution [48]. Since the authors of [1] did not release the code, we implemented their method and achieved similar performance on the same testing cases. The Pix2Pix is an image to image translation framework [24]. The network takes projected colored point cloud and is trained to produce the ground truth. Compared to NPG, this baseline does not save a feature per point. + +![](images/65181e04ff402726cefbb714b00fc6bacd9c5d9a8670ae5eda873f54c833fd5c.jpg) +(a) Direct Render + +![](images/15908afc80678f813167d667415cf7767d925002ff7890e1421c23b20dceee94.jpg) +(b) Our results + +![](images/326e56a3d221e46685483521ee55f6126452172714b65a629457aa5365b40651.jpg) + +Figure 4. Advantage of neural descriptor. (a) displays results generated by directly rendering. (b) Ours results using neural descriptor. Without the assistant of neural descriptor, the final point clouds rendering results are blurry. Please zoom in for details. + +# 4.3.1 Quantitative comparisons + +We use standard metric, Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index (SSIM), to measure the rendering quality. Since these two metrics may not necessarily reflect the visual quality, we also adopt a human perception metric, Learned Perceptual Image Patch Similarity (LPIPS) [50]. Table 1 reports the comparison on two datasets. Our method is significantly better than Pix2Pix on both dataset with a large improvement margin on all the metrics. When compared to NPG, our method outperforms on Matterport3D, and is comparable on ScanNet, where NPG achieves better PSNR and SSIM, while our LPIPS is higher. Some examples from both datasets are shown in Fig 5. Note that it has been mentioned in their own paper that NPG is optimized for pixel-wise color accuracy at the cost of sacrificing the temporal consistency. In contrast, our result is free such jittering, especially obvious at depth boundaries. Please refer to the supplementary video for visual comparisons. + +Direct render To verify if learning point cloud feature is necessary. We train our model taking only the point RGB value as the feature, which is referred to as 'direct render'. The results are displayed in Fig. 4. As seen, the direct render without point feature is more blurry (e.g., the sofa) and lack of specular components (e.g., the ball). This indicates that point feature helps to encode material related information and support view-dependent components. We also report the quantitative numbers in Table 1 as 'Ours+direct render'. It is observed that ours with learnt features outperforms the direct render approach on all metrics. + +
DatasetsScanNet [8]Matterport 3D [6]
MethodsPSNR↑SSIM↑LPIPS↓PSNR↑SSIM↑LPIPS↓
pix2pix [24]19.2470.7310.42914.9640.5300.675
Neural point based graphic [1]22.9110.8400.24517.9310.6220.597
Ours + direct render22.2590.8180.29017.8330.6010.610
Ours22.8130.8350.23418.090.6490.534
+ +Table 1. PSNR, SSIM and LPIPS values on ScanNet and Matterport 3D datasets. + +![](images/8d1825e3d545d1a0f6a02abfe8c2efb87eca76a135f1e84be1b9013155296edb.jpg) +Figure 5. Rendering quality on ScanNet and matterport 3D datasets. We compare our proposed method with pix2pix and neural point based graphic on two indoor scene datasets. By analyzing the generated image in novel view, our proposed method achieves better performance. Please zoom in for details. + +# 4.3.2 Qualitative comparisons + +Figure 5 shows some visual comparisons of our method with NPG and Pix2Pix on ScanNet and Matterport 3D datasets. The first two rows show two scenes of ScanNet while the third and forth rows show two scenes of Matterport 3D. Fig. 5 (a) shows point cloud. The point cloud is noisy and incomplete. Fig 5 (b) shows the result of NPG. For its ScanNet results, we notice some incorrect places, e.g., black stripe on the tabletop screen of first scene, and missing details of shelf of second scene (Please zoom in for + +details). For its Matterport results, the missing of details become more serious, e.g. the floor textures is missing in the forth example. Fig 5 (c) shows the result of pix2pix. It generates strange curves for ScanNet while introduce weird textures for Matteport result. Fig 5 (d) shows our results. As seen, our result is free from such problems. + +# 4.4. Robustness and stability + +Robustness to noise point cloud In practice, the point cloud are usually noisy, and the rendering model needs to tolerate such noises to produce robust results. When objects + +![](images/266418cf03fef12b8e44098ee184084aae3941fbcce01eed144aaf9a8f13a58f.jpg) + +![](images/f30ea4ac3f377c82ee6e00bd9a1264195df60cd3e28ec22fdaa8b343ca3bdf8b.jpg) + +![](images/47f6944156e7197f00596476aacda484a736ff5cb8df4ec710f403f038998bbb.jpg) + +![](images/9f1d3244da34a4610f71fb84447a403db80cea4e796422ccfc68b9a9f79be492.jpg) + +![](images/0386a54e34cdc9e21b43df7853863dc547db15699d50af632fe13af43c7aece4.jpg) + +![](images/f03019ae0eb52805e89b061a4599c8362a5613fea2a459e1ed9563f664ff613c.jpg) + +![](images/2300c995b57623a47bea5c282abb09673b19087c27fa8ca6fab640ba0d510006.jpg) + +![](images/8cca45c8f3d9cbf09c3d39e0e782f5ed98cae2b40cff2b06f1cda411eb03332e.jpg) + +![](images/e8488ae728d15a57ed12c7cfd6c74b6013692ecbce12d09703bbb8cc03ac9a69.jpg) + +![](images/c27ddcfa6c0d7def8eaba734ce4b4163c2b96fa1c6cfb3565b943ab634ec23b9.jpg) + +![](images/5c058b2a682b7896bd1b8c5a006b82303b859277eada916b1915f05edf37e096.jpg) +(a) Point clouds + +![](images/f0d8899d916be7d183cb991850d01ca570b793be271559a7aad8f85a33744fd0.jpg) + +![](images/b19fbf97fd33ce462ff5852e9973af8d28dad8c3ee2c610af6aadb1663ff0060.jpg) +(b) pix2pix + +![](images/364744732b52887eb24d5a82dbcc3b155207a9a90ed19ff3ef5a8e572d70a729.jpg) +(c) NPG + +![](images/928a8b5b8cd86957fff111f92fbb8ec35c85abfdf8979ceeab0b5a91e3561ca9.jpg) +(d) Our results + +![](images/c0ca1202720626160d00f9f93ca824ec387d32049d70ea904a7a6b14a0aed0d5.jpg) +(e) Ground truth + +![](images/016ffe3a0c271dd659c7358e5a9979a763be77bae4f5e749b25371c6a140aed0.jpg) +Figure 6. Restore adversely occluded objects. (a) Noisy point clouds with objects adversely occluded. (b) pix2pix method. (c) Results generated through neural point based graphic method [1] from 2D point clouds images. Can't efficiently restore occluded objects. (d) Our results generated from 3D neural render. Restore adversely occluded objects. (e) Ground truth. +(a) SSIM +Figure 7. SSIM and PSNR trend when point clouds density decreased. + +![](images/55c1a6d4160c736ac18f94d7eb4cfe27b67c282f0143ad1f49727dbdf3e3bd47.jpg) +(b) PSNR + +are close to each other, noisy depth may result in wrong z-buffer such that the correct points are occluded. This is especially harmful for methods that rely on 2D projection of the point cloud, such as NPG and Pix2Pix. In contrast, our method maintains all related point features in the camera frustum volume and allows network to infer correctly. Fig. 6 shows two comparisons on cases with noisy depth. NPG and Pix2Pix either completely miss the correct objects or produce a mixture of foreground and background. + +Robustness to varying densities Theoretically, our method can support arbitrarily large scene since the point features can be stored on hard drive. However for efficient rendering, it is more desirable to keep point features in memory and render from relatively sparse point cloud to save both the memory and the computational cost for point projection. Unfortunately, sparse point cloud may result in in-complete z-buffer such that the occluded background shows up in the image. NPG proposes to assign each point + +a square size during the projection according to its depth to mitigate this issue, but may not be sufficient. Fig. 8 shows a qualitative comparison to NPG on the same scene with different point density. With less points, NPG reveals more background due to incomplete z-buffer, while our method still maintain the chair. Fig. 7 further shows the quantitative comparison. As seen, while both methods perform worse with fewer points, the metrics of our method drops relatives slower, which means using camera frustum is more robust against the varying point density. + +Temporal consistency 3D camera frustum also helps to improve the temporal consistency. 2D projection based methods may project very different points for the same 3D location to very close camera viewpoints. This is because the order of the points in the z-buffer may dramatically change between slightly different camera views. Consequently, the rendering of the same 3D location may use features from different points and thus cause jittering artifacts. + +![](images/ea0c48f6004f20db02b2f68850fff0fc6b0f57e5b32d604370c93341fa15f387.jpg) + +![](images/de0de4997e997ac2b9ead9063b4fd42b8a8c77b7335236183ca77c4fd2dfa94a.jpg) + +![](images/7d378f9738218ba3364d867c70bfeff9ee9dbf8d4b1addcceca7107aeb389c44.jpg) + +![](images/4703d8fd374dd6147df6d59ec7fadb057530069165b6eb3ed7841654363ee0f9.jpg) + +![](images/e7151ec621071f6a5571982efdfeffd2f7c7cf02e54534f4420814b19693bbb6.jpg) + +![](images/0051abc7ece585146a772b4028246a7dacc4104e4b5592fb4ddde3154c121095.jpg) + +![](images/def7912ea31112f063db16d96f0877c85cf59dcac3c04029f658bedfa754a5df.jpg) +(a) 6M + +![](images/cbc827f0f70fdc940a6fdea588e8c15cb70b48e60f3347b5b207073ce095dd68.jpg) +(b) 3M + +![](images/cfec1136ecc396d44341bb6623058ca7a14d22634eb95e44db17c1894d1a680e.jpg) +(c) $1.5\mathrm{M}$ + +We perform a user study to compare the temporal consistency against NPG, Pix2Pix and direct render. We render 4 videos of 4 different scenes with respect to each method. During user study, each time, we present 4 videos of 4 approaches and ask the subject to pick the best one. As we have 4 scenes, a user will pick 4 times. 20 users are invited, accumulating to 80 picks in total. The participants are required to only judge the temporal consistency. Statistical results are shown in Fig. 9. Our method received 61 picks, which indicates our video is apparently better than other methods in terms of temporal consistency. Please refer to the supplementary files for these videos. + +# 5. Conclusion + +In this work, we have proposed a method which synthesizes novel view images from 3D point clouds. Instead of directly project features from 3D points onto 2D image domain, we projected these features into a layered volume of camera frustum, such that the visibility of 3D points can be naturally maintained. Through experiments, our method is robust to point clouds noise and generates flicker-less videos. In the future, we will explore novel view synthesis from point clouds in multiple views. Optical flow can be + +![](images/50a78a5129920290e5ace8c81ba80567cd0994f11b7da7a7030af3f908815297.jpg) +Figure 8. Different sparsity of point clouds. The number of point clouds varies from column to column, and different row shows results generated from different method. By analysis, our method can work at relatively sparse point clouds. +Figure 9. The user study result on preference for videos synthesized by different methods (i.e. ours, NPG, direct render and pix2pix.) + +utilized for enforcing temporal consistency given additional observations. Flickers can be removed by enforcing constraints on similar predictions from shared points. In addition, applying interpolation in different depth planes could further improve the robustness against sparse point clouds. Acknowledgement: This research was supported in part by National Natural Science Foundation of China (NSFC, No.61872067, No.61720106004), in part by Research Programs of Science and Technology in Sichuan Province (No.2019YFH0016). + +# References + +[1] Kara-Ali Aliev, Dmitry Ulyanov, and Victor Lempitsky. Neural point-based graphics. arXiv preprint arXiv:1906.08240, 2019. 2, 3, 4, 5, 6, 7 +[2] David Bau, Hendrik Strobelt, William Peebles, Jonas Wulff, Bolei Zhou, Jun-Yan Zhu, and Antonio Torralba. Semantic photo manipulation with a generative image prior. ACM Trans. Graphics, 38(4):59, 2019. 1 +[3] James F Blinn. Simulation of wrinkled surfaces. In ACM SIGGRAPH computer graphics, volume 12, pages 286-292, 1978. 1 +[4] Giang Bui, Truc Le, Brittany Morago, and Ye Duan. Point-based rendering enhancement via deep learning. The Visual Computer, 34(6-8):829-841, 2018. 1 +[5] Chakravarty R, Alla Chaitanya, Anton S, Kaplanyan, Christoph Schied, Marco Salvi, Aaron Lefohn, Derek Nowrouzezahrai, and Timo Aila. Interactive reconstruction of monte carlo image sequences using a recurrent denoising autoencoder. ACM Trans. Graphics, 36(4):98, 2017. 2 +[6] Angel Chang, Angela Dai, Thomas Funkhouser, Maciej Halber, Matthias Niessner, Manolis Savva, Shuran Song, Andy Zeng, and Yinda Zhang. Matterport3d: Learning from rgb-d data in indoor environments. arXiv preprint arXiv:1709.06158, 2017. 2, 5, 6 +[7] Anpei Chen, Minye Wu, Yingliang Zhang, Nianyi Li, Jie Lu, Shenghua Gao, and Jingyi Yu. Deep surface light fields. Proc. of Computer Graphics and Interactive Techniques, 1(1):14, 2018. 1, 4, 5 +[8] Angela Dai, Angel X Chang, Manolis Savva, Maciej Halber, Thomas Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In Proc. CVPR, pages 5828-5839, 2017. 2, 5, 6 +[9] 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 reintegration. ACM Trans. Graphics, 36(3):24, 2017. 1 +[10] Paul Debevec, Yizhou Yu, and George Borshukov. Efficient view-dependent image-based rendering with projective texture-mapping. In Rendering Techniques, pages 105-116. 1998. 2 +[11] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Proc. CVPR, pages 248-255. IEEE, 2009. 4 +[12] John Flynn, Ivan Neulander, James Philbin, and Noah Snavely. Deepstereo: Learning to predict new views from the world's imagery. In Proc. CVPR, pages 5515-5524, 2016. 2 +[13] Andrew S Glassner. An introduction to ray tracing. Elsevier, 1989. 1, 2 +[14] Dan B Goldman, Brian Curless, Aaron Hertzmann, and Steven M Seitz. Shape and spatially-varying brdfs from photometric stereo. IEEE Trans. on Pattern Analysis and Machine Intelligence, 32(6):1060-1071, 2009. 2 +[15] Amit Goldstein and Raanan Fattal. Video stabilization using epipolar geometry. ACM Trans. Graphics, 31(5):126, 2012. 2 + +[16] Steven J Gortler, Radek Grzeszcuk, Richard Szeliski, and Michael F Cohen. The lumigraph. In Proc. ACM SIGGRAPH, volume 96, pages 43-54, 1996. 1, 2 +[17] Markus Gross and Hanspeter Pfister. Point-based graphics. Elsevier, 2011. 1 +[18] Jeffrey P Grossman and William J Dally. Point sample rendering. In Rendering techniques' 98, pages 181-192. 1998. +[19] Richard Hartley and Andrew Zisserman. Multiple view geometry in computer vision. Cambridge university press, 2003. 2 +[20] Peter Hedman, Julien Philip, True Price, Jan-Michael Frahm, George Drettakis, and Gabriel Brostow. Deep blending for free-viewpoint image-based rendering. In SIGGRAPH Asia 2018 Technical Papers, page 257, 2018. 1, 2 +[21] Geoffrey E Hinton and Ruslan R Salakhutdinov. Reducing the dimensionality of data with neural networks. science, 313(5786):504-507, 2006. 2 +[22] Yannick Hold-Geoffroy, Kalyan Sunkavalli, Sunil Hadap, Emiliano Gambaretto, and Jean-François Lalonde. Deep outdoor illumination estimation. In Proc. CVPR, pages 7312-7321, 2017. 2 +[23] Satoshi Iizuka, Edgar Simo-Serra, and Hiroshi Ishikawa. Globally and locally consistent image completion. ACM Trans. Graphics, 36(4):107, 2017. 1 +[24] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In Proc. CVPR, pages 1125-1134, 2017. 2, 5, 6 +[25] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In Proc. ECCV, pages 694-711, 2016. 4 +[26] Nima Khademi Kalantari, Ting-Chun Wang, and Ravi Ramamoorthi. Learning-based view synthesis for light field cameras. ACM Trans. Graphics, 35(6):193, 2016. 2 +[27] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.5 +[28] Leif Kobbelt and Mario Botsch. A survey of point-based techniques in computer graphics. Computers & Graphics, 28(6):801-814, 2004. 1 +[29] Marc Levoy and Pat Hanrahan. Light field rendering. In Proc. of conference on Computer graphics and interactive techniques, pages 31-42, 1996. 1, 2 +[30] Feng Liu, Michael Gleicher, Hailin Jin, and Aseem Agarwala. Content-preserving warps for 3d video stabilization. In ACM Trans. Graphics, volume 28, page 44, 2009. 1, 2 +[31] Guilin Liu, Fitsum A Reda, Kevin J Shih, Ting-Chun Wang, Andrew Tao, and Bryan Catanzaro. Image inpainting for irregular holes using partial convolutions. In Proc. ECCV, pages 85-100, 2018. 1 +[32] Leonard McMillan and Gary Bishop. Plenoptic modeling: An image-based rendering system. In Proc. of conference on Computer graphics and interactive techniques, pages 39-46, 1995. 1, 2 +[33] Oliver Nalbach, Elena Arabadzhiyska, Dushyant Mehta, H-P Seidel, and Tobias Ritschel. Deep shading: convolutional + +neural networks for screen space shading. In Computer Graphics Forum, volume 36, pages 65-78, 2017. 1 +[34] Taesung Park, Ming-Yu Liu, Ting-Chun Wang, and Jun-Yan Zhu. Semantic image synthesis with spatially-adaptive normalization. In Proc. CVPR, pages 2337-2346, 2019. 1, 2 +[35] Hanspeter Pfister, Matthias Zwicker, Jeroen Van Baar, and Markus Gross. Surfels: Surface elements as rendering primitives. In Proceedings of the 27th annual conference on Computer graphics and interactive techniques, pages 335-342, 2000. 1 +[36] Jiaxiong Qiu, Zhaopeng Cui, Yinda Zhang, Xingdi Zhang, Shuaicheng Liu, Bing Zeng, and Marc Pollefeys. Deep lidar: Deep surface normal guided depth prediction for outdoor scene from sparse lidar data and single color image. In Proc. CVPR, pages 3313-3322, 2019. 1 +[37] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pages 234-241, 2015. 2, 4 +[38] Steven M Seitz and Charles R Dyer. View morphing. In Proc. of conference on Computer graphics and interactive techniques, pages 21-30, 1996. 2 +[39] Vincent Sitzmann, Justus Thies, Felix Heide, Matthias Nießner, Gordon Wetzstein, and Michael Zollhofer. Deepvoxels: Learning persistent 3d feature embeddings. In Proc. CVPR, pages 2437-2446, 2019. 1, 2 +[40] Noah Snavely, Steven M Seitz, and Richard Szeliski. Photo tourism: exploring photo collections in 3d. In ACM Trans. Graphics, volume 25, pages 835-846, 2006. 2 +[41] Justus Thies, Michael Zollhöfer, and Matthias Nießner. Deferred neural rendering: Image synthesis using neural textures. arXiv preprint arXiv:1904.12356, 2019. 2, 3, 4 +[42] Aaron Van den Oord, Nal Kalchbrenner, Lasse Espeholt, Oriol Vinyals, Alex Graves, et al. Conditional image generation with pixelCNN decoders. In Proc. NIPS, pages 4790-4798, 2016. 2 +[43] 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. ECCV, pages 52-67, 2018. 2 +[44] Oliver Wang, Prabath Gunawardane, Steve Scher, and James Davis. Material classification using brdf slices. In Proc. CVPR, pages 2805-2811, 2009. 1 +[45] Gregory J Ward. The radiance lighting simulation and rendering system. In Proceedings of the 21st annual conference on Computer graphics and interactive techniques, pages 459-472. ACM, 1994. 1 +[46] Katja Wolff, Changil Kim, Henning Zimmer, Christopher Schroers, Mario Botsch, Olga Sorkine-Hornung, and Alexander Sorkine-Hornung. Point cloud noise and outlier removal for image-based 3d reconstruction. In International Conference on 3D Vision (3DV), pages 118-127, 2016. 2 +[47] Daniel N Wood, Daniel I Azuma, Ken Aldinger, Brian Curless, Tom Duchamp, David H Salesin, and Werner Stuetzle. Surface light fields for 3d photography. In Proc. conference on Computer graphics and interactive techniques, pages 287-296, 2000. 1 + +[48] Jiahui Yu, Zhe Lin, Jamei Yang, Xiaohui Shen, Xin Lu, and Thomas S Huang. Free-form image inpainting with gated convolution. In Proc. CVPR, pages 4471-4480, 2019. 1, 5 +[49] Cha Zhang and Zhengyou Zhang. Calibration between depth and color sensors for commodity depth cameras. In Computer vision and machine learning with RGB-D sensors, pages 47-64. 2014. 2 +[50] Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In Proc. CVPR, pages 586-595, 2018. 5 +[51] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proc. CVPR, pages 2223-2232, 2017. 2 \ No newline at end of file diff --git a/neuralpointcloudrenderingviamultiplaneprojection/images.zip b/neuralpointcloudrenderingviamultiplaneprojection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f116c41c6c3a6f353fdd18f7618c3c68f0bb890e --- /dev/null +++ b/neuralpointcloudrenderingviamultiplaneprojection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffe6abcc280e863cfd73f56e0a35dcd80d00672e848a83289757a0b61b08834e +size 700322 diff --git a/neuralpointcloudrenderingviamultiplaneprojection/layout.json b/neuralpointcloudrenderingviamultiplaneprojection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6d3bc0a51f20535e516b80b60fc7fca54e512aae --- /dev/null +++ b/neuralpointcloudrenderingviamultiplaneprojection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4792eb57ab381ff3438ad4a26484473514ea38c3f3e61d0965a86e77946e1288 +size 366815 diff --git a/neuralposetransferbyspatiallyadaptiveinstancenormalization/8d444398-e17e-4b00-8c47-e794a0dd92e4_content_list.json b/neuralposetransferbyspatiallyadaptiveinstancenormalization/8d444398-e17e-4b00-8c47-e794a0dd92e4_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4f46f309860b672373831be84784583c410cfdf6 --- /dev/null +++ b/neuralposetransferbyspatiallyadaptiveinstancenormalization/8d444398-e17e-4b00-8c47-e794a0dd92e4_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba7f25bea61276a731a8e78b5b86faaeed11e54dba55ec96d15cb29fb3e51a25 +size 60755 diff --git a/neuralposetransferbyspatiallyadaptiveinstancenormalization/8d444398-e17e-4b00-8c47-e794a0dd92e4_model.json b/neuralposetransferbyspatiallyadaptiveinstancenormalization/8d444398-e17e-4b00-8c47-e794a0dd92e4_model.json new file mode 100644 index 0000000000000000000000000000000000000000..eabb9871588cd752e884acdb50c136e9ac455bdb --- /dev/null +++ b/neuralposetransferbyspatiallyadaptiveinstancenormalization/8d444398-e17e-4b00-8c47-e794a0dd92e4_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2344fbe4f1f0a45a558e3f0d41314eb0eedd036595066ff8acc7e2564c86754a +size 74979 diff --git a/neuralposetransferbyspatiallyadaptiveinstancenormalization/8d444398-e17e-4b00-8c47-e794a0dd92e4_origin.pdf b/neuralposetransferbyspatiallyadaptiveinstancenormalization/8d444398-e17e-4b00-8c47-e794a0dd92e4_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..aedd407ae0ec2337341289ecf6eeb5d2dcac21d9 --- /dev/null +++ b/neuralposetransferbyspatiallyadaptiveinstancenormalization/8d444398-e17e-4b00-8c47-e794a0dd92e4_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1757be61b6f44922c8d3fced16d4d772496baf49bd225bc8637a70014b204905 +size 2855574 diff --git a/neuralposetransferbyspatiallyadaptiveinstancenormalization/full.md b/neuralposetransferbyspatiallyadaptiveinstancenormalization/full.md new file mode 100644 index 0000000000000000000000000000000000000000..02e132d7d729cecbf9ef04e51b0d9d7770df0da0 --- /dev/null +++ b/neuralposetransferbyspatiallyadaptiveinstancenormalization/full.md @@ -0,0 +1,264 @@ +# Neural Pose Transfer by Spatially Adaptive Instance Normalization + +Jiashun Wang $^{1*‡}$ Chao Wen $^{1*§}$ Yanwei Fu $^{1†‡}$ Haitao Lin $^{1}$ Tianyun Zou $^{1}$ Xiangyang Xue $^{1}$ Yinda Zhang $^{2†}$ + +![](images/5d13d8f5466abd27b094586bf186fb4d29965f7a6463b52ef784d0ea57d52deb.jpg) +Figure 1: Four groups of pose transfer examples. Each visualization group consists of 3 meshes, input pose mesh, input identity mesh, and our result. For the first two groups, we show the pose mesh from SMPL [16], the identity mesh from FAUST [4] and our result, the identity mesh of the third group is from MG-dataset[3], the last group shows our pose transfer result from the animal dataset [24], please refer to supplementary materials for more details. + +# Abstract + +Pose transfer has been studied for decades, in which the pose of a source mesh is applied to a target mesh. Particularly in this paper, we are interested in transferring the pose of source human mesh to deform the target human mesh, while the source and target meshes may have different identity information. Traditional studies assume that the paired source and target meshes are existed with the point-wise correspondences of user annotated landmarks/mesh points, which requires heavy labelling efforts. On the other hand, the generalization ability of deep models is limited, when the source and target meshes have different identities. To break this limitation, we proposes the first neural pose transfer model that solves the + +pose transfer via the latest technique for image style transfer, leveraging the newly proposed component - spatially adaptive instance normalization. Our model does not require any correspondences between the source and target meshes. Extensive experiments show that the proposed model can effectively transfer deformation from source to target meshes, and has good generalization ability to deal with unseen identities or poses of meshes. Code is available at https://github.com/jiashunwang/Neural-Pose-Transfer. + +# 1. Introduction + +Deformation transfer has been drawing consistent attention over decades and is enabling many applications. For example, one can easily transfer the pose from the mesh of one person to another in the games and movies. However, It is very challenging when there is a huge "shape gap" given very different identities of source and target meshes, as illustrated in Fig. 1. To make this feasible, previous works demand re-enforcing the correspondence between source and target meshes, additional information, such as point-wise + +correspondence [24], an auxiliary mesh [26], human key point annotations [2], skeleton pose [5], dense correspondence [10], and so on. Unfortunately, it is non-trivial, and time-consuming to obtain such additional inputs for deformation transfer. + +In this work, we propose a deep learning model for human pose transfer, which transfers the pose from a source mesh to a target identity mesh, as shown in Fig. 2. Our model does not rely on any extra auxiliary inputs that implicitly or explicitly build correspondence, and can work for source and target mesh with vertices in random and different order. These flexibilities make our model very convenient to use in practice and can directly work on identity mesh obtained from arbitrary sources, which however are extremely challenging to be achieved by the framework of existing deformation based approaches. As the output, our model produces a human mesh with the identity from the target mesh and the pose from the source mesh. + +Essentially, our key idea is to re-purpose style transfer techniques, which is widely used in image analysis for the deformation transfer problem. Our model takes the identity information of the target mesh as a "style" and transfer it to the source mesh to achieve a pose transfer. Rather than explicitly learn to deform the target meshes from source meshes, we stack several convolutional layers to gradually encode the pose information from source meshes, and then decode it back to the desired output under the guide of the features learned from the target mesh. Inspired by the great success of Spatially Adaptive Instance Normalization layers (SPAdaIN) [12] for 2D image style transfer, we introduce it to 3D domain to process the point clouds together with PointNet-like network architecture [22]. + +In SPAdaIN for 2D image style transfer, an affine transformation is learned from each pixel in the target image ("style") and applied to the instance normalized feature of the corresponding pixel in the source image ("content"). We design our model by making an analogy between the image pixel and the mesh vertex. In particular, we first learn a feature vector for each vertex in the source mesh ("pose") and transform them using an affine transformation learned from a vertex in the target mesh ("identity"). However, this would not work naively, since the correspondence between source and target is unknown. To make the feature on the source mesh invariant to the vertex order permutation, the convolutional filters of $1 \times 1$ are utilized to each individual point and an instance normalization (among all the points) is appended to exchange context global-wise. The learned features can then be associated with the target mesh vertices in arbitrary permutation for style transfer. We found this model effectively transfers the unseen identity onto the source pose mesh and produces much more accurate human shape than the state-of-the-art approaches which even requires the additional auxiliary inputs. + +![](images/6b91cd504638c745d99876498070ab6150f30ded85fd30bcc0d07f06090fe3bc.jpg) +Figure 2: Pose is transferred from source to the target mesh. Different from traditional methods, we only require the pose and identity mesh but not any extra input. + +Contributions. The contributions of this paper are summarized as follows. To the best of our knowledge, we propose the first end-to-end deep learning model that deforms an identity mesh with the pose from another mesh, even though the identity mesh is unseen and with more fine-grained geometry details. Our model does not require any additional auxiliary mesh or extra knowledge to bridge the huge visual gap between source and target meshes. Our model is also convenient to use in practice since the pose and identity mesh can come with different vertices order. Moreover, our model is robust to pose mesh geometry noise. Extensive experiments verify that our model is capable of inferring and transferring the poses from source to target meshes, and the result is invariant to the mesh vertex order between source and target meshes. + +# 2. Related Works + +Deformation transfer. Deformation transfer aims to produce a new 3D shape given a pair of source and target shapes as well as a deformed source shape, making the target shape do the same deformation (Fig. 2). However, some traditional methods based on skinning skeleton animation [14] require additional manual adjustment. Alternatively, many works leverage affine transformations to generate target shapes [24, 26, 27]. Sumner et al. [24] transfer deformation gradients, but requires corresponding landmarks to handle the differences between shapes. Baran et al. [1] assume semantic relationships between the poses of two characters. However, the requirement of semantic similarity pairs limits the usability of this approach. Ben et al. [2] deform to target shapes with the help of a set of control cages. Chu et al. [5] proposed to use a few examples to generate natural results. Even with impressive success, the reliance on auxiliary data makes it difficult to automatically transfer pose for graphics-based methods. To address this, Gao et al. [9] proposed VC-GAN, using cycle consis + +tency to achieve the deformation transfer. But this approach also raises another problem, losing versatility due to overreliance on training data. Whenever dealing with new identities, it needs to gather training data and retrain the model. + +Deep learning for non-rigid shape representation. [25, 15] proposed mesh variational autoencoder to learn mesh embedding for shape synthesis. However, they merely use the fully-connected layer which will consume a large amount of computing resources. [8] using mesh convolution to capture the triangle faces feature of 3D mesh. Although their methods use spatial and structural information, the features represented by faces are not suitable for our task. Qi et al. proposed PointNet [22] to extract features from unorganized points cloud, but the missing edge information will result in deformed 3D shape with outliers. Therefore, we use mesh as the representation of 3D shape, but use shared weights convolution layers as the network structure of encoder. + +Conditional normalization and style transfer. Several conditional normalization methods have been proposed [7, 6, 12, 23]. At first, they are used in style transfer and then for other vision tasks [13, 18, 20, 17, 28, 21]. External data is needed in these works. After normalizing the mean and bias of the activation layer, through using these external data they learn the affine transformation parameters to denormalize the activation layer. Park et al. [19] proposes a similar idea to help with the image synthesis but from a spatial way using the spatially-varying semantic mask. This inspires us to apply spatial 3D mesh as external data to generate our expected mesh. Since the 3d coordinates of the point which spatially and naturally are one of the most important representations of 3D data, the idea of using conditional normalization directly in the spatial sense is very intuitive and the results from the experiments demonstrate the effectiveness of this method. + +SPAdaIN vs. other Conditional normalization. Particularly, we emphasize the difference that: (1) Compare to SPADE [19], we using instance normalization. Since each instance may have different features to guide the transfer, normalize the activation of the network in channel-wise is not reasonable. So, we normalize the spatially-variant parameters instance-wise, which is more suitable for the neural pose transfer task. (2) Compare to CIN [7], our normalization parameter vectors are not selected from a fixed set of identities or pose, the corresponding parameters $\gamma$ and $\beta$ are adaptively learned, therefore, their approach cannot adapt to new identities or pose without re-training. Also, their parameters are aggregated across spatial axes; thus they may lose some detailed feature in particular spatial positions. (3) AdaIN [12] is also not suitable for pose transfer. Though AdaIN can handle arbitrary new identities or pose as guidance, there are no learnable parameters in AdaIN. Due to + +![](images/2c51b56b1d5b0b1aca6e8dc25ec6d328b8e2f0baea7744006bd4a46ee52541c7.jpg) +Figure 3: Influence of different parameters on 3D human mesh model. Each row represents the change of the mesh when changing one parameter from $\alpha, \beta, \theta$ . $\alpha$ controls the mesh identity, $\beta$ controls the mesh pose and $\theta$ indicates the vertices order. The mesh color of last row encodes the mesh vertex index. + +the lake of learnable parameters, when adopting AdaIN as normalization, the network will tend to imitate the shape of $M$ rather than use it as a condition to produce new posture. + +# 3. Methods + +In this section, we introduce our deep learning model for human pose transfer (Fig. 4). Our model is highly inspired by image style transfer. Taking the source mesh carrying the pose, our model produces a feature for each vertex encoding both local details and global context. The pervertex features are then concatenated with the vertex locations in the target mesh providing identity, which is fed into the style transfer decoder consists of SPAdaIn ResBlocks. Throughout the decoder, each feature produces one vertex in the output mesh under the guide of a vertex from the target mesh. The final output mesh inherits the pose from the source mesh and the identity from the target. The mesh vertex order is consistent with the identity mesh. + +# 3.1. Problem Definition + +We represent 3D human mesh by $M(\alpha, \beta, \theta)$ . As shown in Fig. 3, $\alpha$ denotes the parameters of mesh identity, which + +![](images/882396095c9c464e6109fa75ff34b566fb4603bcf2bd8ea5110c5ccb2563f322.jpg) +Figure 4: Network Architecture. The blue part is permutation invariant encoder, and the yellow part is SPAdaIN guided decoder. Given $M_{id}$ and $M_{pose}$ as input, we produce mesh transferred to new posture. The symbol $\odot$ denotes the operation of concatenation. + +![](images/9c6292909987b270e40722a21d16848df97e832938f2f6d76b34a4ea520c4627.jpg) +(a) + +![](images/0e2418f64836ef6608823b22d0f058a8647e1fafbb4a2434f02c1dd502d85890.jpg) +(b) +Figure 5: Detailed Network Component Architecture. SPAdaIN and (c) Architecture of SPAdaIN ResBlock. +(a) Architecture of Pose Feature Extractor, (b) Architecture of + +![](images/4b34f2c1d293624fb2e6251226cf4749f129765a17c86b4585b2b886bb240179.jpg) +(c) + +controls the mesh shape, $\beta$ represents different human posture, $\theta$ indicates the vertices order. Given two meshes $M_{id} = M(\alpha_1,\beta_1,\theta_1)$ and $M_{pose} = M(\alpha_2,\beta_2,\theta_2)$ , our goal is to transfer the pose to the identity mesh by producing output mesh $M_{output} = \widehat{M} (\alpha_1,\beta_2,\theta_1)$ . + +# 3.2. Permutation Invariant Pose Feature Extractor + +We first introduce our pose feature extractor $\mathbf{E}$ . The encoder aims to extract the feature $F_{\text{pose}}$ for the orderless input mesh vertices. The encoder $\mathbf{E}$ takes $M_{\text{pose}}$ vertices coordinates through pose feature extractor as illustrated in Fig. 5 (a). The pose feature extractor consists of 3 stacked $1 \times 1$ convolution and InstanceNorm layers, all activation functions applied for convolution layers are ReLU. Then the encoder concatenates pose features with the vertices coordinates of template identity mesh $M_{id}$ to produce latent embedding $Z = F_{\text{pose}} \odot M_{id}$ eventually ( $\odot$ denotes concatenation). One architecture choice needs to be discussed is why $F_{\text{pose}}$ are tensors rather than global vectors. Since the vertex orders of different training data are not consistent, and normalization is essential to aggregate the global context, InstanceNorm (IN) is the only choice to normalize the features. However, if $\mathbf{E}$ encodes pose feature as a global vector and then attaching it to $M_{id}$ , calculating IN will lead the pose features to be normalized to zero. So we + +prefer to learn the pose feature with the same spatial size as $M_{id}$ . In principle, this will allow the whole pipeline to preserve spatial information and be free from the requirement of point-wise correspondence between $M_{id}$ and $M_{pose}$ . + +# 3.3. Style Transfer Decoder + +In this section, we introduce our novel condition normalization layer SPAdaIN first. Then we describe the decoder architecture build upon SPAdaIN ResBlock. + +SPAdaIN. Extending previous style transfer works [7, 12, 19], we propose spatially conditional normalization to generate the 3D human shape applied to pose transfer tasks while keeping the identity of meshes. In particular, SPAdaIN is a generalization of [12, 19] to deal with points. Similar to IN, the activation is normalized across the spatial dimensions independently for each channel and instance, and then modulated with learned scale $\gamma$ and bias $\beta$ . Note that, here we assume that in the $i$ -th layer, $M$ is the 3D model providing identity, $V^i$ is the number of 3D shape vertices in this layer, $C^i$ is the number of feature channel, $N$ denotes the batch size, and $h$ is the activation value of network (the footnote indicate specific index where $n \in N, c \in C^i, v \in V^i$ ). The value normalized by + +SPAdaIN can be computed as follows, + +$$ +\mu_ {n, c} ^ {i} = \frac {1}{V ^ {i}} \sum_ {v} h _ {n, c, v} ^ {i} \tag {1} +$$ + +$$ +\sigma_ {n, c} ^ {i} = \sqrt {\frac {1}{V ^ {i}} \sum_ {v} \left(h _ {n , c , v} ^ {i} - \mu_ {n , c} ^ {i}\right) ^ {2} + \varepsilon} \tag {2} +$$ + +$$ +\operatorname {S P A d a I N} (h, \boldsymbol {M}) = \gamma_ {v} ^ {i} (\boldsymbol {M}) \left(\frac {h _ {n , c , v} ^ {i} - \mu_ {n , c} ^ {i}}{\sigma_ {n , c} ^ {i}}\right) + \beta_ {v} ^ {i} (\boldsymbol {M}) \tag {3} +$$ + +where $\gamma$ and $\beta$ are learnable affine parameters, $\varepsilon = 1e - 5$ for numerical stability. The detailed SPAdaIN module structure is shown in Fig. 5 (b). In SPAdaIN the external data $M_{id}$ is fed into 2 different $1\times 1$ convolution layers to produce the modulation parameters $\gamma$ and $\beta$ . The parameters are multiplied and added to the normalized feature. + +Decoder. The decoder architecture we employed is inspired by the style transfer task. We first feed the latent embedding $Z$ into the decoder, consisting of multiple SPAdaIN ResBlocks. As shown in Fig. 4, the overall architecture has 3 SPAdaIN ResBlocks. Fig. 5 (c) illustrates the detail of SPAdaIN ResBlock architecture. Each SPAdaIN ResBlock consists of SPAdaIN blocks followed by a $1 \times 1$ convolution layer and ReLU activation function, and 3 identical units are organized in the form of residual block [11]. The output of this operation is then fed to a tanh layer, generating the final output $M_{output}$ . + +# 3.4. Loss function + +To efficiently train our network, we introduce and define the loss function $\mathcal{L}$ as follows, + +$$ +\mathcal {L} = \mathcal {L} _ {\text {r e c}} + \lambda_ {\text {e d g}} \cdot \mathcal {L} _ {\text {e d g}} \tag {4} +$$ + +where $\lambda_{edg}$ is coefficients of edge regularization. + +Reconstruction Loss. The loss aims to regress the vertices close to its correct position. We pre-process the ground truth with the same vertices number as template identity model and train the network using the supervision of pointwise L2 distance between the mesh predicted by our model $\widehat{M} (\alpha_{1},\beta_{2},\theta_{1})$ and the ground truth mesh $M(\alpha_{1},\beta_{2},\theta_{1})$ + +$$ +\mathcal {L} _ {r e c} = \left| \left| \widehat {\boldsymbol {M}} \left(\alpha_ {1}, \beta_ {2}, \theta_ {1}\right) - \boldsymbol {M} \left(\alpha_ {1}, \beta_ {2}, \theta_ {1}\right) \right| \right| _ {2} ^ {2} \tag {5} +$$ + +Edge Length Regularization. Directly regress vertices position will not guarantee that the transferred of avoiding producing the over-length edges, since we tend to make the generated model has smooth surface. To address this problem, we further propose edge length regularization penalizing the long edges. Specifically, this regularization enforces the output mesh surface to be tight, resulting in a smooth + +surface. Inspired by [10], let $\mathcal{N}(p)$ be the neighbor of vertex $p$ , the edge length regularization can be defined as follows, + +$$ +\mathcal {L} _ {e d g} = \sum_ {p} \sum_ {v \in \mathcal {N} (p)} | | p - v | | _ {2} ^ {2} \tag {6} +$$ + +# 4. Experiment + +# 4.1. Experimental setup + +Datasets We use SMPL model [16] to generate training and test data by randomly sampling the parameter space. To create training data, we generate meshes of 16 identities with 400 poses, and randomly pick two as a pair for training. The ground truth is obtained by running SMPL model[16] with the desired shape and pose parameters from two meshes respectively. In order to be invariance to the vertex order, the mesh vertices are shuffled randomly before feeding into the network. Accordingly, the ground truth mesh is shuffled in the same manner as the identity mesh such that they are point-wise aligned to its corresponding input mesh. + +In the test step, we evaluate our model for transferring the seen and unseen poses to new identities. To do so, we create 14 new identities that are not in the training set. We use these new identities to form 72 pairs with randomly selected training pose, and 72 pairs with newly created poses. To further test how our model generalizes, we employ the meshes from FAUST [4] and MG-dataset[3]. These meshes are not strictly consistent with SMPL but with more fine-grained geometry details and more realistic. + +For all input meshes, we shift them to the center and scale them to the unit sphere, our method is robust against the global scale. + +Implementation details. The hyper-parameters to train our network are as follows. We use Adam optimizer with the learning rate as $5e - 5$ . The $\lambda_{edg}$ in the loss function is set as $5e - 4$ . The model is trained for 200 epochs with batch size equalling to 8 on a single GTX 1080Ti GPU. Please refer to the supplementary material for more detailed network architecture. + +Evaluation Metrics. Since the output mesh is point-wise aligned with the ground truth, we use Point-wise Mesh Euclidean Distance (PMD) as our evaluation metrics. Specifically, + +$$ +\mathbf {P M D} = \frac {1}{| V |} \sum_ {v} \| P _ {v} - Q _ {v} \| _ {2} ^ {2} \tag {7} +$$ + +where we have mesh vertices $P_{v}\in \widehat{M} (\alpha_{1},\beta_{2},\theta_{1})$ and $Q_{v}\in M(\alpha_{1},\beta_{2},\theta_{1})$ + +# 4.2. Comparison to Deformation Transfer + +In this section, we compare to deformation transfer baselines and show both qualitative and quantitative results. + +![](images/18bc05d5ac551c29ac6a420df22af01a69ad4ad8099252502570d221942ddd93.jpg) +Figure 6: Qualitative comparison of seen pose. From left to right, we show in each row: input identity mesh, input pose mesh, the results of DT [24] using 5 control points and 13 control points respectively, our results and the ground truth. Our predictions have more natural joints movement. + +![](images/dfa5f56b49d2c5bba827060c9b70c440360d62730134c552ac9bb0b53884b9e8.jpg) + +![](images/cbc8c729f534f8df2773fb6721a5a7f0ba0de9cb111f9fa39cf2023f63dd9d9b.jpg) +Figure 7: Qualitative comparison of unseen pose. Both $M_{id}$ and $M_{pose}$ are unseen. From left to right, we show in each row: input identity mesh, input pose mesh, the results of DT [24] using 5 control points and 13 control points respectively, our results and the ground truth. Our predictions are more natural at joints. + +To the best of our knowledge, there are no learning-based methods for deformation transfer designed for new identities yet. One of the most effective methods is deformation transfer (DT) [24], which however, has to rely on the additional control points and a third mesh, as the auxiliary input. To this end, we provide DT the third mesh and run it with 5 and 13 control points. The qualitative results are shown in Fig. 6 and Fig. 7 and quantitative results are shown in + +Tab. 1. As can be seen, our model learns on seen poses to transfer poses effectively to new identities in the testing set, while the PMD of our method is significantly lower than that of DT which even has the additional inputs. This greatly validates the effectiveness of our model in learning to deform meshes. Furthermore, for those poses that have never been seen during the training stage, our model demonstrates very good generalization ability and still produces + +reasonable good results as shown in Fig. 7. Note that DT is not a learning-based approach such that it has quite similar performance over the training and testing set. + +To demonstrate that our model is invariant to vertex permutation of meshes, we further run our model on the same pair of meshes with the identity mesh shuffled in different orders. Fig. 8 shows the input and output meshes with color encoding the vertex index. As can be seen, our model can produce similar output meshes with the input identity meshes in different shuffles. This shows that the output vertex order is maintained the same as the identity meshes. + +Table 1: Quantitative comparison of average PMD. + +
Pose TypePMD ↓ (×10-4)
DT(5) [24]DT(13) [24]Ours
seen-pose7.37.71.1
unseen-pose7.26.79.3
+ +![](images/004313bfa4b8a4b1c61d80f1edb30fbf8cd5a15b69863578353f4127cf218f6d.jpg) +Figure 8: Visualization of the vertex index color encoding. We show two pairs of input meshes with different vertices orders and the predict results. From left to right, $M_{\text{pose}}$ , $M_{id}$ and $M_{\text{output}}$ . The order of our pose transfer results are consistent with the identity mesh. + +# 4.3. Ablation Study + +In this section, we verify the effectiveness of the key components of our model by some ablation study. + +We start from a naive network architecture, where the decoder only consists of several 1-dimensional convolutional filters (conv1d). We then sequentially add ResBlock and SPAdaIN to the network. We name these two naive methods concat1 and w/o SPAdaIN. The quantitative evaluations are shown in Tab. 2, and some examples can be found in Fig. 9. As can be seen, naive conv1d (concat1) does not perform well, and the surface details are added back gradually when adding more components to the network. Particularly, SPAdaIN is very helpful in learning the pose transfer, which + +![](images/5fb0a40b577a65198958619f013730586b6f289e23febcc19d697b9c23c775c9.jpg) +Figure 9: Qualitative ablation study results. We show the generation results of (a) our naive baseline concat1, (b) our model without SPAdaIN modules, (c) our model without edge regularization and (d) our full model. As we can see, SPAdaIN is very helpful in learning the pose transfer and edge loss can help to generate smoother results. + +![](images/32efc61d0b4e5379de7ad11fa417fc1836de693049962da4379e069dc3137304.jpg) +Figure 10: Qualitative comparisons of Non-SMPL based identity. Comparison of using FAUST [4] and MG-dataset[3] as identity mesh respectively. + +reduces the error from 8.3 to 1.1 on seen poses and from 13.7 to 9.3 on unseen poses. This means the style transfer network can effectively transfer the identity as a style onto the target mesh. + +We also evaluate the impact of edge regularization loss on the model performance. As compared in Tab. 2, edge regularization loss consistency reduces the PMD on the testing dataset of both seen and unseen poses. From Fig. 9, the results are smoother if trained with the edge loss, compared to those without using edge regularization loss. + +Table 2: Quantitative ablation study for seen and unseen pose. We show the metrics of PMD with a naive baseline (concat1), SPAdIn and edge regularization disabled respectively, full denotes our full model. + +
Pose SourcePMD ↓ (×10-4)
concat1w/o SPAdaINw/o edgfull
seen-pose12.18.31.21.1
unseen-pose16.913.710.19.3
+ +![](images/87f4122ae3e67cd4dc5761264249b25c27db83812ab2c3dae11922d5279f5562.jpg) +(a) Identity +Figure 11: Qualitative example of Non-SMPL based pose. We show results using the mesh from FAUST [4] as pose mesh. Our system has the ability to transfer pose from Non-SMPL based mesh. + +![](images/a4d293d170f890ef503a2a0c6e5f5675a563e6a5aec634e976c0bbe815cbd8d1.jpg) +(b) Pose + +![](images/c9b074197fc1d7e8297a6b71baed407ac34c68d16b6e1666f90aceb8a353a944.jpg) +(c) Ours +Figure 12: Robustness to noise. When using pose mesh (a) with noise, our method (c) still performs very well, however, DT [24] (b) may maintain undesirable geometry noise. + +# 4.4. Generalization Capability + +In this section, we investigate the generalization capability of our method from the cross source data and robustness. Specifically, we test our model with non-SMPL based identity and pose meshes. It is worth noting that the training data created by SMPL are highly constrained and lack of geometry details. Our deep learning model can handle the details beyond SMPL capacity decently. + +Non-SMPL based identity We first test how our model performs with a human mesh that is not strictly an SMPL model. To do so, we take meshes from FAUST [4] and MG-dataset [3] which include dressed human meshes as the identity meshes. The model we get through SMPL training dataset does not require the order of the mesh vertex points or the number of the points as input, but it has to set the same number of points of pose mesh, as that of the identity mesh points. SMPL meshes have 6890 points each and FAUST has the same number of points as SMPL. For MG-dataset [3] which has meshes with 27554 each, we adopt the interpolation to automatically increase the number of points of pose mesh and this is a very simple process. In Fig. 10, we can see that, even with the identity mesh that is not from SMPL, our model still produces the correct pose while maintains the geometry details that are not encoded by SMPL, e.g., beard and the cloth. On the other hand, DT + +![](images/2308689eae0b633de224956cf74e1256c3cba48449ec4af0dfc10e599c830dd5.jpg) +(a) Pose + +![](images/787f6d3a25873ef6cde733a9ff18bd1f042c96e664354de2b4370d82cd593687.jpg) +(b)DT(5) + +![](images/8cf55859c32257cf42950ea8e8e0788c99914bbb0161841e30cd83a787a29488.jpg) +(c) Ours + +sometimes produces more obvious artifacts near fingers. + +Non-SMPL based pose. We then test our system with a non-SMPL based source mesh which provides the pose. We give examples using a mesh from FAUST [4] as pose mesh in Fig. 11. As shown in Fig. 11, our model still managed to produce reasonably good results. + +Robustness to noise Lastly, we test the model robustness against noise in the pose mesh. We manually add noise to the pose mesh by adding random perturbations to point coordinates, since there may be some noise during application sometimes. Surprisingly, as shown in Fig. 12, our method is still doing well. + +# 5. Conclusion + +In this paper, we propose an efficient deep learning based architecture to efficiently transfer the pose from source meshes to target meshes. The whole network is designed as generalizing the style transfer in the image domain to deal with points. The novel component - SPAdaIN is thus introduced to implement our idea. Strikingly, we empirically validate and show that our network has the potential ability in generalizing to transfer poses to unseen meshes and being invariant to different vertex orders of source and target meshes. Comparing with the other methods, we show that our model can work well in transferring poses in noisy conditions and in handing arbitrary vertex permutation, most importantly without relying on the additional input from auxiliary meshes or extra knowledge as previous works. + +# Acknowledgement + +This work was supported in part by NSFC Projects (U1611461), Science and Technology Commission of Shanghai Municipality Projects (19511120700, 19ZR1471800), Shanghai Municipal Science and Technology Major Project (2018SHZDZX01), and Shanghai Research and Innovation Functional Program (17DZ2260900). + +# References + +[1] Ilya Baran, Daniel Vlasic, Eitan Grinspun, and Jovan Popovic. Semantic deformation transfer. In ACM Transactions on Graphics (TOG), volume 28, page 36. ACM, 2009. 2 +[2] Mirela Ben-Chen, Ofir Weber, and Craig Gotsman. Spatial deformation transfer. In Proceedings of the 2009 ACM SIGGRAPH/Eurographics Symposium on Computer Animation, pages 67-74. ACM, 2009. 2 +[3] Bharat Lal Bhatnagar, Garvita Tiwari, Christian Theobalt, and Gerard Pons-Moll. Multi-garment net: Learning to dress 3d people from images. In IEEE International Conference on Computer Vision (ICCV). IEEE, Oct 2019. 1, 5, 7, 8 +[4] Federica Bogo, Javier Romero, Matthew Loper, and Michael J. Black. Faust: Dataset and evaluation for 3d mesh registration. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2014. 1, 5, 7, 8 +[5] Hung-Kuo Chu and Chao-Hung Lin. Example-based deformation transfer for 3d polygon models. J. Inf. Sci. Eng., 26(2):379-391, 2010. 2 +[6] Harm de Vries, Florian Strub, Jeremie Mary, Hugo Larochelle, Olivier Pietquin, and Aaron C Courville. Modulating early visual processing by language. 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 6594-6604. Curran Associates, Inc., 2017. 3 +[7] Vincent Dumoulin, Jonathon Shlens, and Manjunath Kudur. A learned representation for artistic style. arXiv preprint arXiv:1610.07629, 2016. 3, 4 +[8] Yutong Feng, Yifan Feng, Haoxuan You, Xibin Zhao, and Yue Gao. Meshnet: Mesh neural network for 3d shape representation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 8279-8286, 2019. 3 +[9] Lin Gao, Jie Yang, Yi-Ling Qiao, Yukun Lai, Paul Rosin, Weiwei Xu, and Shihong Xia. Automatic unpaired shape deformation transfer. ACM Transactions on Graphics, 37(6):1-15, 2018. 2 +[10] 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. 2, 5 +[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. 5 +[12] Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In Proceedings of the IEEE International Conference on Computer Vision, pages 1501-1510, 2017. 2, 3, 4 +[13] Xun Huang, Ming-Yu Liu, Serge Belongie, and Jan Kautz. Multimodal unsupervised image-to-image translation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 172-189, 2018. 3 +[14] Alec Jacobson, Ilya Baran, Jovan Popovic, and Olga Sorkine. Bounded biharmonic weights for real-time deformation. + +ACM Transactions on Graphics (proceedings of ACM SIGGRAPH), 30(4):78:1-78:8, 2011. 2 +[15] Or Litany, Alex Bronstein, Michael Bronstein, and Ameesh Makadia. Deformable shape completion with graph convolutional autoencoders. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1886-1895, 2018. 3 +[16] Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J Black. Smpl: A skinned multiperson linear model. ACM transactions on graphics (TOG), 34(6):248, 2015. 1, 5 +[17] Lars Mescheder, Andreas Geiger, and Sebastian Nowozin. Which training methods for gans do actually converge? arXiv preprint arXiv:1801.04406, 2018. 3 +[18] Takeru Miyato and Masanori Koyama. cgans with projection discriminator. arXiv preprint arXiv:1802.05637, 2018. 3 +[19] Taesung Park, Ming-Yu Liu, Ting-Chun Wang, and Jun-Yan Zhu. Semantic image synthesis with spatially-adaptive normalization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2337-2346, 2019. 3, 4 +[20] Ethan Perez, Harm de Vries, Florian Strub, Vincent Dumoulin, and Aaron Courville. Learning visual reasoning without strong priors. arXiv preprint arXiv:1707.03017, 2017. 3 +[21] Ethan Perez, Florian Strub, Harm De Vries, Vincent Dumoulin, and Aaron Courville. Film: Visual reasoning with a general conditioning layer. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. 3 +[22] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 652-660, 2017. 2, 3 +[23] Cheng Shi12, Chun Yuan, Jiayin Cai, Zhuobin Zheng12, Yangyang Cheng12, and Zhihui Lin12. Conditional kronecker batch normalization for compositional reasoning. 2018. 3 +[24] Robert W Sumner and Jovan Popovic. Deformation transfer for triangle meshes. ACM Transactions on graphics (TOG), 23(3):399-405, 2004. 1, 2, 6, 7, 8 +[25] Qingyang Tan, Lin Gao, Yu-Kun Lai, and Shihong Xia. Variational autoencoders for deforming 3d mesh models. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 3 +[26] Weiwei Xu, Kun Zhou, Yizhou Yu, Qifeng Tan, Qunsheng Peng, and Baining Guo. Gradient domain editing of deforming mesh sequences. In ACM Transactions on Graphics (TOG), volume 26, page 84. ACM, 2007. 2 +[27] Jie Yang, Lin Gao, Yu-Kun Lai, Paul L Rosin, and Shihong Xia. Biharmonic deformation transfer with automatic key point selection. Graphical Models, 98:1-13, 2018. 2 +[28] Han Zhang, Ian Goodfellow, Dimitris Metaxas, and Augustus Odena. Self-attention generative adversarial networks. arXiv preprint arXiv:1805.08318, 2018. 3 \ No newline at end of file diff --git a/neuralposetransferbyspatiallyadaptiveinstancenormalization/images.zip b/neuralposetransferbyspatiallyadaptiveinstancenormalization/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..5744cf5488562966e58c649e0e1a47bbf75fa5f2 --- /dev/null +++ b/neuralposetransferbyspatiallyadaptiveinstancenormalization/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7977dfe2c1d868c3f36c1014c30f5cd74b95b55929404a0e18ca464385dbd415 +size 536382 diff --git a/neuralposetransferbyspatiallyadaptiveinstancenormalization/layout.json b/neuralposetransferbyspatiallyadaptiveinstancenormalization/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..321d68a8083f01f275d281b340df68205c7959e7 --- /dev/null +++ b/neuralposetransferbyspatiallyadaptiveinstancenormalization/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3193f9874e20b70fc63e0d10c1b106476de747a26bf8e59acd564a7f2412a452 +size 323146 diff --git a/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/968d7b15-0d94-41d2-88f2-402dec7b9130_content_list.json b/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/968d7b15-0d94-41d2-88f2-402dec7b9130_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..128809721c727f5f661096770e44022c7f1cc952 --- /dev/null +++ b/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/968d7b15-0d94-41d2-88f2-402dec7b9130_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6c2edff916102679e669ad3f16f8c6ec6d73976f096d95ddba5906ed75ff5fa +size 79718 diff --git a/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/968d7b15-0d94-41d2-88f2-402dec7b9130_model.json b/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/968d7b15-0d94-41d2-88f2-402dec7b9130_model.json new file mode 100644 index 0000000000000000000000000000000000000000..8bac448c696fe7ef89a6adaacb764362c9ec5f7d --- /dev/null +++ b/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/968d7b15-0d94-41d2-88f2-402dec7b9130_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22ddffa8145f01a06b6172a6f69f702efc44deea61d933268d2a7ac850f08d09 +size 98294 diff --git a/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/968d7b15-0d94-41d2-88f2-402dec7b9130_origin.pdf b/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/968d7b15-0d94-41d2-88f2-402dec7b9130_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6c29a5e8b4bbc59bd56cb4702129d5e7d496342f --- /dev/null +++ b/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/968d7b15-0d94-41d2-88f2-402dec7b9130_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6cbf089484340a01cc5517cdd93b77cfc98ec415c4d53139377fb7d984ba840 +size 1704811 diff --git a/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/full.md b/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a3340145fe3894dfc3210bb5fa7b449988e8fda2 --- /dev/null +++ b/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/full.md @@ -0,0 +1,352 @@ +# NeuralScale: Efficient Scaling of Neurons for Resource-Constrained Deep Neural Networks + +Eugene Lee Chen-Yi Lee + +Institute of Electronics, National Chiao Tung University + +eugenelet.ee06g@nctu.edu.tw cylee@si2lab.org + +# Abstract + +Deciding the amount of neurons during the design of a deep neural network to maximize performance is not intuitive. In this work, we attempt to search for the neuron (filter) configuration of a fixed network architecture that maximizes accuracy. Using iterative pruning methods as a proxy, we parameterize the change of the neuron (filter) number of each layer with respect to the change in parameters, allowing us to efficiently scale an architecture across arbitrary sizes. We also introduce architecture descent which iteratively refines the parameterized function used for model scaling. The combination of both proposed methods is coined as NeuralScale. To prove the efficiency of NeuralScale in terms of parameters, we show empirical simulations on VGG11, MobileNetV2 and ResNet18 using CIFAR10, CIFAR100 and TinyImageNet as benchmark datasets. Our results show an increase in accuracy of $3.04\%$ , $8.56\%$ and $3.41\%$ for VGG11, MobileNetV2 and ResNet18 on CIFAR10, CIFAR100 and TinyImageNet respectively under a parameter-constrained setting (output neurons (filters) of default configuration with scaling factor of 0.25). + +# 1. Introduction + +The human brain contains around 100 billion of neurons [21] that are structured in such a way that they are utilized in an efficient manner. As the design of deep neural network (DNN) is inspired by the human brain, there's one key ingredient that is missing from the current design of DNNs: the efficient utilization of resources (parameters). + +The success of DNN is a composition of many factors. On an architectural level, various architectures have been proposed to increase the accuracy of DNNs targeting efficiency in computational cost (FLOPs) and size (parameters). In a modern DNN architectures, hyperparameters like width (neurons/filters), depth, skip-connections and ac + +![](images/20756dd822ce29fb961d0f94ce0b32e3604141640fd38db21ac77a69489c3925.jpg) +(a) NeuralScale. + +![](images/caf8f782823246d278e532dde8e1fe857457fe53613efd924dc157848ade3917.jpg) +(b) Uniform Scaling. +Figure 1: The input is represented as a green slab on the left, the output layer is the yellow bar on the right and intermediate layers are represented by 3D blocks with the width as its neuron (filter) number. The purple blocks are the final configuration of the neurons (filters). (a) shows our proposed method that non-linearly scales neurons (filters) across different layers to maximize performance. (b) is a uniform scaling method that is shown to be effective in [12]. + +tivation functions [38, 42] are the building blocks. Notable architectures that are constructed using those building blocks are: VGGNet [44], ResNet [18], DenseNet [24], GoogLeNet [45] and MobileNets [23, 43, 22]. Apart from the advances in architecture design, initialization of weights also helps in improving the accuracy of a DNN [11, 17]. + +We focus on optimizing the configuration of convolutional neural networks (CNNs) and shed light on the selection of the number of filters for each layer given a fixed architecture and depth. Our approach is complementary to the + +modern variants of CNNs (VGGNet, ResNet, MobileNet, etc.) through the introduction of a guided approach in tuning its width instead of just blindly stacking additional layers to boost accuracy. Our approach also investigates the conventional wisdom on filter selection stating that as we go deeper into the network, more filters are required to capture high-level information embedded in the features and to compensate with the gradual reduction in the spatial dimension which has efficiency in FLOPs as a byproduct. + +Intuitively speaking, the design of traditional CNNs is ad-hoc and introduces redundancy [29, 4]. This redundancy gives the opportunity for filter pruning techniques [15, 13, 29, 32] to strive, by conserving or improving accuracy using a lower parameter count. Current advances in pruning has led to a recent work by Liu et al. [33] that studies pruning in a new perspective. They show that pruning can be viewed as an architecture search method instead of just for removing redundancy. We incorporated this perspective along with the recent findings of EfficientNet [47] stating that through the search of an optimal ratio between the width, depth and resolution of a given architecture and dataset, the accuracy of a network can improve if scaled accordingly. Both these works led us to think that instead of finding the scale or ratio among the width, depth and resolution, we can scale the width of a CNN across several layers independently using global iterative pruning as a proxy. We hypothesize that if we are given a DNN with minimal redundant parameters, through the modeling of the change of neurons (filters) in each layer of the DNN with respect to the change in the total parameters of the DNN, we are able to scale the DNN across various sizes efficiently. Our approach can also be viewed as a variant of neural architecture search (NAS) where the search is on finding the optimal configuration of neurons (filters) across layers instead of searching for the optimal structure involving skip-connections or filter types [54, 30, 41, 50, 1, 31]. Our approach is comparatively light-weight as the only resource intensive task lies on the pruning of network. The gist of our proposed method is shown in Figure 1a. + +The rest of the paper is structured as follows. We first show related work on available pruning techniques and the role of pruning for neural architecture search in Section 2. We then show the details of our approach in Section 3. Extensive experiments on our proposed method is shown in Section 4. We finally conclude our paper in Section 5. + +# 2. Related Work + +Pruning of Deep Neural Network. Pruning of neural networks has been studied for decades with the goal of parameter reduction [27, 16]. Parameter reduction is important if a DNN needs to be deployed to targeted devices with limited storage capacity and computational resources. There are two ways to prune a network: structured + +pruning [32, 20, 39, 28, 34, 52] and unstructured pruning [13, 14, 15, 9]. For structured pruning, entire filters or neurons are removed from a layer of a network. Such pruning method can be deployed directly to a general computing architecture, e.g. GPU, to see improvement in speed. For unstructured pruning, individual weights are pruned, resulting in a sparse architecture. A dedicated hardware is required to exploit the speed-up contributed by the sparsity of weights. + +To prune a network, there are various criteria that have been studied. The most intuitive approach is to prune the weights based on its magnitude [15, 13, 29]. It was believed that the importance of weights is related to its magnitude. Although this approach is widely used in other works [9, 29, 19, 51], it is also shown on several works [35, 20, 27, 16] that magnitude pruning does not result in an architecture with the best performance. Pruning based on magnitude is adopted because of its simplicity when compared to more complicated pruning techniques, e.g. [16, 27] requires the computation of Hessian for pruning. A study proposed the use of geometric median [20] as a replacement of magnitude pruning for the criteria of network pruning. [35, 37] has also challenged the reliability of magnitude pruning and proposed the use of Taylor expansions to approximate the contribution of a filter to the final loss. Another intuitive way of pruning is through the addition of a regularizer to the loss function to force redundant weights to zero during training [15]. It has also been discovered that the scaling parameter used in Batch Normalization (BN) [25] can be used for structured pruning and yields performance better than pruning using magnitude [32]. A follow-up work that takes the shift term of BN into consideration for pruning is proposed in [52]. + +Neural Architecture Search via Pruning. There's a tremendous surge of efforts placed into the research of neural architecture search (NAS) techniques in the recent years on coming up with the most efficient architecture possible for a given task [54, 30, 41, 46, 3, 31]. NAS techniques are usually computationally expensive, limiting its applicability to research or corporate environment with limited computing resources. The search space of NAS is very broad and is defined distinctively across different works. Most of the search space involves the search of a suitable set of operations to be placed in a cell. The connections between different operations is also considered in the search space [2]. These cells are then stacked to increase network depth. + +In our work, we focus on the decision of the number of neurons (filters) required for each layer in a DNN. We use existing pruning techniques as a proxy to tackle this problem. The idea of using pruning as an architecture search method is not novel and has been discussed in [33, 9, 10, 7] where its applicability can be seen in MorphNet [12]. Liu et al. [33] show that through pruning, we are removing redun + +dancy from a network and the resulting network is efficient in terms of parameters. They also show that training the pruned architecture from scratch has comparable, if not better, accuracy than fine-tuned networks, indicating that the accuracy gain is from the resulting efficient architecture obtained via pruning. For the case of unstructured pruning, it is studied in [9, 10, 53] that a Lottery Ticket (LT) can be found via iterative unstructured pruning. A LT is a sparse architecture that is the result of unstructured pruning and has accuracy better than the original network (usually found at a parameter count of an order less than the parameter count of the original network). This finding indicates that pruning does introduce inductive bias [5] and adds evidence on the suitability of using pruning as an architecture search technique. This idea is proven in MorphNet [12] where a pruned architecture is scaled uniformly to meet the targeted parameter count and is repeated for several iterations. A single iteration of [12] is illustrated in Figure 1b. + +# 3. Method + +# 3.1. Parameter Tracking via Iterative Pruning + +To efficiently allocate neurons (filters) across different layers of a DNN that results in optimal accuracy given a parameter constraint, we model the change of neurons (filters) across layers with respect to the change of parameters. First, we need to begin with a network with minimal redundant parameters. To do so, a structured pruning method proposed by Molchanov et al. [35] that prunes iteratively is adopted. They proposed a pruning method that prunes neurons based on its importance. The importance of a parameter can be measured as the loss induced when it's removed from the network. They proposed the use of Taylor approximation as an efficient way to find parameters that are of less importance. A comprehensive comparison between their approach and an oracle (full combinatorial search over all parameters that results in minimum increase in loss) is done, proving its reliability. Here, we will give a brief introduction of their parameter pruning technique borrowed from their paper. The importance of a parameter is quantified by the error induced when it is removed from the network: + +$$ +\mathcal {I} _ {m} = \left(E (\mathcal {D}, \boldsymbol {W}) - E (\mathcal {D}, \boldsymbol {W} | w _ {m} = 0)\right) ^ {2}. \tag {1} +$$ + +Here, $\mathbf{W} = \{w_0, w_1, \dots, w_M\}$ are the set of parameters of a neural network supported by a dataset $\mathcal{D} = \{(x_0, y_0), (x_1, y_1), \dots, (x_K, y_K)\}$ of $K$ independent samples composed of inputs $x_k$ and outputs $y_k$ . (1) can be approximated by the second-order Taylor expansion as: + +$$ +\mathcal {I} _ {m} ^ {(2)} (\boldsymbol {W}) = \left(g _ {m} w _ {m} - \frac {1}{2} w _ {m} \boldsymbol {H} _ {m} \boldsymbol {W}\right) ^ {2}. \tag {2} +$$ + +$\pmb{H}$ is the Hessian matrix where $\pmb{H}_{m}$ is the $m$ -th row of it and $g_{m} = \frac{\partial E}{\partial w_{m}}$ (2) can be further approximated using the + +first-order expansion: + +$$ +\mathcal {I} _ {m} ^ {(1)} (\boldsymbol {W}) = \left(g _ {m} w _ {m}\right) ^ {2}. \tag {3} +$$ + +To minimize computational cost, (3) will be used since it is shown in [35] that the performance is on par with the second-order expansion and the first-order Taylor expansion is often used to estimate the importance of DNN components (weights, kernels or filters) [48, 36, 8]. Consistent with their work, a gate $z_{m}$ is placed after batch normalization layers [25] where the importance approximation is defined as: + +$$ +\mathcal {I} _ {m} ^ {(1)} (\boldsymbol {z}) = \left(\frac {\partial E}{\partial \boldsymbol {z} _ {m}}\right) ^ {2} = \left(\sum_ {s \in \mathcal {S} _ {m}} g _ {m} w _ {m}\right) ^ {2}, \tag {4} +$$ + +where $S_{m}$ corresponds to the set of weights $\mathbf{W}_{s\in S_m}$ before the gate. + +For a network composed of $L$ layers, we define the set of neurons (filters) for the entire network as $\{\phi_l\}_{l = 1}^L$ . $\phi_{l}$ is the number of neurons (filters) of layer $l$ . We then define the total number of parameters in a network as $\tau$ . As we are using an iterative pruning method, on every pruning iteration, we will obtain a set of $\tau$ 's and $\phi_l$ 's for the $l$ -th layer which can be represented as $\xi_{l} = \{\tau ,\phi_{l}\}$ . After pruning for $N$ iterations, we obtain $\pmb {\xi}_l = \{\{\tau^{(n)},\phi_l^{(n)}\}_{n = 1}^N\}$ . In our implementation, we start feeding $\xi_{l}$ 's into $\pmb {\xi}_l$ when all layers in a network is pruned by at least a single parameter. We conjecture that when all layers are pruned by at least a single parameter, most redundancy is removed and the residual parameters compose an efficient configuration. We stop pruning once the number of neurons (filters) is less than $\epsilon$ (we pick $\epsilon$ as $5 \%$ of the total neurons (filters) of the network in our implementation). Upon the completion of pruning, we have $\pmb {\xi}\in \mathbb{R}^{2\times N\times L}$ . The entire pruning process begins once we have trained our network for $P$ epochs (commonly known as network pre-training; we use the term pre-training epochs in our context instead) using a learning rate $\mu$ . The choice of $P$ is studied and the conventional wisdom on the requirement of pre-training a network to convergence before pruning is investigated in the Supp. Section 6.3. The pruning algorithm is summarized in Algorithm 1. + +# 3.2. Efficient Scaling of Parameters + +The goal of this work is to scale the neurons (filters) of a network across different layers to satisfy the targeted total parameter size denoted as $\hat{\tau}$ . For parameter scaling to match the targeted size, uniform scaling is used in MorphNet [12] and MobileNets [23] where all layers are scaled with a constant width multiplier. It is intuitive that the scale applied to neurons (filters) of different layers should be layer-dependent to maximize performance. In this work, we propose an efficient method to scale the number of neurons (filters) across different layers to maximize performance. + +Algorithm 1 Iterative Prune +1: procedure ITERATIVEPRUNE(f, D) +2: for P epochs do +3: Update f using learning rate μ +4: while ∑l=1L|zl|1 > ε do +5: Train f for Q iterations +6: ξ' ← Prune f using criteria (4) +7: if all layers pruned at least once then +8: ξ ← {ξ, ξ'} ▷ Record parameters +9: return ξ + +![](images/92202f51a56e4d47d9ddf1d5232caaa2a6018a6c9f13fc456539bd5731ffcb7c.jpg) +(a) CIFAR10. +Figure 2: Growth in number of filters of different layers across various network sizes. Each color represents independent layers of the convolutional filters of VGG11. Solid line is the residual filters obtained using an iterative pruning method and dashed line represents our approach on curve fitting. It can be observed that there's a pattern in the change of filters w.r.t. parameters which is dataset dependent. + +![](images/b07345a600601f9e433d9339723473c9022348163dcf3743ef8b1866cdf21a8b.jpg) +(b) CIFAR100. + +By using iterative pruning as a proxy, we parameterize the change of neurons (filters) across different layers with respect to the total parameters or simply put as $\frac{\partial\phi_l}{\partial\tau}$ . + +Modeling Parameter Growth. As discussed in the previous subsection, $\xi_{l}$ collected for each layer resembles the efficient set of neurons (filters) for each layer at a given size constraint. We can use this as a proxy to model $\frac{\partial\phi_l}{\partial\tau}$ . We first observe how the distribution of the residual neurons (filters) obtained using pruning scale across different $\tau$ 's, e.g. we use VGG11 as our network and CIFAR10/100 as our dataset to show the parameter growth across various sizes in Figure 2. We can observe that parameters across different layers don't scale linearly across different sizes, implying that uniform scaling is not an efficient scaling method. Figure 2 also shows us that the growth of the parameters resembles a power function that is monotonic. To fit the curves, we use: + +$$ +\phi_ {l} (\tau | \alpha_ {l}, \beta_ {l}) = \alpha_ {l} \tau^ {\beta_ {l}}, \tag {5} +$$ + +where every layer is paramterized independently by $\alpha_{l}$ and $\beta_{l}$ . To obtain these parameters, we can linearize the problem by taking $\ln$ on both sides of (5), giving us: + +$$ +\ln \phi_ {l} (\tau | \alpha_ {l}, \beta_ {l}) = \ln \alpha_ {l} + \beta_ {l} \ln \tau . \tag {6} +$$ + +Since we pruned the network iteratively for $N$ iterations, we obtain a set of linear equations which can be formulated into a matrix of the form: + +![](images/8ef49b97d6369c692fc6eb0c65f6c11db9ec299bb803e687ceeaa8094eed84ec.jpg) + +![](images/d505eace6b9fa1b35fe243da92a5c27ed7094e2872621c624e44d32b6a1ade21.jpg) + +We can solve for $\Theta$ in (7) using the least-squares approach or by taking the pseudoinverse of $\mathcal{T}$ and multiply it with $\Phi$ : + +$$ +\boldsymbol {\Theta} = \left(\boldsymbol {\mathcal {T}} ^ {T} \boldsymbol {\mathcal {T}}\right) ^ {- 1} \boldsymbol {\mathcal {T}} ^ {T} \boldsymbol {\Phi}. \tag {8} +$$ + +By using this method, we are able to fit the curves or $\xi_{l}$ 's obtained using iterative pruning of a network where the fitted results are shown in Figure 2. Our approach is a cost effective way of neural architecture parametrization and only takes two parameters $(\alpha$ and $\beta)$ per layer to parameterize the non-linear growth of the neuron (filter) count across various parameter sizes or $\frac{\partial\phi_l}{\partial\tau}$ . The simplicity of our approach also prevents the overfitting of noise embedded in the samples obtained via pruning. The search of parameters for efficient scaling is summarized in Algorithm 2. + +Algorithm 2 Search Parameters +1: procedure SEARCHPARAMS( $\xi$ ) +2: $\mathcal{T}, \Phi \gets \xi$ ▷ Convert to matrix form +3: $\Theta \gets (\mathcal{T}^T \mathcal{T})^{-1} \mathcal{T}^T \Phi$ +4: return Θ + +Meeting Parameter Constraints. Since our approach fully parameterizes the independent scaling of network width across various sizes, we can meet tight parameter constraints during deployment of a DNN to devices with limited resource budget. For approaches like uniform scaling [12, 33, 23], only the number of output neurons (filters) can be scaled while the network size is a function of the input and output neurons (filters), hence meeting parameter constraints can only be done by performing an iterative grid search on the number of output neurons (filters) required. + +For our approach, parameter scaling is intuitive as we can apply gradient descent on $\Phi$ w.r.t. $\tau$ . To do so, we define a DNN as $f(\pmb{x}|\pmb{W},\Phi(\tau|\Theta))$ where $f$ is a DNN architecture, $\pmb{x}$ is its input, $\pmb{W}$ are the weights of the DNN, and the + +additional condition $\Phi (\tau |\Theta)$ is introduced to parameterize the number of neurons (filters) required for each layer of a DNN. We then define a function $h$ that computes the number of parameters of a DNN. $h$ is architecture dependent. + +Given a parameter constraint $\hat{\tau}$ that needs to be met, we can generate an architecture having total parameters close to $\hat{\tau}$ by performing stochastic gradient descent (SGD) on $\Phi (\tau ,\Theta)$ w.r.t. $\tau$ . Like other gradient descent problems, parameter initialization is important and the best way to do so is to fit $\hat{\tau}$ into (5) giving us: + +$$ +\phi_ {l} \left(\hat {\tau} \mid \alpha_ {l}, \beta_ {l}\right) = \alpha_ {l} \hat {\tau} ^ {\beta_ {l}}. \tag {9} +$$ + +This gives us a good initial point, however there will still be a discrepancy between $h(f(\boldsymbol{x}|\boldsymbol{W}, \Phi(\hat{\tau}|\boldsymbol{\Theta})))$ and $\hat{\tau}$ which can be fixed by applying SGD on $\frac{1}{2} (\phi_l(\tau|\alpha_l, \beta_l) - \hat{\tau})^2$ w.r.t. to $\tau$ where the update of $\tau$ is given as: + +$$ +\begin{array}{l} \tau_ {i} = \tau_ {i - 1} - \Delta \tau_ {i - 1} (10) \\ = \tau_ {i - 1} - \eta (h (f (\boldsymbol {x} | \boldsymbol {W}, \Phi (\tau_ {i - 1} | \boldsymbol {\Theta}))) - \hat {\tau}) \sum_ {l = 1} ^ {L} \beta_ {l} \alpha_ {l} \tau_ {i - 1} ^ {\beta_ {l} - 1}. (11) \\ \end{array} +$$ + +Here, the subscript of $\tau$ corresponds to the SGD iteration and the full proof of (11) is given in Supp. Section 6.1. Since the number of parameters of an architecture is a monotonic function of $\Phi$ , this problem is convex and converges easily. If the learning rate $\eta$ is set carefully, we are able to obtain an architecture with total parameters close to $\hat{\tau}$ . We summarize this procedure in Algorithm 3. + +Algorithm 3 Generate Network Using Searched Parameters +1: procedure GENERATENET(Θ, f, $\hat{\tau}$ ) +2: $\tau \gets \hat{\tau}$ ▷ Initialize parameter +3: while not converged do +4: $\tau \gets \tau - \Delta \tau$ ▷ Update using SGD as in (11) +5: for l ← 1 to L do ▷ Layer-wise architecture update +6: $f_{l} \gets$ set output neurons (filters) as $\phi_{l}(\tau|\Theta_{l})$ (5) +7: return f + +# 3.3. Architecture Descent for Model Refinement + +Like any gradient descent algorithm, initialization plays an important role and affects the convergence of an algorithm. Our approach is similar in way where we attempt to search for the configuration of an architecture given an initial configuration, e.g. VGGNet [44] and ResNet [18] consist of a set of predefined filter numbers for different configurations. As our approach behaves similarly to gradient descent, we coin it architecture descent as there is no gradient involved and it is descending in the loss surface by making iterative changes to the architecture's configuration. + +We define an iteration of architecture descent as a single run of Algorithm 1, 2 and 3 that corresponds to iterative pruning, parameter searching and network generation. Upon the completion of iterative pruning and parameter searching, we obtain a set of parameters that scales our network in a more efficient manner. We can then use this set of parameters to scale-up our network as shown in Algorithm 3 for further pruning. We then proceed with several iterations of architecture descent until the changes in the architecture configuration is minuscule, indicating convergence. By applying architecture descent, we are descending on the loss surface that is parameterized by $\Theta$ instead of a loss surface parameterized by its weights $W$ performed in gradient descent. Architecture descent is summarized in Algorithm 4. NeuralScale is a composition of all algorithms we proposed as illustrated in Figure 1a. + +Algorithm 4 Architecture Descent +1: procedure ARCHITECTUREDESCENT(f, D, τ) +2: while not converged do +3: ξ ← ITERATIVEPRUNE(f, D)▷ Taylor FO [35] +4: Θ ← SEARCHPARAMS(ξ) +5: f ← GENERATENET(θ, f, τ) +6: return f ▷ Network with scaled parameters + +# 4. Experiments + +In this section, we show experiments illustrating the importance of architecture descent. We then proceed with the benchmarking of our approach using public datasets, e.g. CIFAR10/100 [26] and TinyImageNet (subset of ImageNet [6] with images downsampled to $64 \times 64$ and consists of 200 classes having 500 training and 50 validation samples for each class) on commonly used architectures, e.g. VGG11 [44], MobileNetV2 [43] and ResNet18 [18]. All experiments are run on a single GTX1080Ti GPU using PyTorch [40] as our deep learning framework. We use SGD as our optimizer with an initial learning rate of 0.1, momentum set to 0.5 and a weight decay factor of $5^{-4}$ . Training of network that uses CIFAR10 and CIFAR100 are run for 300 epochs using a step decay of learning rate by at factor of 10 at epochs 100, 200 and 250 whereas network trained using TinyImageNet are run for 150 epochs with a decay in learning rate by a factor of 10 at epochs 50 and 100. For iterative pruning, we first train our network for $P = 10$ epochs using a learning rate of 0.1 and is decayed by a factor of 10 every 10 epochs. Source code is made available at https://github.com/eugenelet/NeuralScale. + +# 4.1. Importance of Architecture Descent + +For all experiments, we run architecture descent for 15 iterations. We show configurations with total parameters + +matching total parameters of network with its default set of filters uniformly scaled to a ratio, $r$ . $r = 0.25, 2$ for CIFAR10 and CIFAR100. $r = 0.25, 1$ for TinyImageNet. + +VGG11. Using a relatively shallow network, we demonstrate the application of architecture descent using CIFAR10 and CIFAR100 as shown in Figure 3. By observing the resulting architecture configuration, we can make two conjectures. First, we show that conventional wisdom on network design that gradually increases the number of filters as we go deeper in a convolutional network does not guarantee optimal performance. It can be observed that the conventional wisdom on network design holds up to some level (layer 4) and bottlenecking of parameters can be observed up to the penultimate layer which is followed by a final layer which is comparatively larger. Second, the scaling of network should not be done linearly as was done in [23] and should follow a non-linear rule that we attempt to approximate using a power function. If we look closely, by applying architecture descent on datasets of higher complexity generates network with configuration that has more filters allocated toward the end. Our conjecture is that more resources are needed to capture the higher level features when the task is more difficult whereas for simple classification problem like CIFAR10, more resource is allocated to earlier layers to generate more useful features. These observations give us a better understanding on how resource should be allocated in DNNs and can be used as a guideline for deep learning practitioners in designing DNNs. A single iteration of architecture descent for VGG11 on CIFAR10/100 is approximately 20 minutes. + +MobileNetV2. We show the application of architecture descent on a more sophisticated architecture known as MobileNetV2 using CIFAR100 and TinyImageNet in Figure 3. Here, we only apply our search algorithm on deciding the size of the bottleneck layers while the size of the expansion layer follows the same expansion rule found in [43] where an expansion factor of $6 \times$ is used. The resulting configuration closely resembles the one found using a feedforward network like VGG. It can also be observed that resources are allocated toward the output for a more sophisticated dataset. A single iteration of architecture descent for MobileNetV2 on CIFAR100 and TinyImageNet is approximately 50 minutes and 1.2 hour respectively. + +ResNet18. The application of architecture descent on ResNet18 using CIFAR100 and TinyImageNet is shown in Figure 3. We observe a different pattern of architecture configuration when compared to a simple feed forward network like VGG. This is an interesting observation as it agrees with the interpretation of residual networks as an ensemble of many paths of different lengths shown in [49]. An- + +![](images/fe3e9c3bb7920cf7177b47dbcbf2dcb673b9fa47e52a99cc4a249b14b1ced557.jpg) + +![](images/3c96847233c8fc4096149a2cfd3ff026b1274c4d80e9a2c8d2ce064e4c5bcb4c.jpg) + +![](images/9c77223c4677081e35bdf541dfe7f20185fa3b861e53e19d60f365c5ae455ca4.jpg) + +![](images/956b8c3d05e78fb3f5a9c3ec30f544a3f492f5557604ac173f244dad46dea035.jpg) + +![](images/85292cb828a777ee8dbe5f594f4e552956b13e65cc307352b7fc08f9116df64c.jpg) + +![](images/e535640cdeddb4057e8f5f8c8e67898405914f8b164a6ece38276e316b134492.jpg) + +![](images/6813ad1e192a9864feaf9c1e2ee3b4dacb45f1d4219c5129f05d5ca238dccd02.jpg) + +![](images/1f7d2ab4dfece4a1a138c18bbdb5977365e07366c7015b1e14268f3a97a1a7ab.jpg) + +![](images/97fa81f6d1aab9f2dae5e7cfdd712483433de57750fa8f4e9ecab26a7f5d7112.jpg) + +![](images/c9f54531596c431e0b316f68e36361ccd7017fc3bc6e23eded4ce762fdff2673.jpg) + +![](images/f1f890c50f363b4b4254157ba1f5d4df13c792d181433f2ffc4abb3195166c81.jpg) +Figure 3: Shows the number of filters for each layer by running architecture descent for 15 iterations on various architecture-dataset pair. Vertical and horizontal axis of each plot corresponds to the filter number and architecture descent iteration respectively. $r$ is the uniform scaling ratio applied to the default configuration. Best viewed in color. + +![](images/d885a5e50b023131f7d092e972fc5b8745f22231527030784350a679cc2b1c72.jpg) + +other observation is that if we look only at a single layer of every residual block (each block consists of two layers), the searched configuration for ResNet follows the pattern found in VGG where there's a smooth gradient of filter progression across layers. A single iteration of architecture descent for ResNet18 on CIFAR100 and TinyImageNet is approximately 50 minutes and 45 minutes respectively. + +# 4.2. Benchmarking of NeuralScale + +Here, we compare the accuracy of NeuralScale with the first (Iteration=1, to compare with MorphNet [12]) and last (Iteration=15) iteration of architecture descent with a uniform scaling (baseline) method and a method where a network is first pruned using Taylor-FO [35] until it has $50\%$ + +of filters left and then scaled uniformly (resembling the first iteration of MorphNet [12] and the use of [35] is to match our pruning method for a fair comparison), named as MorphNet (Taylor-FO) in our comparison tables and plots. The accuracy is obtained by averaging across the maximum test accuracy of 5 independent simulations. For the accuracy plots in Figure 4 and 5, the output filters of the original network are scaled to the ratios from 0.25 to 2 with an increment of 0.25 for CIFAR10/100 along with 0.25, 0.5, 0.75 and 1 for TinyImageNet. For the comparison tables, only the ratios 0.25, 0.75, 2 for CIFAR10/100 and 0.25, 0.75 for TinyImageNet are reported. Comparisons are also made with a structured magnitude pruning method [29] where we first pre-train our network using the same prescription for other methods and proceed with 40 and 20 epochs of fine-tuning for CIFAR10/100 and TinyImageNet respectively, using a learning rate of 0.001. We only show results for VGG11-CIFAR10, MobileNetV2-CIFAR100 and ResNet18-TinyImageNet in Table 1 and the rest are deferred to Supp. Section 6.2. Note that all methods are trained from scratch and only [29] is trained using the pretrain-prune-finetuning pipeline. Results show that the hypothesis in [33] holds (training from scratch performs better). As our approach is designed for platforms with structured parallel computing capability like GPUs, we report the latency of different methods instead of FLOPs. Note that our approach isn't optimized for latency. Here, latency is defined as the time required for an input to propagate to the output. All latencies reported in Table 1 are based on a batch size of 100 where 20 batches are first fed for warm-up of cache and is proceeded with 80 batches which are averaged to give the final latencies. As a comparison of latency based solely on the scale of parameter in Table 1 is unintuitive, we show a plot comparing accuracy of different methods against latency in Figure 5. + +VGG11. By observing the comparison plot shown in Figure 4a and 4b, our approach compares favourably in terms of parameter efficiency for CIFAR10 and CIFAR100. As shown in Table 1, at the lowest parameter count, an accuracy gain of $3.04\%$ is obtained for CIFAR10. Efficiency in latency of our approach is also comparable with the baseline approach as shown in Figure 5a and 5b. Diminishing returns are observed when the network increases in size. We conjecture that as the network grows larger, more subspaces are covered, hence the network can still adapt to the suboptimal configuration by suppressing redundant parameters. Another observation is that the performance gain is more substantial on a more complicated dataset which is intuitive as inductive bias is introduced in an architectural level. + +MobileNetV2. The application to MobileNetV2 is to show the extensibility of our approach to a delicately hand + +![](images/10b7778b0928f6d6f8699e085e5ac4eddb03c35de05a531b1d5d53313b58be33.jpg) +(a) VGG11 on CIFAR10. + +![](images/2056699c0ccffba65de46e434e39b56c7fbc90682c4938366501bb98814cb2d3.jpg) +(b) VGG11 on CIFAR100. + +![](images/1e60ad925ea244db875f503d23ee3f33e42c1da401165818f9acdf5b65a96c5c.jpg) +(c) MobileNetV2 on CIFAR100. + +![](images/11e5f06e408da64a8597d5d6dd9789578a99c7c5a8f3e0679736c581114900d1.jpg) +(d) MobileNetV2 on TinyImageNet. + +![](images/3d1bf6740e5db41654bba4c40f575ed68fdfb7a4c58a2b2403b1fb7fd0642875.jpg) +(e) ResNet18 on CIFAR100. + +![](images/227d5e64c1799a024b7e52f846990a14a2ed598a46b548e450e960b3ec81d2f8.jpg) +(f) ResNet18 on TinyImageNet. +Figure 4: All plots are organized such that each row corresponds to a single architecture, e.g. (a),(b) corresponds to VGG11, (c),(d) corresponds to MobileNetV2 and (e),(f) corresponds to ResNet18. Each plot consists of the accuracy comparison of different scaling methods (applied on the width), plotted against different parameter scales. The shaded region of each line corresponds to the maximum and minimum accuracy across 5 independent simulations. + +crafted architecture. Our approach is superior in parameter efficiency (most cases) when compared to other methods as shown in Figure 4c and 4d. As shown in Table 1, an accuracy gain of $8.56\%$ for CIFAR100 relative to baseline is observed at a scaling ratio of 0.25. Our approach is also efficient in latency as shown in Figure 5c. An unintuitive observation can be seen on the experiment for TinyImageNet where the accuracy at iteration 1 outperforms iteration 15 for NeuralScale at ratio 0.25. The accuracy is below the baseline when more parameters are used. As the default configuration of MobileNetV2 has consistent filters, the default shortcut connections are identity mappings. We hypothesize that the switch from identity mapping to a convolutional mapping for the shortcut connection is the culprit. Empirical study is done in Supp. Section 6.4 with results supporting our hypothesis and explaining the observations. + +![](images/1fa1c3c50d8984c59e42c39c37f8cac6bc0708efa713398e80bd956658354027.jpg) +(a) VGG11 on CIFAR10. + +![](images/c1f4bc0f7be89e218f3862e8808cbcfc5c06858c48601fc08ececa952b23eb0e.jpg) +(b) VGG11 on CIFAR100. + +![](images/d1318dc53efff6d5d202fc1d0e5325b815cffed3b51577f925f10d078767a0e3.jpg) +(c) MobileNetV2 on CIFAR100. + +![](images/8bf29f50adbb0a747a82db27958701d6fcb8eca2c082c8db77ec5c125c5e15ab.jpg) +(d) MobileNetV2 on TinyImageNet. + +![](images/f6ef5c00edd7053166e8286cbf7754fea3d26edde1719f430b3f769ea9deddc4.jpg) +(e) ResNet18 on CIFAR100. + +![](images/ce47ab2ab6766a47128c618b42923e1b051723bff269557abd8d7db0f7a77fc0.jpg) +(f) ResNet18 on TinyImageNet. +Figure 5: The layout of these plots are structured as shown in Figure 4. The only difference is that the accuracies of different methods are plotted against latencies. + +ResNet18. As shown from the accuracy comparison plot in Figure 4e and 4f, substantial accuracy gain under different parameter scales is observed. From Table 1, an accuracy gain of $3.41\%$ is observed for TinyImageNet at a scale of 0.25. Accuracy gain using architecture descent is also more pronounced here. The accuracy gain here is in contradictory with the results in [33] (no gain in accuracy observed) probably due to the better pruning technique we use [35]. In Figure 5e and 5f our approach is comparable and in most cases better than the baseline configuration in latency. + +# 5. Conclusion + +In this work, we propose a method to efficiently scale the neuron (filter) number of an architecture. We hypothesize that the scaling of network should follow a non-linear rule and is shown empirically that through our approach, networks efficient in parameters across different scales can be generated using this rule. Our empirical results on architecture descent also shed light on the efficient allocation of parameters in a deep neural network. As our approach is computationally-efficient and is complementary to most + +Table 1: Comparison of various network-dataset pairs. + +
MethodParamsLatencyAccuracy (%)
Uniform Scale (Baseline)VGG11 CIFAR10
0.58M1.29ms88.18 ± 0.16
5.20M4.31ms91.64 ± 0.10
36.89M18.86ms92.96 ± 0.09
Li et al. [29]†5.20M4.75ms91.12 ± 0.02
MorphNet [12] (Taylor-FO [35])0.58M2.07ms90.60 ± 0.11
5.22M8.43ms92.60 ± 0.09
36.72M48.52ms93.18 ± 0.11
NeuralScale (Iteration = 1)0.58M2.56ms91.13 ± 0.07
5.20M8.89ms92.61 ± 0.15
36.88M37.39ms93.31 ± 0.05
NeuralScale (Iteration = 15)0.58M2.94ms91.22 ± 0.15
5.20M12.52ms92.63 ± 0.12
36.90M53.35ms93.29 ± 0.09
+ +
MobileNetV2 CIFAR100
Uniform Scale (Baseline)0.20M5.37ms57.80 ± 0.31
1.42M7.46ms67.85 ± 0.38
9.30M19.69ms72.40 ± 0.22
Li et al. [29]†1.42M7.71ms67.12 ± 0.08
MorphNet [12] (Taylor-FO [35])0.20M6.14ms57.51 ± 0.36
1.42M10.95ms67.51 ± 0.48
9.30M26.53ms72.29 ± 0.28
NeuralScale (Iteration = 1)0.19M5.69ms66.00 ± 0.12
1.40M11.73ms70.23 ± 0.25
9.21M21.32ms72.37 ± 0.12
NeuralScale (Iteration = 15)0.19M7.84ms66.36 ± 0.28
1.41M17.89ms71.94 ± 0.45
9.27M40.48ms74.73 ± 0.26
+ +
ResNet18 TinyImageNet
Uniform Scale (Baseline)0.73M3.02ms50.54 ± 0.37
6.36M11.56ms56.68 ± 0.28
Li et al. [29]†6.36M11.93ms54.72 ± 0.24
MorphNet [12] (Taylor-FO [35])0.72M3.80ms50.79 ± 0.38
6.39M14.83ms56.78 ± 0.85
NeuralScale (Iteration = 1)0.72M5.96ms51.66 ± 0.80
6.42M14.58ms57.89 ± 0.28
NeuralScale (Iteration = 15)0.72M6.42ms53.95 ± 0.53
6.40M17.52ms58.40 ± 0.54
+ +† Fine-tuned using pre-trained network (not trained from scratch). + +techniques and architectures, the inclusion to existing deep learning framework is cost-effective and results in a model of higher accuracy under the same parameter constraint. + +# References + +[1] Irwan Bello, Barret Zoph, Vijay Vasudevan, and Quoc V Le. Neural optimizer search with reinforcement learning. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 459–468. JMLR.org, 2017. 2 +[2] Gabriel Bender, Pieter-Jan Kindermans, Barret Zoph, Vijay Vasudevan, and Quoc Le. Understanding and simplifying one-shot architecture search. In International Conference on Machine Learning, pages 549-558, 2018. 2 +[3] Han Cai, Ligeng Zhu, and Song Han. Proxylessnas: Direct neural architecture search on target task and hardware. arXiv preprint arXiv:1812.00332, 2018. 2 +[4] Michael Cogswell, Faruk Ahmed, Ross Girshick, Larry Zitnick, and Dhruv Batra. Reducing overfitting in deep networks by decorrelating representations. arXiv preprint arXiv:1511.06068, 2015. 2 +[5] Nadav Cohen and Amnon Shashua. Inductive bias of deep convolutional networks through pooling geometry. arXiv preprint arXiv:1605.06743, 2016. 3 +[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. 5 +[7] Xiaohan Ding, Guiguang Ding, Yuchen Guo, Jungong Han, and Chenggang Yan. Approximated oracle filter pruning for destructive cnn width optimization. arXiv preprint arXiv:1905.04748, 2019. 2 +[8] Xiaohan Ding, Xiangxin Zhou, Yuchen Guo, Jungong Han, Ji Liu, et al. Global sparse momentum sgd for pruning very deep neural networks. In Advances in Neural Information Processing Systems, pages 6379-6391, 2019. 3 +[9] Jonathan Frankle and Michael Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural networks. arXiv preprint arXiv:1803.03635, 2018. 2, 3 +[10] Jonathan Frankle, Gintare Karolina Dziugaite, Daniel M Roy, and Michael Carbin. The lottery ticket hypothesis at scale. arXiv preprint arXiv:1903.01611, 2019. 2, 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. 1 +[12] 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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1586-1595, 2018. 1, 2, 3, 4, 6, 7, 8, 11, 17 +[13] 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. 2 +[14] Song Han, Jeff Pool, Sharan Narang, Huizi Mao, Shijian Tang, Erich Elsen, Bryan Catanzaro, John Tran, and William J Dally. Dsd: regularizing deep neural networks with dense-sparse-dense training flow. arXiv preprint arXiv:1607.04381, 3(6), 2016. 2 + +[15] 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. 2 +[16] Babak Hassibi and David G Stork. Second order derivatives for network pruning: Optimal brain surgeon. In Advances in neural information processing systems, pages 164-171, 1993. 2 +[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, pages 1026-1034, 2015. 1 +[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. 1, 5 +[19] 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. 2 +[20] Yang He, Ping Liu, Ziwei Wang, Zhilan Hu, and Yi Yang. Filter pruning via geometric median for deep convolutional neural networks acceleration. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4340-4349, 2019. 2 +[21] Suzana Herculano-Houzel. The human brain in numbers: a linearly scaled-up primate brain. Frontiers in human neuroscience, 3:31, 2009. 1 +[22] 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 preprint arXiv:1905.02244, 2019. 1 +[23] Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andretto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017. 1, 3, 4, 6 +[24] 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. 1 +[25] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. 2, 3 +[26] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. Technical report, Cite-seer, 2009. 5 +[27] Yann LeCun, John S Denker, and Sara A Solla. Optimal brain damage. In Advances in neural information processing systems, pages 598-605, 1990. 2 +[28] Namhoon Lee, Thalaiyasingam Ajanthan, and Philip HS Torr. Snip: Single-shot network pruning based on connection sensitivity. arXiv preprint arXiv:1810.02340, 2018. 2 +[29] Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. arXiv preprint arXiv:1608.08710, 2016. 2, 7, 8, 11 + +[30] Chenxi Liu, Barret Zoph, Maxim Neumann, Jonathon Shlens, Wei Hua, Li-Jia Li, Li Fei-Fei, Alan Yuille, Jonathan Huang, and Kevin Murphy. Progressive neural architecture search. In Proceedings of the European Conference on Computer Vision (ECCV), pages 19–34, 2018. 2 +[31] Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. arXiv preprint arXiv:1806.09055, 2018. 2 +[32] Zhuang Liu, Jianguo Li, Zhiqiang Shen, Gao Huang, Shoumeng Yan, and Changshui Zhang. Learning efficient convolutional networks through network slimming. In Proceedings of the IEEE International Conference on Computer Vision, pages 2736-2744, 2017. 2 +[33] Zhuang Liu, Mingjie Sun, Tinghui Zhou, Gao Huang, and Trevor Darrell. Rethinking the value of network pruning. arXiv preprint arXiv:1810.05270, 2018. 2, 4, 7, 8 +[34] Jian-Hao Luo, Jianxin Wu, and Weiyao Lin. Thinet: A filter level pruning method for deep neural network compression. In Proceedings of the IEEE international conference on computer vision, pages 5058-5066, 2017. 2 +[35] 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. 2, 3, 5, 6, 7, 8, 11, 17 +[36] Pavlo Molchanov, Stephen Tyree, Tero Karras, Timo Aila, and Jan Kautz. Pruning convolutional neural networks for resource efficient inference. arXiv preprint arXiv:1611.06440, 2016. 3 +[37] Pavlo Molchanov, Stephen Tyree, Tero Karras, Timo Aila, and Jan Kautz. Pruning convolutional neural networks for resource efficient transfer learning. arXiv preprint arXiv:1611.06440, 3, 2016. 2 +[38] 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. 1 +[39] 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. 2 +[40] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in PyTorch. In NIPS Autodiff Workshop, 2017. 5 +[41] Hieu Pham, Melody Y Guan, Barret Zoph, Quoc V Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. arXiv preprint arXiv:1802.03268, 2018. 2 +[42] Prajit Ramachandran, Barret Zoph, and Quoc V Le. Searching for activation functions. arXiv preprint arXiv:1710.05941, 2017. 1 +[43] 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. 1, 5, 6 + +[44] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 1, 5 +[45] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1-9, 2015. 1 +[46] Mingxing Tan, Bo Chen, Ruoming Pang, Vijay Vasudevan, Mark Sandler, Andrew Howard, and Quoc V Le. Mnasnet: Platform-aware neural architecture search for mobile. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2820-2828, 2019. 2 +[47] Mingxing Tan and Quoc V Le. Efficientnet: Rethinking model scaling for convolutional neural networks. arXiv preprint arXiv:1905.11946, 2019. 2 +[48] Lucas Theis, Iryna Korshunova, Alykhan Tejani, and Ferenc Huszar. Faster gaze prediction with dense networks and fisher pruning. arXiv preprint arXiv:1801.05787, 2018. 3 +[49] Andreas Veit, Michael J Wilber, and Serge Belongie. Residual networks behave like ensembles of relatively shallow networks. In Advances in neural information processing systems, pages 550-558, 2016. 6 +[50] Sirui Xie, Hehui Zheng, Chunxiao Liu, and Liang Lin. Snas: stochastic neural architecture search. arXiv preprint arXiv:1812.09926, 2018. 2 +[51] Tien-Ju Yang, Yu-Hsin Chen, and Vivienne Sze. Designing energy-efficient convolutional neural networks using energy-aware pruning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5687-5695, 2017. 2 +[52] Chenglong Zhao, Bingbing Ni, Jian Zhang, Qiwei Zhao, Wenjun Zhang, and Qi Tian. Variational convolutional neural network pruning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2780-2789, 2019. 2 +[53] Hattie Zhou, Janice Lan, Rosanne Liu, and Jason Yosinski. Deconstructing lottery tickets: Zeros, signs, and the supermask. arXiv preprint arXiv:1905.01067, 2019. 3 +[54] Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016. 2 \ No newline at end of file diff --git a/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/images.zip b/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..caa45042a214e64e7228dbe555dfcecd162b7d7b --- /dev/null +++ b/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca377b559d868ceb281a6c745ce6ef1c72755468ad06118e6eed877994986fc7 +size 598292 diff --git a/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/layout.json b/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..79de95730faf5fadee988d3c84e4641809062df0 --- /dev/null +++ b/neuralscaleefficientscalingofneuronsforresourceconstraineddeepneuralnetworks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b681c3d17da706d92a286b2aaee28eb062cf17824301d13d780a64fb5f5ee68b +size 418320 diff --git a/neuraltopologicalslamforvisualnavigation/83c60346-01cd-49e1-8294-0d0f2fd7db01_content_list.json b/neuraltopologicalslamforvisualnavigation/83c60346-01cd-49e1-8294-0d0f2fd7db01_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..8cc418f436618e82e613448b09ddf9a891592d7c --- /dev/null +++ b/neuraltopologicalslamforvisualnavigation/83c60346-01cd-49e1-8294-0d0f2fd7db01_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3286a95b9302886d0f6a7ffab3f497d29da93880cab178109de675186db49993 +size 69981 diff --git a/neuraltopologicalslamforvisualnavigation/83c60346-01cd-49e1-8294-0d0f2fd7db01_model.json b/neuraltopologicalslamforvisualnavigation/83c60346-01cd-49e1-8294-0d0f2fd7db01_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4fb47c33a04d2cc892c68efccb67a6f1f0adcc95 --- /dev/null +++ b/neuraltopologicalslamforvisualnavigation/83c60346-01cd-49e1-8294-0d0f2fd7db01_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de6d012e656df5272036691dc2dc402011e5825d358ceb71ff5448b4c4d3ad61 +size 86117 diff --git a/neuraltopologicalslamforvisualnavigation/83c60346-01cd-49e1-8294-0d0f2fd7db01_origin.pdf b/neuraltopologicalslamforvisualnavigation/83c60346-01cd-49e1-8294-0d0f2fd7db01_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7ad3c808e173939a5e0b085756541df4a43814cc --- /dev/null +++ b/neuraltopologicalslamforvisualnavigation/83c60346-01cd-49e1-8294-0d0f2fd7db01_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64a6dd6fc672d86b8b1dc40d3992fff62835e8b750c0196847c47bc14edfff78 +size 1168173 diff --git a/neuraltopologicalslamforvisualnavigation/full.md b/neuraltopologicalslamforvisualnavigation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f1e088df02229fbd4aae9faae59c4791f80efc45 --- /dev/null +++ b/neuraltopologicalslamforvisualnavigation/full.md @@ -0,0 +1,239 @@ +# Neural Topological SLAM for Visual Navigation + +Devendra Singh Chaplot $^{1\dagger}$ , Ruslan Salakhutdinov $^{1*}$ , Abhinav Gupta $^{1,2*}$ , Saurabh Gupta $^{3*}$ $^{1}$ Carnegie Mellon University, $^{2}$ Facebook AI Research, $^{3}$ UIUC + +Project webpage: https://devendrachaplot.github.io/projects/Neural-Topological-SLAM + +# Abstract + +This paper studies the problem of image-goal navigation which involves navigating to the location indicated by a goal image in a novel previously unseen environment. To tackle this problem, we design topological representations for space that effectively leverage semantics and afford approximate geometric reasoning. At the heart of our representations are nodes with associated semantic features, that are interconnected using coarse geometric information. We describe supervised learning-based algorithms that can build, maintain and use such representations under noisy actuation. Experimental study in visually and physically realistic simulation suggests that our method builds effective representations that capture structural regularities and efficiently solve long-horizon navigation problems. We observe a relative improvement of more than $50\%$ over existing methods that study this task. + +# 1. Introduction + +Imagine you are in a new house as shown in Fig 1 and you are given the task of finding a target object as shown in Fig 1 (top). While there are multiple possible directions to move, most of us would choose the path number 2 to move. This is because we use strong structural priors - we realize the target is an oven which is more likely to be found in the kitchen which seems accessible via path number 2. Now let us suppose, once you reach the oven, your goal is to reach back to the living room which you saw initially. How would you navigate? The answer to this question lies in how we humans store maps (or layout) of the house we just traversed. One possible answer would be metric maps, in which case we would know exactly how many steps to take to reach the living room. But this is clearly not how we humans operate [16,41]. Instead, most of us would first get out of the kitchen by moving to the hallway and then navigate to the living room which is visible from the hallway. + +It is clear from the above examples, there are two main + +![](images/f4e98ad240e71a9aadf3b9ae1fe885c527c5f0b958fc92d32b476925461fc571.jpg) +Figure 1: Semantic Priors and Landmarks. When asked to go to target image of an oven most humans would use the path number 2 since it allows access to kitchen. Humans use semantic priors and common-sense to explore and navigate everyday yet most navigation algorithms struggle to do so. + +components of a successful visual navigation algorithm: (a) ability to build spatial representations and store them; (b) ability to exploit structural priors. When it comes to spatial representations, the majority of papers in navigation insist on building metrically precise representations of free space. However, metric maps have two major shortcomings: first, metric maps do not scale well with environment size and amount of experience. But more importantly, actuation noise on real-robots makes it challenging to build consistent representations, and precise localization may not always be possible. When it comes to exploiting structural priors, most learning-based approaches do not model these explicitly. Instead, they hope the learned policy function has these priors encoded implicitly. But it still remains unclear if these policy functions can encode semantic priors when learned via RL. + +In this paper, we propose to tackle both the problems head-on. Instead of using metric-maps which are brittle to localization and noise, we propose a topological representation of the space. Our proposed representation consists of nodes that are connected in the form of a graph, based on local geometry information. Each node is repre + +![](images/1728dd9e3dc4309a3aa403d68aaf533d8b0ded21ec1cc69579ac7e404d8402e8.jpg) +Figure 2: Model Overview. Figure showing an overview of the proposed model, Neural Topological SLAM. It consists of 3 components, a Graph Construction module which updates the topological map as it receives observations, a Global Policy which samples subgoals, and a Local Policy which takes navigational actions to reach the subgoal. See text for more details. + +sented visually via a 360-degree panoramic image. Nodes are connected to each other using approximate relative pose between them. But what makes our visual topological maps novel are two directional functions $\mathcal{F}_g$ and $\mathcal{F}_s$ , which extract geometric and semantic properties of nodes. Specifically, $\mathcal{F}_g$ estimates how likely agent will encounter free-space and $\mathcal{F}_s$ estimates how likely target image is to be encountered if the agent moves in a particular direction. By explicitly modeling and learning function $\mathcal{F}_s$ , our model ensures that structural priors are encoded and used when exploring and navigating new unseen environments. + +Our representation has few advantages over classical and end-to-end learning-based approaches: (a) it uses graph-based representation which allows efficient long-term planning; (b) it explicitly encodes structural priors via function $\mathcal{F}_s$ ; (c) the geometric function $\mathcal{F}_g$ allows efficient exploration and online map building for a new environment; (d) but most importantly, all the functions and policies can be learned in completely supervised manner forgoing the need for unreliable credit assignment via RL. + +# 2. Related Work + +Our paper makes contributions across the following multiple aspects of the navigation problem: space representation, training paradigm for navigation policies, and different navigation tasks. We survey works in these areas below. + +Navigation Tasks. Navigation tasks can be divided into two main categories. The first category of tasks is ones where the goal location is known, and limited exploration is necessary. This could be in the form of a simply wandering around without colliding [15, 33], following an object [22], getting to a goal coordinate [1, 17]: using sequence of images along the path [5, 21], or language-based instructions [2]. Sometimes, the goal is specified as an image but experience from the environment is available in the form of demonstrations [13, 34], or in the form of reward-based training [24, 47], which again limits the role of exploration. The second category of tasks is when the goal is not known and exploration is necessary. Examples are tasks such as + +finding an object [17], or room [42], in a novel environment, or explicit exploration [6, 9]. These task categories involve different challenges. The former tasks focus on effective retrieval and robust execution, while the later tasks involve semantic and common sense reasoning in order to efficiently operate in previously unseen environments. Our focus, in this work, is the task of reaching a target image in a novel environment. No experience is available from the environment, except for the target image. We aren't aware of any works that target this specific problem. + +Classical Space Representations. Spatial and topological representations have a rich history in robot navigation. Researchers have used explicit metric spatial representations [12], and have considered how can such representations be built with different sensors [19,26-28,38], and how can agents be localized against such representations [11]. Recent work has started associating semantics with such spatial representations [4]. In a similar vein, non-metric topological representations have also been considered in classical literature [10, 20, 23]. Some works combine topological and metric representations [39, 40], and some study topological representations that are semantic [20]. While our work builds upon the existing literature on topological maps, the resemblance is only at high-level graph structure. Our work focuses on making visual topological mapping and exploration scalable, robust and efficient. We achieve this via the representation of both semantic and geometric properties in our topological maps; the ability to build topological maps in an online manner and finally, posing the learning problem as a supervised problem. + +Learned Space Representations. Depending on the problem being considered, different representations have been investigated. For short-range locomotion tasks, purely reactive policies [3, 15, 22, 33] suffice. For more complex problems such as target-driven navigation in a novel environment, such purely reactive strategies do not work well [47], and memory-based policies have been investigated. This can be in the form of vanilla neural network memories such as LSTMs [25, 29], or transformers [14]. Researchers + +![](images/c874e97707e964179d7c5beaca1e86e78478cf10e8e5c036a21aff5369193ea0.jpg) +Figure 3: Geometric Explorable Area Prediction $(\mathcal{F}_G)$ . Figure showing sample input image $(I)$ and output predictions of the Geometric Explorable Area Prediction function $(\mathcal{F}_G)$ . The green boxes show doorways for reference, and are not available as input. + +have also incorporated insights from classical literature into the design of expressive neural memories for navigation. This includes spatial memories [17, 30] and topological approaches [8, 13, 34, 35, 42, 45]. Learned spatial approaches can acquire expressive spatial representations [17], they are however bottle-necked by their reliance on metric consistency and thus have mostly been shown to work in discrete state spaces for comparatively short-horizon tasks [17, 30]. Researchers have also tackled the problem of passive and active localization [7, 26], in order to aid building such consistent metric representations. Some topological approaches [8, 13, 34] work with human explorations or prebuilt topological maps, thus ignoring the problem of exploration. Others build a topological representation with explicit semantics [42, 46], which limits tasks and environments that can be tackled. In contrast from past work, we unify spatial and topological representations in a way that is robust to actuation error, show how we can incrementally and autonomously build topological representations, and do semantic reasoning. + +Training Methodology. Different tasks have also lead to the design of different training methodologies for training navigation policies. This ranges from reinforcement learning with sparse and shaped rewards [24, 25, 31, 33, 47], imitation learning and DAgger [17, 32], self-supervised learning for individual components [15, 34]. While RL allows learning of rich exploratory behavior, training policies using RL is notoriously hard and sample inefficient. Imitation learning is sample efficient but may not allow learning exploratory behavior. Self-supervised learning is promising but has only been experimented in the context of known goal tasks. We employ a supervised learning approach and show how we can still learn expressive exploration behavior while at the same time not suffering from exuberant sample complexity for training. + +![](images/e0f298a83fb20991893a3aeb4e32d08cd7fc1f0f8ef29bc72a2ab6b75d6bc82a.jpg) +Figure 4: Semantic Score Prediction $(\mathcal{F}_S)$ . Figure showing sample input and output predictions of the Semantic Score Prediction function $(\mathcal{F}_S)$ . The score predictions change based on the goal image. When the goal image is of the living room (left), the score of the directions in the center are higher as they lead to the living room. When the goal image is of a bedroom (right), the scores corresponding to the pathway on the left are higher as they are more likely to lead to the bedroom. + +# 3. Task Setup + +We consider an autonomous agent situated in an episodic environment. At the beginning of an episode, the agent receives a target goal image, $I_G$ . At each time step $t$ , the agent receives observations $(s_t)$ from the environment. Each observation consists of the current first-person image observation, $I_t$ , from a panoramic camera and a pose estimate from a noisy motion sensor. At each time step, the agent takes a navigational action $a_t$ . The objective is to learn a policy $\pi(a_t | s_t, I_G)$ to reach the goal image. In our experimental setup, all images are panoramas, including agent observations and goal image. + +# 4. Methods + +We propose a modular model, 'Neural Topological SLAM (NTS), which builds and maintains a topological map for navigation. The topological map is represented using a graph, denoted by $G_{t}$ at time $t$ . Each node in the graph $(N_{i})$ is associated with a panoramic image $(I_{N_i})$ and represents the area visible in this image. Two nodes are connected by an edge $(E_{i,j})$ if they represent adjacent areas. Each edge also stores the relative pose between two nodes, $\Delta p_{ij}$ . + +Our model consists of three components, a Graph Update module, a Global Policy, and a Local Policy. On a high level, the Graph Update module updates the topological map based on agent observations, the Global Policy selects a node in the graph as the long-term goal and finds a subgoal to reach the goal using path planning, and the Local Policy navigates to the subgoal based on visual observations. Fig. 2 provides an overview of the proposed model. + +The above components will require access to 4 functions. We first define these 4 functions and then describe how they are used by the components of the model. + +![](images/97645aeec877d533c0c17ab9e61964cdec27d77364334965985f5c6026c31a14.jpg) +Figure 5: Graph Update. Figure showing an overview of the Graph Update Module. It takes the current Graph $(G_{t})$ and the agent observation $(I_{t})$ as input. It first tries to localize the agent in the Graph. If the agent is localized in a node different from the last timestep, it changes the location of the agent and adds an edge if required. If the agent is not localized, a new node is added and corresponding ghost nodes are added using the geometric explorable area prediction function $(\mathcal{F}_G)$ . See the text for more details. + +Graph Localization $(\mathcal{F}_L)$ . Given a graph $G$ and an image $I$ , this function tries to localize $I$ in a node in the graph. An image is localized in a node if its location is visible from the panoramic image associated with the node. Internally, this requires comparing each node image $(I_{N_i})$ with the given image $(I)$ to predict whether $I$ belongs to node $N_i$ . + +Geometric Explorable Area Prediction $(\mathcal{F}_G)$ . Given an image $I$ , this function makes $n_\theta = 12$ different predictions of whether there's explorable area in the direction $\theta$ sampled uniformly between 0 and $2\pi$ . Figure 3 shows an example of input and output of this function. Intuitively, it recognizes doors or hallways which lead to other areas. + +Semantic Score Prediction $(\mathcal{F}_S)$ . Given a source image $I_S$ and a goal image $I_G$ , this function makes $n_\theta = 12$ different predictions of how fast the agent is likely to reach the goal image if it explores in the direction $\theta$ sampled uniformly between 0 and $2\pi$ . Figure 4 shows example input-output pairs for this function. The scores corresponding to the same source image change as the goal image changes. Estimating this score requires the model to learn semantic priors about the environment. + +Relative Pose Prediction $(\mathcal{F}_R)$ . Given a source image $I_S$ and a goal image $I_G$ which belong to the same node, this function predicts the relative pose $(\Delta p_{S,G})$ of the goal image from the source image. + +# 4.1. Model components + +Assuming that we have access to the above functions, we first describe how these functions are used by the three components to perform Image Goal Navigation. We then describe how we train a single model to learn all the above functions using supervised learning. + +Graph Update. The Graph Update module is responsible for updating the topological map given agent observations. At $t = 0$ , the agent starts with an empty graph. At each time step, the Graph Update module ( $f_{GU}$ ) takes in the current + +observations $s_t$ and the previous topological map $G_{t-1}$ and outputs the updated topological map, $G_t = f_{GU}(s_t, G_{t-1})$ . Figure 5 shows an overview of the Graph Update Module. + +In order to update the graph, the module first tries to localize the current image in a node in the current graph using the Graph Localization function $(\mathcal{F}_L)$ . If the current image is localized in a node different from the last node, we add an edge between the current node and the last node (if it does not exist already). If the current image is not localized, then we create a new node with the current image. We also add an edge between the new node and the last node. Every time we add an edge, we also store the relative pose $(\Delta p)$ between the two nodes connected by the edge using the sensor pose estimate. + +The above creates a graph of the explored areas. In order to explore new areas, we also predict and add unexplored areas to the graph. We achieve this by augmenting the graph with 'ghost' nodes which are agent's prediction of explorable areas using the Geometric Explorable Area Prediction function $(\mathcal{F}_G)$ . If there is an explorable area in a direction $\theta$ , we add a 'ghost' node $(X_{k})$ and connect it to the new node $(N_{i})$ using edge $E_{i,k}$ . Since we do not have the image at the ghost node location, we associate a patch of the node image in the direction of $\theta$ , i.e. $(I_{X_k} = I_{N_i,\theta})$ . The relative pose between the new node and the ghost node is stored as $(r,\theta)$ , where $\theta$ is the direction and $r = 3m$ is the radius of the node. The ghost nodes are always connected to exactly one regular node and always correspond to unexplored areas. We ensure this by removing ghost nodes when adding regular nodes in the same direction, and not adding ghost nodes in a particular direction if a regular node exists in that direction. Intuitively, ghost nodes correspond to the unexplored areas at the boundary of explored areas denoted by regular nodes. + +Global Policy. The Global Policy is responsible for selecting a node in the above graph as the long-term goal. It first tries to localize the goal image in the current graph using the Graph Localization function $(\mathcal{F}_L)$ . If the goal image $(I_G)$ is + +![](images/64f247e67cd569edf602b2979a6787ec1ac636f13a316c6e5858cb3364907974.jpg) +Figure 6: Global Policy. Figure showing an overview of the Global Policy. It takes the current Graph $(G_{t})$ and the Goal Image $(I_G)$ as input. It first tries to localize the Goal Image in the Graph. If the Goal Image is localized, the corresponding node is selected as the long-term goal. If the Goal Image is not localized, then the semantic scoring function $(\mathcal{F}_S)$ is used to score all the ghost nodes based on how close they are to the goal image. The ghost node with the highest score is selected as the long-term goal. Given a long-term goal, a subgoal node is computed using graph path planning. The relative directions to the subgoal node are the output of the Global Policy which is passed to the Local Policy. + +localized in a node $N_{i}$ , then $N_{i}$ is chosen as the long-term goal. If the goal image is not localized, then the Global Policy needs to choose an area to explore, i.e. choose a ghost node for exploration. We use the Semantic Score Prediction $(\mathcal{F}_S)$ function to predict the score of all ghost nodes. The Global Policy then just picks the ghost node with the highest score as the long-term goal. + +Once a node is selected as a long-term goal, we plan the path to the selected node from the current node using Dijkstra's algorithm on the current graph. The next node on the shortest path is chosen to be the subgoal $(N_{SG})$ . The relative pose associated with the edge to the subgoal node is passed to the Local Policy $(\Delta p_{i,SG})$ . + +If the goal image is localized in the current node (or the agent reaches the node $N_{i}$ where the goal image $(I_G)$ is localized), the Global policy needs to predict the relative pose of $I_G$ with respect to the current agent observation. We use the Relative Pose Prediction $(\mathcal{F}_R)$ function to get the relative pose of the goal image, which is then passed to the Local Policy. + +Local Policy. The Local Policy receives the relative pose as goal directions which comprises of distance and angle to the goal. Given the current image observation and the relative goal directions, the Local Policy takes navigation actions to reach the relative goal. This means the Local Policy is essentially a PointGoal navigation policy. Our Local Policy is adapted from [6]. It predicts a local spatial map using a learned mapper model in the case of RGB input or using geometric projections of the depth channel in case of RGBD input. It then plans a path to the relative goal using shortest path planning. + +# 4.2. Training NTS Multi-task Learning model + +Given access to the four functions described above, we discussed how the different components use these functions for navigation. In this subsection, we describe how + +we train a single multi-task learning model to learn all the four functions. Figure 7 shows an overview of this multitask learning model. It takes a Source Image $(I_S)$ and a Goal Image $(I_G)$ as input and encodes them using a shared ResNet18 [18] encoder. It first predicts whether the two images belong to the same node or not. This prediction is used to implement the Graph Localization function $(\mathcal{F}_L)$ . If they belong to the same node, it makes Intra-Node predictions which include the direction and score (or equivalently) distance of the Goal Image relative to the Source Image. These predictions are used to implement the Relative Pose Prediction function $(\mathcal{F}_R)$ . If they belong to different nodes, it makes Inter-Node Predictions which include directions of explorable areas (which is used as the Geometric Explorable Area Prediction function $(\mathcal{F}_G)$ ) and a semantic score corresponding to each explorable area denoting its proximity of the Goal Image (which is used as the Semantic Score Prediction function $(\mathcal{F}_S)$ ). The Connection, Intra-Node Prediction, and Inter-Node Prediction models consist of fully-connected layers with ReLU activations and dropout. Exact details are deferred to the supplementary material. + +# 5. Experimental Setup + +Environment. All our experiments are conducted in the Habitat simulator [36] with the Gibson [43] dataset. The Gibson dataset is visually realistic as it consists of reconstructions of real-world scenes. We also implement physically realistic motion sensor and actuation noise models as proposed by [6]. Actuation motion noise leads to stochastic transitions as the amount translated or rotated by the agent is noisy. This model also adds realistic translational noise in rotation actions and rotational noise in translational actions. The sensor noise model adds realistic noise to the base odometry sensor readings. Both the noise models are based on real-world data and agents trained on these noise models are shown to transfer to the real-world [6]. + +![](images/ab0651b86cbb7dd696e70b761668ba9bb5881e1117a16355c45f505468a170e8.jpg) +Figure 7: NTS Multi-task Learning Model. Figure showing an overview of the NTS Multi-task Learning Model. It takes a Source Image $(I_S)$ and a Goal Image $(I_G)$ as input and encodes them using a shared ResNet18 encoder. It first predicts whether the two images belong to the same node or not. If they belong to the same node, it makes Intra-Node predictions which include the direction and score (or equivalently) distance of the Goal Image relative to the Source Image. If they belong to different nodes, it makes Inter-Node Predictions which include directions of explorable areas and a semantic score corresponding to each explorable area denoting its proximity of the Goal Image. All the predictions of this model are used at various places in the components of the overall NTS model. See text for more details. + +Task setup. We use panoramic images of size $128 \times 512$ for both agent image observation and target goal image. We conduct experiments with both RGB and RGBD settings. The base odometry sensor provides a $3 \times 1$ reading denoting the change in agent's x-y coordinates and orientation. The action space consists of four actions: move_forward, turn_right, turn_left, stop. The forward action moves the agent approximately $25\mathrm{cm}$ forward and the turn actions turn the agent approximately 10 degrees. Note that the state space and motion of the agent are continuous. The agent succeeds in an episode if it takes the stop action within a $1m$ radius of the target location. The agent fails if it takes stop action anywhere else or does not take the stop till the episode ends. In addition to the success rate, we also use Success weighted by inverse Path Length (SPL) as an evaluation metric as proposed by [1]. It takes into account the efficiency of the agent in reaching the goal (shorter successful trajectories lead to higher SPL). + +Training data. We split the curated set of 86 scenes from [36] into sets of 68/4/14 scenes for train/val/test. For training our supervised learning model, we sample 300 images randomly in each of 68 training scenes. We get labels for pairs of source and target images in each scene giving us a total of approximately $68 \times 300 \times 300 = 6.12$ million data points. The labeling process is automated and it only requires the ground-truth map already available with the dataset without the need for any additional human annotation. Details of the labeling process are deferred to the supplementary material. Note that sampling images or the ground-truth map are not required for the test environments. + +Test episodes. For creating test episodes, we sample episodes (given by starting and goal locations) in the test scenes to create 3 different sets of difficulty based on the distance of the goal from starting locations: Easy $(1.5 -$ + +$3m)$ , Medium $(3 - 5m)$ and Hard $(5 - 10m)$ . The maximum episode length is 500 steps or each difficulty level. + +# 5.1. Baselines + +We use the following baselines for our experiments: + +ResNet + GRU + IL. A simple baseline consisting of ResNet18 image encoder and GRU based policy trained with imitation learning (IL). + +Target-driven RL. A siamese style model for encoding the current image and the goal image using shared convolutional networks and trained end-to-end with reinforcement learning, adapted from Zhu et al. [47]. + +Metric Spatial Map + RL. An end-to-end RL model which uses geometric projections of the depth image to create a local map and passes it to the RL policy, adapted from Chen et al. [9]. + +Metric Spatial Map + FBE + Local. This is a hand-designed baseline which creates a map using depth images and then uses a classical exploration heuristic called Frontier-based Exploration (FBE) [44] which greedily explores nearest unexplored frontiers in the map. We use the Localization model and Local Policy from NTS to detect when a goal is nearby and navigate to it. + +Active Neural SLAM. This is a recent modular model based on Metric Spatial Maps proposed for the task of exploration. We adapt it to the Image Goal task by using the Localization model and Local Policy from NTS to detect when a goal is nearby and navigate to it. + +All the baselines are trained for 25 million frames. RL baselines are trained using Proximal Policy Optimization [37] with a dense reward function. The reward function includes a high reward for success $(= \mathrm{SPL}^*10)$ , a shaping reward equal to the decrease in distance to the goal and a per step reward of -0.001 to encourage shorter trajectories. ResNet + GRU + IL is trained using behavioral + +
ModelEasyMediumHardOverall
SuccSPLSuccSPLSuccSPLSuccSPL
RGBResNet + GRU + IL0.570.230.140.060.040.020.250.10
Target-driven RL [47]0.560.220.170.060.060.020.260.10
Active Neural SLAM (ANS) [6]0.630.450.310.180.120.070.350.23
Neural Topological SLAM (NTS)0.800.600.470.310.370.220.550.38
RGBDResNet + GRU + IL0.720.320.160.090.050.020.310.14
Target-driven RL [47]0.680.280.210.080.090.030.330.13
Metric Spatial Map + RL [9]0.690.270.220.070.120.040.340.13
Metric Spatial Map + FBE + RL0.770.560.360.180.130.050.420.26
Active Neural SLAM (ANS) [6]0.760.550.400.240.160.090.440.29
Neural Topological SLAM (NTS)0.870.650.580.380.430.260.630.43
+ +Table 1: Results. Performance of the proposed model Neural Topological SLAM (NTS) and the baselines in RGB and RGBD settings. + +cloning on the ground-truth trajectory. This means just like the proposed model, all the baselines also use the ground-truth map for training. In terms of the number of training samples, sampling 300 random images in the environment would require 300 episode resets in the RL training setup. 300 episodes in 68 scenes would lead to a maximum of 10.2 million $(= 68 \times 300 \times 500)$ samples. Since we use 25 million frames to train our baselines, they use strictly more data than our model. Furthermore, our model does not require any interaction in the environment and can be trained offline with image data. + +# 6. Results + +We evaluate the proposed method and all the baselines on 1000 episodes for each difficulty setting. We compare all the methods across all difficulty levels in both RGB and RGBD settings in Table 1. The results show that the proposed method outperforms all the baselines by a considerable margin across all difficulty settings with an overall Succ/SPL of 0.55/0.38 vs 0.35/0.23 in RGB and 0.63/0.43 vs 0.44/0.29 in RGBD. The results also indicate the relative improvement of NTS over the baselines increases as the difficulty increases leading to a large improvement in the hard setting (0.43/0.26 vs 0.16/0.09 in RGBD). + +Comparison with end-to-end RL and the effect of stop action. The results indicate that NTS performs better than both end-to-end RL based baselines [9, 47] and methods using metric spatial maps [6, 9]. The performance of the RL-based baselines is much weaker than the proposed model. We believe the reason behind this is the complexity of the exploration search space. Compared to the Pointgoal navigation task where the agent receives updated direction to the goal at each time step, Image Goal navigation is more difficult in terms of exploration as the goal image does not directly provide the direction to explore. Another difficulty is exploring the 'stop' action. Prior setups of the Image Goal + +task where end-to-end RL policies were shown to perform reasonably well assumed that the agent succeeded if it hits the goal state. However, based on the suggestion from [1], we added the 'stop' action as it is more realistic. To quantify the effect of stop action, we report the performance of all the models without the stop action in Table 2(left). We see that the performance of RL baselines is much higher. However, the performance of NTS also increases as the agent automatically stops when it reaches the goal state instead of using the prediction of the Relative Pose Estimator to stop. Other differences that make our experimental setup more realistic but also makes exploration harder for RL as compared to prior setups include continuous state space as compared to grid-based state space, fine-grained action as compared to 90 degree turns and grid cell forward steps and stochastic transitions due to realistic motion noise. + +Comparison with spatial map-based methods and the effect of motion noise. The performance of metric spatial map-based baselines drops quickly as the distance to the goal increases. This is likely due to the accumulation of pose errors as the trajectory length increases. Errors in pose prediction make the map noisy and eventually lead to incorrect path planning. To quantify this effect, we evaluate all the models without any motion actuation and sensor noise in Table 2(right). The results show that the performance of the metric map-based baselines scales much better with distance in the absence of motion noise, however, the performance of NTS does not increase much. This indicates that NTS is able to tackle motion noise relatively well. This is because NTS only uses pose estimates between consecutive nodes, which do not accumulate much noise as they are a few actions away from each other. The performance of NTS is still better than the baselines even without motion noise as it consists of Semantic Score Predictor $(\mathcal{F}_S)$ capable of learning structural priors which the metric spatial map-based baselines lack. We quantify the effect of the Semantic Score Predictor in the following subsection. + +
ModelRGBD - No stopRGBD - No Noise
EasyMed.HardOverallEasyMed.HardOverall
ResNet + GRU + IL0.760.280.100.380.710.180.060.32
Target-driven RL [47]0.890.450.210.520.690.220.070.33
Metric Spatial Map + RL [9]0.890.450.210.520.700.240.110.35
Metric Spatial Map + FBE + RL0.920.460.290.560.780.460.230.49
Active Neural SLAM (ANS) [6]0.930.500.320.580.790.530.300.54
Neural Topological SLAM (NTS)0.940.700.600.750.870.600.460.64
+ +Table 2: No stop and no noise. Success rate of the proposed model NTS and the baselines without stop action (left) and without motion noise (right) in the RGBD setting. + +![](images/16e8d320f95b01c4f87d9abc8db7566af3ca8be9c8b226609d6155f0d2c1d0a0.jpg) +Figure 8: Performance of the proposed model NTS and two ablations as a function of number of sequential goals. + +![](images/b15c2f3308b5779ebd9616c0c8d6366185fc342a46760ab2832199e073357348.jpg) + +# 6.1. Ablations and Sequential Goals + +In this subsection, we evaluate the proposed model on sequential goals in a single episode and study the importance of the topological map or the graph and the Semantic Score Predictor $(\mathcal{F}_S)$ . For creating a test episode with sequential goals, we randomly sample a goal between $1.5m$ to $5m$ away from the last goal. The agent gets a time budget of 500 timesteps for each goal. We consider two ablations: + +NTS w/o Graph. We pick the direction with the highest score in the current image greedily, not updating or using the graph over time. Intuitively, the performance of this ablation should deteriorate as the number of sequential goals increases as it has no memory of past observations. + +Neural Topological SLAM w/o Score Function. In this ablation, we do not use the Semantic Score Predictor $(\mathcal{F}_S)$ and pick a ghost node randomly as the long-term goal when the Goal Image is not localized in the current graph. Intuitively, the performance of this ablation should improve with the increase in the number of sequential goals, as random exploration would build the graph over time and increase the likelihood of the Goal Image being localized. + +We report the success rate and SPL of NTS and the two ablations as a function of the number of sequential goals in Figure 8. Success, in this case, is defined as the ratio of goals reached by the agent across a test set of 1000 episodes. Firstly, the performance of NTS is considerably higher than both the ablations, indicating the importance of both the components. The performance of all the models decreases with an increase in the number of sequential goals + +because if the agent fails to reach an intermediate goal, there is a high chance that the subsequent goals are farther away. However, the performance gap between NTS and NTS w/o Score Function decreases and the performance gap between NTS and NTS w/o Graph increases with increase in the number of sequential goals as expected. This indicates that the topological map becomes more important over time as the agent explores a new environment, and while the Semantic Score Predictor is the most important at the beginning to explore efficiently. + +# 7. Discussion + +We designed topological representations for space that leverage semantics and afford coarse geometric reasoning. We showed how we can build such representation autonomously and use them for the task of image-goal navigation. Topological representations provided robustness to actuation noise, while semantic features stored at nodes allowed the use of statistical regularities for efficient exploration in novel environments. We showed how advances made in this paper make it possible to study this task in settings where no prior experience from the environment is available, resulting in a relative improvement of over $50\%$ . In the future, we plan to deploy our models on real robots. + +# Acknowledgements + +This work was supported by IARPA DIVA D17PC00340, ONR Grant N000141812861, ONR MURI, ONR Young Investigator, DARPA MCS, Apple and Nvidia. + +Gibson License: http://svl.stanford.edu/gibson2/ + +assets/GDS_agreement.pdf + +# References + +[1] Peter Anderson, Angel Chang, Devendra Singh Chaplot, Alexey Dosovitskiy, Saurabh Gupta, Vladlen Koltun, Jana Kosecka, Jitendra Malik, Roozbeh Mottaghi, Manolis Savva, and Amir Zamir. On evaluation of embodied navigation agents. arXiv preprint arXiv:1807.06757, 2018. 2, 6, 7 +[2] Peter Anderson, Qi Wu, Damien Teney, Jake Bruce, Mark Johnson, Niko Sünderhauf, Ian Reid, Stephen Gould, and Anton van den Hengel. Vision-and-language navigation: Interpreting visually-grounded navigation instructions in real environments. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3674-3683, 2018. 2 +[3] Somil Bansal, Varun Tolani, Saurabh Gupta, Jitendra Malik, and Claire Tomlin. Combining optimal control and learning for visual navigation in novel environments. arXiv preprint arXiv:1903.02531, 2019. 2 +[4] Sean L Bowman, Nikolay Atanasov, Kostas Daniilidis, and George J Pappas. Probabilistic data association for semantic slam. In 2017 IEEE International Conference on Robotics and Automation (ICRA), pages 1722-1729. IEEE, 2017. 2 +[5] Jake Bruce, Niko Sunderhauf, Piotr Mirowski, Raia Hadsell, and Michael Milford. Learning deployable navigation policies at kilometer scale from a single traversal. In Aude Billard, Anca Dragan, Jan Peters, and Jun Morimoto, editors, Proceedings of The 2nd Conference on Robot Learning, volume 87 of Proceedings of Machine Learning Research, pages 346-361. PMLR, 29-31 Oct 2018. 2 +[6] Devendra Singh Chaplot, Dhiraj Gandhi, Saurabh Gupta, Abhinav Gupta, and Ruslan Salakhutdinov. Learning to Explore using Active Neural SLAM. In International Conference on Learning Representations, 2020. 2, 5, 7, 8 +[7] Devendra Singh Chaplot, Emilio Parisotto, and Ruslan Salakhutdinov. Active neural localization. arXiv preprint arXiv:1801.08214, 2018. 3 +[8] Kevin Chen, Juan Pablo de Vicente, Gabriel Sepulveda, Fei Xia, Alvaro Soto, Marynel Vázquez, and Silvio Savarese. A behavioral approach to visual navigation with graph localization networks. In Robotics: Science and Systems, 2019. 3 +[9] Tao Chen, Saurabh Gupta, and Abhinav Gupta. Learning exploration policies for navigation. In International Conference on Learning Representations, 2019. 2, 6, 7, 8 +[10] Howie Choset and Keiji Nagatani. Topological simultaneous localization and mapping (slam): toward exact localization without explicit localization. IEEE Transactions on robotics and automation, 17(2):125-137, 2001. 2 +[11] Frank Dellaert, Dieter Fox, Wolfram Burgard, and Sebastian Thrun. Monte carlo localization for mobile robots. In ICRA, volume 2, pages 1322-1328, 1999. 2 +[12] Alberto Elfes. Using occupancy grids for mobile robot perception and navigation. Computer, 22(6):46-57, 1989. 2 +[13] Benjamin Eysenbach, Ruslan Salakhutdinov, and Sergey Levine. Search on the replay buffer: Bridging planning and reinforcement learning. arXiv preprint arXiv:1906.05253, 2019. 2, 3 + +[14] Kuan Fang, Alexander Toshev, Li Fei-Fei, and Silvio Savarese. Scene memory transformer for embodied agents in long-horizon tasks. In CVPR, 2019. 2 +[15] Dhiraj Gandhi, Lerrel Pinto, and Abhinav Gupta. Learning to fly by crashing. In 2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 3948-3955. IEEE, 2017. 2, 3 +[16] Sabine Gillner and Hanspeter A Mallot. Navigation and acquisition of spatial knowledge in a virtual maze. Journal of cognitive neuroscience, 10(4):445-463, 1998. 1 +[17] Saurabh Gupta, James Davidson, Sergey Levine, Rahul Sukthankar, and Jitendra Malik. Cognitive mapping and planning for visual navigation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2616-2625, 2017. 2, 3 +[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. 5 +[19] Armin Hornung, Kai M. Wurm, Maren Bennewitz, Cyril Stachniss, and Wolfram Burgard. OctoMap: An efficient probabilistic 3D mapping framework based on octrees. Autonomous Robots, 2013. 2 +[20] Benjamin Kuipers and Yung-Tai Byun. A robot exploration and mapping strategy based on a semantic hierarchy of spatial representations. Robotics and autonomous systems, 8(1-2):47-63, 1991. 2 +[21] Ashish Kumar, Saurabh Gupta, David Fouhey, Sergey Levine, and Jitendra Malik. Visual memory for robust path following. In Advances in Neural Information Processing Systems, 2018. 2 +[22] Alex X Lee, Sergey Levine, and Pieter Abbeel. Learning visual servoing with deep features and fitted q-iteration. arXiv preprint arXiv:1703.11000, 2017. 2 +[23] Min Meng and Avinash C Kak. Mobile robot navigation using neural networks and nonmetrical environmental models. IEEE Control Systems Magazine, 13(5):30-39, 1993. 2 +[24] Piotr Mirowski, Matthew Koichi Grimes, Mateusz Malinowski, Karl Moritz Hermann, Keith Anderson, Denis Teplyashin, Karen Simonyan, Koray Kavukcuoglu, Andrew Zisserman, and Raia Hadsell. Learning to navigate in cities without a map. In Neural Information Processing Systems (NeurIPS), 2018. 2, 3 +[25] Piotr Mirowski, Razvan Pascanu, Fabio Viola, Hubert Soyer, Andrew J Ballard, Andrea Banino, Misha Denil, Ross Goroshin, Laurent Sifre, Koray Kavukcuoglu, et al. Learning to navigate in complex environments. arXiv preprint arXiv:1611.03673, 2016. 2, 3 +[26] Raul Mur-Artal, Jose Maria Martinez Montiel, and Juan D Tardos. Orb-slam: a versatile and accurate monocular slam system. IEEE transactions on robotics, 31(5):1147-1163, 2015. 2, 3 +[27] Richard A Newcombe, Shahram Izadi, Otmar Hilliges, David Molyneaux, David Kim, Andrew J Davison, Pushmeet Kohli, Jamie Shotton, Steve Hodges, and Andrew W Fitzgibbon. Kinectfusion: Real-time dense surface mapping and tracking. In ISMAR, volume 11, pages 127-136, 2011. 2 + +[28] Richard A Newcombe, Steven J Lovegrove, and Andrew J Davison. Dtam: Dense tracking and mapping in real-time. In 2011 international conference on computer vision, pages 2320-2327. IEEE, 2011. 2 +[29] Junhyuk Oh, Valliappa Chockalingam, Satinder Singh, and Honglak Lee. Control of memory, active perception, and action in apache. In ICML, 2016. 2 +[30] Emilio Parisotto and Ruslan Salakhutdinov. Neural map: Structured memory for deep reinforcement learning. In ICLR, 2018. 3 +[31] Deepak Pathak, Pulkit Agrawal, Alexei A. Efros, and Trevor Darrell. Curiosity-driven exploration by self-supervised prediction. In ICML, 2017. 3 +[32] Stephane Ross, Geoffrey Gordon, and Drew Bagnell. A reduction of imitation learning and structured prediction to no-regret online learning. In Proceedings of the fourteenth international conference on artificial intelligence and statistics, pages 627-635, 2011. 3 +[33] Fereshteh Sadeghi and Sergey Levine. Cad2rl: Real single-image flight without a single real image. arXiv preprint arXiv:1611.04201, 2016. 2, 3 +[34] Nikolay Savinov, Alexey Dosovitskiy, and Vladlen Koltun. Semi-parametric topological memory for navigation. In International Conference on Learning Representations (ICLR), 2018. 2, 3 +[35] Nikolay Savinov, Anton Raichuk, Raphaël Marinier, Damien Vincent, Marc Pollefeys, Timothy Lillicrap, and Sylvain Gelly. Episodic curiosity through reachability. arXiv preprint arXiv:1810.02274, 2018. 3 +[36] Manolis Savva, Abhishek Kadian, Oleksandr Maksymets, Yili Zhao, Erik Wijmans, Bhavana Jain, Julian Straub, Jia Liu, Vladlen Koltun, Jitendra Malik, et al. Habitat: A platform for embodied ai research. In ICCV, 2019. 5, 6 +[37] John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017. 6 +[38] Sebastian Thrun, Wolfram Burgard, and Dieter Fox. Probabilistic robotics. MIT press, 2005. 2 +[39] Sebastian Thrun, Jens-Steffen Gutmann, Dieter Fox, Wolfram Burgard, Benjamin Kuipers, et al. Integrating topological and metric maps for mobile robot navigation: A statistical approach. In AAAI/IAAI, pages 989-995, 1998. 2 +[40] Nicola Tomatis, Illah Nourbakhsh, and Roland Siegwart. Combining topological and metric: A natural integration for simultaneous localization and map building. In Proceedings of the Fourth European Workshop on Advanced Mobile Robots (Eurobot). ETH-Zürich, 2001. 2 +[41] Ranxiao Frances Wang and Elizabeth S Spelke. Human spatial representation: Insights from animals. Trends in cognitive sciences, 6(9):376-382, 2002. 1 +[42] Yi Wu, Yuxin Wu, Aviv Tamar, Stuart Russell, Georgia Gkioxari, and Yuandong Tian. Bayesian relational memory for semantic visual navigation. In CVPR, pages 2769-2779, 2019. 2, 3 +[43] Fei Xia, Amir R. Zamir, Zhi-Yang He, Alexander Sax, Jitendra Malik, and Silvio Savarese. Gibson Env: real-world perception for embodied agents. In Computer Vision and Pat + +tern Recognition (CVPR), 2018 IEEE Conference on. IEEE, 2018.5 +[44] Brian Yamauchi. A frontier-based approach for autonomous exploration. In cira, volume 97, page 146, 1997. 6 +[45] Wei Yang, Xiaolong Wang, Ali Farhadi, Abhinav Gupta, and Roozbeh Mottaghi. Visual semantic navigation using scene priors. arXiv preprint arXiv:1810.06543, 2018. 3 +[46] Amy Zhang, Adam Lerer, Sainbayar Sukhbaatar, Rob Fergus, and Arthur Szlam. Composable planning with attributes. arXiv preprint arXiv:1803.00512, 2018. 3 +[47] Yuke Zhu, Roozbeh Mottaghi, Eric Kolve, Joseph J Lim, Abhinav Gupta, Li Fei-Fei, and Ali Farhadi. Target-driven visual navigation in indoor scenes using deep reinforcement learning. In 2017 IEEE international conference on robotics and automation (ICRA), pages 3357–3364. IEEE, 2017. 2, 3, 6, 7, 8 \ No newline at end of file diff --git a/neuraltopologicalslamforvisualnavigation/images.zip b/neuraltopologicalslamforvisualnavigation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..98986ad2b961dfc0769f333e4bb9ce6b09bfe87b --- /dev/null +++ b/neuraltopologicalslamforvisualnavigation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ebcef522aea5be601db4363c502543a25bc43a6674eb928a891a9035c5da36f6 +size 472002 diff --git a/neuraltopologicalslamforvisualnavigation/layout.json b/neuraltopologicalslamforvisualnavigation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e3e0b675d2505c8f706b11240ac9424a84ded50f --- /dev/null +++ b/neuraltopologicalslamforvisualnavigation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb31b636d3826c344012c16e4da96192a049da183bca94855935877ff003425f +size 355452 diff --git a/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/0d7485fa-c234-459c-91a1-b5220e8d7b28_content_list.json b/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/0d7485fa-c234-459c-91a1-b5220e8d7b28_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..1804bf968bd2f6c8a3dda953897799c2fa821cff --- /dev/null +++ b/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/0d7485fa-c234-459c-91a1-b5220e8d7b28_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:090700caa737bbec015277e80a40b60412b4f827f3d41a0371060fb41e2fd9c9 +size 76780 diff --git a/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/0d7485fa-c234-459c-91a1-b5220e8d7b28_model.json b/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/0d7485fa-c234-459c-91a1-b5220e8d7b28_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b3ee4dc085833d19b292304d3cc99b2a6bb4f084 --- /dev/null +++ b/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/0d7485fa-c234-459c-91a1-b5220e8d7b28_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6bad357a35b51f586fd6627e1204f90cc185e095eb9528b3db2133fd98fd19b +size 101050 diff --git a/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/0d7485fa-c234-459c-91a1-b5220e8d7b28_origin.pdf b/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/0d7485fa-c234-459c-91a1-b5220e8d7b28_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0b83cca0a6db9720470a7fec3220d7ace3748ee7 --- /dev/null +++ b/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/0d7485fa-c234-459c-91a1-b5220e8d7b28_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24761b3b537eae8c9544fbea32e7ddc70a52c2c4e4ddd37817d72c61065a02f9 +size 4637164 diff --git a/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/full.md b/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/full.md new file mode 100644 index 0000000000000000000000000000000000000000..614e45a562384bdcf27092e4bbd0d137e83eb2b0 --- /dev/null +++ b/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/full.md @@ -0,0 +1,339 @@ +# Neural Voxel Renderer: Learning an Accurate and Controllable Rendering Tool + +# Konstantinos Rematas Vittorio Ferrari Google Research + +![](images/ea36979fa200edb698db385f640d46474755d9a23438af3dd344d5b4a3bd5abe.jpg) +Figure 1. Neural voxel renderer converts a set of colored voxels into a realistic and detailed image. It also allows elaborate modifications in the geometry or the appearance of the input that are faithfully represented in the synthesized image. + +# Abstract + +We present a neural rendering framework that maps a voxelized scene into a high quality image. Highly-textured objects and scene element interactions are realistically rendered by our method, despite having a rough representation as an input. Moreover, our approach allows controllable rendering: geometric and appearance modifications in the input are accurately propagated to the output. The user can move, rotate and scale an object, change its appearance and texture or modify the position of the light and all these edits are represented in the final rendering. We demonstrate the effectiveness of our approach by rendering scenes with varying appearance, from single color per object to complex, high-frequency textures. We show that our rerendering network can generate very detailed images that represent precisely the appearance of the input scene. Our experiments illustrate that our approach achieves more accurate image synthesis results compared to alternatives and can also handle low voxel grid resolutions. Finally, we show how our neural rendering framework can capture and faithfully render objects from real images and from a diverse set of classes. + +# 1. Introduction + +What is the typical process for rendering a synthetic scene? In a 3D graphics software, like Blender [3] and 3D Studio Max [2], the user creates a set of geometric objects in a virtual 3D world, edits their material properties and adds the light sources. Once the desired configuration + +is achieved, the program renders the 3D scene into an image using a rendering algorithm such as Path Tracing [24]. While this setup unfolds the creativity of the user, it increases the learning complexity of the system, requires a lot of manual input and it is not differentiable. + +The emergence of deep generative models introduced a new image synthesis medium. Generative adversarial networks [18] are able to produce highly realistic images of faces [25] or Imagenet [57] categories [9] using only class labels as input. Moreover, image-to-image translation [23] presented a framework where an input image featuring only partial information (e.g. only edges), can be transformed into a naturally looking one. Neural networks are also applied for graphics applications. Feed forward networks can learn a mapping between geometric attributes [44] or voxels [45] to shaded outputs, and rerendering networks can correct the artifacts of traditional rendering approaches [43, 41]. However, these approaches often produce blurry results and have limited control over the input: appearance changes are mostly restricted to viewpoint or high-level attributes. + +In this paper we present a neural network model that learns how to render a scene given voxels as input. The scene can be modified in terms of appearance, location, orientation and lighting, and all changes are faithfully expressed in the rendered output. With only requiring a rough specification of the geometry as a voxel grid, our framework produces an accurate image, with plausible light interactions between the scene elements (e.g. casting shad + +ows, reflections, etc.). Our method includes a rerendering module which enables us to render highly textured objects precisely and in detail. Moreover, our framework naturally inputs limited appearance information. Instead of manually painting materials on the geometry [1] or requiring multiple views of the object [59, 6], our method can use a single image aligned with a 3D object to capture detailed appearance properties and propagate them to other views. + +We demonstrate the ability of our approach to render realistic images in a comprehensive set of experiments. We show geometric and appearance modifications in synthetic datasets with increasing texture complexity and we reproduce the look of objects from real images as well. We illustrate how the network reproduces the interactions between the scene elements, e.g. specular reflections, shadows, secondary bounces of light. Finally, we compare our proposed framework with alternative approaches [45, 23, 64] and we attain better performance in several metrics. Our contributions can be summarized as: + +- A neural rendering framework with controllable object appearance and scene illumination effects. +- Capturing texture details with a neural rerendering module. +- Learnable interactions between scene entities such as reflections, shadows and secondary bounces of light. + +# 2. Related Work + +Geometry-based neural rendering. One approach for image synthesis with geometric information is to replace the traditional rendering pipeline with a neural network. RenderNet [45] learns how to map a voxel grid to a shaded output, such as Phong shading. The method can also be used for normal estimation, allowing the use of the Phong illumination model [52], and generating textures of faces using PCA coefficients as input. Texture fields [47] is estimating the appearance of a 3D object using a function that maps a point in space to a color, conditioned on an input image. In contrast, our approach allows detailed manipulation and rendering of arbitrary textures and provides an adjustable illumination source (area light with soft shadows). + +Deferred Neural Rendering [65] learns to synthesize novel views of a scene using neural textures, a learnable element that acts as a $UV$ atlas. Deep Appearance Models [37] encode the facial geometry and texture of a particular person and can generate novel views during inference. Neural Volumes [38] focuses on the 3D reconstruction of an object by taking a set of calibrated views as an input and producing a 3D voxel grid that is rendered with differentiable ray-marching. While these approaches produce high quality results, their models are trained for a particular object/scene, limiting their applicability to general cases, and they assume static light. Also, these methods allow limited edits in the original scene as they focus on view synthesis. + +Another direction is neural rerendering. Lookinggood [41] uses a neural network to fix artifacts from a multiview capture and [43] rerenders a point cloud from a 3D reconstruction with modifiable appearance. Similarly, [53] estimate the RGB image from a structure-from-motion pointcloud. Deep Shading [44] converts a set of rendering buffers (position, normals, etc.) to shaded effects. Again, the ability to modify the output is bounded by either what it was presented during training or to holistic appearance transfers. + +Image-based neural rendering. Given a set of images and their corresponding camera matrices, Deep Voxels [61] encode the view-dependent appearance of an object in a 3D latent voxel grid, which can be later used for rendering novel views. However, the latent voxels incorporate the appearance of a single object that undergoes viewpoint changes and the method requires a large number of calibrated images. Another generative approach is to synthesize the images directly given few attributes as an input [15] (e.g. transformation parameters, color etc.), but this approach needs access to the whole database of objects and the rendered images are often blurry. + +The image-to-image translation [23] paradigm can also be seen as a form of neural rendering. Methods can synthesize new images of humans based on a 2D pose [35, 10, 40, 8] or convert semantic maps to natural images [67, 51]. Style transfer [17] can also alter the appearance of an input image in a realistic way [31, 39]. However, these approaches perform specific synthesis and editing tasks, where the control over the final rendering is based on the attributes from the supplied data. + +Novel view synthesis is the task of generating a new view of an object given an input image from another view. This can be assisted by a 3D object [55], considering visible and hidden parts [71, 16] or directly from one [64] or multiple [48, 62] views. Again, these methods deal only with rotation modifications and their outputs often lose appearance details. An alternative to the previous explicit geometric transformations are the disentangled representations in feature space. The work of [27] learns to render different viewpoints and lighting conditions by a careful handling of the training procedure, while [69] considers the transformations directly on the latent features. Recently, [46] demonstrated the ability to generate realistic images in an unsupervised way using a disentangled latent volumetric representation. However, the modifications are again limited to rotations and simple lighting, while our network handles more complex appearance alterations explicitly on the input voxels. + +Differentiable rendering. To overcome the non-differentiable nature of traditional rendering, previous works introduce a differentiable rasterizer [12, 36, 19] or splatting [70], propose a differentiable ray-tracer [66, 29] or have a differentiable, BRDF-based rendering model [14, + +![](images/282d890cc7847aa5c41b10b0d589ea9fd38dd66281a30580ef0490b9d8e56f96.jpg) + +![](images/b945e6ed6729ba0d39df7d75d59e23a7dc81335e71c9d05085891c119c3c5197.jpg) + +![](images/0fc115517667794f914b8ae3d17c89c4c8dbeb1958b826b70244535bbee2b47e.jpg) +Object coordinates +World coordinates +Figure 2. Scene setup: the object is placed in the world coordinates where it can be rotated and translated. The light can also be translated and the camera can change elevation. As network inputs, the scene is in camera coordinates and the light position is a 3-dimensional $xyz$ vector. + +![](images/7e467577e2e98a413e1d3d3b61836f373c7625bd6112acd039be496346f61135.jpg) +Camera coordinates + +32, 34, 30]. The focus of these methods is inverse rendering (estimate geometry, materials, etc.), while we are interested in the forward synthesis process. + +# 3. Method + +# 3.1. Overview + +Our goal is to learn a network that renders a realistic image given a voxelized 3D input. While there are several types of 3D representations for neural rendering (e.g. meshes [19, 36], implicit functions [47, 49, 42], rendering buffers [44]), we choose to work with voxels because they are easy to input into a neural network and they provide the flexibility for arranging the scene elements in a natural way (e.g. a chair on top of the ground). The output of our network is a realistic image representing the scene from a particular viewpoint given by the user. + +Scene definition. Our scene consists of three elements: the object, the ground and the light. The elements are placed in a bounded 3D world that is observed by a camera at a fixed distance. The object and the ground are represented as voxels and we use an area light as this generates more realistic soft shadows than a point light source. + +Our approach supports several editable attributes: (1) The object can be translated across the $x$ and $z$ axis and rotated around the $y$ axis. Also, we can apply local rigid and non-rigid transformations to the voxels. (2) The light can be translated in a bounded volume above the ground. (3) The camera elevation can be adjusted. (4) The appearance of the object can change. For (4), we consider a spectrum of modifications, from painting the object/floor with a single uniform color to applying arbitrary textures to the object. + +Apart from the editable parameters, the scene has some fixed attributes. There is ambient light, the color of the light is white, the camera focal length is fixed to 40, the object is diffuse, and the floor is slightly specular. Detailed values of the scene setup can be found in the supplementary material. + +The network expects the scene to be in the camera coordinate frame. We first apply the modifications and then we convert the scene from world to camera coordinates. + +# 3.2. Coloring Voxels + +# Manual coloring. + +proach would be As a use case we consider the setting where the object and the floor have a single color each. The user can select the colors from a palette and assign + +A straightforward ap-to color voxels manually. + +![](images/13741d643d398ee1bd6a4bd4f6cbc17f0b181f1d76cfaa3b3e70aa06aa937524.jpg) + +them to the objects in the scene, similar to the bucket fill tool in most image editing software (see inset figure). The network still has to properly shade the scene based on the light position, and generate global illumination effects. + +Colors from an image. Tools for coloring voxels can be found in programs like MagicaVoxel [5], but detailed voxel painting can be cumbersome. A more practical alternative is to perform image-based coloring. Given the alignment between the 3D object and an image depicting the object (we refer to that image as appearance source $\mathcal{A}$ ), we can un-project the color of the pixels directly onto the voxels. Alternatively, if the input 3D object is in the camera + +![](images/fe0efc2935b48ee969a941753f6f360098c703688313ee56303349a3d5c7ae3a.jpg) +Appearance Source Image +Figure 3. Coloring voxels from an image: given the 2D-to-3D alignment, the voxels take the color from the corresponding pixels of the appearance source image. + +![](images/b0c73bdfe8936d5461fa1962cc311b095af2f40a7ab1cbea2a2a1ececfbd98e9.jpg) +Voxels + +![](images/082a36b6d39d6b855511c4c89ff5012c0bbab713a6dfa84918523266cfbcb253.jpg) +Colored Voxels + +space, we can assume orthographic projection. The centers of the voxels are projected to the image using the camera parameters. Finally, the color for every voxel is taken from the pixel it falls into. While this approach requires aligned images with the 3D objects, recent advantages in 2D to 3D alignment can provide such information automatically, see for example [54, 50, 7, 68, 22, 21, 20]. + +Appearance capture from a single image introduces artifacts typical with projective texturing. The assigned colors come from the input view and they contain view-dependent information such as shading, shadows, etc. Unlike typical image-based rendering, in our scenario the object will be rendered from a different viewpoint or lighting condition, so the rendered object colors need to change accordingly. We tackle this problem with a carefully prepared training set that includes this type of appearance changes (see Sec. 4.1). + +Another aspect that requires attention is how to color the voxels that are not visible. We determine voxel visibility automatically using ray-marching [28]. A hidden voxel gets the color of the first visible voxel along its camera ray. We observed that this approach is beneficial in cases with thin + +![](images/3c685fe9aa51384207e1dc67145e59c65246c5d88105fac8852901ee10b34a6a.jpg) +Figure 4. NVR network architecture. Two branches encode the voxel and light position inputs and a decoder combines their output and produces the final rendering. + +structures (e.g. chair handles and legs), and the generated artifacts were well handled by the network. + +Additionally, we take advantage of the symmetry in many man-made objects such as chairs and cars: if a voxel is not visible, we copy its color from its symmetric voxel across the $y$ axis (if that is visible). + +# 3.3. Neural Voxel Renderer (NVR) + +Model architecture. Our Neural Voxel Renderer (NVR) network $\theta$ is illustrated in Fig. 4 (more details in the supplementary material). The inputs are (1) the scene represented as voxels $V\in \mathbb{R}^{128^3\times 4}$ and (2) the light position $L\in \mathbb{R}^3$ . The network output the image $I\in \mathbb{R}^{256^2\times 3}$ : + +$$ +I = \theta (V, L) \tag {1} +$$ + +The voxels $V$ contain the RGB colors and visibility, which are automatically estimated based on the 2D-3D alignment (Sec. 3.2). We use RenderNet as our backbone [45]. The 3D input voxels $V$ are processed by a series of 3D convolutions and a reshaping unit that transforms the 3D features into 2D by reshaping its last two dimensions (e.g. $h \times w \times d \times c$ becomes $h \times w \times (d * c)$ ), followed by $1 \times 1$ convolutions (projection unit in [45] and reshape in [48]). The reshaping step can be seen as an orthographic projection in the latent space, with all the depth information being kept. The features are then processed by a series of 2D convolutional blocks, leading to the final encoding of the input voxels. + +The light input $L$ is processed by a separate branch with 2 fully connected layers, delivering latent illumination features to the network. These features are then tiled to form an image with the same dimensions as the final features from the voxel encoding branch. In this way, every spatial location in the features has information about the illumination. After concatenation, the joint features are fed to a decoder that outputs the image in the final resolution. + +Model training. We train the model by minimizing the following loss: + +$$ +L (I, T) = | | I - T | | _ {1} + \beta \sum_ {i} w _ {i} | | v _ {i} (I) - v _ {i} (T) | | _ {2} \tag {2} +$$ + +where $T$ is the ground-truth target image. The second term is a perceptual loss, with $v_{i}$ is the response of the $i$ layer of + +![](images/65ca73358a9b476b2aea547d4ad743ef8d53baff2c34b102cc57ae513ab06672.jpg) +Figure 5. NVR+ network architecture. + +a pretrained VGG [60] network, and $w_{i}$ its weighting factor. For $i$ , we use the conv1, conv2 layers and set their weights $w_{i}$ to 1.0 and 0.1 respectively. + +The target image $T$ is produced by a traditional, physically-based renderer (Blender Cycles [3]) and the object is represented by a 3D mesh. This results in rendering smooth surfaces in image $T$ . In this way, the network implicitly learns to map discrete geometric representation such as voxels to a continuous and smooth rendering. + +We train the network using the Adam optimizer [26] with learning rate $10^{-4}$ and a batch size of 10. The 2D convolutional layers are followed by batch normalization and ReLU activations (more details in supplementary material). + +# 3.4. Adding a rerendering network (NVR+) + +The network in Sec. 3.3 is able to render well the overall structure of the scene in terms of colors, reflections, shadows, etc. However, we observe that when the color pattern of the object in the input voxels forms a high frequency and irregular texture, the output is blurry and with artifacts. For this reason we propose a rerendering network $(\mathrm{NVR}+)$ that maintains the high quality textures while producing the correct overall scene appearance (Fig. 5). + +The texture information is already encoded in the voxels' colors and we know the camera parameters of the target rendering (the user sets the scene to be rendered, see Sec. 3.1). Therefore we can synthesize an image $S$ by splatting [72] the center of the colored voxels to an empty canvas in the target view. Note that this image will contain the artifacts mentioned in Sec. 3.2 (wrong colors, different shading, etc.) since the target view can be different from the view the appearance was captured from. + +The NVR+ consists of three parts: the NVR network described in the previous subsection, the Splatting Processing Network that encodes the synthesized image $S$ into a latent representation, and a Neural Rerendering Network that combines and processes the outputs of the other two networks into the final image. The Splatting Processing Network consists of a series of convolutional layers without decreasing the resolution. The output of this network is then added to the features from the NVR and the result is fed to the Neural Rerendering Network. The Neural Rerendering + +Network processes the combined features with a U-Net [56] architecture and outputs the image in the final resolution. The whole NVR+ network is trained end-to-end, using the same loss as in Eq. (2). + +The $\mathrm{NVR + }$ is able to render high-frequency textures accurately and in detail because it combines the best of two modalities. First, the output of the NVR produces a realistic image in terms of reflections, shadows and overall color assignments but it lacks the high-frequency texture details. Second, the output of the Splatting Processing Network contain artifacts from the splatting process, but it also includes features rich in resolution and details. Finally, the Neural Rerendering Network integrates the two network outputs and produces a coherent, detailed and artifact-free final image. The $\mathrm{NVR + }$ renders an image $(256\times 256)$ in $\approx 0.1$ sec on a single desktop GPU (Nvidia RTX). + +# 4. Experiments + +# 4.1. Settings and protocol + +Training. For training our models we use 3D shapes from ShapeNet [11] and we render them with Blender Cycles [3], a physically-based path tracer. We focus mainly on the Chairs category, but we also provide qualitative results for the Car category. In all cases the training sets are constructed by sampling randomly 2000 3D objects from the train set as specified in the SHREC'16 challenge [58]. Each object is rendered from 20 different viewpoints by uniformly sampling (1) the elevation of the camera, (2) the rotation and translation of the object, and (3) the position of the light. The camera elevation is between 5 and 50 degrees, the object rotation is uniformly sampled from the 180 degrees hemisphere facing towards the camera, the translation of the object is sampled from an rectangular area around the scene center $[-0.5, 0.5]$ units) and the light is sampled from a volume above the scene center $[-1.5, 1.5]$ for the $x$ and $z$ axis and $[2.5, 3]$ for the $y$ axis). The object is rendered as a mesh for accurate reproduction of its surfaces (giving the target image $T$ in Eq. (2)). In contrast, the object is input to the network as a $100^3$ voxel grid, and then it is placed inside the overall $128^3$ voxel scene $V$ to allow rotations and translations (object to world coordinates, see Fig. 2). + +Testing. For testing, we want to measure the ability of our model to cope with changes in object rotation and translation, and light translation. We randomly select 40 3D objects from the test set of the SHREC'16 challenge [58]. Each object is rendered with the following settings: the camera elevation is randomly sampled between 15 and 45 degrees; a rotation angle range (starting and ending angle) is randomly sampled from the hemisphere facing the camera and the object is rotated with a step of 10 degrees; a start and end location is randomly sampled and the object is being translated between the two end points; similar sampling + +![](images/29dab3b71ed33baeb6beb4787585c8843fdd18650f08bf7f3dad6084d97fece7.jpg) +Figure 6. Global illumination effects produced by our framework. + +is applied for the light. This procedure results in 40000 images for training and 1100 images for testing. + +Appearance settings. We generate three settings with varying appearance complexity. Single color: where both the object and the floor have a single randomly selected color (RGB values); Default: where the object is rendered with its default ShapeNet textures/materials but the floor color is randomly sampled; and Textured: where the object has a randomly selected texture from the Describable Textures Dataset[13] (we separate the textures in train and test splits) and the floor has a single randomly selected color. We train a model for every setting and every category. + +# 4.2. Global illumination effects + +Our scenes consists of objects that interact with each other (shadows, reflections, etc.) and our training data was generated with a physically-based renderer. These elements of realism exist in the training dataset, and here we analyze if our network is able to reproduce these effects. + +In Fig. 6 we illustrate how our framework renders global illumination effects. In the first row we show the reflections on the specular ground for different objects. The overall structure is represented properly and it is following the orientation of the object, even with thin structures. In the second row we show how our network is rendering shadows; again, thin structures produce thin shadows and concave objects allow the light to pass. Finally, in the last row we show the effect of multiple light bounces: the color of the object (first two columns) and the ground (last two columns) is affected by the color of the other object. The original color of the object is shown in the small rectangle inset. + +# 4.3. Neural rendering analysis + +In this subsection we analyze the design choices from Section 3 and evaluate their effects on the final renderings. We additionally compare with alternative techniques for neural rendering and show that our framework performs better both quantitatively and qualitatively. + +![](images/431f81eaa0b8305c39438304d048459cc89752ad346962dd5036ad07a6e8f509.jpg) +Figure 7. Results of NVR for the single color setting. The voxel colors are properly mapped to pixels in the output images. + +Manual coloring. In this scenario, we use the Single color appearance setting as training data. With this experiment, we want to illustrate the capability of our method (NVR) to map the voxel colors to rendered pixels. Fig. 7 shows that the networks learn to render accurately the object, with correct colors and shading. + +Colors from image. In this scenario, the voxels take their color from an input image (appearance source image $\mathcal{A}$ , see Sec. 3.2). This is a more challenging setting, as some parts of the object are hidden and the colors contain view-dependent appearance information. Hence, it forms a good test case for evaluating the ability to render more complex appearance (different parts, textures, etc.) while capturing light interactions among scene elements. Fig. 8 shows the output of our NVR and $\mathrm{NVR + }$ models in the default appearance setting for the Chair category (5th and and 6th column). The NVR model properly assigns the colors to the individual parts, but fine-grained details on textured areas are washed out. The $\mathrm{NVR + }$ model renders detailed textures while also accurately producing object shading, ground reflections and shadows. Fig. 9 (left) shows the output of $\mathrm{NVR + }$ for the default appearance setting of the Car category (using a car-specific model, but with different Car instances for training and testing, Sec. 4.1). In the first row we show the voxel input together with the appearance source image $\mathcal{A}$ from where the colors were taken, in second row our prediction and in third row the ground truth. Again, our method can reproduce accurately the details of the cars; also, by taking advantage of the symmetry, we are able to faithfully reconstruct the hidden side. Finally, we visualize the output of $\mathrm{NVR + }$ on the textured appearance setting (Fig. 9 right). As the images show, this model can handle high frequency and irregular textures (as well as synthesizing specular reflections and shadows as in Fig. 8). Moreover, this confirms that our model does not memorize the training data but rather learns to map the input color pattern information into an accurate rendered image. + +Comparison to alternative methods. We use the Chair category (default appearance setting) and for every 3D ob + +![](images/550146996a846dfe36c823540e98ed604ec803e1d07438d1460cc0cc306adcaa.jpg) +Figure 8. Visual comparison between our models and different methods (see text for details). + +![](images/611c84ef8e2f8f48727bdd3dabf80b876a001aa1098bbc64aad2f7553cfd9527.jpg) +Figure 9. Neural rendering of cars and textured objects with NVR+. + +![](images/2f37908a1a366c8eadcaacb29e59f46185d0cedddc5bfd7c9faace45e2064ece.jpg) +Figure 10. Artifacts of projective texturing. + +ject, one of the rendered images acts as the appearance source image $\mathcal{A}$ . We compare against a set of alternatives based on recent works on neural rendering. Since there is no other method that offers control over geometric, appearance and light edits, we modify them to be comparable. + +Projective texturing: here we use the alignment between the mesh and the input image to texture the mesh (i.e. estimate its UV map). In Fig. 10 we illustrate typical projective texturing artifacts: a) the hidden areas copy the appearance of the visible parts, even when taking symmetry into account (red arrows), and b) light is "baked" into the object appearance, making difficult to render with new lighting. + +Single-to-mutliview: this method is based on [64] and consists of a U-net which inputs the appearance source image $\mathcal{A}$ , the relative object rotation/translation and light position. This method does not use any 3D information. + +Image encoding: here we have a setup similar to [45] but instead of painting the voxels directly, we pass $\mathcal{A}$ through a network to get a latent code that is then appended to the input voxels (similar to how [45] rendered textured faces). + +
MethodMSEDSSIMPerceptual
Single-to-multiview34.80.04040.17
Image encoding24.30.03024.41
Ours (NVR)22.80.02821.25
Image translation21.60.02618.12
Deep shading21.80.02416.54
Ours (NVR+)14.30.0128.21
+ +The rest of the network has similar architecture to NVR so the light can be given as an input. + +Image translation: this method is based on [23]; the input is the rerendered image $S$ (generated by splatting the voxels onto the image plane) together with the light position as additional channel. The desired output is the target image $T$ . + +Deep shading: here the setup is similar to [44]. We use projective texturing to estimate the UV map of the mesh; then we place the mesh in the desired position and we render the diffuse color and depth buffer. We use these buffers together with the light position as inputs to a Pix2Pix [23] network and we optimize for the target image $T$ . + +Table 1 compares the performance of the different methods on mean squared error (MSE), structural dissimilarity (DSSIM) and the perceptual loss in Eq. (2) (using the same layers $i$ and weights $w_{i}$ ). $\mathrm{NVR+}$ performs better than the alternatives in all metrics by a large margin. This illustrates the ability of the rerendering module to reproduce fine details, especially for textured 3D objects. Fig. 8 provides a qualitative comparison of the different methods. As can be seen, Single-to-multiview results are blurry, while Image encoding captures the overall color but fail to assign it correctly to the individual parts. The Image translation model produces typical GAN artifacts and cannot estimate the shadows properly. The Deep shading model also faces similar limitations, despite using a mesh representation instead of voxels. Our NVR model captures the color and structure of the scene, but smooths out the fine texture details. Finally, our $\mathrm{NVR+}$ model accurately renders both the geometry and the texture of the object, while also realistically synthesizing shadows, specular reflections and highlights in the output image. + +Voxel resolution. The object has an initial voxel resolution of $100^{3}$ and is then placed in a scene $V \in 128^{3 \times 4}$ . Here, we investigate the rendering quality when the initial voxel resolution varies. In Table 2 and Fig. 11 we show the performance of smaller resolutions for the NVR+ model (which are then rescaled with nearest neighbor interpolation). The performance decreases gracefully and even at a very low resolution ( $25^{3}$ ) our method produces plausible outputs. + +# 4.4. Editing analysis + +Illumination edits. When the light source changes position, the scene appearance should change accordingly. In Fig. 12, we illustrate this effect: as the light sources move, + +Table 1. Evaluation of different methods for neural rendering. + +
1003753503253
MSE14.314.415.319.3
DSSIM0.0120.0140.0160.024
Perceptual8.219.4710.918.68
+ +Table 2. Effect of voxel resolution on performance. + +![](images/bbc16cb7c8f9baa5ca8a693f98a75b5a7241d618cd2d6dafa5a53c1a3d2ea05d.jpg) +Figure 11. Rendering an object with different voxel resolutions. + +![](images/c2b798afedfe357fb7855bc3d63bbc365496c9f12baa7047ff0c07897eb8a127.jpg) +Figure 12. Illumination effects by changing the light position. Our framework changes properly the overall shading (e.g. the back of the chair is brighter in position 2) and the shadows. + +![](images/1701cb52675105e5e3d5a985a06a7093e3a653d49f835fb1eb87c3e416d8af54.jpg) +Figure 13. Applying geometric (left) and appearance (right) modifications. + +![](images/729fcfb79d5314f68d49341bb50b1e5adfc3db5d11232a06dc970a0bb4db4a8a.jpg) + +![](images/47e69bdd22eec8f65eca724626597c998ee19eaa85de1a6e07715721b3078f77.jpg) +Figure 14. Neural rendering with natural illumination as an input. + +the brightness of different parts of the object changes and shadows/light reflections in the ground move accordingly. + +![](images/91e98346460f8063ddaa8da97ec7b5b995681697b43d72a4ff1ebdae9a8f3025.jpg) +Figure 15. Rendering real objects. In the first row there are the appearance source images and in second and third row renderings of the objects using the NVR+ network. + +![](images/ef2ba206f8cba405f9ee88a02e613d335e08a0b28a521e9d3b73bfee31d17404.jpg) +Figure 16. Rendering different categories. The categories of these real objects were not part of the training dataset (trained only on the chair category). + +Object geometry edits. Apart from global object rotations and translations, we can also deform the object. In Fig. 13 left we visualize the effect of scaling across an axis, resulting in elongated or squeezed versions of the object. + +Object appearance edits. Detailed modifications on the appearance source image can propagate through our neural renderer. In this example, we manually paint patterns and letters on the appearance source image, so during the coloring step (Sec. 3.2) the edits pass on to the voxels. Fig. 13 right shows how our method can synthesize images with the object in new viewpoints and the light in new positions while preserving these fine-grained edits that were made to the appearance source image. + +Increasing realism. In this experiment, we investigate the use of more realistic ways to illuminate the scene. We modify the NVR+ network so instead of the $xyz$ light coordinates, it takes as an input an $32 \times 32$ environment map. The environment map is processed by a series of convolutional layers to extract a latent code, which is then supplied to the NVR+ network. We additionally consider a textured circular ground and add specularity to the default dataset objects. We use 80 environment maps for training and 20 for testing, taken from [4]. Results are shown in Fig. 14, with the appearance source image shown in an inset. + +Appearance capture from real images. So far we have experimented with synthetic images with varying appearance complexity. However, our framework can capture object appearance from any input image. In this experiment, we use the Pix3D dataset [63] which contains aligned pairs of images with 3D objects. We use the real image as the appearance source and we map it to the voxels of the provided 3D object as before. Note that unlike the previous experiments with ShapeNet objects, Pix3D also includes scanned objects with imperfect geometry. In Fig. 15 we present our renderings when the voxels and the appearance come from real images. Our framework is able to faithfully render these objects despite not being trained on real objects and despite significantly different geometric, illumination and material conditions than the training set. + +Testing on other categories. Our framework extends to other categories that were not included in the training dataset. In this experiment we take the NVR+ network trained on the default Chair category and we apply it to real images from other categories. In Fig. 16 we illustrate the rendering for sofas, tables and other miscellaneous objects from Itea [33] and Pix3D [63] datasets. + +# 5. Conclusion + +We presented Neural Voxel Processor, a framework that synthesizes realistic images given object voxels as input, and provides editing functionalities to the output. Our framework can reproduce the detailed appearance of the input due to a rerendering module that handles high-frequency and complex textures. We show a wide range of rendering scenarios, where we modify the input scene with respect to illumination, object geometry and appearance. Moreover, we demonstrate the appearance capture and rendering of real objects from several categories. We hence believe that our neural renderer is a useful tool that advances the state-of-the-art and can spawn further research. + +# References + +[1] Adobe substance. https://www.substance3d.com/.2 +[2] Autodesk 3ds max. https://www.autodesk.com/products/3ds-max/.1 +[3] Blender - a 3d modelling and rendering package. http://www.blender.org.1,4,5 +[4] Hdri-haven. https://hdrihaven.com/.8 +[5] Magicavirus. https://ephtracy.github.io/.3,6 +[6] Unity photogrammetry workflow. https://unity.com/solutions/photogrammetry.2 +[7] Mathieu Aubry, Daniel Maturana, Alexei Efros, Bryan Russell, and Josef Sivic. Seeing 3d chairs: exemplar part-based 2d-3d alignment using a large dataset of cad models. In CVPR, 2014. 3 +[8] Guha Balakrishnan, Amy Zhao, Adrian V. Dalca, Frédo Durand, and John V. Guttag. Synthesizing images of humans in unseen poses. In CVPR, 2018. 2 +[9] Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale GAN training for high fidelity natural image synthesis. In ICLR, 2019. 1 +[10] Caroline Chan, Shiry Ginosar, Tinghui Zhou, and Alexei A Efros. Everybody dance now. In ICCV, 2019. 2 +[11] Angel X. Chang, Thomas Funkhouser, Leonidas Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, Jianxiong Xiao, Li Yi, and Fisher Yu. ShapeNet: An Information-Rich 3D Model Repository. Technical Report arXiv:1512.03012 [cs.GR], Stanford University — Princeton University — Toyota Technological Institute at Chicago, 2015. 5 +[12] 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 NeurIPS, 2019. 2 +[13] M. Cimpoi, S. Maji, I. Kokkinos, S. Mohamed, , and A. Vedaldi. Describing textures in the wild. In CVPR, 2014. 5 +[14] Valentin Deschaintre, Miika Aittala, Fredo Durand, George Drettakis, and Adrien Bousseau. Single-image svbrdf capture with a rendering-aware deep network. ACM Trans. Graph., 37(4), 2018. 3 +[15] A. Dosovitskiy, J. T. Springenberg, and T. Brox. Learning to generate chairs with convolutional neural networks. In CVPR, 2015. 2 +[16] Ersin Yumer Duygu Ceylan Alexander C. Berg Eunbyung Park, Jimei Yang. Transformation-grounded image generation network for novel 3d view synthesis. In CVPR, 2017. 2 +[17] L. A. Gatys, A. S. Ecker, and M. Bethge. Image style transfer using convolutional neural networks. In CVPR, Jun 2016. 2 +[18] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NeurIPS. 2014. 1 +[19] Yoshitaka Ushiku Hiroharu Kato and Tatsuya Harada. Neural 3d mesh renderer. In CVPR, 2018. 2, 3 + +[20] Hui Huang, Ke Xie, Lin Ma, Dani Lischinski, Minglun Gong, Xin Tong, and Daniel Cohen-or. Appearance modeling via proxy-to-image alignment. ACM Trans. Graph., 37(1):10:1-10:15, 2018. 3 +[21] Qixing Huang, Hai Wang, and Vladlen Koltun. Single-view reconstruction via joint analysis of image and shape collections. ACM Trans. Graph., 34, 08 2015. 3 +[22] Moos Hueting, Pradyumna Reddy, Ersin Yumer, Vladimir G. Kim, Nathan Carr, and Niloy J. Mitra. Seethrough: Finding objects in heavily occluded indoor scene images. In 3DV, 2018. 3 +[23] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In CVPR, 2017. 1, 2, 7 +[24] James T. Kajiya. The rendering equation. In SIGGRAPH, 1986. 1 +[25] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In CVPR, 2019. 1 +[26] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. 4 +[27] Tejas D Kulkarni, William F. Whitney, Pushmeet Kohli, and Josh Tenenbaum. Deep convolutional inverse graphics network. In NeurIPS. 2015. 2 +[28] Marc Levoy. Display of surfaces from volume data. IEEE Comput. Graph. Appl., 8(3), 1988. 3 +[29] Tzu-Mao Li, Miika Aittala, Frédo Durand, and Jaakko Lehtinen. Differentiable monte carlo ray tracing through edge sampling. ACM Trans. Graph., 37(6), 2018. 2 +[30] Xiao Li, Yue Dong, Pieter Peers, and Xin Tong. Modeling surface appearance from a single photograph using self-augmented convolutional neural networks. ACM Trans. Graph., 36(4), 2017. 3 +[31] Yijun Li, Ming-Yu Liu, Xueting Li, Ming-Hsuan Yang, and Jan Kautz. A closed-form solution to photorealistic image stylization. In ECCV, 2018. 2 +[32] Zhengqin Li, Kalyan Sunkavalli, and Manmohan Krishna Chandraker. Materials for masses: Svbrdf acquisition with a single mobile phone image. In ECCV, 2018. 3 +[33] Joseph J. Lim, Hamed Piriavash, and Antonio Torralba. Parsing IKEA Objects: Fine Pose Estimation. In ICCV, 2013. 8 +[34] Guilin Liu, Duygu Ceylan, Ersin Yumer, Jimei Yang, and Jyh-Ming Lien. Material editing using a physically based rendering network. ICCV, 2017. 3 +[35] L. Liu, W. Xu, M. Zollhoefer, H. Kim, F. Bernard, M. Habermann, W. Wang, and C. Theobalt. Neural Animation and Reenactment of Human Actor Videos. ACM Trans. Graph., 2019. 2 +[36] Shichen Liu, Tianye Li, Weikai Chen, and Hao Li. Soft rasterizer: A differentiable renderer for image-based 3d reasoning. In ICCV, 2019. 2, 3 +[37] Stephen Lombardi, Jason Saragih, Tomas Simon, and Yaser Sheikh. Deep appearance models for face rendering. ACM Trans. Graph., 37(4), 2018. 2 +[38] Stephen Lombardi, Tomas Simon, Jason Saragih, Gabriel Schwartz, Andreas Lehrmann, and Yaser Sheikh. Neural vol + +umes: Learning dynamic renderable volumes from images. ACM Trans. Graph., 38(4), 2019. 2 +[39] Fujun Luan, Sylvain Paris, Eli Shechtman, and Kavita Bala. Deep photo style transfer. In CVPR, 2017. 2 +[40] Liqian Ma, Xu Jia, Qianru Sun, Bernt Schiele, Tinne Tuytelaars, and Luc Van Gool. Pose guided person image generation. In NeurIPS, 2017. 2 +[41] Ricardo Martin-Brualla, Rohit Pandey, Shuoran Yang, Pavel Pidlympenskyi, Jonathan Taylor, Julien Valentin, Sameh Khamis, Philip Davidson, Anastasia Tkach, Peter Lincoln, Adarsh Kowdle, Christoph Rhemann, Dan B Goldman, Cem Keskin, Steve Seitz, Shahram Izadi, and Sean Fanello. Lookingood: Enhancing performance capture with real-time neural re-rendering. ACM Trans. Graph., 37(6), 2018. 1, 2 +[42] Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3d reconstruction in function space. In CVPR, 2019. 3 +[43] Moustafa Meshry, Dan B Goldman, Sameh Khamis, Hugues Hoppe, Rohit Pandey, Noah Snively, and Ricardo Martin-Brualla. Neural rerendering in the wild. In CVPR, 2019. 1, 2 +[44] Oliver Nalbach, Elena Arabadzhiyska, Dushyant Mehta, Hans-Peter Seidel, and Tobias Ritschel. Deep shading: Convolutional neural networks for screen-space shading. 36(4), 2017. 1, 2, 3, 7 +[45] Thu Nguyen-Phuoc, Chuan Li, Stephen Balaban, and Yong-Liang Yang. Rendernet: A deep convolutional network for differentiable rendering from 3d shapes. In NeurIPS, 2018. 1, 2, 4, 6 +[46] Thu Nguyen-Phuoc, Chuan Li, Lucas Theis, Christian Richardt, and Yong-Liang Yang. Hologan: Unsupervised learning of 3d representations from natural images. In ICCV, 2019. 2 +[47] Michael Oechsle, Lars M. Mescheder, Michael Niemeyer, Thilo Strauss, and Andreas Geiger. Texture fields: Learning texture representations in function space. In ICCV, 2019. 2, 3 +[48] Kyle Olszewski, Sergey Tulyakov, Oliver Woodford, Hao Li, and Linjie Luo. Transformable bottleneck networks. 2019. 2, 4 +[49] Jeong Joon Park, Peter Florence, Julian Straub, Richard A. Newcombe, and Steven Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. In CVPR, 2019. 3 +[50] Keunhong Park, Konstantinos Rematas, Ali Farhadi, and Steven M. Seitz. Photoshape: Photorealistic materials for large-scale shape collections. ACM Trans. Graph., 37(6), Nov. 2018. 3 +[51] Taesung Park, Ming-Yu Liu, Ting-Chun Wang, and Jun-Yan Zhu. Semantic image synthesis with spatially-adaptive normalization. In CVPR, 2019. 2 +[52] Bui Tuong Phong. Illumination for computer generated pictures. Commun. ACM, 18(6), 1975. 2 +[53] Francesco Pittaluga, Sanjeev J Koppal, Sing Bing Kang, and Sudipta N Sinha. Revealing scenes by inverting structure from motion reconstructions. In CVPR, 2019. 2 + +[54] Konstantinos Rematas, Chuong Nguyen, Tobias Ritschel, Mario Fritz, and Tinne Tuytelaars. Novel views of objects from a single image. TPAMI, 2017. 3 +[55] Konstantinos Rematas, Tobias Ritschel, Mario Fritz, and Tinne Tuytelaars. Image-based synthesis and re-synthesis of viewpoints guided by 3d models. In CVPR, 2014. 2 +[56] O. Ronneberger, P.Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. In MIC-CAI, 2015. 5 +[57] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. IJCV, 2015. 1 +[58] M. Savva, F. Yu, Hao Su, M. Aono, B. Chen, D. Cohen-Or, W. Deng, Hang Su, S. Bai, X. Bai, N. Fish, J. Han, E. Kalogerakis, E. G. Learned-Miller, Y. Li, M. Liao, S. Maji, A. Tatsuma, Y. Wang, N. Zhang, and Z. Zhou. Large-scale 3d shape retrieval from shapenet core55. In Eurographics Workshop on 3D Object Retrieval, 2016. 5 +[59] 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 +[60] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. 4 +[61] Vincent Sitzmann, Justus Thies, Felix Heide, Matthias Nießner, Gordon Wetzstein, and Michael Zollhöfer. Deepvoxels: Learning persistent 3d feature embeddings. In CVPR, 2019. 2 +[62] Shao-Hua Sun, Minyoung Huh, Yuan-Hong Liao, Ning Zhang, and Joseph J Lim. Multi-view to novel view: Synthesizing novel views with self-learned confidence. In ECCV, 2018. 2 +[63] Xingyuan Sun, Jiajun Wu, Xiuming Zhang, Zhoutong Zhang, Chengkai Zhang, Tianfan Xue, Joshua B Tenenbaum, and William T Freeman. Pix3d: Dataset and methods for single-image 3d shape modeling. In CVPR, 2018. 8 +[64] M. Tatarchenko, A. Dosovitskiy, and T. Brox. Multi-view 3d models from single images with a convolutional network. In ECCV, 2016. 2, 6 +[65] Justus Thies, Michael Zollhöfer, and Matthias Nießner. Deferred neural rendering: Image synthesis using neural textures. ACM Trans. Graph., 2019. 2 +[66] Shubham Tulsiani, Tinghui Zhou, Alexei A. Efros, and Jitendra Malik. Multi-view supervision for single-view reconstruction via differentiable ray consistency. In CVPR, 2017. 2 +[67] Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, Andrew Tao, Jan Kautz, and Bryan Catanzaro. High-resolution image synthesis and semantic manipulation with conditional gans. In CVPR, 2018. 2 +[68] Tuanfeng Y. Wang, Hao Su, Qixing Huang, Jingwei Huang, Leonidas Guibas, and Niloy J. Mitra. Unsupervised texture transfer from images to model collections. ACM Trans. Graph., 35(6), 2016. 3 + +[69] Daniel E. Worrall, Stephan J. Garbin, Daniyar Turmukhambetov, and Gabriel J. Brostow. Interpretable transformations with encoder-decoder networks. In ICCV, 2017. 2 +[70] Wang Yifan, Felice Serena, Shihao Wu, Cengiz Öztreli, and Olga Sorkine-Hornung. Differentiable surface splatting for point-based geometry processing. ACM Trans. Graph., 38(6), 2019. 2 +[71] Tinghui Zhou, Shubham Tulsiani, Weilun Sun, Jitendra Malik, and Alexei A Efros. View synthesis by appearance flow. In ECCV, 2016. 2 +[72] Matthias Zwicker, Hanspeter Pfister, Jeroen van Baar, and Markus H. Gross. Surface splatting. In SIGGRAPH, 2001. 4 \ No newline at end of file diff --git a/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/images.zip b/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..40dc0840aac7c60001368f37af84fe4160cd855a --- /dev/null +++ b/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9385b81968ee640f87bbe1f3892a4d6b8d1e541ccaaadba875f4a20c4583098e +size 460124 diff --git a/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/layout.json b/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8701d3d8cf784cee6ac90939793bf251c907d68e --- /dev/null +++ b/neuralvoxelrendererlearninganaccurateandcontrollablerenderingtool/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1e8accb64ac46832b65a3652b7839ee5dd521aff64de966a3cee685d32fab2c +size 409133 diff --git a/neuromorphiccameraguidedhighdynamicrangeimaging/475f26f3-fbd2-4458-92a5-b6f4bbe6d6f6_content_list.json b/neuromorphiccameraguidedhighdynamicrangeimaging/475f26f3-fbd2-4458-92a5-b6f4bbe6d6f6_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2996f8eb5770d21c37a642e15ee14d94450b4cab --- /dev/null +++ b/neuromorphiccameraguidedhighdynamicrangeimaging/475f26f3-fbd2-4458-92a5-b6f4bbe6d6f6_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a754a053940100e92b2c18f0867bf11358a7b2bc70514e0d9bede68ae78d10c +size 72356 diff --git a/neuromorphiccameraguidedhighdynamicrangeimaging/475f26f3-fbd2-4458-92a5-b6f4bbe6d6f6_model.json b/neuromorphiccameraguidedhighdynamicrangeimaging/475f26f3-fbd2-4458-92a5-b6f4bbe6d6f6_model.json new file mode 100644 index 0000000000000000000000000000000000000000..13d50ac4b2336a90cbc45c9307aa6e1204f6e56a --- /dev/null +++ b/neuromorphiccameraguidedhighdynamicrangeimaging/475f26f3-fbd2-4458-92a5-b6f4bbe6d6f6_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5220a05e019c7f569dbf8274290f33c14f328384c38fab6a7605c8ce30639d4f +size 93252 diff --git a/neuromorphiccameraguidedhighdynamicrangeimaging/475f26f3-fbd2-4458-92a5-b6f4bbe6d6f6_origin.pdf b/neuromorphiccameraguidedhighdynamicrangeimaging/475f26f3-fbd2-4458-92a5-b6f4bbe6d6f6_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6ed7868e10b2d01eb42a706d6bbafb9d6f103535 --- /dev/null +++ b/neuromorphiccameraguidedhighdynamicrangeimaging/475f26f3-fbd2-4458-92a5-b6f4bbe6d6f6_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb95f7b05002515e37b6111b5598429c5071e8101621749c1cb947ee7f29c572 +size 3419471 diff --git a/neuromorphiccameraguidedhighdynamicrangeimaging/full.md b/neuromorphiccameraguidedhighdynamicrangeimaging/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8b89f76551f28cde6f413150b43f749b3612d047 --- /dev/null +++ b/neuromorphiccameraguidedhighdynamicrangeimaging/full.md @@ -0,0 +1,320 @@ +# Neuromorphic Camera Guided High Dynamic Range Imaging + +Jin Han1 Chu Zhou1 Peiqi Duan2 Yehui Tang1 Chang Xu3 Chao Xu1 Tiejun Huang2 Boxin Shi2* +1Key Laboratory of Machine Perception (MOE), Dept. of Machine Intelligence, Peking University +2National Engineering Laboratory for Video Technology, Dept. of Computer Science, Peking University +3School of Computer Science, Faculty of Engineering, University of Sydney + +# Abstract + +Reconstruction of high dynamic range image from a single low dynamic range image captured by a frame-based conventional camera, which suffers from over- or underexposure, is an ill-posed problem. In contrast, recent neuromorphic cameras are able to record high dynamic range scenes in the form of an intensity map, with much lower spatial resolution, and without color. In this paper, we propose a neuromorphic camera guided high dynamic range imaging pipeline, and a network consisting of specially designed modules according to each step in the pipeline, which bridges the domain gaps on resolution, dynamic range, and color representation between two types of sensors and images. A hybrid camera system has been built to validate that the proposed method is able to reconstruct quantitatively and qualitatively high-quality high dynamic range images by successfully fusing the images and intensity maps for various real-world scenarios. + +# 1. Introduction + +High Dynamic Range (HDR) imaging is a widely used technique that extends the luminance range covered by an image. A batch of HDR imaging techniques have developed in recent decades by computer vision and graphics community, as summarized by Sen and Aguerrebere [48]. Traditional methods include taking multiple Low Dynamic Range (LDR) images under different exposures, then merging them with different weights to reproduce an HDR image [6]. Another approach is hallucinating texture details from a single LDR image, which is called inverse tone mapping [3]. Inverse tone mapping is obviously an ill-posed problem, that relies on predicting badly exposed regions from neighboring areas [54] or priors learned through deep neural networks [7]. + +In recent years, some specially designed neuromorphic cameras, such as DAVIS [4], have drawn increas + +![](images/73730010f20c7e2cd9677a14e2dee184001c4467578656c9b523c5ffc9fbd91e.jpg) +Figure 1. An intensity map guided HDR network is proposed to fuse the LDR image from a conventional camera and the intensity map captured by a neuromorphic camera, to reconstruct an HDR image. + +ing attention of researchers. Neuromorphic cameras have unique features different from conventional frame-based cameras, they are particularly good at sensing very fast motion and high dynamic range scenes (1 $\mu$ s and 130 dB for DAVIS240). The latter characteristic can be utilized to form an intensity map, which encodes useful information lost in conventional imaging by a dynamic range capped camera due to over- and/or under-exposure. Despite the distinctive advantages in dynamic range, neuromorphic cameras generally bear low spatial resolution (180 × 240 for DAVIS240) and do not record color information, resulting in intensity maps less aesthetically pleasing as LDR photos captured by a modern camera. It is therefore interesting to study the fusion of LDR images and intensity maps with mutual benefits being combined for high-quality HDR imaging. + +In this paper, we propose a neuromorphic camera guided HDR imaging method. Directly stitching the intensity map and LDR image from two types of sensors is expected to produce poor HDR reconstruction, due to the great domain gap on spatial resolution, dynamic range, color representation and so on. To address these issues, we propose the intensity map guided HDR network, with specific modules designed for each type of gap. As illustrated in Fig. 1, the + +proposed network successfully takes as input two types of images and reconstructs a high-quality HDR image. + +The main contributions of this paper can be summarized as follows: + +1) We propose an information fusion pipeline to reconstruct an HDR image by jointly taking a single LDR image and an intensity map. This pipeline demonstrates the principles and design methodologies to bridge the gap on resolution, dynamic range, and color representation between two types of sensors and images (Sec. 3.1). +2) According to the proposed pipeline, an intensity map guided HDR network is constructed to achieve the faithful reconstruction. We design specific modules in the network to address each type of gap in a more effective and robust manner (Sec. 3.2). +3) We build a hybrid camera system to demonstrate that the proposed method is applicable to real cameras and scenes (Sec. 4.2). Extensive experiments on synthetic data, and real-world data captured by our hybrid camera validate that the proposed network is able to reconstruct visually impressive HDR images compared with state-of-the-art inverse tone mapping approaches. + +# 2. Related Work + +Image-based HDR reconstruction. The classic HDR imaging method was proposed by Debevec and Malik [6] by merging several photographs under different exposures. However, aligning different LDR images may lead to ghosting in the reconstructed HDR result due to misalignment caused by camera movement or changes in the scene. This problem incurs a lot of research on deghosting in HDR images [26, 38, 49, 56]. Instead of merging multiple images, inverse tone mapping was proposed by Banterle et al. [3], whose intent is to reconstruct visually convincing HDR images from a single LDR image. This ill-posed problem was attempted to be solved by several optimized approaches [30, 34, 43]. + +In recent years, Convolutional Neural Networks (CNNs) have been applied to a lot of HDR image reconstruction tasks. Kalantari and Ramamoorthi [25] firstly aligned images under different exposures using optical flow, and then fed them to a neural network which merged LDR images to reconstruct an HDR image. Eilertsen et al. [7] used a U-Net [44] like network to predict the saturated areas in LDR images, and applied a mask to reserve non-saturated pixels in LDR images, then fused the masked image with predicted image to get the HDR results. Endo et al. [8] clipped the badly exposed pixels at first. It predicted the LDR images under multiple exposures, then merged these LDR images using classic method [6]. ExpandNet [33] adopted three branches of encoders, concentrating on different level features, then it concatenated and fused the features to get HDR + +images. Trinidad et al. [52] proposed PixelFusionNet to fuse misaligned images from multi-view under different exposures for dynamic range expansion. + +Computational HDR imaging. HDR imaging problem would become less ill-posed by using computational approaches or even unconventional cameras that implicitly or explicitly encode expanded dynamic range of the scene. Nayar et al. [36] added an optical mask on a conventional camera sensor to get spacially varying pixel exposures. Tocci et al. [51] implemented an HDR-video system that used a beam splitter to simultaneously capture three images with different exposure levels, then merged them into an HDR image. Hirakawa and Simon [18] placed a combination of photographic filter over the lens and color filter array on a conventional camera sensor to realize single-shot HDR imaging. Zhao et al. [58] used a modulo camera that is able to wrap the high radiance of dynamic range scene periodically and save modulo information, then used Markov Random Field to unwrap and predict the HDR scene radiance pixel-wisely. + +Inspired by the mechanism of human retina, neuromorphic sensors such as DAVIS [4] (Dynamic and Active Pixel Vision Sensor), ATIS [40] (Asynchronous Time-based Image Sensor), FSM [59] (retina-inspired Fovea-like Sampling Model), and CeleX [20] detect the changes of scene radiance asynchronously. This series of non-conventional sensors surpass conventional frame-based cameras in various aspects [10] including high dynamic range. Reconstructing from raw events/spikes data has shown great potential in recovering very high dynamic range of the scene [21, 41, 42, 46, 59]. But there are few attempts trying to combine them with conventional imaging to produce more visually pleasing HDR photos with higher resolution and realistic color appearance. + +# 3. Proposed Method + +# 3.1. LDR Image and Intensity Map Fusion Pipeline + +As illustrated in Fig. 1, our goal is to reconstruct an HDR image given the input of an LDR image $I$ and an intensity map $X$ . Such a fusion pipeline can be conceptually illustrated using Fig. 2, which contains four key steps: + +Color space conversion. Most conventional cameras record color images in RGB format and each channel contains pixel values represented by 8-bit integers. There exists a nonlinear mapping between scene radiance and the pixel values in the camera pipeline, so we have to firstly map LDR images to linear domain via the inverse camera response function (CRF) $f^{-1}$ . To fuse with the one-channel intensity map, we then convert color space of the LDR image from RGB to YUV. The $Y$ channel $I_{Y}$ indicates the luminance of $I$ which is in the same domain of $X$ , and $U, V$ + +![](images/0fcb58e0b73f309d6d0b99e9b2772f1d18f182d7759c3c3d37d6f50812f1b4a1.jpg) +Figure 2. The conceptual pipeline of intensity map guided HDR imaging, consisting of four steps: color space conversion of the LDR image, spatial upsampling of the intensity map, luminance fusion to produce HDR image in luminance domain, and chrominance compensation that refills the color information to get a colorful HDR result. + +channels contain the color information. We use $I_{Y}$ to fuse with intensity map and reserve $U, V$ channels as chrominance information to be added back later. + +Spatial upsampling. To bridge the resolution gap between $X$ and $I_{Y}$ , we need to do an upsampling operation for the intensity map to make it have the same size as $I_{Y}$ . The upsampling operation $S(\cdot)$ is defined as follows: + +$$ +X ^ {H R} = S (X), \tag {1} +$$ + +where $X^{HR}$ is the upsampled intensity map. $S(\cdot)$ can be any upsampling operator such as nearest neighbor or bicubic interpolation, or a pre-trained neural network for superresolution. + +Luminance fusion. To expand the dynamic range of $I_{Y}$ using $X_{HR}$ , an intuitive solution is to define a weighting function which indicates the pixels that should be retained for fusion and those should be discarded. This can be implemented by adopting a similar merging strategy proposed by Debevec and Malik [6]. The fused value of $H_{Y}$ is calculated as follows: + +$$ +H _ {Y} = W \left(I _ {Y}, X ^ {H R}\right) = \frac {w ^ {I} I _ {Y} + w ^ {X} X ^ {H R}}{w ^ {I} + w ^ {X}}, \tag {2} +$$ + +where $w^{I}$ and $w^{X} \in [0,1]$ indicate corresponding weights for different types of input signals. A straightforward way to determine the weight values is to set a threshold $\tau$ (e.g., $\tau > 0.5$ ) manually. Pixel values (normalized to [0,1]) lying in the effective range $[1 - \tau, \tau]$ are given larger weights to retain the information, while values out of the range are either too dark (under-exposed) or too bright (overexposed), hence smaller weights are given to discard such information. A binary mask could be calculated based on the threshold, which is the simplest way to get a weight map. Another option is to set weights as a linear ramp, + +![](images/4847878dc5a73712ec8ab56413f7008ffcb2bbe4cad26bfe869965a0e5f0ba9e.jpg) +LDR image $I$ + +![](images/697cb726f9f3c52812ea3646e115bde5582a42520853d827fe8f51bb0b7ced2e.jpg) +Weighting function + +![](images/3d2725fee251361e759718651ec6411008c22ad9e2b9dbbb1ef2d270d20ffd9a.jpg) +Weight map + +![](images/9db5bc111b09b4ff9a4778d1c1d160c5012dc84f1e1589f18cf5adb0033bef90.jpg) +Upsampled $X$ + +![](images/d34781afffdb27e7e99477ae4b1d1ca0462f2d598d2b984d29f0fbd8518a8e08.jpg) +Fused result + +![](images/1e1e4d19993974d0d3ac0666725fb928f760ef4f4649736009eed7572e0ce3b7.jpg) +Figure 3. An example of fusing an intensity map and an LDR image using a linear ramp as weighting function. Such a straightforward fusion strategy results in various unpleasant artifacts (color distortion in the red box and blurry artifacts in the green box). + +which is similar to the pixel-wise blending in [7]. Such a weighting function can be expressed as + +$$ +w _ {i} = \frac {0 . 5 - \max \left(\left| I _ {i} - 0 . 5 \right| , \tau - 0 . 5\right)}{1 - \tau}. \tag {3} +$$ + +The weighting function and calculated weight map are shown in the first row of Fig. 3. + +Chrominance compensation. $H_{Y}$ now contains HDR information in high resolution, but only in luminance domain. The color information can be compensated from $U, V$ channels of $I$ , i.e., $I_{U}$ and $I_{V}$ . Denote $C(\cdot)$ as the color compensation operator, this procedure can be represented as + +$$ +H = C \left(H _ {Y}, I _ {U}, I _ {V}\right), \tag {4} +$$ + +which combines $H_{Y}$ with $I_{U}, I_{V}$ , and converts it back to RGB color space. + +![](images/45029b9d4b690bef9533cb6e88780a78259efec98a84657d1f0b4537f987b15f.jpg) +Figure 4. Overview of the intensity map guided HDR network architecture. It contains upsampling & luminance fusion network for HDR reconstruction in luminance domain, which is a double-encoder network with the input of $I_{Y}$ and $X$ , followed by the chrominance compensation network which takes the $H_{RGB}$ as input to refine the color information. + +Due to the dynamic range gap between $H_{Y}$ and $I_{U}(I_{V})$ , directly combining them leads to unnatural color appearance, such as $H_{RGB}$ shown in the color compensation block of Fig. 2. Realistic color appearance could be recovered using some color correction methods, such as color histograms adaptive equalization [5] or tone curve adjustment [31]. + +The synthetic example in Fig. 3 demonstrates that simply applying the conceptual pipeline in Fig. 2 may not achieve a satisfying HDR image. From the green box, we can easily observe blurry artifacts caused by misalignment between $I$ and $X$ (we add displacement between $I$ and $X$ in synthetic data to simulate the real setup), and unrealistic color recovery in the red box due to dynamic range gap. + +To address these issues, we translate the pipeline in Fig. 2 as an end-to-end network $\mathcal{F}(\cdot)$ : + +$$ +H = C \left(W \left(f ^ {- 1} \left(I _ {Y}\right), S (X)\right), I _ {U}, I _ {V}\right) = \mathcal {F} (I, X; \theta), \tag {5} +$$ + +where $\theta$ denotes parameters of the network. We will next introduce the specific concerns in realizing each of the four steps using deep neural networks. + +# 3.2. Intensity Map Guided HDR Network + +In this section, we describe the details of the proposed network, whose architecture is shown in Fig. 4. First of all, inverse CRF and color space conversion are conducted offline as a preprocessing to input. Then for each pixel in the input $I_{Y}$ , the proposed network learns to extend the bitwidth with the information encoded in $X$ . We design specific modules in the network in accordance to the remaining three steps described in Sec. 3.1. Upsampling and luminance fusion can be realized by deconvolutional layers and skip connections in the network, respectively. Therefore, we design the network using the U-Net [44] architecture + +with double encoder (encoder of $I_{Y}$ and $X$ ) and one decoder, the encoder of $X$ guides the decoder to reconstruct HDR images at multiple representation scales. + +Upsampling using deconvolution. We perform the upsampling operation by deconvolutional filters in the decoder. The purpose of decoder is to reconstruct $H_{Y}$ from the fused latent representation, which has been encoded by the two encoders. Deconvolution has the ability to diffuse information from a small scale feature map to a larger feature map with learnable parameters. Feature maps from $X$ at multiple scales guide the decoder to upsample with extended dynamic range information. Compared to a naive upsampling operation $S(\cdot)$ , the deconvolutional layers learn a comprehensive representation from the image context to realize upsampling operation by end-to-end backpropagation, rather than simply rely on interpolation from nearby pixels. + +Luminance fusion with attention masks. Information fusion in the luminance domain is the key step for dynamic range expansion. The proposed architecture applies skip-connections, which transfer feature maps between encoders and decoder to incorporate both rich textures in $I_{Y}$ and high dynamic range information in $X$ . Deeper networks have been shown to benefit from skip-connections in a variety of tasks [16, 19]. However, simply concatenating feature maps from two encoders is expected to be influenced by the dynamic range gap between the two input images. So we fuse the concatenated tensor by $1 \times 1$ convolution before each deconvolutional layer. As stated in the luminance fusion part of Sec. 3.1, a weighting function $W(\cdot)$ is added to determine the regions to retain, and the regions to be complemented by the other input. The weighting function can be implemented by introducing attention mechanism [23] in the network to assign different importance to different parts of an image. We choose to use self-attention gate [47] + +![](images/da672470faaf04c620aeca1a41199bac7270f72c0eba14db25e82c5ed7069bf2.jpg) +Figure 5. An example of attention mask calculated from self-attention module, which is added on LDR image to filter the badly exposed regions and reserve useful information for reconstruction. + +as a mask added on $I_{Y}$ to preserve the relevant information. There is no mask being added on $X_{a}^{l}$ and we use it just to complement the information that $I_{Y}$ lacks. The attention mask is computed by $1 \times 1$ convolution, then activated by a non-linear function as implemented in Attention U-Net [39]. Then the element-wise multiplication of attention mask and input feature map from $I_{Y}$ is able to filter the badly exposed pixels and reserve areas with valid information for reconstruction. Compared to assigning weights intuitively like Eq. (2), our attention mask is computed from feature maps of two input images, and the learnable parameters can be trained end-to-end. Fig. 5 demonstrates the effectiveness of attention mask. + +Chrominance compensation network. Given the HDR image in luminance domain $H_{Y}$ , we combine it with chrominance information $I_{U}$ and $I_{V}$ from the LDR image, then convert it to RGB color space to recover color appearance. The directly converted $H_{RGB}$ may suffer from color distortion due to the dynamic range gap between $H_{Y}$ and $I_{U}(I_{V})$ . Because the luminance values of $Y$ channel are stored in high precision format (e.g., float), while the $UV$ values directly inherited from $I$ are still in 8-bit integer format. As a result, the converted $H_{RGB}$ tends to be dim and less colorful after tone mapping, as shown in Fig. 4. Therefore, we propose a chrominance compensation network to realize color correction for $H_{RGB}$ . The network is an autoencoder [17] architecture with residual blocks [16], as the skip-connections in residual blocks learn to compensate for the difference between input and output images. It recovers the chrominance information on each pixel and learns to reconstruct realistic color appearance in HDR images, as demonstrated in the Output $H$ of Fig. 4. + +# 3.3. Loss Function + +The proposed network reconstructs images in the linear luminance domain, which covers a wide range of values. Calculating loss between the output images $H_{Y}$ and ground truth $\hat{H}_{Y}$ directly may cause the loss function being dominated by large values of $H_{Y}$ , while the effect of small values tends to be ignored. Therefore, it is reasonable to compute loss function between $H_{Y}$ and $\hat{H}_{Y}$ after tone mapping. The range of pixel values are compressed by the following func + +tion proposed by [25] after normalized to $[0,1]$ : + +$$ +\mathcal {T} \left(H _ {Y}\right) = \frac {\log \left(1 + \mu H _ {Y}\right)}{\log (1 + \mu)}, \tag {6} +$$ + +where $\mathcal{T}(\cdot)$ is the tone mapping operator and $\mu$ (set to be 5000) denotes the amount of compression. The tone mapping operator is computationally effective and differentiable, thus easy for back-propagation. + +We train our network by minimizing the loss function which has two parts: pixel loss and perceptual loss [24]. Pixel loss computes the $\ell_1$ norm distance between $\mathcal{T}(H_Y)$ and $\mathcal{T}(\hat{H}_Y)$ : + +$$ +\mathcal {L} _ {\text {p i x e l}} = \left\| \mathcal {T} \left(H _ {Y}\right) - \mathcal {T} \left(\hat {H _ {Y}}\right) \right\| _ {1}. \tag {7} +$$ + +Since the LDR images and intensity maps are taken from different cameras, the misalignment in the input pair is unavoidable. We try to solve this problem by adding the perceptual loss, which is defined for tone-mapped images based on feature maps extracted from the VGG-16 network [50] pre-trained on ImageNet [45]: + +$$ +\begin{array}{l} \mathcal {L} _ {p e r c} = \sum_ {h} \left(\left\| \phi_ {h} (\mathcal {T} (H _ {Y})) - \phi_ {h} (\mathcal {T} (\hat {H} _ {Y})) \right\| _ {2} ^ {2} \right. \\ \left. + \left\| G _ {h} ^ {\phi} \left(\mathcal {T} \left(H _ {Y}\right)\right) - G _ {h} ^ {\phi} \left(\mathcal {T} \left(\hat {H} _ {Y}\right)\right) \right\| _ {2} ^ {2}\right), \tag {8} \\ \end{array} +$$ + +where $\phi_h$ denotes the feature map convoluted from $h$ -th layer of VGG-16, $G_h^\phi$ is the Gram matrix of feature maps $\phi_h$ of two input images. Both of the two parts are computed by $\ell_2$ norm. We use the layers 'relu4_3' and 'relu5_3' of VGG-16 network in our experiments, because high-level features are less sensitive to unaligned pair of images. + +To summarize, our total loss is written as: + +$$ +\mathcal {L} _ {\text {t o t a l}} = \alpha_ {1} \mathcal {L} _ {\text {p i x e l}} + \alpha_ {2} \mathcal {L} _ {\text {p e r c}}, \tag {9} +$$ + +where $\alpha_{1}$ and $\alpha_{2}$ are the weights for different parts of loss function. We set as $\alpha_{1} = 100.0$ and $\alpha_{2} = 3.0$ . + +As for the chrominance compensation network, we also apply pixel loss and perceptual loss, and a slight difference is that the weight for perceptual loss $\alpha_{2}$ is 5.0. + +# 3.4. Methods of Acquiring Intensity Maps + +The intensity maps can be acquired by various types of neuromorphic cameras. + +Indirect approach. For neuromorphic cameras such as DAVIS [4], the output is a sequence of events data, containing the time, location, and polarity information of log intensity changes in a scene. The high dynamic range scene radiance is recorded in a differential manner by event cameras. Among many methods of reconstructing intensity maps from events, we choose the E2VID [41] network to + +accumulate streams of events as a spatial-temporal voxel grid for reconstruction because it reconstructs the most convincing HDR intensity maps according to our experiments. + +Direct approach. Intensity maps can also be acquired from spike-based neuromorphic cameras such as FSM [59]. Each pixel of the FSM responds to luminance changes independently as temporally asynchronous spikes. The accumulator at each pixel accumulates the luminance intensity digitalized by the A/D converter. Once the accumulated intensity reaches a pre-defined threshold, a spike is fired at this time stamp, and then the corresponding accumulator is reset in which all the charges are drained. To get the intensity map, we apply a moving time window to integrate the spikes in a specific period, and the intensity map can be computed by counting these spikes pixel-wisely [59]. FSM generates 40000 time stamps per second. We find that setting the window size as 1000 time stamps (1/40 second) reconstructs valid HDR intensity maps in our experiments. + +# 3.5. Implementation Details + +Dataset preparation. Learning-based methods rely heavily on training data. However, there are no sufficiently large-scale real HDR image datasets. Therefore, we collect HDR images from various image sources [1, 2, 11, 12, 37, 57] and video sources [9, 29]. Since the proposed network has two different types of images as input, we synthesize LDR images from HDR images like taking photos with a virtual camera [7]. The irradiance values of HDR images are scaled by random exposure time and then distorted by different non-linear response curves from DoRF [15]. As for the intensity maps, we simulate them in accordance with those acquired from neuromorphic cameras. Event camera estimates the gradients of the scene, and reconstructs the intensity maps using event data. So we firstly compute the gradients of tone-mapped HDR images and reconstruct intensity maps using Poisson solver [27] to simulate such process. During the training, we apply data augmentation to get an augmented set of pairwise data. We resize the original HDR images and then crop them to $512 \times 512$ at random locations followed by random flipping. We select viewpoints that an image covers the scene region with HDR information. Intensity maps are augmented using the same operations except cropping to the size of $256 \times 256$ as a low-resolution input. + +Training strategy. The proposed network is implemented by PyTorch, and we use ADAM optimizer [28] during the training process with a batch size of 2. 600 epochs of training enables the network to converge. The initial learning rate is $10^{-5}$ , during the first 400 epochs it is fixed, in the next 200 epochs, it decays to 0 with a linear strategy. The encoder of $I_{Y}$ is a VGG-16 network [50]. We convert $I$ from RGB to YUV color space and duplicate $I_{Y}$ twice to + +form a 3-channel tensor, since the input channel size of VGG-16 network is supposed to be three. The network is initialized with Xavier initialization [13]. We use instance normalization (IN) [53] instead of batch normalization (BN) [22] after each deconvolutional layer in the decoder. The output of network is activated by Sigmoid function that maps pixel values to the range of $[0, 1]$ . + +# 4. Experiments + +# 4.1. Quantitative Evaluation using Synthetic Data + +Fig. 6 shows reconstruction results of the proposed and other comparing methods. To the best of our knowledge, the proposed framework is the first one to combine LDR images with intensity maps to realize HDR images reconstruction. Therefore, we compare to three state-of-the-art deep learning based inverse tone mapping methods: DrTMO [8], ExpandNet [33], HDRCNN [7]; and traditional method [6] merging an over- and an under-exposed images with the exposure ratio of $50:1$ . For the sake of fairness, we omit the comparison to merging three or more LDR images with different exposures. Thanks to the complementary dynamic range information provided by intensity maps, the proposed approach is able to recover rich texture details in the images such as clouds or the outline of the intense light source. For example, in the top row of Fig. 6, the leaves around the street lamp (green box) and the trunk (red box) are clearly visible in our results, which are similar to the ground truth, while this is not the case for other inverse tone mapping methods. Although merging two LDR images extends the dynamic range (more reliable than single-image solutions), it cannot recover rich details of a scene due to the limited dynamic range covered by two LDR images. + +Besides visual comparison, we conduct quantitative evaluations using the widely adopted HDR-VDP-2.2 metrics [35], which computes the visual difference and predicts the visibility and quality between two HDR images. It produces the quality map and Q-Score for each HDR image to indicate the quality of reconstruction. Fig. 7 shows the quality maps and Q-Scores of different methods. The quality maps show the difference probability between a predicted HDR image and the ground truth. Results show that the proposed approach achieves more similarities to the ground truth and higher Q-Score in HDR image reconstruction compared to other methods. + +# 4.2. Qualitative Evaluation using Real-world Data + +In order to demonstrate the effectiveness of the proposed method on real-world scenarios, we build a hybrid camera system [55], which is composed of a conventional camera (Point Grey Chameleon 3) and a neuromorphic camera (DAVIS240 [4] or FSM [59]) with the same F/1.4 lens, as illustrated in Fig. 8. There is a beam splitter in front of the two sensors, which splits the incoming light and sends them + +![](images/0dc286ae767d9df152a44a562d66fb3c5970b9466c163b3b5c0b98370aa39c5c.jpg) +Figure 6. Visual comparison between the proposed method and state-of-the-art deep learning based inverse tone mapping methods: DrTMO [8], ExpandNet [33], HDRCNN [7]; and a conventional approach merging two LDR images [6]. The Q-Scores are labeled in each image. Please zoom-in electronic versions for better details. + +![](images/35540f49b1a44974aaf470c6ed5103dd7ee11488d037c3dd8b93e08cdb1ad995.jpg) +Figure 7. Comparisons on quality maps and Q-Scores calculated from HDR-VDP-2.2 evaluation metrics [35]. Visual differences increase from blue to red. Q-Scores average across all images in the whole test dataset. + +to different sensors simultaneously. We conduct geometric calibration and crop the center part from two camera views to extract the well-aligned regions as $I$ and $X$ . + +We take photos for both indoor and outdoor high dynamic range scenes and reconstruct the HDR images using our method. In Fig. 9, the input images are first fused in the luminance domain (the third column) and then compensated by the chrominance information (the last column). Results show that the proposed method could fuse the input $I$ and $X$ to reconstruct high-quality HDR images. For example, the outline of car roof (the first row) is over-exposed due to the strongly reflected light, but the detailed texture could + +![](images/066232928bb7b92f8953fd5c5dd5a21f6fd4a937c75a76d78d6070189f4f2a71.jpg) +Figure 8. The prototype of our hybrid HDR imaging system composed of a conventional and a neuromorphic camera. + +be captured by the neuromorphic cameras, and recovered in the fusion results using our method. Some artifacts could be observed in our results, such as in the glass window of the second row. This is brought by the intensity map during image reconstruction using stacked events [41], since we need to shake the DAVIS to trigger events, where blur and noise may occur. + +# 4.3. Ablation Study + +To validate the effectiveness of the proposed architecture and each specific module, we conduct ablation study on three variants as follows. Visual comparison for different variants is shown in Fig. 10. + +![](images/f76e90ec5b737cc5a53ed7bffcaee189f08f4b207fc71ba2a4b581b2bb1320a6.jpg) +Figure 9. Real data results reconstructed by the proposed network. The LDR images are captured by conventional cameras and the intensity maps are acquired by DAVIS (the upper two rows) and FSM (the lower two rows). + +![](images/0d608ea17ffa4dfbe78e5ed4b170d62a864a3de7e4ad31d887c28a524096cfd7.jpg) + +![](images/f396301654fc2a5e23c4b764fab28226bd610913605e27cc42bb8b0afb936e27.jpg) +Figure 10. Visual comparison of different variants of the proposed method. (a) Input LDR image, (b) without attention mask, (c) single encoder architecture, (d) adding adversarial loss, (e) intensity map guided HDR network, and (f) ground truth. + +Without attention masks. We investigate the effectiveness of the attention mask module. As shown in Fig. 10 (b), the green box of over-exposed region is similar to the input LDR image. Without the guidance of attention masks, it is difficult for the network to correctly distinguish information to reserve or discard. Hence leads to some artifacts. + +Single encoder architecture. We compare our network with a single encoder architecture without the encoder of $X$ . This can be achieved by scaling $X$ to the same size of $I_{Y}$ and concatenating them at first, then sending the 4-channel tensor to a single encoder. In this case, two images + +from different domains are directly combined. As Fig. 10 (c) shows, although the over-exposed region is recovered, obvious artifacts can be observed in the under-exposed regions. + +Adding adversarial loss. We investigate adding adversarial loss [14] $\mathcal{L}_{adv}$ to the total loss function. By treating the proposed network as the generator, we train a discriminator simultaneously to distinguish the real or fake HDR image. The example in Fig. 10 (d) shows that the adversarial loss may lead to undesired mosaics in both over- and under-exposed areas. + +We also conduct HDR-VDP-2.2 metrics for different models, and the average Q-Scores are calculated for evaluation, which are shown in the following results. Without attention masks: 45.55, single encoder: 49.74, adding adversarial loss: 45.22, complete model: 51.68. These results demonstrate our complete model achieves the optimal performance with these specifically designed strategies. + +# 5. Conclusion + +We proposed a neuromorphic camera guided HDR imaging method, which fuses the LDR images and the intensity maps to reconstruct visually pleasing HDR images. A hybrid camera system has been built to capture images in real-world scenarios. Extensive experiments on synthetic data and real-world data demonstrate that the proposed method outperforms state-of-the-art comparing methods. + +Discussion. Considering the limitation of GPU memory, we use $512 \times 512$ LDR images and $256 \times 256$ intensity maps to train the networks. However, our model can handle higher resolution LDR images once we upsample the intensity maps to the corresponding scale level with LDR images. Apart from that, increasing the resolution of output images might also be achieved by a pre-trained super-resolution network [32]. + +Limitations and future work. Due to the distortion of camera lens and different field of views of the two sensors in our hybrid camera system, the pixels that are better aligned are mostly centered on the whole image plane. Therefore, although this paper demonstrates convincing evidence of fusing two types of images for HDR imaging, the final quality still has a gap between merging multiple images of different exposures, captured by a modern DLSR with tens of millions of pixels. To realize this, using a better designed hybrid camera is our future work. + +# 6. Acknowledgement + +This work is supported by National Natural Science Foundation of China under Grant No. 61872012, No. 61876007, and Beijing Academy of Artificial Intelligence (BAAI). + +# References + +[1] Funt et al. HDR dataset. https://www2.cs.sfu.ca/colour/data/funt_hdr/#DESCRIPTION. +[2] sIBL archive. http://www.hdrlabs.com/sibl/archive.html. +[3] Francesco Banterle, Patrick Ledda, Kurt Debattista, and Alan Chalmers. Inverse tone mapping. In Proc. of International Conference on Computer Graphics and Interactive Techniques, 2006. +[4] Christian Brandli, Raphael Berner, Minhao Yang, Shih-Chii Liu, and Tobi Delbruck. A $240 \times 180$ 130 db $3\mu s$ latency global shutter spatiotemporal vision sensor. Journal of Solid-State Circuits, 49(10):2333-2341, 2014. +[5] Vasile V Buzuloiu, Mihai Ciuc, Rangaraj M Rangayyan, and Constantin Vertan. Adaptive-neighborhood histogram equalization of color images. Journal of Electronic Imaging, 10(2):445-460, 2001. +[6] Paul E Debevec and Jitendra Malik. Recovering high dynamic range radiance maps from photographs. In Proc. of ACM SIGGRAPH, 1997. +[7] Gabriel Eilertsen, Joel Kronander, Gyorgy Denes, Rafat K. Mantiuk, and Jonas Unger. HDR image reconstruction from a single exposure using deep CNNs. ACM Transactions on Graphics (Proc. of ACM SIGGRAPH Asia), 36(6):178:1-178:15, Nov. 2017. +[8] Yuki Endo, Yoshihiro Kanamori, and Jun Mitani. Deep reverse tone mapping. ACM Transactions on Graphics (Proc. of ACM SIGGRAPH Asia), 36(6):177:1-177:10, Nov. 2017. +[9] Jan Froehlich, Stefan Grandinetti, Bernd Eberhardt, Simon Walter, Andreas Schilling, and Harald Brendel. Creating cinematic wide gamut HDR-video for the evaluation of tone mapping operators and HDR-displays. In Proc. of Digital Photography X, 2014. +[10] Guillermo Gallego, Tobi Delbruck, Garrick Orchard, Chiara Bartolozzi, Brian Taba, Andrea Censi, Stefan Leutenegger, Andrew Davison, Joerg Conradt, Kostas Daniilidis, and Scaramuzza. Davide. Event-based vision: A survey. arXiv preprint arXiv:1904.08405, 2019. +[11] Marc-Andre Gardner, Kalyan Sunkavalli, Ersin Yumer, Xiaohui Shen, Emiliano Gambaretto, Christian Gagné, and Jean-François Lalonde. Learning to predict indoor illumination from a single image. arXiv preprint arXiv:1704.00090, 2017. +[12] Mathieu Garon, Kalyan Sunkavalli, Sunil Hadap, Nathan Carr, and Jean-François Lalonde. Fast spatially-varying indoor lighting estimation. In Proc. of Computer Vision and Pattern Recognition, 2019. +[13] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proc. of International Conference on Artificial Intelligence and Statistics, 2010. +[14] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Proc. of International Conference on Neural Information Proceeding Systems, 2014. +[15] Michael D Grossberg and Shree K Nayar. What is the space of camera response functions? In Proc. of Computer Vision and Pattern Recognition, 2003. + +[16] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proc. of Computer Vision and Pattern Recognition, 2016. +[17] Geoffrey E Hinton and Ruslan R Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504-507, 2006. +[18] Keigo Hirakawa and Paul M Simon. Single-shot high dynamic range imaging with conventional camera hardware. In Proc. of International Conference on Computer Vision, 2011. +[19] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proc. of Computer Vision and Pattern Recognition, 2017. +[20] Jing Huang, Menghan Guo, and Shoushun Chen. A dynamic vision sensor with direct logarithmic output and full-frame picture-on-demand. In Proc. of International Symposium on Circuits and Systems, 2017. +[21] S. Mohammad Mostafavi I., Lin Wang, Yo-Sung Ho, and Kuk-Jin Yoon. Event-based high dynamic range image and very high frame rate video generation using conditional generative adversarial networks. In Proc. of Computer Vision and Pattern Recognition, 2019. +[22] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. +[23] Saumya Jetley, Nicholas A Lord, Namhoon Lee, and Philip HS Torr. Learn to pay attention. arXiv preprint arXiv:1804.02391, 2018. +[24] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In Proc. of European Conference on Computer Vision, 2016. +[25] Nima Khademi Kalantari and Ravi Ramamoorthi. Deep high dynamic range imaging of dynamic scenes. ACM Transactions on Graphics (Proc. of ACM SIGGRAPH), 36(4):144-1, 2017. +[26] Erum Arif Khan, Ahmet Oguz Akyuz, and Erik Reinhard. Ghost removal in high dynamic range images. In Proc. of Internatioinal Conference on Computational Photography, 2006. +[27] H Kim, A Handa, R Benosman, SH Ieng, and AJ Davison. Simultaneous mosaicing and tracking with an event camera. In Proc. of the British Machine Vision Conference, 2014. +[28] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. +[29] Joel Kronander, Stefan Gustavson, Gerhard Bonnet, and Jonas Unger. Unified HDR reconstruction from raw CFA data. In Proc. of Internatioinal Conference on Computational Photography, 2013. +[30] Pin-Hung Kuo, Chi-Sun Tang, and Shao-Yi Chien. Content-adaptive inverse tone mapping. In Proc. of Visual Communications and Image Processing, 2012. +[31] Markku Lamberg, Joni Oja, Tero Vuori, and Kristina Bjorknas. Image adjustment with tone rendering curve, June 9 2005. US Patent App. 10/729,872. +[32] Christian Ledig, Lucas Theis, Ferenc Huszár, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, and Wenzhe Shi. Photo-realistic single image super-resolution using a + +generative adversarial network. In Proc. of Computer Vision and Pattern Recognition, 2017. +[33] Demetris Marnerides, Thomas Bashford-Rogers, Jonathan Hatchett, and Kurt Debattista. ExpandNet: A deep convolutional neural network for high dynamic range expansion from low dynamic range content. In Computer Graphics Forum, volume 37, 2018. +[34] Belen Masia, Sandra Agustin, Roland W. Fleming, Olga Sorkine, and Diego Gutierrez. Evaluation of reverse tone mapping through varying exposure conditions. ACM Transactions on Graphics (Proc. of ACM SIGGRAPH Asia), 28(5):160:1-160:8, Dec. 2009. +[35] Manish Narwaria, Rafal Mantiuk, Matthieu P. Da Silva, and Patrick Le Callet. HDR-VDP-2.2: A calibrated method for objective quality prediction of high-dynamic range and standard images. Journal of Electronic Imaging, 24:010501, 2015. +[36] Shree K Nayar and Tomoo Mitsunaga. High dynamic range imaging: Spatially varying pixel exposures. In Proc. of Computer Vision and Pattern Recognition, 2000. +[37] Hiromi Nemoto, Pavel Korshunov, Philippe Hanhart, and Touradj Ebrahimi. Visual attention in LDR and HDR images. In Proc. of International Workshop on Video Processing and Quality Metrics for Consumer Electronics, 2015. +[38] Tae-Hyun Oh, Joon-Young Lee, Yu-Wing Tai, and In So Kweon. Robust high dynamic range imaging by rank minimization. IEEE Transactions on Pattern Analysis and Machine Intelligence, 37(6):1219-1232, 2014. +[39] Ozan Oktay, Jo Schlemper, Loic Le Folgoc, Matthew Lee, Mattias Heinrich, Kazunari Misawa, Kensaku Mori, Steven McDonagh, Nils Y Hammerla, Bernhard Kainz, Ben Glocker, and Daniel Rueckert. Attention U-Net: Learning where to look for the pancreas. arXiv preprint arXiv:1804.03999, 2018. +[40] Christoph Posch, Daniel Matolin, and Rainer Wohlgenannt. An asynchronous time-based image sensor. In Proc. of International Symposium on Circuits and Systems, 2008. +[41] Henri Rebecq, René Ranftl, Vladlen Koltun, and Davide Scaramuzza. Events-to-video: Bringing modern computer vision to event cameras. In Proc. of Computer Vision and Pattern Recognition, 2019. +[42] Christian Reinbacher, Gottfried Graber, and Thomas Pock. Real-time intensity-image reconstruction for event cameras using manifold regularisation. arXiv preprint arXiv:1607.06283, 2016. +[43] 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 Transactions on Graphics (Proc. of ACM SIGGRAPH), 26(3), July 2007. +[44] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-Net: Convolutional networks for biomedical image segmentation. In Proc. of International Conference on Medical Image Computing and Computer-assisted Intervention, 2015. +[45] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C Berg, and Li Fei-Fei. ImageNet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211-252, + +2015. +[46] Cedric Scheerlinck, Nick Barnes, and Robert Mahony. Continuous-time intensity estimation using event cameras. In Proc. of Asian Conference on Computer Vision, 2018. +[47] Jo Schlemper, Ozan Oktay, Liang Chen, Jacqueline Matthew, Caroline Knight, Bernhard Kainz, Ben Glocker, and Daniel Rueckert. Attention-gated networks for improving ultrasound scan plane detection. arXiv preprint arXiv:1804.05338, 2018. +[48] Pradeep Sen and Cecilia Aguerrebere. Practical high dynamic range imaging of everyday scenes: Photographing the world as we see it with our own eyes. Signal Processing Magazine, 33(5):36-44, 2016. +[49] Pradeep Sen, Nima Khademi Kalantari, Maziar Yaesoubi, Soheil Darabi, Dan B. Goldman, and Eli Shechtman. Robust patch-based HDR reconstruction of dynamic scenes. ACM Transactions on Graphics (Proc. of ACM SIGGRAPH), 31(6):203:1-203:11, Nov. 2012. +[50] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. +[51] Michael D. Tocci, Chris Kiser, Nora Tocci, and Pradeep Sen. A versatile HDR video production system. ACM Transactions on Graphics (Proc. of ACM SIGGRAPH), 30(4):41:1-41:10, July 2011. +[52] Marc Comino Trinidad, Ricardo Martin Brualla, Florian Kainz, and Janne Kontkanen. Multi-view image fusion. In Proc. of International Conference on Computer Vision, 2019. +[53] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Instance normalization: The missing ingredient for fast stylization. arXiv preprint arXiv:1607.08022, 2016. +[54] Lvdi Wang, Li-Yi Wei, Kun Zhou, Baining Guo, and Heung-Yeung Shum. High dynamic range image hallucination. In Proc. of the Eurographics conference on Rendering Techniques, 2007. +[55] Zihao Wang, Peiqi Duan, Oliver Cossairt, Aggelos Katsaggelos, Tiejun Huang, and Boxin Shi. Joint filtering of intensity images and neuromorphic events for high-resolution noise-robust imaging. In Proc. of Computer Vision and Pattern Recognition, 2020. +[56] Greg Ward. Fast, robust image registration for compositing high dynamic range photographs from hand-held exposures. Journal of Graphics Tools, 8(2):17-30, 2003. +[57] Feng Xiao, Jeffrey M DiCarlo, Peter B Catrysse, and Brian A Wandell. High dynamic range imaging of natural scenes. In Proc. of Color and Imaging Conference, 2002. +[58] Hang Zhao, Boxin Shi, Christy Fernandez-Cull, Sai-Kit Yeung, and Ramesh Raskar. Unbounded high dynamic range photography using a modulo camera. In Proc. of International Conference on Computational Photography, 2015. +[59] Lin Zhu, Siwei Dong, Tiejun Huang, and Yonghong Tian. A retina-inspired sampling method for visual texture reconstruction. In Proc. of International Conference on Multimedia and Expo, 2019. \ No newline at end of file diff --git a/neuromorphiccameraguidedhighdynamicrangeimaging/images.zip b/neuromorphiccameraguidedhighdynamicrangeimaging/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..a10315b3002f30c46edd6c38df294e7545a5fba4 --- /dev/null +++ b/neuromorphiccameraguidedhighdynamicrangeimaging/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7cc1c0e3125f46198db8d4b150e8461542b5ccb61a5f02953b593d48b8ba9029 +size 682281 diff --git a/neuromorphiccameraguidedhighdynamicrangeimaging/layout.json b/neuromorphiccameraguidedhighdynamicrangeimaging/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..7e665637a08f1bd6784ac409c5e90ecad498c49e --- /dev/null +++ b/neuromorphiccameraguidedhighdynamicrangeimaging/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:54781f6b6b010577e68c719234bffc01381332de303d6871f5937d2f92510d87 +size 411904 diff --git a/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/d1e1154f-3947-4238-bae6-7a58e623427b_content_list.json b/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/d1e1154f-3947-4238-bae6-7a58e623427b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..6f35c7e7a89cd715d34b47549f977088c368f8b5 --- /dev/null +++ b/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/d1e1154f-3947-4238-bae6-7a58e623427b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac6eceab9dda2340f046e6fa8ab6b889e6505d7dd3e9d5ebaa542e36c82ecb87 +size 72019 diff --git a/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/d1e1154f-3947-4238-bae6-7a58e623427b_model.json b/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/d1e1154f-3947-4238-bae6-7a58e623427b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..37282eea4be3c0c218521451f4ee800f21e8a68d --- /dev/null +++ b/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/d1e1154f-3947-4238-bae6-7a58e623427b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5588143eafa3054941507e4bbbcceba1030a9cfcb18f6f9be39e218ccd1f4816 +size 85285 diff --git a/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/d1e1154f-3947-4238-bae6-7a58e623427b_origin.pdf b/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/d1e1154f-3947-4238-bae6-7a58e623427b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b284a43c78f94a7a3adb3cf52c3eccd17091cdba --- /dev/null +++ b/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/d1e1154f-3947-4238-bae6-7a58e623427b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2aad39a70d503c8977008dbe57edb2b389c78051ba2e8092a084eb6f803b4522 +size 490158 diff --git a/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/full.md b/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0f383a50b237b33f1e72897ec6a3bb13f3063b9f --- /dev/null +++ b/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/full.md @@ -0,0 +1,261 @@ +# NMS by Representative Region: Towards Crowded Pedestrian Detection by Proposal Pairing + +Xin Huang $^{1*}$ , Zheng Ge $^{1*}$ , Zequn Jie $^{2}$ , Osamu Yoshie $^{1}$ $^{1}$ Waseda University, $^{2}$ Tencent AI Lab + +koushin@toki.waseda.jp; jokerzz@fuji.waseda.jp; zequn.nus@gmail.com; yoshie@waseda.jp + +# Abstract + +Although significant progress has been made in pedestrian detection recently, pedestrian detection in crowded scenes is still challenging. The heavy occlusion between pedestrians imposes great challenges to the standard Non-Maximum Suppression (NMS). A relative low threshold of intersection over union (IoU) leads to missing highly overlapped pedestrians, while a higher one brings in plenty of false positives. To avoid such a dilemma, this paper proposes a novel Representative Region NMS ( $R^2$ NMS) approach leveraging the less occluded visible parts, effectively removing the redundant boxes without bringing in many false positives. To acquire the visible parts, a novel Paired-Box Model (PBM) is proposed to simultaneously predict the full and visible boxes of a pedestrian. The full and visible boxes constitute a pair serving as the sample unit of the model, thus guaranteeing a strong correspondence between the two boxes throughout the detection pipeline. Moreover, convenient feature integration of the two boxes is allowed for the better performance on both full and visible pedestrian detection tasks. Experiments on the challenging CrowdHuman [20] and CityPersons [24] benchmarks sufficiently validate the effectiveness of the proposed approach on pedestrian detection in the crowded situation. + +# 1. Introduction + +Pedestrian detection is a critical component of various real-world applications such as self-driving cars, and intelligent video surveillance. In recent years, the performance of pedestrian detectors has been rapidly improved with the rise of deep convolutional neural networks (CNNs) [21, 7, 8]. However, pedestrian detection in the occluded situation remains challenging. Occlusion can be usually categorized into inter-class occlusion and intra-class occlusion. In interclass occlusion, part of the human body is shielded by background objects such as pillar, car, trash box, and others. The + +![](images/63f676ccae4b39c253b6cd1d7265f4a63467b2ddbb37100c52113361ae447f54.jpg) +Figure 1. Illustration of $\mathbb{R}^2\mathrm{NMS}$ . The image on the left shows two detected results before NMS. Red BBoxes are full body predictions and green BBoxes are visible body predictions. Two small images on the right show the final results which is processed by original NMS and $\mathbb{R}^2\mathrm{NMS}$ . The red solid BBox represents the preserved BBoxes while red dotted BBox indicates the reduced true positive BBox. Arrows represent the IoU calculation. The IoU of their full body prediction is 0.63 while the IoU of their visible body is only 0.18. Thus, original NMS will reduce the red dotted BBox but $\mathbb{R}^2\mathrm{NMS}$ is able to keep it. + +feature of background objects confuses the model, leading to a high missing rate in this situation. A common solution to alleviate the inter-class occlusion is modeling based on instance parts [14, 27, 15]. Visible parts can provide more discriminative and confident cues to guide the full-body detector. In intra-class occlusion, pedestrians have large overlaps with each other, so features of different instances will make detectors difficult to discriminate instance boundaries. As a result, detectors may give a lot of positives in overlapped area mistakenly. To solve this problem, Repulsion Loss [23] and AggLoss [25] propose additional penalties to the BBoxes which appear in the middle of the two persons. The proposals are forced to locate firmly and compactly to the ground-truth objects. + +However, even though the detectors succeed in identifying different human instances in a crowd, the highly overlapped results may also be suppressed by the post-processing of non-maximum suppression (NMS). This makes the current pedestrian detectors trapped in a dilemma: a lower threshold of intersection over union (IoU) resulting in the miss of highly overlapped pedestrians while + +a higher IoU threshold naturally brings in more false positives. To solve this problem, several modified versions of NMS have been proposed. Instead of directly discarding the highly overlapped BBoxes, soft-NMS [1] lowers detection scores of less confident BBoxes according to their overlaps with the most confident one. However, it still introduces lots of false positives of highly overlapped BBoxes. Adaptive NMS [12] proposed a dynamic thresholding version of NMS. It predicts a density map, and sets adaptive IoU thresholds in NMS for different BBoxes according to the predicted density. However, density estimation itself remains a difficult task, and the exact matching from density to the optimal IoU threshold is also hard to decide. Moreover, the inaccurate BBox prediction often leads to the inconsistency between the ground-truth density and the IoU of the predicted BBoxes, as shown in Fig. 2. This makes AdaptiveNMS still a sub-optimal solution. + +In this paper, we propose a novel NMS algorithm to overcome the issues of existing NMS approaches called NMS by representative region $(\mathbb{R}^2\mathrm{NMS})$ . $\mathbb{R}^2\mathrm{NMS}$ leverages the visible parts of the pedestrians in NMS, which effectively averts the troubles brought by the difficult NMS on highly overlapped full bodies. Since the visible parts of pedestrians usually suffer much less from occlusion, a relative low IoU threshold sufficiently removes the redundant BBoxes locating the same pedestrian, and meanwhile avoids the large number of false positives. An illustration of $\mathbb{R}^2\mathrm{NMS}$ is showing in Fig. 1. + +To obtain the visible part of a pedestrian, we propose a novel Paired-Box Model (PBM) based on the standard Faster R-CNN. PBM simultaneously predicts the full box and the visible box of a pedestrian in both RPN and the R-CNN module (i.e., from RoI sampling to the final post-classification and BBox regression layers). Specifically, a pair constituted by a full and a visible boxes is defined as the sample unit of both RPN and the R-CNN module. Such a pairing strategy guarantees a strong correspondence between the full and visible boxes throughout the detection pipeline. Moreover, the pairing solution allows the effective feature integration of the two boxes which benefits both the full and visible pedestrian detection tasks. + +Experiments on the extremely crowded benchmark CrowdHuman [20] and the CityPersons [24] show that the proposed approach can achieve the state-of-the-arts results, strongly validating the superiority of the method. + +To summarize, the contributions of this work are three-fold: (1) a novel NMS method - $\mathbf{R}^2\mathbf{N}\mathbf{M}\mathbf{S}$ , to overcome the weakness of original NMS; (2) a Paired-Box Model (PBM) which simultaneously predicts both the full and visible boxes of a single pedestrian, and performs convenient feature integration of the two boxes; (3) the state-of-the-art results on the challenging CrowdHuman and CityPersons benchmarks. + +![](images/f3a4992b6df8f78940f4df863fbc4182d92ea40383f7596b11aba12973a40285.jpg) +Figure 2. Illustration of the weakness of AdaptiveNMS [12]. Green BBoxes are the full body annotations. Red dotted BBoxes are detected BBoxes which are not exactly match to ground truths. Overlap between the detected BBoxes is different from the overlap between ground truth BBoxes. If applying AdaptiveNMS in this situation, One detected BBox will be reduced. + +# 2. Related Works + +Generic Object Detection. With the rapid development of convolutional neural networks (CNNs) [21, 7, 8], great progress has been made in the object detection field. CNN based object detectors are usually categorized into one-stage and two-stage detectors. One-stage approaches [13, 17, 10, 18] aim to accelerate the inference process of detectors, to meet the requirement of time efficiency in various real world applications. In contrast to one-stage approaches, two-stage detectors [4, 19, 5] aim to pursue the cutting edge performance by adding a post classification and regression module to refine the detection results. To this end, Faster R-CNN [19] together with its variants e.g. FPN [9] and Mask R-CNN [6] builds a powerful baseline for the task of generic object detection. + +Occlusion Handling for Pedestrian Detection. Occlusion leads to two issues in pedestrian detection: mis-classifying occluded pedestrian and mis-placing detected results in a crowd. A common solution to the former problem is the part-based approaches [27, 25, 22] which elaborate series of body-part detectors to handle the specific visual pattern of occluded instances. Except aforementioned methods, a few of recent works focus on utilizing annotations of visible body as extra supervisions to improve the performance of pedestrian detection. Zhou et al. [28] is the first one who regresses full and visible body of a pedestrian at the same time. Zhang et al. [26] utilizes the annotations of visible parts as external guidance for better recognition performance on occluded instances. [16] incorporates attention mechanism into pedestrian detection to force the detectors + +![](images/4aad749c4e57da9516abff621c73249036cf98b9090719c6a300c499411b7489.jpg) +Figure 3. Structure of our Paried-Box Model. Gray arrow represents the information flow. Pair RPN generates a pair of proposals from the same anchor. After that, pair proposal feature extractor aggregates the pair of proposal features and sends it to P-RCNN. P-RCNN predicts pairs of BBoxes. Finally, $\mathbb{R}^2\mathrm{NMS}$ serves as our post-processing method to filter out false positives. Two paired BBoxes examples are shown in brown dotted box. + +to focus more on visible regions of a pedestrian. Pedestrian detection in crowded scenes also raises a lot of attention. [23] and [25] both impose additional penalty terms on the BBoxes that appear in the middle of two persons. Adaptive NMS [12] predicts a density map to perform a modified version of NMS with dynamic thresholds. Different from all the existing works, our method utilizes the visible region information to assist the NMS, and forces the model to learn full and visible boxes together throughout the pipeline for the strong correspondence between the two boxes. + +# 3. Method + +In this section, we first analyze the weakness of the standard NMS and AdaptiveNMS [12] when handling crowd situation. Next, we introduce the proposed $\mathbf{R}^2$ NMS. Finally, we describe the Paired-Box Model (PBM) in detail. + +# 3.1. Analysis on original NMS and Adaptive NMS + +In object detection, multiple object proposals locating the same object may be highly scored by the model. In this case, NMS is necessary to filter out the less confident ones according to the predicted scores. However, in the crowded situation, the ground-truth pedestrians are highly overlapped. Naturally, the detection boxes locating different pedestrians can also have high overlaps with each other. Therefore, when using a relative low IoU threshold as in the MS COCO benchmark [11] during NMS, e.g., 0.5, many true positives of different instances may be suppressed. This significantly reduces the recall of all the instances, thus hurting the final detection performance. Take the CrowdHu + +man dataset as an example, for each of the 99,481 ground-truth instances in the validation set, we assume the detector can produce an exact BBox (i.e., the BBox is scored 1.0 and the IoU between the BBox and the ground-truth instance is also 1.0). However, after performing the standard NMS with IoU threshold 0.5, only 90,232 exact BBoxes are remained. $^{1}$ Nearly $10\%$ of the ground-truth instances are missed in detection. This indicates that even a perfect pedestrian detector fails to detect all the ground-truth instances, after the NMS using a relative low IoU threshold. On the contrary, setting a higher IoU threshold in NMS preserves more true positives, while significantly increase the false positives. Similarly, in the validation set of CrowdHuman, assuming all the ground-truth instances have exact predicted BBoxes, the missing rate will be reduced to $1\%$ when setting the IoU threshold of NMS as 0.7. However, the higher IoU threshold inevitably brings in more false positives in practice. For example, in the validation set of CrowdHuman, a well-trained Faster R-CNN based on ResNet-101 produces about 15,000 detection boxes whose score exceeds 0.5, after the NMS with the IoU threshold 0.7. Notice that the ground-truth instance number is 99,481, thus about 50,000 predicted boxes are redundant or false positives. Therefore, the dilemma of the standard NMS in the crowded situation is difficult to resolve. + +To overcome the shortcoming of the standard NMS, AdaptiveNMS [12] is proposed. AdaptiveNMS [12] is a dynamic thresholding version of NMS. It incorporates a sub + +![](images/3656d6747a3b36da9f0e1eea4f4994375973f9f8892eb8fd63f22edf8d94675d.jpg) +(a) + +![](images/8f1d4eda469a41d5fe657bf52d987cdd148068d41a1800a5f079b004903fead9.jpg) +(b) + +![](images/719e218d9c1c1b97769a20a058fabed1957767280d081f17fcc4d2f17cce6aab.jpg) +(c) +Figure 4. Illustration of P-RCNN. Red BBoxes represent the full body annotations. Green BBoxes stand for the visible annotations. Orange BBoxes are anchors. (a) P-RCNN regresses a pair of proposal from the same anchor. (b) The orange anchor is assigned to the man because it aligns well with the man's full and visible body. (c) Orange dotted anchor has large IoU with full body annotation, however, it is bad for visible body. + +network to predict the density for each location, and sets adaptive IoU thresholds in NMS for different BBoxes according to the predicted density. However, density estimation itself remains a difficult task. Besides, the matching from the density to the optimal IoU threshold is still handcrafted in AdaptiveNMS, and thus the exact matching is difficult to acquire. Moreover, the inaccurate BBox prediction often leads to the inconsistency between the ground-truth density and the IoU of the predicted BBoxes. The phenomenon is illustrated in Fig. 2. All these make the AdaptiveNMS still a sub-optimal solution. + +# 3.2. NMS by Representative Region + +To overcome the above issues of the standard NMS and AdaptiveNMS [12], we propose a novel NMS by representative region $(\mathbb{R}^2\mathbb{N}\mathbb{M}\mathbb{S})$ . The key difference between $\mathbb{R}^2\mathbb{N}\mathbb{M}\mathbb{S}$ and the standard NMS lies in the IoU calculation. Specifically, instead of directly calculating the IoU of two full-body boxes as their "overlap degree", the IoU between the visible regions of the two boxes are used to determine whether the two full-body boxes are overlapped. Such a visible region based overlap determination is based on the following observations. BBoxes locating different pedestrians usually have low IoU between their visible regions, even if the IoU between the two full boxes is large. In contrast, both the full and visible regions would have large IoUs when two BBoxes locate a same pedestrian. Therefore, the IoU between the visible regions of two boxes is a better indicator showing whether the two full-body boxes to belong to a same pedestrian. As a result, based on the visible regions, a relative low IoU threshold sufficiently removes the redundant BBoxes locating the same pedestrian, and meanwhile avoids the large number of false positives. The detailed algorithm of $\mathbb{R}^2\mathbb{N}\mathbb{M}\mathbb{S}$ is described in Algorithm 1. + +# 3.3. Paired-BBox Faster R-CNN + +To obtain the visible part of a pedestrian, we propose a novel Paired-Box Model (PBM) which simultaneously pre + +Algorithm 1 R²NMS +Input: Score: $S = \{s_1,s_2,\dots,s_n\}$ Full body BBoxes: $B^{f} = \{b_{1}^{f},b_{2}^{f},\dots,b_{n}^{f}\}$ Visible body BBoxes: $B^{v} = \{b_{1}^{v},b_{2}^{v},\dots,b_{n}^{v}\}$ NMS threshold: $\Omega$ +Output: Pairs of result : $R$ +1: $R\gets \{\}$ +2: Removed BBoxes index list : $I\gets \{\}$ +3: According to $S$ , rank $B^{f}$ and $B^{v}$ in descending order. +4: for $b_{i}^{v}\in B^{v}$ do +5: if $i\in I$ or $i = n$ then +6: pass +7: else +8: $j\gets i + 1$ +9: for $b_{j}^{v}\in B^{v}$ do +10: overlap $\leftarrow$ IoU $(b_i^v,b_j^v)$ +11: if overlap $>\Omega$ then +12: Add $j$ to $I$ +13: for $(b_i^f,b_i^v)\in (B^f,B^v)$ do +14: if $i\notin I$ then +15: Add $(b_i^f,b_i^v)$ to $R$ +16: return $R$ + +dicts the full and visible boxes of a pedestrian. To this end, the PBM is based on a standard Faster R-CNN with the following three modifications, i.e., Paired Region Proposal Network (P-RPN), Paired Proposal Feature Extractor (PPFE) and Pair R-CNN (P-RCNN). Specifically, the P-RPN first generates a set of full/visible proposal pairs, each of which corresponds to the full and visible regions of a pedestrian. PPFE then extracts the feature of each proposal pair, and fuses the features of the full and visible boxes to provide an integrated representation for each pair. Finally, the integrated representations are fed into P-RCNN to perform pair-wise classification and further refinement for the predicted full and visible BBoxes. In this manner, BBoxes of both full and visible body with strong correspondence can be obtained, facilitating the use of $\mathbb{R}^2$ NMS. + +Paired Region Proposal Network. The duty of Paired Region Proposal Network (P-RPN) is generating paired full-body and visible-body proposals. Since the full and visible regions of a pedestrian usually have high overlaps, it is feasible to regress a pair of full-body and visible-body proposals from a same anchor. Moreover, regressing the two proposals from a same anchor provides inherent correspondence between the predicted full-body and visible-body proposals. + +The annotated full-body box $\mathbf{F}$ and the corresponding visible-body box $\mathrm{V}$ constitute a pair $\mathrm{Q} = (\mathrm{F},\mathrm{V})$ , serving + +![](images/ebdb0b2ccfc0140dec25a0ec972d2edf70431f02ae32103155d902b02b1c16a4.jpg) +Figure 5. Illustration of our proposed PPFE module. + +as the ground-truth unit of the model. We refer to the proposal matching method in [28] to assign ground-truth label to the anchors during training P-RPN. More specifically, the ground-truth assignment strategy in Faster R-CNN [19] is modified by adding one more restriction. For a certain anchor, we consider both its IoU w.r.t. the full-body ground-truth boxes and its IoF w.r.t. the visible ground-truth boxes. Formally, an anchor A is viewed as positive matched to the ground-truth pair $\mathrm{Q} = (\mathrm{F},\mathrm{V})$ , if the following requirements are satisfied. + +$$ +\operatorname {I o U} (\mathrm {A}, \mathrm {F}) \geq \alpha_ {1} \text {a n d} \operatorname {I o F} (\mathrm {A}, \mathrm {V}) \geq \beta_ {1} +$$ + +$$ +\operatorname {I o U} (\mathrm {A}, \mathrm {F}) = \frac {\operatorname {A r e a} (\mathrm {A} \cap \mathrm {F})}{\operatorname {A r e a} (\mathrm {A} \cup \mathrm {F})} +$$ + +$$ +\operatorname {I o F} (\mathrm {A}, \mathrm {V}) = \frac {\operatorname {A r e a} (\mathrm {A} \cap \mathrm {V})}{\operatorname {A r e a} (\mathrm {V})} +$$ + +Here $\alpha_{1}$ and $\beta_{1}$ are positive thresholds for the full body and visible body, respectively. According to our experiments, PBM performs the best when $\alpha_{1} = 0.7$ and $\beta_{1} = 0.7$ . + +The detailed architecture of P-RPN follows the RPN in Faster R-CNN [19]. The only difference lies in the output layer. Apart from the locations of the paired proposals, P-RPN also predicts a score for each pair showing whether confidence of the pair matching to a pedestrian. Therefore, for each dense anchor, P-RPN produces a 10-d result $(\mathbf{R}_{\mathbf{f}}, \mathbf{R}_{\mathbf{v}}, \mathbf{S})$ . Here $\mathbf{R}_{\mathbf{f}}$ and $\mathbf{R}_{\mathbf{v}}$ are 4-d BBox regression vectors $(f_x, f_y, f_w, f_h)$ and $(v_x, v_y, v_w, v_h)$ , towards the full-body and visible-body ground-truths, respectively. $\mathbf{S}$ is a 2-d confidence vector $(S_+, S_-)$ after softmax normalization. The loss functions used in training are the same as that in the standard RPN. + +Paired Proposal Feature Extractor. The pairing strategy in R-RPN allows an inherent correspondence between the full and visible proposals. We thus propose a Paired Proposal Feature Extractor (PPFE) to effectively integrate information from both proposals, facilitating the detection of both full and visible pedestrian detection tasks. + +Figure 5 shows two proposed ways of feature integration. A straightforward one is to directly concatenate the feature vectors of the full and visible proposals $\mathrm{F_f}$ and $\mathrm{F_v}$ after RoI Align. Because only $fc$ layers are used in P-RCNN, spatial alignment of the features of the two proposals are not necessary. Experimental results show that such a simple feature fusion method increases the performance a lot. + +The second way of feature integration is based on the attention mechanism which highlights the more informative visible regions. Specifically, for each pair of proposals, we generate a visible body attention mask showing whether to be inside the visible proposal for each pixel in the full-body proposal. If a pixel is also inside the visible proposal, we assign the value 1 to this pixel in the attention mask. Pixels outside the visible proposal are all set as 0 in the attention mask. The attention mask is then resized to the same size as the proposal feature after RoI Align, i.e., $7 \times 7$ . We then multiply the full-body proposal feature $\mathrm{F}_{\mathrm{f}}$ with the mask in an element-wise manner, to get the visible mask attention feature $\mathrm{F}_{\mathrm{m}}$ . Finally, We concatenate $\mathrm{F}_{\mathrm{v}}$ and $\mathrm{F}_{\mathrm{m}}$ to obtain the final integrated feature for the pair. + +Paired R-CNN. The integrated feature produced by PPFE serves as the input of the Paired R-CNN (P-RCNN). P-RCNN is used to perform both full and visible pedestrian detection, based on the proposal pairs. The detailed architecture of P-RCNN is based on the R-CNN module in Faster R-CNN [19], with the following modifications. After receiving the pair feature, P-RCNN contains two bifurcated branches following two shared $fc$ layers for the full and visible BBoxes prediction, respectively. Each of the branches has the exact same architecture and output as that in the standard Faster R-CNN. + +Similar to P-RPN, the essential problem in P-RCNN is how to assign the proposals to the ground-truths. We use a strategy which is quite similar to the anchor assignment method in P-RPN. To be more specific, for a pair of annotation $\mathrm{Q} = (\mathrm{F},\mathrm{V})$ , a pair of proposal $\mathrm{X} = (\mathrm{P_f},\mathrm{P_v})$ is positive if it satisfies: + +$$ +\operatorname {I o U} \left(\mathrm {P} _ {\mathrm {f}}, \mathrm {F}\right) \geq \alpha_ {2} \text {a n d} \operatorname {I o U} \left(\mathrm {P} _ {\mathrm {v}}, \mathrm {V}\right) \geq \beta_ {2} +$$ + +According to our experimental results, the best number for $\alpha_{2},\beta_{2}$ is 0.5 and 0.5. The loss functions used in training are also the same as that in the standard Faster R-CNN. + +As discussed above, the major modifications of PBM from Faster R-CNN introduce little extra computation, while brings a huge amount of performance gains. Experimental results in the next section verify the effectiveness of our model. + +# 4. Experiments + +To evaluate our proposed methods, we conduct several experiments on two crowd pedestrian datasets: CrowdHuman [20] and CityPersons [24]. + +Table 1. Main results. * stands for our re-implemented results. MR and AP are abbreviations of the Log-Average Missing Rate and the Average Precision, respectively. MR, AP, Recall stand for the results for full body. MR-V stands for the MR for visible body. For MR, lower is better. For AP and Recall, higher is better. $\Delta$ MR-V and $\Delta$ MR-V indicate the absolute gain on visible and full body comparing to our re-implemented baseline. The best results are written in bold. + +
MethodP-RPNP-RCNNPPFER2NMSMR-VMRAPRecallΔ MR-VΔMR
Baseline [20]----55.9450.4284.9590.24--
Baseline*----55.5746.2884.9188.25--
NPM✓✓--54.1845.4385.5988.92+1.39+0.85
PBM✓✓mask-52.7044.2085.6088.61+2.87+2.08
PBM✓✓mask✓52.7043.3589.2993.33+2.87+2.93
PBM✓✓concat-52.1944.3285.5088.28+3.38+1.96
PBM✓✓concat✓52.1943.5789.2893.10+3.38+2.71
+ +Table 2. Influence of varying $\beta_{1}$ and $\beta_{2}$ . NPM is the abbreviation of Naive Pair Model. The value of MR-V+MR reflects the model's performance on two of the annotation categories. + +
Methodβ1β2MR-VMRMR-V+MR
Baseline--55.5746.28101.85
NPM0.80.554.8146.34101.15
NPM0.60.554.6545.42100.07
NPM0.70.554.1845.3099.48
NPM0.70.654.3547.23101.58
NPM0.70.455.8044.53100.33
+ +# 4.1. Datasets and Evaluation Metric + +CrowdHuman Dataset. Recently, CrowdHuman [20] dataset, a human detection benchmark, has been released to better evaluate pedestrian detectors in crowded scenarios. There are 15000, 4370 and 5000 images in training set, validation set, and test set respectively. The average of the number of persons in an image is 22.6. CrowdHuman [20] provides three categories of bounding boxes annotations for each human instance: head bounding-box, human visible-region bounding-box and human full-body bounding-box. All of our experiments are conducted under the settings of full body and visible body. The models are trained on the training set and evaluated on validation set. + +CityPersons Dataset. The CityPersons [24] dataset is a subset of Cityscapes [2] which only consists of person annotations. There are 2975 images for training, 500 and 1575 images for validation and testing. The average of the number of pedestrians in an image is 7. The visible-region and full-body annotations are provided. We evaluate our proposed methods under the full-body setting. Following to the evaluation protocol in CityPersons [24], objects whose height are less than 50 pixels are ignored. The validation set is further divided into several subsets according to visibility: + +(1) Reasonable (R): Visibility $\in$ [0.65, $\infty$ ) +(2) Heavy Occlusion (HO): Visibility $\in$ [0.2, 0.65) + +We show our results across these two subsets. + +Evaluation Metric. For evaluation, we follow the standard Caltech [3] evaluation metric - MR, which stands for the Log-Average Missing Rate over false positives per image (FPPI) ranging in $[10^{-2}, 10^{0}]$ . To better evaluate our methods, Average Precision (AP) and Recall are also provided. + +Table 3. Impact of PPFE. + +
MethodPPFEMR-VMRAPRecall
NPM-54.1845.4385.5988.92
PBMconcat52.1944.3285.5088.28
PBMmask52.7044.2085.5088.61
+ +# 4.2. Implementation Details + +For CrowdHuman [20] dataset, we adopt Feature Pyramid Network (FPN) [9] with ResNet-50 [7] as our baseline. To extract more precise features, we adopt RoI Align [6] instead of RoI Pooling [19] for feature extraction. The anchor aspect ratios for full body and visible body are set to [0.5,1,2]. Because images in CrowdHuman dataset have various shapes, we resize them so that the short edge is 800 pixels while the long edge is smaller than 1400 pixels. We train our model on 8 GPUs with totally 16 images per minibatch. We use SGD with momentum of 0.9 as our optimizer and set the initial learning rate as 0.02. We train 20 epochs in total and decrease the learning rate by 0.1 at 16th and 19th epochs. + +For CityPersons dataset, we follow the settings in adapted Faster R-CNN framework [24]. Specifically, the backbone of our detector is VGG-16 [21]. To detect small objects, we remove the fourth max-pooling layer in VGG-16. The aspect ratio for anchor is set to 2.44. The anchor sizes are the same as in [24]. We also adopt Adam as our optimizer. We train our model 12 epochs in total on 8 GPUs with a total of 16 images per mini-batch. The initial learning rate is set to 0.0008. We decrease the learning rate by 0.1 at the 8th and 11th epochs. We do not upsample the input images and only use the reasonable subset of pedestrians for training. + +# 4.3. Detection Results on CrowdHuman + +Main results. To thoroughly evaluate the performance of our proposed methods, we conduct plenty of experiments on CrowdHuman [20] dataset and evaluate the performance under three evaluation metrics. MR is chosen as the main metric. Table 1 shows the performance of baseline and our proposed methods on CrowdHuman [20] validation subsets. For fair comparison, all the models listed in Table 1 share the same settings on hyper-parameters. As can + +Table 4. Ablation study of $\mathbb{R}^2$ NMS. $\mathbb{R}^2$ is the abbreviation of $\mathbb{R}^2$ NMS. PBM here utilizes the concat version of PPFE. + +
Methodβ1β2MR-VMRAPRecall
NPM0.70.455.8044.5385.6288.74
NPM+R20.70.4-45.9188.2193.27
NPM0.70.554.1845.3085.5988.69
NPM+R20.70.5-45.8788.3993.76
PBM0.70.551.9244.7985.6288.12
PBM+R20.70.5-43.5789.2893.10
+ +be seen in Table 1, our re-implemented FPN [9] baseline achieves $46.28\%$ MR on full body detection and $55.57\%$ MR on visible body detection, which outperform the baseline in CrowdHuman [20] by $4.14\%$ and $0.37\%$ , respectively. Therefore, our baseline is strong enough to validate the effectiveness of our proposed methods. Based on our strong baseline, our methods can further bring the notable $2.71\%$ , $4.37\%$ and $4.85\%$ improvements on MR, AP and Recall, respectively, which significantly demonstrate the ability of our methods. To analyze the contribution of our proposed modules individually, we progressively replace the components in the baseline model with our modules. The relevant ablation studies and analysis are illustrated in the following paragraphs. + +Influence of different hyper-parameter settings in pair-based sample unit. To evaluate the efficacy of our pair-based sample unit in the whole pipeline, we build a naive version of paired model which simply replace the RPN and R-CNN in Faster R-CNN by P-RPN and P-RCNN. In NPM, full and visible proposals from RPN are fed into two separate R-CNN modules. These two separate R-CNN modules are responsible for the full and visible body detection, respectively. Each R-CNN module has the same architecture as the standard one in Faster R-CNN. We conduct a group of experiments on NPM to find out the most reasonable hyper-parameter settings. To make the NPM have consistent hyper-parameter setting with the baseline, $\alpha_{1}$ and $\alpha_{2}$ are fixed, i.e., 0.7 and 0.5, separately. The influence of the varying $\beta_{1}$ and $\beta_{2}$ is comprehensively studied and the results are shown in Table 2. We can see that NPM works reasonably well with $\beta_{1} = 0.7$ and $\beta_{2} = 0.5$ . When $\alpha_{1}$ and $\alpha_{2}$ are fixed, $\beta_{1}$ and $\beta_{2}$ control the balance between visible body and full body in our pair-based sample unit for training. When $\beta_{1}$ and $\beta_{2}$ are small, more low quality visible proposals are counted, which hurts the performance of NPM on visible detection results. A large $\beta_{1}$ and $\beta_{2}$ exclude poorly aligned visible proposals, meanwhile, such a setting rejects some well aligned full body positive training examples, which leads to a poor full body detection result. As can be seen in the third row of Table 2, $\beta_{1} = 0.7$ and $\beta_{2} = 0.5$ achieve a good trade-off between the two annotation categories. Therefore, we use $\alpha_{1} = 0.7$ , $\alpha_{2} = 0.5$ , $\beta_{1} = 0.7$ and $\beta_{2} = 0.5$ in the whole experiments unless otherwise mentioned. + +Table 5. State of the art comparison on CrowdHuman. * stands for our re-implemented results. The PBM here is equipped with mask version of PPFE. + +
MethodMRAPRecall
Baseline (CrowdHuman)50.4284.9590.24
Baseline*46.2884.9188.25
AdaptiveNMS49.7384.7191.27
Repulsion Loss*45.6985.6488.42
PBM43.3589.2993.33
+ +Impact of PPFE. When equipping NPM with the PPFE module, it becomes the PBM. We compare PBM with NPM in Table 3. From Table 3, we can tell that both proposed feature integration methods in Section 3 bring remarkable improvements on MR-V and MR. The simpler one - direct concatenating the features of full and visible proposals improves MR-V and MR by $1.99\%$ and $1.11\%$ , respectively, while PPFE with attention mechanism shows even better performance. Such a large gap between PBM and NPM totally proves that our proposed PPFE module could extract and integrate features from pair-based sample unit efficiently and successfully. Moreover, from Table 4, we can learn that PPFE makes $\mathrm{R}^2\mathrm{NMS}$ to perform better by improving the model's performance on visible body, illustrating the necessity of PPFE module. + +The relation between MR-V and $\mathbf{R}^2\mathrm{NMS}$ . To demonstrate the effectiveness of $\mathbf{R}^2\mathrm{NMS}$ , we replace the original NMS with the proposed $\mathbf{R}^2\mathrm{NMS}$ . Table 4 shows three groups of experimental results. We can conclude that $\mathbf{R}^2\mathrm{NMS}$ can boost performance on AP and Recall under all settings, while $\mathbf{R}^2\mathrm{NMS}$ makes MR worse when NPM is applied. To understand why $\mathbf{R}^2\mathrm{NMS}$ weakens the MR of the NPM, we would like to introduce the relation between MR-V and $\mathbf{R}^2\mathrm{NMS}$ . It is natural to believe that the quality of visible body predictions is crucial because $\mathbf{R}^2\mathrm{NMS}$ uses the IoU between the visible regions of two BBoxes to determine whether two full-body BBoxes are overlapped. However, we argue that compared to absolute localization quality of predicted visible BBoxes, relative localization quality which captures overlap degree between two human instances is more important. A straightforward example can verify our point - suppose all visible body predictions are the exactly same as full body predictions, in this case, MR-V will be poor. However, using such visible body predictions during $\mathbf{R}^2\mathrm{NMS}$ leads to the exactly same results for full body detection as original NMS, which is not as poor as MR-V does not necessarily lead to poor MR for full body predictions during $\mathbf{R}^2\mathrm{NMS}$ . + +To be more concrete, although a lower MR-V can possibly better model the overlaps between each instance pair, which will further benefit full body detection, as stated above, the absolute value of MR-V is not the decisive factor to the performance of full body detection. Our experimental results in Table 4 also demonstrate this point. With the + +Table 6. Comparison between our PBM and baseline on the CityPersons [24]. Log-Average Missing Rates (MR) on validation subsets is reported. R refers to reasonable set while HO refers to heavy occlusion set. + +
MethodPPFER2NMSRHO
Baseline--13.859.0
PBMconcat-12.557.3
PBMconcat√12.157.0
PBMmask-12.354.9
PBMmask√11.153.3
+ +decrease of MR-V, the performance of $\mathrm{R}^2\mathrm{NMS}$ gets better and a MR-V under $54\%$ is good enough to bring positive effects on full body detection via $\mathbf{R}^2\mathbf{NMS}$ . + +Further Analysis on $\mathbf{R}^2\mathbf{NMS}$ . The experimental results in Table 1 show that $\mathrm{R}^2\mathrm{NMS}$ can significantly improve AP and Recall, while it only improves MR by less than 1 percent. Such a phenomenon is caused by the difference between MR and AP, which we would like to deeply discuss. + +The main difference between MR and AP lies in the range of interested predicted scores. MR only cares about the predicted BBoxes whose scores are higher than the highest scored false positive. In contrast, AP takes all the detection results scored between 0 to 1 into consideration. Therefore, only a small fraction of predicted results will affect MR. As discussed in Section 1 and Section 3, in crowded situation, detectors tend to generate a lot of highly scored false positives which are difficult to remove via NMS. Thus, we claim that a large number of highly scored false positives in the results make FPPI reach one quickly. To demonstrate this, we calculate the average score of the highest scored false positive across all testing images. It turns out that such value is extremely high, and sometimes is even beyond 0.9. Such a phenomenon indicates that only BBoxes whose scores are higher than 0.9 can affect MR. Therefore, MR reflects the performance of the highly scored fraction of the detection results, while AP measures the performance of all detected BBoxes. This difference leads to the huge discrepancy between the gain on MR and AP from $\mathbf{R}^2\mathrm{NMS}$ . + +In conclusion, although $\mathbf{R}^2\mathrm{NMS}$ does not bring large improvements on MR, it greatly boosts AP. The huge improvement on AP strongly validates that $\mathbf{R}^2\mathrm{NMS}$ can not only preserve more true positives comparing to the original NMS, but also introduce less false positives. + +# 4.4. State-of-the-art Comparison on CrowdHuman + +We compare our method with AdaptiveNMS [12] and Repulsion Loss [23] on the CrowdHuman validation set in Table 5. It clearly shows that PBM with $\mathbb{R}^2\mathrm{NMS}$ outperforms these two published methods. Our method significantly reduces MR from $49.73\%$ to $43.35\%$ and boosts AP from $84.71\%$ to $89.29\%$ . Such a large gap demonstrates the superiority of our PBM and $\mathbb{R}^2\mathrm{NMS}$ . + +Table 7. State of the art comparison on CityPersons. AdaptiveNMS+ refers to AdaptiveNMS with AggLoss. * represents our implementation. + +
MethodBackboneRHO
Baseline*VGG-1613.859.0
Baseline (MGAN)[16]VGG-1613.857.0
Adapted FasterRCNN[24]VGG-1615.8-
ATT-part[26]VGG-1616.056.7
Repulsion Loss[23]ResNet-5013.256.9
OR-CNN[25]VGG-1612.855.7
AdaptiveNMS[12]VGG-1612.956.4
AdaptiveNMS+[12]VGG-1611.955.2
MGAN[16]VGG-1611.551.7
OursVGG-1611.153.3
+ +# 4.5. Detection Results on CityPersons + +To prove the generalization ability of our methods, we also conduct several experiments on CityPersons [24]. Comparisons results are shown in Table 6. To clearly demonstrate the effectiveness of our proposed new components, we also show the performance of out method with different settings in different rows. No matter under what kind of setting, PBM with $\mathbb{R}^2\mathrm{NMS}$ performs better than baseline. The best results are boldfaced and shown in the final row. Compared to the baseline, our detector significantly reduces the MR from $13.8\%$ to $11.1\%$ on the reasonable set. On the heavy occlusion set, it outperforms the baseline by $5.7\%$ . Such a large gain provides a convincing proof to the effectiveness of our detector. + +We compare our method with the recent state-of-the-art methods including Adapted FasterRCNN [24], ATT-part [26], Repulsion Loss [23], OR-CNN [25], AdaptiveNMS [12] and MGAN [16] on the CityPersons validation set. We list the performance of previous works on reasonable subsets with the original input size in Table 7. We evaluate our methods under the same settings. The proposed PBM with $\mathbb{R}^2\mathrm{NMS}$ outperforms all published methods on reasonable validation subsets. Our method reduces the MR of state-of-the-art result from $11.5\%$ to $11.1\%$ . Notice that our method performs slightly worse than MGAN due to the weaker baseline result of our model. + +# 5. Conclusion + +In this paper, we propose $\mathbf{R}^2\mathrm{NMS}$ to effectively remove the redundant boxes without brings in many false positives in crowded situation. The $\mathbf{R}^2\mathrm{NMS}$ uses the IoU between the visible regions of the two boxes to determine whether the two full-body boxes are overlapped. To support this idea, we propose a novel Paired-Box Model (PBM) to simultaneously predicts the full box and the visible box of a pedestrian. Experiments on the extremely crowded benchmark CrowdHuman [20] and the CityPersons [24] show that the proposed approach can achieve the state-of-the-arts results, strongly validating the superiority of the method. + +# References + +[1] Navaneeth Bodla, Bharat Singh, Rama Chellappa, and Larry S Davis. Soft-nms-improving object detection with one line of code. In Proceedings of the IEEE international conference on computer vision, pages 5561-5569, 2017. +[2] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3213-3223, 2016. +[3] 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, 2011. +[4] Ross Girshick. Fast r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 1440-1448, 2015. +[5] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 580-587, 2014. +[6] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 2961-2969, 2017. +[7] 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. +[8] 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. +[9] 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. +[10] 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. +[11] 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. +[12] Songtao Liu, Di Huang, and Yunhong Wang. Adaptive nms: Refining pedestrian detection in a crowd. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6459-6468, 2019. +[13] 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. +[14] Markus Mathias, Rodrigo Benenson, Radu Timofte, and Luc Van Gool. Handling occlusions with franken-classifiers. In + +Proceedings of the IEEE International Conference on Computer Vision, pages 1505-1512, 2013. +[15] Wanli Ouyang and Xiaogang Wang. Joint deep learning for pedestrian detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 2056-2063, 2013. +[16] Yanwei Pang, Jin Xie, Muhammad Haris Khan, Rao Muhammad Anwer, Fahad Shahbaz Khan, and Ling Shao. Mask-guided attention network for occluded pedestrian detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 4967-4975, 2019. +[17] 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. +[18] Joseph Redmon and Ali Farhadi. Yolo9000: better, faster, stronger. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7263-7271, 2017. +[19] 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. +[20] 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. +[21] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. +[22] 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. +[23] Xinlong Wang, Tete Xiao, Yuning Jiang, Shuai Shao, Jian Sun, and Chunhua Shen. Repulsion loss: Detecting pedestrians in a crowd. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7774-7783, 2018. +[24] Shanshan Zhang, Rodrigo Benenson, and Bernt Schiele. Citypersons: A diverse dataset for pedestrian detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3213-3221, 2017. +[25] 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. +[26] Shanshan Zhang, Jian Yang, and Bernt Schiele. Occluded pedestrian detection through guided attention in cnns. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6995-7003, 2018. +[27] Chunluan Zhou and Junsong Yuan. Multi-label learning of part detectors for heavily occluded pedestrian detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 3486-3495, 2017. +[28] Chunluan Zhou and Junsong Yuan. Bi-box regression for pedestrian detection and occlusion estimation. In Pro \ No newline at end of file diff --git a/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/images.zip b/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..a72d43392c043ba41815ae974b917335d1b2b432 --- /dev/null +++ b/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1745f6eb01ee4d37470863a8a0db304eb3cb2fe983154986ffc5e40a361b5f73 +size 500118 diff --git a/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/layout.json b/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..3840a6a604f6b60c0ec794bde4d1d05a8289f84e --- /dev/null +++ b/nmsbyrepresentativeregiontowardscrowdedpedestriandetectionbyproposalpairing/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01862f1c37fcef17d4de8375b22a5263e5748aa13650dc00bb1f4b64ae49a338 +size 383615 diff --git a/noiseawarefullyweblysupervisedobjectdetection/b2c39529-afe8-407f-9dfc-9f6c0bff0ed9_content_list.json b/noiseawarefullyweblysupervisedobjectdetection/b2c39529-afe8-407f-9dfc-9f6c0bff0ed9_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f3f1a917550a5dd27938e845e9f0ab4b177cbe1f --- /dev/null +++ b/noiseawarefullyweblysupervisedobjectdetection/b2c39529-afe8-407f-9dfc-9f6c0bff0ed9_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa1ea9ff978b01e5585e3521a3046637bf173a593e5deaf39112f18217ddc123 +size 88162 diff --git a/noiseawarefullyweblysupervisedobjectdetection/b2c39529-afe8-407f-9dfc-9f6c0bff0ed9_model.json b/noiseawarefullyweblysupervisedobjectdetection/b2c39529-afe8-407f-9dfc-9f6c0bff0ed9_model.json new file mode 100644 index 0000000000000000000000000000000000000000..96f098e1755c713136c1edae72b37af1ab9b50ba --- /dev/null +++ b/noiseawarefullyweblysupervisedobjectdetection/b2c39529-afe8-407f-9dfc-9f6c0bff0ed9_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3f3f448ad131616e1b8970442949da07c42a7d1812ee66727d8733584f9fdc1 +size 109213 diff --git a/noiseawarefullyweblysupervisedobjectdetection/b2c39529-afe8-407f-9dfc-9f6c0bff0ed9_origin.pdf b/noiseawarefullyweblysupervisedobjectdetection/b2c39529-afe8-407f-9dfc-9f6c0bff0ed9_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..db8a627887c5d65763690240da20e7b54c8d10ec --- /dev/null +++ b/noiseawarefullyweblysupervisedobjectdetection/b2c39529-afe8-407f-9dfc-9f6c0bff0ed9_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2332ca0632884f72f0a8461c861bed9e754aceef7cc9fb2b50d2d2256d07409 +size 1598579 diff --git a/noiseawarefullyweblysupervisedobjectdetection/full.md b/noiseawarefullyweblysupervisedobjectdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0d9a9e620ec83ea45a1084a34b920397321d468e --- /dev/null +++ b/noiseawarefullyweblysupervisedobjectdetection/full.md @@ -0,0 +1,320 @@ +# Noise-Aware Fully Webly Supervised Object Detection + +Yunhang Shen $^{1}$ , Rongrong Ji $^{1*}$ , Zhiwei Chen $^{1}$ , Xiaopeng Hong $^{2}$ , Feng Zheng $^{3}$ , Jianzhuang Liu $^{4}$ , Mingliang Xu $^{5}$ , Qi Tian $^{4}$ + +1Media Analytics and Computing Lab, Department of Artificial Intelligence, School of Informatics, Xiamen University, 2Xi'an Jiaotong University + +$^{3}$ Department of Computer Science and Engineering, Southern University of Science and Technology $^{4}$ Noah's Ark Lab, Huawei Technologies, $^{5}$ Zhengzhou University + +shenyunhang01@gmail.com, rrj@xmu.edu.cn, zhiweichen@stu.xmu.edu.cn + +hongxiaopeng@mail.xjtu.edu.cn, zhengf@sustech.edu.cn, liu.jianzhuang@huawei.com + +iexumingliang@zzu.edu.cn, tian.qil@huawei.com + +# Abstract + +We investigate the emerging task of learning object detectors with sole image-level labels on the web without requiring any other supervision like precise annotations or additional images from well-annotated benchmark datasets. Such a task, termed as fully webly supervised object detection, is extremely challenging, since image-level labels on the web are always noisy, leading to poor performance of the learned detectors. In this work, we propose an end-to-end framework to jointly learn webly supervised detectors and reduce the negative impact of noisy labels. Such noise is heterogeneous, which is further categorized into two types, namely background noise and foreground noise. Regarding the background noise, we propose a residual learning structure incorporated with weakly supervised detection, which decomposes background noise and models clean data. To explicitly learn the residual feature between clean data and noisy labels, we further propose a spatially-sensitive entropy criterion, which exploits the conditional distribution of detection results to estimate the confidence of background categories being noise. Regarding the foreground noise, a bagging-mixup learning is introduced, which suppresses foreground noisy signals from incorrectly labelled images, whilst maintaining the diversity of training data. We evaluate the proposed approach on popular benchmark datasets by training detectors on web images, which are retrieved by the corresponding category tags from photo-sharing sites. Extensive experiments show that our method achieves significant improvements over the state-of-the-art methods1. + +![](images/22ef5d270f52e85ab38187b4f13759a177c88585df1cda928fadfee31b074a18.jpg) +Web images of person and horse categories +Figure 1: The overall flowchart of fully webly supervised object detection. + +# 1. Introduction + +Most object detection methods [18, 40, 33, 39, 14, 13, 15] rely on strong supervision, i.e., ground-truth bounding boxes, from well-annotated datasets [12, 32] for training. Methods such as Mask R-CNN [22] even leverage fine-grained pixel-level masks for supervision. Clearly, collecting annotations of bounding boxes or pixel-level masks is labor-expensive, which results in a serious limitation of existing methods in terms of both the category diversity and label quantity. It is infeasible to learn an object detector to effectively handle numerous object categories using such a setting. One way to reduce the requirement of strong supervision is the Weakly Supervised Object Detection (WSOD), which only relies on manual image-level annotations for training [37, 6, 50, 56, 45, 44]. However, for applications needing very large-scale image sets and categories, image-level annotations still require enormous human effort. In contrast, along with the popularity of photo-sharing sites + +![](images/980b3eb6b8b77b1e5dbf97e3af79728f072b70f2dbb7d8a13a1c1f8431d99d9a.jpg) +Figure 2: This figure depicts several web images retrieved by query aeroplane. The corresponding background labels (BL), foreground labels (FL), background noise (BN) and foreground noise (FN) are enumerated when target categories only have aeroplane and person. + +like Flickr, there has been an explosion of images with noisy tags available on the web. It is thus desirable to learn object detectors from such large-scale web resources with noisy image-level labels, which is referred to as Webly Supervised Object Detection (WebSOD). In this paper, we focus on fully WebSOD (fWebSOD), i.e., the most extreme case of WebSOD where only web images are available and no well-annotated benchmark is involved during training, as shown in Fig. 1. Compared to WSOD and WebSOD, fWebSOD is more feasible to learn diverse and numerous object categories in real-world scenarios without any other form of knowledge, e.g., precious annotations or additional images from well-annotated benchmark datasets. + +Although fWebSOD is challenging without any existing work in the literature, several attempts of WebSOD have been made [11, 7, 53]. Prevailing methods for the WebSOD task directly learn a detector from web labels with a simple-to-complex strategy [7, 52] or using additional data, e.g., Google books ngrams corpora [11] and PASCAL VOC images [53]. Such methods have one main drawback: They do not explicitly reduce the negative impact of image-level label noise in web data, which introduces potential risks of degenerating the performance of a learned detector significantly. Moreover, these methods usually follow a two/multi-stage scheme during training or testing. Little work explores an end-to-end pipeline for fWebSOD task. + +In this paper, we address the above drawbacks by well handling image-level noisy labels in an end-to-end fashion. We categorize the heterogeneous noise into two types, namely background noise and foreground noise. We define several relative concepts here. (i) Background labels and foreground labels are referred to as the background and foreground parts of the image-level labels, respectively. (ii) Background noise, i.e., missing labels, denotes those background labels that fail to describe foreground categories existing in the image. For example, the instances of categories person and areoplane coexist in the second image of Fig. 2, but the category person is not labelled, which is defined as the background noise. (iii) Foreground noise + +denotes those foreground labels where no instance of the foreground category appears in the image. For example, the last image of Fig. 2 does not contain any aeroplane of the target category areoplane. + +To handle the background noise, we decompose such noise by modelling clean data with residual learning. To this end, the reliable parts of background labels need to be identified from the massive noisy data explicitly. We observe that the distribution of accurate detection results for background categories is spatially scattered and numerically uniform. Motivated by this observation, for the background labels, we resort to producing spatially scattered proposals with uniform and moderate scores, whilst punishing the detection results where only a small minority of clustered proposals produce high scores. To handle the foreground noise, we collect multiple images of the same foreground label to synthesize a set of new training samples, as inspired by Multiple Instance Classification (MIC) [1] where any instances with positive labels will move positive labels to the corresponding bags. Such multi-instance-bagging mechanism enables to suppress the influence of foreground noise from incorrect labels, and to simultaneously maintain the diversity of training samples. + +In particular, we propose an end-to-end learning framework to jointly learn fully webly supervised detectors and reduce the negative impact of image-level noisy labels. Given a set of target categories, we query photo sharing sites like Flickr to retrieve the corresponding web images automatically. To tackle the background noise, we design a residual learning structure incorporated with weakly supervised detection. A novel spatially-sensitive entropy criterion is further proposed to estimate the spatial and numerical entropy of detection results in the bounding-box search space. The criterion estimates the confidence of background labels being noise. To handle the foreground noise, a bagging-mixup learning strategy is introduced to collect multiple images of the same foreground label to synthesize a set of new training samples, each of which is a convex combination of all images in the bag. Extensive experiments show that the proposed framework achieves significant improvements over state-of-the-art methods [11, 7, 53] on PASCAL VOC and MS COCO. In summary, the main contributions of this paper are as follows: + +- We propose a residual learning structure incorporated with weakly supervised detection in an end-to-end framework, which learns fully webly supervised detectors and reduces the negative impact of noisy labels by decomposing noise and modelling clean data. +- A spatially-sensitive entropy criterion and a bagging-mixup learning are further proposed to explicitly estimate the confidence of background labels being noisy and suppress the influence of foreground noise from + +incorrect labels, respectively. + +- Our models trained on only web data, which has about 4,000 images each category, achieves significant improvements over the state-of-the-art methods on popular benchmark, i.e., PASCAL VOC and MS COCO. + +# 2. Related Work + +Weakly supervised object detection. WSOD refers to learning an object detection model with only image-level annotations that only indicates the presence of an object category. Recent approaches combine convolutional neural networks (CNNs) and Multiple Instance Classification (MIC) [1] into a unified framework [6, 28, 10, 51, 42, 43]. The learning stage of MIC alternates between selecting positive samples and training an appearance model. There are some methods focusing on proposal-free paradigms by taking advantage of deep feature maps [4, 3, 62, 59] and class activation maps [61, 20, 59]. Some works also use additional annotations and data to improve the performance, e.g., object size estimation [47], instance count annotation [16], video motion cue [49] and human verification [38]. Knowledge transfer for progressive cross-domain adaptation is also exploited, e.g., data domain adaptation [46] and task domain adaption [25]. Instead of optimizing the MIC, some methods optimize the objective function of instance-level localization. For example, the works in [30, 27, 16, 50] mine the high-confidence proposals, which are then treated as positive samples to train a fully supervised model. Many efforts [60, 17] have been made to mine high-quality bounding boxes. To further improve the robustness, some works [50, 31, 54, 58] combine weakly supervised MIC models and fully supervised detectors. + +Webly supervised learning. Webly supervised learning has been widely studied in the past decade, which is typically used in image classification [5, 34, 35, 36, 21, 63], object detection [11, 7, 53], and semantic segmentation [55, 41, 24]. The domain adaptation approach by Bergamo et al. [5] is proposed to combine manually annotated examples and web data to learn image classifiers. Mahajan et al. [34] showed that training large-scale hashtag prediction leads to improvements in image classification and object detection tasks. To cope with the label noise, Niu et al. [35] proposed to join variational autoencoder and classification network to leverage the image-level information. Guo et al. [21] leveraged curriculum learning by measuring the complexity of data using distribution density for image classification. Niu et al. [36] combined webly supervised learning and zero-shot learning to learn zero-shot fine-grained classifiers. Zhuang et al. [63] proposed to input multiple web images to CNNs and pool parts of the neuron activations as the final representation for classification. Wei et al. [55] utilized easy web data to assist semantic segmentation with + +image-level labels. Shen et al. [41] proposed to utilize complementary information of web and target data to generate training masks for semantic segmentation. Hong et al. [24] used classifiers to identify relevant spatio-temporal volumes in web video and generated object masks for segmentation. + +Webby supervised object detection. There are a few attempts in the literature for WebSOD. Divvala et al. [11] trained deformable part models from the web data with Google $n$ -grams corpora to expand the categories. Chen et al. [7] proposed a two-stage approach to learn a detector from web data, which initiates CNNs with simple Google images and fine-tunes them on more complex Flickr images. Tao et al. [53] focused on knowledge transfer from web data to target data with adversarial domain adaptation. Different from the work in [11, 7], we reduce the negative impact of noisy image-level labels in web data by handling both background noise and foreground noise in an end-to-end manner. In contrast to [53] where the target dataset is used, we aim at fWebSOD that trains detectors using only the web images without any image from human-annotated datasets, e.g., PASCAL VOC [12] or MS COCO [32]. Compared to WSOD and WebSOD, fWebSOD does not rely on any other form of knowledge, e.g., manual annotations or additional images, and is able to handle diverse and numerous object categories in real-world scenarios. + +# 3. The Proposed Method + +Given a set of $N_{c}$ categories, we retrieve web images by using the category labels as the query keywords and construct the training data $D = \{I_i,\mathbf{t}_i\}_{i = 1}^{N_D}$ , where $I_{i}$ is a crawled web image and $\mathbf{t}_i\in \Re^{N_c}$ is the corresponding one-hot label vector. We employ the basic WsDDN [6] as the base model in our framework. We first extract the features $\phi = \{\phi_i\}_{i = 1}^{N_b}$ of $N_{b}$ object proposals $\{b_i\}_{i = 1}^{N_b}$ of an image from the backbone by a spatial pyramid pooling layer [23]. The pooled features are transformed by two fully-connected (FC) layers, which output the proposal features $\phi^{\mathrm{fc}} = \{\phi_i^{\mathrm{fc}}\}_{i = 1}^{N_b}$ . Then the proposal features are forked into two streams, i.e., a classification stream and a detection stream, producing two score matrices $X^{c},X^{d}\in \Re^{N_{b}\times N_{c}}$ by two FC layers, respectively. Both the score matrices are normalized by the softmax function $\sigma (\cdot)$ over categories and proposals, respectively: + +$$ +\sigma \left(X ^ {c}\right) _ {i j} = \frac {e ^ {X _ {i j} ^ {c}}}{\sum_ {k = 1} ^ {N _ {c}} e ^ {X _ {i k} ^ {c}}}, \sigma \left(X ^ {d}\right) _ {i j} = \frac {e ^ {X _ {i j} ^ {d}}}{\sum_ {r = 1} ^ {N _ {b}} e ^ {X _ {r j} ^ {d}}}. \tag {1} +$$ + +Then the Hadamard product of the two streams outputs the detection score matrix: $X^{s} = \sigma(X^{c}) \odot \sigma(X^{d})$ . To acquire image-level classification scores, a sum pooling is further applied: $\mathbf{y}_{k} = \sum_{r=1}^{N_{b}} X_{rk}^{s}$ , where $X_{rk}^{s}$ is the score of the $r$ -th proposal and the $k$ -th category in $X^{s}$ . Then we obtain + +![](images/027f432d995c7196e2b1e675c9f17f248741607679f39b8d976dc5650583d023.jpg) +Figure 3: Overview of the proposed framework. Our method consists of three components: First, a bagging-mixup (BM) learning strategy constructs a set of new training images with the same foreground label to suppress the negative influence of foreground noise from incorrect labels. Second, the residual detection (RD) head and weak detection (WD) head are responsible for decomposing background noise and modelling clean data, respectively. Third, the proposed spatially-sensitive entropy (SSE) criterion is utilized to estimate the confidence of trusting image-level background labels. + +a baseline cross-entropy loss function $\mathcal{L}^{\mathrm{baseline}}$ : + +$$ +\mathcal {L} ^ {\text {b a s e l i n e}} = \sum_ {k = 1} ^ {N _ {c}} \left\{\mathbf {t} _ {k} \log \mathbf {y} _ {k} + \left(1 - \mathbf {t} _ {k}\right) \log \left(1 - \mathbf {y} _ {k}\right) \right\}. \tag {2} +$$ + +Our baseline approach is to learn a detector directly on the web data $D$ . However, as shown in the subsequent experiments, the performance of such a detector drops dramatically compared to the detector trained on manual-annotated image-level labels. One main reason is that web data is noisy. To conquer this issue, we present an end-to-end learning framework to reduce the negative impact of image-level noisy labels in web data from two aspects, i.e., background noise and foreground noise, as illustrated in Fig. 3. + +# 3.1. Noise Decomposition + +To reduce the negative impact of background noise, we propose a residual feature learning structure incorporated with weakly supervised detection to decompose background noise and model clean data. We leverage multi-task learning to learn two detection heads, i.e., weak detection head and residual detection head, which share the backbone. + +The weak detection (WD) head has the pooled features $\phi$ as its input and outputs proposal features $\phi^{\mathrm{fc}}$ and detection scores $X^{s}$ , which is similar to our baseline approach. The loss function of the WD head for category $k$ is: + +$$ +\mathcal {L} _ {k} ^ {\mathrm {W D}} = \mathbf {t} _ {k} \log \mathbf {y} _ {k} + (1 - \mathbf {t} _ {k}) \log (1 - \mathbf {y} _ {k}). \tag {3} +$$ + +The proposed residual detection (RD) head is targeted for learning the residual features between reliable and unreliable parts in the massive noisy data. Specifically, the pooled features $\phi$ are mapped to residual features $\bar{\phi}^{\mathrm{fc}} = \{\bar{\phi}_i^{\mathrm{fc}}\}_{i=1}^{N_b}$ by two FC layers. We sum the residual features $\bar{\phi}^{\mathrm{fc}}$ and the proposal features $\phi^{\mathrm{fc}}$ from the WD head to get + +noise features $\hat{\phi}^{\mathrm{fc}} = \{\hat{\phi}_i^{\mathrm{fc}}\}_{i = 1}^{N_b}$ , where $\hat{\phi}_i^{\mathrm{fc}} = \bar{\phi}_i^{\mathrm{fc}} + \phi_i^{\mathrm{fc}}$ . Similar to the WD head, $\hat{\phi}^{\mathrm{fc}}$ is fed into a classification stream and a detection stream, followed by the softmax operation and the sum pooling, which produces image-level classification scores $\hat{\mathbf{y}}_k = \sum_{r = 1}^{N_b}\hat{X}_{rk}^s$ . Given a category $k$ , the loss function of the RD head is: + +$$ +\mathcal {L} _ {k} ^ {\mathrm {R D}} = \mathbf {t} _ {k} \log \hat {\mathbf {y}} _ {k} + (1 - \mathbf {t} _ {k}) \log (1 - \hat {\mathbf {y}} _ {k}). \tag {4} +$$ + +Finally, we obtain the overall loss function, which is the sum of all category-specific weighed sums of $\mathcal{L}_k^{\mathrm{WD}}$ and $\mathcal{L}_k^{\mathrm{RD}}$ : + +$$ +\mathcal {L} = \sum_ {k = 1} ^ {N _ {c}} \left\{\left(1 - \mathbf {p} _ {k}\right) \mathcal {L} _ {k} ^ {\mathrm {W D}} + \mathbf {p} _ {k} \mathcal {L} _ {k} ^ {\mathrm {R D}} \right\}, \tag {5} +$$ + +where $\mathbf{p}_k\in [0,1]$ is the estimated confidence of the $k$ -th background label being a noisy label in an image. + +From the perspective of learning the relation between clean data and noisy labels, the RD head works as a decomposition term, which helps the WD head to utilize the reliable information among the massive noisy data, whilst avoiding big influence by the unreliable information. When label of category $k$ has low confidence of being noise, i.e., $\mathbf{p}_k$ is low, the RD head is suppressed and the WD head models reliable information for category $k$ . When $\mathbf{p}_k$ is high, the RD head leverages the proposal features $\phi^{\mathrm{fc}}$ from the WD head and produces noise features $\hat{\phi}^{\mathrm{fc}}$ to predict the unreliable label of category $k$ , which imposes the RD head to decompose the noise by learning the residual features $\bar{\phi}^{\mathrm{fc}}$ . Thus, the residual learning structure jointly decomposes background noise and models clean data based on the confidence $\mathbf{p}$ , which controls the gradient flow through the network. The confidence $\mathbf{p}$ can be seen as an information gate. We visualize the proposal scores and pixel gradient maps of the WD and RD heads in Fig. 4. WD and RD have high responses to ground-truth labels and foreground labels + +![](images/0fecefcb946b1061aa9364e3afe802c6add8dbed85d79f163a5c86fb03d09d37.jpg) + +![](images/c1cf2af1869880340a37658d9a1444cc0987dc9fe8d8c9d289f20ba522829c42.jpg) +Figure 4: Proposal scores and the corresponding pixel gradient maps of the WD and RD heads for two web images. + +![](images/f94d512d891b0f9800b73b7dbc85c3526bfe395d62af9359754280a682a19596.jpg) +Figure 5: The distributions of detection results. The first column shows input images. The last three columns explain the ideal detection results of background categories and foreground categories, i.e., categories motorbike and person, respectively. The figure is drawn with the jet color scale, where the red rectangles correspond to high scores and the blue ones to low scores. +Figure 6: This figure depicts bagging-mixup learning for categories bottle (top) and train (bottom). + +(FL), respectively. The two results combined from WD and RD can decompose BN from FL. Instead of predicting the confidence $\mathbf{p}$ by the model, we estimate it explicitly in online fashion, which is detailed in the next subsection. + +# 3.2. Spatially-Sensitive Entropy Criterion + +We observe that the distribution of accurate detection results for background categories is spatially scattered and numerically uniform, whilst the detection results that are spatially clustered and numerically nonuniform may contain instances of target categories, as illustrated in Fig. 5. Motivated by this observation, for the background labels, we resort to producing spatially scattered proposals with low scores, whilst punishing the detection results where a small minority of clustered proposals produce high scores. + +We utilize the Shannon entropy as a sparsity indicator to describe the conditional distribution of detection results, which estimates the confidence $\mathbf{p}$ of background labels being noise. It is noted that the detection results consist of both confidence scores and bounding boxes. Suppose we have a result with only two bounding boxes $\{b_A, b_B\}$ and the corresponding detection scores $\{\frac{1}{2}, \frac{1}{2}\}$ for a category. If $b_A$ and $b_B$ have no overlap, we can estimate the entropy as $\ln 2$ . However, if $b_A$ and $b_B$ have a large intersection-over-union (IoU), e.g., IoU $(b_A, b_B) \geq 0.9$ , one would expect the entropy to be lower. In the latter case, $b_A$ and $b_B$ are near points in the bounding-box searching space, and the detection result is sparser than the former case. Therefore, it is difficult to accurately estimate the sparsity of detection results without the spatial information of the bounding boxes. To handle this, we propose a Spatially-Sensitive Entropy (SSE) criterion to estimate the sparsity by introducing spatial information in this subsection. + +We compute the Shannon entropy of detection scores as: + +$$ +E _ {r k} = - X _ {r k} ^ {s} \ln X _ {r k} ^ {s}, \tag {6} +$$ + +where $E \in \Re^{N_b \times N_c}$ and $X_{rk}^s \in [0,1]$ . We also compute the Jaccard index matrix $J \in \Re^{N_b \times N_b}$ as $J_{ij} = \mathrm{IoU}(b_i, b_j)$ , where $b_i$ and $b_j$ denote the $i$ -th and the $j$ -th proposals, respectively. We obtain an entropy regularizer as: + +$$ +G = E \oslash (J E), \tag {7} +$$ + +where $\varnothing$ is the Hadamard division and $G\in \Re^{N_b\times N_c}$ . The denominator term $JE$ sums up all the entropies of individual detection scores weighted by their spatial information, i.e., the IoU between two proposals. Then, the original entropy $E$ is divided by the weighted sum of entropies, which is in the range of [0, 1]. Our intuition is that the entropy decreases according to the IoU between each pair of proposals. If the detection bounding boxes have no overlap with each other, then $JE = E$ , and $G$ is an all-one matrix. + +Then, the refined entropy after considering the spatial information among proposals is computed as: + +$$ +\hat {E} = G \odot E, \tag {8} +$$ + +where $\odot$ is the Hadamard product. The confidence of the background label $k$ being noise in Eq. 5 is computed as: + +$$ +\mathbf {p} _ {k} = \left\{ \begin{array}{l l} 1 - \frac {\sum_ {r} ^ {N _ {b}} \hat {E} _ {r \cdot k}}{\mathbf {z} _ {k}} & \text {i f} \mathbf {t} _ {k} = 0 \\ 0 & \text {i f} \mathbf {t} _ {k} = 1 \end{array} , \right. \tag {9} +$$ + +where $\mathbf{p},\mathbf{z}\in \Re^{N_c}$ and $\mathbf{z}_k = -\mathbf{y}_k\ln \frac{\mathbf{y}_k}{N_b}$ . We use $\mathbf{z}_k$ to denote the maximum entropy of detection results given image-level prediction $\mathbf{y}_k$ for the $k$ -th category and $N_{b}$ bounding boxes. Therefore, $\frac{\sum_{r}^{N_b}\dot{E}_{rk}}{\mathbf{z}_k}$ is in the range of [0, 1] in Eq. 9. + +To further verify the above analysis, we compute the SSE criterion $\mathbf{p}$ of 200 web images randomly sampled from + +Table 1: The datasets in the experiments. + +
CategoryDataset#Images
TrainingTesting
VOCPASCAL VOC 2007 [12]-4,952
PASCAL VOC 2012 [12]-1,0991
Flickr-Clean [55]41,625-
Flickr-VOC88,064-
COCOMS COCO [32]-5,000
Flickr-COCO335,324-
+ +Flickr-VOC after model training and normalize them in the range of [0, 1]. The average $\hat{E}$ of foreground and background are 0.07 and 0.78, respectively. For BN, i.e., foreground missing, $\mathbf{p}$ has an average of 0.93. The Pearson correlation between SSE and BN is as high as 0.91. + +# 3.3. Bagging-Mixup Learning + +To reduce the negative impact of foreground noise, we propose a novel bagging-mixup strategy for data augmentation, which is inspired by the multi-instance-bagging mechanism to efficiently handle incorrect labels. In particular, the bagging-mixup strategy applies convex combinations of all images with the same foreground label in the bag to synthesize a set of training images. Therefore, bagging-mixup aims at suppressing the probability of using incorrect labels, whilst maintaining the diversity of training samples. + +Bagging-mixup learning consists of three steps. First, we randomly sample $N_{a}$ web images $\{I_i\}_{i = 1}^{N_a}$ with the same label t, i.e., the same foreground label. Second, we random draw blending ratios $\{\lambda_i\}_{i = 1}^{N_a}$ from a Dirichlet distribution $\mathrm{Dir}(\alpha_1,\ldots ,\alpha_{N_a})$ , where $\alpha_{1} = N_{a}\alpha_{2} = \dots = N_{a}\alpha_{N_{a}}$ . Finally, bagging-mixup constructs multiple synthetic training images with the same label: + +$$ +\hat {I} _ {i} = \lambda_ {1} I _ {i} + \sum_ {m, n} ^ {\{2, \dots , N _ {a} \}, \{1, \dots , N _ {a} \} \backslash i} \lambda_ {m} I _ {n}, \tag {10} +$$ + +where $i \in \{1, 2, \dots, N_a\}$ . The visual comparisons of the original and synthetic images are illustrated in Fig. 6. Then the synthetic images $\{\hat{I}_i\}_{i=1}^{N_a}$ are fed to the model as training samples with label $\mathbf{t}$ . We do not extract object proposals from the synthetic images, which is infeasible in terms of efficiency during training. Instead, we translate proposal coordinates of the original images to the synthetic images. + +The proposed bagging-mixup learning is distinct from the mixup [57] in the following two aspects. First, mixup is agnostic to the category, as it randomly samples data among all categories. Bagging-mixup is category-specific by sampling images with the same label, which is designed to be robust to foreground noise. Second, mixup only exploits partial information of each image pair to generate a single image. Bagging-mixup constructs multiple synthetic images, each of which is a convex combination of all images in the bag with the weights sampled from a Dirichlet distribution, which also maintains the diversity of training data. + +# 4. Experimental Evaluation + +# 4.1. Training Datasets + +Flickr-VOC and Flickr-COCO. We construct two new datasets called Flickr-VOC and Flickr-COCO to train the detectors. The categories from PASCAL VOC [12] and MS COCO [32] are employed as queries to retrieve images from the Flickr photo-sharing website. No other query criteria, e.g., date of capture, photographer's name, etc, are specified. For each category, we crawl images in about the first 4,000 search results returned by the Flickr API. In total, 83,905 and 335,327 images are collected without any post-processing for Flickr-VOC and Flickr-COCO, respectively. + +Flickr-Clean [55]. Flickr-Clean [55] is constructed from Flickr with PASCAL VOC [12] categories, which has 41,625 images in total. Different from our Flickr-VOC, Flickr-Clean [55] is post-processed by a salient object detector (DRFI [26]) and saliency-cut segmentation [8] to remove noisy data and to keep only simple images. In other words, Flickr-Clean is filtered from the original web data and contains human annotations from [26, 8]. Therefore, our crawled Flickr-VOC is more challenging and closer to the real-world web dataset. + +# 4.2. Testing Datasets + +PASCAL VOC 2007 and 2012 [12]. When training on Flickr-VOC and Flickr-Clean [55], we evaluate the detectors on the test sets of PASCAL VOC 2007 and 2012 [12], which have 4,092 and 10,991 test images over 20 categories, respectively. In our evaluation, we ensure that none of the PASCAL VOC images (including the trainval and test sets) exists in our training set. + +MS COCO [32]. When training on Flickr-COCO, we evaluate the detectors on MS COCO [32], which is among the most challenging datasets for object detection. It consists of 80 object categories. Our experiments involve 5,000 images of MS COCO validation (minival) for testing. More detailed statistics about these datasets are given in Tab. 1. + +# 4.3. Evaluation Protocol + +For VOC categories, Average Precision (AP) and mean Average Precision $(m\mathrm{AP})$ are used as the evaluation metrics. We follow the standard PASCAL VOC protocol to report the $m\mathrm{AP}$ at $50\%$ Intersection-over-Union (IoU) of the detected boxes with the ground-truth. For COCO categories, we also report the standard COCO metrics, including AP at different IoU thresholds and scales. + +# 4.4. Implementation Details + +The proposed approach is implemented on 4 GPUs. We report our performance on three backbone networks, i.e., VGG-CNN-F [29] (VGG-F), VGG-CNN-M-1024 (VGG- + +Table 2: Comparison to the baselines for object detection on the VOC 2007 test set in terms of AP (%) + +
MethodaerobicybirdboabotbuscarcatchacowdtabdoghorsmbikpersplntshesofatrailtvAv.
Training on PASCAL VOC 2007 trainval images with image-level annotations
WSDDN VGG-F [6]42.956.032.017.610.261.850.229.03.836.218.531.145.854.510.215.436.345.250.143.834.5
WSDDN VGG-M [6]43.650.432.226.09.858.550.430.97.936.118.231.741.452.68.814.037.846.953.447.934.9
WSDDN VGG16 [6]39.450.131.516.312.664.542.842.610.135.724.938.234.455.69.414.730.240.754.746.934.8
Training on Flickr-VOC
WSDDN VGG-F32.436.731.110.712.848.040.239.710.521.410.424.730.444.912.110.235.330.235.31.825.9
WSDDN VGG-M6.624.332.310.813.837.337.541.57.624.45.529.630.047.910.49.735.113.941.420.725.5
WSDDN VGG1635.839.535.89.610.051.539.541.37.122.47.431.033.447.313.09.232.727.544.614.227.6
Our VGG-F45.438.138.920.113.860.842.955.216.129.29.433.330.952.914.514.937.828.849.226.832.9
Our VGG-M45.738.536.920.616.955.238.857.514.825.010.638.739.351.816.313.638.034.646.326.133.3
Our VGG1645.939.639.821.114.460.939.961.515.632.514.144.845.251.718.013.838.932.147.223.535.1
+ +Table 3: Comparison to the SOTAs for object detection on the VOC 2007 test set in terms of AP (\%). + +
MethodaerobicybirdboabotbuscarcatchatcowdtabdoghorsmbikperspltnshesofatrailtvAv.
Training on PASCAL VOC 2007 trainval images with proposal/image-level annotations
FSOD VGG16 [40]70.080.670.157.349.978.280.482.052.275.367.280.379.875.076.339.168.367.381.167.669.9
WSOD VGG16 [43]64.870.751.525.129.074.169.769.612.769.543.954.939.371.332.629.857.061.066.657.452.5
Training on web data from Google and Flickr
Divvala et al. [11]14.036.212.510.39.235.035.98.410.017.56.512.930.627.56.01.518.810.323.516.417.1
Chen et al. Google [7]29.538.315.114.09.144.329.324.96.915.89.722.623.534.39.712.721.415.833.419.421.5
Chen et al. Flickr [7]30.241.321.718.39.244.332.225.59.821.510.426.727.342.812.613.320.420.936.222.824.4
Training on Flickr-Clean and PASCAL VOC 2007 trainval images
Tao et al. VGG-M [53]35.631.318.27.79.140.438.423.89.720.133.422.530.941.49.810.818.728.727.134.724.6
Tao et al. VGG16 [53]40.630.117.815.96.442.940.531.511.420.327.415.724.143.88.912.217.737.332.131.025.4
Training on Flickr-Clean
Our VGG-F43.734.532.912.613.754.245.235.011.326.026.922.725.749.220.89.134.748.946.638.931.6
Our VGG-M44.337.832.515.014.155.244.532.410.928.026.817.926.249.620.29.735.449.448.937.231.8
Our VGG1644.636.634.318.613.856.747.237.711.623.332.529.133.352.621.58.935.552.445.338.233.7
Training on Flickr-VOC
Our VGG-F45.438.138.920.113.860.842.955.216.129.29.433.330.952.914.514.937.828.849.226.832.9
Our VGG-M45.738.536.920.616.955.238.857.514.825.010.638.739.351.816.313.638.034.646.326.133.3
Our VGG1645.939.639.821.114.460.939.961.515.632.514.144.845.251.718.013.838.932.147.223.535.1
+ +M) and deep VGG-VD16 [48] (VGG16), which are initialized with the weights pre-trained on ImageNet [9]. + +Training. In all experiments, the size of mini-batch, the learning rate, the momentum, the decay weight and the dropout rate are set to 1, 0.001, 0.9, 0.0005 and 0.5, respectively. We freeze all convolutional layers in our backbones during training. To improve the robustness, we randomly adjust the exposure and saturation of the images by up to a factor of 1.5 in the HSV space. And a random crop with 0.9 of the original image size is applied. We use MCG [2] to generate object proposals for all experiments, including our baseline methods. We set the maximum number of region proposals in an image to 2, 048. All models are trained for 200K iterations. We apply Xavier initialization [19] to initialize the new fully-connected layers. The bagging-mixup hyper-parameter $\alpha_{1}$ is set to 1.5. + +Testing. We use the output of the WD head $X^s$ as the final detection scores. Detection results are post-processed by a NMS module using a threshold of 0.5 IoU. + +# 4.5. Comparison to Baselines + +We first compare the performance of WSDDN trained on PASCAL VOC 2007 with human-annotated image-level labels and directly trained on the Flickr data, i.e., Flickr-VOC. As shown in the first and the second parts of Tab. 2, the performance of the detector trained on Flickr-VOC decreases dramatically. Due to the noisy image-level labels in Flickr-VOC, the performances of the three backbones are only $25.9\%$ , $25.5\%$ and $27.6\%$ in terms of mAP, with losses of $10.1\%$ , $9.7\%$ and $9.3\%$ compared to the WSDDN models trained on PASCAL VOC 2007, respectively. Over + +all, there is a significant gap between the models trained on the PASCAL VOC and web data. We show that the proposed method on Flickr-VOC achieves the performances of $32.9\%$ , $33.3\%$ and $35.1\%$ with improvements of $7.0\%$ , $7.8\%$ and $7.5\%$ , respectively. It also demonstrates that our method outperforms the baselines by a large margin, and reduces the gap between fWebSOD and WSOD. + +# 4.6. Comparison with State of the Arts (SOTAs) + +We compare our method with the state of the arts, including [11, 7, 53]. Tab. 3 shows our results on the PASCAL VOC 2007 test in terms of $mAP$ . Our three models on Flickr-VOC reach $32.9\%$ , $33.3\%$ and $35.1\%$ $mAP$ with VGG-F, VGG-M and VGG16 backbones, respectively, which outperform the state-of-the-art algorithms. Although Flickr-Clean has been post-processed to reduce noise, our models trained on Flickr-VOC still achieve better performance. As Flickr-VOC has more than twice the image number of Flickr-Clean, and our method is able to reduce the negative impact of noise. It is worth noting that, compared to the baseline WSDDN [6] approach, our method has the same inference speed. Our single model VGG-F outperforms the state-of-the-art result $25.4\%$ with a gain of $7.5\%$ in terms of $mAP$ . Note that the comparison of data usage between the proposed framework and the previous methods can better reveal the significance of our work. The works in Divvala et al. [11], Chen et al. [7] and Tao et al. [53] all use external manual knowledge, e.g., Google Books $n$ -grams corpora, easy images from the Google search engine and PASCAL VOC images. However, our method only uses web images without any other form of knowledge. + +Table 4: Comparison to the SOTAs for object detection on the VOC 2012 test set in terms of AP (\%). + +
MethodaerobicybirdboabotbuscarcatchatcowdtabdoghorsmbikpersplntshesofatrailtvAv.
Training on PASCAL VOC 2012 trainval images with proposal/image-level annotations
FSOD VGG16 [18]82.376.471.048.445.272.172.387.342.273.750.086.878.778.477.434.570.157.177.158.967.0
WSOD VGG16 [43]--------------------46.1
Training on Flickr-Clean and PASCAL VOC 2012 trainval images
Tao et al. VGG-M [53]44.329.815.66.66.034.424.225.15.720.322.324.929.145.27.89.412.421.422.626.021.7
Training on Flickr-Clean
Our VGG-F41.015.129.710.413.247.642.036.810.216.513.228.220.539.615.08.428.038.69.638.225.1
Our VGG-M40.717.228.111.612.548.439.731.15.520.812.227.327.937.317.77.028.140.110.036.625.0
Our VGG1639.618.130.78.412.051.242.542.69.420.416.123.526.941.617.17.929.139.09.639.926.3
Training on Flickr-VOC
Our VGG-F40.233.738.412.513.052.740.441.213.024.718.031.632.551.712.411.633.330.440.522.129.7
Our VGG-M42.636.736.917.514.853.638.344.413.728.819.224.626.852.211.310.539.126.642.921.430.1
Our VGG1641.940.638.420.59.056.940.350.113.030.817.232.729.951.217.013.536.439.245.329.232.7
+ +Table 5: Ablation study of our method for object detection on the VOC 2007 test set in terms of AP (\%). + +
MethodaerobicybirdboabotbuscarcatchacowdtabdoghorsmbikpersplntshesofatrailtvAv.
Baseline35.839.535.89.610.051.539.541.37.122.47.431.033.447.313.09.232.727.544.614.227.6
RD42.234.834.519.49.853.142.046.610.626.09.429.926.248.713.718.238.828.740.722.729.8
RD + EW44.334.938.716.313.055.540.744.315.323.55.235.635.350.714.711.630.133.145.924.930.7
RD + SSE45.446.938.319.812.461.741.547.113.926.111.839.141.652.816.313.738.432.045.724.633.4
RD + SSE-ALL48.042.741.620.112.560.842.148.715.427.718.338.834.952.216.811.640.032.839.027.633.6
RD + SSE + BM245.939.639.821.114.460.939.961.515.632.514.144.845.251.718.013.838.932.147.223.535.1
RD + SSE + BM345.739.940.920.714.360.739.961.715.832.113.944.445.451.818.415.238.732.047.724.335.2
RD + SSE + BM445.939.041.420.614.360.539.560.915.332.117.243.744.552.318.014.638.730.949.324.135.1
+ +Table 6: Result on the COCO minival set. + +
MethodAvg. Precision, IoU:Avg. Precision, Area:
0.5:0.950.50.75SML
Training on COCO train images with proposal/image-level annotations
FSOD VGG16 [18]21.241.5----
WSOD VGG16 [43]10.520.39.22.210.918.3
WSDDN VGG169.519.28.22.110.417.2
Training on Flickr-COCO
WSDDN VGG163.17.02.30.42.66.9
Our VGG165.410.64.60.65.110.7
+ +In Tab. 4, we also evaluate our method on the PASCAL VOC 2012 test. Our models consistently outperform the state-of-the-art methods. In Tab. 6, we evaluate our method on MS COCO. Compared to using well labelled MS COCO, directly training the WSDDN model on Flickr-COCO results in poor performance (19.2% vs. 7.0% AP0.5). However, our framework achieves 10.6% AP0.5, which outperforms the state-of-the-art method by a large margin. + +# 4.7. Ablation Study + +The residual detection (RD) head. To investigate the effect of the RD head, we set $\mathbf{p}_k$ to 0.5 for all categories. Thus, it always combines the gradient flow from both heads in this setting. As shown in Tab. 5, the result of RD is slightly better than the baseline, as it imposes the model to learn residual features without considering noise explicitly. It also demonstrates that the performance gain does not merely come from the additional parameters of RD head. + +The spatially-sensitive entropy (SSE) criterion. To further verify the effects of the SSE criterion, we first use the original entropy to compute the confidence weight for each background label. This is implemented by replacing $\hat{E}$ with $E$ in Eq. 9. As shown in Tab. 5, adding the original entropy weight to the RD head ("RD + EW") achieves $0.9\%$ mAP improvement over the baseline method on FlickrVOC. Replacing the original entropy by the SSE criterion, "RD + SSE", achieves a large gain of $3.6\%$ mAP on PAS- + +CAL VOC 2007 test, which demonstrates the contribution of SSE to the overall network. We also apply the SSE criterion for all categories (background and foreground). We find that “RD + SSE-ALL” helps reduce foreground noise. + +The bagging-mixup (BM) learning. We further examine the results of BM with different numbers $N_{a}$ of images in a bag. In Tab. 5, we can see that the result of two images in a bag ("RD + SSE + BM2") is better than that without BM ("RD + SSE"), which suggests that the combinations of multiple images during training do help suppress the negative impact of foreground noise. We also evaluate the effectiveness of increasing $N_{a}$ in BM. We find that the gain of more than two images in a bag ("RD + SSE + BM3" and "RD + SSE + BM4") is trivial. + +# 5. Conclusion + +In this work, we focus on training object detectors using only web supervision without requiring any other form of knowledge, e.g., manual annotations or additional images. As image-level labels on the web contain heterogeneous noise, we categorize them into two types, namely background noise and foreground noise. To this end, we present an end-to-end learning framework to learn webly supervised detectors and reduce the negative impact of noisy labels. The proposed framework outperforms the baseline methods and sets new state-of-the-art results on the PASCAL VOC and MS COCO in the task of fWebSOD. + +# 6. Acknowledgment + +This work is supported by the Nature Science Foundation of China (No.U1705262, No.61772443, No.61572410, No.61802324 and No.61702136), National Key R&D Program (No.2017YFC0113000, and No.2016YFB1001503), and Nature Science Foundation of Fujian Province, China (No. 2017J01125 and No. 2018J01106). + +# References + +[1] Jaume Amores. Multiple instance classification: Review, taxonomy and comparative study. AI, 2013. +[2] P Arbeláez, J Pont-Tuset, J Barron, F Marques, and J Malik. Multiscale Combinatorial Grouping. In CVPR, 2014. +[3] Loris Bazzani, Alessandro Bergamo, Dragomir Anguelov, and Lorenzo Torresani. Self-Taught Object Localization with Deep Networks. In WACV, 2016. +[4] Archith J. Bency, Heesung Kwon, Hyungtae Lee, S. Karthikeyan, and B. S. Manjunath. Weakly Supervised Localization using Deep Feature Maps. In ECCV, 2016. +[5] Alessandro Bergamo. Exploiting weakly-labeled Web images to improve object classification: a domain adaptation approach. NeurIPS, 2010. +[6] Hakan Bilen and Andrea Vedaldi. Weakly Supervised Deep Detection Networks. In CVPR, 2016. +[7] Xinlei Chen. Webly Supervised Learning of Convolutional Networks. In ICCV, 2015. +[8] Ming-ming Cheng, Niloy J Mitra, Xiaolei Huang, Philip H S Torr, and Shi-min Hu. Global Contrast based Salient Region Detection. TPAMI, 2015. +[9] 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. +[10] Ali Diba, Vivek Sharma, Ali Pazandeh, Hamed Pirsiavash, and Luc Van Gool. Weakly Supervised Cascaded Convolutional Networks. In CVPR, 2017. +[11] Santosh K. Divvala, Ali Farhadi, and Carlos Guestrin. Learning everything about anything: Webly-supervised visual concept learning. In CVPR, 2014. +[12] Mark Everingham, Luc Van Gool, Christopher K. I. Williams, John Winn, and Andrew Zisserman. The Pascal Visual Object Classes (VOC) Challenge. *IJCV*, 2010. +[13] Deng-Ping Fan, Ming-Ming Cheng, Jiang-Jiang Liu, Shang-Hua Gao, Qibin Hou, and Ali Borji. Salient objects in clutter: Bringing salient object detection to the foreground. In ECCV, 2018. +[14] Deng-Ping Fan, Ge-Peng Ji, Guolei Sun, Ming-Ming Cheng, Jianbing Shen, and Ling Shao. Camouflaged object detection. In CVPR, 2020. +[15] Deng-Ping Fan, Wenguan Wang, Ming-Ming Cheng, and Jianbing Shen. Shifting more attention to video salient object detection. In CVPR, 2019. +[16] Mingfei Gao, Ang Li, Ruichi Yu, Vlad I. Morariu, and Larry S. Davis. C-WSL: Count-guided Weakly Supervised Localization. In ECCV, 2018. +[17] Weifeng Ge, Sibei Yang, and Yizhou Yu. Multi-Evidence Filtering and Fusion for Multi-Label Classification, Object Detection and Semantic Segmentation Based on Weakly Supervised Learning. In CVPR, 2018. +[18] Ross Girshick. Fast R-CNN. In ICCV, 2015. +[19] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In AISTATS, 2010. +[20] Amogh Gudi, Nicolai van Rosmalen, Marco Loog, and Jan van Gemert. Object-Extent Pooling for Weakly Supervised Single-Shot Localization. In BMVC, 2017. + +[21] Sheng Guo, Weilin Huang, Haozhi Zhang, Chenfan Zhuang, Dengke Dong, Matthew R. Scott, and Dinglong Huang. CurriculumNet: Weakly Supervised Learning from Large-Scale Web Images. In ECCV, 2018. +[22] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask R-CNN. In ICCV, 2017. +[23] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition. In ECCV, 2014. +[24] Seunghoon Hong, Donghun Yeo, Suha Kwak, Honglak Lee, and Bohyung Han. Weakly Supervised Semantic Segmentation using Web-Crawled Videos. In CVPR, 2017. +[25] Naoto Inoue, Ryosuke Furuta, Toshihiko Yamasaki, and Kiyoharu Aizawa. Cross-Domain Weakly-Supervised Object Detection through Progressive Domain Adaptation. In CVPR, 2018. +[26] Huaizu Jiang, Zejian Yuan, Ming-Ming Cheng, Yihong Gong, Nanning Zheng, and Jingdong Wang. Salient Object Detection: A Discriminative Regional Feature Integration Approach. IJCV, 2016. +[27] Zequn Jie, Yunchao Wei, Xiaojie Jin, Jiashi Feng, and Wei Liu. Deep Self-Taught Learning for Weakly Supervised Object Localization. In CVPR, 2017. +[28] Vadim Kantorov, Maxime Oquab, Minsu Cho, and Ivan Laptev. ContextLocNet: Context-Aware Deep Network Models for Weakly Supervised Localization. In ECCV, 2016. +[29] Chatfield Ken, Simonyan Karen, Vedaldi Andrea, and Zisserman Andrew. Return of the Devil in the Details Delving Deep into Convolutional Nets. In BMVC, 2014. +[30] Dong Li, Jia-Bin Huang, Yali Li, Shengjin Wang, and Ming-Hsuan Yang. Weakly Supervised Object Localization with Progressive Domain Adaptation. In CVPR, 2016. +[31] Yao Li, Linqiao Liu, Chunhua Shen, and Anton van den Hengel. Image Co-localization by Mimicking a Good Detector's Confidence Score Distribution. In ECCV, 2016. +[32] Tsung-Yi Lin, Michael Maire, Serge Belongie, Lubomir Bourdev, Ross Girshick, James Hays, Pietro Perona, Deva Ramanan, C. Lawrence Zitnick, and Piotr Dólar. Microsoft COCO: Common Objects in Context. In ECCV, 2014. +[33] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C. Berg. SSD: Single Shot MultiBox Detector. In ECCV, 2016. +[34] Dhruv Mahajan, Ross Girshick, Vignesh Ramanathan, Kaiming He, Manohar Paluri, Yixuan Li, Ashwin Bharambe, and Laurens van der Maaten. Exploring the Limits of Weakly Supervised Pretraining. In ECCV, 2018. +[35] Li Niu, Qingtao Tang, Ashok Veeraraghavan, and Ashu Sabharwal. Learning from Noisy Web Data with Category-level Supervision. In CVPR, 2018. +[36] Li Niu, Ashok Veeraraghavan, and Ashu Sabharwal. Webly Supervised Learning Meets Zero-shot Learning: A Hybrid Approach for Fine-grained Classification. In CVPR, 2018. +[37] Maxime Oquab, Léon Bottou, Ivan Laptev, and Josef Sivic. Is object localization for free? - Weakly-supervised learning with convolutional neural networks. In CVPR, 2015. + +[38] Dim P. Papadopoulos, Jasper R. R. Uijlings, Frank Keller, and Vittorio Ferrari. We don't need no bounding-boxes: Training object class detectors using only human verification. In CVPR, 2016. +[39] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You Only Look Once: Unified, Real-Time Object Detection. In CVPR, 2016. +[40] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. In NeurIPS, 2015. +[41] Tong Shen, Guosheng Lin, Chunhua Shen, and Ian Reid. Bootstrapping the Performance of Webly Supervised Semantic Segmentation. In CVPR, 2018. +[42] Yunhang Shen, Rongrong Ji, Changhu Wang, Xi Li, and Xuelong Li. Weakly Supervised Object Detection via Object-Specific Pixel Gradient. TNNLS, 2018. +[43] Yunhang Shen, Rongrong Ji, Yan Wang, Yongjian Wu, and Liujuan Cao. Cyclic Guidance for Weakly Supervised Joint Detection and Segmentation. In CVPR, 2019. +[44] Yunhang Shen, Rongrong Ji, Kuiyuan Yang, Cheng Deng, and Changhu Wang. Category-Aware Spatial Constraint for Weakly Supervised Detection. TIP, 2019. +[45] Yunhan Shen, Rongrong Ji, Shengchuan Zhang, Wangmeng Zuo, and Yan Wang. Generative Adversarial Learning Towards Fast Weakly Supervised Detection. In CVPR, 2018. +[46] Miaojing Shi, Holger Caesar, and Vittorio Ferrari. Weakly Supervised Object Localization Using Things and Stuff Transfer. In ICCV, 2017. +[47] Miaojing Shi and Vittorio Ferrari. Weakly Supervised Object Localization Using Size Estimates. In ECCV, 2016. +[48] Karen Simonyan and Andrew Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition. In ICLR, 2015. +[49] Krishna Kumar Singh, Fanyi Xiao, and Yong Jae Lee. Track and Transfer: Watching Videos to Simulate Strong Human Supervision for Weakly-Supervised Object Detection. In CVPR, 2016. +[50] Peng Tang, Xinggang Wang, Xiang Bai, and Wenyu Liu. Multiple Instance Detection Network with Online Instance Classifier Refinement. In CVPR, 2017. +[51] Peng Tang, Xinggang Wang, Angtian Wang, Yongluan Yan, Wenyu Liu, Junzhou Huang, and Alan Yuille. Weakly Supervised Region Proposal Network and Object Detection. In ECCV, 2018. +[52] Qingyi Tao, Hao Yang, and Jianfei Cai. Exploiting Web Images for Weakly Supervised Object Detection. TMM, 2018. +[53] Qingyi Tao, Hao Yang, and Jianfei Cai. Zero-Annotation Object Detection with Web Knowledge Transfer. In ECCV, 2018. +[54] Fang Wan, Pengxu Wei, Jianbin Jiao, Zhenjun Han, and Qixiang Ye. Min-Entropy Latent Model for Weakly Supervised Object Detection. In CVPR, 2018. +[55] Yunchao Wei, Xiaodan Liang, Yunpeng Chen, Xiaohui Shen, Ming-Ming Cheng, Jiashi Feng, Yao Zhao, and Shuicheng Yan. STC: A Simple to Complex Framework for Weakly-supervised Semantic Segmentation. TPAMI, 2017. + +[56] Yunchao Wei, Zhiqiang Shen, Bowen Cheng, Honghui Shi, Jinjun Xiong, Jiashi Feng, and Thomas Huang. TS2C: Tight Box Mining with Surrounding Segmentation Context for Weakly Supervised Object Detection. In ECCV, 2018. +[57] Hongyi Zhang, Moustapha Cisse, Yann N. Dauphin, and David Lopez-Paz. mixup: Beyond Empirical Risk Minimization. In ICLR, 2018. +[58] Xiaopeng Zhang, Jiashi Feng, Hongkai Xiong, and Qi Tian. Zigzag Learning for Weakly Supervised Object Detection. In CVPR, 2018. +[59] Xiaolin Zhang, Yunchao Wei, Jiashi Feng, Yi Yang, and Thomas Huang. Adversarial Complementary Learning for Weakly Supervised Object Localization. In CVPR, 2018. +[60] Yongqiang Zhang, Yongqiang Li, and Bernard Ghanem. W2F: A Weakly-Supervised to Fully-Supervised Framework for Object Detection. In CVPR, 2018. +[61] Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Learning Deep Features for Discriminative Localization. In CVPR, 2016. +[62] Yi Zhu, Yanzhao Zhou, Qixiang Ye, Qiang Qiu, and Jianbin Jiao. Soft Proposal Networks for Weakly Supervised Object Localization. In ICCV, 2017. +[63] Bohan Zhuang, Lingqiao Liu, Yao Li, Chunhua Shen, and Ian Reid. Attend in groups: a weakly-supervised deep learning framework for learning from web data. In CVPR, 2017. \ No newline at end of file diff --git a/noiseawarefullyweblysupervisedobjectdetection/images.zip b/noiseawarefullyweblysupervisedobjectdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..4df913098439fc5010687fc44402663a69cfe77c --- /dev/null +++ b/noiseawarefullyweblysupervisedobjectdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c8fd4d7ccdc04cd9592f92807225898623079d791be57656a0aefeaaee1b4fd +size 750792 diff --git a/noiseawarefullyweblysupervisedobjectdetection/layout.json b/noiseawarefullyweblysupervisedobjectdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..69d1f111a92a576dc1ccf4886789338883e7e928 --- /dev/null +++ b/noiseawarefullyweblysupervisedobjectdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12d542e9abbc4c5df94e1ff39c9351754634ce16d28f221086f463fcb731e6b0 +size 438244 diff --git a/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/be7d932a-159f-454c-8f6f-2057adcc8c68_content_list.json b/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/be7d932a-159f-454c-8f6f-2057adcc8c68_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..401f3c966c075322d8ad727040cbd2e83f5d2a15 --- /dev/null +++ b/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/be7d932a-159f-454c-8f6f-2057adcc8c68_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85af6d3c023f1ff59ad6ff1185f01d696f7bd411a4e3f712f613f4d4b6510709 +size 81410 diff --git a/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/be7d932a-159f-454c-8f6f-2057adcc8c68_model.json b/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/be7d932a-159f-454c-8f6f-2057adcc8c68_model.json new file mode 100644 index 0000000000000000000000000000000000000000..cb65caf4ccdfd6b71aa631d1d1c0a83677ec82b7 --- /dev/null +++ b/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/be7d932a-159f-454c-8f6f-2057adcc8c68_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49b8c8a11e1540cae2df66097fd00d0730b0df6310da1712ccbcfa9bfb9670d3 +size 97622 diff --git a/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/be7d932a-159f-454c-8f6f-2057adcc8c68_origin.pdf b/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/be7d932a-159f-454c-8f6f-2057adcc8c68_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c2f1b78656ae688fa717fcdf2de5af8f3b906c8f --- /dev/null +++ b/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/be7d932a-159f-454c-8f6f-2057adcc8c68_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bcd0e20a9b761be01675be4eedef2239d130a519b556982be6c06327ed34ed4 +size 5656050 diff --git a/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/full.md b/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/full.md new file mode 100644 index 0000000000000000000000000000000000000000..03a33c4e0ecd8c86239ed814a7c791a940550fb0 --- /dev/null +++ b/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/full.md @@ -0,0 +1,318 @@ +# Noise Modeling, Synthesis and Classification for Generic Object Anti-Spoofing + +Joel Stehouwer, Amin Jourabloo, Yaojie Liu, Xiaoming Liu +Department of Computer Science and Engineering +Michigan State University, East Lansing MI 48824 +{stehouw7, liuyaoj1, jourablo, liuxm}@msu.edu + +# Abstract + +Using printed photograph and replaying videos of biometric modalities, such as iris, fingerprint and face, are common attacks to fool the recognition systems for granting access as the genuine user. With the growing online person-to-person shopping (e.g., eBay and Craigslist), such attacks also threaten those services, where the online photo illustration might not be captured from real items but from paper or digital screen. Thus, the study of anti-spoofing should be extended from modality-specific solutions to generic-object-based ones. In this work, we define and tackle the problem of Generic Object Anti-Spoofing (GOAS) for the first time. One significant cue to detect these attacks is the noise patterns introduced by the capture sensors and spoof mediums. Different sensor/medium combinations can result in diverse noise patterns. We propose a GAN-based architecture to synthesize and identify the noise patterns from seen and unseen medium/sensor combinations. We show that the procedure of synthesis and identification are mutually beneficial. We further demonstrate the learned GOAS models can directly contribute to modality-specific anti-spoofing without domain transfer. The code and GOSet dataset are available at cvlab.cse.msu.edu/project-goas.html. + +# 1. Introduction + +Anti-spoofing (i.e., spoof detection) is a long-standing topic in the biometrics field that empowers recognition systems to detect samples from spoofing mediums, e.g., printed paper or digital screen [2, 6, 8, 26]. A similar concern may appear in online commerce websites, e.g., Ebay, Craigslist, which provide services to enable direct user-to-user buying and selling. For instance, when purchasing, a customer may wonder, "Is that a picture of a real item he owns?" This scenario motivates a broader problem of anti-spoofing: + +Given an image of a generic object, such as a cup or a desk, can we automatically classify if this was captured from the real object, or through a medium, such as digital screen or printed paper? + +![](images/af2b226aa3ee75c86d62d8a91d655d19797ca977a6878f2a2fb7527789eb2a7b.jpg) +Figure 1. Similarly to biometric anti-spoofing, GOAS determines if an image of an object is captured from the real object or through spoof mediums. Anti-spoofing algorithms can be sensitive to device-specific noises. Given the challenge of capturing spoof data with full combinations of sensors/medium, we synthesize spoof images at any combination (marked as $\mathbf{X}$ ), which benefits GOAS. + +We define this problem as Generic Object Anti-Spoofing (GOAS). With the wider variety of objects, there are richer appearance variations and greater challenges in GOAS, as shown in Fig. 1, compared to individual biometric modalities. Successful solutions [2, 8, 23, 26, 27, 30, 31, 33] for modality-specific anti-spoofing are likely ineffective for GOAS. We find that capture sensors and spoofing mediums bring certain texture patterns (e.g., Moiré pattern [32]) to all captured images, regardless of the content. These patterns are often low-energy and regarded as "noise". However, they are ubiquitous and consistent, since they result from the physical properties of the sensors/mediums and environmental conditions, such as light reflection. We believe a proper modeling of such noise patterns will lead to effective solutions for GOAS and may contribute to modality-specific anti-spoofing tasks. In this work, we study the fundamental low-level vision problem of modeling, synthesizing, and classifying the noise patterns for tackling GOAS. + +Modeling noise patterns is a promising, yet challenging, approach for GOAS. In [9, 10, 39], the camera model identi + +fication problem is studied for the purpose of digital forensics. The properties of different capture sensors are examined thanks to the assistance of databases, such as PRNUPAR Dataset [22] and Dresden Image Database [20]. Related topics such as noise pattern removal [1] and noise pattern modeling for face modality [23] are also investigated. The authors of [42] show that simple synthesis methods for data augmentation are beneficial for the anti-spoofing task. These prior works provide a solid base to begin the study of GOAS. Meanwhile, we still face three major challenges: + +Complexity of spoof noise patterns: The noise patterns in GOAS are related to both sensor and medium, as well as their interaction with the environment. First, it's hard to model the interaction mathematically. Second, the noises are "hidden" under large appearance variations, thus even more untraceable. Additionally, each physical device has a unique fingerprint, though these fingerprints are similar within the same device models as shown in [19, 21]. + +Insufficient data and lack of strong labels: Unlike many other computer vision tasks, spoof data for anti-spoofing cannot be collected from the Internet. Moreover, strong labels, e.g., pixel-wise correspondence between spoof images and ground truth live images, is extremely difficult to obtain. The constant development of new sensors and spoof mediums further complicates the data collection, and increases the difficulty of learning a CNN that is robust to these small, but significant variations [5]. + +Modality dependency: Current anti-spoofing methods are designed for a specific modality, e.g., face, iris, or fingerprint. These solutions cannot be applied to a different modality. Thus, it is desirable to have a single anti-spoofing model applicable to multiple modalities or applications. + +To address these challenges, we propose a novel Generative Adversarial Network (GAN)-based approach for GOAS, consisting of three parts: GOGen, GOLab, and GoPad. GOGen is a generator network, which learns to convert a live image to a spoof one given a target known or unknown sensor/medium combination. GOGen allows for synthesis of new images with specific combinations, which helps to remedy insufficiency and imbalance issues in training data, such as the long tail problem [43]. GOLab serves as a multi-class classifier to identify the type of sensor and medium as well as live vs. spoof. GoPad is a binary classifier for GOAS. The three parts in this design, including the synthesis procedure and multi-class identification, contribute to our final goal of GOAS. To properly train such a network, three novel loss functions are proposed to model the noise pattern and supervise the training. Furthermore, we collect the first generic object dataset (GOSet) to conduct this study. GOSet involves 7 camera sensors, 7 spoof mediums, and other image variations. + +To summarize, the contributions of this work include: + +We identify and define the new problem of GOAS. + +$\diamond$ We propose a novel network architecture to synthesize unseen noise patterns that are shown to benefit GOAS. +A generic object dataset (GOSet) is collected and contains live and spoof videos of 24 objects. +$\diamond$ We demonstrate SOTA generalization performance when applying GOSet trained models to face anti-spoofing. + +# 2. Prior Work + +While there is no prior work on GOAS, we review relevant prior work from three perspectives. + +Modality-specific anti-spoofing: Early works [6,8] perform texture analysis via hand-crafted features for anti-spoofing. [2] utilizes a patch-based CNN and score fusion to show that spoof noise can be detected in small image patches. Similarly, [15] uses minutiae to guide patch selection for fingerprint anti-spoofing. Rather than detecting spoof noise, [23] attempts to estimate and remove the spoof noise from images. Cue-based methods incorporate domain knowledge into anti-spoofing, e.g., rPPG [25, 26], eyeblinks [30], visual rhythms [3, 16, 18], paired audio cues [12], and pulse oximetry [34]. A significant limitation is that each modality is domain specific; an algorithm developed for one modality cannot be applied to the others. The closest approach to cross domain is [28], via transfer learning to fine-tune on the face modality. Our work improves upon these by utilizing generic objects, and therefore is forced to be content independent. Further, we learn a deep representation for the spoof noise of multiple spoof mediums, and show that these noises can be convolved with a live image to synthesize new spoof images. + +Noise patterns modeling: Modeling or extracting noise from images is challenging, since there is no canonical ground truth. Hence some works attempt to estimate the noise via assumptions about the physical properties of the sensors and software post-processing of captured images [38, 39]. With these assumptions, ensemble classifiers [9], hand-crafted feature based classifiers [38, 39], and deep learning approaches [22] are proposed to address camera model identification. Following these, we assume that the sensor noise is image content independent. However, we not only classify the noise in an image, but also learn a noise prototype for each sensor that can be convolved with any image to modify its "noise footprint". We also address the challenge of spoof medium noise modeling and classification. [23] estimates the spoof noise on an image, but is limited to face images and estimates the noise per image. Hence we extend both camera model identification and spoof noise estimation works by combining both tasks within a single CNN, and by modeling a generalized representation of both the sensor and medium noises. + +Image manipulation and synthesis: GANs have gained increasing interest for style transfer and image synthesis tasks. Star-GAN [14] utilizes images from multiple do + +![](images/12571692b74199741f630e9990c977f1077b20477a26fe9564099e0259de347c.jpg) +Figure 2. The overall framework of training GOGen. Live images are given to the generator to modify either the sensor or spoof noise. The resulting image is classified by the GOLab discriminator to supervise the generated images. An additional discriminator is used to ensure the generated images remained visually appealing and realistic. In each section of the figure, only the solid-colored network is updated in that training step. We alternate between training GOGen in one step and GOLab and GODisc in the next step. Input one-hot vectors are used as a mask to select the appropriately learned noise map, which is then concatenated to the input image. + +![](images/303626a5fdcc79a2d296ffc3a69a296f67ceaa88d2ffe5e1570a5b47705d4e1e.jpg) + +mains and datasets to accurately manipulate images by modifying attributes. [44] attempts to ensure high-fidelity manipulation by requiring the generator to learn a mapping such that it recreates the original image from the synthetic one. The work in [29] shows that it is possible to conditionally affect the output of a GAN by feeding an extra label, e.g., poses [40]. Here, we propose a GAN-based, targeted, content independent, image synthesis algorithm (GOGen) to alter only the high-frequency information of an image. + +Similarly, image super-resolution [11, 17, 36, 37] is used to improve the visual quality and high-frequency information in an image. [24] uses a laplacian pyramid structure to convert a low-resolution (LR) image into a high-resolution (HR) one. [35] estimates an HR gradient field and uses it with an upscaled LR image to produce an HR one. While super-resolution produces high-frequency information from low-frequency input, our GOGen aims to alter the existing high-frequency information in the input live image, which is particularly challenging given its unpredictable nature. + +# 3. Proposed Methods + +In this section, we present the details of the proposed methods, including GOGen, GODisc, and GOLab. As shown in Fig. 2, the overall framework adopts a GAN architecture, which is composed of a generator (GOGen) and two discriminators (GODisc and GOLab). GOGen synthesizes additional spoof videos of any combination of sensor and medium, even unseen combinations. GODisc is the discriminator network to guide images from GOGen to be visually plausible. GOLab performs sensor and medium identification. In addition, GOLab serves as the module to produce a final spoof detection score. We also present GOPad, which is adapted from a traditional binary classifier used by previous anti-spoofing works, to compare with the proposed + +method. To prevent overfitting and increase the quantity of training data, the input for the networks are image patches extracted from the original images. + +# 3.1. GOGen: Proof Synthesis + +In anti-spoofing, the increasing variety of sensors and spoof mediums creates a large challenge for data collection and generalization. It is increasingly expensive to collect additional data from every combination of camera and spoof medium. Meanwhile, the quantity, quality, and diversity of training data determine the performance and impact the generalization of deep learning algorithms. Hence, we develop GOGen to address this need for continual data collection via synthesis of unseen combinations. + +We train GOGen to synthesize new images of unseen sensor/medium combinations using knowledge learned from known combinations. When introducing a new device, GOGen can be trained with minimal data from the new device while utilizing all previously collected data from other devices. The generator, $\mathrm{CNN}_{\mathrm{Gen}}(\cdot)$ , converts a live image into a targeted spoof image of a specified spoof medium captured by a specified sensor. Specifically, the inputs of the generator are a live image $\mathbf{I} \in \mathbb{R}^{H \times W}$ and two one-hot vectors specifying the sensor of the output image $\mathbf{a}_c \in \mathbb{R}^{n_c}$ and the medium through which the output would be captured $\mathbf{a}_m \in \mathbb{R}^{n_m}$ . The output is a synthetic image $\hat{\mathbf{I}}$ . + +One key novelty in GOGen is the modeling of the noise from different sensors and spoof mediums. We assume the sensor and medium noises are image independent since they are attributed to the hardware, while the noise on an image is image dependent, due to interplay between the sensor, medium, image content, and imaging environment. To model such interplay, we denote a set of image-independent latent noise prototypes for all types of sensors + +![](images/268e9a63e043cc66df50b484937e07b7eb719dd79888fa14f4eeb4a64fdca25b.jpg) +Figure 3. GOGen learns noise prototypes of sensors $\mathbf{M}_c$ (row 1) and spoof mediums $\mathbf{M}_m$ (row 2). Rows 3 and 4 shows the 2D FFT power spectrum of noise prototypes in rows 1 and 2, respectively. + +$\mathbf{M}_c \in \mathbb{R}^{H \times W \times n_c}$ , and mediums $\mathbf{M}_m \in \mathbb{R}^{H \times W \times n_m}$ . In the training, using input one-hot vectors, $\mathbf{a}_c$ and $\mathbf{a}_m$ , we select the noise prototypes for the specific sensor-medium combination, $\mathbf{N}_c, \mathbf{N}_m \in \mathbb{R}^{H \times W}$ , via: + +$$ +\mathbf {N} _ {c} = \sum_ {i = 1} ^ {n _ {c}} \mathbf {a} _ {c} ^ {i} \mathbf {M} _ {c} ^ {i}, \quad \mathbf {N} _ {m} = \sum_ {i = 1} ^ {n _ {m}} \mathbf {a} _ {m} ^ {i} \mathbf {M} _ {m} ^ {i}. \tag {1} +$$ + +Then, we concatenate $\mathbf{I}$ , $\mathbf{N}_c$ and $\mathbf{N}_m$ as $\mathbf{T} = [\mathbf{I},\mathbf{N}_c,\mathbf{N}_m]$ and feed $\mathbf{T}$ to the generator. With this concatenated input, through convolution the generator mimics the interplay between the image content $\mathbf{I}$ , and the learnt $\mathbf{N}_c$ and $\mathbf{N}_m$ , to generate a device-specific, image-dependent, synthetic image. By manipulating only the sensor or the medium at a time, we are able to supervise either of $\mathbf{M}_c$ or $\mathbf{M}_m$ independently. In this manner, any combination from the learned $\mathbf{N}_c$ and $\mathbf{N}_m$ are used together to produce the noise for a synthetic image, even from unseen combinations. + +We hypothesize that by integrating the noise representation as part of the GOGen, via backpropagation, we should be able to learn latent noise prototypes that are specific to the device but universal across all images captured by that device. Such representations will enable GOGen to better synthesize images under many $(n_c \times n_m)$ combinations of sensors and mediums. We show the learned sensor and medium noise prototypes in Fig. 3. After the input image and noise prototypes are concatenated, they are fed to 8 convolution layers to synthesize spoof images. The detailed network architecture of GOGen is shown in Tab. 1. + +Since the additional spoof noise should be low-energy, an $\mathcal{L}_2$ loss is employed to minimize the difference between the live image and the image synthesized by the generator. This loss helps to limit the magnitude of the noise: + +$$ +J _ {\mathrm {V i s}} = \left\| \mathbf {I} - \operatorname {C N N} _ {\operatorname {G e n}} (\mathbf {T}) \right\| _ {2} ^ {2}. \tag {2} +$$ + +Table 1. Network architectures of GOGen, GOLab, and GODisc. Resizing is done before concatenation if required. Reshaping is done before the fully connected layers at the end of the GOLab and GODisc networks. All strides are of length 1. All convolutional kernels are of size $3 \times 3$ , except for Conv0 in Golab and GOPad, which have size $5 \times 5$ . The dropout rate is 0.5. For the output, we show the size (height and width) and number of channels. + +
Method LayerGOGenGOLabGODisc
InputsOutputInputsOutputInputsOutput
Img-64, 3-64, 3-64, 3
Lab-64, 2
ConcoImg,Lab64, 5
Conv0Conv064, 64Img64, 64Img64, 32
Pool0Conv0-Conv0-
Conv1Conv064, 96Pool032, 96Pool032, 32
Conv2Conv164, 96Conv132, 128Conv132, 64
Conv3Conv264, 96Conv232, 96Conv232, 64
Pool1Conv3-Conv3-
Conv4Conv364, 96Pool116, 128Pool116, 64
Conv1Lab,Conv0-464, 450
Conv5Conv164, 160Conv416, 156Conv416, 96
Conv6Conv564, 64Conv516, 128Conv516, 96
Pool2Conv6-
Conv7Pool28, 96
Conv8Conv78, 128
Conv9Conv88, 96
Conv2Lab,Conv5-664, 226Conv3,6,98, 320Conv3,632, 160
Conv10Conv264, 3Conv28, 96Conv232, 64
Conv3Img,Conv1064, 3
Conv11Conv108, 64Conv1032, 32
Drop0Conv11Conv11-
Sensor Branch
Conv12Drop08, 3
FC1Conv121, 512Drop01, 256
FC2FC11, 7FC11, 2
SoftFC21, 7FC21, 2
Medium Branch
Conv13Drop08, 3
FC3Conv131, 512
FC4FC31, 7
SoftFC41, 7
+ +# 3.2. GODisc: Discriminator and GAN Losses + +Next, the discriminator GODisc ensures that $\hat{\mathbf{I}}$ is visually appealing. The GODisc network includes 10 convolution layers and 2 fully connected layers, shown in Tab. 1. It outputs the Softmax probability for the two classes, real spoof images vs. synthesized spoof images. + +The training of the GAN follows an alternating training procedure. During the training of $\mathrm{CNN}_{\text{Disc}}(\cdot)$ , we fix the parameters of $\mathrm{CNN}_{\text{Gen}}(\cdot)$ and use the following loss: + +$$ +\begin{array}{l} J _ {\text {D i s c} _ {\text {t r a i n}}} = - \mathbb {E} _ {\mathbf {I} \in \mathcal {R}} \log \left(\mathrm {C N N} _ {\text {D i s c}} (\mathbf {I})\right) \\ - \mathbb {E} _ {\mathbf {I} \in \mathcal {L}} \log (\| 1 - \mathrm {C N N} _ {\text {D i s c}} (\mathrm {C N N} _ {\mathrm {G e n}} (\mathbf {T})) \|), \tag {3} \\ \end{array} +$$ + +where $\mathcal{R}$ represents the real spoof images and $\mathcal{L}$ the real live images. During the training of GOGen, we fix the parameters of $\mathrm{CNN}_{\text{Disc}}()$ and use the following loss: + +$$ +J _ {\text {D i s c} _ {\text {t e s t}}} = - \mathbb {E} _ {\mathbf {I} \in \mathcal {L}} \log (\| \operatorname {C N N} _ {\text {D i s c}} (\operatorname {C N N} _ {\text {G e n}} (\mathbf {T})) \|). \tag {4} +$$ + +# 3.3. GOLab: Sensor and Medium Identification + +GOLab is designed to classify noises from certain sensors and spoof mediums. It serves as the discriminator to guide GOGen to generate accurate spoof images as well as the final module to produce scores for GOAS. Shown in Tab. 1, the input for GOLab is an RGB image with the size of $64 \times 64$ . The input images can be either the original images or the GOGen synthesized images. It uses 11 convolution layers and 3 max pooling layers to extract features, and + +![](images/6947afc2a3437ec7f0bc22268bcc9d2b3158fd104f816b49bbf4e8dbac8999e9.jpg) +Figure 4. Example live images of all 24 objects and 7 backgrounds from the collected GOSet dataset. + +then two fully connected layers to generate $n_c$ - and $n_m$ -dim vectors for sensor and medium classification. Each comes from an independent stack of fully connected layers. + +We use the cross entropy loss to supervise the training of GOLab. Given the input image $\mathbf{I}$ , the ground truth one-hot label $\mathbf{a}_m$ and the softmax normalized prediction $\hat{\mathbf{a}}_m$ for the spoof medium; and $\mathbf{a}_c$ , $\hat{\mathbf{a}}_c$ for the sensor, the loss functions are defined as: + +$$ +S _ {c} = - \sum_ {i} \mathbf {a} _ {c} ^ {i} \log \left(\hat {\mathbf {a}} _ {c} ^ {i}\right), \quad S _ {m} = - \sum_ {i} \mathbf {a} _ {m} ^ {i} \log \left(\hat {\mathbf {a}} _ {m} ^ {i}\right), \tag {5} +$$ + +where $i$ is the class index of the sensors and spoof mediums. Then, the final loss to supervise GOLab is: + +$$ +J _ {\mathrm {L a b} _ {\text {t r a i n}}} = S _ {c} (\mathbf {I}) + S _ {m} (\mathbf {I}), \tag {6} +$$ + +The GOLab network provides supervision for the generator and guides it via backpropagation from the sensor and spoof medium loss functions. Specifically, we define a normalized loss for updating the generator network: + +$$ +J _ {\mathrm {L a b} _ {\text {t e s t}}} = \frac {S _ {m} \left(\mathrm {C N N} _ {\mathrm {G e n}} (\mathbf {T})\right)}{1 + S _ {m} (\mathbf {I})} + \frac {S _ {c} \left(\mathrm {C N N} _ {\mathrm {G e n}} (\mathbf {T})\right)}{1 + S _ {c} (\mathbf {I})}, \tag {7} +$$ + +where the numerator shows the classification losses, i.e., $S_{m}()$ and $S_{c}()$ , for the synthesized images, and $S_{m}(\mathbf{I})$ and $S_{c}(\mathbf{I})$ are the loss of the live images during the updating of GOLab. By using the normalized loss, GOGen will not be penalized when GOLab has high classification error on the real data, i.e., a large denominator leads to a small quotient regardless of the numerator. + +# 3.4. GOPad: Binary Classification + +To show the benefits of the proposed method, we follow the baseline algorithm [26], specifically the pseudo-depth map branch, to implement a binary classification of GOAS, termed as GOPad. To demonstrate strong generalization ability later, we limit the size of the GOPad algorithm by dramatically reducing the number of convolution kernels in each layer to approximately one-third compared to the baseline algorithm. The GOPad network takes an RGB image as input, and produces a 0-1 map $\mathrm{CNN}_{Pad}(\mathbf{I})\in \mathbb{R}^{H\times W}$ in the final layer, where it is 0 for live and 1 for spoof. The network activates where the spoof noise is detected. During the + +training process, this map allows the CNN model to make live/spoof labeling at the pixel level. When converged, the 0-1 map should be uniformly 0 or 1, representing a confident classification of live vs. spoof. Formally, the loss function is defined as: + +$$ +J _ {\mathrm {P a d}} = \left\| \operatorname {C N N} _ {\mathrm {P a d}} (\mathbf {I}) - \mathbf {G} \right\| _ {2} ^ {2}, \tag {8} +$$ + +where $\mathbf{G}$ is the ground truth 0-1 map. + +# 3.5. Implementation Details + +We show all of the three proposed CNN networks in Fig. 2. We use an alternating training scheme for updating the networks during the training. We train the GOGen while the GOLab and GODisc are fixed. In the next step, we keep the GOGen fixed and train the other two networks. We alternate between these two steps until all networks converge. To train the GOGen and GOLab, we use batch sizes of 40. Patch sizes of $64 \times 64$ are used for the GOGen, GODisc, and GOLab. Patch sizes of $256 \times 256$ are used for the GOPad, following the setting of previous works. The final loss for training the generator of GOGen can be summarized as: + +$$ +J = J _ {\text {D i s c} _ {\text {t e s t}}} + \lambda_ {0} J _ {\text {V i s}} + \lambda_ {1} J _ {\text {L a b} _ {\text {t e s t}}}, \tag {9} +$$ + +where $\lambda_0$ and $\lambda_{1}$ are weighting factors. And the final loss for training GODisc and GOLab can be denoted as: + +$$ +J = J _ {\text {D i s c} _ {\text {t r a i n}}} + \lambda_ {1} J _ {\text {L a b} _ {\text {t r a i n}}}, \tag {10} +$$ + +and $\lambda_0$ and $\lambda_{1}$ were set to 0.5 and 0.1, for all experiments. + +# 4. Generic Object Dataset for Anti-Spoofing + +To enable the study of GOAS, we consider a total of 24 objects, 7 backgrounds, 7 commonly used camera sensors, and 7 spoofing mediums (including live as a blank medium) while collecting the Generic Object Dataset (GOSet). If fully enumerated, this would require a prohibitory collection of 8,232 videos. Due to constraints, we selectively collect 2,849 videos to cover most combinations of backgrounds, camera sensors and spoof mediums. + +The objects we collect are: squeezeer, mouse, multi-pen, sunglasses, water bottle, keyboard, pencils, calculator, stapler, flash drive, cord, hard drive disk, keys, shoe (red), shoe (white), shoe (black), Airpods, remote, PS4 (color), + +Table 2. Comparison of modality specific anti-spoofing algorithms and GOLab. All methods are trained and tested on GOSet. + +
AlgorithmHTEREERAUC
Chingovska LBP [13]16.616.991.6
Boulkenafet Texture [7]18.219.589.1
Boulkenafet SURF [8]34.035.167.6
Atoum et al. [2]13.413.591.2
GOPad (Ours)20.622.987.6
GOLab (Ours)6.36.797.5
+ +PS4 (black), Kleenex, blow torch, lighter, and energy bar, shown in Fig. 4. Generic objects are more easily available for data collection and are unencumbered by privacy or security concerns, as opposed to human biometrics. The objects are placed in front of 7 backgrounds, which are desk wood, carpet speckled, carpet flowered, floor wood, bed sheet (white), blanket (blue), and desk (black). The spoof mediums include 3 common computer screens, (Acer Desktop, Dell Desktop, and Acer Laptop), and 3 mobile device screens, (iPad Pro, Samsung Tab, and Google Pixel), which are of varying size and display quality. + +The videos were collected using 7 commercial devices, (Moto X, Samsung S8, iPad Pro, iPod Touch, Google Pixel, Logitech Webcam, and Canon EOS Rebel). Except for videos from the iPod Touch at 720P resolution, all videos are captured at 1,080P resolution, with average length of 12.5 seconds. We first capture the live videos of all objects while varying the distance and viewing angle, and then collect the spoof videos via directly viewing a spoof medium while the live video is displayed on it. During the collection of spoof videos, care is taken to prevent unnecessary spoofing artifacts (light reflection, screen bezels), as well as data bias (differences in distance, brightness, and orientation). + +To leverage the GOSet, we split it into a train and test set. The train set is composed of the first 13 objects and corresponds to the first 2 backgrounds. The test set is composed of the rest of the objects and backgrounds. This split prevents overlap and presents a real-world testing scenario. + +# 5. Experiments + +In all experiments, we use the training/testing partition mention above to train and evaluate the proposed method. For evaluation metrics, we report Area Under the Curve (AUC), Half Total Error Rate (HTER) [4], and Equal Error Rate (EER) [41]. Performance is video-based, which is computed via majority voting of patch scores. For each video, we use all frames; and for each frame, we randomly select 20 patches. + +# 5.1. Generic Object Anti-Spoofing + +Baseline Performance: To demonstrate the superiority of our proposed method, we compare our method with our + +Table 3. Confusion matrices for camera sensor and spoof medium identification. The identification accuracy for each sensor/medium and averages are reported using majority voting of 20 patches from each frame in a video. + +
Sensor(1)(2)(3)(4)(5)(6)(7)Acc
(1) Moto X16075180034.8
(2) Logitech23200000398.5
(3) Samsung S8123531071792.7
(4) iPad Pro604222003081.2
(5) Canon EOS550732680341.2
(6) iPod Touch000002700100.0
(7) Google Pixel11000125998.9
Overall87.6
+ +(a) + +
Medium(1)(2)(3)(4)(5)(6)(7)Acc
(1) Live9770001092.4
(2) Acer Desktop501166736945335.6
(3) Dell Desktop315283592077825.2
(4) Acer Laptop5853414173552.0
(5) iPad Pro4330312910730039.6
(6) Samsung Tab400795115056.7
(7) Google Pixel75451234208438.9
Overall43.2
+ +(b) + +implementation of the recent methods [2, 7, 8, 13] on the GOSet test set. These recent methods are modality specific algorithms that perform anti-spoofing based on color and texture information. From Tab. 2, it is shown that GOLab outperforms the other anti-spoofing methods by a large margin for the GOAS task. + +Benefits of GOLab: Tab. 3 (a) and (b) show the confusion matrices of GOLab on sensor and spoof medium classification. The classification performance for sensors is noticeably better than that of mediums, with the overall accuracy of $87.6\%$ vs. $43.2\%$ . Although Fig. 3 indicates the noises among medium have distinct patterns, it is worth noting that the medium noises can be "hidden" in the image by the sensor noises, which causes the lower accuracy. The accuracy for detecting live videos is $92.4\%$ which exhibits its promising ability for the anti-spoofing task. + +We compute the ROC curves of GoLab on GOSet testing data. Fig. 5 (a) and (b) show the ROC curves of different objects and different backgrounds respectively. We can see the AUCs for different objects are similar. But AUCs for different backgrounds have larger variation, which denotes that the GOLab is more sensitive to surfaces with rich texture, e.g., Carpet Flowered in (b). By comparing the ROCs for different sensors in Fig. 5 (c), we observe that the "Google Pixel" and "iPod Touch" are the hardest sensors to detect, because they are the highest and lowest quality, respectively. This causes images from the iPod to appear more spoof-like, and images from the Pixel less so, while their respective noise patterns are most distinguishable in Tab. 3. Similarly, the "Acer Laptop" is the most challenging spoof medium for anti-spoofing, shown in Fig. 5 (d). + +![](images/3b22470291828c5111a77865902d8e871cd4ec7404a282862c1698a759c96194.jpg) +Figure 5. ROC curves for the anti-spoofing performance of the GOLab algorithm on the GOSet test set. (a) Performance by objects, (b) Performance by backgrounds, (c) Performance by sensors, and (d) Performance by spoof mediums. + +![](images/ec495dead9a984443af2df5e05c3031026abbc37304655272c2935a3e7531fdf.jpg) + +![](images/5d0246e07955aa59ee5c6a0cf7b913f43cd9cbeb3f8cc3fcfa6673b2a210ac96.jpg) + +![](images/8313a4999136993731170891ddcade6c81e6e74bd42a1a98c48f95646fbf4e5b.jpg) + +Table 4. Performance of GOLab when trained on varying amounts of live, real spoof, and synthetic spoof data. Live data was randomly selected. For each live video, 1 or 2 (out of 6 possible) spoof videos were then selected. We randomly select from the generated data to increase the training data by $10\%$ . + +
DataGOLabGOLab + GOGen
Live, SpoofAUCHTEREERAUCHTEREER
1/4, 1/679.726.827.779.727.227.6
1/4, 1/385.124.025.786.522.322.8
1/2, 1/681.924.726.786.022.222.8
1/2, 1/387.619.621.092.514.916.2
+ +Benefits of GOGen: GOGen generates synthetic spoof images and performs data augmentation to improve the training of GOLab. It can synthesize spoof images which may be under-represented or missing in the training data. To present the advantage of GOGen, we train the GOLab with different compositions of training data. The data compositions and corresponding results are shown in Tab. 4. Comparing the relative performance, we see that more spoof data is more important than more live data because additional spoof data contains sensor and medium noise, whereas live data only has sensor noise. Comparing the performance of the GOLab without GOGen to those of the GOLab with GOGen, the inclusion of synthetic data during training has significant benefit for the anti-spoofing performance of GOLab. As additional sensors/mediums are introduced, GOGen can reduce the cost of future data collection by appropriately generating images for the new sensor/medium combinations. + +# 5.2. Face Anti-Spoofing Performance + +We also evaluate the generalization performance of the proposed method on face anti-spoofing tasks. We present cross-database testing between two face anti-spoofing databases, SiW and OULU-NPU. The testing on OULUNPU follows the Protocol 1 and the testing on SiW is executed on all test data. The evaluation and comparison include two parts: firstly, we train the previous methods on either OULU-NPU or SiW, and test on the other; secondly, we train the previous methods and ours on GOSet, and test on the two face databases. The results are shown in Tab. 5. + +Table 5. Performance of GOPad and GOLab algorithms along with SOTA face anti-spoofing algorithms on face anti-spoofing datasets. The algorithms trained on face data are cross-tested between OULU and MSU-SiW. The rest are trained on GOSet. [Key: Best, Second best] + +
OULU P1MSU SiW
AlgorithmTrainHTEREERHTEREER
Chingovska LBP [13]Face38.544.230.531.7
Boulkenafet Texture [7]Face40.843.328.629.9
Boulkenafet SURF [8]Face38.240.836.036.7
Atoum et al. [2]Face11.813.311.011.2
Chingovska LBP [13]GOSet44.146.142.242.4
Boulkenafet Texture [7]GOSet34.636.744.144.9
Boulkenafet SURF [8]GOSet45.345.847.748.6
Atoum et al. [2]GOSet32.935.08.28.8
GOPad (Ours)GOSet33.434.29.510.2
GOLab (Ours)GOSet41.242.515.616.0
+ +GOPad is structurally very similar to the Atoum et al. algorithm [2], however, [2] uses more than $10\mathrm{X}$ the number of network parameters. The similar performance between these two methods implies that the leaner and faster GOPad was able to learn strong discriminative ability, regardless of its smaller size. The SOTA performance of both Atoum et al. and GOPad on SiW when trained on GOSet demonstrates the generalization ability from generic objects to face data. The lack of such performance when tested on OULU shows that the generalization of current methods to unseen sensors/medium is poor, providing future incentive for GOGen to synthesize data that represents these devices. + +We train Atoum et al. [2] using MSU SiW face dataset and test on the GOSet dataset, resulting in an AUC of 62.3, HTER of 37.0, and EER of 41.4. Comparing to Tab. 4, Atoum et al. [2] has the lowest performance, even worse than GOLab trained with the smallest amount of data. This shows that models trained only on faces are domain specific and can not model or detect the true noise in spoof images. + +# 5.3. Ablation Study + +Noise representation: Fig. 3 shows the learned noise prototypes for the sensors and mediums. In the last row of Fig. 3, the distinctive high frequency information is evident + +Table 6. Anti-spoofing performance of GOPad and GOLab on the GOSet dataset with varying amounts of training data. + +
DataGolabGoPad
(Live, Spoof)AUCHTEREERAUCHTEREER
(1/4, 1/6)79.726.827.784.423.824.8
(1/4, 4/6)86.021.623.886.222.422.9
(All, 4/6)94.612.513.986.322.423.8
(All, All)97.56.36.787.620.622.9
+ +![](images/709f38605b88e2ce69f9f00740e5a924fc6c3e992cbd10c75dedc8c0683d60ee.jpg) +Figure 6. Illustration of GOLab-based anti-spoofing, with 2 success (left) and 2 failure (right) cases for live (top row) and real spoof (bottom row) using 20 patches per image. The color bar shows the output range of the network: 1 is spoof and 0 is live. The score at the top left corner is the average of all patches. + +in the FFT of the spoof medium prototypes. In contrast, the FFT for the sensor prototypes are similar. To evaluate the advantage of modeling noise prototypes, we train the GOGen network without noise prototypes by constructing $\mathbf{T} = [\mathbf{I},\mathbf{M}_c',\mathbf{M}_m']$ . $\mathbf{M}_c'$ and $\mathbf{M}_m'$ are of the same size of as $\mathbf{M}_c$ and $\mathbf{M}_m$ , and with all elements being zeros except the prototypes of selected spoof and medium being all 1. The Rank-1 accuracy for sensor and spoof medium identification of the related GOLab on the synthesized data is $11.0\%$ and $19.7\%$ , respectively. However, by learning noise prototypes, as shown in Fig. 2, the accuracy is $56.0\%$ and $26.3\%$ . + +Binary or N-ary Classification: We train the GOPad on the GOSet dataset, and we find that GOPad performs better than GOLab when only a small amount of data is utilized for training. However, GOLab is better than GOPad when using a larger training set. The training data to be used is chosen by randomly sampling of the GOSet training set. We attribute this improvement to the auxiliary information (classification between multiple sensors and mediums) that is learned by GOLab for the sensor and spoof medium identification. The detailed comparison is shown in Tab. 6. + +GOLab Loss Functions: To demonstrate the benefit of both sensor and medium classification in the GOLab algorithm, experiments were run using each independently. Using only $S_{c}(\mathbf{I})$ in Eq. 6, we obtain a Rank-1 accuracy of $84.7\%$ . Similarly using only $S_{m}(\mathbf{I})$ , we obtain an accuracy of $42.0\%$ with anti-spoofing performance AUC of 85.9, HTER of 22.1 and EER of 22.8. By fusing tasks, we improve accuracy for sensor and medium to $87.6\%$ and $43.2\%$ , respectively. This also improves anti-spoofing performance to AUC of 97.5, HTER of 6.3, and EER of 6.7. + +![](images/1d94758e3570c5114b8afaaf39cf297f2fc8afccc5cdcfc3afda0a5a743ec434.jpg) +Figure 7. Visual comparison of live (first row), synthetic spoof (second row), and real spoof (third row) images. Columns are whole image, image patch, and the FFT power spectrum of the image patch. Each synthetic image was generated from a live image. The corresponding ground truth spoof images (third row) are collected with the target sensor/spoof medium combination. + +# 5.4. Visualization and Qualitative Analysis + +Fig. 6 shows success and failure cases of the GOLab model on the GOSet dataset. This suggests that the smooth, reflective background is classified disproportionately as live and the textured carpet/cloth backgrounds are inversely classified as spoof. Hence, it is crucial that GOAS and biometric anti-spoofing be possible over the entire image, because no singular patch in the image can provide an accurate and confident score for the entire image. + +We show some examples of the generated synthetic spoof images in Fig. 7. We can compare the visual quality with their corresponding live and real spoof images. The GOGen network is trained to change the high frequency information in the images which are related to the sensor and spoof medium noises. GOGen is successfully able to alter the high frequency information in these patches to be more similar to the associated spoof than the input live. + +# 6. Conclusion + +We present our proposed generic object anti-spoofing method which consists of multiple CNNs designed for modeling the sensor and spoof medium noises. It generates synthetic images which are helpful for increasing anti-spoofing performance. We show that by modeling the spoof noise properly, the anti-spoofing methods are domain independent and can be utilized in other modalities. We propose the first generic object anti-spoofing dataset which contains live and spoof videos from 7 sensors and 7 spoof mediums. + +Acknowledgment This research is based upon work supported by the Office of the Director of National Intelligence (ODNI), Intelligence Advanced Research Projects Activity (IARPA), via IARPA R&D Contract No. 2017-17020200004. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the ODNI, IARPA, or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright annotation thereon. + +# References + +[1] A. Abdelhamed, S. Lin, and M. S. Brown. A high-quality denoising dataset for smartphone cameras. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[2] Y. Atoum, Y. Liu, A. Jourabloo, and X. Liu. Face anti-spoofing using patch and depth-based CNNs. In International Joint Conference on Biometrics (IJCB), 2017. 1, 2, 6, 7 +[3] W. Bao, H. Li, N. Li, and W. Jiang. A liveness detection method for face recognition based on optical flow field. In International Conference on Image Analysis and Signal Processing, 2009. 2 +[4] S. Bengio and J. Mariéthoz. A statistical significance test for person authentication. In Odyssey: The Speaker and Language Recognition Workshop, 2004. 6 +[5] Z. Boulkenafet, J. Komulainen, Z. Akhtar, A. Benlamoudi, D. Samai, S. E. Bekhouche, A. Ouafi, F. Dornaika, A. Taleb-Ahmed, L. Qin, F. Peng, L. B. Zhang, M. Long, S. Bhilare, V. Kanhangad, A. Costa-Pazo, E. Vazquez-Fernandez, D. Perez-Cabo, J. J. Moreira-Perez, D. Gonzalez-Jimenez, A. Mohammadi, S. Bhattacharjee, S. Marcel, S. Volkova, Y. Tang, N. Abe, L. Li, X. Feng, Z. Xia, X. Jiang, S. Liu, R. Shao, P. C. Yuen, W. R. Almeida, F. Andalo, R. Padilha, G. Bertocco, W. Dias, J. Wainer, R. Torres, A. Rocha, M. A. Angeloni, G. Folego, A. Godoy, and A. Hadid. A competition on generalized software-based face presentation attack detection in mobile scenarios. In IEEE International Joint Conference on Biometrics (IJCB), 2017. 2 +[6] Z. Boulkenafet, J. Komulainen, and A. Hadid. Face anti-spoofing based on color texture analysis. In IEEE International Conference on Image Processing (ICIP), 2015. 1, 2 +[7] Z. Boulkenafet, J. Komulainen, and A. Hadid. Face spoofing detection using colour texture analysis. IEEE Transactions on Information Forensics and Security (TIFS), 2016. 6, 7 +[8] Z. Boulkenafet, J. Komulainen, and A. Hadid. On the generalization of color texture-based face anti-spoofing. Image Vision Computing, 2018. 1, 2, 6, 7 +[9] C. Chen and M. C. Stamm. Camera model identification framework using an ensemble of demosaicing features. In IEEE International Workshop on Information Forensics and Security (WIFS), 2015. 1, 2 +[10] C. Chen, Z. Xiong, X. Liu, and F. Wu. Camera trace erasing. In IEEE Computer Vision and Pattern Recognition (CVPR), 2020. 1 +[11] Y. Chen, Y. Tai, X. Liu, C. Shen, and J. Yang. FSRNet: End-to-end learning face super-resolution with facial priors. In IEEE Computer Vision and Pattern Recognition (CVPR), 2018. 3 +[12] G. Chetty and M. Wagner. Audio-visual multimodal fusion for biometric person authentication and liveness verification. In NICTA-HCSNet Multimodal User Interaction Workshop, 2006. 2 +[13] I. Chingovska, A. Anjos, and S. Marcel. On the effectiveness of local binary patterns in face anti-spoofing. In International Conference of Biometrics Special Interest Group (BIOSIG), 2012. 6, 7 + +[14] Y. Choi, M. Choi, M. Kim, J. Ha, S. Kim, and J. Choo. StarGAN: Unified generative adversarial networks for multidomain image-to-image translation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 2 +[15] T. Chugh, K. Cao, and A. K. Jain. Fingerprint spoof buster: Use of minutiae-centered patches. IEEE Transactions on Information Forensics and Security (TIFS), 2018. 2 +[16] A. d. S. Pinto, H. Pedrini, W. Schwartz, and A. Rocha. Video-based face spoofing detection through visual rhythm analysis. In Conference on Graphics, Patterns and Images (SIBGRAPI), 2012. 2 +[17] C. Dong, C. C. Loy, K. He, and X. Tang. Learning a deep convolutional network for image super-resolution. In European Conference on Computer Vision (ECCV), 2014. 3 +[18] L. Feng, L. Po, Y. Li, X. Xu, F. Yuan, T. C.-H. Cheung, and K. Cheung. Integration of image quality and motion cues for face anti-spoofing: A neural network approach. Journal of Visual Communication and Image Representation, 2016. 2 +[19] T. Filler, J. Fridrich, and M. Goljan. Using sensor pattern noise for camera model identification. In IEEE International Conference on Image Processing (ICIP), 2008. 2 +[20] T. Gloe and R. Böhme. The Dresden image database for benchmarking digital image forensics. In ACM Symposium on Applied Computing, 2010. 2 +[21] M. Goljan, J. Fridrich, and T. Filler. Large scale test of sensor fingerprint camera identification. In SPIE Conference on Electronic Imaging, Security and Forensics of Multimedia Contents, 2009. 2 +[22] D. Güera, Y. Wang, L. Bondi, P. Bestagini, S. Tubaro, and E. J. Delp. A counter-forensic method for CNN-based camera model identification. In IEEE conference on computer vision and pattern recognition workshops (CVPRW), 2017. +[23] A. Jourabloo, Y. Liu, and X. Liu. Face de-spoofing: Anti-spoofing via noise modeling. In European Conference on Computer Vision (ECCV), 2018. 1, 2 +[24] W. Lai, J. Huang, N. Ahuja, and M. Yang. Fast and accurate image super-resolution with deep Laplacian pyramid networks. IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 2018. 3 +[25] S. Liu, P. C. Yuen, S. Zhang, and G. Zhao. 3D mask face antispoofing with remote photoplethysmography. In European Conference on Computer Vision (ECCV), 2016. 2 +[26] Y. Liu, A. Jourabloo, and X. Liu. Learning deep models for face anti-spoofing: Binary or auxiliary supervision. In IEEE Computer Vision and Pattern Recognition (CVPR), 2018. 1, 2, 5 +[27] Y. Liu, J. Stehouwer, A. Jourabloo, and X. Liu. Deep tree learning for zero-shot face anti-spoofing. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1 +[28] O. Lucena, A. Junior, V. Moia, R. Souza, E. Valle, and R. de Alencar Lotufo. Transfer learning using convolutional neural networks for face anti-spoofing. In International Conference Image Analysis and Recognition, 2017. 2 +[29] M. Mirza and S. Osindero. Conditional generative adversarial nets. CoRR, 2014. 3 + +[30] G. Pan, L. Sun, Z. Wu, and S. Lao. Eyeblink-based anti-spoofing in face recognition from a generic webcam. In IEEE International Conference on Computer Vision (ICCV), 2007. 1, 2 +[31] K. Patel, H. Han, and A. K. Jain. Secure face unlock: Proof detection on smartphones. IEEE Transactions on Information Forensics and Security (TIFS), 2016. 1 +[32] K. Patel, H. Han, A. K. Jain, and G. Ott. Live face video vs. spoof face video: Use of moiré patterns to detect replay video attacks. In International Conference on Biometrics (ICB), 2015. 1 +[33] D. Perez-Cabo, D. Jimenez-Cabello, A. Costa-Pazo, and R. J. Lopez-Sastre. Deep anomaly detection for generalized face anti-spoofing. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1 +[34] P. V. Reddy, A. Kumar, S. M. K. Rahman, and T. S. Mundra. A new method for fingerprint anti-spoofing using pulse oxiometry. In IEEE International Conference on Biometrics: Theory, Applications, and Systems (BTAS), 2007. 2 +[35] Q. Song, R. Xiong, D. Liu, Z. Xiong, F. Wu, and W. Gao. Fast image super-resolution via local adaptive gradient field sharpening transform. IEEE Transactions on Image Processing, 2018. 3 +[36] Y. Tai, J. Yang, and X. Liu. Image super-resolution via deep recursive residual network. In IEEE Computer Vision and Pattern Recognition (CVPR), 2017. 3 +[37] Y. Tai, J. Yang, X. Liu, and C. Xu. MemNet: A persistent memory network for image restoration. In International Conference on Computer Vision (ICCV), 2017. 3 +[38] T. H. Thai, R. Cogranne, and F. Retraint. Camera model identification based on the heteroscedastic noise model. IEEE Transactions on Image Processing, 2014. 2 +[39] T. H. Thai, F. Retraint, and R. Cogranne. Camera model identification based on the generalized noise model in natural images. Digital Signal Processing, 2016. 1, 2 +[40] L. Tran, X. Yin, and X. Liu. Disentangled representation learning GAN for pose-invariant face recognition. In Proceedings of IEEE Computer Vision and Pattern Recognition, 2017. 3 +[41] K. P. Tripathi. A comparative study of biometric technologies with reference to human interface. International Journal of Computer Applications, 2011. 6 +[42] X. Yang, W. Luo, L. Bao, Y. Gao, D. Gong, S. Zheng, Z. Li, and W. Liu. Face anti-spoofing: Model matters, so does data. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2 +[43] X. Yin, X. Yu, K. Sohn, X. Liu, and M. Chandraker. Feature transfer learning for face recognition with under-represented data. In IEEE Computer Vision and Pattern Recognition (CVPR), 2019. 2 +[44] J. Zhu, T. Park, P. Isola, and A. A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In IEEE International Conference on Computer Vision (ICCV), 2017. 3 \ No newline at end of file diff --git a/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/images.zip b/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..08a20226c8b46429fd6d788101420858786cc201 --- /dev/null +++ b/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e325734f47932d5a8fc281c853ef60d3b8af1a4734457a7d17505268aee61f7 +size 670508 diff --git a/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/layout.json b/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1a0a269b590a5965d8aefc202a035b2a26451f22 --- /dev/null +++ b/noisemodelingsynthesisandclassificationforgenericobjectantispoofing/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b77f8b1f74cebd5745793d6ce4fc20252b45f90a187848f30a59f4f0a2e9a867 +size 364395 diff --git a/noiserobustgenerativeadversarialnetworks/002ec28f-a405-403f-b623-9361b26601e9_content_list.json b/noiserobustgenerativeadversarialnetworks/002ec28f-a405-403f-b623-9361b26601e9_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..c977ab98444906bbf8a53e60fb338f5ea1375b81 --- /dev/null +++ b/noiserobustgenerativeadversarialnetworks/002ec28f-a405-403f-b623-9361b26601e9_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8dacb3754c2968c3c25f89433b3249bee1051a7695033c63a2b9031d8321d155 +size 92122 diff --git a/noiserobustgenerativeadversarialnetworks/002ec28f-a405-403f-b623-9361b26601e9_model.json b/noiserobustgenerativeadversarialnetworks/002ec28f-a405-403f-b623-9361b26601e9_model.json new file mode 100644 index 0000000000000000000000000000000000000000..dc7ec2885f08c2e8c13beb76bf7ceab6cbc08c85 --- /dev/null +++ b/noiserobustgenerativeadversarialnetworks/002ec28f-a405-403f-b623-9361b26601e9_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22aa0557c3e82160c45fb71b37921eaaf6a1ac3e77601af82344531a5211aacb +size 121117 diff --git a/noiserobustgenerativeadversarialnetworks/002ec28f-a405-403f-b623-9361b26601e9_origin.pdf b/noiserobustgenerativeadversarialnetworks/002ec28f-a405-403f-b623-9361b26601e9_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f5f1f6003a17cf4a7a4e21ca81c1b5b9aa8e4bde --- /dev/null +++ b/noiserobustgenerativeadversarialnetworks/002ec28f-a405-403f-b623-9361b26601e9_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:275f0647e9b4110263b8440106ddc2fd76b1f795d25c3a3cc1cfe2934052de31 +size 1119500 diff --git a/noiserobustgenerativeadversarialnetworks/full.md b/noiserobustgenerativeadversarialnetworks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..08fdc76952210fccd65c49bfd81a5809c622b83f --- /dev/null +++ b/noiserobustgenerativeadversarialnetworks/full.md @@ -0,0 +1,361 @@ +# Noise Robust Generative Adversarial Networks + +Takuhiro Kaneko $^{1}$ Tatsuya Harada $^{1,2}$ + +$^{1}$ The University of Tokyo $^{2}$ RIKEN + +![](images/946148ad472b816db580522e2646fd342dac3cb52cd9a179e5b0894742bc4ae3.jpg) +(a) Training images +(Gaussian noise) +Figure 1. Examples of noise robust image generation. Recent GANs have shown promising results for reproducing training images. However, even when training images are noisy (a)(d), they attempt to reproduce the training images faithfully, as shown in (b)(e). To remedy this, we propose noise robust GANs (NR-GANs), which can learn to generate clean images (c)(f), even when training images are noisy (a)(d). Our NR-GANs are unique in that they solve this problem without full knowledge of the noise (e.g., the noise distribution type, noise amount, or signal-noise relationship). Indeed, in (c) and (f), although the same models (in particular, SI-NR-GAN-II, which is a variant of NR-GANs) are used for different noises (a)(d), they succeed in learning clean image generators adaptively through training. + +![](images/e1ac701083c2f74c0e690e00c6286218960c57b2fec941fd932fd9b42a68f86c.jpg) +(b) GAN (baseline) +(Trained with (a)) + +![](images/875d21523d0072b67fef7a48e54ad22617c12469232854505e910ae49e204b78.jpg) +(c) NR-GAN (ours) +(Trained with (a)) + +![](images/919341d81ca7932044aff3e002a3f5a6d70ae6427d246b62ea87047fa4c1c3ba.jpg) +(d) Training images +(Brown Gaussian noise) + +![](images/3ee4e03ca01df11675aa967d7bd2884d3362bbdf41ed8b44dafdc60c39058959.jpg) +(e) GAN (baseline) +(Trained with (d)) + +![](images/ef88a21cb089148ccbc301d943396b86c1e0436ad290a69b83af6271f278ec36.jpg) +(f) NR-GAN (ours) +(Trained with (d)) + +# Abstract + +Generative adversarial networks (GANs) are neural networks that learn data distributions through adversarial training. In intensive studies, recent GANs have shown promising results for reproducing training images. However, in spite of noise, they reproduce images with fidelity. As an alternative, we propose a novel family of GANs called noise robust GANs (NR-GANs), which can learn a clean image generator even when training images are noisy. In particular, NR-GANs can solve this problem without having complete noise information (e.g., the noise distribution type, noise amount, or signal-noise relationship). To achieve this, we introduce a noise generator and train it along with a clean image generator. However, without any constraints, there is no incentive to generate an image and noise separately. Therefore, we propose distribution and transformation constraints that encourage the noise generator to capture only the noise-specific components. In particular, considering such constraints under different assumptions, we devise two variants of NR-GANs for signal-independent noise and three variants of NR-GANs for signal-dependent noise. On three benchmark datasets, we demonstrate the effectiveness of NR-GANs in noise robust image generation. Furthermore, we show the applicability of NR-GANs in image denoising. Our code is available at https://github.com/takuhirok/NR-GAN/. + +# 1. Introduction + +In computer vision and machine learning, generative models have been actively studied and used to generate or reproduce an image that is indistinguishable from a real image. Generative adversarial networks (GANs) [21], which learn data distributions through adversarial training, have garnered special attention owing to their ability to produce high-quality images. In particular, with recent advancements [2, 54, 46, 23, 40, 57, 58, 36, 76], the latest GANs (e.g., BigGAN [6] and StyleGAN [37]) have succeeded in generating images indistinguishable for humans. + +However, a persistent issue is that recent high-capacity GANs could replicate images faithfully even though the training images were noisy. Indeed, as shown in Figure 1(b)(e), when standard GAN is trained with noisy images, it attempts to recreate them. Although the long-term development of devices has steadily improved image quality, image degradation is unavoidable in real situations. For example, electronic noise is inevitable in digital imaging [60, 1] and estimator variance often appears as noise in graphic rendering [83, 72]. Therefore, susceptibility to noise is practically undesirable for GANs. + +The question becomes: "How can we learn a clean image generator even when only noisy images are available for training?" We call this problem noise robust image generation. One solution is to apply a denoiser as pre + +![](images/f994cf64aba24d3ff1c09c99fbccdb36c143abb36091b77ca5229beca652d822.jpg) +Figure 2. Noise categorization and examples. In this paper, we handle various types of noise. (A)(B) Additive Gaussian noise with fixed $\sigma = 25$ (A) and variable $\sigma \in [5,50]$ (B), where $\sigma$ is the standard deviation of a Gaussian distribution. (C)(D) Local Gaussian noise with fixed patch $p_h = p_w = 16$ (C) and variable patch $p_h, p_w \in [8,24]$ (D), where $p_h$ and $p_w$ are the height and width of noise region, respectively. $\sigma$ is fixed to 25 in both cases. (E) Uniform noise $[-50,50]$ . (F) Mixture noise [81]. Mixture of $10\%$ uniform noise $[-50,50]$ , $20\%$ Gaussian noise $(\sigma = 25)$ , and $70\%$ Gaussian noise $(\sigma = 15)$ . (G) Brown Gaussian noise [45]. A Gaussian filter (kernel size is $5 \times 5$ ) is applied to (A). (H) Additive Brown Gaussian noise. (G) is added to (A) while remaining the original (A). (I)(J) Multiplicative Gaussian noise with fixed $\sigma = 25$ (I) and variable $\sigma \in [5,50]$ (J). (K)(L) Additive and multiplicative Gaussian noise. (K) Sum of few (A) $(\sigma = 5)$ and (I). (L) Sum of much (A) $(\sigma = 25)$ and (I). (M)(N) Poisson noise with fixed $\lambda = 30$ (M) and variable $\lambda \in [10,50]$ (N), where $\lambda$ is the total number of events. (O)(P) Poisson-Gaussian noise. (O) Sum of few (A) $(\sigma = 5)$ and (M). (P) Sum of much (A) $(\sigma = 25)$ and (M). + +process. However, a limitation is that the generator performance highly relies on the quality of the denoiser, which is relatively difficult to learn when clean images are not available for training. As an alternative, AmbientGAN [5] was recently proposed, which provides a promising solution by simulating the noise corruption on the generated images and learning the discriminator so that it distinguishes a real noisy image from a simulatively corrupted generated image. This makes it possible to learn a clean image generator directly from noisy images without relying on a denoiser. + +However, a key limitation of AmbientGAN is that it assumes that the noise corruption process is pre-defined. Therefore, to utilize it, we need to have all information about the noise, such as the noise distribution type (e.g., Gaussian), noise amount (e.g., standard deviation), and signal-noise relationship. For instance, to treat 16 noises shown in Figure 2, we need to carefully prepare 16 noise simulation models that depend on the noise. + +To deal with this, we propose noise robust GANs (NR-GANs), which can achieve noise robust image generation without having complete noise information. Our main idea is as follows. We first introduce two generators, a clean image generator and noise generator. To make them generate an image and noise, respectively, we impose a distribution or transformation constraint on the noise generator so that it only captures the components that follow the specified distribution or transformation invariance. As such a constraint can take various forms depending on the type of assumptions; we develop five variants: two signal-independent NR-GANs (SI-NR-GANs) and three signal-dependent NR-GANs (SD-NR-GANs). Figure 1(c)(f) shows examples of images generated using NR-GANs. Here, although the same models are used for different noises (a)(d), NR-GANs succeed in learning clean image generators adaptively. + +As the noise robustness of GANs has not been sufficiently studied, we first perform a comprehensive study on CIFAR-10 [42], where we compare various models in diverse noise settings (in which we test 152 conditions). Furthermore, inspired by the recent large-scale study on GANs [44], we also exam in the performance on more complex datasets (LSUN BEDROOM [74] and FFHQ [37]). Finally, we demonstrate the applicability of NR-GANs in image denoising, where we learn a denoiser using generated noisy images and generated clean images (GN2GC), and empirically examine a chicken and egg problem between noise robust image generation and image denoising. + +Overall, our contributions are summarized as follows: + +- We provide noise robust image generation, the purpose of which is to learn a clean image generator even when training images are noisy. In particular, we solve this problem without full knowledge of the noise. +- To achieve this, we propose a novel family of GANs called NR-GANs that train a clean image generator and noise generator simultaneously with a distribution or transformation constrain on the noise generator. +- We provide a comprehensive study on CIFAR-10 (in which we test 152 conditions) and examine the versatility in more complex datasets (LSUN BEDROOM and FFHQ); finally, we demonstrate the applicability in image denoising. The project page is available at https://takuhirok.github.io/NR-GAN/. + +# 2. Related work + +Deep generative models. Image generation is a fundamental problem and has been intensively studied in computer vision and machine learning. Recently, deep generative models have emerged as a promising framework. Among them, three prominent models along with GANs are variational + +autoencoders [39, 64], autoregressive models [70], and flow-based models [14, 15]. Each model has pros and cons. A well-known disadvantage of GANs is training instability; however, it has been steadily improved by recent advancements [2, 54, 46, 4, 65, 23, 40, 57, 58, 36, 76, 6, 9, 37]. In this work, we focus on GANs for their design flexibility, which allows them to incorporate the core of our models, a noise generator and its constraints. Also in other models, image fidelity has improved [71, 61, 56, 38]. Hence, sensitivity to noise can be problematic. Incorporating our ideas into them is a possible direction of future work. + +Image denoising. Image denoising is also a fundamental problem and several methods have been proposed. They are roughly categorized into two: model-based methods [12, 22, 17, 51, 7, 50, 16, 49, 52] and discriminative learning methods [29, 55, 67, 77, 78, 8, 24, 45, 43, 3]. Recently, discriminative learning methods have shown a better performance; however, a limitation is that most of them (i.e., Noise2Clean (N2C)) require clean images for supervised training of a denoiser. To handle this, self-supervised learning methods (e.g., Noise2Void (N2V) [43] and Noise2Self (N2S) [3]) were proposed. These methods assume the same data setting as ours, i.e., only noisy images are available for training. However, they still have some limitations, e.g., they cannot handle pixel-wise correlated noise, such as shown in Figure 2(G)(H), and their performance is still inferior to supervised learning methods. + +Image denoising and our noise robust image generation is a chicken and egg problem and each task can be used as a pre-task for learning the other. In the spirit of AmbientGAN, we aim to learn a clean image generator directly from noisy images. However, examining the performance on (1) learning a generator using denoised images and (2) learning a denoiser using generated clean and noisy images is an interesting research topic. Motivated by this, we empirically examined them through comparative studies. We provide the results in Sections 8.1 and 8.3. + +Noise robust models. Except for image denoising, noise robust models have been studied in image classification to learn a classifier in practical settings. There are two studies addressing label noise [18, 80, 62, 53, 30, 68, 63, 25, 66, 31, 59, 20] and addressing image noise [82, 13]. For both tasks, the issue is the memorization effect [75], i.e., DNN classifiers can fit labels or images even though they are noisy or fully corrupted. As demonstrated in Figure 1, a similar issue also occurs in image generation. + +Pertaining image generation, handling of label noise [35, 34, 69, 32] and image noise [5] has begun to be studied. Our NR-GANs are categorized into the latter. As discussed in Section 1, AmbientGAN [5] is a representative model in the latter category. However, a limitation is that it requires full knowledge of the noise. Therefore, we introduce NR-GANs to solve this problem as they do not have this limitation. + +# 3. Notation and problem statement + +We first define notation and the problem statement. Hereafter, we use superscripts $r$ and $g$ to denote the real distribution and generative distribution, respectively. Let $\pmb{y}$ be the observable noisy image and $\pmb{x}$ and $\pmb{n}$ be the underlying signal (i.e., clean image) and noise, respectively, where $\pmb{y}, \pmb{x}, \pmb{n} \in \mathbb{R}^{H \times W \times C}$ ( $H, W,$ and $C$ are the height, width, and channels of an image, respectively). In particular, we assume that $\pmb{y}$ can be decomposed additively: $\pmb{y} = \pmb{x} + \pmb{n}$ .1 Our task is to learn a clean image generator that can reproduce clean images, such that $p^g(\pmb{x}) = p^r(\pmb{x})$ , when trained with noisy images $\pmb{y}^r \sim p^r(\pmb{y})$ . This is a challenge for standard GAN as it attempts to mimic the observable images including the noise; namely, it learns $p^g(\pmb{y}) = p^r(\pmb{y})$ . + +We assume various types of noise. Figure 2 shows the categorization and examples of the noises that we address in this paper. They include signal-independent noises (A)-(H), signal-dependent noises (I)-(P), pixel-wise correlated noises (G)(H), local noises (C)(D), and their combination (H)(K)(L)(O)(P). We also consider two cases: the noise amount is either fixed or variable across the dataset. + +As discussed in Section 1, one solution is AmbientGAN [5]; however, it is limited by the need for prior noise knowledge. We plan a solution that will not require that full prior knowledge. Our central idea is to introduce two generators, i.e., a clean image generator and noise generator, and impose a distribution or transformation constraint on the noise generator so that it captures only the noise-specific components. In particular, we explicate such constraints by relying on the signal-noise dependency. We first review our baseline AmbientGAN [5] (Section 4); then detail NR-GANs for signal-independent noise (Section 5) and signal-dependent noise (Section 6). + +# 4. Baseline: AmbientGAN + +AmbientGAN [5] (Figures 3(a) and 4(a)) is a variant of GANs, which learns an underlying distribution $p^r(\boldsymbol{x})$ only from noisy images $\boldsymbol{y}^r \sim p^r(\boldsymbol{y})$ . This is a challenging because the desired images $\boldsymbol{x}^r \sim p^r(\boldsymbol{x})$ are not observable during training. To overcome this challenge, AmbientGAN introduces a noise simulation model $\boldsymbol{y} = F_{\boldsymbol{\theta}}(\boldsymbol{x})$ under the assumption that it is primarily known. The main idea of AmbientGAN is to incorporate this noise simulation model into the adversarial training framework: + +$$ +\begin{array}{l} \min _ {G _ {\boldsymbol {x}}} \max _ {D _ {\boldsymbol {y}}} \mathbb {E} _ {\boldsymbol {y} ^ {r} \sim p ^ {r} (\boldsymbol {y})} [ \log D _ {\boldsymbol {y}} (\boldsymbol {y} ^ {r}) ] \\ + \mathbb {E} _ {\boldsymbol {z} _ {\boldsymbol {x}} \sim p (\boldsymbol {z} _ {\boldsymbol {x}}), \boldsymbol {\theta} \sim p (\boldsymbol {\theta})} [ \log (1 - D _ {\boldsymbol {y}} (F _ {\boldsymbol {\theta}} (G _ {\boldsymbol {x}} (\boldsymbol {z} _ {\boldsymbol {x}})))) ]. \tag {1} \\ \end{array} +$$ + +![](images/e6bc12b5cb496d63e1df2820ca22e59135f87dac3a8cc061da07e81cf66d4501.jpg) +(a) AmbientGAN (baseline) + +![](images/c7e03cdeab81ebbd01409479a7ccaf956fb02be737aa161c692b2f9e395dd911.jpg) +(b) Two-generator model + +![](images/c3330c7f5fe8c0ab679eeceb92ebb306b65faae92ff64c7d3fdda13ef59e8e9d.jpg) +(c) SI-NR-GAN-I (proposed) +Figure 3. Comparison of AmbientGAN (baseline) and SI-NR-GANs (proposed). Because the discriminators are the same, we only depict the generators. (a) AmbientGAN assumes that the noise model is pre-defined. (b) To mitigate this requirement, we introduce a two-generator model and learn a noise generator $G_{n}$ along with a clean image generator $G_{x}$ . (c) To make $G_{n}$ capture only the noise specific components, SI-NR-GAN-I regularizes the output distribution of $G_{n}$ using a reparameterization trick under the assumption that the noise distribution type is known. (d) Furthermore, considering the situation when the noise distribution type is unknown, we develop SI-NR-GAN-II, which applies transformations $n = T(\hat{n})$ to extract the transformation-invariant element, i.e., noise. + +![](images/aab6e000c3775f51e802afced4ebe35c32863b73bdd46f66f00c48d4ef647f41.jpg) +(d) SI-NR-GAN-II (proposed) + +
Noise distribution typeKnown-KnownUnknown
Noise amountKnown-UnknownUnknown
Applicable noiseSpecific modeling-(A)-(D)(A)-(H)
+ +Just like standard GAN, a generator $G_{\pmb{x}}$ transforms the latent vector $\pmb{z}_{\pmb{x}}$ into an image $\pmb{x}^g = G_{\pmb{x}}(\pmb{z}_{\pmb{x}})$ . However, differently from the standard GAN discriminator, which directly distinguishes a real image $\pmb{y}^r$ from a generated image $\pmb{x}^g$ , the AmbientGAN discriminator $D_{\pmb{y}}$ distinguishes $\pmb{y}^r$ from a noised generated image $\pmb{y}^g = F_{\pmb{\theta}}(\pmb{x}^g)$ . Intuitively, this modification allows noisy $p^g (\pmb {y}) (= p^g (F_\pmb {\theta}(\pmb {x})))$ to get close to noisy $p^r (\pmb {y}) (= p^r (F_\pmb {\theta}(\pmb {x})))$ . When $F_{\pmb{\theta}}$ is invertible or uniquely determined, underlying clean $p^g (\pmb {x})$ also approaches underlying clean $p^r (\pmb {x})$ . + +# 5. Signal-independent noise robust GANs + +As described above, a limitation of AmbientGAN is that it requires that a noise simulation model $F_{\theta}(\pmb{x})$ is primarily known. To alleviate this, we introduce a noise generator $\pmb{n} = G_n(z_n)$ (Figure 3(b)) and train it along with a clean image generator $G_x$ using the following objective function: + +$$ +\begin{array}{l} \min _ {G _ {\boldsymbol {x}}, G _ {\boldsymbol {n}}} \max _ {D _ {\boldsymbol {y}}} \mathbb {E} _ {\boldsymbol {y} ^ {r} \sim p ^ {r} (\boldsymbol {y})} [ \log D _ {\boldsymbol {y}} (\boldsymbol {y} ^ {r}) ] \\ + \mathbb {E} _ {\boldsymbol {z} _ {\boldsymbol {x}} \sim p (\boldsymbol {z} _ {\boldsymbol {x}}), \boldsymbol {z} _ {\boldsymbol {n}} \sim p (\boldsymbol {z} _ {\boldsymbol {n}})} [ \log (1 - D _ {\boldsymbol {y}} \left(G _ {\boldsymbol {x}} \left(\boldsymbol {z} _ {\boldsymbol {x}}\right) + G _ {\boldsymbol {n}} \left(\boldsymbol {z} _ {\boldsymbol {n}}\right)\right)) ]. \tag {2} \\ \end{array} +$$ + +Nevertheless, without any constraints, there is no incentive to make $G_{x}$ and $G_{n}$ generate an image and a noise, respectively. Therefore, we provide a constraint on $G_{n}$ so that it captures only the noise-specific components. In particular, we develop two variants that have different assumptions: SI-NR-GAN-I (Section 5.1) and SI-NR-GAN-II (Section 5.2). + +# 5.1. SI-NR-GAN-I + +In SI-NR-GAN-I, we assume the following. + +Assumption 1 (i) The noise $\mathbf{n}$ is conditionally pixel-wise independent given the signal $\mathbf{x}$ . (ii) The noise distribution type (e.g., Gaussian) is primarily known. Note that the noise amount needs not to be known. (iii) The signal $\mathbf{x}$ does not follow the defined noise distribution. + +Under this assumption, we develop SI-NR-GAN-I (Figure 3(c)). In this model, we regularize the output distribution of $G_{n}$ in a pixel-wise manner using a reparameterization trick [39]. Here, we present the case when the noise distribution type is defined as zero-mean Gaussian: + +$$ +\boldsymbol {y} = \boldsymbol {x} + \boldsymbol {n}, \text {w h e r e} \boldsymbol {n} \sim \mathcal {N} (\boldsymbol {0}, \operatorname {d i a g} (\boldsymbol {\sigma}) ^ {2}), \tag {3} +$$ + +where $\pmb{\sigma} \in \mathbb{R}^{H \times W \times C}$ is the pixel-wise standard deviation. In this case, we redefine the noise generator as $\pmb{\sigma} = G_{\pmb{n}}(\pmb{z}_{\pmb{n}})$ ; and introduce an auxiliary pixel-wise random variable $\epsilon \sim \mathcal{N}(\mathbf{0}, \mathbf{I})$ , where $\epsilon \in \mathbb{R}^{H \times W \times C}$ ; and then calculate the noise $\pmb{n}$ by multiplying them: $\pmb{n} = \pmb{\sigma} \cdot \pmb{\epsilon}$ , where $\cdot$ represents an element-wise product. This formulation allows the noise to be sampled as $\pmb{n} \sim \mathcal{N}(\mathbf{0}, \mathrm{diag}(\pmb{\sigma})^2)$ . + +In SI-NR-GAN-I, $\sigma$ is learned through training in a pixel-wise manner. Therefore, the same model can be applied to various noises (e.g., Figure 2(A)-(D), in which each pixel's noise follows a Gaussian distribution, while the noise amount is different in a sample-wise (e.g., (B)) or pixel-wise (e.g., (D)) manner). + +# 5.2. SI-NR-GAN-II + +Two limitations of SI-NR-GAN-I are that it assumes that (i) the noise is pixel-wise independent and (ii) the noise distribution type is pre-defined. The first assumption makes it difficult to apply to a pixel-wise correlated noise (e.g., Figure 2(G)(H)). The second assumption could cause difficulty when diverse noises are mixed (e.g., Figure 2(F)) or the noise distribution type is different from the pre-defined (e.g., Figure 2(E)). This motivates us to devise SI-NR-GAN-II, which works under a different assumption: + +Assumption 2 (i) The noise $n$ is rotation-, channel-shuffle-, or color-inverse-invariant. (ii) The signal $x$ is rotation-, channel-shuffle-, or color-inverse-variant. + +![](images/f442bc007d4f796eb692143442b5775ec1715b132688ad3b4d1de2c8a1acba7d.jpg) +(a) AmbientGAN (baseline) + +![](images/b886ef9a90f4abe3ec1b6b220b598beaccc2691b16e70328b154a00cebdb38a0.jpg) +(b) SD-NR-GAN-I (proposed) +Figure 4. Comparison of AmbientGAN (baseline) and SD-NR-GANs (proposed). Because the discriminators are the same, we only depict the generators. (a) AmbientGAN pre-defines the noise model. (b) SD-NR-GAN-I represents the signal-noise relationship explicitly, while the noise amount is estimated through training. (c) SD-NR-GAN-II expresses the signal-noise relationship implicitly and this relationship and the noise amount are acquired through training. (d) SD-NR-GAN-III only imposes a weak constraint via the transformation and learns the noise distribution type, signal-noise relationship, and noise amount through training. + +![](images/e7a9694b71b7190e288f18bcccf2d14b3bd17ee11a9d94863b829dc76dc0bb86.jpg) +(c) SD-NR-GAN-II (proposed) + +![](images/e17818ac65762e49f7bfa5dc1cd8edca71440341e422a02b05f1dd8bf6feddcf.jpg) +(d) SD-NR-GAN-III (proposed) + +
Noise distribution typeKnownKnownKnownUnknown
Signal-noise relationshipKnownKnownUnknownUnknown
Noise amountKnownUnknownUnknownUnknown
Applicable noiseSpecific modeling(I), (J)/(M), (N)(A)-(D), (I)-(P)(A)-(P)
+ +Among the noises in Figure 2, this assumption holds in all signal-independent noises (A)-(H). This assumption is reasonable when $\pmb{n}$ is a zero-mean signal-independent noise and $\pmb{x}$ is a natural image. Under this assumption, we establish SI-NR-GAN-II (Figure 3(d)). In this model, we redefine the noise generator as $\hat{\pmb{n}} = G_{\pmb{n}}(\pmb{z}_{\pmb{n}})$ ( $\hat{\pmb{n}} \in \mathbb{R}^{H \times W \times C}$ ) and apply transformations to $\hat{\pmb{n}}$ by $\pmb{n} = T(\hat{\pmb{n}})$ , where $T$ is a transformation function. As $T$ , we can use arbitrary transformation as long as it is applicable to $\pmb{n}$ but not allowable to $\pmb{x}$ . In practice, we use three transformations: (i) rotation - rotating $\hat{\pmb{n}}$ by $d \in \{0^{\circ}, 90^{\circ}, 180^{\circ}, 270^{\circ}\}$ randomly, (ii) channel shuffle - shuffling RGB channels randomly, and (iii) color inversion - inverting colors randomly in a channel-wise manner. Each one utilizes one of the invariant and variant characteristics mentioned in Assumption 2. In SI-NR-GAN-II, the noise origin $\hat{\pmb{n}}$ is acquired in a data-driven manner; therefore, it is applicable to diverse noises (e.g., Figure 2(A)-(H)) without model modifications. + +# 6. Signal-dependent noise robust GANs + +Just like in the signal-independent noise case, AmbientGAN is applicable to signal-dependent noise by incorporating the pre-defined noise model (Figure 4(a)). However, it requires prior knowledge about the noise distribution type, signal-noise relationship, and noise amount. To deal with these requirements, we establish three variants that have different assumptions: SD-NR-GAN-I (Section 6.1), SD-NRGAN-II (Section 6.2), and SD-NR-GAN-III (Section 6.3). + +# 6.1. SD-NR-GAN-I + +We first consider the case when the following assumption holds in addition to Assumption 1. + +Assumption 3 The signal-noise relationship is primarily known. Note that the noise amount needs not be known. + +Under this assumption, we devise SD-NR-GAN-I (Figure 4(b)), which incorporates a signal-noise relational procedure into SI-NR-GAN-I explicitly. In particular, we devise two configurations for two typical signal-dependent noises: multiplicative Gaussian noise (Figure 2(I)(J)) and Poisson noise (Figure 2(M)(N)). + +Multiplicative Gaussian noise is defined as + +$$ +\boldsymbol {y} = \boldsymbol {x} + \boldsymbol {n}, \text {w h e r e} \boldsymbol {n} \sim \mathcal {N} (\boldsymbol {0}, \operatorname {d i a g} (\boldsymbol {\sigma} \cdot \boldsymbol {x}) ^ {2}). \tag {4} +$$ + +To represent this noise with trainable $\sigma$ , we redesign the noise generator as $\sigma = G_{n}(z_{n})$ . Then, we convert $\sigma$ using a signal-noise relational function $R(\boldsymbol{x},\boldsymbol{\sigma}) = \boldsymbol{\sigma}\cdot \boldsymbol{x} = \hat{\boldsymbol{\sigma}}$ . Finally, we obtain $\boldsymbol{n}\sim \mathcal{N}(\mathbf{0},\mathrm{diag}(\hat{\boldsymbol{\sigma}})^2)$ by using the reparameterization trick described in Section 5.1. + +Poisson noise (or shot noise) is sampled by $y \sim \mathrm{Poisson}(\lambda \cdot x) / \lambda$ , where $\lambda$ is the total number of events. As this noise is discrete and intractable to construction of a differentiable model, we use a Gaussian approximation [26], which is commonly used for Poisson noise modeling: + +$$ +\boldsymbol {y} = \boldsymbol {x} + \boldsymbol {n}, \text {w h e r e} \boldsymbol {n} \sim \mathcal {N} (\boldsymbol {0}, \operatorname {d i a g} (\sigma \cdot \sqrt {\boldsymbol {x}}) ^ {2}), \tag {5} +$$ + +where $\pmb{\sigma} = \sqrt{1 / \lambda}$ . The implementation method is almost the same as that for the multiplicative Gaussian noise except that we redefine $R(\pmb{x},\pmb{\sigma})$ as $R(\pmb{x},\pmb{\sigma}) = \pmb{\sigma}\cdot \sqrt{\pmb{x}} = \hat{\pmb{\sigma}}$ . + +In both noise cases, the noise amount $\sigma$ is trainable; therefore, each configuration of SD-NR-GAN-I is applicable to the noises in Figure 2(I)(J) and those in Figure 2(M)(N), respectively, without model modifications. + +# 6.2. SD-NR-GAN-II + +In SD-NR-GAN-II, we consider the case when the noise distribution type is known (i.e., Assumption 1 holds) but the signal-noise relationship is unknown (i.e., Assumption 3 is not required). Under this assumption, we aim to learn $R(\pmb{x},\pmb{\sigma})$ implicitly, which is explicitly given in SD-NR-GAN-I. To achieve this, we develop SD-NR-GAN-II (Figure 4(c)), which is an extension of SI-NR-GAN-I incorporating the image latent vector $z_{x}$ into the input of $G_{n}$ , i.e., + +$\pmb{\sigma} = G_{n}(z_{n}, z_{x})$ . Similarly to SI-NR-GAN-I, we sample $\pmb{n} \sim \mathcal{N}(\mathbf{0}, \mathrm{diag}(\pmb{\sigma})^{2})$ using the reparameterization trick described in Section 5.1. Here, we consider the case when the noise distribution type is defined as zero-mean Gaussian. + +As discussed in Section 6.1, multiplicative Gaussian noise and Poisson noise are represented (or approximated) as signal-dependent Gaussian noise; therefore, SD-NR-GAN-II is applicable to these noises (e.g., Figure 2(I)(J)(M)(N)). Furthermore, SD-NR-GAN-II can internally learn $R(\boldsymbol{x}, \boldsymbol{\sigma})$ ; therefore, the same model can also be applied to signal-independent noise (Figure 2(A)-(D)), i.e., $R(\boldsymbol{x}, \boldsymbol{\sigma}) = \boldsymbol{x}$ , and the combination of multiple noises (Figure 2(K)(L)(O)(P)), e.g., $R(\boldsymbol{x}, \boldsymbol{\sigma}_d, \boldsymbol{\sigma}_i) = \boldsymbol{\sigma}_d \cdot \boldsymbol{x} + \boldsymbol{\sigma}_i$ . + +# 6.3. SD-NR-GAN-III + +Finally, we deal with the case when both the noise distribution type and signal-noise relationship are not known. In this case, we impose a similar assumption as Assumption 2. However, rotation and channel shuffle collapse the per-pixel signal-noise dependency that is included in typical signal-dependent noise (e.g., Figure 2(I)-(P)). Therefore, we only induce the assumption regarding color inversion. Under this assumption, we devise SD-NR-GAN-III (Figure 4(d)). Similarly to SD-NR-GAN-II, SD-NR-GAN-III learns the signal-noise relationship implicitly by incorporating $z_{x}$ into the input of $G_{n}$ , i.e., $\hat{n} = G_{n}(z_{n},z_{x})$ . Similarly to SI-NR-GAN-II, we impose a transformation constraint on $G_{n}$ by applying $n = T(\hat{n})$ , where $T$ is defined as color inversion. The noise origin $\hat{n}$ is learned through training; therefore, SD-NR-GAN-III can be adopted to various noises (e.g., all noises in Figure 2) without modifying the model. + +# 7. Advanced techniques for practice + +# 7.1. Alleviation of convergence speed difference + +In proposed NR-GANs, $G_{x}$ and $G_{n}$ are learned simultaneously. Ideally, we expect that $G_{x}$ and $G_{n}$ would be optimized at the same speed; however, through experiments, we found that $G_{n}$ tends to learn faster than $G_{x}$ and results in a mode collapse in the early training phase. A possible cause is that the noise distribution is simpler and easier to learn than the image distribution. To address this problem, we apply the diversity-sensitive regularization [73] to $G_{n}$ . Intuitively, this regularization makes $G_{n}$ sensitive to $z_{n}$ and has an effect to prevent the mode collapse. In the experiments, we incorporate this technique to all NR-GANs. We discuss the effect of this regularization in our arXiv [33]. + +# 7.2. Alleviation of approximation degradation + +As described in Section 6.1, we apply a Gaussian approximation to the Poisson noise to make it tractable and + +differentiable. However, through experiments, we found that this approximation causes the performance degradation even using AmbientGAN, which knows all information about the noise. A possible reason is that powerful $G_{x}$ attempts to fill in the discretized gap caused by this approximation. To alleviate the effect, we apply an anti-alias (or low-pass) filter [79] to $x$ before providing to $D_{y}$ . In particular, we found that applying vertical and horizontal blur filters respectively and providing both to $D_{y}$ works well. In the experiments, we apply this technique to all GANs in the Poisson or Poisson-Gaussian noise setting. We discuss the effect with and without this technique in our arXiv [33]. + +# 8. Experiments + +# 8.1. Comprehensive study + +To advance the research on noise robust image generation, we first conducted a comprehensive study, where we compared various models in diverse noise settings (in which we tested 152 conditions in total). + +Data setting. In this comprehensive study, we used CIFAR-10 [42], which contains $60k \times 32$ natural images, partitioned into $50k$ training and $10k$ test images. We selected this dataset because it is commonly used to examine the benchmark performance of generative models (also in the study of AmbientGAN [5]); additionally, the image size is reasonable for a large-scale comparative study. Note that we also conducted experiments using more complex datasets in Section 8.2. With regard to noise, we tested 16 noises, shown in Figure 2. See the caption for their details. + +Compared models. In addition to the models in Figures 3 and 4, we tested several baselines. As comparative GAN models, we examined four models: (1) Standard GAN. (2) P-AmbientGAN (parametric AmbientGAN), a straightforward extension of AmbientGAN, which has a single trainable parameter $\sigma$ . As with SI-NR-GAN-I and SD-NRGAN-I, we construct this model for Gaussian, multiplicative Gaussian, and Poisson noises and generate the noise with $\sigma$ using a reparameterization trick [39]. (3) SI-NRGAN-0 (Figure 3(b)), which has the same generators as SI-NR-GANs but has no constraint on $G_{n}$ . (4) SD-NR-GAN0, which has the same generators as SD-NR-GAN-II and -III but has no constraint on $G_{n}$ . + +We also examined the performance of learning GANs using denoised images (denoiser+GANs). As a denoiser, we investigated four methods. As typical model-based methods, we used (1) GAT-BM3D [52] and (2) CBM3D [11] for Poisson/Poisson-Gaussian noise (Figure 2(M)-(P)) and the other noises, respectively. As discriminative learning + +methods, we used (3) N2V (Noise2Void) [43] and (4) N2N (Noise2Noise) [45]. N2V can be used in the same data setting as ours (i.e., only noisy images are available for training), while N2N requires noisy image pairs for training. We used N2N because it is commonly used as the upper bound of self-supervised learning methods (e.g., N2V). + +Evaluation metrics. We used the Fréchet inception distance (FID) [28] as an evaluation metric because its validity has been demonstrated in large-scale studies on GANs [47, 44], and because the sensitivity to the noise has also been shown [28]. The FID measures the distance between real and generative distributions and a smaller value is better. + +Implementation. We implemented GANs using the ResNet architectures [27] and trained them using a non-saturating GAN loss [21] with a real gradient penalty regularization [57]. In NR-GANs, we used similar architectures for $G_{x}$ and $G_{n}$ . As our aim is to construct a general model applicable to various noises, we examined the performance when the training settings are fixed regardless of the noise. We provide the implementation details in our arXiv [33]. + +Results on signal-independent noises. The upper part of Table 1 summarizes the results on signal-independent noises. In P-AmbientGAN and SI-NR-GANs, we defined the distribution type as Gaussian for all noise settings and analyzed the effect when the noise is beyond assumption. Our main findings are the following: + +(1) Comparison among GAN models. As expected, AmbientGAN tends to achieve the best score owing to the advantageous training setting, while the best SI-NR-GAN shows a competitive performance (with a difference of 3.3 in the worst case). P-AmbientGAN is defeated by SI-NR-GAN-I in all cases. These results indicate that our two-generator model is reasonable when training a noise generator and image generator simultaneously. +(2) Comparison between SI-NR-GANs and denoiser+GANs. The best SI-NR-GAN outperforms the best denoiser+GAN in most cases (except for (G)). In particular, pixel-wise correlated noises (G)(H) are intractable for denoiser+GANs except for N2N+GAN, which uses additional supervision, while SI-NR-GAN-II works well and outperforms the baseline models by a large margin (with a difference of over 100). +(3) Comparison among SI-NR-GANs. SI-NR-GAN-II shows the stable performance across all cases (the difference to the best SI-NR-GAN is within 3.1). SI-NR-GAN-I shows the best or competitive performance in Gaussian (A)-(D) or near Gaussian noise (F); however, the performance degrades when the distribution is beyond assumption (E)(G)(H). + +Results on signal-dependent noises. The lower part of Table 1 lists the results on signal-dependent noises. In P-AmbientGAN and SD-NR-GAN-I, we defined the distri + +
Signal-independent(A) AGF(B) AGV(C) LGF(D) LGV(E) U(F) MIX(G) BG(H) A+G
AmbientGAN†26.728.021.821.728.325.130.340.8
P-AmbientGAN33.9122.238.838.043.032.3164.2269.7
GAN145.8136.038.838.8146.4125.6165.3265.9
SI-NR-GAN-040.739.523.124.338.632.771.6139.7
SI-NR-GAN-I26.727.522.122.440.124.8163.4253.2
SI-NR-GAN-II29.829.722.121.731.626.532.244.0
CBM3D+GAN35.138.437.033.938.930.2136.6169.1
N2V+GAN34.636.722.722.636.432.0163.8247.8
N2N+GAN‡33.536.522.422.032.430.729.548.3
Signal-dependent(I) MGF(J) MGV(K) Α+I(L) A+I(M) PF(N) PV(O) Α+M(P) A+M
AmbientGAN†21.421.821.927.431.332.330.935.3
P-AmbientGAN27.168.739.7137.743.8100.743.094.2
GAN82.777.493.2155.8152.4160.1149.1175.8
SD-NR-GAN-082.759.569.975.171.770.272.069.0
SD-NR-GAN-I22.523.025.3112.430.832.031.470.6
SD-NR-GAN-II24.424.223.328.534.033.934.035.4
SD-NR-GAN-III37.533.433.533.953.155.152.447.2
CBM3D+GAN26.927.827.640.0----
GAT-BM3D+GAN----38.440.238.750.1
N2V+GAN25.826.626.736.437.138.337.541.2
N2N+GAN‡24.926.626.234.136.739.736.439.5
+ +Table 1. Comparison of FID on CIFAR-10. A smaller value is better. We compared 152 conditions. The second and thirteenth rows denote the abbreviations defined in Figure 2. We report the median score across three random seeds. The symbol $\dagger$ indicates that the ground-truth noise models are given. The symbol $\ddagger$ denotes that noisy image pairs are given during the training. The other models are trained using only noisy images (not including pairs) without complete noise information. Bold font indicates the best score except for the models denoted by $\dagger\ddagger$ . + +bution type as multiplicative Gaussian and Poisson in (I)-(L) and (M)-(P), respectively. With regard to a comparison among GAN models and comparison between SD-NR-GANs and denoiser+GANs, similar findings (i.e., the best SD-NR-GAN is comparable with AmbientGAN and outperforms the best denoiser+GAN) are observed; therefore, herein we discuss a comparison among SD-NR-GANs. SD-NR-GAN-II and -III stability work better than SD-NR-GAN-0. Among the two, SD-NR-GAN-II, which has a stronger assumption, outperforms SD-NR-GAN-III in all cases (with a difference of over 5.4). SD-NR-GAN-I shows the best or competitive performance when noises are within or a little over assumption (I)-(K)(M)-(O); however, when the unexpected noise increases (L)(P), the performance degrades. + +Summary. Through the comprehensive study, we confirm the following: (1) NR-GANs work reasonably well comparing to other GAN models and denoiser+GANs. (2) Weakly constrained NR-GANs stability work well across various settings, while (3) strongly constrained NR-GANs show a better performance when noise is within assumption. $^{7}$ + +
Signal-independentLSUN BEDROOMFFHQ
(A) AGF(B) AGV(G) BG(A) AGF
AmbientGAN†19.425.09.728.3
GAN98.9100.9125.381.6
SI-NR-GAN-I13.814.2128.235.7
SI-NR-GAN-II15.716.810.837.1
Signal-dependentLSUN BEDROOMFFHQ
(I) MGF(L) A+I(M) PF(I) MGF
AmbientGAN†11.719.232.618.7
GAN54.0109.8121.748.0
SD-NR-GAN-I11.655.423.326.5
SD-NR-GAN-II21.715.042.849.0
SD-NR-GAN-III50.753.1138.637.2
+ +# 8.2. Evaluation on complex datasets + +Inspired by the resent large-scale study on GANs [44], we also examined the performance on more complex datasets. Referring to this study, we used the $128 \times 128$ versions of LSUN BEDROOM [74] and FFHQ [37].8 LSUN BEDROOM contains about 3 million bedroom images, randomly split into training and test sets in the ratio of 99 to 1. FFHQ contains $70k$ face images, partitioned into $60k$ training and $10k$ test images. As these datasets are calculationally demanding, we selected six noises for LSUN BEDROOM and two noises for FFHQ. We provide the implementation details in our arXiv [33]. + +Table 2 list the results. Just like the CIFAR-10 results, we found that the best NR-GAN outperforms standard GAN and its performance is closer to that of AmbientGAN. In contrast, differently from the CIFAR-10 results, we found that in complex datasets, some weakly constrained SD-NR-GANs suffer from learning difficulty (e.g., SD-NR-GANIII in LSUN BEDROOM (M)). This is undesirable but understandable because in complex datasets it is highly challenging to isolate noise from the dependent signal without an explicit knowledge about their dependency. This is related to GAN training dynamics and addressing this limitation is our future work. As reference, we provide qualitative results in our arXiv [33]. + +# 8.3. Application to image denoising + +NR-GANs can generate an image and noise, respectively. By utilizing this, we create clean and noisy image pairs synthetically and use them for learning a denoiser. We call this method GeneratedNoise2GeneratedClean + +Table 2. Comparison of FID on LSUN BEDROOM and FFHQ. A smaller value is better. Because the training is time-consuming, experiments were run once. The notation is the same as that in Table 1. + +
LSUN BEDROOMFFHQLSUN BEDROOMFFHQ
(A) AGF(B) AGV(G) BG(A) AGF(I) MGF(L) A+I(M) PF(I) MGF
N2C‡32.9033.0629.6731.9336.7032.2631.7736.37
N2N‡32.3032.2328.7631.3335.9931.3630.5535.88
N2V31.9831.8520.7330.9535.3731.0930.3034.95
N2S31.7931.7020.7430.7435.1230.9430.1934.67
GN2GC32.3632.4726.6131.3436.0131.6231.0835.69
CBM3D31.4131.5420.7530.2933.6030.43-32.73
GAT-BM3D------29.80-
+ +Table 3. Comparison of PSNR on LSUN BEDROOM and FFHQ. A larger value is better. We report the median score across three random seeds. The symbols $\sharp \ddagger$ indicate that the models are trained in advantageous conditions ( $\sharp$ clean target images and $\ddagger$ noisy image pairs are given, respectively). The other models are trained using only noisy images (not including pairs). Bold font indicates the best score except for the models denoted by $\sharp \ddagger$ . + +(GN2GC). In particular, we employed the generators that achieve the best FID in Table 2 (denoted by bold font). $^9$ Note that NR-GANs are trained only using noisy images; therefore, GN2GC can be used in the same data setting as self-supervised learning methods (N2V [43] and N2S [3]). We used the same training and test sets used in Section 8.2. We present the implementation details in our arXiv [33]. + +We summarize the results in Table 3. We found that GN2GC not only outperforms the state-of-the-art self-supervised learning methods (N2V and N2S) but also is comparable with N2N, which learns in advantageous conditions. The requirement for pre-training GANs could narrow the applications of GN2GC; however, we believe that its potential for image denoising would increase along with rapid progress of GANs. We show examples of denoised images in our arXiv [33]. + +# 9. Conclusion + +To achieve noise robust image generation without full knowledge of the noise, we developed a new family of GANs called NR-GANs which learn a noise generator with a clean image generator, while imposing a distribution or transformation constraint on the noise generator. In particular, we introduced five variants: two SI-NR-GANs and three SD-NR-GANs, which have different assumptions. We examined the effectiveness and limitations of NR-GANs on three benchmark datasets and demonstrated the applicability in image denoising. In the future, we hope that our findings facilitate the construction of a generative model in a real-world scenario where only noisy images are available. + +Acknowledgement. We thank Naoya Fushishita, Takayuki Hara, and Atsuhiro Noguchi for helpful discussions. This work was partially supported by JST CREST Grant Number JPMJCR1403, and partially supported by JSPS KAKENHI Grant Number JP19H01115. + +# References + +[1] Josue Anaya and Adrian Barbu. RENOIR-A dataset for real low-light image noise reduction. J. Vis. Commun. Image Represent., 51:144-154, 2018. +[2] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein generative adversarial networks. In ICML, 2017. +[3] Joshua Batson and Loic Royer. Noise2Self: Blind denoising by self-supervision. In ICML, 2019. +[4] Marc G. Bellemare, Ivo Danihelka, Will Dabney, Shakir Mohamed, Balaji Lakshminarayanan, Stephan Hoyer, and Rémi Munos. The Cramer distance as a solution to biased Wasserstein gradients. arXiv preprint arXiv:1705.10743, 2017. +[5] Ashish Bora, Eric Price, and Alexandros G. Dimakis. AmbientGAN: Generative models from lossy measurements. In ICLR, 2018. +[6] Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale GAN training for high fidelity natural image synthesis. In ICLR, 2019. +[7] Antoni Buades, Bartomeu Coll, and Jean-Michel Morel. A non-local algorithm for image denoising. In CVPR, 2005. +[8] Jingwen Chen, Jiawei Chen, Hongyang Chao, and Ming Yang. Image blind denoising with generative adversarial network based noise modeling. In CVPR, 2018. +[9] Ting Chen, Mario Lucic, Neil Houlsby, and Sylvain Gelly. On self modulation for generative adversarial networks. In ICLR, 2019. +[10] Ting Chen, Xiaohua Zhai, Marvin Ritter, Mario Lucic, and Neil Houlsby. Self-supervised GANs via auxiliary rotation loss. In CVPR, 2019. +[11] Kostadin Dabov, Alessandro Foi, Vladimir Katkovnik, and Karen Egiazarian. Color image denoising via sparse 3D collaborative filtering with grouping constraint in luminance-chrominance space. In ICIP, 2007. +[12] Kostadin Dabov, Alessandro Foi, Vladimir Katkovnik, and Karen Egiazarian. Image denoising by sparse 3-D transform-domain collaborative filtering. IEEE Trans. Image Process., 16(8):2080-2095, 2007. +[13] Steven Diamond, Vincent Sitzmann, Stephen Boyd, Gordon Wetzstein, and Felix Heide. Dirty pixels: Optimizing image classification architectures for raw sensor data. arXiv preprint arXiv:1701.06487, 2017. +[14] Laurent Dinh, David Krueger, and Yoshua Bengio. NICE: Non-linear independent components estimation. In ICLR Workshop, 2015. +[15] Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real NVP. In ICLR, 2017. +[16] Weisheng Dong, Lei Zhang, Guangming Shi, and Xin Li. Nonlocally centralized sparse representation for image restoration. IEEE Trans. Image Process., 22(4):1620-1630, 2012. +[17] Michael Elad and Michal Aharon. Image denoising via sparse and redundant representations over learned dictionaries. IEEE Trans. Image Process., 15(12):3736-3745, 2006. +[18] Aritra Ghosh, Himanshu Kumar, and P.S. Sastry. Robust loss functions under label noise for deep neural networks. In AAAI, 2017. + +[19] Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. In ICLR, 2018. +[20] Jacob Goldberger and Ehud Ben-Reuven. Training deep neural-networks using a noise adaptation layer. In ICLR, 2017. +[21] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, 2014. +[22] Shuhang Gu, Lei Zhang, Wangmeng Zuo, and Xiangchu Feng. Weighted nuclear norm minimization with application to image denoising. In CVPR, 2014. +[23] Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. Improved training of Wasserstein GANs. In NIPS, 2017. +[24] Shi Guo, Zifei Yan, Kai Zhang, Wangmeng Zuo, and Lei Zhang. Toward convolutional blind denoising of real photographs. In CVPR, 2019. +[25] Bo Han, Quanming Yao, Xingrui Yu, Gang Niu, Miao Xu, Weihua Hu, Ivor W. Tsang, and Masashi Sugiyama. Co-teaching: Robust training of deep neural networks with extremely noisy labels. In NeurIPS, 2018. +[26] Samuel W. Hasinoff. Photon, Poisson noise. Computer Vision: A Reference Guide, pages 608-610, 2014. +[27] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. +[28] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, Günter Klambauer, and Sepp Hochreiter. GANs trained by a two time-scale update rule converge to a Nash equilibrium. In NIPS, 2017. +[29] Viren Jain and Sebastian Seung. Natural image denoising with convolutional networks. In NIPS, 2009. +[30] Lu Jiang, Zhengyuan Zhou, Thomas Leung, Li-Jia Li, and Li Fei-Fei. MentorNet: Learning data-driven curriculum for very deep neural networks on corrupted labels. In ICML, 2018. +[31] Ishan Jindal, Matthew Nokleby, and Xuewen Chen. Learning deep networks from noisy labels with dropout regularization. In ICDM, 2016. +[32] Takuhiro Kaneko and Tatsuya Harada. Label-noise robust multi-domain image-to-image translation. arXiv preprint arXiv:1905.02185, 2019. +[33] Takuhiro Kaneko and Tatsuya Harada. Noise robust generative adversarial networks. arXiv preprint arXiv:1911.11776, 2019. +[34] Takuhiro Kaneko, Yoshitaka Ushiku, and Tatsuya Harada. Class-distinct and class-mutual image generation with GANs. In BMVC, 2019. +[35] Takuhiro Kaneko, Yoshitaka Ushiku, and Tatsuya Harada. Label-noise robust generative adversarial networks. In CVPR, 2019. +[36] Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of GANs for improved quality, stability, and variation. In ICLR, 2018. +[37] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In CVPR, 2019. + +[38] Diederik P. Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible $1 \times 1$ convolutions. In NeurIPS, 2018. +[39] Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. In ICLR, 2014. +[40] Naveen Kodali, Jacob Abernethy, James Hays, and Zsolt Kira. On convergence and stability of GANs. arXiv preprint arXiv:1705.07215, 2017. +[41] Alexander Kolesnikov, Xiaohua Zhai, and Lucas Beyer. Revisiting self-supervised visual representation learning. In CVPR, 2019. +[42] Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, 2009. +[43] Alexander Krull, Tim-Oliver Buchholz, and Florian Jug. Noise2Void - Learning denoising from single noisy images. In CVPR, 2019. +[44] Karol Kurach, Mario Lucic, Xiaohua Zhai, Marcin Michalski, and Sylvain Gelly. A large-scale study on regularization and normalization in GANs. In ICML, 2019. +[45] Jaakko Lehtinen, Jacob Munkberg, Jon Hasselgren, Samuli Laine, Tero Karras, Miika Aittala, and Timo Aila. Noise2Noise: Learning image restoration without clean data. In ICML, 2018. +[46] Jae Hyun Lim and Jong Chul Ye. Geometric GAN. arXiv preprint arXiv:1705.02894, 2017. +[47] Mario Lucic, Karol Kurach, Marcin Michalski, Sylvain Gelly, and Olivier Bousquet. Are GANs created equal? A large-scale study. In NeurIPS, 2018. +[48] Mario Lucic, Michael Tschannen, Marvin Ritter, Xiaohua Zhai, Olivier Bachem, and Sylvain Gelly. High-fidelity image generation with fewer labels. In ICML, 2019. +[49] Florian Luisier, Thierry Blu, and Michael Unser. Image denoising in mixed Poisson-Gaussian noise. IEEE Trans. Image Process., 20(3):696-708, 2010. +[50] Julien Mairal, Francis Bach, Jean Ponce, Guillermo Sapiro, and Andrew Zisserman. Non-local sparse models for image restoration. In ICCV, 2009. +[51] Julien Mairal, Michael Elad, and Guillermo Sapiro. Sparse representation for color image restoration. IEEE Trans. Image Process., 17(1):53-69, 2007. +[52] Markku Makitalo and Alessandro Foi. Optimal inversion of the generalized Anscombe transformation for Poisson-Gaussian noise. IEEE Trans. Image Process., 22(1):91-103, 2012. +[53] Eran Malach and Shai Shalev-Shwartz. Decoupling "when to update" from "how to update". In NIPS, 2017. +[54] Xudong Mao, Qing Li, Haoran Xie, Raymond Y.K. Lau, Zhen Wang, and Stephen Paul Smolley. Least squares generative adversarial networks. In ICCV, 2017. +[55] Xiaojiao Mao, Chunhua Shen, and Yu-Bin Yang. Image restoration using very deep convolutional encoder-decoder networks with symmetric skip connections. In NIPS, 2016. +[56] Jacob Menick and Nal Kalchbrenner. Generating high fidelity images with subscale pixel networks and multidimensional upscaling. In ICLR, 2019. +[57] Lars Mescheder, Andreas Geiger, and Sebastian Nowozin. Which training methods for GANs do actually converge? In ICML, 2018. + +[58] Takeru Miyato, Toshiki Kataoka, Masanori Koyama, and Yuichi Yoshida. Spectral normalization for generative adversarial networks. In ICLR, 2018. +[59] Giorgio Patrini, Alessandro Rozza, Aditya Krishna Menon, Richard Nock, and Lizhen Qu. Making deep neural networks robust to label noise: A loss correction approach. In CVPR, 2017. +[60] Tobias Plotz and Stefan Roth. Benchmarking denoising algorithms with real photographs. In CVPR, 2017. +[61] Ali Razavi, Aïron van den Oord, and Oriol Vinyals. Generating diverse high-fidelity images with VQ-VAE-2. In NeurIPS, 2019. +[62] Scott Reed, Honglak Lee, Dragomir Anguelov, Christian Szegedy, Dumitru Erhan, and Andrew Rabinovich. Training deep neural networks on noisy labels with bootstrapping. In ICLR, 2015. +[63] Mengye Ren, Wenyuan Zeng, Bin Yang, and Raquel Urtasun. Learning to reweight examples for robust deep learning. In ICML, 2018. +[64] Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In ICML, 2014. +[65] Tim Salimans, Han Zhang, Alec Radford, and Dimitris Metaxas. Improving GANs using optimal transport. In ICLR, 2018. +[66] Sainbayar Sukhbaatar, Joan Bruna, Manohar Paluri, Lubomir Bourdev, and Rob Fergus. Training convolutional networks with noisy labels. In ICLR Workshop, 2015. +[67] Ying Tai, Jian Yang, Xiaoming Liu, and Chunyan Xu. MemNet: A persistent memory network for image restoration. In ICCV, 2017. +[68] Daiki Tanaka, Daiki Ikami, Toshihiko Yamasaki, and Kiyoharu Aizawa. Joint optimization framework for learning with noisy labels. In CVPR, 2018. +[69] Kiran Koshy Thekumparampil, Ashish Khetan, Zinan Lin, and Sewoong Oh. Robustness of conditional GANs to noisy labels. In NeurIPS, 2018. +[70] Aäron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. In ICML, 2016. +[71] Aäron van den Oord, Oriol Vinyals, and Koray Kavukcuoglu. Neural discrete representation learning. In NIPS, 2017. +[72] Bing Xu, Junfei Zhang, Rui Wang, Kun Xu, Yong-Liang Yang, Chuan Li, and Rui Tang. Adversarial Monte Carlo denoising with conditioned auxiliary feature modulation. ACM Trans. Graph., 38(6):1-12, 2019. +[73] Dingdong Yang, Seunghoon Hong, Yunseok Jang, Tianchen Zhao, and Honglak Lee. Diversity-sensitive conditional generative adversarial networks. In ICLR, 2019. +[74] 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. +[75] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In ICLR, 2017. + +[76] Han Zhang, Ian Goodfellow, Dimitris Metaxas, and Augustus Odena. Self-attention generative adversarial networks. In ICML, 2019. +[77] 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. +[78] Kai Zhang, Wangmeng Zuo, and Lei Zhang. FFDNet: Toward a fast and flexible solution for CNN-based image denoising. IEEE Trans. Image Process., 27(9):4608-4622, 2018. +[79] Richard Zhang. Making convolutional networks shift-invariant again. In ICML, 2019. +[80] Zhilu Zhang and Mert R. Sabuncu. Generalized cross entropy loss for training deep neural networks with noisy labels. In NeurIPS, 2018. +[81] Qian Zhao, Deyu Meng, Zongben Xu, Wangmeng Zuo, and Lei Zhang. Robust principal component analysis with complex noise. In ICML, 2014. +[82] Stephan Zheng, Yang Song, Thomas Leung, and Ian Goodfellow. Improving the robustness of deep neural networks via stability training. In CVPR, 2016. +[83] Matthias Zwicker, Wojciech Jarosz, Jaakko Lehtinen, Bochang Moon, Ravi Ramamoorthi, Fabrice Rousselle, Pradeep Sen, Cyril Soler, and Sung-Eui Yoon. Recent advances in adaptive sampling and reconstruction for Monte Carlo rendering. Comput. Graph. Forum, 34(2):667-681, 2015. \ No newline at end of file diff --git a/noiserobustgenerativeadversarialnetworks/images.zip b/noiserobustgenerativeadversarialnetworks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b1831c9f7eeb2f621aa3494c9da750ba2b2b6da5 --- /dev/null +++ b/noiserobustgenerativeadversarialnetworks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4da8824c8bc54986998c134a8ba3003747b11cf1c8c0b110e71958a645b3ce2 +size 472868 diff --git a/noiserobustgenerativeadversarialnetworks/layout.json b/noiserobustgenerativeadversarialnetworks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..38c366388fa850d2d0003ace19fe0b1e31da1f3a --- /dev/null +++ b/noiserobustgenerativeadversarialnetworks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:498f66941154001687011775720fba89747e9e0ed3463f0f85f4baea879b7187 +size 541488 diff --git a/noisier2noiselearningtodenoisefromunpairednoisydata/d9405594-68e8-4730-8872-05e6ff9fb060_content_list.json b/noisier2noiselearningtodenoisefromunpairednoisydata/d9405594-68e8-4730-8872-05e6ff9fb060_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..059f1efffab7e0ab46ff6f8b635a9638bef62fb1 --- /dev/null +++ b/noisier2noiselearningtodenoisefromunpairednoisydata/d9405594-68e8-4730-8872-05e6ff9fb060_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9910df36c3336fc988c3259539f700fe9ae8e7ea14b339e1545b6bee14e3208 +size 69637 diff --git a/noisier2noiselearningtodenoisefromunpairednoisydata/d9405594-68e8-4730-8872-05e6ff9fb060_model.json b/noisier2noiselearningtodenoisefromunpairednoisydata/d9405594-68e8-4730-8872-05e6ff9fb060_model.json new file mode 100644 index 0000000000000000000000000000000000000000..3fa5f8fd68cc75462cd874c40342571c6aeeeb79 --- /dev/null +++ b/noisier2noiselearningtodenoisefromunpairednoisydata/d9405594-68e8-4730-8872-05e6ff9fb060_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2dedc901c2d4ba83f448bb07b2ec85416f3817e1f7ab570b50678d85a1b15a07 +size 79798 diff --git a/noisier2noiselearningtodenoisefromunpairednoisydata/d9405594-68e8-4730-8872-05e6ff9fb060_origin.pdf b/noisier2noiselearningtodenoisefromunpairednoisydata/d9405594-68e8-4730-8872-05e6ff9fb060_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5afeb59b1804ef0b7e404133f5b1e7ec29a4636e --- /dev/null +++ b/noisier2noiselearningtodenoisefromunpairednoisydata/d9405594-68e8-4730-8872-05e6ff9fb060_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84c88b6e204345890f9714493751c8f190174d3f52bace470ece26a0b7c98678 +size 12142642 diff --git a/noisier2noiselearningtodenoisefromunpairednoisydata/full.md b/noisier2noiselearningtodenoisefromunpairednoisydata/full.md new file mode 100644 index 0000000000000000000000000000000000000000..dc5725efeea10fa89e07247fa7f1d4cad9db233f --- /dev/null +++ b/noisier2noiselearningtodenoisefromunpairednoisydata/full.md @@ -0,0 +1,312 @@ +# Noisier2Noise: Learning to Denoise from Unpaired Noisy Data + +Nick Moran, Dan Schmidt, Yu Zhong, Patrick Coady +Algorithmic Systems Group, Analog Devices +125 Summer Street, Boston MA + +{nicholas.moran,daniel.schmidt,yu.zhong,patrick.coady}@analog.com + +# Abstract + +We present a method for training a neural network to perform image denoising without access to clean training examples or access to paired noisy training examples. Our method requires only a single noisy realization of each training example and a statistical model of the noise distribution, and is applicable to a wide variety of noise models, including spatially structured noise. Our model produces results which are competitive with other learned methods which require richer training data, and outperforms traditional non-learned denoising methods. We present derivations of our method for arbitrary additive noise, an improvement specific to Gaussian additive noise, and an extension to multiplicative Bernoulli noise. + +# 1. Introduction + +Convolutional neural networks have proven to be powerful tools for many image processing tasks, including denoising[13], inpainting[18], and domain translation[5]. Such networks are typically trained using pairs of inputs and ground-truth target outputs, but there also exist training algorithms which remove the need for ground-truth targets. In the standard formulation of the image denoising task, a network takes as input a noisy image, and produces an estimate of the corresponding clean image. A loss function compares this estimate to the true clean image, providing a supervised learning signal which is used to update the weights of the network. However, there exist many domains in which it is difficult or impossible to collect true clean images, due to limitations of imaging technology, limited illumination, or a variety of other reasons. In such cases, we would like to be able to train a network to perform denoising without it ever having access to a clean image. + +We propose a training algorithm which requires only a single noisy realization of each training image, no clean images, and a statistical model of the noise distribution. Our method builds on the Noise2Noise algorithm [11], which also removes the requirement of clean training targets, but + +![](images/949f9068d848f9c196a4bbb50588c9b47a14f9ef9ddb0fe1cb6fba4300802bd3.jpg) +Figure 1. Examples of our method (right side) removing Gaussian noise (left side) with $\sigma = 0.05$ (top), 0.1 (middle), and 0.2 (bottom). $\sigma$ values are relative to a $[0,1]$ scale of pixel intensities. + +requires two independent noisy realizations of each training image. At a high level, our method is to generate a synthetic noise sample from our statistical model, add it to the already noisy image, and ask the network to predict the original noisy image from this doubly-noisy image. Intuitively, the network will be unable to distinguish the original noise from the additional synthetic noise, and can minimize its loss by predicting that half of the observed noise at each pixel was present in the source image, and the other half was added synthetically. Thus, it will learn to output an image which is halfway between the doubly-noisy input and the unseen true clean image. We can then obtain an estimate of the clean image with a simple manipulation. + +# 2. Related Work + +Neural networks have shown promising results in image denoising for many years. In [16], the authors propose a denoising autoencoder which takes as input a noisy image and is trained to reproduce a known clean version of that image. This need for clean training targets is shared by many other neural denoising techniques. [19] demonstrate the ability of a neural network to remove a variety of noise distributions by employing residual learning. + +There also exist a variety of hand-crafted algorithms for noise removal that do not rely on learning. These have the advantage that they do not require any training corpus, but often require significant expertise to adapt them to a given noise distribution. [2] use a block-matching algorithm to perform denoising given a known noise distribution. [4] and [12] propose algorithms for denoising under more complex, spatially-correlated noise distributions. + +While there exist many domains for which pairs of clean and noisy images are readily obtainable, this is not always the case. For settings in which it is only possible to obtain noisy images, the authors of [11] propose to replace the clean target with a second, independent noisy realization of the same image. They observe that adding mean-preserving noise to the targets does not fundamentally change the learning task given a mean-seeking loss function. They demonstrate that networks trained in this manner are able to match the performance of those trained with clean targets. The CycleGAN [20] algorithm can learn to perform denoising as a special case of image-to-image translation. It requires both clean and noisy images, but does not need any pairing between the two sets. The authors of Deep Image Prior [15] demonstrate that denoising can be performed without any training data, using only the inductive bias inherent in the convolutional neural network architecture. + +Although it is often easier to obtain multiple noisy realizations than to obtain paired clean and noisy realizations, there still exist scenarios in which it is simply not possible to collect multiple views of the exact same scene, noisy or clean. Both [8] and [1] propose to learn to perform denoising using only a single noisy realization of each training sample. They achieve this through self-supervision: networks are trained to predict the values of pixels given the values of their neighbors. Because the noise is spatially uncorrelated, the networks are unable to predict the noise component, and thus minimize their loss by approximating the true clean value of the target pixels. However, this self-supervision approach is unsuitable for spatially correlated noise; in such a setting, this correlation will enable the network to predict the structured component of the noise, thereby producing output that still contains this component. These methods are further improved by [10] and [9], which integrate information from a noise model to produce higher-quality reconstructions. + +Our method of augmenting training images with additional noise is similar to the method of [6], who propose to learn to a network which can be iteratively applied to a noisy image, each time moving it closer to the manifold of clean images. [17] also make use of additional synthetic noise for their network inputs, but propose to train a new network for every image to be denoised. + +Our work builds most directly upon the approaches of Noise2Noise, Noise2Void and Noise2Self. Like Noise2Void and Noise2Self, we remove the requirement of paired noisy training data (as is needed in Noise2Noise). We also allow spatially correlated noise models, which are problematic for Noise2Void and Noise2Self. On the other hand, we require the ability to sample from the noise distribution, which the three aforementioned methods do not. + +The main contributions of our paper are as follows: + +- We present a method for training a neural denoiser with access to only single noisy realizations of training samples. +- Our method is applicable to both pixel-wise i.i.d. white noise and spatially correlated noise. +- Our method produces results close in quality to those produced by methods that require either clean training images or paired noisy training images. + +# 3. Method + +We first present an intuitive motivation of our approach, and then present a mathematical justification. + +# 3.1. Motivation + +Let $\mathcal{A}$ be a known random distribution, and $M$ and $N$ be two random variables independently drawn from $\mathcal{A}$ . We observe their sum, $Z = M + N$ , and are asked to predict $N$ . Clearly, this is not possible to do perfectly, because we have no way to distinguish the contributions of $N$ and $M$ . If we will pay a cost proportional to the square of our error, what should our prediction be to minimize our expected cost? + +It is well known that the squared error cost function is minimized by the expected value of the target. We should therefore let our prediction be $\mathbb{E}[N|Z]$ , which by symmetry is simply $\frac{Z}{2}$ . To see why, note that any estimate of $N$ and the corresponding implicit estimate of $M$ , there is an alternative estimate which switches the two. Because $N$ and $M$ are both independently drawn from $A$ , both of these possible estimates of $N$ are equally probably. The mean of these two estimates is $\frac{Z}{2}$ . + +This is the key insight of our method. Given the sum of two i.i.d. noise samples, the best estimate of one of them is half of their sum. Let us now consider a more complicated scenario in which we have an unknown quantity $X$ , and we observe $X + Z$ and try to predict $X + N$ . We argue in + +![](images/cacd4e8d1f81f52b86368b40ebdf8ecfb5326665cb59be113d01f0ae35840fc3.jpg) + +![](images/fea2c2e8f279d0d2ce9cb92b114f4e18bca5669bc9c4330ba8acafc140edb1fd.jpg) + +![](images/ef3c22b7d03f7f84e0372867d4b5ed9e9150b0ec4c662f7d894bd334a73537e2.jpg) + +![](images/f205aad9ddcd898b01f64b44447a687a9212d46d57ec1823e28a2e4b7878377e.jpg) +Figure 2. The steps of our method with $\sigma = 0.1$ . Top Row: Original clean image (unseen by our method), a singly-noisy realization (which is our training target), a doubly-noisy realization (which is the input to our network). Bottom Row: The raw output of our network, the implicit estimate of the remaining noise, and the final reconstruction after our correction step. + +![](images/76e859a5fb7926f7739f052a229464787538786a9588d5429c7a4f5889d0858a.jpg) + +![](images/b1263f824f3f9dea16f129a712ead43cbe1d3db8c01c8c20b37b1496273b3174.jpg) + +the following section that our above insight still holds even with the addition of $X$ : our best estimate of $X + N$ will be $X + \frac{Z}{2}$ . Critically, this value is halfway between $X + Z$ and $X$ . Thus, we can use it to estimate $X$ from $X + Z$ . In the context of image denoising, this means that we can recover an estimate of a clean image given a noisy one by an analogous process in which $X + N$ is the original noisy image, and $M$ is a synthetic sample from the same noise distribution. + +# 3.2. Noisier2Noise + +We consider a scenario in which we wish to train a neural network to perform image denoising under a fixed, known noise model. Let $\mathcal{X}$ be the distribution of natural images, and let $X\sim \mathcal{X}$ . We are unable to observe $X$ , but are able to capture a single noisy realization $Y\triangleq X + N$ , where $N\sim \mathcal{A}$ and $\mathcal{A}$ is a known noise distribution. Because $\mathcal{A}$ is known, we can draw an additional synthetic noise sample $M\sim \mathcal{A}$ . + +Our training procedure is as follows. Given $Y$ , we create a noisier version, $Z \triangleq Y + M = X + N + M$ . We then train the network to predict $Y$ given $Z$ as input, using a pixel-wise $L_{2}$ loss function and standard stochastic gradient descent. Let $f(\cdot; \theta)$ be the neural network parameterized by $\theta$ . Our training process seeks to perform the following minimization: + +$$ +\min _ {\theta} \mathbb {E} _ {Z} [ \| f (Z; \theta) - Y \| _ {2} ] \tag {1} +$$ + +Note that the network never observes $N$ or $M$ in isolation. Thus, while the true minimizer of the loss function + +would be to simply subtract $M$ from the input, $Z$ , this is not possible. The best achievable strategy is instead to predict $\mathbb{E}[Y|Z]$ . + +We now argue that it is possible to extract an estimate of the clean image, $\mathbb{E}[X|Z]$ , from an estimate of $\mathbb{E}[Y|Z]$ . We first note that + +$$ +\mathbb {E} [ Y | Z ] = \mathbb {E} [ X | Z ] + \mathbb {E} [ N | Z ]. \tag {2} +$$ + +Recall that $M$ and $N$ are i.i.d. and therefore and thus have the same expectation given $\mathbf{Z}$ , $\mathbb{E}[M|Z] = \mathbb{E}[N|Z]$ . From this we derive that + +$$ +\begin{array}{l} 2 \mathbb {E} [ Y | Z ] = \mathbb {E} [ X | Z ] + (\mathbb {E} [ X | Z ] + \mathbb {E} [ N | Z ] + \mathbb {E} [ M | Z ]) \\ = \mathbb {E} [ X | Z ] + \mathbb {E} [ X + N + M | Z ] \\ = \mathbb {E} [ X | Z ] + Z. \tag {3} \\ \end{array} +$$ + +In other words, we have that $\mathbb{E}[X|Z] = 2\mathbb{E}[Y|Z] - Z$ . We can therefore recover an estimate of the clean image by doubling our network's output and subtracting its input. + +Intuitively, our network learns to output an image halfway between its doubly-noisy input and its best estimate of the clean image. By taking a second step in the direction from its input to this output, we can generate an estimate of the clean image. + +We note that, in practice, there are many plausible clean images which could generate a particular noisy realization. Thus, $\mathbb{E}[X|Z]$ will not be an exact reconstruction of the true clean image, but will instead be the mean of this set of plausible clean images. This is the same uncertainty faced in a setting with clean training targets. + +Figure 2 shows the steps of our method at inference time. We begin with a noisy input image, $y$ (top center), and augment it with additional noise to obtain $z$ (top right). We then compute $f(z;\theta)$ to obtain our uncorrected output (bottom left). We next (implicitly) compute $z - f(z;\theta)$ (bottom center) to obtain a estimate of the noise remaining in $f(z;\theta)$ . Subtracting this from $f(z;\theta)$ yields our final reconstruction (bottom right). Note that without our correction step, the raw output of the network is still noisy. Indeed, we should expect it to have noise with a standard deviation of $\frac{\sqrt{2}\sigma}{2}$ . + +# 3.3. Improvements + +One complication of our method is that our network is trained to take as input doubly-noisy images, and we therefore need to add this extra noise even during inference, resulting in the network having an artificially poor view of the noisy image. It may be desirable to reduce this effect, and feed the network an input that is closer to the singly-noisy image. We explore two options for accomplishing this. + +The first is to simply feed the network unaugmented noisy images at test time, with the hope that it will be somewhat robust to this shift in input distribution. This is plausible because, during training, the network will see local patches of images which happen to have relatively small noise values, simply due to chance. It is not unreasonable to imagine that the network will also be capable of operating on an image in which all pixels have a smaller than normal noise magnitude. While this approach is not a principled one, we find that it is able to produce PSNR improvements over the base algorithm in practice. However, the visual quality of results from this method tend to be lower, as they appear overly smooth and lack fine detail. This approach may be well-suited for domains in which mean squared error is truly the important metric, but not in domains where visual quality is paramount. It is important to note that when feeding the network an unaugmented input, we still must perform the same correction step as in the standard method. The network still tends to produce an output which is approximately halfway between its input and the clean target, even though its input is now less noisy than those seen during training. + +The second option is to note that we need not add noise of the same intensity as the natural noise during training. For example, let our noise distribution $\mathcal{A}$ have standard deviation $\sigma_{\mathcal{A}}$ . In our standard approach, we sample our synthetic noise $M \sim \mathcal{A}$ . Instead, we could sample $M \sim \mathcal{B}$ , where $\sigma_{\mathcal{B}} < \sigma_{\mathcal{A}}$ , thus reducing the additional distortion caused by our synthetic noise, and affording the network a clearer view of the unaugmented image. Changing the distribution from which $M$ is sampled also changes the value of $\mathbb{E}[Y|Z]$ , and thus induces a change in our correction step. The derivation of the proper correction depends on the specific choice of $\mathcal{A}$ and $\mathcal{B}$ . Here we derive it for zero-mean + +Gaussians $\mathcal{A}$ and $\mathcal{B}$ with $\sigma_{\mathcal{B}} = \alpha \sigma_{\mathcal{A}}$ + +We will make use of the following lemma: + +Lemma 3.1. Let $N \sim \mathcal{A}$ and $M \sim \mathcal{B}$ , where $\mathcal{A}$ and $\mathcal{B}$ are Gaussians with zero mean, and $\sigma_{\mathcal{B}} = \alpha \sigma_{\mathcal{A}}$ . Further let $X \sim \mathcal{X}$ , $Y \triangleq X + N$ and $Z \triangleq X + N + M$ . Then $\mathbb{E}[M|Z] = \alpha^2 \mathbb{E}[N|Z]$ . + +We first show that $\mathbb{E}[M|Z,X] = \alpha^2\mathbb{E}[N|Z,X]$ + +$$ +\begin{array}{l} \mathbb {P} (N = n | Z = z, X = x) \propto \mathbb {P} (N = n) \mathbb {P} (M = z - x - n) \\ \propto \exp \left\{- \frac {n ^ {2}}{2 \sigma^ {2}} \right\} \exp \left\{- \frac {(z - x - n) ^ {2}}{2 \alpha^ {2} \sigma^ {2}} \right\} \\ \propto \exp \left\{- \frac {\alpha^ {2} n ^ {2} + (z - x - n) ^ {2}}{2 \alpha^ {2} \sigma^ {2}} \right\} \tag {4} \\ \end{array} +$$ + +This distribution is symmetrical, and has mean $\frac{1}{1 + \alpha^2} (z - x)$ . By a similar calculation, $\mathbb{P}(M|Z = z,X = x)$ has mean $\frac{\alpha^2}{1 + \alpha^2} (z - x)$ , thus $\mathbb{E}[M|Z = z,X = x] = \alpha^2\mathbb{E}[N|Z = z,X = x]$ . This is true independent of $x$ and $z$ , and thus we have $\mathbb{E}[M|Z] = \alpha^2\mathbb{E}[N|Z]$ . + +To recover $\mathbb{E}[X|Z]$ from an estimate of $\mathbb{E}[Y|Z]$ , we first note that + +$$ +\begin{array}{l} (1 + \alpha^ {2}) \mathbb {E} [ Y | Z ] \\ = \mathbb {E} [ X | Z ] + \mathbb {E} [ N | Z ] + \alpha^ {2} \mathbb {E} [ X | Z ] + \alpha^ {2} \mathbb {E} [ N | Z ] \\ = \alpha^ {2} \mathbb {E} [ X | Z ] + (\mathbb {E} [ X | Z ] + \mathbb {E} [ N | Z ] + \mathbb {E} [ M | Z ]) \\ = \alpha^ {2} \mathbb {E} [ X | Z ] + Z. \tag {5} \\ \end{array} +$$ + +Therefore, + +$$ +\mathbb {E} [ X | Z ] = \frac {(1 + \alpha^ {2}) \mathbb {E} [ Y | Z ] - Z}{\alpha^ {2}}. \tag {6} +$$ + +When $\alpha = 1$ , this reduces to $\mathbb{E}[X|Z] = 2\mathbb{E}[Y|Z] - Z$ , exactly the formula derived in the previous section. + +We note that the optimal value of $\alpha$ may depend on the dataset and the noise model, and may be difficult or impossible to derive in the absence of clean validation data. Intuitively, a smaller $\alpha$ affords the network a clearer view of the original noisy image. However, during the correction step, the output of the network is multiplied by $\alpha^{-2}$ , so as $\alpha$ decreases our performance becomes more sensitive to small errors in the network's prediction. We find that $\alpha = 0.5$ works well for a variety of noise levels in our experiments. We also find that a network trained for one value of $\alpha$ can be quickly fine-tuned to work with a new value, allowing rapid exploration of candidate values. + +# 3.4. Non-Additive Noise + +Our discussion so far has focused on the case of additive noise models, and the training procedures and correction steps we derived have been specific to that domain. We now + +![](images/3af2aedc1107ab383f2f1e3cfae8395337cc81902710c2d9357450f6667e8531.jpg) +Figure 3. Results of our method with $\alpha = 0.5$ on Gaussian noise of three different magnitudes. The left-most image is the original sample from the KODAK test set, and the three columns show singly-noisy realizations and our reconstructions. + +provide an example of how our method can be applied in the case of a non-additive noise model. Specifically, we analyze multiplicative Bernoulli noise, as in [11]. As before, we have an unobserved clean image, $X \sim \mathcal{X}$ , and we observe a single noisy realization $Y$ of that clean image. Noise takes the form of a pixel-wise binary mask, $N$ , which is elementwise zero with probability $p$ and one otherwise. Thus $Y \triangleq N \odot X$ , where $\odot$ is element-wise multiplication. + +During training, we independently sample another pixelwise binary mask, $M$ , which is element-wise zero with probability $q$ and one otherwise, and construct $Z \triangleq M \odot Y = M \odot N \odot X$ . The network takes $Z$ as input and is asked to predict $Y$ , with the same $L_{2}$ loss function as in the previous section. Thus the network learns the function $f(z; \theta) \approx \mathbb{E}[Y | Z = z]$ . + +Just as it was not possible for the network to separate two additive noise sources, it is similarly not possible for the network to perfectly determine whether a particular masked pixel in $Z$ was masked by $N$ (and therefore is masked in $Y$ ) or only by $M$ (and therefore is not masked in $Y$ ). + +If a particular pixel location $i,j$ is masked in $Z$ , then the probability that it was also masked in $Y$ is + +$$ +\mathbb {P} \left(Y _ {i j} = 0 \mid Z _ {i j} = 0\right) = \frac {p}{p + q - p q}. \tag {7} +$$ + +We define this probability as $k \triangleq \mathbb{P}(Y_{ij} = 0|Z_{ij} = 0)$ for brevity. For a pixel location $i, j$ that is masked in $Z$ , + +$$ +\mathbb {E} \left[ Y _ {i j} | Z \right] = (1 - k) \mathbb {E} \left[ X _ {i j} | Z \right] + k \cdot 0. \tag {8} +$$ + +Similarly, for a pixel location that is not masked in $Z$ , + +$$ +\mathbb {E} \left[ Y _ {i j} | Z \right] = Z _ {i j}. \tag {9} +$$ + +Noting that $\mathbb{E}[X_{ij}|Z] = Z_{ij}$ when $i,j$ is not masked, and that $Z_{ij} = 0$ when $i,j$ is masked, we can rewrite both expressions as + +$$ +\mathbb {E} [ Y | Z ] = (1 - k) \mathbb {E} [ X | Z ] + k Z. \tag {10} +$$ + +Thus, we can recover an estimate of the clean image with the formula + +$$ +\mathbb {E} [ X | Z ] = \frac {\mathbb {E} [ Y | Z ] - k Z}{(1 - k)}. \tag {11} +$$ + +As in the additive case, we are free to adjust $q$ to minimize the amount of synthetic corruption beyond that in the original image, but face a tradeoff as lower values of $q$ result in a larger value of $k$ , and thus magnify the consequence of any errors our network makes in approximating $\mathbb{E}[Y|Z]$ . + +# 4. Experiments + +We present experimental results for a network trained and evaluated on synthetically generated noisy images. We use ImageNet[3] as our source of clean1 images, and apply Gaussian noise to generate noisy and doubly-noisy training images. We use the KODAK image set2 as our test set. + +We use the same network architecture as [11]. We find that a larger batch size is helpful to stabilize training, and so we use a batch size of 32. We use the Adam optimizer [7] with an initial learning rate of $10^{-3}$ for 150,000 batches, after which we reduce it to $10^{-4}$ for another 15,000 batches (giving 165,000 batches in total). + +We present comparisons against Noise2Noise, Noise2Void, Deep Image Prior (DIP) and BM3D. For Noise2Noise, we use the authors' pre-trained network weights3, for BM3D we use the authors' implementation of CBM3D (BM3D for color images)4, and for Noise2Void, we train models using the authors' implementation5 with + +![](images/002bf1798b483487364f30b6315e4d692f488b4f595b3be2689c5d27ea083b4c.jpg) +Figure 4. A comparison of our method with $\alpha = 0.5$ against Noise2Noise and BM3D. + +a fixed noise level during training. For DIP, we use the authors' implementation and default hyperparameters, with the exception of using only 1,800 iterations for sigma $= 0.2$ , for improved performance. For Noise2Void we train on the Color BSD68 dataset[14], so as to match the experimental design in the original work and for compatibility with the provided implementation. While we obtain PSNR values on our test set that are in line with those reported in the Noise2Void paper, it may be possible to achieve higher performance with a larger training set. Our reported values for Noise2Void should therefore be regarded as a lower bound on that method's potential. + +It is important to note that these methods make different assumptions about the task, and thus direct comparison may be misleading. While we impose a weaker requirement on the availability of training data than Noise2Noise does (single noisy images vs. paired noisy images), we also impose a stronger requirement on knowledge of the noise model (a known noise model vs. blind denoising). BM3D requires an estimate of the noise model, but is not a learned denoiser and therefore requires no training data. Like Noise2Noise, our method is applicable in settings with non-Gaussian, spatially-correlated noise, whereas BM3D is specialized for the additive white Gaussian noise scenario. Similar to our method, Noise2Void does not require clean or paired training data, and further does not require knowledge of the noise model. However, they do require that the noise is pixel-wise independent. Deep Image Prior requires no training data whatsoever, but requires thousands of optimization steps for each input image. + +In Table 1 we compare average PSNR on the KODAK image set under Gaussian white noise with various intensities. For results with $\alpha \neq 1$ , we fine-tune the network trained with $\alpha = 1$ for 20,000 additional batches with a + +
Methodσ = 0.05σ = 0.1σ = 0.2
Noisy Input26.0220.0013.98
Ours, α = 133.9830.8027.92
Ours-SN, α = 132.8530.4227.17
Ours, α = 0.535.0931.8028.73
Ours-SN, α = 0.535.4231.9628.69
Ours, α = 0.2535.1831.7928.30
Ours-SN, α = 0.2535.3231.9128.41
Noise2Noise[11]35.6432.2929.13
CBM3D[2]35.2731.7128.54
Noise2Void[8]29.4529.8127.57
DIP[15]32.0230.0626.43
+ +Table 1. Average PSNR values on the KÖDAK image set at various noise levels. $\sigma$ values use a [0,1] range for pixel intensities. Ours-SN is the strategy of feeding singly-noisy images to the network during test time. + +
Methodσ = 0.05σ = 0.1σ = 0.2
Noisy Input0.5860.3440.167
Ours, α = 0.50.9290.8730.787
Ours-SN α = 0.50.9300.8690.770
Noise2Noise0.9360.8830.800
+ +Table 2. Average SSIM values on the KODAK image set at various noise levels. + +learning rate of $10^{-4}$ + +Table 2 shows the average SSIM values on the same test set. For brevity, we only evaluate SSIM on selected methods, as the general trend is the same as the PSNR results. We do note that SSIM is more sensitive to the blurring produced by the Ours-SN strategy, as seen in Figure 5. + +We find that our method is able to produce reconstructions with higher PSNR than BM3D, DIP and Noise2Void with appropriate values of $\alpha$ , but our reconstruction quality suffers when $\alpha = 1$ . Noise2Noise consistently produces reconstructions that are a few tenths of a dB better than ours, + +![](images/f9a22f1df15271282a190c02442a5a8263531f91124570a93ab6b62fa16d9bd5.jpg) + +![](images/cf6b09fc53b14337142dc4879163cb317faff37df84a9c068dd2a12153d48613.jpg) + +![](images/a18bb263e337ef8cd4888a02f46c02b45606cde751676f8f69dbdfcf60be18ff.jpg) + +![](images/6dcddaaa775597ae23d0ac8296420239322f5a2e3df4e35f57236f3d6e2249e9.jpg) + +![](images/f35aae8ac9575ec16b76c7a0de045c4b8f3fe6251784eed46fe24211cb64cdc5.jpg) + +![](images/f446b3da5ed229ab31ce5a889835de00bffbe5ff6c0e4ba69460dd3356dc5207.jpg) + +![](images/a7d16cc9f1872e58ed5a7b4cda3d6c02176f147eddb8f587567969a713046ce0.jpg) +Figure 5. A comparison of results when using doubly-noisy inputs (bottom left) and singly-noisy inputs (bottom right) at inference time, with $\sigma = 0.1$ and $\alpha = 1$ . + +![](images/9e8d48271c3292a9fd90975c6a70597915ff032b0fc3a4daef85aadbf3156198.jpg) + +illustrating the value of paired training data when available. A qualitative comparison of our method with Noise2Noise and BM3D is shown in Figure 4. + +Across noise levels, we find that $\alpha = 0.5$ is a successful setting. As discussed previously, with lower $\alpha$ , our network receives a clearer view of the unaugmented image, and thus is able to recover more detail. On the other hand, lower $\alpha$ also results in a larger multiplier in the correction step, which magnifies any errors. We see that $\alpha = 0.25$ performs slightly worse than $\alpha = 0.5$ for many settings as the latter effect becomes more pronounced. + +We also observe that showing the network the singly-noisy version of the image during test time, rather than adding additional noise, harms performance with larger $\alpha$ , but can improve performance with smaller $\alpha$ . Using singly-noisy inputs at test time offers a tradeoff. On the one hand, these inputs are outside of the distribution the network saw during training, and thus we should expect some degradation in performance; on the other hand, these inputs are cleaner than those with additional noise, and therefore give the network a better view of the underlying signal. As we decrease $\alpha$ , we decrease the magnitude of the train/test distributional shift while maintaining the benefit of a cleaner input. As shown in Figure 5, feeding the network singly-noisy inputs can result in the loss of fine detail and a corresponding decrease in visual quality. This overly-smooth appearance occurs even for settings in which PSNR is higher for singly-noisy inputs than for augmented inputs. + +Figure 3 shows qualitative results of our method ("Ours, $\alpha = 0.5$ in Table 1) on a sample from the KODAK test + +
MethodPSNRSSIM
Raw Noisy25.210.764
Ours, α = 131.660.959
Ours, α = 0.532.550.965
Noise2Noise33.450.970
+ +Table 3. Average PSNR and SSIM values on the KODAK image set under a structured noise model. + +![](images/5c6791064797f9deee40b5196f0d8e150c9bf32b35838a7a39d99af7fa8830a3.jpg) + +![](images/6943ca1a193cc71489128878d752e15f6d764ddd963fa395e74e37ba74dbcbfe.jpg) +Figure 6. Results of our method on structured noise. + +![](images/db16050a202717b390d6eabec1c207279f2e062375a5d64efc000d4dc86cf12d.jpg) + +![](images/f86b111677e9d16627f7053ef773a454b1128f9cd7308f4551949bdbf2dc3652.jpg) + +![](images/ef6788423546a2d9a522b6e65df985919b6de0e274414702a86b1346f039b9f6.jpg) + +![](images/e692ef4e5733e854248297c4634507018183ff96b227a28fedd2d0f0de9620de.jpg) + +set. At lower noise levels, we observe strong recovery of both structure (eye) and texture (feathers). As the magnitude of the noise increases, our network struggles to recover the fine, high-frequency detail of the feather texture. Because we train with an $L_{2}$ loss function, our network is encouraged to produce the mean of all plausible underlying images when it is uncertain, which results in an unnaturally smooth bird. + +In Figure 6, we present results for our model trained on structured noise. This noise is produced by sampling pixelwise i.i.d. white noise, and then convolving it with a $21 \times 21$ filter with coefficients proportional to a 2D Gaussian with $\sigma = 10\mathrm{px}$ . Our method is able to remove the noise without disrupting fine detail in the sails and water. It does, however, struggle to recover the correct texture of the clouds, presumably because their texture has roughly the same frequency as the noise. + +Table 3 shows the PSNR and SSIM comparison for our method and Noise2Noise on this structured noise model. As expected, the differences between our method and Noise2Noise are of the same magnitude as in the i.i.d. white noise setting. + +Figure 7 shows an example of our method trained on multiplicative Bernoulli noise, with $p = q = 0.5$ . At inference time, we feed only the singly-noisy version to the network. Empirically, we observe that doing so is particularly helpful in this setting, presumably because the network has no trouble differentiating noisy pixels from clean pixels. In principle, we can slightly improve the results further by overwriting the network's predictions for unmasked + +![](images/e1eb9cc62a8e45a1ee74204c830a8bda3a29eadcb98478b9117182b4ad6f3bac.jpg) +Figure 7. Results of our method on multiplicative Bernoulli noise. + +![](images/4f8288d279c5e915921caa351c4437388375d208c3d5aa8fa25c88e4313003ee.jpg) + +![](images/4d32b95dd0076d22ab37fc16804728089f9ffe4c4fa079b4032b3c928b6bb5fd.jpg) + +pixels with their input values, but we show here the results when the network is asked to predict the values of all pixels. We obtain an average PSNR of 31.73 (32.63 when retaining unmasked input pixels) on the KODAK set, which is comparable to the 32.02 reported by Noise2Noise. + +# 5. Future Work + +As noted previously, there are two types of uncertainty the network must contend with when attempting to predict its target. The first is uncertainty about which noise is from $N$ and which is from $M$ , and the second is uncertainty about the true value of $X$ . While we hope that uncertainty about $X$ is small in practice, there will always be some amount of ambiguity. In principle, any given noisy image might plausibly correspond to many clean images. Our method uses an $L_{2}$ loss function because it induces the desired mean-finding behavior when presented with the first type of uncertainty. However, this same behavior is also induced when faced with the second type of uncertainty. In other words, we should expect our model to output the mean over a distribution of plausible clean images given the noisy input. + +Additional regularization on the output of our model may be able to discourage undesirable blurring across plausible clean images. We should expect that the residual implied between our model's raw output and the reconstruction should look like a sample drawn from our noise model with the appropriate standard deviation. Our future work will investigate whether regularization that penalizes unrealistic residuals is able to produce higher visual quality reconstructions. In particular, we intend to explore penalizing simple statistics of the residual (mean, variance, etc.) that differ from their correct values, as well as more advanced approaches such as training a GAN-style discriminator to attempt to differentiate residuals from true noise samples. The latter approach is attractive as it removes the need for the discriminator to learn anything about the complicated manifold of natural images, and instead only asks it to dis + +tinguish samples from a simple, well-behaved noise distribution. + +# 6. Conclusion + +In summary, our method enables the training of a denoising neural network in settings in which prior techniques were not feasible. Where Noise2Noise requires paired noisy images, our method requires only single noisy images. Where Noise2Void requires pixel-wise i.i.d. noise, our method is applicable to spatially structured noise as well. We are able to produce reconstructions that are within 0.5dB of those produced by Noise2Noise, and higher in quality than those produced by Noise2Void, DIP and BM3D. + +# References + +[1] Joshua Batson and Loic Royer. Noise2self: Blind denoising by self-supervision. arXiv preprint arXiv:1901.11365, 2019. +[2] Kostadin Dabov, Alessandro Foi, Vladimir Katkovnik, and Karen Egiazarian. Image denoising by sparse 3-d transform-domain collaborative filtering. IEEE Transactions on image processing, 16(8):2080-2095, 2007. +[3] 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. +[4] Bart Goossens, Aleksandra Pizurica, and Wilfried Philips. Removal of correlated noise by modeling the signal of interest in the wavelet domain. IEEE transactions on image processing, 18(6):1153-1165, 2009. +[5] 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. +[6] Rohit Jena. An approach to image denoising using manifold approximation without clean images. arXiv preprint arXiv:1904.12323, 2019. +[7] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. +[8] Alexander Krull, Tim-Oliver Buchholz, and Florian Jug. Noise2void-learning denoising from single noisy images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2129-2137, 2019. +[9] Alexander Krull, Tomas Vicar, and Florian Jug. Probabilistic noise2void: Unsupervised content-aware denoising. arXiv preprint arXiv:1906.00651, 2019. +[10] Samuli Laine, Jaakko Lehtinen, and Timo Aila. Self-supervised deep image denoising. arXiv preprint arXiv:1901.10277, 2019. +[11] Jaakko Lehtinen, Jacob Munkberg, Jon Hasselgren, Samuli Laine, Tero Karras, Miika Aittala, and Timo Aila. Noise2noise: Learning image restoration without clean data. arXiv preprint arXiv:1803.04189, 2018. + +[12] Ymir Mäkinen, Lucio Azzari, and Alessandro Foi. Exact transform-domain noise variance for collaborative filtering of stationary correlated noise. In 2019 IEEE International Conference on Image Processing (ICIP), pages 185-189. IEEE, 2019. +[13] Xiao-Jiao Mao, Chunhua Shen, and Yu-Bin Yang. Image restoration using convolutional auto-encoders with symmetric skip connections. arXiv preprint arXiv:1606.08921, 2016. +[14] 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 Proc. 8th Int'l Conf. Computer Vision, volume 2, pages 416-423, July 2001. +[15] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Deep image prior. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9446-9454, 2018. +[16] Junyuan Xie, Linli Xu, and Enhong Chen. Image denoising and inpainting with deep neural networks. In Advances in neural information processing systems, pages 341-349, 2012. +[17] Jun Xu, Yuan Huang, Li Liu, Fan Zhu, Xingsong Hou, and Ling Shao. Noisy-as-clean: Learning unsupervised denoising from the corrupted image. arXiv preprint arXiv:1906.06878, 2019. +[18] Chao Yang, Xin Lu, Zhe Lin, Eli Shechtman, Oliver Wang, and Hao Li. High-resolution image inpainting using multiscale neural patch synthesis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6721-6729, 2017. +[19] 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. +[20] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE international conference on computer vision, pages 2223-2232, 2017. \ No newline at end of file diff --git a/noisier2noiselearningtodenoisefromunpairednoisydata/images.zip b/noisier2noiselearningtodenoisefromunpairednoisydata/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..4bda5c22b5891fc38ecdd43002fa42038afcd7c3 --- /dev/null +++ b/noisier2noiselearningtodenoisefromunpairednoisydata/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b33e3ab43c9a5e7c012787cc171dd8fc7286a0098a54f80ed394b2cf3e29d8b +size 863699 diff --git a/noisier2noiselearningtodenoisefromunpairednoisydata/layout.json b/noisier2noiselearningtodenoisefromunpairednoisydata/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6553fd16c1372a39bf6cfc9107150cfea953714b --- /dev/null +++ b/noisier2noiselearningtodenoisefromunpairednoisydata/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c90e283cad31583077e2411b7087508576da35e7581f331604eedf0387baf97 +size 418872 diff --git a/nonadversarialvideosynthesiswithlearnedpriors/1f083edd-9c32-4c95-9aec-d6df456ac4b7_content_list.json b/nonadversarialvideosynthesiswithlearnedpriors/1f083edd-9c32-4c95-9aec-d6df456ac4b7_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..1cd32662f80132412dad943aa155d71e21d85ed7 --- /dev/null +++ b/nonadversarialvideosynthesiswithlearnedpriors/1f083edd-9c32-4c95-9aec-d6df456ac4b7_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a07671b4f9747b6c6a8939e34ba6bc5651f3a9ef3b97ce284868c898cd43d336 +size 79137 diff --git a/nonadversarialvideosynthesiswithlearnedpriors/1f083edd-9c32-4c95-9aec-d6df456ac4b7_model.json b/nonadversarialvideosynthesiswithlearnedpriors/1f083edd-9c32-4c95-9aec-d6df456ac4b7_model.json new file mode 100644 index 0000000000000000000000000000000000000000..cf69d8ccf6ad5d2bf56a92bbec5003414d7f1b91 --- /dev/null +++ b/nonadversarialvideosynthesiswithlearnedpriors/1f083edd-9c32-4c95-9aec-d6df456ac4b7_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff60c3f2b34a734b238d9d27011cb47159fef74e4706d330f6f4a9b98c1258f7 +size 95302 diff --git a/nonadversarialvideosynthesiswithlearnedpriors/1f083edd-9c32-4c95-9aec-d6df456ac4b7_origin.pdf b/nonadversarialvideosynthesiswithlearnedpriors/1f083edd-9c32-4c95-9aec-d6df456ac4b7_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a570e34e5c6240ac8508e4e4b4088252c35627b7 --- /dev/null +++ b/nonadversarialvideosynthesiswithlearnedpriors/1f083edd-9c32-4c95-9aec-d6df456ac4b7_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50508e55911f69f1dd517231058ea84a22d0bab76cab64927df97734396c735e +size 1424763 diff --git a/nonadversarialvideosynthesiswithlearnedpriors/full.md b/nonadversarialvideosynthesiswithlearnedpriors/full.md new file mode 100644 index 0000000000000000000000000000000000000000..2d1df9f35e45a58d535e3607068e8a537022cca9 --- /dev/null +++ b/nonadversarialvideosynthesiswithlearnedpriors/full.md @@ -0,0 +1,329 @@ +# Non-Adversarial Video Synthesis with Learned Priors + +Abhishek Aich\*, Akash Gupta\*, Rameswar Panda\*, Rakib Hyder\*, M. Salman Asif\*, Amit K. Roy-Chowdhury\* + +University of California, Riverside†, IBM Research AI, Cambridge‡ + +{aaich001@, agupt013@, rpand002, rhyde001@, sasif@ece, amertc@ece}.ucr.edu + +# Abstract + +Most of the existing works in video synthesis focus on generating videos using adversarial learning. Despite their success, these methods often require input reference frame or fail to generate diverse videos from the given data distribution, with little to no uniformity in the quality of videos that can be generated. Different from these methods, we focus on the problem of generating videos from latent noise vectors, without any reference input frames. To this end, we develop a novel approach that jointly optimizes the input latent space, the weights of a recurrent neural network and a generator through non-adversarial learning. Optimizing for the input latent space along with the network weights allows us to generate videos in a controlled environment, i.e., we can faithfully generate all videos the model has seen during the learning process as well as new unseen videos. Extensive experiments on three challenging and diverse datasets well demonstrate that our proposed approach generates superior quality videos compared to the existing state-of-the-art methods. + +# 1. Introduction + +Video synthesis is an open and challenging problem in computer vision. As literature suggests, a deeper understanding of spatio-temporal behavior of video frame sequences can directly provide insights in choosing priors, future prediction, and feature learning [32, 34]. Much progress has been made in developing variety of ways to generate videos which can be classified into broadly two categories: class of video generation methods which require random latent vectors without any reference input pixel [24, 31, 32], and class of video generation methods which do depend on reference input pixels [10, 28, 34]. Current literature contains methods mostly from the second class which often requires some human intervention [10, 34]. + +In general, Generative Adversarial Networks (GANs) [8] + +![](images/7839d542da147c81ab3ff86eb33c5f0875693d3127565b6c1f0aaa059d74e95b.jpg) +Figure 1: Comparison of proposed non-adversarial approach to one representative adversarial approach (MoCoGAN [31]) on the Chair-CAD [2] dataset. Top: MoCoGAN often generates blurry frames including similar type of chairs for different videos as the time step increases. Bottom: Our approach1, on the other hand, generates relatively sharper frames, maintaining consistency with the type of chairs unique to each video in the dataset. + +have shown remarkable success in various kinds of video modality problems [13, 16, 18, 24]. Initially, video generation frameworks predominantly used GANs to synthesize videos from latent noise vectors. For example, VGAN [32] and TGAN [24] proposed generative models that synthesize videos from random latent vectors with deep convolutional GAN. Recently, MoCoGAN [31] proposed to decompose a video into content and motion parts using a generator guided by two discriminators. During testing, these frameworks generate videos that are captured in the range of the trained generator, by taking random latent vectors. While all these methods have obtained reasonable performance on commonly used benchmark datasets, they utilize adversarial learning to train their models and hence, inherit the shortcomings of GANs. Specifically, GANs are often very sensitive to multiple factors such as random network initialization, and type of layers employed to build the network [14, 25]. Some infamous drawbacks of GANs are mode-collapse (i.e., able to generate only some parts of the data + +distribution: see Fig. 1 for an example) and/or vanishing generator gradients due to discriminator being way better in distinguishing fake samples and real samples [1]. + +Non-adversarial approaches [4, 11, 15] have recently been explored to tackle these challenges. For example, Generative Latent Optimization (GLO) [4] and Generative Latent Nearest Neighbor (GLANN) [11] investigate the importance of inductive bias in convolutional networks by disconnecting the discriminator for a non-adversarial learning protocol of GANs. These works show that without a discriminator, a generator can be learned to map the training images in the given data distribution to a lower dimensional latent space that is learned in conjunction with the weights of the generative network. Such procedure not only avoids the mode-collapse problem of the generators, but also provides the user an optimized low dimensional latent representation (embedding) of the data in contrast with the random latent space as in GANs. Recently Video-VAE [10] proposed to use Variational Auto-Encoder (VAE) for conditional video synthesis, either by randomly generating or providing the first frame to the model for synthesizing a video. However, the quality of generated videos using Video-VAE often depends on the provided input frame. Non-adversarial video synthesis without any visual inputs still remains as a novel and rarely addressed problem. + +In this paper, we propose a novel non-adversarial framework to generate videos in a controllable manner without any reference frame. Specifically, we propose to synthesize videos from two optimized latent spaces, one providing control over the static portion of the video (static latent space) and the other over the transient portion of the video (transient latent space). We propose to jointly optimize these two spaces while optimizing the network (a generative and a recurrent network) weights with the help of regression-based reconstruction loss and a triplet loss. + +Our approach works as follows. During training, we jointly optimize over network weights and latent spaces (both static and transient) and obtain a common transient latent space, and individual static latent space dictionary for all videos sharing the same class (see Fig. 2). During testing, we randomly choose a static vector from the dictionary, concatenate it with the transient latent vector and generate a video. This enables us to obtain a controlled environment of diverse video generation from learned latent vectors for each video in the given dataset, while maintaining almost uniform quality. In addition, the proposed approach also allows a concise video data representation in form of learned vectors, frame interpolation (using a low rank constraint introduced in [12]), and generation of videos unseen during the learning paradigm. + +The key contributions of our work are as follows. + +- We propose a novel framework for generating a wide range of diverse videos from learned latent vectors with + +out any conditional input reference frame with almost uniform visual quality. Our framework obtains a latent space dictionary on both static and transient portions for the training video dataset, which enables us to generate even unseen videos with almost equal quality by providing combinations of static and transient latent vectors that were not part of training data. + +- Our extensive experiments on multiple datasets well demonstrate that the proposed method, without the adversarial training protocol, has better or at par, performance with current state-of-the-art methods [24, 31, 32]. Moreover, we do not need to optimize the (multiple) discriminator networks as in previous methods [24, 31, 32] which offers a computational advantage. + +# 2. Related Works + +Our work relates to two major research directions: video synthesis and non-adversarial learning. This section focuses on some representative methods closely related to our work. + +# 2.1. Video Synthesis + +Video synthesis has been studied from multiple perspectives [10, 24, 28, 31, 32] (see Tab. 1 for a categorization of existing methods). VGAN [32] demonstrates that a video can be divided into foreground and background using deep neural networks. TGAN [24] proposes to use a generator to capture temporal dynamics by generating correlated latent codes for each video frame and then using an image generator to map each of these latent codes to a single frame for the whole video. MoCoGAN [31] presents a simple approach to separate content and motion latent codes of a video using adversarial learning. The most relevant work for us is Video-VAE [10] that extends the idea of image generation to video generation using VAE by proposing a structured latent space in conjunction with the VAE architecture for video synthesis. While this method doesn't require a discriminator network, it depends on reference input frame to generate a video. In contrast, our method proposes a efficient framework for synthesizing videos from learnable latent vectors without any input frame. This gives a controlled environment for video synthesis that even enables us to generate visually good quality unseen videos through combining static and transient parts. + +# 2.2. Non-Adversarial Learning + +Generative adversarial networks, as powerful as they are in pixel space synthesis, are also difficult to train. This is owing to the saddle-point based optimization game between the generator and the discriminator. On top of the challenges discussed in the previous section, GANs require careful user driven configuration tuning which may + +![](images/a245e87a83e45b9647bbb7bdae3926da147a2777ab3e1964367ce10d8954b251.jpg) +Figure 2: Overview of the proposed method. Videos can be broken down into two main parts: static and transient components. To capture this, we map a video (with $L$ frame sequence) into two learnable latent spaces. We jointly learn the static latent space and the transient latent space along with the network weights. We then use these learned latent spaces to generate videos at the inference time. See Sec. 3 for more details. + +
MethodsSettings
Adversarial learning?Input frame?Input latent vectors?
VGAN [32]✓X✓ (random)
TGAN [24]✓X✓ (random)
MoCoGAN [31]✓X✓ (random)
Video-VAE [10]X✓✓ (random)
OursXX✓ (learned)
+ +Table 1: Categorization of prior works in video synthesis. Different from existing methods, our model doesn't require a discriminator, or any reference input frame. However, since we have learned latent vectors, we have control of the kind of videos the model should generate. + +not guarantee same performance for every run. Some techniques to make the generator agnostic to described problems have been discussed in [25]. The other alternative to the same has given rise to non-adversarial learning of generative networks [4, 11]. Both [4, 11] showed that properties of convolutional GANs can be mimicked using simple reconstruction losses while discarding the discriminator. + +While there has been some work on image generation from learned latent vectors [4, 11], our work significantly differs from these methods as we do not map all the frames pixel-wise in a given video to the same latent distribution. This is because doing so would require a separate latent space (hence, a separate model for each video) for all the videos in a given dataset, and performing any operation in that space would naturally become video specific. Instead, + +we divide the latent space of videos sharing the same class into two parts - static and transient. This gives us a dictionary of static latent vectors for all videos and a common transient latent subspace. Hence, any random video of the dataset can now be represented by the combination of one static vector (which remains same for all frames) and the common transient subspace. + +# 3. Formulation + +Define a video clip $\mathsf{V}$ represented by $L$ frames as $\mathsf{V} = [v_{1}, v_{2}, \dots, v_{L}]$ . Corresponding to each frame $v_{i}$ , let there be a point $z_{i}$ in latent space $\mathcal{Z}_{\mathsf{V}} \in \mathbb{R}^{D \times L}$ such that + +$$ +\mathcal {Z} _ {\vee} = \left[ z _ {1}, z _ {2}, \dots , z _ {L} \right] \tag {1} +$$ + +which forms a path of length $L$ . We propose to disentangle a video into two parts: a static constituent, which captures the constant portion of the video common for all frames, and a transient constituent which represents the temporal dynamics between all the frames in the video. Hence, let $\mathcal{Z}_{\mathrm{V}}$ be decomposed as $\mathcal{Z}_{\mathrm{V}} = [\mathcal{Z}_{\mathrm{s}}^{\top}, \mathcal{Z}_{\mathrm{t}}^{\top}]^{\top}$ where $\mathcal{Z}_{\mathrm{s}} \in \mathbb{R}^{D_{\mathrm{s}} \times L}$ represents the static subspace and $\mathcal{Z}_{\mathrm{t}} \in \mathbb{R}^{D_{\mathrm{t}} \times L}$ represents the transient subspace with $D = D_{\mathrm{s}} + D_{\mathrm{t}}$ . Thus $\{z_i\}_{i=1}^L$ in (1) can be expressed as $z_i = \left[z_i^{(\mathrm{s})\top}, z_i^{(\mathrm{t})\top}\right]^{\top} \forall i = 1, 2, \dots, L$ . Next assuming that the video is of short length, we can fix $z_i^{(\mathrm{s})} = z^{(\mathrm{s})}$ for all frames after sampling only once. Therefore, (1) can be expressed as + +$$ +\mathcal {Z} _ {\mathrm {V}} = \left[ \left[ \begin{array}{l} z ^ {(\mathrm {s})} \\ z _ {1} ^ {(\mathrm {t})} \end{array} \right], \left[ \begin{array}{l} z ^ {(\mathrm {s})} \\ z _ {2} ^ {(\mathrm {t})} \end{array} \right], \dots , \left[ \begin{array}{l} z ^ {(\mathrm {s})} \\ z _ {L} ^ {(\mathrm {t})} \end{array} \right] \right] \tag {2} +$$ + +The transient portion will represent the motion of a given video. Intuitively, the latent vectors corresponding to this + +transient state should be correlated, or in other words, will form a path between $z_1^{(\mathrm{t})}$ and $z_L^{(\mathrm{t})}$ . Specifically, the frames in a video are correlated in time and hence a frame $v_i$ at time $i = T$ is a function of all previous frames $\{v_i\}_{i=1}^{T-1}$ . As a result, their corresponding transient representation should also exhibit such a trajectory. This kind of representation of latent vectors can be obtained by employing a Recurrent Neural Network (RNN) where output of each cell of the network is a function of its previous state or input. Denote the RNN as $\mathcal{R}$ with weights $\theta$ . Then, the RNN output $\mathcal{R}(z_i) = \{r_i^{(\mathrm{t})}\} \forall i = 1,2,\dots,L$ is a sequence of correlated variables representing the transient state of the video. + +# 3.1. Learning Network Weights + +Define a generative network $\mathcal{G}$ with weights represented by $\gamma$ . $\mathcal{G}$ takes latent vectors sampled from $\mathcal{Z}_{\mathsf{V}}$ as input and predicts up to $L$ frames of the video clip. For a set of $N$ videos, initialize set of $D$ -dimensional vectors $\mathcal{Z}_{\mathsf{V}}$ to form the pair $\left\{\left(\mathcal{Z}_{\mathsf{V}_1},\mathsf{V}_1\right),\left(\mathcal{Z}_{\mathsf{V}_2},\mathsf{V}_2\right),\dots,\left(\mathcal{Z}_{\mathsf{V}_N},\mathsf{V}_N\right)\right\}$ . More specifically from (2), defining $\mathbf{z}^{(\mathfrak{s})} = \left[z^{(\mathfrak{s})},z^{(\mathfrak{s})},\dots,z^{(\mathfrak{s})}\right] \in \mathbb{R}^{D_{\mathfrak{s}} \times L}$ , and $\mathbf{z}^{(\mathrm{t})} = \left[z_1^{(\mathrm{t})},z_2^{(\mathrm{t})},\dots,z_L^{(\mathrm{t})}\right] \in \mathbb{R}^{D_{\mathrm{t}} \times L}$ , we will have the pairs + +$$ +\left\{\left(\left[ \begin{array}{c} \mathbf {Z} ^ {(\mathsf {s})} \\ \mathbf {Z} ^ {(\mathsf {t})} \end{array} \right] _ {1}, \mathsf {V} _ {1}\right), \left(\left[ \begin{array}{c} \mathbf {Z} ^ {(\mathsf {s})} \\ \mathbf {Z} ^ {(\mathsf {t})} \end{array} \right] _ {2}, \mathsf {V} _ {2}\right), \dots , \left(\left[ \begin{array}{c} \mathbf {Z} ^ {(\mathsf {s})} \\ \mathbf {Z} ^ {(\mathsf {t})} \end{array} \right] _ {N}, \mathsf {V} _ {N}\right) \right\}. +$$ + +With these pairs, we propose to optimize the weights $\gamma$ , $\theta$ , and input latent vectors $\mathcal{Z}_{\mathrm{V}}$ (sampled once in the beginning of training) in the following manner. For each video $V_{j}$ , we jointly optimize for $\theta$ , $\gamma$ , and $\{\mathcal{Z}_{V_j}\}_{j = 1}^N$ for every epoch in two stages: + +Stage 1: $\min_{\gamma} \ell \bigl( \mathsf{V}_j, \mathcal{G}(\mathcal{Z}_{\mathsf{V}_j}) \bigr) \bigl( \mathcal{Z}_{\mathsf{V}_j}, \theta \bigr)$ (3.1) + +Stage 2: $\min_{\mathcal{Z}_{\mathsf{V}},\theta}\ell \bigl {(}\mathsf{V}_j,\mathcal{G}(\mathcal{Z}_{\mathsf{V}_j})|\gamma \bigr)$ (3.2) + +$\ell (\cdot)$ can be any regression-based loss. For rest of the paper, we will refer to both (3.1) and (3.2) together as $\min_{\mathcal{Z}_{\mathrm{V}},\theta ,\gamma}\ell_{\mathrm{rec}}$ + +Regularized loss function to capture static subspace. The transient subspace, along with the RNN, handles the temporal dynamics of the video clip. To equally capture the static portion of the video, we randomly choose a frame from the video and ask the generator to compare its corresponding generated frame during training. For this, we update the above loss as follows. + +$$ +\min _ {\mathcal {Z} _ {\mathrm {v}}, \theta , \gamma} \left(\ell_ {\text {r e c}} + \lambda_ {\mathrm {s}} \ell_ {\text {s t a t i c}}\right) \tag {4} +$$ + +where $\ell_{\mathrm{static}} = \ell (\hat{v}_k,v_k)$ with $k\in \{1,2,\dots ,L\}$ , $v_{k}$ is the ground truth frame, $\hat{v}_k = \mathcal{G}(\mathbf{z}_k)$ , and $\lambda_{s}$ is the regularization constant. $\ell_{\mathrm{static}}$ can also be understood to essentially handle the role of image discriminator in [31, 33] that ensures that the generated frame is close to the ground truth frame. + +# 3.2. Learning Latent Spaces + +Non-adversarial learning involves joint optimization of network weights as well as the corresponding input latent space. Apart from the gradients with respect to loss in (4), we propose to further optimize the latent space with gradient of a loss based on the triplet condition as follows. + +# 3.2.1 The Triplet Condition + +![](images/c81d4e7c3ea582ae9e435c312483a2e445a7ba8167032f330b95bba9c355073f.jpg) +Figure 3: Triplet Condition in the transient latent space. Latent code representation of different frames of short video clips may lie very near to each other in the transient subspace. Using the proposed triplet condition, our model learns to explain the dynamics of similar looking frames and simultaneously map them to distinct latent vectors. + +Short video clips often have indistinguishable dynamics in consecutive frames which can force the latent code representations to lie very near to each other in the transient subspace. However, an ideal transient space should ensure that the latent vector representation of a frame should only be close to a similar frame than a dissimilar one [26, 27]. To this end, we introduce a triplet loss to (4) that ensures that a pair of co-occurring frames $v_{i}^{a}$ (anchor) and $v_{i}^{p}$ (positive) are closer but distinct to each other in embedding space than any other frame $v_{i}^{n}$ (negative) (see Fig. 3). In this work, positive frames are randomly sampled within a margin range $\alpha$ of the anchor and negatives are chosen outside of this margin range. Defining a triplet set with transient latent code vectors $\{z_{i}^{(\mathrm{t}),a}, z_{i}^{(\mathrm{t}),p}, z_{i}^{(\mathrm{t}),n}\}$ , we aim to learn the transient embedding space $\mathbf{z}^{(\mathrm{t})}$ such that + +$$ +\left\| z _ {i} ^ {(\mathsf {t}), a} - z _ {i} ^ {(\mathsf {t}), p} \right\| _ {2} ^ {2} + \alpha < \left\| z _ {i} ^ {(\mathsf {t}), a} - z _ {i} ^ {(\mathsf {t}), n} \right\| _ {2} ^ {2} +$$ + +$\forall \{z_i^{(\mathfrak{t}),a},z_i^{(\mathfrak{t}),p},z_i^{(\mathfrak{t}),n}\} \in \Gamma$ where $\Gamma$ is the set of all possible triplets in $\mathbf{z}^{(\mathrm{t})}$ . With the above regularization, the loss in (4) can be written as + +$$ +\min _ {\mathcal {Z} _ {\vee}, \theta , \gamma} \left(\ell_ {\text {r e c}} + \lambda_ {s} \ell_ {\text {s t a t i c}}\right) +$$ + +$$ +\mathrm {s . t .} \| z _ {i} ^ {(\mathfrak {t}), a} - z _ {i} ^ {(\mathfrak {t}), p} \| _ {2} ^ {2} + \alpha < \| z _ {i} ^ {(\mathfrak {t}), a} - z _ {i} ^ {(\mathfrak {t}), n} \| _ {2} ^ {2} \tag {5} +$$ + +where $\alpha$ is a hyperparameter that controls the margin while selecting positives and negatives. + +# 3.3. Full Objective Function + +For any choice of differentiable generator $\mathcal{G}$ , the objective (4) will be differentiable with respect to $\mathcal{Z}_{\mathbb{V}}$ , and $(\gamma, \theta)$ + +[5]. We initialize $\mathcal{Z}_{\mathrm{V}}$ by sampling them from two different Gaussian distributions for both static and transient latent vectors. We also ensure that the latent vectors $\mathcal{Z}_{\mathrm{V}}$ lie on the unit $\ell_{2}$ sphere, and hence, we project $\mathcal{Z}_{\mathrm{V}}$ after each update by dividing its value by $\max(1, \| \mathcal{Z}_{\mathrm{V}} \|)$ [4], where $\max(\cdot)$ returns maximum among the set of given elements. Finally, the complete objective function can be written as follows. + +$$ +\min _ {\mathcal {Z} _ {\mathrm {v}}, \theta , \gamma} \left(\ell_ {\text {r e c}} + \lambda_ {\mathrm {s}} \ell_ {\text {s t a t i c}} + \lambda_ {\mathrm {t}} \ell_ {\text {t r i p l e t}}\right) \tag {6} +$$ + +where $\ell_{\mathrm{static}} = \ell (\hat{v}_k,v_k),\lambda_t$ is a regulariza tion constant for the triplet loss, and $\ell_{\mathrm{triplet}} = \max \Big(\| z_i^{(\mathfrak{t}),a} - z_i^{(\mathfrak{t}),p}\| _2^2 +\alpha -\| z_i^{(\mathfrak{t}),a} - z_i^{(\mathfrak{t}),n}\| _2^2,0\Big)$ + +The weights of the generator $\gamma$ and static latent vector $z^{(\mathrm{s})}$ are updated by gradients of the losses $\ell_{\mathrm{rec}}$ and $\ell_{\mathrm{static}}$ . The weights. $\theta$ , of the RNN, and transient latent vectors $\mathbf{z}^{(\mathrm{t})}$ are updated by gradients of the losses $\ell_{\mathrm{rec}}$ , $\ell_{\mathrm{static}}$ and $\ell_{\mathrm{triplet}}$ . + +# 3.3.1 Low Rank Representation for Interpolation + +The objective of video frame interpolation is to synthesize non-existent frames in-between the reference frames. While the triplet condition ensures that similar frames have their transient latent vectors nearby, it doesn't ensure that they lie on a manifold where simple linear interpolation will yield latent vectors that generate frames with plausible motion compared to preceding and succeeding frames [4, 12]. This means that the transient latent subspace can be represented in a much lower dimensional space compared to its larger ambient space. So, to enforce such a property, we project the latent vectors into a low dimensional space while learning them along with the network weights, first proposed in [12]. Mathematically, the loss in (6) can be written as + +$$ +\begin{array}{l} \min _ {\mathcal {Z} _ {\mathrm {v}}, \theta , \gamma} \left(\ell_ {\text {r e c}} + \lambda_ {\mathrm {s}} \ell_ {\text {s t a t i c}} + \lambda_ {\mathrm {t}} \ell_ {\text {t r i p l e t}}\right) \\ \text {s . t .} \quad \operatorname {r a n k} \left(\mathbf {z} ^ {(t)}\right) = \rho \tag {7} \\ \end{array} +$$ + +where $\mathrm{rank}(\cdot)$ indicates rank of the matrix and $\rho$ is a hyperparameter that decides what manifold $\mathbf{z}^{(\mathrm{t})}$ is to be projected on. We achieve this by reconstructing $\mathbf{z}^{(\mathrm{t})}$ matrix from its top $\rho$ singular vectors in each iteration [7]. Note that, we only employ this condition for optimizing the latent space for the frame interpolation experiments in Sec. 4.3.3. + +# 4. Experiments + +In this section, we present extensive experiments to demonstrate the effectiveness of our proposed approach in generating videos through learned latent spaces. + +# 4.1. Datasets + +We evaluate the performance of our approach using three publicly available datasets which have been used in many prior works [10, 31, 32]. + +Chair-CAD [2]. This dataset consists of total 1393 chair-CAD models, out of which we randomly choose 820 chairs for our experiments with the first 16 frames, similar to [10]. The rendered frame in each video for all the models are center-cropped and then resized to $64 \times 64 \times 3$ pixels. We obtain the transient latent vectors for all the chair models with one static latent vectors for the training set. + +Weizmann Human Action [9]. This dataset provides 10 different actions performed by 9 people, amounting to 90 videos. Similar to Chair-CAD, we center-cropped each frame, and then resized to $64 \times 64 \times 3$ pixels. For this dataset, we train our model to obtain nine static latent vectors (for nine different identities) and ten transient latent vectors (for ten different actions) for videos with 16 frames each. + +Golf scene dataset [32]. Golf scene dataset [32] contains 20,268 golf videos with $128 \times 128 \times 3$ pixels which further has 583,508 short video clips in total. We randomly chose 500 videos with 16 frames each and resized the frames to $64 \times 64 \times 3$ pixels. Same as the Chair-CAD dataset, we obtained the transient latent vectors for all the golf scenes and one static latent vector for the training set. + +# 4.2. Experimental Settings + +We implement our framework in PyTorch [21]. Please see supplementary material for details on implementation and values of different hyper-parameters $(D_{\mathrm{s}}, D_{\mathrm{t}}, \alpha, \text{etc.})$ . + +Network Architecture. We choose DCGAN [22] as the generator architecture for the Chair-CAD and Golf scene dataset, and conditional generator architecture from [20] for the Weizmann Human Action dataset for our experiments. For the RNN, we employ a one-layer gated recurrent unit network with 500 hidden units [6]. + +Choice of Loss Function for $\ell_{\mathrm{rec}}$ and $\ell_{\mathrm{static}}$ . One straight forward loss function that can be used is the mean squared loss, but it has been shown in literature that it leads to generation of blurry pixels [35]. Moreover, it has been shown empirically that generative functions in adversarial learning focus on edges [4]. Motivated by this, the loss function for $\ell_{\mathrm{rec}}$ and $\ell_{\mathrm{static}}$ is chosen to be the Laplacian pyramid loss $\mathcal{L}_{\mathrm{Laplacian}}$ [17] defined as + +$$ +\mathcal {L} _ {\text {L a p l a c i a n}} (v, \hat {v}) = \sum_ {l} 2 ^ {2 ^ {l}} | \mathrm {L} ^ {l} (v) - \mathrm {L} ^ {l} (\hat {v}) | _ {1} +$$ + +where $\mathsf{L}^l (\cdot)$ is the $l$ -th level of the Laplacian pyramid representation of the input. + +Baselines. We compare our proposed method with two adversarial methods. For Chair-CAD and Weizmann Human Action, we use MoCoGAN [31] as the baseline, and for Golf scene dataset, we use VGAN [32] as the baseline. We use the publicly available code for MoCoGAN and VGAN, and set the hyper-parameters as recommended in the published work. We also compare two different versions of the proposed method by abating the proposed loss functions. + +Note that, we couldn't compare our results with Video-VAE [10] using our performance measures (described below) as the implementation has not been made available by the authors, and to the best of our efforts we couldn't reproduce the results provided by them. + +Performance measures. Past video generation works have been evaluated quantitatively on Inception score (IS) [10]. But, it has been shown that IS is not a good evaluation metric for pixel domain generation, as the maximal IS score can be obtained by synthesizing a video from every class or mode in the given data distribution [3, 19, 30]. Moreover, a high IS does not guarantee any confidence on the quality of generation, but only on the diversity of generation. Since a generative model trained using our proposed method can generate all videos using the learned latent dictionary2, and for a fair comparison with baselines, we use the following two measures, similar to measures provided in [31]. We also provide relevant bounds computed on real videos for reference. Note that arrows indicate whether higher $(\uparrow)$ or lower $(\downarrow)$ scores are better. + +(1) Relative Motion Consistency Score (MCS $\downarrow$ ): Difference between consecutive frames captures the moving components, and hence motion in a video. So, firstly each frame in the generated video, as well as the ground-truth data, is represented as a feature vector computed using a VGG16 network [29] pre-trained on ImageNet [23] at the relu3_3 layer. Secondly, the averaged consecutive frame-feature difference vector for both set of videos is computed, denoted by $\hat{f}$ and $f$ respectively. Finally, the relative MCS is then given by $\log_{10}\left(\| f - \hat{f}\| _2^2\right)$ . + +(2) Frame Consistency Score (FCS $\uparrow$ ): This score measures the consistency of the static portion of the generated video frames. We keep the first frame of the generated video as reference and compute the averaged structural similarity measure for all frames. The FCS is then given by the average of this measure over all videos. + +# 4.3. Qualitative Results + +Fig. 5 shows some examples with randomly selected frames of generated videos for the proposed method and the adversarial approaches MoCoGAN [31] and VGAN [32]. For Chair-CAD [2] and Weizmann Human Action [9] dataset, it can be seen that the proposed method is able to generate visually good quality videos with a non-adversarial training protocol, whereas MoCoGAN produces blurry and inconsistent frames. Since we use optimized latent vectors unlike MoCoGAN (which uses random latent vectors for video generation), our method produces visually more ap + +pealing videos. Fig. 5 presents two particularly important points. As visualized for the Chair-CAD videos, the adversarial approach of MoCoGAN produces not only blurred chair images in the generated video, but they are also nonuniform in quality. Further, it can be seen that as the time step increases, MoCoGAN tends to generate the same chair for different videos. This shows a major drawback of the adversarial approaches, where they fail to learn the diversity of the data distribution. Our approach overcomes this by producing an optimized dictionary of latent vectors which can be used for generating any video in the data distribution easily. To further validate our method for qualitative results, we present the following experiments. + +# 4.3.1 Qualitative Ablation Study + +Fig. 4 qualitatively shows the contribution of the specific parts of the proposed method on Chair-CAD [2]. First, we investigate the impact of input latent vector optimization. For a fair comparison, we optimize the model for same number of epochs. It can be observed that the model benefits from the joint optimization of input latent space to produce better visual results. Next, we validate the contribution of $\ell_{\mathrm{static}}$ and $\ell_{\mathrm{triplet}}$ on a difficult video example whose chair color matches with the background. Our method, combined with $\ell_{\mathrm{static}}$ and $\ell_{\mathrm{triplet}}$ , is able to distinguish between the white background and the white body of the chair model. + +
ActionsIdentities
P1P2P3P4P5P6P7P8P9
run●●●●
walk●●●●
jump●●●●●●●
skip●●●●●●●
+ +Table 3: Generating videos by exchanging unseen actions by identities. Each cell in this table indicates a video in the dataset. Only cells containing the symbol $\bullet$ indicate that the video was part of the training set. We randomly generated videos corresponding to rest of the cells indicated by symbols $\bullet, \bullet, \bullet$ , and $\bullet$ , visualized in Fig. 6. + +# 4.3.2 Action Exchange + +Our non-adversarial approach can effectively separate the static and transient portion of a video, and generate videos unseen during the training protocol. To validate these points, we choose a simple matrix completion for the combination of identities and actions in the Weizmann Human action [9] dataset. For training our model, we created a set of videos (without any cropping to present the complete scale of the frame) represented by the cells marked with $\bullet$ in Tab. 3. Hence, the unseen videos correspond to the cells not marked with $\bullet$ . During testing, we randomly generated + +![](images/db2405dd3bda9f11e93edb758023de682c0c891ac8969a5b28d286a314011472.jpg) + +Figure 4: Qualitative ablation study on Chair-CAU1. Let it can be seen that +![](images/a1b7977aa9dfd1bfa0b7d5880fecc5662686d4c97ed4061b45d8ee67e7c2bdbd.jpg) +good quality frames properly resulting in po ce is not optimized, whereas with latent + +(a) Chair-CAD [2] +![](images/d7fca3c41380954e3932a1e59ecb0db727e00716b5a68bf7b159a0cad4ff021c.jpg) +optimization, the generated frames are sharper. Righ Our method with $\ell_{\mathrm{static}}$ and $\ell_{\mathrm{triplet}}$ captures these two loss functions, the chair image absence of the terms, + +(b) Weizmann Human Action [9] +![](images/0727a15636e611124c0d7e6374525f2baf42ca0ef9e2e84ab52b96ee3fb12a25.jpg) +Figure 5: Qualitative results comparison with state-of-the-art methods. We show two generated video sequences for MoCoGAN [31] (for (a) Chair-CAD [2], (b) Weizman Human Motion [4]), VGAN [32] (for (c) Golf scene [32]) (top), and the proposed method (Ours, Bottom). The proposed method produces visually sharper, and consistently better using the non-adversarial training protocol. More examples have been provided in the supplementary material. + +![](images/e95de62f4d0d8b8a7023d18a81ac2f2a99fdabd503b7b7d1d7805f705178890c.jpg) +(c) Golf [32] + +![](images/429971d1fab5598441004259708318c523eeefb7d7226d1b5832a4a336ba2fda.jpg) +Figure 6: Examples of action exchange to generate unseen videos. This figure shows the generated videos unseen during the training of the model with colored bounding boxes indicating the colored dots $(\bullet, \bullet, \bullet, \bullet)$ referred to in Tab. 3. This demonstrates the effectiveness of our method in disentangling static and transient portion of videos. + +these unseen videos (marked with $\bullet$ , $\bullet$ , $\bullet$ and $\bullet$ in Tab. 3), and the visual results are shown in Fig. 6. This experiment clearly validates our claim of static (identities) and transient (action) portion disentanglement of a video and, generation of unseen videos by using combinations of action and iden + +- It does not part of training set. Note that generated videos may not exactly resemble ground truth videos of the said combinations as we learn $z^{(t)}$ over a class of many videos. + +# 4.3.3 Frame Interpolation + +To show our methodology can be employed for frame interpolation, we trained our model using the loss (7) for $\rho = 2$ and $\rho = 10$ . During testing, we generated intermediate frames by interpolating learned latent variables of two distinct frames. For this, we computed the difference $\Delta z^{(\mathrm{t})}$ between the learned latent vectors of second $(z_2^{(\mathrm{t})})$ and fifth $(z_3^{(\mathrm{t})})$ frame, and generated $k = 3$ unseen frames using $\left\{z_2^{(\mathrm{t})} + n / k\Delta z^{(\mathrm{t})}\right\}_{n=1}^k$ , after concatenating with $z^{(\mathrm{s})}$ . Fig. 7 shows the results of interpolation between second and fifth frames for two randomly chosen videos. Thus, our method is able to produce dynamically consistent frames with respect to the reference frames without any pixel clues. + +# 4.4. Quantitative Results + +Quantitative result comparisons with respect to baselines have been provided in Tab. 2. Compared to videos generated by the adversarial method MoCoGAN [31], we report a relative decrease of $19.22\%$ in terms of MCS, and $4.70\%$ + +
MCS ↓FCS ↑
Bound0.00.91
MoCoGAN [31]4.110.85
Ours (−ℓ triplet − ℓstatic)3.830.77
Ours (+ℓ triplet + ℓstatic)3.320.89
+ +(a) Chair-CAD [2] + +
MCS ↓FCS ↑
Bound0.00.95
MoCoGAN [31]3.410.85
Ours (−ℓTriplet − ℓstatic)3.870.79
Ours (+ℓTriplet + ℓstatic)2.630.90
+ +(b) Weizmann Human Action [9] + +
MCS ↓FCS ↑
Bound0.00.97
VGAN [32]3.610.88
Ours (−lTriplet - lStatic)3.780.84
Ours (+lTriplet + lStatic)2.710.84
+ +Table 2: Quantitative results comparison with state-of-the-art methods. We obtained better scores on the proposed method on both Chair-CAD [2], Weizmann Human Action [9], and Golf [32] datasets, compared to the adversarial approaches (MoCoGAN, and VGAN). Best scores have been highlighted in bold. + +![](images/c40ed5c9beab0e0c0c87d70feebee46f3438f641779f1f65e7bf5421dcd2e836.jpg) +Figure 7: Examples of frame interpolation. An important advantage of our method is translation of interpolation in the learned latent space to video space using (7). It can be observed that as $\rho$ increases, the interpolation (bounded by color) is better. Note that the adjacent frames are also generated frames, and not ground truth frames. + +relative increase in terms of FCS for chair-CAD dataset [2]. For the Weizmann Human Action [9] dataset, the proposed method is reported to have a relative decrease of $22.87\%$ in terms of in terms of MCS, and $4.61\%$ relative increase in terms of FCS. Similarly for Golf scene dataset [32], we perform competitively with VGAN [32] with an observed relative decrease of $24.90\%$ in terms of in terms of MCS. A important conclusion from these results is that our proposed method, being non-adversarial in nature, learns to synthesize a diverse set of videos, and is able to perform at par with adversarial approaches. It should be noted that a better loss function for $\ell_{\mathrm{rec}}$ and $\ell_{\mathrm{static}}$ would produce stronger results. We leave this for future works. + +# 4.4.1 Quantitative Ablation Study + +In this section, we demonstrate the contribution of different components in our proposed methodology on the Chair-CAD [2] dataset. For all the experiments, we randomly generate 500 videos using our model by using the learned latent vector dictionary. We divide the ablation study into two parts. Firstly, we present the results for impact of the learned latent vectors on the network modules. For this, we simply generate videos once with the learned latent vectors $(+Z)$ , and once with randomly sampled latent vectors from a different distribution $(-Z)$ . The inter-dependency of our model weights and the learned latent vectors can be interpreted from Tab. 4a. We see that there is a relative decrease of $16.16\%$ in MCS from 3.96 to 3.32, and $18.66\%$ of rel + +(c) Golf [32] + +
MCS ↓FCS ↑
Bound00.91
-Z3.960.75
+Z3.320.89
+ +(a) With respect to latent space optimization. + +
MCS ↓FCS ↑
Bound00.91
-ℓ triplet - ℓstatic3.830.77
-ℓ triplet + ℓstatic3.820.85
+ℓ triplet - ℓstatic3.360.81
+ℓ triplet + ℓstatic3.320.89
+ +(b) With respect to loss functions + +Table 4: Ablation study of proposed method on Chair-CAD [2]. In (a), we evaluate contributions of latent space optimization (Z). In (b), we evaluate contributions of $\ell_{\mathrm{triplet}}$ and $\ell_{\mathrm{static}}$ in four combinations. + and - indicate presence and absence of the terms, respectively. + +ative increase in FCS. This shows that optimization of the latent space in the proposed method is important for good quality video generation. + +Secondly, we investigate the impact of the proposed losses on the proposed method. Specifically, we look into four possible combinations of $\ell_{\mathrm{triplet}}$ and $\ell_{\mathrm{static}}$ . The results are presented in Tab. 4b. It can be observed that the combination of triplet loss $\ell_{\mathrm{triplet}}$ and static loss $\ell_{\mathrm{static}}$ provides the best result when employed together, indicated by the relative decrease of $14.26\%$ in MCS from 3.83 to 3.32. + +# 5. Conclusion + +We present a non-adversarial approach for synthesizing videos by jointly optimizing both network weights and input latent space. Specifically, our model consists of a global static latent variable for content features, a frame specific transient latent variable, a deep convolutional generator, and a recurrent neural network which are trained using a regression-based reconstruction loss, including a triplet based loss. Our approach allows us to generate a diverse set of almost uniform quality videos, perform frame interpolation, and generate videos unseen during training. Experiments on three standard datasets show the efficacy of our proposed approach over state-of-the-methods. + +Acknowledgements. The work was partially supported by NSF grant 1664172 and ONR grant N00014-19-1-2264. + +# References + +[1] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein Generative Adversarial Networks. In Proceedings of the International Conference on Machine Learning, pages 214-223, 2017. 2 +[2] Mathieu Aubry, Daniel Maturana, Alexei A Efros, Bryan C Russell, and Josef Sivic. Seeing 3D Chairs: Exemplar part-based 2D-3D Alignment using a Large Dataset of CAD Models. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3762–3769, 2014. 1, 5, 6, 7, 8 +[3] Shane Barratt and Rishi Sharma. A Note on the Inception Score. arXiv preprint arXiv:1801.01973, 2018. 6 +[4] Piotr Bojanowski, Armand Joulin, David Lopez-Pas, and Arthur Szlam. Optimizing the Latent Space of Generative Networks. In Proceedings of the International Conference on Machine Learning, pages 599-608, 2018. 2, 3, 5 +[5] Ashish Bora, Ajil Jalal, Eric Price, and Alexandros G Dimakis. Compressed Sensing using Generative Models. In Proceedings of the International Conference on Machine Learning, pages 537-546, 2017. 5 +[6] 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. 5 +[7] Jerome Friedman, Trevor Hastie, and Robert Tibshirani. The Elements of Statistical Learning, volume 1. Springer Series in Statistics New York, 2001. 5 +[8] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative Adversarial Networks. In Advances in Neural Information Processing Systems, pages 2672–2680, 2014. 1 +[9] Lena Gorelick, Moshe Blank, Eli Shechtman, Michal Irani, and Ronen Basri. Actions as Space-Time Shapes. IEEE Transactions on Pattern Analysis and Machine Intelligence, 29(12):2247-2253, 2007. 5, 6, 7, 8 +[10] Jiawei He, Andreas Lehrmann, Joseph Marino, Greg Mori, and Leonid Sigal. Probabilistic Video Generation using Holistic Attribute Control. In Proceedings of the European Conference on Computer Vision, pages 452-467, 2018. 1, 2, 3, 5, 6 +[11] Yedid Hoshen, Ke Li, and Jitendra Malik. Non-Adversarial Image Synthesis with Generative Latent Nearest Neighbors. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5811–5819, 2019. 2, 3 +[12] Rakib Hyder and M. Salman Asif. Generative Models for Low-Dimensional Video Representation and Reconstruction. IEEE Transactions on Signal Processing, 68:1688-1701, 2020. 2, 5 +[13] Yong-Hoon Kwon and Min-Gyu Park. Predicting Future Frames using Retrospective Cycle-GAN. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1811-1820, 2019. 1 +[14] Jerry Li, Aleksander Madry, John Peebles, and Ludwig Schmidt. Towards Understanding the Dynamics of Generative Adversarial Networks. arXiv preprint arXiv:1706.09884, 2017. 1 +[15] Ke Li and Jitendra Malik. Implicit Maximum Likelihood + +Estimation. arXiv preprint arXiv:1809.09087, 2018. 2 +[16] Xiaodan Liang, Lisa Lee, Wei Dai, and Eric P Xing. DualMotion GAN for Future-Flow Embedded Video Prediction. In Proceedings of the IEEE International Conference on Computer Vision, pages 1744–1752, 2017. 1 +[17] Haibin Ling and Kazunori Okada. Diffusion Distance for Histogram Comparison. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, volume 1, pages 246-253, 2006. 5 +[18] William Lotter, Gabriel Kreiman, and David Cox. Deep Predictive Coding Networks for Video Prediction and Unsupervised Learning. arXiv preprint arXiv:1605.08104, 2016. 1 +[19] Mario Lucic, Karol Kurach, Marcin Michalski, Sylvain Gelly, and Olivier Bousquet. Are GANs created equal? A Large-scale Study. In Advances in Neural Information Processing Systems, pages 700-709, 2018. 6 +[20] Mehdi Mirza and Simon Osindero. Conditional Generative Adversarial Networks. arXiv preprint arXiv:1411.1784, 2014.5 +[21] 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. 5 +[22] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks. arXiv preprint arXiv:1511.06434, 2015. 5 +[23] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. ImageNet: LargeScale Visual Recognition Challenge. International Journal of Computer Vision, 115(3):211-252, 2015. 6 +[24] Masaki Saito, Eiichi Matsumoto, and Shunta Saito. Temporal Generative Adversarial Nets with Singular Value Clipping. In Proceedings of the IEEE International Conference on Computer Vision, pages 2830-2839, 2017. 1, 2, 3 +[25] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved Techniques for Training GANs. In Advances in Neural Information Processing Systems, pages 2234-2242, 2016. 1, 3 +[26] Florian Schroff, Dmitry Kalenichenko, and James Philbin. FACENET: A Unified Embedding for Face Recognition and Clustering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 815-823, 2015. 4 +[27] Pierre Sermanet, Corey Lynch, Yevgen Chebotar, Jasmine Hsu, Eric Jang, Stefan Schaal, Sergey Levine, and Google Brain. Time-Contrastive Networks: Self-Supervised Learning from Video. In Proceedings of the IEEE International Conference on Robotics and Automation, pages 1134–1141, 2018. 4 +[28] 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. 1, 2 +[29] Karen Simonyan and Andrew Zisserman. Very Deep Convolutional Networks for Large-scale Image Recognition. arXiv + +preprint arXiv:1409.1556, 2014.6 +[30] L Theis, A van den Oord, and M Bethge. A Note on the Evaluation of Generative Models. In Proceedings of the International Conference on Learning Representations, pages 1-10, 2016. 6 +[31] Sergey Tulyakov, Ming-Yu Liu, Xiaodong Yang, and Jan Kautz. MOCOGAN: Decomposing Motion and Content for Video Generation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1526-1535, 2018. 1, 2, 3, 4, 5, 6, 7, 8 +[32] Carl Vondrick, Hamed Piriavash, and Antonio Torralba. Generating Videos with Scene Dynamics. In Advances In Neural Information Processing Systems, pages 613-621, 2016. 1, 2, 3, 5, 6, 7, 8 +[33] Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, Guilin Liu, Andrew Tao, Jan Kautz, and Bryan Catanzaro. Video-to-Video Synthesis. In Advances in Neural Information Processing Systems, pages 1144–1156, 2018. 4 +[34] Tsun-Hsuan Wang, Yen-Chi Cheng, Chieh Hubert Lin, Hwann-Tzong Chen, and Min Sun. Point-to-Point Video Generation. In Proceedings of the IEEE International Conference on Computer Vision, 2019. 1 +[35] Hang Zhao, Orazio Gallo, Iuri Frosio, and Jan Kautz. Loss Functions for Neural Networks for Image Processing. arXiv preprint arXiv:1511.08861, 2015. 5 \ No newline at end of file diff --git a/nonadversarialvideosynthesiswithlearnedpriors/images.zip b/nonadversarialvideosynthesiswithlearnedpriors/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7280222d14aea9607e4c26852aebe6c10ca22a21 --- /dev/null +++ b/nonadversarialvideosynthesiswithlearnedpriors/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e31b30a6a43e50c46960a517a09941cb36539739cd24f83f222bd8bfc38b2c88 +size 439801 diff --git a/nonadversarialvideosynthesiswithlearnedpriors/layout.json b/nonadversarialvideosynthesiswithlearnedpriors/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..7a8f1a981e18da601f1f6038ea4b220485c79786 --- /dev/null +++ b/nonadversarialvideosynthesiswithlearnedpriors/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a66051193c84c5dd3283f9a51dbe664f9980d4243ea156c3a5367ce14911ca8 +size 427716 diff --git a/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/498b59ca-3737-4b3f-a124-adeeee313a9a_content_list.json b/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/498b59ca-3737-4b3f-a124-adeeee313a9a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..869955f1fa69b561121887e90b0cad097a55393e --- /dev/null +++ b/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/498b59ca-3737-4b3f-a124-adeeee313a9a_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5cec6f1f3a27da9127a92c7e0608f31eac2f09a19a5a8041ee14bc63d40d066b +size 83685 diff --git a/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/498b59ca-3737-4b3f-a124-adeeee313a9a_model.json b/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/498b59ca-3737-4b3f-a124-adeeee313a9a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..8431c77ee918989f13b73ed5a84a3fbbf20aaccc --- /dev/null +++ b/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/498b59ca-3737-4b3f-a124-adeeee313a9a_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64872cd7f4453ecce6e9b1091829506e9f85a1b4a6e22e20acc1c887ed60c7e8 +size 104721 diff --git a/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/498b59ca-3737-4b3f-a124-adeeee313a9a_origin.pdf b/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/498b59ca-3737-4b3f-a124-adeeee313a9a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..464d5b9b66b3479437fa8b225e91f30547b0b7f7 --- /dev/null +++ b/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/498b59ca-3737-4b3f-a124-adeeee313a9a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f5fbe0cc35a34bec719d4bac59e78049a4f5fc612b6044c61ded17ec0362b95 +size 4836212 diff --git a/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/full.md b/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ba26536a1acf97cbef69a307378c9e005d106cf5 --- /dev/null +++ b/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/full.md @@ -0,0 +1,410 @@ +# Non-line-of-sight Surface Reconstruction Using the Directional Light-cone Transform + +Sean I. Young + +Stanford University + +sean0@stanford.edu + +David B. Lindell + +Stanford University + +lindell@stanford.edu + +Bernd Girod +Stanford University + +bgirod@stanford.edu + +David Taubman UNSW Sydney + +d.taubman@unsw.edu.au + +Gordon Wetzstein +Stanford University + +gordon.wetzstein@stanford.edu + +# Abstract + +We propose a joint albedo-normal approach to non-line-of-sight (NLOS) surface reconstruction using the directional light-cone transform (D-LCT). While current NLOS imaging methods reconstruct either the albedo or surface normals of the hidden scene, the two quantities provide complementary information of the scene, so an efficient method to estimate both simultaneously is desirable. We formulate the recovery of the two quantities as a vector deconvolution problem, and solve it using the Cholesky-Wiener decomposition. We show that surfaces fitted non-parametrically using our recovered normals are more accurate than those produced with NLOS surface reconstruction methods recently proposed, and are $1,000 \times$ faster to compute than using inverse rendering. + +# 1. Introduction + +Non-line-of-sight (NLOS) imaging deals with the capture and rendering of a scene that is not in the direct line of sight from the sensor. In recent years, NLOS imaging has emerged as an important vision problem, with applications in remote sensing, defense, robotic vision and autonomous driving. A common imaging setup is to "look around the corner" using the confocal configuration depicted in Figure 1. Typically, a light source, such as a laser beam, indirectly illuminates the scene by reflecting onto a surface that can be seen from both the sensor and the scene. The sensor then captures the scene reflections from the same surface location, and records them as a time-resolved sequence of two-dimensional images (or transients), from which one can computationally reconstruct the scene. Apart from transient-based imaging, other NLOS imaging modalities include those based on speckle [1-3], or incoherent intensity measurements [4, 5], as well as passive sensing [6-9] and acoustic imaging [10] techniques. + +Here, we will consider exclusively NLOS imaging based on transients [11-19], from which the hidden NLOS scene is typically rendered as a spatial, three-dimensional volume of albedo (volumetric albedo), or as a set of object surfaces. In the volumetric albedo paradigm, the objective is to estimate albedo values for scene voxels [11-16], while in the surface + +![](images/5b7646c2949f4e60019ed449bc348896c72330241376c25ad1a854e3f6ad8078.jpg) + +![](images/f4777a5e2f49501a09791bedf96f196d4fc6288a3a3084495d027e6a44949c04.jpg) +(a) Our albedo + +![](images/198243559b4bff282537d12c457ce375b2555378880caa192c36becfcde55b01.jpg) +(b) Our normals + +![](images/ff7e3e2c75d403616abdb8a1a854c463aaae70da83da4808347abdd06d946e06.jpg) +(c) Fitted surface +Figure 1. NLOS surface reconstruction via the D-LCT: Existing NLOS imaging methods typically recover only the albedo of the hidden scene. The Directional LCT recovers both the albedo (a) and the surface normals (b) of the scene, allowing us to reconstruct the hidden object surface with finer detail (c). + +reconstruction paradigm, one seeks more directly to recover object surfaces in the three-dimensional scene by estimating their surface normals [17-19]. While surface-based methods have the potential to reconstruct object geometry with finer detail than the albedo ones, current approaches to estimating surface normals are sensitive to noise, limited to scenes with simpler object geometry [18], sensitive to initialization [19] or entail a high computational complexity [13], all of which motivate our present work. Embedded in transients is a mix of surface normal and albedo information, so that explicitly accounting for the presence of both in transients can present new opportunities for recovering both quantities robustly. + +![](images/9a111b3aaa1b699be103c59843ce6f5af4b7698dfe9c6cbb196bfe8e0d97ddc1.jpg) +(a) Transient volume $\tau$ + +![](images/4112323b61e34b6a4aa9987a56589020d5b0f5a205b7292a1c7e393797158d18.jpg) +(b) Normals $v$ from $\tau$ + +![](images/3ea13a3f9d8e9fbff66c41ae40677f402e9fbf7ae8cea5b502f97bbbd8db30aa.jpg) +(c) Surface fitted onto $v$ +Figure 2. Method overview: A $1\mathrm{m} \times 1\mathrm{m} \times 2\mathrm{ns}$ volume $\tau$ of transients (a) is filtered using the directional light-cone transform to obtain the surface normals (b). We integrate the surface normals to obtain the final reconstructed surface (c), which is similar to the ground-truth (d). + +![](images/cd6249de770c8fc600e97868a287ac138e38ca77b7fa40635780f5a065c8823b.jpg) +(d) Ground-truth surface + +In this work, we propose a joint albedo-normal approach to NLOS scene reconstruction based on the directional light-cone transform (D-LCT), which is a vectorial generalization of the (scalar) light-cone transform (LCT) recently proposed by O'Toole et al. [12]. We formulate the recovery of normals and albedos as a vector deconvolution problem, and having found the two quantities, we fit a surface onto the recovered normals. By solving this vectorial deconvolution problem in the joint albedo-normal space, we recover the two quantities robustly and efficiently, allowing us to obtain a better surface reconstruction. In particular, our approach is many orders of magnitude faster than recent work [13], which can similarly estimate albedos and surface normals in a joint manner. Our proposed approach also works with existing confocal NLOS imaging hardware. We illustrate our overall method pipeline in Figure 2. To summarize, our main contributions are: + +- Directional LCT: We express non-line-of-sight surface normal recovery as a vector deconvolution problem on time-resolved measurements, via the Directional Lightcone Transform (D-LCT). +- Cholesky-Wiener Solver: We solve the above vector-deconvolution problem efficiently in the Fourier domain to recover the surface normals. +- Surface Fitting: We reconstruct highly-accurate object surface descriptions by fitting surface parameters on the recovered normals. + +# 2. Related Work + +Transient imaging was first conceptualized by Kirmani et al. [4], who believed that we can look around the corner by probing a wall with an ultrafast laser and detector. Later, the idea was demonstrated in practice by Velten et al. [11] using a femtosecond laser and a streak camera. Owing to the cost of such imaging hardware, researchers have also used other sensing technologies such as time-of-flight cameras [20, 21] or even regular consumer cameras [9, 22]. However, single- + +photon avalanche diodes (SPADs) [23-27] have been shown to be particularly versatile for sensing, allowing us to image under ambient lighting, at fast rates [28], or at long distances [29]. Altmann et al. [30] provide a comprehensive review of SPADs as well as their applications. + +Having captured the transient data, the NLOS scene can be reconstructed as a volume of albedo [11-16], or surfaces of objects [17-19]. Generally speaking, estimation of albedo can be posed as an inverse-filtering problem whereas that of surfaces is often posed as an inverse-rendering problem. We now provide a brief review of the two inverse approaches. + +# 2.1. Inverse Filtering Approaches + +Velten et al. [11] are the first to pose the recovery of the albedo volume as an inverse problem. Relating the transient measurements to some NLOS scene using higher-order light transport, they formulated scene reconstruction as a (linear) least-squares problem and solved the resulting dense system of equations with filtered back-projection (FBP). While FBP produces promising results, it only approximately solves the original least-squares problem, and the reconstructed scenes can lack fine details. Since the computational complexity of FBP is still high at $O(V^5)$ in the number $V^3$ of voxels, later authors sought to refine FBP by improving the quality of the iterative solvers [16, 31] or their speed on GPUs [26]. + +In the confocal case, O'Toole et al. [12] note that higher-order light transport can be expressed as a convolution with a change of variables. Their overall transformation, referred to as the light-cone transform (LCT), expresses the problem of Velten et al. [11] as a three-dimensional signal deblurring problem. In contrast to the FBP, the LCT solves the inverse problem exactly, and has a low computational complexity of $O(V^3\log V)$ in the number $V^3$ of voxels, thanks to the use of the Fourier transform. Recently, Ahn et al. [32] proposed an approximate convolutional imaging transform similar to the LCT for the non-confocal setting. + +In contrast with deconvolution, which we can ultimately relate to the diffusion equation, Lindell et al. [14] suggest to + +solve the transient imaging problem by modeling high-order light transport as wave propagation in the three-dimensional space, and solve the resulting inverse problem efficiently in the Fourier domain using “ $f - k$ ” migration. This method also has a $O(V^3 \log V)$ computational complexity due to the use of the Fourier transform. Methods based on diffractive wave propagation, e.g. phasor fields [33], aim further to overcome the limitations in the imaging model due to assumptions such as single scattering, and the lack of occlusions in the hidden scene. If the confocal setup is used, the phasor field method can be implemented in terms of the LCT for a $O(V^3 \log V)$ computational complexity. + +Whereas both the LCT and the $f - k$ migration approaches are extremely efficient, they do not innately have the ability to estimate the surface normals of scene objects. To find the surface normals along with the albedo volume, Heide et al. [13] pose the transient imaging problem as an optimization in the albedo and the surface normal variables. Although the reported results are promising, one major limitation of such a method is the $O(V^5)$ complexity in both computation and memory, as well as the nonconvexity of the overall problem formulation. The D-LCT helps us to solve a similar albedo-normal estimation problem with the same low complexity of the LCT and $f - k$ migration. Given the shared Fourier roots across the LCT, $f - k$ and phasor fields, it may be possible to apply our directional approach to $f - k$ migration and phasor fields as well, although we do not attempt this in our work. + +# 2.2. Inverse Rendering Approaches + +In contrast with the inverse filtering approaches, inverse rendering (analysis-by-synthesis) methods, e.g. [19], search for values of the NLOS surface parameters (e.g. BRDFs and surface normals) that would produce the observed transients if the NLOS surface were to be rendered. Since a full search in the surface parameter space would be intractable, inverse rendering is typically performed via differentiable rendering (i.e., an energy minimization in surface parameters). Surface parameters recoverable in this way include surface locations and normals [34], and illumination effects such as scattering [35-38] and interreflections [39, 40]. + +# 2.3. Surface Fitting Methods + +Object surface can be fit on the obtained surface normals either parametrically or non-parametrically. Non-parametric fitting is commonly used for stereo-based 3D reconstruction [41-43] whereas parametric approaches are more suited for mesh refinement [44-47]. Surface fitting may be seen as an inverse problem where the goal is to interpolate a smooth manifold without violating the given normal conditions. We can naturally formulate surface fitting as diffusion processes or energy minimization methods, both of which seek to find the right trade-off between regularity (smoothness) and data fidelity (surface orthogonality to the given normals). We use + +the energy-minimization approach of [48] to fit a surface on our recovered normals. + +# 3. Mathematical Framework + +After briefly reviewing the volumetric albedo model and discussing its limitations, we develop our directional albedo model, and propose efficient ways for solving the associated inverse problem of estimating the surface normals. + +# 3.1. The Volumetric Albedo Model + +In transient imaging approaches, a time-resolved detector is used to measure the incident flux of photons as a function of emitted light impulses. Each of these time measurements records the impulse response of the NLOS scene at positions on a visible surface to produce a volume of transients. + +Let us denote the three-dimensional scene coordinates by $(x,y,z)$ , and assume the visible surface is positioned along $z = 0$ . We denote by $(x',y',z = 0)$ positions on this visible surface; see Figure 1. A common transient imaging model is the confocal volumetric albedo model + +$$ +\begin{array}{l} \tau \left(x ^ {\prime}, y ^ {\prime}, t\right) = \iiint_ {\Omega} \mathrm {d} x \mathrm {d} y \mathrm {d} z \frac {\rho (x , y , z)}{r ^ {4}} \tag {1} \\ \cdot \delta \left(2 \sqrt {\left(x ^ {\prime} - x\right) ^ {2} + \left(y ^ {\prime} - y\right) ^ {2} + z ^ {2}} - t c\right), \\ \end{array} +$$ + +in which $\rho$ denotes a three-dimensional albedo volume with finite support $\Omega$ , and $\delta(\cdot)$ relates the round-trip time of flight of light with twice the distance $r$ between the scene $(x, y, z)$ and the sensing $(x', y', z = 0)$ locations. Here, $c \approx 3 \times 10^8$ denotes the speed of light while $1 / r^4 = (2 / tc)^4$ models the radiometric fall-off due to distance. The scaling $1 / r^4$ can be removed from (1) if we prescale $\tau$ by $(2 / tc)^4$ in advance. In the case of retro-reflective surfaces, a fall-off factor of $1 / r^2$ is more commonly assumed. + +To discretize model (1), we sample $\Omega$ using $N, N$ and $M$ points on the $x-, y-$ and $z$ -axes, respectively. Assuming that the transient $\tau$ has been pre-scaled by $(2 / tc)^4$ , we can write the discretized model compactly using matrix notation as + +$$ +\boldsymbol {\tau} = \mathbf {K} \boldsymbol {\rho}, \tag {2} +$$ + +in which $\pmb{\tau}$ , $\pmb{\rho} \in \mathbb{R}^{N^2M}$ and $\mathbf{K}$ is a binary matrix with values obtained by sampling $\delta(\cdot)$ . Since $\mathbf{K}$ is a low-pass operator of high condition number, the task of finding $\pmb{\rho}$ from given $\pmb{\tau}$ is an ill-posed problem [49]. Rather than compute the solution directly as $\pmb{\rho}^{\mathrm{opt}} = \mathbf{K}^{-1}\pmb{\tau}$ , we should find it as the solution of the regularized least-squares problem + +$$ +\text {m i n i m i z e} f (\boldsymbol {\rho}) = \left\| \mathbf {K} \boldsymbol {\rho} - \boldsymbol {\tau} \right\| _ {2} ^ {2} + \lambda \| \boldsymbol {\rho} \| _ {2} ^ {2}, \tag {3} +$$ + +in which $\lambda$ represents the trade-off between data fidelity and regularity (smoothness) of the solution. + +O'Toole et al. [12] note that problem (3) can be solved in an efficient manner with their so-called light-cone transform (LCT). If we denote their resampling operator by $\mathbf{T}$ , we can + +![](images/cd5f3e8a3aba8879c2046f8270bf0d0af535939110e0593ba020c8a9948fdc2f.jpg) +(a) LCT filter kernel + +![](images/25bb9023732f727b3e894fc1addcc40c26d423135eef0b471410601c116df187.jpg) +(b) Directional LCT filter kernels $(x - ,y-$ and $z$ -directions) + +![](images/03ab4b7816ad0bf9cea152bef7b63ff31a80feb5e0787105bd9af8996fb195f9.jpg) + +![](images/2865aafd726cd3ad5ba94e2461d2fba3b2e45db61d7f038c7a389a44ead15ccc.jpg) + +![](images/0ed0d9cf259fb058917c94293cf10d1f818a54e6d3c7a73cef67bd91605274c7.jpg) +Figure 3. Constructing the D-LCT filter kernels: The light-cone transform produces a three-dimensional, shift-invariant kernel (a). The D-LCT (b) consists of three shift-invariant kernels that relate directional albedo (albedo + normal) to the transients. The $z$ -directional D-LCT kernel (b, far right) is identical to the LCT kernel (a). +Figure 4. Directional albedo model: At location $\mathbf{s} = (x, y, z)$ on the object, directional albedo $\mathbf{v}(\mathbf{s})$ has direction and magnitude of the normal $\mathbf{n}(\mathbf{s})$ and the albedo $\rho(\mathbf{s})$ , respectively. Contribution of albedo $\rho(\mathbf{s})$ to the surface at $\mathbf{s}' = (x', y', z = 0)$ decreases, in the first order, as the cosine of the angle $\theta$ between $\mathbf{v}(\mathbf{s})$ and $\mathbf{s}' - \mathbf{s}$ . + +express problem (3) equivalently in terms of the resampled albedo $\bar{\pmb{\rho}} = \mathbf{T}^{*}\pmb{\rho}$ and transients $\bar{\boldsymbol{\tau}} = \mathbf{T}^{*}\boldsymbol{\tau}$ as + +$$ +\operatorname {m i n i m i z e} f (\bar {\boldsymbol {\rho}}) = \left\| \mathbf {H} \bar {\boldsymbol {\rho}} - \bar {\boldsymbol {\tau}} \right\| _ {2} ^ {2} + \lambda \| \bar {\boldsymbol {\rho}} \| _ {2} ^ {2}, \tag {4} +$$ + +in which $\mathbf{H} = \mathbf{T}^{*}\mathbf{K}\mathbf{T}$ is a three-dimensional filter (that is, a linear space-invariant operator), whose impulse response is shown in Figure 3 (a). Section 1 of the supplement provides the details of the resampling operator $\mathbf{T}^{*}$ . + +Since $\mathbf{H}$ is a three-dimensional filter, we can compute the solution $\bar{\rho}^{\mathrm{opt}} = (\mathbf{H}^{*}\mathbf{H} + \lambda \mathbf{I})^{-1}\mathbf{H}^{*}\bar{\tau}$ of (4) efficiently in the Fourier domain using Wiener deconvolution. The regularity parameter $\lambda$ can be interpreted as the noise-to-signal ratio in this filtering context. The solution of our original problem (3) is obtained by resampling the deconvolved solution using the adjoint resampling operator, that is, $\rho^{\mathrm{opt}} = \mathbf{T}\bar{\rho}^{\mathrm{opt}}$ . + +# 3.2. The Directional Albedo Model + +In the case of isotropic point emitters, (1) is an adequate model for higher-order light transport. However, for typical diffuse or Lambertian object surfaces, such a model ignores the radiometric fall-off due to Lambert's cosine law, i.e., the fall-off due to the angle between the incident light rays and + +the surface normals; see [50]. Incorporating cosine terms in (1) not only yields a more accurate forward model, but more importantly, it enables recovery of surface normals from the transients via the inverse model. + +Denoting the two spatial coordinates by $\mathbf{s} = (x,y,z)$ and $\mathbf{s}' = (x',y',z = 0)$ for brevity, we update model (1) as + +$$ +\tau \left(x ^ {\prime}, y ^ {\prime}, t\right) = \iiint_ {\Omega} \mathrm {d} \mathbf {s} \left\langle \frac {\rho (\mathbf {s}) \mathbf {n} (\mathbf {s})}{r ^ {4}}, \frac {\mathbf {s} ^ {\prime} - \mathbf {s}}{\| \mathbf {s} ^ {\prime} - \mathbf {s} \|} \right\rangle \tag {5} +$$ + +$$ +\cdot \delta \Big (2 \sqrt {(x ^ {\prime} - x) ^ {2} + (y ^ {\prime} - y) ^ {2} + z ^ {2}} - t c \Big), +$$ + +in which $\mathbf{n}(\mathbf{s}) = (n_x, n_y, n_z)(\mathbf{s}) \in \mathbb{R}^3$ is the surface normal at $\mathbf{s}$ . Our model can be seen as a first-order approximation of the physically based one in [19], allowing us to reformulate normal estimation as a linear least-squares problem. Model (5) is also identical to the one in [13] save for the absence of occlusion terms. Section 3 of our paper supplement derives the relationship between (5) and the physical one. Assuming further that the projections + +$$ +\left\langle \mathbf {n} (\mathbf {s}), \frac {\mathbf {s} ^ {\prime} - \mathbf {s}}{\| \mathbf {s} ^ {\prime} - \mathbf {s} \|} \right\rangle = \cos \theta = 1, \quad \forall \mathbf {s} ^ {\prime}, \mathbf {s}, \tag {6} +$$ + +model (5) reduces to the volumetric albedo model (1). + +Note in (5) that albedo $\rho (\mathbf{s})\in \mathbb{R}$ is a scalar quantity, and surface normal $\mathbf{n}(\mathbf{s})\in \mathbb{R}^3$ is a unit-norm vector. Rather than represent the two quantities using separate variables, we can combine them into a single directional-albedo vector + +$$ +\mathbf {v} (\mathbf {s}) = \left(v _ {x}, v _ {y}, v _ {z}\right) (\mathbf {s}) = \rho (\mathbf {s}) \mathbf {n} (\mathbf {s}) \in \mathbb {R} ^ {3}, \tag {7} +$$ + +such that the direction and the magnitude of $\mathbf{v}(\mathbf{s})$ encode its surface normal and albedo, respectively. Substituting (7) in model (5) and using $r = \| s' - s\|$ , we obtain the directional albedo model + +$$ +\tau \left(x ^ {\prime}, y ^ {\prime}, t\right) = \iiint_ {\Omega} \mathrm {d} \mathbf {s} \frac {\left\langle \mathbf {v} (\mathbf {s}) , \mathbf {s} ^ {\prime} - \mathbf {s} \right\rangle}{r ^ {5}} \tag {8} +$$ + +$$ +\cdot \delta \left(2 \sqrt {\left(x ^ {\prime} - x\right) ^ {2} + \left(y ^ {\prime} - y\right) ^ {2} + z ^ {2}} - t c\right), +$$ + +relating the directional albedo $\mathfrak{v}$ to the transients $\tau$ . Figure 4 illustrates and summarizes the directional albedo model. + +![](images/3fc1c1023a0d9e4e48769b671670d43735df8d05d805afb4c79565600ba32464.jpg) +Figure 5. Transient imaging using the D-LCT: D-LCT (c) captures fine details of object surfaces (a) not captured by the LCT (b). Volumes (b)-(c) are rendered using maximum intensity projection. D-LCT surfaces (d) are fit directly onto the D-LCT normals (c). For (d), we used known background masks to first remove the background points. All hidden objects have diffuse surfaces. + +To discretize our directional albedo model, we sample $\Omega$ similarly to (2). This produces the system of linear equations in our directional albedos $\mathbf{v} = (\mathbf{v}_x^*,\mathbf{v}_y^*,\mathbf{v}_z^*)^*$ : + +$$ +\boldsymbol {\tau} = \mathbf {K S v} \tag {9} +$$ + +in which $\mathbf{K}$ is the matrix from (2), and we obtain the entries of $\mathbf{S} = (\mathbf{S}_x, \mathbf{S}_y, \mathbf{S}_z)$ by sampling $(\mathbf{s}' - \mathbf{s})$ on $\Omega$ . Recovering the directional albedo $\upsilon$ given the transients $\tau$ is ill-posed in that it requires us to find the values of $3N^2 M$ variables with only $N^2 M$ equations. Such a rank-deficient problem can be solved by formulating (9) as the least-squares problem + +$$ +\text {m i n i m i z e} f (\mathbf {v}) = \left\| \mathbf {K S v} - \tau \right\| _ {2} ^ {2} + \lambda \| \mathbf {v} \| _ {2} ^ {2} \tag {10} +$$ + +similarly to the regularized approach in (3). While we could alternatively optimize the TV-L1 version of problem (10) to obtain a better solution, we focus on our L2 variant for now to solve (10) efficiently as a vector deconvolution problem. + +# 3.3. Directional Light-cone Transform + +Whereas our least-squares optimization problem (10) has the simple, closed-form solution + +$$ +\mathbf {v} ^ {\text {o p t}} = \left(\mathbf {S} ^ {*} \mathbf {K} ^ {*} \mathbf {K} \mathbf {S} + \lambda \mathbf {I}\right) ^ {- 1} \mathbf {S} ^ {*} \mathbf {K} ^ {*} \boldsymbol {\tau}, \tag {11} +$$ + +this solution is too expensive to compute naively for typical problems with $V^3 = N^2 M \approx 10^8$ voxels. Computing $\mathbf{v}^{\mathrm{opt}}$ directly with numerical methods such as Cholesky and LDL decompositions would incur a $O(V^{9})$ cost whereas iterative ones (e.g. conjugate gradients), a $O(V^{6})$ cost. These general + +methods are therefore unsuited to practical problem sizes. + +To solve problem (10) efficiently, we generalize the LCT technique used in (4) to the vectorial problem. We can write problem (10) equivalently as + +$$ +\text {m i n i m i z e} f (\overline {{\mathbf {v}}}) = \left\| \mathbf {H} \left(\mathbf {S} _ {x}, \mathbf {S} _ {y}, \mathbf {I}\right) \overline {{\mathbf {v}}} - \bar {\boldsymbol {\tau}} \right\| _ {2} ^ {2} + \lambda \| \overline {{\mathbf {v}}} \| _ {2} ^ {2}, \tag {12} +$$ + +in which + +$$ +\underbrace {\left[ \begin{array}{c} \overline {{\mathbf {v}}} _ {x} \\ \overline {{\mathbf {v}}} _ {y} \\ \overline {{\mathbf {v}}} _ {z} \end{array} \right]} _ {\widetilde {\mathbf {v}}} = \underbrace {\left[ \begin{array}{c c c} \mathbf {T} _ {x} ^ {*} & & \\ & \mathbf {T} _ {y} ^ {*} & \\ & & \mathbf {T} _ {z} ^ {*} \end{array} \right]} _ {\mathbf {T} _ {d} ^ {*}} \underbrace {\left[ \begin{array}{c} \mathbf {v} _ {x} \\ \mathbf {v} _ {y} \\ \mathbf {v} _ {z} \end{array} \right]} _ {\mathbf {v}} \tag {13} +$$ + +is the resampled variable, and $\bar{\tau} = \mathbf{T}^{*}\bar{\tau}$ as before. From the solution $\overline{\mathbf{v}}^{\mathrm{opt}}$ of (12), we recover the solution of the original problem (10) as $\mathbf{v}^{\mathrm{opt}} = \mathbf{T}_d\overline{\mathbf{v}}^{\mathrm{opt}}$ . Section 2 of the supplement derives the resampler $\mathbf{T}_d^*$ and its relationship to $\mathbf{T}^*$ in (4). + +Note in (12) that $\mathbf{S}_x, \mathbf{S}_y$ and $\mathbf{I}$ are shift-invariant, so they can be composed with the light-cone filter $\mathbf{H}$ to produce the directional light-cone filters $\mathbf{HS}_x, \mathbf{HS}_y$ and $\mathbf{HI}$ . Their filter kernels are shown in Figure 3 (b). Since all the operators in problem (12) are filters, one can interpret (12) as a vectorial deconvolution problem, with a fixed noise-to-signal ratio $\lambda$ across the vector frequencies. One can solve (12) efficiently using our vector extension of Wiener deconvolution. + +# 3.4. Cholesky-Wiener Deconvolution + +Denoting the matrices in (12) as $\mathbf{H}_x = \mathbf{H}\mathbf{S}_x$ , $\mathbf{H}_y = \mathbf{H}\mathbf{S}_y$ and $\mathbf{H}_z = \mathbf{H}\mathbf{I}$ for simplicity, we write the normal equations + +![](images/f5379777064c1d9448c843b5fd9a45d38e416d3e5971ffafdd570011716c4bb7.jpg) +Figure 6. Accuracy of D-LCT and LCT: The LCT and D-LCT depths (left plots) have the RMSE of 5.97 and $4.96\mathrm{cm}$ , and the MAE of 1.87 and $1.59\mathrm{cm}$ , respectively. The LCT and D-LCT surface normals (right plots) have end-point RMSE 0.91 and $0.52\mathrm{cm}$ , and MAE of 0.61 and $0.38\mathrm{cm}$ , respectively. The LCT does not natively produce surface normals, so we obtain them using [54] with the LCT depth as the input. + +![](images/58f7f4a1f2af20d4e308ec026bae0a96245aa31fc60fbb90d45be7a072392392.jpg) +Figure 7. Impact of regularity parameter on depth and surface normals: The D-LCT produces accurate depth (left plots) and normals (right plots) over a wide range of values of $\lambda$ , demonstrating its usefulness for cases where the SNR is not known exactly. The LCT normal errors are for the normal vectors obtained using [53] with the LCT depth as the input. Points of minimum error marked with dots. + +![](images/f231abe697d5d5220e2f1f409a8ebdc33f167868031cad63c48782416193324e.jpg) + +![](images/e77933394ad1eb36a91386f40fbc6a3890364d57f9118eeb0dc0b75774994be3.jpg) + +![](images/b8cd922bb4399bc7d25feca58f29bd9275ed1091fefdf0187c81f68289e2b897.jpg) + +associated with the least-squares problem (12) as + +$$ +\underbrace {\left[ \begin{array}{l l l} \mathbf {H} _ {x} ^ {2} + \lambda \mathbf {I} & \mathbf {H} _ {x} ^ {*} \mathbf {H} _ {y} & \mathbf {H} _ {x} ^ {*} \mathbf {H} _ {z} \\ \mathbf {H} _ {y} ^ {*} \mathbf {H} _ {x} & \mathbf {H} _ {y} ^ {2} + \lambda \mathbf {I} & \mathbf {H} _ {y} ^ {*} \mathbf {H} _ {z} \\ \mathbf {H} _ {z} ^ {*} \mathbf {H} _ {x} & \mathbf {H} _ {z} ^ {*} \mathbf {H} _ {y} & \mathbf {H} _ {z} ^ {2} + \lambda \mathbf {I} \end{array} \right]} _ {\mathbf {H} ^ {*} \mathbf {H} + \lambda \mathbf {I}} \underbrace {\left[ \begin{array}{l} \overline {{\mathbf {v}}} _ {x} \\ \overline {{\mathbf {v}}} _ {y} \\ \overline {{\mathbf {v}}} _ {z} \end{array} \right]} _ {\overline {{\mathbf {v}}}} = \underbrace {\left[ \begin{array}{l} \mathbf {H} _ {x} ^ {*} \bar {\boldsymbol {\tau}} \\ \mathbf {H} _ {y} ^ {*} \bar {\boldsymbol {\tau}} \\ \mathbf {H} _ {z} ^ {*} \bar {\boldsymbol {\tau}} \end{array} \right]} _ {\mathbf {H} ^ {*} \bar {\boldsymbol {\tau}}} (1 4) +$$ + +that is, a $3 \times 3$ block system of equations, where each block element is a filter or a filter signal. The structure of (14) thus suggests that we solve the $3 \times 3$ system using the Cholesky decomposition, performing the two associated forward- and back-substitutions using filtering operations. The right-hand side vector $\mathbf{H}^{*}\overline{\tau}$ can be computed in the Fourier domain, as each $\mathbf{H}_{x}^{*}, \mathbf{H}_{y}^{*}$ and $\mathbf{H}_{z}^{*}$ is a filter. + +Using the LDL variant of the Cholesky factorization, we factor the matrix $\mathbf{A} = \mathbf{H}^{*}\mathbf{H} + \lambda \mathbf{I}$ as $\mathbf{A} = \mathbf{L}\mathbf{D}\mathbf{L}^{*}$ , where + +$$ +\mathbf {L} = \left[ \begin{array}{l l l} \mathbf {I} & & \\ \mathbf {L} _ {y x} & \mathbf {I} & \\ \mathbf {L} _ {z x} & \mathbf {L} _ {z y} & \mathbf {I} \end{array} \right], \mathbf {D} = \left[ \begin{array}{c c c} \mathbf {D} _ {x x} & & \\ & \mathbf {D} _ {y y} & \\ & & \mathbf {D} _ {z z} \end{array} \right], \tag {15} +$$ + +and the elements of $\mathbf{L}$ and $\mathbf{D}$ are given by + +$$ +\mathbf {D} _ {j j} = \mathbf {H} _ {j} ^ {*} \mathbf {H} _ {j} + \lambda \mathbf {I} - \sum_ {k = 1} ^ {j - 1} \mathbf {L} _ {j k} \mathbf {D} _ {k k} \mathbf {L} _ {j k} ^ {*} \tag {16} +$$ + +$$ +\mathbf {L} _ {i j} = \mathbf {D} _ {j j} ^ {- 1} \big (\mathbf {H} _ {i} ^ {*} \mathbf {H} _ {j} - \sum_ {k = 1} ^ {j - 1} \mathbf {L} _ {j k} \mathbf {D} _ {k k} \mathbf {L} _ {j k} ^ {*} \big), +$$ + +using the convention $1 = x, 2 = y, 3 = z$ in both sums. We can readily verify the dynamic programming procedure (16) by applying the elimination steps of the Cholesky algorithm [51] to the block elements of matrix $\mathbf{A}$ . + +Finally, the triangularized system $\mathbf{LDL}^{*}\mathfrak{v} = \mathbf{H}^{*}\tau$ can be solved using forward- and back-substitutions + +$$ +\boldsymbol {\nu} = \mathbf {L} ^ {- 1} \mathbf {H} ^ {*} \boldsymbol {\tau}, \quad \boldsymbol {\upsilon} = \mathbf {L} ^ {- *} \mathbf {D} ^ {- 1} \boldsymbol {\nu}, \tag {17} +$$ + +both of which can be performed as a series of filtering steps in the Fourier domain. For example, the block-elements of $\pmb{\nu}$ can be obtained using $\nu_{1} = \mathbf{H}_{x}^{*}\bar{\tau},\nu_{2} = \mathbf{H}_{y}^{*}\bar{\tau} -\mathbf{L}_{yx}\nu_{1}$ and $\nu_{3} = \mathbf{H}_{y}^{*}\bar{\tau} -\mathbf{L}_{zx}\nu_{1} - \mathbf{L}_{zy}\nu_{2}$ . Observe here $\mathbf{L}_{yx}\nu_{1},\mathbf{L}_{zx}\nu_{1}$ and $\mathbf{L}_{zy}\nu_{2}$ may be computed in the Fourier domain, as each matrix $\mathbf{L}_{yx},\mathbf{L}_{zx}$ and $\mathbf{L}_{zy}$ represents a 3D filter. We compute the elements of $\pmb{\nu}$ can be computed in a similar manner. + +For large problems where storing the Fourier coefficients of the block elements of $\mathbf{L}$ and $\mathbf{D}$ is not feasible, we can use an iterative solver like conjugate gradients, and compute the forward mapping $\mathbf{x} \mapsto (\mathbf{H}^*\mathbf{H} + \lambda \mathbf{I})\mathbf{x}$ using, again, filtering operations in the Fourier domain. + +# 3.5. Surface Reconstruction + +Having obtained the field $\mathfrak{v}$ of directional albedo, we use the method of [52] to fit a nonparametric surface. Fitting the surface amounts to recovering an indicator function $\chi$ of the scene object so that the gradient of $\chi$ equals $\mathfrak{v}$ . Expressed as an optimization problem, we have + +$$ +\text {m i n i m i z e} f (\boldsymbol {\chi}) = \left\| \mathbf {G} ^ {*} \mathbf {G} \boldsymbol {\chi} - \mathbf {G} ^ {*} \mathbf {v} \right\| _ {2} ^ {2} + \lambda \| \boldsymbol {\chi} \| _ {2} ^ {2}, \tag {18} +$$ + +in which $\mathbf{G}$ denotes a discretization of the three-dimensional gradient operator. In practice, however, the zero-level-set of the solution $\chi^{\mathrm{opt}}$ of (18) may deviate from the surface of the true scene object due to the noise in $\mathbf{v}$ and the discretization + +![](images/ba6f9049963802f423a2c9fd5db3ff09413be31bcc6245df156fb55dce0c35be.jpg) +Figure 8. Surface reconstruction using captured data: SU has a spatial resolution of $64 \times 64$ pixels (1min exposure), and the remaining scenes, $512 \times 512$ (180min exposure). We use $\lambda = 2^0$ , $2^3$ and $2^3$ for SU, Discobolus and Dragon, respectively. Insets in the left-most column show the scene objects. Fermat flow [18] and the method of Tsai et al. [19] only partially reconstruct the surfaces. + +
Methods64 × 64128 × 128256 × 256512 × 512
AlbedoFBP0.6s2.0s8.3s32.4s
Phasor Fields0.9s3.1s12.6s49.3s
f-k migration1.5s6.6s20.9s72.6s
LCT0.5s2.4s8.5s30.4s
NormalsFermat flow1.6s5.6s21.3s86.5s
Heide et al.>10hN/AN/AN/A
Tsai et al.7hN/AN/AN/A
D-LCT (Ours)5.2s21.9s89.5s370.0s
+ +Table 1. Running times of various methods: Measured using an 8-core, $2.70\mathrm{GHz}$ CPU for the Bunny, all at temporal resolutions of 512 pixels. The methods of Heide et al. [13] and Tsai et al. [19] do not scale to resolutions higher than $64 \times 64$ . + +of the problem. To mitigate such issues, we follow again the approach of [52] to extract an isosurface of $\chi^{\mathrm{opt}}$ instead. + +# 4. Experimental Results + +Since our directional LCT approach recovers both albedo and surface normals, it can be used in the traditional context of two-dimensional NLOS imaging as well as to reconstruct surfaces in three dimensions. We demonstrate our approach for both use-cases, also comparing it to methods specialized to each one. We use ZNLOS [53] and Stanford [14] datasets for experimental validation. The ZNLOS dataset consists of multiple-bounce transients of synthetic objects $0.50\mathrm{m}$ away from a $1\mathrm{m} \times 1\mathrm{m}$ visible surface. The dataset has a temporal resolution of 512 pixels with bins of width 10ps, and spatial + +resolutions of $256 \times 256$ pixels. The Stanford set consists of transients measured on a $2\mathrm{m} \times 2\mathrm{m}$ surface of natural hidden objects $1\mathrm{m}$ away, with ambient light and noise. This dataset has a spatial resolution of $512 \times 512$ or $64 \times 64$ pixels, and a temporal resolution of 512 with bins of width $32\mathrm{ps}$ . + +# 4.1. NLOS Imaging Experiments + +Directional Transient Imaging. Figure 5 shows the normal images obtained using the D-LCT. These images contain the fine variations in object surfaces such the smooth surface of the spheres and the fur of the bunny. These details would be difficult to recover post-hoc from albedo-only images using detail-enhancement techniques, for example. The results for the LCT resemble the $z$ -component of the D-LCT ones with subtle differences that can be expected from the simplifying assumption (6). We render directional albedo volumes using maximum intensity projection: for each point $(x', y', z = 0)$ on the image plane, we find along the $z$ -axis the directional-albedo with maximum $z$ -component values. We reconstruct the surfaces by first masking out the background pixels with ground-truth masks, and performing Poisson reconstruction on the foreground points and the directional albedo. We use $\lambda = 2^3$ for all scenes. + +Accuracy of Depth and Surface Normals. Figure 6 shows the error maps for the recovered depth and surface normals of the "Bunny". The recovered LCT and D-LCT depth maps have root-mean-squared errors (RMSE) $5.97\mathrm{cm}$ and $4.96\mathrm{cm}$ + +and the mean absolute errors (MAE) of $1.87\mathrm{cm}$ and $1.59\mathrm{cm}$ respectively, across foreground pixels. The surface normals estimated using the LCT and the D-LCT have the end-point RMSE of $0.91\mathrm{cm}$ and $0.52\mathrm{cm}$ , MAE of $0.61\mathrm{cm}$ and $0.38\mathrm{cm}$ respectively. Note, the LCT does not, by itself, produce any surface normals, so we obtain the normals using the method [54] with the LCT depth as the input (we use 6 neighboring points to produce the optimum results). In Figure 7, we plot the influence of regularization parameter $\lambda$ on the depth and surface normal errors, illustrating that the D-LCT performs stable over a wide range of $\lambda$ . This can be useful in practical imaging scenarios in which the signal-to-noise ratio $\lambda$ of the captured transient data is not known exactly. + +Surface Reconstruction with Captured Data. To show the robustness of the D-LCT against different types of noise that are present in real capture environments, we perform surface reconstruction with the Stanford dataset. Figure 8 shows the directional albedo and surfaces of recovered SU, Discobolus and the Dragon objects. We reconstruct the surfaces by first thresholding the norm of directional albedo vectors to mask out the background points, then performing Poisson surface reconstructions on the remaining foreground points. We use $\lambda = 2^0$ , $2^3$ and $2^3$ for the three scenes. In the SU scene, the normal volumes reveal the orientation of the letters S and U (S points to the upper-left, U points to the upper-right). The left part of U is partially occluded, so the different methods produce different maximal intensity projections along the $z$ -axis. For these reconstruction tasks with noisy transients, the method of Tsai et al. [19] and Fermat flow [18] reconstruct only the rough shapes of the objects. We initialize [19] using the LCT, but other initializations are also possible. We used the --density flag in the Poisson reconstruction software [48] to avoid the fusion of nearby surface segments. + +Computational Efficiency. While the D-LCT has the same computational complexity as the LCT, we perform $9 \times$ more computations per voxel due to the outer Cholesky factoring required. The D-LCT is $1000 \times$ faster compared with similar methods that are capable of recovering the surface normals of objects with a complex geometry. While Fermat flow [18] is $4 \times$ faster than our approach, it is applicable mostly to the reconstruction of surfaces of objects with simpler geometry such as a bowl or a sphere (see Section 3 of the supplement for the reconstructions). Table 1 provides the running times of different methods on an 8-core, 2.70GHz CPU. + +# 5. Discussion + +Our work proposes an efficient method to jointly estimate the albedo and the surface normals of NLOS objects using a deconvolution approach. Our Directional LCT has the same low computational complexity as albedo-only methods, e.g. $f - k$ migration and the LCT, but is capable of reconstructing high-quality surfaces. + +Limitations. Our forward model (8) assumes the scene has mostly non-specular surfaces. Fortunately, our least-squares inverse method provides some degree of robustness against specularities by treating them as outliers (see e.g. the Dragon reconstruction, Figure 8). Similarly, we treat occlusions in the scene as outliers to our least-squares formulation. Using an $L_{1}$ -based data fidelity term instead of our $L_{2}$ -based one (10) could further improve the robustness of our method, at the cost of increased computation times. The $L_{1}$ -based data-term also enforces sparsity, which may remove the need for masking out background pixels. + +Our forward model also linearizes the cosine fall-off due to the interaction between surface normals and the two light rays (incident and reflected). Our linearized fall-off model is an under-estimator of the true fall-off, and surface locations that make larger angles on average with the visible wall are estimated to be at positions closer to the visible wall, where the fall-off is indeed less. This causes rounder surfaces to be estimated slightly flatter than they should be (see the arms of the Discobolus, Figure 8), but not as flat as the estimates of the LCT, which assumes zero cosine fall-off. This issue can be overcome by iteratively reweighting the first term of (10) using the ratio of the true fall-off to the linear one, based on the normals last estimated; see Section 3 of the supplement. + +Future Work. To improve reconstruction times, we plan to implement the D-LCT procedure on a GPU. Similarly to the original LCT, the D-LCT is highly parallelizable and can be significantly accelerated using a GPU implementation. Like the GPU implementation of the LCT, we expect GPU-based D-LCT to require milliseconds of processing time for lower spatial resolutions, e.g. $32 \times 32$ or $64 \times 64$ pixels. We plan also to consider $L_{1}$ or TV regularizers to better preserve the discontinuities in the reconstructed surfaces. + +# 6. Conclusion + +NLOS imaging approaches have typically been classified as recovering either the albedo or the surface normals of the hidden objects. In this work, we showed that it is possible to recover both quantities jointly. In closing, reconstruction of surfaces of hidden 3D objects can be regarded as the next frontier for NLOS imaging because it allows us to represent better the 3D environment we ultimately live in. We believe the D-LCT is a big step towards pushing beyond volumetric albedo approaches, providing a practical way to estimate the hidden surface normals needed for surface reconstruction. + +Acknowledgements. We thank M. J. Galindo for help with dataset [53] and I. Gkioulekas for the code of [18, 19]. D.L. was supported by a Stanford Graduate 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, the DARPA REVEAL program, and a PECASE by the ARL. + +# References + +[1] Jacopo Bertolotti, Elbert G. van Putten, Christian Blum, Ad Legendijk, Willem L. Vos, and Allard P. Mosk. Non-invasive imaging through opaque scattering layers. Nature, 491(7423):232-234, 2012. +[2] Ori Katz, Eran Small, and Yaron Silberberg. Looking around corners and through thin turbid layers in real time with scattered incoherent light. Nat. Photonics, 6(8):549-553, 2012. +[3] Brandon M. Smith, Matthew O'Toole, and Mohit Gupta. Tracking multiple objects outside the line of sight using speckle imaging. In CVPR, 2018. +[4] Ahmed Kirmani, Tyler Hutchison, James Davis, and Ramesh Raskar. Looking around the corner using transient imaging. In ICCV, 2009. +[5] Christos Thrampoulidis et al. Exploiting occlusion in non-line-of-sight active imaging. IEEE Trans. Comput. Imaging, 4(3):419-431, 2018. +[6] Katherine L. Bouman et al. Turning corners into cameras: Principles and methods. In ICCV, 2017. +[7] Manel Baradad et al. Inferring light fields from shadows. In CVPR, 2018. +[8] Mahed Batarseh, Sergey Sukhov, Zhean Shen, Heath Gendar, Roxana Rezvani, and Aristide Dogariu. Passive sensing around the corner using spatial coherence. Nat. Commun., 9(1):1-6, 2018. +[9] Charles Saunders, John Murray-Bruce, and Vivek K. Goyal. Computational periscopy with an ordinary digital camera. Nature, 565(7740):472-475, 2019. +[10] David B. Lindell, Gordon Wetzstein, and Vladlen Koltun. Acoustic non-line-of-sight imaging. In CVPR, 2019. +[11] Andreas Velten, Thomas Willwacher, Otkrist Gupta, Ashok Veeraraghavan, Moungi G. Bawendi, and Ramesh Raskar. Recovering three-dimensional shape around a corner using ultrafast time-of-flight imaging. Nat. Commun., 3:745, 2012. +[12] Matthew O'Toole, David B. Lindell, and Gordon Wetzstein. Confocal non-line-of-sight imaging based on the light-cone transform. Nature, 555(7696):338-341, 2018. +[13] 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, 38(3):22:1-22:10, 2019. +[14] David B. Lindell, Gordon Wetzstein, and Matthew O'Toole. Wave-based non-line-of-sight imaging using fast f-k migration. ACM Trans. Graph. TOG, 38(4):116, 2019. +[15] Christopher A. Metzler, David B. Lindell, and Gordon Wetzstein. Keyhole imaging: non-line-of-sight imaging and tracking of moving objects along a single optical path at long standoff distances. ArXiv191206727 Cs Eess, 2019. +[16] Marco La Manna, Fiona Kine, Eric Breitbart, Jonathan Jackson, Talha Sultan, and Andreas Velten. Error backprojection algorithms for non-line-of-sight imaging. IEEE Trans. Pattern Anal. Mach. Intell., 41(7):1615-1626, 2019. +[17] Chia-Yin Tsai, Kiriakos N. Kutulakos, Srinivasa G. Narasimhan, and Ashwin C. Sankaranarayanan. The geometry of first-returning photons for non-line-of-sight + +imaging. In CVPR, 2017. +[18] Shumian Xin, Sotiris Nousias, Kiriakos N. Kutulakos, Aswin C. Sankaranarayanan, Srinivasa G. Narasimhan, and Ioannis Gkioulekas. A theory of Fermat paths for non-line-of-sight shape reconstruction. In CVPR, 2019. +[19] Chia-Yin Tsai, Aswin C. Sankaranarayanan, and Ioannis Gkioulekas. Beyond volumetric albedo—a surface optimization framework for non-line-of-sight imaging. In CVPR, 2019. +[20] Felix Heide, Lei Xiao, Wolfgang Heidrich, and Matthias B. Hullin. Diffuse mirrors: 3D reconstruction from diffuse indirect illumination using inexpensive time-of-flight sensors. In CVPR, 2014. +[21] Achuta Kadambi, Hang Zhao, Boxin Shi, and Ramesh Raskar. Occluded imaging with time-of-flight sensors. ACM Trans Graph, 35(2):15:1-15:12, 2016. +[22] Jonathan Klein, Christoph Peters, Jaime Martin, Martin Laurenzis, and Matthias B. Hullin. Tracking objects outside the line of sight using 2D intensity images. Sci. Rep., 6:32491, 2016. +[23] Mauro Buttafava, Jessica Zeman, Alberto Tosi, Kevin Eliceiri, and Andreas Velten. Non-line-of-sight imaging using a time-gated single photon avalanche diode. Opt. Express, 23(16):20997-21011, 2015. +[24] Genevieve Gariepy et al. Single-photon sensitive light-infight imaging. Nat. Commun., 6:6021, 2015. +[25] Feihu Xu et al. Revealing hidden scenes by photon-efficient occlusion-based opportunistic active imaging. Opt. Express, 26(8):9945-9962, 2018. +[26] Victor Arellano, Diego Gutierrez, and Adrian Jarabo. Fast back-projection for non-line of sight reconstruction. Opt. Express, 25(10):11574-11583, 2017. +[27] Matthew O'Toole, Felix Heide, David B. Lindell, Kai Zang, Steven Diamond, and Gordon Wetzstein. Reconstructing Transient Images From Single-Photon Sensors. In CVPR, 2017. +[28] Matthew O'Toole, David B. Lindell, and Gordon Wetzstein. Real-time Non-line-of-sight Imaging. In ACM SIGGRAPH 2018 Emerging Technologies, 2018. +[29] Susan Chan, Ryan E. Warburton, Genevieve Gariepy, Jonathan Leach, and Daniele Faccio. Non-line-of-sight tracking of people at long range. Opt. Express, 25(9):10109-10117, 2017. +[30] Yoann Altmann, Stephen McLaughlin, Miles J. Padgett, Vivek K. Goyal, Alfred O. Hero, and Daniele Faccio. Quantum-inspired computational imaging. Science, 361(6403):eaat2298, 2018. +[31] Otkrist Gupta, Thomas Willwacher, Andreas Velten, Ashok Veeraraghavan, and Ramesh Raskar. Reconstruction of hidden 3D shapes using diffuse reflections. Opt. Express, 20(17):19096-19108, 2012. +[32] Byeongjoo Ahn, Akshit Dave, Ashok Veeraraghavan, Ioannis Gkioulekas, and Aswin C. Sankaranarayanan. Convolutional Approximations to the General Non-Line-of-Sight Imaging Operator. In ICCV, 2019. +[33] Xiaochun Liu et al. Non-line-of-sight imaging using phasorfield virtual wave optics. Nature, :1-4, 2019. +[34] Matthew M. Loper and Michael J. Black. OpenDR: An + +Approximate Differentiable Renderer. In ECCV, 2014. +[35] Pramook Khungurn, Daniel Schroeder, Shuang Zhao, Kavita Bala, and Steve Marschner. Matching real fabrics with micro-appearance models. ACM Trans Graph, 35(1):1:1-1:26, 2015. +[36] Ioannis Gkioulekas, Anat Levin, and Todd Zickler. An evaluation of computational imaging techniques for heterogeneous inverse scattering. In ECCV, 2016. +[37] Shuang Zhao, Lifan Wu, Frédo Durand, and Ravi Ramamoorthi. Downsampling scattering parameters for rendering anisotropic media. ACM Trans Graph, 35(6):166:1-166:11, 2016. +[38] Adam Geva, Yoav Y. Schechner, Yonatan Chernyak, and Rajiv Gupta. X-ray computed tomography through scatter. In ECCV, 2018. +[39] Stephen Robert Marschner. Inverse Rendering for Computer Graphics, PhD Thesis, Cornell University, 1998. +[40] Gustavo Patow and Xavier Pueyo. A survey of inverse surface design from light transport behavior specification. Comput. Graph. Forum, 22:663-687, 2003. +[41] Ben Appleton and Hugues Talbot. Globally minimal surfaces by continuous maximal flows. IEEE Trans. Pattern Anal. Mach. Intell., 28(1):106-118, 2006. +[42] Olivier Faugeras and Renaud Keriven. Complete dense stereovision using level set methods. In ECCV, 1998. +[43] Amaël Delaunoy and Emmanuel Prados. Gradient flows for optimizing triangular mesh-based surfaces: applications to 3d reconstruction problems dealing with visibility. Int. J. Comput. Vis., 95(2):100-123, 2011. +[44] Mathieu Desbrun, Mark Meyer, Peter Schroder, and Alan H. Barr. Implicit fairing of irregular meshes using diffusion and curvature flow. In SIGGRAPH, 1999. + +[45] Mark Meyer, Mathieu Desbrun, Peter Schroder, and Alan H. Barr. Discrete Differential-Geometry Operators for Triangulated 2-Manifolds. In Visualization and Mathematics III, 2003. +[46] O. Sorkine, D. Cohen-Or, Y. Lipman, M. Alexa, C. Rössl, and H.-P. Seidel. Laplacian Surface Editing. In Proceedings of the 2004 Eurographics/ACM SIGGRAPH Symposium on Geometry Processing, 2004. +[47] Ilya Eckstein, Jean-Philippe Pons, Yiying Tong, C.-C. Jay Kuo, and Mathieu Desbrun. Generalized surface flows for mesh processing. In Proceedings of the Fifth Eurographics Symposium on Geometry Processing, 2007. +[48] Michael Kazhdan, Matthew Bolitho, and Hugues Hoppe. Poisson surface reconstruction. In Proceedings of the Fourth Eurographics Symposium on Geometry Processing, 2006. +[49] Per Christian Hansen. Discrete Inverse Problems: Insight and Algorithms. SIAM, 2010. +[50] Di Wu et al. Frequency Analysis of Transient Light Transport with Applications in Bare Sensor Imaging. In Computer Vision - ECCV 2012, 2012. +[51] Lloyd N. Trefethen and David Bau, III. Numerical Linear Algebra. SIAM, 1997. +[52] Michael Kazhdan and Hugues Hoppe. Screened Poisson Surface Reconstruction. ACM Trans Graph, 32(3):29:1-29:13, 2013. +[53] Graphics and Imaging Lab. Z-NLOS Dataset, Graphics and Imaging Lab. [Online]. Available: http://graphics.unizar.es/nlos_dataset. [Accessed: 13-Sep-2019]. +[54] Hugues Hoppe, Tony DeRose, Tom Duchamp, John McDonald, and Werner Stuetzle. Surface Reconstruction from Unorganized Points. In SIGGRAPH, 1992. \ No newline at end of file diff --git a/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/images.zip b/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6fc1b761e03f572457f7baa03493f7596d7c83e2 --- /dev/null +++ b/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:842839faaccf21e43d0c9ac939b299323ec9ab7099fab74d0a77e1cc74ffdae8 +size 663506 diff --git a/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/layout.json b/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..886291d373d5355c6681123c455857ec4064f495 --- /dev/null +++ b/nonlineofsightsurfacereconstructionusingthedirectionallightconetransform/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30548b22404e8e526ba8bd6429a73bf30e5e27678223b2823d258c56ce4a1a68 +size 523172 diff --git a/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/a2a1a328-31c2-4ffc-bcb5-084fbfbfb5a7_content_list.json b/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/a2a1a328-31c2-4ffc-bcb5-084fbfbfb5a7_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..34461a665e809f381f04d9283913a5bb169d4a1a --- /dev/null +++ b/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/a2a1a328-31c2-4ffc-bcb5-084fbfbfb5a7_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34d5d4ddf6cf0b8e33be39317e5d4729a32a09d7b90c1612bfe876303214dd6f +size 83470 diff --git a/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/a2a1a328-31c2-4ffc-bcb5-084fbfbfb5a7_model.json b/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/a2a1a328-31c2-4ffc-bcb5-084fbfbfb5a7_model.json new file mode 100644 index 0000000000000000000000000000000000000000..0cf460c483c019e2d04753c71eb2b2134d2b1114 --- /dev/null +++ b/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/a2a1a328-31c2-4ffc-bcb5-084fbfbfb5a7_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd114c5633d5cfe6eac530fc563b2ace7fcfb0089ca16257436ee1fa82002cd8 +size 103245 diff --git a/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/a2a1a328-31c2-4ffc-bcb5-084fbfbfb5a7_origin.pdf b/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/a2a1a328-31c2-4ffc-bcb5-084fbfbfb5a7_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b2acd943119e37f611faa7f37ccc38df43e33c1f --- /dev/null +++ b/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/a2a1a328-31c2-4ffc-bcb5-084fbfbfb5a7_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7415b0f02f1b1acec1b79090b03f13f0993305bedb7d8998ef6b2d5a2d4bef35 +size 690621 diff --git a/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/full.md b/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/full.md new file mode 100644 index 0000000000000000000000000000000000000000..50a39b3f10faf4a0afac77fe63e3747dd31db078 --- /dev/null +++ b/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/full.md @@ -0,0 +1,341 @@ +# Non-Local Neural Networks with Grouped Bilinear Attentional Transforms + +Lu Chi $^{1,2}$ , Zehuan Yuan $^{2}$ , Yadong Mu $^{1*}$ , Changhu Wang $^{2}$ + +1Peking University, Beijing, China, 2ByteDance AI Lab, Beijing, China + +{chilu,myd}@pku.edu.cn,{yuanzehuan,wangchanghu}@bytedance.com + +# Abstract + +Modeling spatial or temporal long-range dependency plays a key role in deep neural networks. Conventional dominant solutions include recurrent operations on sequential data or deeply stacking convolutional layers with small kernel size. Recently, a number of non-local operators (such as self-attention based [57]) have been devised. They are typically generic and can be plugged into many existing network pipelines for globally computing among any two neurons in a feature map. This work proposes a novel non-local operator. It is inspired by the attention mechanism of human visual system, which can quickly attend to important local parts in sight and suppress other less-relevant information. The core of our method is learnable and data-adaptive bilinear attentional transform (BA-Transform), whose merits are three-folds: first, BA-Transform is versatile to model a wide spectrum of local or global attentional operations, such as emphasizing specific local regions. Each BA-Transform is learned in a data-adaptive way; Secondly, to address the discrepancy among features, we further design grouped BA-Transforms, which essentially apply different attentional operations to different groups of feature channels; Thirdly, many existing non-local operators are computation-intensive. The proposed BA-Transform is implemented by simple matrix multiplication and admits better efficacy. For empirical evaluation, we perform comprehensive experiments on two large-scale benchmarks, ImageNet and Kinetics, for image/video classification respectively. The achieved accuracies and various ablation experiments consistently demonstrate significant improvement by large margins. + +# 1. Introduction + +This era has witnessed the vigorous development of deep neural networks, with significant empirical success in a plethora of important real-life vision tasks [28, 36, 45, 56]. The neural architectures of convolutional networks are still + +![](images/bb45d0ed8bbb3aea8d4c6f00519881f34adc444b6539af6f776e895f0aeeab53.jpg) +(a) + +![](images/951ad01bb39766a67210143ca895b13424fc4a450fcb5b9ed5efd1ab622037d0.jpg) +(b) + +![](images/45897ae720e0bff4b067e5f7271e359d81f0aa6e9efa18f4678835968607f45d.jpg) +Figure 1: (a) Typical architecture of neural networks with non-local operators, where non-local neural blocks (highlighted in blue) are sparsely added into original network pipeline to instantaneously achieve large receptive fields. (b) Illustration of our proposed bilinear attentional transform (BA-Transform). With properly-learned matrices $\mathbf{P}^{(\mathbf{X})}$ , $\mathbf{Q}^{(\mathbf{X})}$ in the transformation formula $\mathbf{Y} = \mathbf{P}^{(\mathbf{X})}\mathbf{X}\mathbf{Q}^{(\mathbf{X})}$ , BA-Transform can conduct a variety of operations (selective zooming and dispersing to distant positions as shown in this sub-figure) on attended features. The super-scripts in $\mathbf{P}$ , $\mathbf{Q}$ emphasize their dependence on $\mathbf{X}$ . + +undergoing rapid evolution. Much of recent endeavor has been devoted to designing deeper [48, 17] or wider [61, 14] network architectures, or more effective atomic convolutional operators [6, 20]. The main interest of this work is modeling long-range spatial [57] or temporal [56] dependencies in deep convolutional networks. To this end, classic neural networks, such as VGG-Net [48] or ResNet [17], mostly adopt a scheme of deeply stacking many convolutional layers with small receptive fields (e.g., $3 \times 3$ kernels in ResNet [17] and $3 \times 3 \times 3$ spatio-temporal kernels in C3D [52]). + +One of current research fronts regarding effectively enlarging neural receptive fields is to sparsely insert non-local operators into an existing network pipeline. An illustration of such a architecture is shown in Figure 1(a). The main challenge for sparse insertion of non-local operators is their + +high time complexity. For example, in [57], Wang et al. proposed a seminal non-local neural operator based on self-attention, which requires $\mathcal{O}(N^2)$ ( $N$ counts all locations in the feature map) vector multiplication. Arguably, the scheme in Figure 1(a) can strike a good tradeoff between complexity and performance. + +Our method is inspired by human visual perception. For the optical signal received at the retina, human eyes are believed to conduct both a bottom-up procedure for obtaining low-level abstraction, and top-down attentional operations that quickly locate most interesting parts from the entire field of visual scene. The eyes will focus on the attended regions for further inspection. Such attention mechanism is clearly more effective for visual understanding in comparison with blind processing. This has inspired substantial efforts on devising various powerful attentional neural networks [41, 16, 25] used for visual analysis and generation. Figure 1(b) illustrates our proposed bilinear attentional transform (BA-Transform). It processes an input feature map $\mathbf{X}$ to obtain a new $\mathbf{Y}$ via the formula $\mathbf{Y} \leftarrow \mathbf{P}^{(\mathbf{X})} \mathbf{X} \mathbf{Q}^{(\mathbf{X})}$ , where all variables are matrices and their sizes can be inferred from context. Motivating our advocate of the BA-Transform we consider two desiderata: + +Firstly, human are remarkably capable of capturing complex attention patterns, which can be accomplished even at a single glimpse. The attended parts in visual field can be spatially or temporally disjoint (e.g., in a video of boxing action, two boxers shall both be paid attention to, even if they might be distant to one another), or highly complex. It is thus crucial to enforce that neural attentional units have sufficiently powerful modeling capability. Our proposed BA-Transform supports a large variety of operations on the attended image or video parts albeit its simplicity, including numerous affine transformation (selective scaling, shift, rotation, cropping etc.), suppressing / strengthening local structure or even global reasoning, as partially illustrated in Figure 1(b). + +Secondly, bilinear matrix multiplication is amenable to efficient differential calculation. In practice, we can add neural blocks that implement BA-Transform into an existing network, and jointly train all neural layers in an end-to-end fashion. Top-down supervision can be gradually back-propagated to shallow layers and enforce the consistency between learned attentions and top-down supervision. When plugged in neural architecture with skip connections, BA-Transforms tend to learn complementary attentions at different insertion, corroborated by empirical studies in our experimental section. + +The proposed BA-Transform naturally inherits almost all advantages of its precedent works [57, 24]: capturing long-range interactions via directly connecting all locations, seamlessly combined with many existing neural networks, and elevating performance even being inserted only very + +few times. In addition to all above, we also propose a channel-grouping scheme. This enforces that a same attention pattern is shared within a group. This explicitly enables that multiple heterogeneous attention patterns can be simultaneously learned for the same feature map in the neural networks. + +The rest of this paper is organized as following: We first review related work in Section 2 and detail the proposed block design in Sections 3 and 4. Section 5 showcases the effectiveness of this global operator by conducting experiments in two tasks, including image recognition and video classification. + +# 2. Related Work + +Neural Attention. Human visual system is known to have high resolution at the fovea and low resolution in the periphery [46]. Attention mechanism bridges this gap, and inspires much of recent development in the computer vision domain. Successful applications of attention in vision tasks include image classification [55, 59], image generation [16], segmentation [4, 12], action recognition [57, 37] etc. In neural networks, attention of each pixel can be softly estimated (i.e., soft attention) and hardly classified into 0 or 1 (i.e., hard attention). A popular treatment to obtain hard attention is learning to crop image regions using pre-trained detector [58, 34] or policies trained via reinforcement learning [41]. Our proposed method falls into the category of soft attention [25, 13, 54, 57, 9], where the attention units are typically differentiable and trained by gradient back-propagation. Some classic methods treat attention as bottom-up saliency [55, 9]. Recent advances have increasingly emphasized the drive of top-down supervision. Another taxonomy is based on whether attention is learned locally or globally. Deformable convolution [10, 64] seeks for local interesting pixels. self-attention based attention methods [57, 24] globally connect all locations. Among globally-learned attention models, some accomplishes in one shot (e.g., STN [25] and our proposed method), and others recurrently reinforce the model [41, 16, 27]. + +Network Architecture. Recent years have observed a blossom of novel neural networks. Classic networks (e.g., VGG [48]) favor convolutions with small kernels. The global interaction among all locations are obtained by deeply stacking many convolutional layers and utilizing skip connections (e.g., ResNet [17] and DenseNet [23]). More complex kernels and networks can be automatically found via neural architecture search (NAS) [1, 35, 5]. It has also been intensively explored to use mixed or large receptive fields. For instance, Inception [50, 51] and SKNet [31] use an ensemble of differently-sized kernels. Most relevant works to ours are non-local neural networks [57, 7, 24] and GloRe unit [8], which can globally disperse any local message. In our proposed BA-Transform, group-wise + +![](images/aaa203d0a3a0c44abb4749bc5b632cbe93e3aa081f95559f022d26a9c4233222.jpg) +Figure 2: Design of our proposed BAT-Block. The left panel draws the computational pipeline of our proposed BAT-Block. The right panel shows more details, particularly the transformation predictor. To save space, batch normalization, ReLU and our proposed row / column normalization are not shown here. More explanation is found in Section 3.2. + +attention is adopted, similar to group or depth convolutions used in MobileNet [19, 47, 18], ShuffleNet [63, 39] and IGCNet [49]. + +Image / Video Classification. A majority of neural networks [17, 55, 23, 10, 64, 6] are developed for tackling image recognition. Early development of deep network based video classification directly borrows pretrained image models. Features are first extracted from frame-based video snippets, and fused either by recurrent aggregation [60] or naive pooling [56]. Karpathy et al. in [26] first introduced 3D convolutional operation to this task. The follow-up work of I3D [2] proposed a better network initialization by inflating pre-trained 2D filters to 3D. To expedite computing spatio-temporal convolutions, some recent methods decoupled 3D convolution and sequentially execute along the spatial and temporal dimensions [43, 53, 62]. TSM [32] presented an efficient method to model temporal information by shifting in timescale. + +# 3. The Proposed Approach + +We first introduce a general definition of bilinear attentional transform (BA-Transform) in Section 3.1. In practice, BA-Transform is wrapped into a neural block which can be dropped into any arbitrary CNN architectures. The details, including various engineering considerations, can be found in Section 3.2. + +# 3.1. Formulation + +Let $\mathbf{X} \in \mathbb{R}^{H \times W \times C}$ be a feature map with $C$ channel. $H, W$ denote the sizes along two spatial dimensions respectively. Our goal is to design an operator which transforms an input $\mathbf{X}$ into a same-sized output $\mathbf{Y} \in \mathbb{R}^{H \times W \times C}$ . Critically, each element of $\mathbf{Y}$ is expected to relate to multiple + +features in $\mathbf{X}$ (i.e., the non-local property of capturing long-range dependence), and contain all key information of $\mathbf{X}$ (i.e., $\mathbf{Y}$ learns the attention of $\mathbf{X}$ ). Different from existing self-attention [54] based non-local operators [57] and its approximate accelerated variants [7, 24], we here utilize bilinear matrix product as below, + +$$ +\mathbf {Y} _ {c} = \mathbf {P} ^ {(\mathbf {X})} \cdot \mathbf {X} _ {c} \cdot \mathbf {Q} ^ {(\mathbf {X})}, \tag {1} +$$ + +where the sub-script $c$ denote an $H\times W$ slice of $\mathbf{X}$ or $\mathbf{Y}$ along the $c$ -th channel. $\mathbf{P}^{(\mathbf{X})}$ and $\mathbf{Q}^{(\mathbf{X})}$ are transformation matrices to be learned, with the size of $H\times H$ and $W\times W$ respectively. Their super-scripts imply that both are dependent on the input data $\mathbf{X}$ , thus data-adaptive. For brevity, hereafter the super-scripts will be omitted. + +Let us give some intuitive explanation for Eqn. (1). Once properly learned, according to the theory of elementary matrix [40], the left-multiplier $\mathbf{P}$ can be represented as the product of three kinds of elementary matrices that interchanging rows, multiplying row by a scalar, or adding a multiple of row to another row, respectively. Likewise, the learned right-multiplier $\mathbf{Q}$ defines a series of elementary column operations to $\mathbf{X}$ . The joint function of $\mathbf{P}, \mathbf{Q}$ enables a large spectrum of transformation of $\mathbf{X}$ , including selective zooming, suppressing / enhancing specific sub-matrices of $\mathbf{X}$ etc. Two special cases are found in Figure 1(b). + +The previous work STN [25] aims to learn invariance to translation, scale, rotation and more generic warping by affine transformation. Our work differently pay varying attention weights on the feature map. STN is also limited by the number of spatial transformers, while ours can capture several attentional operations in a pair of $\mathbf{P},\mathbf{Q}$ . Additionally, our proposed BA-Transform does not suffer from the black border problem [25]. When compared with + +self-attention based operators [57], our method tends to exhibit superior performance, supposedly owing to effectively modeling complex attentional patterns. + +# 3.2. Basic 2D BAT-Block for Image Tasks + +We term a neural block that wraps and implements an instance of BA-Transform as BAT-Block. The architecture of BAT-Block is shown in Figure 2. Following by the common practice of residual block [17, 55], we add two $1 \times 1$ convolutions into the BAT-Block. Any input feature maps will first go through channel reduction at the beginning and channel promotion at exit. Residual connection is also adopted. There are two key procedures in the BAT-Block, namely transformation predictor and BA-Transform respectively. The former reads $\mathbf{X} \in \mathbb{R}^{H \times W \times C}$ (the output of the first $1 \times 1$ convolution) and predicts two parametric matrices $\mathbf{P} \in \mathbb{R}^{H \times H}$ and $\mathbf{Q} \in \mathbb{R}^{W \times W}$ conditioned on $\mathbf{X}$ . The latter is previously described in Eqn. 1. + +Empirically, it is observed that the matrix norms of $\mathbf{P},\mathbf{Q}$ tend to explode after a few epochs of gradient backpropagation. For the consideration of numerical stability, we enforce all elements in $\mathbf{P},\mathbf{Q}$ are non-negative and normalize them in an $L_{1}$ sense by rows or columns respectively, as below: + +$$ +\mathbf {P} _ {i, j} \leftarrow \frac {\mathbf {P} _ {i , j}}{\sum_ {k = 1} ^ {H} \mathbf {P} _ {i , k}}, \quad \mathbf {Q} _ {i, j} \leftarrow \frac {\mathbf {Q} _ {i , j}}{\sum_ {k = 1} ^ {W} \mathbf {Q} _ {k , j}}, \tag {2} +$$ + +where $i,j,k$ collaboratively compose valid indices for accessing an individual element in $\mathbf{P}$ and $\mathbf{Q}$ . + +Now we elaborate on two core operations in transformation predictor: + +1. Feature compression via channel reduction and row / column pooling. The reduced feature map $\mathbf{X}$ (from some $D$ channels to $C$ ) is often sill too large for computing over the global receptive field. To further reduce the time complexity, we further reduce the number of channels in $\mathbf{X}$ via a $1 \times 1$ convolutional layer, followed by a batch normalization layer and ReLU. The obtained representation is denoted as $\mathbf{F} \in \mathbb{R}^{H \times W \times C'}$ , where $C' \ll C$ . + +We expect that each individual element in $\mathbf{P},\mathbf{Q}$ is estimated globally conditioned on $\mathbf{F}$ . To this end, it is necessary to extract some global, compact representation from $\mathbf{F}$ , particularly when $\mathbf{F}$ still has high spatial resolution. + +Inspired by the recently proposed corner pooling [29], a seemingly effective solution is to squeeze $\mathbf{F}$ in either row-wise or column-wise manner. To be specific, we devise row / column pooling on $\mathbf{F}$ . Let $\mathbf{F}^{rp} \in \mathbb{R}^{H \times 1 \times C'}$ , $\mathbf{F}^{cp} \in \mathbb{R}^{1 \times W \times C'}$ be the output of row pooling or column pooling, respectively. These operations are defined as below (channel-wise index is omitted for brevity): + +$$ +\mathbf {F} _ {i} ^ {r p} = \max \left\{\mathbf {F} _ {i, j} \mid 1 \leqslant j \leqslant W \right\}, \tag {3} +$$ + +$$ +\mathbf {F} _ {j} ^ {c p} = \max \left\{\mathbf {F} _ {i, j} \mid 1 \leqslant i \leqslant H \right\}. \tag {4} +$$ + +![](images/976d41f5c019505bc94be131d79f59cd8fbf18ca6ac966d5180c4fc8f70f588d.jpg) +Figure 3: Illustration of matrix resizing. In this example $H / s_h = W / s_w = 2$ . + +The procedure is intuitively illustrated in the right panel of Figure 2. + +2. Estimate $\mathbf{P},\mathbf{Q}$ with full convolution. The next step estimates $\mathbf{P}$ and $\mathbf{Q}$ from the compact pooled features $\mathbf{F}^{rp},\mathbf{F}^{cp}$ , respectively. To this end, we simply adopt learnable convolutional kernels. Importantly, to ensure global information is utilized in learning $\mathbf{P},\mathbf{Q}$ , kernels with global receptive fields that access all pooled features are used. For example, $H\times 1$ kernels for obtaining $\mathbf{P}$ and $1\times W$ kernels for $\mathbf{Q}$ . Different from Squeeze-and-Excitation (SE) operation in [22], our method can largely preserve spatial information which is crucial for predicting $\mathbf{P}$ or $\mathbf{Q}$ . SE does not take spatiality into account. + +# 3.3. Improving 2D BAT-Block + +Our practical investigation also reveals the particular effectiveness of two techniques, in the sense of either acceleration or accuracy elevation. + +Block based matrix estimation. Predicting full resolution of $\mathbf{P},\mathbf{Q}$ from the pooled features still imply tremendous parameters. As shown later in our experiments, over-parameterized BA-Transform can adversely affects the generalization performance. Inspired by the super-pixel idea widely used in image analysis, we implement a variant of BA-Transform that harnesses a block-based matrix form. Specifically, the feature map $\mathbf{F}$ is uniformly divided into $s_h\times s_w$ blocks along its two spatial dimensions, where $s_h,s_w$ are some integers (e.g., 7) typically divisible by $H,W$ , respectively. Row or column pooling is conducted by the following updated formula: + +$$ +\mathbf {F} _ {i} ^ {r p} = \max \left\{\mathbf {F} _ {k, j} | i \leqslant k < i \times \frac {H}{s _ {h}}, 1 \leqslant j \leqslant W \right\}, \tag {5} +$$ + +$$ +\mathbf {F} _ {j} ^ {c p} = \max \left\{\mathbf {F} _ {i, k} | j \leqslant k < j \times \frac {W}{s _ {w}}, 1 \leqslant i \leqslant H \right\}. \tag {6} +$$ + +This leads to much smaller pooled features $\mathbf{F}^{cp} \in \mathbb{R}^{s_h \times 1 \times C'}$ and $\mathbf{F}^{rp} \in \mathbb{R}^{1 \times s_w \times C'}$ . Correspondingly, the sizes of $\mathbf{P}$ , $\mathbf{Q}$ are shrunk to $s_h \times s_h$ or $s_w \times s_w$ , respectively. This requires significantly fewer parameters. A normal routine as described in Section 3.2 is called to learn the BA-Transform. Afterwards, we adopt a simple strategy to restore the full-resolution of $\mathbf{P}$ , $\mathbf{Q}$ . As depicted in Figure 3, + +when the element-block correspondence is determined between two matrices, each element in the low-resolution matrix is coped to the respective diagonal locations in the high-resolution matrix. Other cases that $H / s_h = W / s_w \neq 2$ can be likewise derived. + +Channel-grouping multi-head attentions. Following [54], we adopt the implementation of multi-head attention. Specifically, $\mathbf{X}$ is uniformly split into $k > 1$ groups along the channel dimension. The idea is illustrated in Figure 2. For each group, a unique pair of $(\mathbf{P},\mathbf{Q})$ will be learned and utilized in Eqn. (1), $k$ pairs of $(\mathbf{P},\mathbf{Q})$ in total. This arguably enhances the ability of tackling complex attention patterns. Our experiments demonstrate this simple idea of channel grouping. + +# 3.4. Spatio-Temporal 3D Block for Video Tasks + +BAT-Block can be trivially extended to high dimensions. In video tasks, a popular treatment is to stack features from consecutive frames. The input variables are thus 4D tensors, e.g., $\mathbf{X} \in \mathbb{R}^{T \times H \times W \times C}$ with $T$ being the number of stacked frames. Let $\mathbf{X}_{} \in \mathbb{R}^{1 \times H \times W \times C}$ be a time-indexed slice of $\mathbf{X}$ . To extend the 2D BAT-Block, we first separately process each time slice $\mathbf{X}_{}$ using the learned $\mathbf{P}, \mathbf{Q}$ according to Eqn. 1, obtaining the corresponding output $\mathbf{Y}_{}$ . + +Next, information from different time slices are fused along the time dimension. Let $\mathbf{T} \in \mathbb{R}^{T \times T}$ be the learnable transform matrix in the time scale, and $\mathbf{Z} \in \mathbb{R}^{T \times H \times W \times C}$ be the final result. 3D BAT-Block has the following extra computation: + +$$ +\mathbf {Z} _ {c} \leftarrow \mathbf {T} \otimes \left[ \mathbf {Y} _ {< 1, *, *, c >}, \mathbf {Y} _ {< 2, *, *, c >}, \dots , \mathbf {Y} _ {< T, *, *, c >} \right], \tag {7} +$$ + +where $\mathbf{Y}_{} \in \mathbb{R}^{1 \times H \times W \times 1}$ is a slice indexed by time and feature channel. $\otimes$ denotes ordinal convolution. $\mathbf{Z}_c \in \mathbb{R}^{T \times H \times W \times 1}$ is $c$ -th channel of $\mathbf{Z}$ . Essentially, $\mathbf{T}$ defines a $1 \times 1$ timescale convolution that operates on the concatenated $T$ slices from $\mathbf{Y}$ . + +In practice, $\mathbf{T}$ can be simultaneously learned with $\mathbf{P}$ and $\mathbf{Q}$ in transformation predictor. Similar to row or column pooling, we design an average pooling along time, which is also adopted for frame feature representation in most video understanding tasks [33, 3]. To better capture temporal dynamics, we also implement multi-head attention at temporal dimension. + +# 3.5. Complexity Analysis + +Table 1 compares the number of parameters and FLOPs between the standard NL block [57] and our proposed BAT-block. Here we only take 2D block as an example and 3D block should reach the same conclusion. Since $C' \ll C$ , $s_h \ll H$ and $s_w \ll W$ , the complexity of terms with these symbols is negligible. It can be found that BAT-Block + +
NL block [57]BAT-Block
#Params2C25/4C2+1/2CC' + 2C'ks3
FLOPs2C2HW + CH2W25/4C2HW + 1/2CHW(H+W) + 1/2CC'HW + 2C'ks3
+ +Table 1: Complexity analysis. For brevity, here we set $s_h = s_w = s$ and $C = D/2$ for BAT-Block, which is also consistent with experiments in Section 4. + +is more light-weight than NL block and the advantage of computation cost is much more obvious especially when the input resolution increase. + +# 4. Experiments + +To validate the effectiveness and efficiency of the proposed block, we conduct comprehensive experiments on two standard tasks: image classification and video classification, where the large-scale ImageNet [28] and Kinetics [2] benchmark datasets are used respectively. Besides the percentage accuracy, we also report GFLOPs and the amount of parameters (Params#M) for each network variant. Unless explicitly stated, 5 BAT-Blocks are evenly inserted to a specific model on Res3 and Res4 with $C = D/2$ , $C' = k = 4$ , and $s_h = s_w = 7$ . We adopt 3D BAT-Blocks for video classification where the block-based matrix trick is not used along time dimension since the number of input frames is not that large. + +# 4.1. Experimental Setups + +Image Classification. All network variants are trained on 4 GPUs for 90 epochs with the same strategy using PyTorch [42]. The learning rate starts from 0.1 and decreases by a factor of 0.1 after 30, 60 and 80 epochs. The batch size is set to 256. We adopt the Stochastic Gradient Descent (SGD) optimizer during training. The validation accuracy are obtained in the same way as [17, 22, 61] based on $224 \times 224$ single center crop. + +Video Classification. We conduct experiments on Kinetics-400 [2] for human action recognition. Kinetics is a large-scale trimmed video dataset that contains more than 300K video clips in total. To conduct ablation studies, following [62] we create a smaller dataset named as Mini-Kinetics-200, which contains 200 categories. For each category, we randomly sample 400 examples for the training set and 25 examples for the validation set. + +We choose ResNet-50 C2D and ResNet-50 I3D [57] as our backbone. The models are initialized from the pretrained weights on ImageNet and finetuned on 4 GPUs with a mini-batch of 64 clips. The standard cross-entropy loss is used to guild video classification. All the models use 8-frame input clips with a stride of 8 frames (so covering 64 frames in the raw view). The spatial size of input is + +
MethodGFLOPs#ParamsTop-1
baseline4.1425.5676.3
full resolution5.5031.8677.6
downsampling5.2230.2378.1
block-based5.4430.2378.3
+ +fixed as $224 \times 224$ . For Kinetics-400, all the models are trained for 100 epochs with a learning rate starting from 0.01 and decreasing by a factor of 10 after 40 and 80 epochs. For Mini-Kinetics-200, the total epochs are 50 and a linear warm-up strategy [15] is used in the first 2 epochs. In addition, a cosine schedule [38] is adopted to perform learning rate decay. To reduce over-fitting, we also utilize dropout with a ratio of 0.5 after the global average pooling layer. Meanwhile, the weight decay is set to 0.0001. + +We adopt the same data augmentation as [56], i.e., random horizontal flipping, random cropping and scale jittering. We report the clip Top-1 accuracy by selecting the center clip with center crop, and the video Top-1 accuracy by using 10-clip in time dimension, 3-crop spatially fully convolutional inference [57, 11, 32]. More details can be found in Supplementary Materials. + +# 4.2. Results on ImageNet + +We conduct ablation studies on ImageNet using the standard ResNet-50 [17] by default. + +Ablation Study of block-based matrix. In order to reduce the computation cost and the amount of parameters especially for the input of high resolution, we introduce the block-based matrix in Section 3.3. Here we also explore an alternative method termed as downsampling in Table 2. Instead of resizing the predicted matrix $\mathbf{P} / \mathbf{Q}$ to the full resolution, this method downsamples the input feature map $\mathbf{X}$ to $\mathbf{X}^{ds} \in \mathbb{R}^{s_h \times s_w \times C}$ firstly and then operate BA-Transform on $\mathbf{X}^{ds}$ to get $\mathbf{Y}^{ds}$ with the spatial size $s_h \times s_w$ . At last, we upsample $Y^{ds}$ to the full resolution $\mathbf{Y}$ by bilinear interpolation. We also conduct experiments that predict $\mathbf{P} / \mathbf{Q}$ with full resolution directly. As shown in Table 2, both the downsampling and block-based method can reduce GFLOPs and the number of parameters compared with full resolution while the block-based one obtains a higher performance. We analyse that more details are kept in our block, which are probably crucial for classification. Results on ResNet-50 show that the block-based method could also reduce over-fitting. + +Different numbers and stages. Table 3 explores different numbers of BAT-Blocks inserted to different locations of a model. We find that even one BAT-Block inserted at Res3 or Res4 can bring a significant improvement, and the improvement of a BAT-Block on Res5 is minor, which may be caused by the small spatial size $(7\times 7)$ that can + +Table 2: Ablation studies of block-based matrix. + +
Res3Res4Res5Top-1Top-5
76.392.9
+177.193.5
+177.293.7
+176.793.0
+1+177.793.9
+2+378.394.0
+ +Table 3: Performance gain by varying the inserting positions and counts of BAT-Blocks. + +
kGFLOPs#ParamsTop-1
baseline4.1425.5676.3
05.4330.1776.5
15.4430.1877.9
25.4430.1978.0
45.4430.2378.3
165.4531.0978.4
+ +Table 4: Ablation studies of multi-head attention. $k$ represents the number of attention groups. $k = 0$ means that the $\mathbf{P} / \mathbf{Q}$ is fixed as identity matrix. + +
BackboneMethodGFLOPs(Δ)#Params(Δ)Top-1
ResNet-18baseline--70.2
+NL0.230.1770.9
+BAT0.030.1371.3
ResNet-50baseline--76.3
+NL3.557.3677.5
+BAT1.304.6778.3
+ +Table 5: Comparisons with NL block on ImageNet. + +not provide precise spatial information. More BAT-Blocks continue to improve the performance. + +Multi-head attention. We explore the effectiveness brought by multi-head attention with different $k$ in Table 4. In order to confirm whether the improvement mainly benefits from the extra parameters, we design a new baseline by setting $\mathbf{P} / \mathbf{Q}$ to an identity matrix and not conditioned on the input, noted as $k = 0$ in Table 4. As can be seen, there is tiny improvement by simply introducing extra parameters. Even one group of attention could bring a noticeable improvement (+1.4%) with negligible parameters introduced compared with the new baseline. This phenomenon shows that the transformer predictor is the key to improve performance and it's very light-weight. And more groups of attention can further improve the performance, but the gain diminishes quickly. + +Comparisons with NL block. NL block [57] has been proved to significantly improve performance in several tasks by modeling long range dependencies [57, 7, 24]. We + +
MethodGFLOPs#ParamsTop-1
SE-ResNet-50 [22]4.228.176.9
GE-ResNet-50 [21]-31.176.8
SRM-ResNet-50 [30]-25.677.1
A2-Net [7]--77.0
DenseNet-201 [23]4.420.077.4
ResNeXt-50 (32 × 4d) [61]4.325.077.8
Res2Net-50 (14w×8s) [14]4.2-78.1
Oct-ResNet-50 [6]2.425.677.3
ResNet-101 [17]7.944.677.4
ResNet-152 [17]11.660.278.3
SE-ResNet-152 [22]11.767.278.4
ResNeXt-101 (32 × 4d) [61]16.588.878.8
AttentionNeXt-56 [55]6.331.978.8
ResNet-50 + BAT5.430.278.3
SE-ResNet-50 + BAT5.533.178.4
ResNext-50 (32×4d) + BAT5.629.778.6
ResNet-101 + BAT9.249.279.1
ResNet-152 + BAT12.964.979.4
+ +compare these two blocks to show the superiority of ours. We insert NL blocks at the same locations as those of BAT-Block and the results are shown in Table 5. Obviously, our proposed method is more light-weighted and effective compared with NL block, with only $13\% \sim 31\%$ GFLOPs and fewer parameters to achieve higher accuracy. + +Comparisons with state-of-the-art. In order to verify the generality of BAT-Blocks, we also conduct experiments on some other popular networks and go deeper with BAT-Blocks. As shown in Table 6, consistent performance gain could be obtained by inserting BAT-Blocks even for a very deep model, ResNet-152. Additionally, adding BAT blocks to shallower models can outperform several deeper neural networks. For example, ResNet-50 with BAT blocks achieves the same accuracy as the original ResNet-152 while using only half GFLOPs and parameters around. + +# 4.3. Results on Kinetics + +Comparisons with NL block. Table 7 shows the results of video classification on Mini-Kinetics-200. We found that it was easy to overfit in video classification for models adding BAT-Blocks, and initializing BAT-Blocks with parameters pre-trained on ImageNet could alleviate this problem in large measure. For a fair comparison, we also conduct the experiment with pre-trained NL blocks. We can find that BAT blocks with only spatial attention could achieve a better accuracy than NL blocks with less computation cost and fewer parameters whether NL network is pre-trained on ImageNet or not. + +Attention on temporal dimension. We also examine if the temporal attention works well for video classification + +Table 6: Comparisons with state-of-the-art on ImageNet. + +
MethodPre-trainedGFLOPs#ParamsValTrain
baseline-19.5523.9266.471.6
NLNo30.6931.2867.772.6
NLYes30.6931.2868.874.6
BAT (4, 0)Yes24.7628.6069.576.0
BAT (4, 1)Yes24.7728.6070.377.1
BAT (4, 2)Yes24.7728.6070.577.6
BAT (4, 4)Yes24.7728.6070.677.5
+ +Table 7: Results on Mini-Kinetics-200. Pre-trained means whether the newly added blocks are pre-trained on ImageNet. BAT $(k_{s}, k_{t})$ represents BAT block with $k_{s}$ groups of spatial attention and $k_{t}$ groups of temporal attention. All models adopt ResNet-50 C2D as backbone. Clip Top-1 accuracy is reported here. + +
Method3D-ConvGFLOPs#ParamsTop-1
A2-Net [7]Yes40.8-74.6
Oct-I3D [6]Yes25.6-74.6
TSM [32]No32.824.374.1
GloRe [8]Yes28.9-75.1
C2DNo19.624.372.0
I3DYes28.428.472.7
C2D + NLNo30.731.773.8
I3D + NLYes39.535.473.5
C2D + BATNo24.829.274.6
I3D + BATYes33.632.975.1
C2D + 3D-BATNo24.829.275.5
C2D + 3D-BAT†No24.829.275.8
+ +Table 8: Results on Kinetics-400. The first set is recent state-of-the-art, the second set is our re-implemented models, and the last set is our methods. The group number of spatial attention is 8 and that of the temporal attention is set to 4. All the models use ResNet-50 as backbone and 8 frames as input. “†” represents finetuning with TSN framework [56]. + +and the results are reported in Table 7. The improvement is significant $(+0.8\%)$ by adding a even single group of spatial attention with negligible extra parameters. More groups of temporal attention could further improve the performance. + +Results on Kinetics-400. Here we compare our methods with state-of-the-art on the full dataset to demonstrate the effectiveness and efficiency of our BAT-Block. It has been widely proven that the performance of video classification is closely related with the number of input frames and backbone architectures [57, 11, 44], and as a result, for fair comparisons, we only focus on comparing with models using 8-frame clips as input and ResNet-50 as backbone. + +Firstly, we re-implemented the C2D, I3D baselines and NL networks under the same settings as ours. All the results can be found in Table 8, which indicate that the proposed 2D BAT-Block consistently improves the performance over both C2D and I3D baselines, and the benefit of temporal at + +![](images/3a36e8d8b58d97fd82e6e4bc8984a3ec676c269efcde29dd842d61af826e8286.jpg) + +![](images/084e7f65bf3f7ee0fbc55a84d4daf205e4cb969c0cb7471eab119cb9ed1a588c.jpg) + +![](images/476cb5b02387b02d3c8b33a7bf1bbfecc4f470d647def3b427332835d5ff0bcd.jpg) + +![](images/6258fe1f07c51b56844c5b60d4514eb97f8896f9145ff0fe35fb287c6947d948.jpg) + +![](images/2da87c34012c53396ce88d7ab1b0b7a1ff2da5545a19468626ef42c7a179d071.jpg) +Figure 4: Examples of attention weight. To investigate where BAT-blocks focus for each group of attention, we visualize the attention weights of the last BAT block with 8 attention groups as the last block is most related to the final classification. These samples are taken from the validation set of ImageNet randomly. From left to right, each group contains an RGB image and its corresponding eight attention maps. For clear clarification, we note the attention weight images of each group as $a - d$ (the top 4 images, from left to right) and $e - h$ (the bottom 4 images, from left to right). We find that, for all examples, $e$ pays more attention to the bottom of images while $f$ focuses on the top regions, and these two attention collaborate with each other to classify an image by splitting the full image into two sub-regions. Additionally, $g$ tends to observe the background, and $h$ prefers to focus on the regions nearby the foreground. Therefore, they may help the network model rich context information. It can be found that all $a - d$ focus on the foreground, but there are still some differences each corresponding various discriminative details. More examples can be found in supplementary materials. + +![](images/a61889b6a9a60c63d12af2e4327174e367d4bd3724eb28596257d635a18c4358.jpg) + +![](images/bc44bccfff1cb5b09167d1c97ce8cc75e39d4ac16e1017e43698948f936ee375.jpg) + +![](images/90dd5a6cc937d9e43e6a5945e23d7d7005e6d8ece32a4cbd8bb95c6476b2ad09.jpg) + +
Backbone8-frame16-frame64-frame
ResNet-5075.576.977.7
ResNet-10176.277.4-
+ +Table 9: Results on Kinetics-400 with different length of sequences or backbones. All the models adopt C2D + 3D-BAT. For models with sequences longer than 8 frames, the block-based matrix trick is adopted along time dimension to reduce parameters, and the number of blocks are set to $8 \times 8$ . + +tention is noticeable. Additionally, our method outperforms NL networks by a large margin. Introducing 3D convolution improves C2D + BAT by $0.5\%$ while temporal attention improves $0.9\%$ with almost zero growth of both GFLOPs and parameter numbers, which shows the powerful ability of BAT-blocks to model 3D information. + +Comparing with other state-of-the-art, we can see that simply adding 2D BAT-blocks on a basic network can achieve a comparable results with other recent methods, and models with 3D BAT-block outperform most competitive models. Specifically, to our best knowledge, after finetuning with TSN framework [56], we can achieve a new state-of-the-art among models under the similar complexity. + +Longer sequences and deeper networks. Finally, we investigate the generality of our methods on longer input videos or deeper networks. And the results can be found in Table 9. For comparison, based on ResNet-101 and 128-frame clips, the accuracy of C2D baseline is $75.3\%$ and I3D + NL is $77.7\%$ [57], which shows that our methods work well on longer sequences or deeper networks. + +# 4.4. Visualization + +The above experiments have shown the effectiveness of BAT-Block on both 2D and 3D tasks, here we visualize several attention weight maps to investigate how BAT-Block works. In order to visualize where a block pays attention over input images, we adopt the following formula to reproject the attention weights to the input feature maps: + +$$ +\mathbf {W} = \mathbf {P} ^ {\intercal} \mathbf {A} \mathbf {Q} ^ {\intercal}, \tag {8} +$$ + +where $\mathbf{A} \in \mathbb{R}^{H \times W}$ is an all-ones matrix. $\mathbf{W}$ is the reprojected attention weight with shape $H \times W$ . The results are normalized between 0 and 255 for visualization. Some examples are depicted and analyzed in Figure 4. + +# 5. Conclusion + +We propose BA-Transform, a novel method which can model various attentional operations by matrix multiplication. The core operation is to learn data-adaptive grouped bilinear attentional transforms. We wrap this operation to a BAT-Block and carefully design transformation predictor. It can be dropped into most existing networks and optimized easily. Extensive experiments on image classification and video action recognition verify the superiority of our method both in accuracy and efficiency. Acknowledgement: This work is partially supported by Beijing Natural Science Foundation (Z190001), Beijing Municipal Commission of Science and Technology (Z181100008918005) and National Natural Science Foundation of China (61772037). + +# References + +[1] Bowen Baker, Otkrist Gupta, Nikhil Naik, and Ramesh Raskar. Designing neural network architectures using reinforcement learning. In ICLR, 2017. +[2] João Carreira and Andrew Zisserman. Quo vadis, action recognition? A new model and the kinetics dataset. In CVPR, pages 4724-4733, 2017. +[3] Jingwen Chen, Yingwei Pan, Yehao Li, Ting Yao, Hongyang Chao, and Tao Mei. Temporal deformable convolutional encoder-decoder networks for video captioning. In AAAI, pages 8167-8174, 2019. +[4] Liang-Chieh Chen, Yi Yang, Jiang Wang, Wei Xu, and Alan L. Yuille. Attention to scale: Scale-aware semantic image segmentation. In CVPR, pages 3640-3649, 2016. +[5] Xin Chen, Lingxi Xie, Jun Wu, and Qi Tian. Progressive differentiable architecture search: Bridging the depth gap between search and evaluation. In ICCV, 2019. +[6] Yunpeng Chen, Haoqi Fan, Bing Xu, Zhicheng Yan, Yannis Kalantidis, Marcus Rohrbach, Shuicheng Yan, and Jiashi Feng. Drop an octave: Reducing spatial redundancy in convolutional neural networks with octave convolution. ICCV, 2019. +[7] Yunpeng Chen, Yannis Kalantidis, Jianshu Li, Shuicheng Yan, and Jiashi Feng. A2-nets: Double attention networks. In NIPS, pages 350-359, 2018. +[8] Yunpeng Chen, Marcus Rohrbach, Zhicheng Yan, Shuicheng Yan, Jiashi Feng, and Yannis Kalantidis. Graph-based global reasoning networks. In CVPR, pages 433-442, 2019. +[9] Junsuk Choe and Hyunjung Shim. Attention-based dropout layer for weakly supervised object localization. In CVPR, pages 2219-2228, 2019. +[10] Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable convolutional networks. In ICCV, pages 764-773, 2017. +[11] Christoph Feichtenhofer, Haoqi Fan, Jitendra Malik, and Kaiming He. Slowfast networks for video recognition. In ICCV, pages 6202-6211, 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, pages 3146-3154, 2019. +[13] Jianlong Fu, Heliang Zheng, and Tao Mei. Look closer to see better: Recurrent attention convolutional neural network for fine-grained image recognition. In CVPR, pages 4476-4484, 2017. +[14] Shang-Hua Gao, Ming-Ming Cheng, Kai Zhao, Xin-Yu Zhang, Ming-Hsuan Yang, and Philip Torr. Res2net: A new multi-scale backbone architecture. IEEE TPAMI, 2020. +[15] Priya Goyal, Piotr Dólar, Ross B. Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch SGD: training imagenet in 1 hour. CoRR, abs/1706.02677, 2017. +[16] Karol Gregor, Ivo Danihelka, Alex Graves, Danilo Jimenez Rezende, and Daan Wierstra. DRAW: A recurrent neural network for image generation. In ICML, pages 1462-1471, 2015. + +[17] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. +[18] Andrew Howard, Mark Sandler, Grace Chu, Liang-Chieh Chen, Bo Chen, Mingxing Tan, Weijun Wang, Yukun Zhu, Ruoming Pang, Vijay Vasudevan, Quoc V. Le, and Hartwig Adam. Searching for mobilenetv3. In ICCV, 2019. +[19] Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. CoRR, abs/1704.04861, 2017. +[20] Han Hu, Zheng Zhang, Zhenda Xie, and Stephen Lin. Local relation networks for image recognition. CoRR, abs/1904.11491, 2019. +[21] Jie Hu, Li Shen, Samuel Albanie, Gang Sun, and Andrea Vedaldi. Gather-excite: Exploiting feature context in convolutional neural networks. In NeurlPS. +[22] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In CVPR, pages 7132-7141, 2018. +[23] Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q. Weinberger. Densely connected convolutional networks. In CVPR, pages 2261-2269, 2017. +[24] Zilong Huang, Xinggang Wang, Lichao Huang, Chang Huang, Yunchao Wei, and Wenyu Liu. Ccnet: Criss-cross attention for semantic segmentation. In ICCV, pages 603-612, 2019. +[25] Max Jaderberg, Karen Simonyan, Andrew Zisserman, and Koray Kavukcuoglu. Spatial transformer networks. In NIPS, pages 2017-2025, 2015. +[26] Andrej Karpathy, George Toderici, Sanketh Shetty, Thomas Leung, Rahul Sukthankar, and Fei-Fei Li. Large-scale video classification with convolutional neural networks. In CVPR, pages 1725–1732, 2014. +[27] Adam R. Kosiorek, Alex Bewley, and Ingmar Posner. Hierarchical attentive recurrent tracking. In NIPS, pages 3053-3061, 2017. +[28] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1106-1114, 2012. +[29] Hei Law and Jia Deng. Cornernet: Detecting objects as paired keypoints. In ECCV, pages 765-781, 2018. +[30] HyunJae Lee, Hyo-Eun Kim, and Hyeonseob Nam. SRM: A style-based recalibration module for convolutional neural networks. In ICCV, pages 1854-1862, 2019. +[31] Xiang Li, Wenhai Wang, Xiaolin Hu, and Jian Yang. Selective kernel networks. In CVPR, pages 510-519, 2019. +[32] Ji Lin, Chuang Gan, and Song Han. TSM: Temporal shift module for efficient video understanding. In ICCV, 2019. +[33] Tianwei Lin, Xu Zhao, Haisheng Su, Chongjing Wang, and Ming Yang. BSN: boundary sensitive network for temporal action proposal generation. In ECCV, pages 3-21, 2018. +[34] Chenchen Liu, Xinyu Weng, and Yadong Mu. Recurrent attentive zooming for joint crowd counting and precise localization. In CVPR, pages 1217-1226, 2019. +[35] Hanxiao Liu, Karen Simonyan, and Yiming Yang. DARTS: differentiable architecture search. In ICLR, 2019. + +[36] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. CoRR, abs/1411.4038, 2014. +[37] Xiang Long, Chuang Gan, Gerard de Melo, Jiajun Wu, Xiao Liu, and Shilei Wen. Attention clusters: Purely attention based local feature integration for video classification. In CVPR, pages 7834-7843, 2018. +[38] Ilya Loshchilov and Frank Hutter. SGDR: stochastic gradient descent with warm restarts. In *ICLR*, 2017. +[39] Ningning Ma, Xiangyu Zhang, Hai-Tao Zheng, and Jian Sun. Shufflenet V2: practical guidelines for efficient CNN architecture design. In ECCV, pages 122-138, 2018. +[40] Carl D. Meyer, editor. Matrix Analysis and Applied Linear Algebra. Society for Industrial and Applied Mathematics, Philadelphia, PA, USA, 2000. +[41] Volodymyr Mnih, Nicolas Heess, Alex Graves, and Koray Kavukcuoglu. Recurrent models of visual attention. CoRR, abs/1406.6247, 2014. +[42] 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. +[43] Zhaofan Qiu, Ting Yao, and Tao Mei. Learning spatiotemporal representation with pseudo-3d residual networks. In ICCV, pages 5534–5542, 2017. +[44] Zhaofan Qiu, Ting Yao, Chong-Wah Ngo, Xinmei Tian, and Tao Mei. Learning spatio-temporal representation with local and global diffusion. In CVPR, pages 12056-12065, 2019. +[45] Shaoqing Ren, Kaiming He, Ross B. Girshick, and Jian Sun. Faster R-CNN: towards real-time object detection with region proposal networks. In NIPS, pages 91-99, 2015. +[46] Laura Walker Renninger, James M. Coughlan, Preeti Verghese, and Jitendra Malik. An information maximization model of eye movements. In NIPS, pages 1121-1128, 2004. +[47] Mark Sandler, Andrew G. Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In CVPR, pages 4510-4520, 2018. +[48] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. +[49] Ke Sun, Mingjie Li, Dong Liu, and Jingdong Wang. IGCV3: interleaved low-rank group convolutions for efficient deep neural networks. In BMVC, page 101, 2018. +[50] 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. +[51] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In CVPR, pages 2818-2826, 2016. +[52] Du Tran, Lubomir D. Bourdev, Rob Fergus, Lorenzo Torresani, and Manohar Paluri. Learning spatiotemporal features with 3d convolutional networks. In ICCV, pages 4489-4497, 2015. + +[53] Du Tran, Heng Wang, Lorenzo Torresani, Jamie Ray, Yann LeCun, and Manohar Paluri. A closer look at spatiotemporal convolutions for action recognition. In CVPR, pages 6450-6459, 2018. +[54] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NIPS, pages 5998-6008, 2017. +[55] Fei Wang, Mengqing Jiang, Chen Qian, Shuo Yang, Cheng Li, Honggang Zhang, Xiaogang Wang, and Xiaou Tang. Residual attention network for image classification. In CVPR, pages 6450-6458, 2017. +[56] Limin Wang, Yuanjun Xiong, Zhe Wang, Yu Qiao, Dahua Lin, Xiaou Tang, and Luc Van Gool. Temporal segment networks: Towards good practices for deep action recognition. In ECCV, pages 20-36, 2016. +[57] Xiaolong Wang, Ross B. Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, pages 7794-7803, 2018. +[58] Xiaolong Wang and Abhinav Gupta. Videos as space-time region graphs. In ECCV, pages 399-417, 2018. +[59] Sanghyun Woo, Jongchan Park, Joon-Young Lee, and In So Kweon. CBAM: convolutional block attention module. In ECCV, pages 3–19, 2018. +[60] Zuxuan Wu, Xi Wang, Yu-Gang Jiang, Hao Ye, and Xi-angyang Xue. Modeling spatial-temporal clues in a hybrid deep learning framework for video classification. In ACM Multimedia, pages 461–470, 2015. +[61] Saining Xie, Ross B. Girshick, Piotr Dólar, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In CVPR, pages 5987-5995, 2017. +[62] Saining Xie, Chen Sun, Jonathan Huang, Zhuowen Tu, and Kevin Murphy. Rethinking spatiotemporal feature learning for video understanding. CoRR, abs/1712.04851, 2017. +[63] Xiangyu Zhang, Xinyu Zhou, Mengxiao Lin, and Jian Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. In CVPR, pages 6848-6856, 2018. +[64] Xizhou Zhu, Han Hu, Stephen Lin, and Jifeng Dai. Deformable convnets V2: more deformable, better results. In CVPR, pages 9308-9316, 2019. \ No newline at end of file diff --git a/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/images.zip b/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..e1ebfece860faae0d5a15408009ed07c41d7bcb9 --- /dev/null +++ b/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:116c0c8be9b398e1271692c19457c6b6cb8e6867ab986e575d2c4dfa76e147d2 +size 473047 diff --git a/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/layout.json b/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a0433344e1d48a5393ec063e16078dc1e07d706d --- /dev/null +++ b/nonlocalneuralnetworkswithgroupedbilinearattentionaltransforms/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c751cce6849d5d061cb8ea33968b467b92a736c8e0af046de5ea9ab6df7349d +size 482689 diff --git a/nonparametricobjectandpartsmodelingwithliegroupdynamics/21fe1d55-7baa-4e3c-bb51-62f4f6ff7c3d_content_list.json b/nonparametricobjectandpartsmodelingwithliegroupdynamics/21fe1d55-7baa-4e3c-bb51-62f4f6ff7c3d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..86a53c26449a527f32bbf0f4bf8dbb5cd4a222a3 --- /dev/null +++ b/nonparametricobjectandpartsmodelingwithliegroupdynamics/21fe1d55-7baa-4e3c-bb51-62f4f6ff7c3d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bb4eba66d0a37445e01e581a4f6a9c3b93d9519085533bfbfda8ab5e7e25cdf +size 93706 diff --git a/nonparametricobjectandpartsmodelingwithliegroupdynamics/21fe1d55-7baa-4e3c-bb51-62f4f6ff7c3d_model.json b/nonparametricobjectandpartsmodelingwithliegroupdynamics/21fe1d55-7baa-4e3c-bb51-62f4f6ff7c3d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..0904c4e1894d21927da50ea3e02213de6a969a5a --- /dev/null +++ b/nonparametricobjectandpartsmodelingwithliegroupdynamics/21fe1d55-7baa-4e3c-bb51-62f4f6ff7c3d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ec3589f7ff9086ba90149f1091773015762858b2a14138ee80d92e368f2627d +size 105389 diff --git a/nonparametricobjectandpartsmodelingwithliegroupdynamics/21fe1d55-7baa-4e3c-bb51-62f4f6ff7c3d_origin.pdf b/nonparametricobjectandpartsmodelingwithliegroupdynamics/21fe1d55-7baa-4e3c-bb51-62f4f6ff7c3d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6238779da4d20c6f38b1a2a91ee4334adf6b1acc --- /dev/null +++ b/nonparametricobjectandpartsmodelingwithliegroupdynamics/21fe1d55-7baa-4e3c-bb51-62f4f6ff7c3d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7bc8ae7e8a13b88a3922477e2cb56b9038c609bb7118a7ce6b871f9d6a0051b0 +size 7563981 diff --git a/nonparametricobjectandpartsmodelingwithliegroupdynamics/full.md b/nonparametricobjectandpartsmodelingwithliegroupdynamics/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f06ed4e074a5095a8736862b0b336da66250e21c --- /dev/null +++ b/nonparametricobjectandpartsmodelingwithliegroupdynamics/full.md @@ -0,0 +1,468 @@ +# Nonparametric Object and Parts Modeling with Lie Group Dynamics + +David S. Hayden, Jason Pacheco, John W. Fisher III +Computer Science and Artificial Intelligence Laboratory +Massachusetts Institute of Technology +77 Massachusetts Ave., Cambridge, MA 02139 +{dshayden, pachecoj, fisher}@csail.mit.edu + +# Abstract + +Articulated motion analysis often utilizes strong prior knowledge such as a known or trained parts model for humans. Yet, the world contains a variety of articulating objects-mammals, insects, mechanized structures-where the number and configuration of parts for a particular object is unknown in advance. Here, we relax such strong assumptions via an unsupervised, Bayesian nonparametric parts model that infers an unknown number of parts with motions coupled by a body dynamic and parameterized by $SE(D)$ , the Lie group of rigid transformations. We derive an inference procedure that utilizes short observation sequences (image, depth, point cloud or mesh) of an object in motion without need for markers or learned body models. Efficient Gibbs decompositions for inference over distributions on $SE(D)$ demonstrate robust part decompositions of moving objects under both 3D and 2D observation models. The inferred representation permits novel analysis, such as object segmentation by relative part motion, and transfers to new observations of the same object type. + +# 1. Introduction + +The world is full of moving objects comprised of articulating parts. Despite the wide range and complexity of such objects, humans have a remarkable ability to accurately discern both the number of articulating parts and their relation to the whole with few observations. We are interested in developing reasoning methods and algorithms that mimic this ability. While one might consider supervised methods that rely on large amounts of labeled training data about every conceivable object, articulated motion and view, the task of data collection seems daunting and unnecessary. + +Consequently, we develop a generative model that infers an object decomposition solely from brief observations of the object in motion. Specifically, we propose a parts-based representation that leverages Bayesian nonparametric dynamical models while eschewing strong assumptions about + +![](images/445425f7b3d9aebc89db2e5d4daa74f0cac658b84a7762877da12239eb24c5dd.jpg) +Figure 1. The number, rotation, translation, and shape of an object's parts are learned from a small number of observations of that object in motion. Motion of the body and parts is parameterized by the Lie group of rigid transformations in 3D or 2D. Supported data sources include sequences of meshes / point clouds (A, human), depth data (B, marmoset), and 2D images (C, hand, spider). + +the number or configuration of parts. The model simultaneously infers a dynamic body frame, the number of parts, and their motion relative to the body frame. Diverse inputs are supported-2D image sequences, 2.5D depth sequences and 3D point cloud or mesh sequences—without need for restrictive assumptions about target appearance or the existence of specially-placed markers or sensors. + +Objects and parts are assumed to rotate and translate smoothly in space, leading to a natural parameterization in $\operatorname{SE}(D)$ , the Lie group of rigid transformations. By representing statistics of motion in the Lie algebra $\operatorname{se}(D)$ , we derive closed-form Gibbs updates on translation dynamics, and an efficient sampler for rotation dynamics. + +Contributions. We specify a novel Bayesian nonparametric model that is well-suited to the properties of articulated objects in motion (part persistence, rigid transformation dynamics, unknown number of parts). We demonstrate a novel decomposition of inferring translations and rotations in posterior distributions on $\mathrm{SE}(D)$ with concentrated Gaussian [35] priors. We validate our methods on 2D and 3D sequences containing different object types. We show that the parts in one data sequence transfer to other data sequences of the same object type (but different instance). Finally, we present novel analysis of the motion of different + +![](images/79bc21ab8e1465ded9bdaa81a38affead73c547c7233009112c45b29902e9abe.jpg) +Figure 2. Simplified graphical model for an unknown number of time-varying parts $\{\theta_{tk}\}_{t = 1,k = 1}^{T,\infty}$ coupled by shared dynamics $\{x_{t}\}_{t = 1}^{T}$ . Observations $y_{tn}$ are generated by part $k$ if $z_{tn} = k$ . Stick weights $\{\pi_k\}_{k = 1}^{\infty}$ influence the observation counts for each part. Priors and $\{Q,\omega_k,S_k,W_k,E_k\}$ omitted for clarity. + +regions of an object, such as segmenting an object based on the motion of its parts relative to the body frame. + +# 2. Related Work + +This work draws on body/parts models, Bayesian nonparametric dynamical models and Lie groups. Each contains a rich literature so we highlight only the most relevant details. Importantly, we are aware of no work that models body and part motion over time with Lie group dynamics, that is also unsupervised and nonparametric in the parts. Body and Part Models The many treatments of part-based modeling begin with the pioneering work on human models of pictorial structures [10] and cardboard people [18]. Later work on deformable parts models [9] removes the need to define object-specific part configurations. Building on the success of offline analysis, real-time human pose tracking is now possible as well [27, 13]. All of these methods require specifying the number of parts. More detailed shape and pose models have been developed for a variety of objects, using a combination of known body models, mesh representations and sophisticated collection schemes including multiple cameras, IMUs, lasers and/or specially-painted targets [21, 41, 3, 24]. + +Unsupervised methods [36, 20, 26, 41, 40] have significant restrictions such as working for only 2D or only 3D data, or requiring annotated landmarks or point correspondences. In contrast, our unsupervised method works for 2D and 3D inputs, requires only a single sensor observing an object in motion, requires no distinctive or annotated object markings, and no observation correspondences. + +Lie Groups Our work relies on the Lie group $\mathrm{SE}(D)$ , the space of rigid transformations, for representing body and part motion. Lie groups have been used extensively in robotics and computer vision tasks such as SLAM [6], navigation [19], and parts-based models [5, 14, 17]. Defining observation models for Lie groups is challenging since the group is not a vector space. As such, notions of distance + +(and therefore distributions) require special care [23, 37], e.g., simple additive noise models violate the group topology. Our approach defines a distribution (Gaussian) in the tangent plane about an element of the group [35]. Most works that model dynamics with $\mathrm{SE}(D)$ perform inference with approximate filters or smoothers, commonly the EKF [4] or UKF [6]. One exception that does full posterior inference is [28], though that work is not a dynamical model. See [8] for an accessible introduction to Lie groups, and [16] for a more thorough introduction. + +Nonparametric Models Sequential models extending the well-known Dirichlet process (DP) [1] include the HDP-HMM [31], sticky HDP-HMM [12], infinite HMM [2], and infinite factorial HMM (ifHMM) [15]. Each of these permits an infinite number of states, but are restricted to discrete labels. Extensions to continuously-varying latent states include the HDP-SLDS [11], dynamic HDP [25], mixture of DPs [7], and the evolutionary HDP [38]. While each has the desirable property of shared global dynamics, none capture component persistence allowing new atoms at each time instance. This is undesirable for parts modeling as objects do not tend to acquire and lose parts over time and nonparametric priors already risk creating duplicate parts [12]. + +Closely related is the infinite factorial dynamical model [32], a continuous extension of the ifHMM which only permits shared global binary on/off states, and the Transformed Dirichlet Process [30], a DP allowing multiple groups of observations to share the same set of atoms (but with no dynamics). Most relevant, and what we use for comparison, is the Bayesian nonparametric model of Zhou et al. [39], a linear dynamical model where parts are independently sampled from a Dirichlet process at each time (but with no part persistence or Lie group representation). + +# 3. Model + +Let $t = 1,\dots ,T$ index time, $k = 1,\ldots ,\infty$ index parts, and $n = 1,\dots ,N_{t}$ index observations at time $t$ Most generally, our nonparametric parts model (Figure 2) takes as its sole input observations $\{y_t\}_{t = 1}^T$ where the $t^{\mathrm{th}}$ batch $y_{t} = \{y_{tn}\}_{n = 1}^{N_{t}}$ contains $N_{t}$ observations with unknown correspondence. There is a global (body) dynamic with time-varying parameters $x_{t}$ and time-fixed parameter $Q$ . There are an unknown number of components (parts) with time-varying parameters $\theta_{tk}$ and time-fixed parameters $\{\omega_k,S_k,E_k,W_k\}$ . Stochastic dynamics models $f,g$ and stochastic observation model $h$ are, for each $t,k,n$ + +$$ +\begin{array}{l} x _ {t} \sim f (x _ {t - 1}, Q) \quad \theta_ {t k} \sim g \left(\theta_ {(t - 1) k}, \omega_ {k}, S _ {k}\right) \\ y _ {t n} \sim h \left(x _ {t}, \theta_ {t z _ {t n}}, \omega_ {z _ {t n}}, E _ {z _ {t n}}\right) \\ \end{array} +$$ + +where $z_{tn} = k$ indicates that observation $y_{tn}$ was generated by component $k$ . A prior probability of association is given + +by the discrete distribution of stick weights $\pi$ (for $\alpha > 0$ ): + +$$ +z _ {t n} \sim \pi \quad \pi \sim \operatorname {G E M} (\alpha) \tag {1} +$$ + +To specialize for object and parts modeling we must further specify the domain of random variables $\{y_{tn},x_t,\theta_{tk},\omega_k,S_k,E_k,W_k,Q\}$ , the form of priors $\{H_x,H_\theta ,H_\omega ,H_S,H_E,H_W,H_Q\}$ and the forms of $\{f,g,h\}$ . First, we introduce distributions on Lie groups. + +# 3.1. Lie Groups + +A Matrix Lie group $G$ is a continuous group whose elements can be described by matrices with special structure. In this work, $G = \operatorname{SE}(D)$ , the space of rigid transformations on $\mathbb{R}^D$ or $G = \operatorname{SO}(D)$ the space of $D$ -dimensional proper rotations. Associated to $G$ is Lie algebra $\mathfrak{g}$ , which can be viewed as a local vector space approximation about the identity element of $G$ . This approximation can be made with respect to any element in $G$ because group elements compose via matrix multiplication and each element has an inverse. For $b, \mu \in G$ we call the local vector space approximation about $\mu$ the tangent space of $\mu$ , denoted $T_{\mu}G$ . Mappings to and from the tangent space of $\mu$ are accomplished via the left-invariant Riemannian logarithm and left-invariant Riemannian exponential, + +$$ +\operatorname {L o g}: G \times G \rightarrow \mathfrak {g} = \log_ {\mu} b = \log_ {G} (\mu^ {- 1} b) \tag {2} +$$ + +$$ +\operatorname {E x p}: G \times \mathfrak {g} \rightarrow G = \operatorname {E x p} _ {\mu} v = \mu \exp_ {G} (v) \tag {3} +$$ + +where $v \in \mathfrak{g}$ is a tangent vector in the tangent space of $\mu$ , and $\log_G, \exp_G$ are the Lie group logarithm and exponential maps, which can be computed using the matrix logarithm and matrix exponential. Note that $v$ is called a tangent vector even though it is represented as a matrix: this is because a bijective mapping exists between a matrix and vector representation of $v$ . We omit additional notation for brevity. + +# 3.1.1 Distributions on Lie Groups + +Constructing a distribution on $G$ to reason over body and parts models is complicated by the fact that $G$ is not a vector space. Exploiting the maps between group elements and their tangent spaces, we can define a distribution with location parameter $\mu \in G$ by mapping its support to the tangent space of $\mu$ . Define the left-invariant concentrated Gaussian $\mathrm{N_L}(\cdot)$ in terms of the multivariate Gaussian $\mathrm{N}(\cdot)$ : + +$$ +\mathrm {N} _ {\mathrm {L}} (b | \mu , \Sigma) = \mathrm {N} (\log_ {\mu} b | 0, \Sigma) \tag {4} +$$ + +In similar fashion to [29] this can be thought of as a Gaussian in the tangent space about mean $\mu \in G$ . The covariance $\Sigma$ exists in the tangent space and can be understood to operate the same as in the typical Euclidean case except that vectors in $T_{\mu}G$ must be mapped back to the group by Eqn. 3. See Figure 3 for a visualization on SO(2). + +![](images/c1b6b87283b0482a8360190572bcc9920d41132dc33bcfba055a848e1ca5d73b.jpg) +Figure 3. Location and scale distributions such as Gaussians can be locally defined about element $\mu$ in Lie group $G$ by mapping their support into the local vector space approximation $T_{\mu}G$ . + +# 3.1.2 $\mathbf{SE}(D)$ Actions + +Represent $b, c \in G = \operatorname{SE}(D)$ as real block matrices, + +$$ +b = \left( \begin{array}{c c} R _ {b} & d _ {b} \\ 0 & 1 \end{array} \right) \quad c = \left( \begin{array}{c c} R _ {c} & d _ {c} \\ 0 & 1 \end{array} \right) \tag {5} +$$ + +The $R_{*}$ are $D\times D$ rotation matrices (with determinant $+1$ ) in $\mathrm{SO}(D)$ and the $d_{*}$ are translations in $\mathbb{R}^D$ . Henceforth, we use this notation to represent the rotation and translation components of any element in $\mathrm{SE}(D)$ ; for example, if $x_{t}\in$ $\mathrm{SE}(D)$ then it has rotation $R_{x_t}$ and translation $d_{x_t}$ . + +Elements of $\mathrm{SE}(D)$ compose via matrix multiplication (maintaining group closure), and act as a change of basis for homogeneous coordinates $\tilde{p}$ of point $p\in \mathbb{R}^D$ .. + +$$ +b c \tilde {p} = \left( \begin{array}{c} R _ {b} \left(R _ {c} p + d _ {c}\right) + d _ {b} \\ 1 \end{array} \right) \tag {6} +$$ + +If $\tilde{p}$ are coordinates in frame $c$ then $c\tilde{p}$ can be interpreted as its coordinates in frame $b$ and $bc\tilde{p}$ can be interpreted as its coordinates in the standard (or world) basis. In general, changes of bases are best viewed as composing from left to right, but acting on points from right to left. + +# 3.2. Body and Parts Model + +Let $G = \operatorname{SE}(D)$ for dimension $D \in \{2,3\}$ . We seek to infer a parts decomposition of an articulating object by directly observing it in motion. Specifically, we model the inputs $y_{tn} \in \mathbb{R}^D$ as being random collections of points sampled within the object as it moves across time. Variable (including no) observations are supported at each time, and no correspondence between observations is assumed. Diverse inputs are supported, including foreground pixels of 2D image sequences, unprojected points from depth sequences, and 3D point clouds sampled within mesh sequences. + +We assume part persistence—an object does not gain or lose parts over time. We also assume that parts move smoothly through space but remain close (in an L2 sense) to a common body which also moves smoothly. The relation between body and part motion could be modeled in + +![](images/09c8b5da108d02b0f4dec658cb9cf49d5fe5974cf409bc8cf7676d92bd88a494.jpg) +Figure 4. The frames that comprise an object at time $t$ . Per-time body frames $x_{t}$ are rigid transformations from world frame $W$ . Each part $k$ contains a time-fixed canonical part frame $\omega_{k}$ and a per-time part frame $\theta_{tk}$ . $\omega_{k}$ are a rigid transformation from body frame $x_{t}$ while $\theta_{tk}$ are a rigid transformation from $\omega_{k}$ . Using stabilized random walk dynamics, each per-time part frame $\theta_{tk}$ is designed to transform smoothly over time but remain near the origin of their respective canonical part frame $\omega_{k}$ . + +many ways: one naive extreme would be to model them as floating bodies with linear dynamics while the other extreme would be to model them as existing in a skeletal network of joints. Linear dynamics would fail to capture part articulation while skeletal networks are overly restrictive. + +We take a middle ground: parts $\{\theta_{tk},\omega_k,S_k,E_k,W_k\}$ are modeled as floating bodies that rotate and translate smoothly through space about a body frame $x_{t}\in G$ , but whose origins tend to remain near the origin of a canonical part frame $\omega_{k}\in G$ through stabilized random walk dynamics. Canonical part frames are close to the body frame and remain fixed across time but parts also have per-time frames $\theta_{tk}\in G$ . Parts are not fixed in their spatial extent; instead, they have a probabilistic, ellipsoidal shape model governed by Gaussian covariance $E_{k}$ . Part dynamics are governed by covariance $S_{k}$ and body dynamics are governed by covariance $Q$ . The dispersion of canonical part frames about the body frame is governed by covariance $W_{k}$ . Figure 4 graphically depicts how body and part frames compose. + +# 3.2.1 Body and Part Dynamics + +Body frames $x_{t}$ and parts evolve independently, but are implicitly coupled through the observation model. In particular, the body frame stochastic dynamics model is: + +$$ +x _ {t} \sim \mathrm {N} _ {\mathrm {L}} \left(x _ {t} \mid x _ {t - 1}, Q\right) \tag {7} +$$ + +Object dynamics are a non-linear random walk on $G$ whose noise covariance $Q$ exists in the tangent space about the body frame at the previous time. Canonical part frames $\omega_{k}$ are dispersed about the body frame with covariance $W_{k}$ , + +$$ +\omega_ {k} \sim H _ {\omega} = \mathrm {N} _ {\mathrm {L}} (\cdot \mid I, W _ {k}) \tag {8} +$$ + +where $I \in G$ is the identity element (no translation or rotation) and covariance $W_{k}$ can be thought to (implicitly) exist in the tangent space of $x_{t}$ . Each part has per-time dynamics $\theta_{tk}$ with driving noise covariance $S_{k}$ governed by: + +$$ +\theta_ {t k} = \left( \begin{array}{c c} \operatorname {E x p} _ {R _ {\theta_ {(t - 1) k}}} \phi_ {t k} & A d _ {\theta_ {(t - 1) k}} + B m _ {t k} \\ 0 & 1 \end{array} \right) \tag {9} +$$ + +with constants $A = \operatorname{diag}(\sqrt{a}, \ldots, \sqrt{a})$ , $B = \operatorname{diag}(\sqrt{1 - a}, \ldots, \sqrt{1 - a})$ and Exp in Eqn. 9 the Riemannian exponential for $\mathrm{SO}(D)$ . $\phi_{tk} \in \mathrm{so}(D)$ is a vector in the tangent space of $R_{\theta_{(t-1)k}}$ . Part translation driving noise $m_{tk}$ and rotation driving noise $\phi_{tk}$ are jointly distributed: + +$$ +\left(m _ {t k}, \phi_ {t k}\right) \sim \mathrm {N} (0, S _ {k}) \tag {10} +$$ + +As proven in the supplemental, carefully chosen coefficients of matrices $A, B$ ( $a = 0.95$ ) cause the asymptotic covariance of the part translation $d_{\theta_{tk}}$ to equal the covariance of translation driving noise $m_{tk}$ . This form enables parts to transform smoothly, but never too far from their canonical location, and mitigated part confusion during inference. + +All driving noise covariances are drawn from Inverse-Wishart distributions, where we note that our model supports arbitrary correlations between translation and rotation for object, canonical part, and part transformations: + +$$ +Q \sim H _ {Q} = \operatorname {I W} \left(\cdot | v _ {Q _ {0}}, \Lambda_ {Q _ {0}}\right) \tag {11} +$$ + +$$ +S _ {k} \sim H _ {S} = \mathrm {I W} (\cdot | v _ {S _ {0}}, \Lambda_ {S _ {0}}) \tag {12} +$$ + +$$ +W _ {k} \sim H _ {W} = \mathrm {I W} \left(\cdot \mid v _ {W _ {0}}, \Lambda_ {W _ {0}}\right) \tag {13} +$$ + +And initial body and part frames are drawn according to: + +$$ +x _ {1} \sim H _ {x} = \mathrm {N} _ {\mathrm {L}} (\cdot | x _ {0}, \Sigma_ {x}) \tag {14} +$$ + +$$ +\theta_ {1 k} \sim H _ {\theta} = \mathrm {N} _ {\mathrm {L}} (\cdot | \theta_ {0}, \Sigma_ {\theta}) \tag {15} +$$ + +# 3.2.2 Observation Models for 3D and 2D data + +Input $y_{tn}$ is assumed to be in world coordinate system $W$ , which is assumed to be aligned with the sensor's coordinate system (hence, $W$ has no rotation or translation and is henceforth omitted). Parts generate observations in their respective part coordinate systems and are mapped to world coordinates via $\theta_{tk}, \omega_k$ and the body frame $x_t$ . That is, part $k$ generates point $e_{tn} \sim \mathrm{N}(0, E_k)$ which is then mapped to world coordinates $\tilde{y}_{tn} = x_t \omega_k \theta_{tk} \tilde{e}_{tn}$ if $z_{tn} = k$ (where $(\cdot)$ is a homogeneous projection of $(\cdot)$ ). The transformation is linear in $\tilde{e}_{tn}$ allowing straightforward mean and variance computations of the homogeneous point in world coordinate $\tilde{y}_{tn}$ , yielding the following observation model (for $z_{tn} = k$ ) + +$$ +\tilde {y} _ {t n} \sim \mathrm {N} (\tilde {y} _ {t n} | x _ {t} \omega_ {k} \theta_ {t k} \tilde {0} _ {\mathbb {R}}, x _ {t} \omega_ {k} \theta_ {t k} \tilde {E} _ {k} \theta_ {t k} ^ {\top} \omega_ {k} ^ {\top} x _ {t} ^ {\top}) \tag {16} +$$ + +where $\tilde{0}_{\mathbb{R}}$ is the homogeneous zero vector in $\mathbb{R}^D$ and $\tilde{E}_k$ is a degenerate block covariance matrix $E_{k}$ with a zero row and column (a covariance in homogeneous coordinates). Without homogeneous coordinates, this is (via Eqn. 5): + +$$ +y _ {t n} \sim \mathrm {N} \left(y _ {t n} \mid \mu_ {t k}, \Sigma_ {t k}\right) \tag {17} +$$ + +$$ +\mu_ {t k} = R _ {x _ {t}} R _ {\omega_ {k}} \left(d _ {\theta_ {t k}} + d _ {\omega_ {k}}\right) \tag {18} +$$ + +$$ +\Sigma_ {t k} = R _ {x _ {t}} R _ {\omega_ {k}} R _ {\theta_ {t k}} E _ {k} R _ {\theta_ {t k}} ^ {\top} R _ {\omega_ {k}} ^ {\top} R _ {x _ {t}} ^ {\top} \tag {19} +$$ + +While simple, it accommodates image plane observations in 2D, depth observations in 2.5D and XYZ observations in 3D. Incorporating additional terms (e.g., appearance) is straightforward, but were not needed for our purposes. As with most generative models, robustness to missing data (common for depth sensors) is handled seamlessly. + +The observation covariance $\Sigma_{tk}$ for $y_{tn}$ is some rotation of $E_{k}$ for $z_{tn} = k$ due to the composition of body and part frames. Consequently, $E_{k}$ is constrained to be diagonal (i.e. axis-aligned) so as to avoid ambiguity. While the use of $E_{k}$ implies a probabilistic, ellipsoid part shape model, its primary function is to yield robust associations $z_{tn}$ of observations to parts. Here, we use the following prior: + +$$ +E _ {k} \sim H _ {E} = \operatorname {I W} \left(\cdot | v _ {E _ {0}}, \Lambda_ {E _ {0}}\right) \tag {20} +$$ + +# 4. Inference + +We wish to sample from the posterior, which has likelihood proportional to the product of Equations (1, 7, 8, 10, 11, 12, 13, 14, 15, 17, 20) over all $t, k, n$ . This is accomplished with Markov Chain Monte Carlo (MCMC) inference that exploits Gaussian statistics in the tangent space for efficient updates while simultaneously respecting the geometry of the Lie group via Eqns. 2 and 4. This is accomplished by sampling from the full conditional distributions of each latent variable, grouped in order of discussion, + +$$ +\left(x _ {t}, \theta_ {t k}, \omega_ {k}\right) \quad z _ {t n} \quad \left(\pi , E _ {k}, S _ {k}, Q\right) \tag {21} +$$ + +![](images/14c661bbdcebc47aff23fe9abb88c80057238e18cee587b1fa5448fafd91fbf0.jpg) +Body Frame Projection + +![](images/260a5681abb9bbc5f620e2fc83a68c66356d491d2c045ba8ac4cf152952813dd.jpg) +Tangent Distribution +Figure 5. Left: Object dynamics of body frame at time $t$ are projected into coordinates at time $t - 1$ by the Lie group operation $x_{t - 1}^{-1}x_{t}$ . Right: The projection is in $SE(3)$ with Gaussian statistics in the tangent plane of $x_{t - 1}$ . The figure notionally depicts two degrees of freedom, whereas $SE(3)$ would have 6 degrees. + +where $t = 1, \ldots, T, k = 1, \ldots, \infty, n = 1, \ldots, N_t$ and omitted leading subscripts are taken to mean joint dependence (i.e. $y = \{y_t\}_{t=1}^T$ and $y_t = \{y_{tn}\}_{n=1}^{N_t}$ ). Inference complexity is linear in the number of observations and parts. In our experiments, chains were generally mixed after about 300 samples, with approximately 1 minute per sample being the worst-case timing for any data we tested on. + +In the sequel we sketch the sampling of body transformations $x_{t}$ . Full details are in the supplement, along with sampling of the canonical parts $\omega_{k}$ and part transformations $\theta_{tk}$ which take a similar form. We also discuss sampling part associations $z_{tn}$ , which are conjugate except when sampling assignments to the base measure. The conditionals in the third grouping $(\pi, E_{k}, S_{k}, Q)$ can be sampled analytically due to conjugate priors, which we defer to the supplement. Finally, parts $\{\theta_{tk}, \omega_{k}, S_{k}, W_{k}, E_{k}\}$ can be sampled in parallel across $k$ and $z_{tn}$ can be sampled in parallel across $t, n$ . + +# 4.1. Decomposition of Lie Group dynamics + +We exploit the Lie algebra to develop an efficient Gibbs sampler for dynamical terms $\{x_{t},\omega_{k},\theta_{tk}\}$ . For example, the operation $x_{t - 1}^{-1}x_{t}$ transforms the body frame at time $t$ into that of the body frame at time $t - 1$ (Fig. 5, left). This operation is an element of $SE(D)$ : + +$$ +x _ {t - 1} ^ {- 1} x _ {t} \triangleq \left( \begin{array}{c c} R _ {x _ {t - 1}, x _ {t}} & d _ {x _ {t - 1}, x _ {t}} \\ 0 & 1 \end{array} \right), \tag {22} +$$ + +where $R_{x_{t-1}^{-1}, x_t} = R_{x_{t-1}}^T R_{x_t}$ and $d_{x_{t-1}^{-1}, x_t} = R_{x_{t-1}}^T (d_{x_t} - d_{x_{t-1}})$ . Elements in the frame $x_t$ are mapped to the tangent space of $x_{t-1}$ via the Riemannian Log map (Fig. 5, right): + +$$ +\log_ {x _ {t - 1}} x _ {t} \triangleq \log_ {G} \left(x _ {t - 1} ^ {- 1} x _ {t}\right) = \left( \begin{array}{c} V _ {x _ {t - 1} ^ {- 1}, x _ {t}} ^ {- 1} d _ {x _ {t - 1} ^ {- 1}, x _ {t}} \\ \phi_ {x _ {t - 1} ^ {- 1}, x _ {t}} \end{array} \right) \tag {23} +$$ + +The first entry $V_{x_{t-1}, x_t}^{-1} d_{x_{t-1}, x_t}^{-1}$ are tangent space coordinates of translation and the second entry $\phi_{x_{t-1}, x_t}^{-1}$ is a rota + +tion vector. The invertible linear operator $V_{x_{t-1}^{-1}, x_t}^{-1}$ is computable from rotation $R_{x_{t-1}^{-1}, x_t}$ (or from $\phi_{x_{t-1}^{-1}, x_t}$ ). This is well-defined for $x_{t-1}^{-1} x_t$ sufficiently close to identity and consistent with small incremental motions. + +# 4.2. Gibbs Sampling Updates + +Recall that Eqns. (22) and (23) map $x_{t}$ to the tangent space of $x_{t-1}$ . When conditioned on rotation, this mapping is linear in the translation component $d_{x_{t}}$ . This observation, combined with Gaussian statistics in the tangent space, yields closed-form Gibbs updates for translation. To see this, observe that the distribution over dynamics in the tangent space is (Fig. 5, right), + +$$ +\mathrm {N} _ {L} \left(x _ {t} \mid x _ {t - 1}, Q\right) = \mathrm {N} \left(\left( \begin{array}{c} C d _ {x _ {t}} + u \\ \phi_ {x _ {t - 1} ^ {- 1}, x _ {t}} \end{array} \right) | 0, Q\right) \tag {24} +$$ + +where $C = V_{x_{t - 1}^{-1}, x_t}^{-1} R_{x_{t - 1}}^{\top}$ and $u = -V_{x_{t - 1}^{-1}, x_t} R_{x_{t - 1}}^{\top} d_{x_{t - 1}}$ . Conditioned on rotation $R_{x_t}$ and previous body frame $x_{t - 1}$ , the corresponding rotation vector $\phi_{x_{t - 1}^{-1}, x_t}$ and matrix $V_{x_{t - 1}^{-1}, x_t}^{-1}$ are fixed quantities. This renders $C$ and $u$ computable and yields a Gaussian conditional distribution for $d_{x_t}$ . This conditional constitutes our prior belief about $d_{x_t}$ given $R_{x_t}$ , $x_{t - 1}$ and covariance $Q$ . Similar logic allows us to derive a Gaussian conditional on $d_{x_t}$ given future transformation $x_{t + 1}$ . These can be analytically combined to provide a Gaussian distribution for $d_{x_t} \mid R_{x_t}$ , $x_{t - 1}$ , $x_{t + 1}$ . Because this is Gaussian, and the observation model is also a product of Gaussians whose parameters are known given $\{\omega_k, E_k, \theta_{tk}\}_{k = 1}^{\infty}$ and $\{z_{tn}\}_{n = 1}^{N_t}$ , it follows that the posterior on $d_{x_t}$ is also Gaussian, and analytically computable. + +In contrast, sampling of rotation parameters lacks a closed form. We utilize univariate slice sampling [22] for the full conditional of each rotation parameter, along with a fixed number of MCMC proposals to correct for known rotational symmetries. Details are in the supplement. + +Part Association The conditional distribution for a single assignment to an existing part $k \geq 1$ is given by $p(z_{tn} = k \mid y_{tn}, x_t, \omega, \theta_t, \pi, E) \propto \pi_k p(y_{tn} \mid x_t, \omega_k, \theta_{tk}, E_k)$ . Conversely, association to a new part is given by, + +$$ +\begin{array}{l} p \left(z _ {t n} = - 1 \mid y _ {t n}, x _ {t}, \omega , \theta_ {t}, \pi , E\right) \propto \tag {25} \\ \pi_ {*} \int p (y _ {t n} | x _ {t}, \omega_ {*}, \theta_ {t *}, E _ {*}) p (\omega_ {*}, \theta_ {t *}, E _ {*}) \mathrm {d} (\omega_ {*}, \theta_ {t *}, E _ {*}) \\ \end{array} +$$ + +where $\pi_*$ is the stick weight corresponding to the base measure (i.e. all uninstantiated parts). This is not analytic in our model, but can be effectively approximated by Monte Carlo sampling of parts (need only be done once) or approximation by a constant (since the predictive distribution of parts will be broad, but centered at the object frame of reference). We obtain satisfactory results with both approaches. + +# 5. Results + +We compare quantitatively and qualitatively to nonparametric and parametric baselines in 5.1. We present results on dynamic mesh data in 5.2 and demonstrate object segmentation based on relative part motion in 5.3. We show transfer of learned representations to a novel dataset and synthesize motion from the learned representation in the supplement. The video supplemental animates these results. + +# 5.1.Quantitative Comparison + +We examine part discovery performance on three object motion datasets and compare to manually-annotated ground-truth. We emphasize that annotations are not incorporated into the inference procedure. We refer to the datasets as hand, spider, and marmoset. hand and spider are 2-D image data, while marmoset is 3D data unprojected from a depth camera. Inference utilizes $12 - 44$ frames (depending on the dataset) and results are compared to five manually-annotated ground-truth frames (where ground truth is the number of parts and their segmentations - examples are in the supplement). In each dataset, parts have nearly indistinguishable appearances and none of the compared methods use an appearance model. Consequently, part discovery is achieved via analysis of motion dynamics. Inputs only contain foreground (i.e. background is removed), as is done in related works [20]. + +We report multi-object tracking and segmentation (MOTS) metrics [34], which measure how well the part associations overlap with groundtruth part segmentations (MOTSA, sMOTSA, MOTSP) and how stable the part associations are over time (IDS). These metrics are intended for segmenting multiple targets, but we repurpose them to segment multiple parts. Comparisons are with IoU 0.3. + +We compare against two baselines: the Bayesian nonparametric model of [39] (discussed in Section 2), which we call the nonparametric extents model npe, and a parametric modification of [39], so that it is given the advantage of knowing the true number of parts. We call this the parametric extents model pe. Neither npe nor pe consider part persistence over time (as we do), so for these methods we use the Hungarian algorithm to compute part correspondences between pairs of timesteps on the distance (in the body frame) of component means. + +Taken together, our model, and the two baselines, constitute an ablation study in which we consider unknown number of parts with Lie group dynamics, and unknown / known number of parts, without Lie group dynamics. In all cases, we compute mean and standard deviation of MOTS statistics on 100 samples taken from a Markov chain of 1000 samples, use data-dependent priors (specified in the supplemental), and set concentration parameter $\alpha = 0.1$ . Figure 6 (left) shows quantitative results while Figure 9 show qualitative comparisons between our method and the baseline. + +
DatasetMethodIDSMOTSAMOTSPsMOTSA
handours0.00 ± 0.002.79 ± 0.300.71 ± 0.011.34 ± 0.24
npe4.45 ± 1.841.93 ± 0.80.51 ± 0.01-4.2 ± 0.78
pe4.03 ± 2.111.57 ± 0.440.47 ± 0.01-0.33 ± 0.37
spiderours5.14 ± 1.493.44 ± 0.250.55 ± 0.021.26 ± 0.18
npe19.6 ± 2.88-4.4 ± 0.920.51 ± 0.01-6.72 ± 0.9
pe17.28 ± 3.061.73 ± 0.310.52 ± 0.01-0.24 ± 0.27
marmosetours1.24 ± 0.651.39 ± 0.890.49 ± 0.02-0.47 ± 0.71
npe3.18 ± 1.28-32.44 ± 2.780.35 ± 0.01-34.06 ± 2.72
pe0.43 ± 0.513.86 ± 0.170.48 ± 0.001.77 ± 0.17
averageours2.12 ± 0.712.54 ± 0.480.58 ± 0.020.71 ± 0.38
npe9.07 ± 2.0-11.63 ± 1.50.46 ± 0.01-15.0 ± 1.47
pe7.25 ± 1.892.39 ± 0.310.49 ± 0.010.39 ± 0.27
+ +![](images/6041dfc148c78d37a824deaf5695ea750956e243ca9418bf563e8518a34190a4.jpg) + +![](images/5babba22ed5e2a613e037f1851ebc926e891f330d404bc01af55882d8c5cb3d1.jpg) + +![](images/5c5cd126bad6e0757130af6d52ef77c31d6d033c7913615e1a3547440a99e34d.jpg) +Figure 6. (Left): Quantitative comparison of our nonparametric parts model (ours) with nonparametric baseline npe and parametric baseline pe using MOTS metrics. Lower IDS is better, higher MOTSA, MOTSP, and sMOTSA is better. Best-performing method is emboldened. (Right): Object segmentation based on part motion across time. Whereas the parts nearest the body center exhibit little motion (in the body frame), the extremities of spider exhibit large amounts of motion. (Top-Left): Part associations. (Top-Right): Part segmentation based on motion energy. (Bottom): Log cumulative part motion energy across time (color-coordinated to associations). + +![](images/c4c3ddaf770f5d7609c52b15df4e97982356fe49f0988e3a9cc7cf38842a9eb5.jpg) +Figure 7. Dynamic mesh segmentation. By using points sampled inside a mesh as the input to our nonparametric parts model, then computing associations to mesh vertices, our model can learn parts and dynamics from mesh data. Additional views in Figure 1 + +![](images/228e86330014bc7057cade89dc1e9e2be0fb8e9b8d9fd12c2b8f7491ecf7c1a8.jpg) +Figure 8. Part posteriors for hand and spider. Dotted ellipses are the mean part covariance, solid ellipses visualize the part posterior location covariance. Points are observed part locations used for the posterior updates. The leg locations of spider are smeared due to their articulation whereas the fingers of the hand are concentrated. + +![](images/aa95c507dce6cf699715bab4835d4149edbe7489cdea532020df0f0d89798019.jpg) + +Our model outperforms the nonparametric baseline in all datasets and metrics. The pe baseline (which benefits from knowing the number of parts) outperforms our method on label switches (IDS) and overall quality (sMOTSA) on the 3D marmoset data. This is largely due to noisy data from the depth sensor generating observations from the background that are distant from the object, but not so distant + +as to be relegated to the base measure. We see very little ID switching (IDS) and relatively high precision (MOTSP) in our model, which we attribute to the canonical parts $\omega_{k}$ enforcing that each part transformation $\theta_{tk}$ move stably. Visually, part assignments correspond best to ground-truth parts that are extremities (fingers, legs, tails), but tend to oversegment large object interiors (palms, bodies). We attribute this to the ellipsoidal observation model but find that, for the purposes of part analysis, it has no obvious negative impact. + +# 5.2. Dynamic Mesh Segmentation + +We apply our method to the squat1 sequence in the articulated mesh dataset of [33], decomposing the mesh sequence into parts as shown in Figure 7. Note that legs are segmented into two parts each, while arms are segmented into one part. This is consistent with the movement in this sequence where the legs bend, but the arms are held straight. Minor artifacts appear when the lower-left leg (red) has small numbers of associations above the knee when the person is squatting, but not when standing straight up. Qualitatively, the results conform to human part interpretation. + +# 5.3. Motion Analysis + +We show how our model facilitates novel object / part analysis. Beginning with Figure 8, we visualize part diagrams for hand and spider. Dotted ellipses show the observation noise model $E_{k}$ for each part (in the object frame), while solid ellipses show the covariance for that part's translation across time. Because the part translation covariances are spatially separated, the model resists label switching between parts because they tend to stay proximate to their canonical frame. We observe that the part translation covariances are tight for the hand, but horizontally smeared for the spider—this is expected, because the fingers moved + +![](images/cc84bbdd930b889e58657bbc08e8716a0693ba5d10ec6294aac049df1d385974.jpg) + +![](images/dbcc95e964cf914351be570887f3d82ce1fea3a082c3a1b02697e0476335280b.jpg) + +![](images/9709ed4a53e5f402938b7809c9dd9d5dbb1de3d91c7cad0ad41918d54f96e2c8.jpg) + +![](images/b79288f44c3c2bf13e86a9d55b6cb2ca5ac45ec257a32d796e3bab0b2971f952.jpg) + +![](images/bf15b4224eb451c6686645b15625a6b5157b40afdebcc33295f6bb5a40e8fc4f.jpg) + +![](images/a9f4bb35da4deb8777c6e78ce021b863d60d14cdf3c4df5ce1994ee4124ca8b4.jpg) + +![](images/2cce0cb40bba880c744ae60af0e9533b3ead3ba47133731780f04ae66ea9995c.jpg) + +![](images/9cb6f85bb527d927df49f877e7d95d5d62c1dd861f05e62a2944f8a9dec91784.jpg) + +![](images/f394ff601a545fca7dc6249c64d1bd4e978f2778addc6ee86dda83d478e33275.jpg) + +![](images/1766947de6e7bf1f287da10f4d47220c7bf3de8eacbe01519e528febae26f3c5.jpg) + +![](images/c23c2d4cfb53240b688bdba6273c7d83d7e02895c431bc4f858e99565ace62c4.jpg) + +![](images/fe1094dd4a5e17b7d23016e7f18304e4931d99fb5364015f841de9259bdc68df.jpg) + +![](images/152704ae60a7a4702ea987291f46564cb908192f6cbb4f76e2ee165e5f4b316f.jpg) + +![](images/2722be241b163d665f69f17cbdcc22e30f715fa6f761cdebb7866b8d7faf9c32.jpg) + +![](images/b02efb6cfbb303ac42ea08807a8a986c9067ee4839a99eeeba2c9751768fbe53.jpg) + +![](images/b0db1ef2230d2fa4717b34011b87e5047a2037b1692603839b7b1644bbebbb42.jpg) + +![](images/92ba0cead48ccd9bcd28e991173e7ee39194da2d3e066edc568b438563f88da7.jpg) + +![](images/f3164bf4ebd247e4046ca3a04123b01eb75ed6cc5410d93a570bbda486f3dbad.jpg) + +![](images/aad1cd19315e4d8c14d4421b480cd108af28f819a2fc03a227a1b57b057876c0.jpg) + +![](images/c4b72eb06ea0e557ee04286e5826e22c7731e7d7e5a0539e6453c79cc5430d82.jpg) + +![](images/603af0695834c0567aafe0d5795df3effaec6a7b3187c2e772ee9cca5b8b44ee.jpg) + +![](images/1e768fa9213871ece02ced3134cdce4c968d02460af6e2fc02f73017522128ca.jpg) + +![](images/2893d22c00f4e8b956a3ef7833efaf347529460012ab51b165b6e5dccf018e26.jpg) + +![](images/a74b589a9d892362d41a3127e40384134c44d409166a24867f78f702fe0f5c33.jpg) + +![](images/e1c74a13057ac16d61edc8d85ffc532b07ab0114b7106aa25140ef49a761c5a3.jpg) + +![](images/44b3ee124bdad4e12674a2cbe3079fd41a5773f913209a50330f283dbdd71558.jpg) + +![](images/6dd9054decda51355638b65fe8eb1f65902788375c4fe94b72119d9d73912b31.jpg) + +![](images/f0a90f23fea3eb67661ea6e862d599afaa5cadd41f1a37f6733f4a0b34a6bdc6.jpg) + +![](images/dc7b54ff27798dcb4ae6084da7d44ef8582ef080928247b57a595d95947700ce.jpg) + +![](images/b15882dafef3620e1da8c5bdd692c785782a8fd3afc573d0251ff5e163e28e9d.jpg) + +![](images/2bdff94ec2f20e93bde6b84e4150daa869f1188137e2c5f8a7bbf6f17b882f03.jpg) + +![](images/deac53c5ff7aa0d55958463a12239d7034638cd2006522cf49f51f25e7932cd0.jpg) + +![](images/66ead59d36e7c6db3805a2d2b4893fd5d4420374d97bae50be58e4aee031d0a1.jpg) + +![](images/1d1446c94e30b9682f7ec913935f61bd08f5c2aa9707e4299d9cf6597593b4a7.jpg) + +![](images/a1601a917f62df4ec1450ca7ee91b059e40996e7be71367b0e1cd176d95ae785.jpg) + +![](images/63bbab690c3e4aa708d12744f49e0df3d409e0ead98f04ddc341a6f9a9bdac19.jpg) + +![](images/dfc0674e34ec83adc89e98e548dad55b63c3639679a4e5a0064ed63b1e301a48.jpg) + +![](images/9671593426a2f4176772e6cf566acba137ca988c01a8a3054ac584bc82e0ba29.jpg) + +![](images/51492054b5015843c7a2609acd5a6158abebd30961f204913cde34e928504dc3.jpg) +Figure 9. Example part associations in hand, spider and marmoset. For each sequence, example frames from the original video are shown (top-row) with part associations and object/part coordinate frames overlaid from our method (middle-row) and baseline NPE associations (bottom-row). Parts estimated by our method are largely consistent over time, even for the highly-articulated spider legs. + +![](images/6ce856913194a624fc83ca52d09050e07c91341007a4d15524728c783e19a612.jpg) + +![](images/61eeb718c4f1e8871c91ed70c10b8bb53b56a9fd3c1da6fa878d7ad7d1862838.jpg) + +![](images/3c45e67b94f88e1aabe4ee7d4d1a7050b6804ac697871086df1e241b43fd8b64.jpg) + +![](images/1ef975b04c4a7db4db39a12ec0edaf9ff49cb0302b3a9fd705e1abc96c6c58ca.jpg) + +![](images/2211cb05e5e09db50b136194bb4db9ae7a122171e281b9edeac3a348f7f923ca.jpg) + +![](images/a28c5d87ac713f1aeedd3e88b76077532ff745368333aa38f3b829c7c76e9311.jpg) + +![](images/1b53246e106f9ae71166949564bbdf13e14cae046b6def03ea14716d6036ca59.jpg) + +![](images/48cc5c9bfb49967c7ad8882effb6993c253eda59f65398e52649a374be0b0f0e.jpg) + +![](images/d247134bc5c44f6f8f89ba9cedc647a7f6424aacd2a90a4640dbb319c2bec1c5.jpg) + +![](images/fb21835a0580482bc4d7b7e88005bff4ddfebfa55dfabbba39e1adef0d89e4a2.jpg) + +![](images/14aaeda4b17fe0abcdf80fc6d1534783ae54d79f8c21a5742c4976ca9349f111.jpg) + +![](images/8bb7df219e17a4f42de28032a77e109756d0d46289ba7383228a4c3678ca8e84.jpg) + +very little in hand compared to the legs in spider. + +One analysis that our model enables is the comparison of part motions in the body frame (i.e. motion not from the object moving, but from its parts). By integrating each part's motion over time within the body frame we can determine which areas of an object experience high or low relative motion. Figure 6 (right) shows that, for spider, the legs are able to be segmented from other parts. + +# 6. Discussion + +In this work we demonstrated that our nonparametric representation of kinematic bodies infers meaningful part decompositions of objects in an unsupervised way, by simply observing them in motion. Furthermore, our Lie group representation constrains articulations of moving parts to physically plausible kinematic states, without the requirement of object-specific knowledge such as skeletal structures. Part decompositions are learnable on very short se + +quences, and generalize to other datasets and instances of the same object type. In contrast to methods which rely on extensive training data and/or object-specific 2D/3D models, we were able to demonstrate robust analysis by direct observation of single instances of an object. + +Our model simplifies inference and motion analysis while suggesting straightforward extensions. For example, part persistence ensures that the representation of parts persists over a video sequence, even if parts become occluded. A hierarchical model over multiple videos of similar objects would thus be robust to occlusions in any single video. Furthermore, Gaussian tangent-space conditionals allows closed-form Gibbs updates for translation, efficient slice sampling of rotation, and proves sufficient for motion analysis. Explicit models of part shape may avoid oversegmenting large regions and is the focus of current work. + +Acknowledgements This work was partially supported by ONR N00014-17-1-2072 and NIH 5R01MH111916. + +# References + +[1] Charles E Antoniak. Mixtures of dirichlet processes with applications to bayesian nonparametric problems. The annals of statistics, pages 1152-1174, 1974. 2 +[2] Matthew J Beal, Zoubin Ghahramani, and Carl E Rasmussen. The infinite hidden markov model. In Advances in neural information processing systems, pages 577-584, 2002. 2 +[3] Federica Bogo, Javier Romero, Gerard Pons-Moll, and Michael J Black. Dynamic faust: Registering human bodies in motion. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6233-6242, 2017. 2 +[4] Guillaume Bourmaud, Rémi Mégret, Marc Arnaudon, and Audrey Giremus. Continuous-discrete extended kalman filter on matrix lie groups using concentrated gaussian distributions. Journal of Mathematical Imaging and Vision, 51(1):209-228, 2015. 2 +[5] C. Bregler and J. Malik. Tracking people with twists and exponential maps. Proceedings. 1998 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (Cat. No.98CB36231), pages 8-15, 1998. 2 +[6] Martin Brossard, Silvere Bonnabel, and Jean-Philippe Condomines. Unscented kalman filtering on lie groups. In 2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 2485–2491. IEEE, 2017. 2 +[7] David B. Dunson. Bayesian dynamic modeling of latent trait distributions. Biostatistics, 7(4):551-568, 2006. 2 +[8] Ethan Eade. Lie groups for computer vision. Cambridge Univ., Cambridge, UK, Tech. Rep, 2014. 2 +[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, 2010. 2 +[10] Martin A Fischler and Robert A Elschlager. The representation and matching of pictorial structures. IEEE Transactions on computers, (1):67-92, 1973. 2 +[11] Emily Fox, Erik B Sudderth, Michael I Jordan, and Alan S Willsky. Bayesian nonparametric inference of switching dynamic linear models. IEEE Transactions on Signal Processing, 59(4):1569-1585, 2011. 2 +[12] Emily B Fox, Erik B Sudderth, Michael I Jordan, Alan S Willsky, et al. A sticky hdp-hmm with application to speaker diarization. The Annals of Applied Statistics, 5(2A):1020-1056, 2011. 2 +[13] Katerina Fragkiadaki, Sergey Levine, Panna Felsen, and Jitendra Malik. Recurrent network models for human dynamics. In Proceedings of the IEEE International Conference on Computer Vision, pages 4346-4354, 2015. 2 +[14] Oren Freifeld, Alexander Weiss, Silvia Zuffi, and Michael J Black. Contour people: A parameterized model of 2d articulated human shape. In 2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 639-646. IEEE, 2010. 2 + +[15] Jurgen V Gael, Yee W Teh, and Zoubin Ghahramani. The infinite factorial hidden markov model. In Advances in Neural Information Processing Systems, pages 1697-1704, 2009. 2 +[16] Brian C Hall. Lie groups, lie algebras, and representations. In Quantum Theory for Mathematicians, pages 333-366. Springer, 2013. 2 +[17] Søren Hauberg, François Lauze, and Kim Steenstrup Pedersen. Unscented kalman filtering on riemannian manifolds. Journal of Mathematical Imaging and Vision, 46(1):103-120, 2013. 2 +[18] Shanon X Ju, Michael J Black, and Yaser Yacoob. Cardboard people: A parameterized model of articulated image motion. In Proceedings of the Second International Conference on Automatic Face and Gesture Recognition, pages 38-44. IEEE, 1996. 2 +[19] Giuseppe Loianno, Michael Watterson, and Vijay Kumar. Visual inertial odometry for quadrotors on SE(3). Proceedings - IEEE International Conference on Robotics and Automation, 2016-June(3):1544-1551, 2016. 2 +[20] Dominik Lorenz, Leonard Bereska, Timo Milbich, and Bjorn Ommer. Unsupervised part-based disentangling of object shape and appearance. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 10955-10964, 2019. 2, 6 +[21] Naureen Mahmood, Nima Ghorbani, Nikolaus F Troje, Gerard Pons-Moll, and Michael J Black. Amass: Archive of motion capture as surface shapes. In Proceedings of the IEEE International Conference on Computer Vision, pages 5442-5451, 2019. 2 +[22] Radford M Neal et al. Slice sampling. The annals of statistics, 31(3):705-767, 2003. 6 +[23] Frank C. Park. Distance Metrics on the Rigid-Body Motions with Applications to Mechanism Design. Journal of Mechanical Design, 117(1):48-54, 1995. 2 +[24] Gerard Pons-Moll, Andreas Baak, Thomas Helten, Meinard Müller, Hans-Peter Seidel, and Bodo Rosenhahn. Multisensor-fusion for 3d full-body human motion capture. In 2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 663-670. IEEE, 2010. 2 +[25] Lu Ren, David B. Dunson, and Lawrence Carin. The dynamic hierarchical Dirichlet process. Proceedings of the 25th international conference on Machine learning - ICML '08, pages 824-831, 2008. 2 +[26] David A Ross, Daniel Tarlow, and Richard S Zemel. Unsupervised learning of skeletons from motion. In European Conference on Computer Vision, pages 560-573. Springer, 2008. 2 +[27] J Shotton, A Fitzgibbon, M Cook, T Sharp, M Finocchio, R Moore, A Kipman, and A Blake. Real-time human pose recognition in parts from single depth images. In Proceedings of the 2011 IEEE Conference on Computer Vision and Pattern Recognition, pages 1297-1304. IEEE Computer Society, 2011. 2 +[28] Julian Straub, Jason Chang, Oren Freifeld, and John Fisher III. A dirichlet process mixture model for spherical data. In Artificial Intelligence and Statistics, pages 930-938, 2015. 2 + +[29] Julian Straub, Oren Freifeld, Guy Rosman, John J Leonard, and John W Fisher III. The Manhattan frame model-manhattan world inference in the space of surface normals. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017. 3 +[30] Erik B Sudderth, Antonio Torralba, William T Freeman, and Alan S Willsky. Describing visual scenes using transformed dirichlet processes. In Advances in neural information processing systems, pages 1297-1304, 2006. 2 +[31] Yee Whye Teh, Michael I. Jordan, Matthew J. Beal, and David M. Blei. Hierarchical Dirichlet processes. Journal of the American Statistical Association, 101(476):1566-1581, 2006. 2 +[32] Isabel Valera, Francisco Ruiz, Lennart Svensson, and Fernando Perez-Cruz. Infinite factorial dynamical model. In Advances in Neural Information Processing Systems, pages 1666-1674, 2015. 2 +[33] Daniel Vlasic, Ilya Baran, Wojciech Matusik, and Jovan Popovic. Articulated mesh animation from multi-view silhouettes. In ACM Transactions on Graphics (TOG), volume 27, page 97. ACM, 2008. 7 +[34] Paul Voigtlaender, Michael Krause, Aljosa Osep, Jonathon Luiten, Berin Balachandar Gnana Sekar, Andreas Geiger, and Bastian Leibe. Mots: Multi-object tracking and segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7942-7951, 2019. 6 +[35] Yunfeng Wang and Gregory S Chirikjian. Error propagation on the euclidean group with applications to manipulator kinematics. IEEE Transactions on Robotics, 22(4):591-602, 2006. 1, 2 +[36] Zhenjia Xu, Zhijian Liu, Chen Sun, Kevin Murphy, William T Freeman, Joshua B Tenenbaum, and Jiajun Wu. Unsupervised discovery of parts, structure, and dynamics. International Conference on Learning and Representation, 2019. 2 +[37] Milos Zefran, Vijay Kumar, and Christopher Croke. Choice of Riemannian Metrics for Rigid Body Kinematics. ASME Design Engineering Technical Conference and Computers in Engineering Conference, (3):1-11, 1996. 2 +[38] Jianwen Zhang, Yangqiu Song, Changshui Zhang, and Shixia Liu. Evolutionary hierarchical dirichlet processes for multiple correlated time-varying corpora. Proceedings of the 16th ACM SIGKDD international conference on Knowledge discovery and data mining - KDD '10, page 1079, 2010. 2 +[39] Yang Zhou, Jitendra Sharma, Qiong Ke, Rogier Landman, Jingli Yuan, Hong Chen, David S Hayden, John W Fisher, Minqing Jiang, William Menegas, et al. Atypical behaviour and connectivity in shank3-mutant macaques. Nature, page 1, 2019. 2, 6 +[40] Silvia Zuffi, Angjoo Kanazawa, and Michael J Black. Lions and tigers and bears: Capturing non-rigid, 3d, articulated shape from images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3955–3963, 2018. 2 +[41] Silvia Zuffi, Angjoo Kanazawa, David W Jacobs, and Michael J Black. 3d menagerie: Modeling the 3d shape and pose of animals. In Proceedings of the IEEE Conference + +on Computer Vision and Pattern Recognition, pages 6365-6373, 2017. 2 \ No newline at end of file diff --git a/nonparametricobjectandpartsmodelingwithliegroupdynamics/images.zip b/nonparametricobjectandpartsmodelingwithliegroupdynamics/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..c712f2795ffd37cd77d707866ee4ebbad53c0b37 --- /dev/null +++ b/nonparametricobjectandpartsmodelingwithliegroupdynamics/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a9ec1a1d19a9723683b40fe5c70c9b3d8a1ae145646c0087278112a5d9c5703 +size 548161 diff --git a/nonparametricobjectandpartsmodelingwithliegroupdynamics/layout.json b/nonparametricobjectandpartsmodelingwithliegroupdynamics/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..85ff29d47d19346a6b313802bd98a34a8df5ee18 --- /dev/null +++ b/nonparametricobjectandpartsmodelingwithliegroupdynamics/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d6369eaa7fb84a398282052625106479529b2b7f50a2e33e21bd331d357c5bb +size 586247 diff --git a/normalassistedstereodepthestimation/98b99646-1667-41d6-a0b0-80485ecf61b7_content_list.json b/normalassistedstereodepthestimation/98b99646-1667-41d6-a0b0-80485ecf61b7_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4f88898bcc1a3e695782104f3eea77fa5d31d605 --- /dev/null +++ b/normalassistedstereodepthestimation/98b99646-1667-41d6-a0b0-80485ecf61b7_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e126023efc3afedb7de8fb368ab45b4f2cd66f5a9313270cf7198f0da72cdc3 +size 83081 diff --git a/normalassistedstereodepthestimation/98b99646-1667-41d6-a0b0-80485ecf61b7_model.json b/normalassistedstereodepthestimation/98b99646-1667-41d6-a0b0-80485ecf61b7_model.json new file mode 100644 index 0000000000000000000000000000000000000000..eef384e2578756435db0326aa1e7dc7287b3c489 --- /dev/null +++ b/normalassistedstereodepthestimation/98b99646-1667-41d6-a0b0-80485ecf61b7_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f830407b1b5e14ba9be085ab9c08068ddc893b31adfd1b7f16caf4b8ed2def66 +size 102433 diff --git a/normalassistedstereodepthestimation/98b99646-1667-41d6-a0b0-80485ecf61b7_origin.pdf b/normalassistedstereodepthestimation/98b99646-1667-41d6-a0b0-80485ecf61b7_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..664526ae851d04b5be7543242b0a2a6d5f8bcc98 --- /dev/null +++ b/normalassistedstereodepthestimation/98b99646-1667-41d6-a0b0-80485ecf61b7_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba49d5a3e3afe5cb832763c4dd519e2c80a0af39a6a3d1644b32067765194683 +size 1298356 diff --git a/normalassistedstereodepthestimation/full.md b/normalassistedstereodepthestimation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..fd60c5ba994264b4e30cf9b89d95a950e970f700 --- /dev/null +++ b/normalassistedstereodepthestimation/full.md @@ -0,0 +1,339 @@ +# Normal Assisted Stereo Depth Estimation + +Uday Kusupati $^{1*}$ + +Shuo Cheng + +Rui Chen $^{3*}$ + +Hao $\mathrm{Su}^2$ + +1The University of Texas at Austin + +$^{2}$ University of California San Diego + +$^{3}$ Tsinghua University + +uday@cs.utexas.edu, scheng@eng.ucsd.edu, chenr17@mails.tsinghua.edu.cn, haosu@eng.ucsd.edu + +# Abstract + +Accurate stereo depth estimation plays a critical role in various 3D tasks in both indoor and outdoor environments. Recently, learning-based multi-view stereo methods have demonstrated competitive performance with limited number of views. However, in challenging scenarios, especially when building cross-view correspondences is hard, these methods still cannot produce satisfying results. In this paper, we study how to leverage a normal estimation model and the predicted normal maps to improve the depth quality. We couple the learning of a multi-view normal estimation module and a multi-view depth estimation module. In addition, we propose a novel consistency loss to train an independent consistency module that refines the depths from depth/normal pairs. We find that the joint learning can improve both the prediction of normal and depth, and the accuracy & smoothness can be further improved by enforcing the consistency. Experiments on MVS, SUN3D, RGBD and Scenes11 demonstrate the effectiveness of our method and state-of-the-art performance. + +# 1. Introduction + +Multi-view stereo (MVS) is one of the most fundamental problems in computer vision and has been studied over decades. Recently, learning-based MVS methods have witnessed significant improvement against their traditional counterparts [45, 23, 47, 7]. In general, these methods formulate the task as an optimization problem, where the target is to minimize the overall summation of pixel-wise depth discrepancy. However, the lack of geometric constraints leads to bumpy depth prediction especially in areas with low texture or that are textureless as shown in Fig. 1. Compared with depth that is a property of the global geometry, surface normal represents a more local geometric property and can be inferred more easily from visual appearance. For instance, it is much easier for + +![](images/5fb1fa47ce9775fa67f44ff678434f2f2c1cd58f9a51433e81e89bfe9703676c.jpg) + +![](images/31162be79e91e5c149478455a6fb7002c52b8c1ac6d5097edbdfdfcf05d8953a.jpg) +Figure 1. Illustration of results of separate learning and joint learning of depth and normal. While the normal prediction is smooth and accurate, existing state-of-the-art stereo depth prediction result is noisy. Our method improves the prediction quality significantly by joint learning of depth and normal and enforcing consistency. Color format. Best viewed on screen. + +![](images/000e74c25e16445a17bb95cf79dcc95b9969942e03ed6e0c8c3191ac130cc25a.jpg) + +![](images/4c4f2d7056b851418f6f021a417ac542505020de0ca6fe163c9ca2a411db1832.jpg) + +![](images/2df5f22371695d87dded4576011f688d6549ecc5eeb2ec1bb80a6dff11391c74.jpg) + +humans to estimate whether a wall is flat or not than the absolute depth. Fig. 1 shows an example where learning-based MVS methods perform poorly on depth estimation but significantly better on normal prediction. + +Attempts have been made to incorporate the normal based geometric constraints into the optimization to improve the monocular depth prediction [49, 59]. One simple form of enforcing a consistency constraint between depth and normal is to enforce orthogonality between the predicted normal and the tangent directions computed from the predicted depths at every point. However, for usage as regularizing loss function during training, we find that a naive consistency method in the world coordinate space is a very soft constraint as there are many sub-optimal depth solutions that are consistent with a given normal. Optimizing depths to be consistent with the normal as a post processing[59] ensures local consistency; however, not only this is an expensive step during inference time, but also the post-processed result may lose grounding from the input images. Therefore, we strive to propose a new formulation of depth-normal consistency that can improve + +the training process. Our consistency is defined in the pixel coordinate space and we show that our formulation is better than the simple consistency along with better performance than previous methods to make the geometry consistent in Section 4.4. This constraint is independent of the multiview formulation and can be used to enforce consistency on any pair of depth and normal even in the single view setting. To this end, our contributions are mainly in the following aspects: + +First, we propose a novel cost-volume-based multiview surface normal prediction network (NNet). By constructing a 3D cost volume by plane sweeping and accumulating the multi-view image information to different planes through projection, our NNet can learn to infer the normal accurately using the image information at the correct depth. The construction of a cost volume with image features from multiple views contains the information of available features in addition to enforcing additional constraints on the correspondences and thus the depths of each point. We show that the cost volume is a better structural representation that facilitates better learning on the image features for estimating the underlying surface normal. While in single image setting, the network tends to overfit the texture and color and demonstrates worse generalizability, we show that our method of normal estimation generalizes better due to learning on a better abstraction than single view images. + +Further, we demonstrate that learning a normal estimation model on the cost volume jointly with the depth estimation pipeline facilitates both tasks. Both traditional and learning-based stereo methods suffer from the noisy nature of the cost volume. The problem is significant in textureless surfaces when the image feature based matching doesn't offer enough cues. We show that enforce the network to predict accurate normal maps from the cost volume results in regularizing the cost volume representation, and thereby assists in producing better depth estimation. Experiments on MVS, SUN3D, RGBD, Scenes11, and Scene Flow datasets demonstrate that our method achieves state-of-the-art performance. + +# 2. Related Work + +In this section we review the literature relevant to our work concerned with stereo depth estimation, normal estimation and multi-task learning for multi-view geometry. + +Classical Stereo Matching. A stereo algorithm typically consists of the following steps: matching cost calculation, matching cost aggregation and disparity calculation. As the pixel representation plays a critical role in the process, previous literature have exploited a variety of representations, from the simplest RGB colors to hand-craft feature descriptors [50, 44, 39, 31, 2]. Together with post-processing techniques like Markov random fields [38] and + +semi-global matching [20], these methods can work well on relative simple scenarios. + +Learning-based Stereo. To deal with more complex real world scenes, recently researchers leverage CNNs to extract pixel-wise features and match correspondences [25, 51, 27, 6, 30, 29, 19]. The learned representation shows more robustness to low-texture regions and various lightings [22, 45, 47, 7, 32]. Rather than directly estimating depth from image pairs as done in many previous deep learning methods, some approaches also tried to incorporate semantic cues and context information in the cost aggregation process [43, 8, 24] and achieved positive results. While other geometry information such as normal and boundary [56, 16, 26] are widely utilized in traditional methods for further improving the reconstruction accuracy, it is non-trivial to explicitly enforce the geometry constraints in learning-based approaches [15]. To the best of our knowledge, this is the first work that tries to solve depth and normal estimation in multi-view scenario in a joint learning fashion. + +Surface Normal Estimation. Surface normal is an important geometry information for 3D scene understanding. Recently, several data-driven methods have achieved promising results [12, 1, 14, 41, 3, 52]. While these methods learn the image level features and textures to address normal prediction in a single image setting, we propose a multi-view method that generalizes better and reduces the learning complexity of the task. + +Joint Learning of Normal and Depth. With deep learning, numerous methods have been proposed for joint learning of normal and depth [34, 18, 54, 11, 48, 57, 12]. Even though these methods achieved some progress, all these methods focus on single image scenario, while there are still few works exploring joint estimation of normal and depth in multi-view setting. Gallup et al. [17] estimated candidate plane directions for warping during plane sweep stereo and further enforce an integrability penalty between the predicted depths and the candidate plane for better performance on slanted surfaces, however, the geometry constraints are only applied in a post processing or optimization step (e.g., energy model or graph cut). The lack of end-to-end learning mechanism makes their methods easier to stuck in sub-optimal solutions. In this work, our experiments demonstrate that with careful design, the joint learning of normal and depth is favorable for both sides, as the geometry information is easier to be captured. Benefited from the learned powerful representations, our approach achieves competitive results compared with previous methods. + +# 3. Approach + +We propose an end-to-end pipeline for multi-view depth and normal estimation as shown in Fig. 2. The entire + +![](images/8aa127ee34b213dbf4ede98e3104ad7f5c8a716cc0ea60f4fd725afbed561220.jpg) +Figure 2. Illustration of the pipeline of our method. We first extract deep image features from viewed images and build a feature cost volume by using feature wrapping. The depth and normal are jointly learned in a supervision fashion. Further we use our proposed consistency module to refine the depth and apply a consistency loss. + +pipeline can be viewed as two modules. The first module consists of joint estimation of depth and normal maps from the cost volume built from multi-view image features. The subsequent module refines the predicted depth by enforcing consistency between the predicted depth and normal maps using the proposed consistency loss. In the first module, joint prediction of normal from the cost volume implicitly improves the learned model for depth estimation. The second module is explicitly trained to refine the estimates by enforcing consistency. + +# 3.1. Learning based Plane Sweep Stereo + +First, we describe our depth prediction module. In terms of the type of target, current learning-based stereo methods can be categorized into: single object reconstruction [46, 7] and scene reconstruction [23, 22]. Compared with single object reconstruction, scene reconstruction, where multiple objects are included, requires larger receptive field for the network to better infer the context information. Because our work also aims at scene reconstruction, we take DPSNet [23], a state-of-the-art scene reconstruction method, as our depth prediction module. + +The inputs to the network are a reference image $\mathbf{I}_1$ and a neighboring view image $\mathbf{I}_2$ of the same scene along with the intrinsic camera parameters and the extrinsic transformation between the two views. We first extract deep image features using a spatial pyramid pooling module. Then a cost volume is built by plane sweeping and 3D CNNs are applied on it. Multiple cost volumes can be built and averaged when multiple views are present. Further context-aware cost aggregation [23] is used to regularize the noisy cost volume. The final depth is regressed using soft argmin [28] from the final cost volume. + +![](images/65748b40c105deb4107d2f03c0e9b57e4aa42fd0d864217770a72735d865195d.jpg) +Figure 3. Network architecture of cost volume based surface normal estimation, NNet + +# 3.2. Cost Volume based Surface Normal Estimation + +In this section, we describe the network architecture of cost volume based surface normal estimation (Fig. 3). The cost volume contains all the spatial information in the scene as well as image features in it. The probability volume models a depth distribution across candidate planes for each pixel. In the limiting case of infinite candidate planes, an accurately estimated probability volume turns out to be the implicit function representation of the underlying surface i.e. takes value 1 where a point on the surface exists and 0 everywhere else. This motivates us to use the cost volume $\mathbf{C_1}$ which also contains the image-level features to estimate the surface normal map $\vec{\mathbf{n}}$ of the underlying scene. + +Given the cost volume $\mathbf{C_1}$ we concatenate the world coordinates of every voxel to its feature. Then, we use three layers of 2-strided convolution along the depth dimension to reduce the size of this input to $((\mathbf{f} + \mathbf{3})\times \mathbf{H}\times \mathbf{W}\times \mathbf{D} / 8)$ and call this $C_n$ . Consider a fronto-parallel slice $S_{i}$ of size $((\mathbf{f} + \mathbf{3})\times \mathbf{H}\times \mathbf{W})$ in $C_n$ . We pass each slice through a normal-estimation network (NNet). NNet contains 7 layers of 2D convolutions of $3\times 3$ with increasing receptive field as the layers go deep using dilated convolutions (1, 2, 4, 6, 8, 1, 1). We add the output of all slices and normalize the + +sum to obtain the estimate of the normal map. + +$$ +\vec {n} = \frac {\sum_ {i = 1} ^ {D / 8} \mathbf {N N e t} \left(S _ {i}\right)}{\left| \left| \sum_ {i = 1} ^ {D / 8} \mathbf {N N e t} \left(S _ {i}\right) \right| \right| _ {2}} \tag {1} +$$ + +We explain the intuition behind this choice as follows. Each slice contains information corresponding to the patch match similarity of each pixel in all the views conditioned on the hallucinated depths in the receptive field of the current slice. In addition, due to the strided 3D convolutions, the slice features accumulate information about features of a group of neighboring planes. The positional information of each pixel in each plane is explicitly encoded into the feature when we concatenated the world coordinates. So $\mathbf{NNet}(S_i)$ is an estimate of the normal at each pixel conditional to the depths in the receptive field of the current slice. For a particular pixel, slices close to the ground truth depth predict good normal estimates, where as slices far from the ground truth predict zero estimates. One way to see this is, if the normal estimate from each slice for a pixel is $\vec{\mathbf{n}}_{\mathrm{i}}$ , the magnitude of $\vec{\mathbf{n}}_{\mathrm{i}}$ can be seen as the correspondence probability at that slice for that pixel. The direction of $\vec{\mathbf{n}}_{\mathrm{i}}$ can be seen as the vector aligning with the strong correspondences in the local patch around the pixel in that slice. + +We train the first module with ground truth depth $(\mathbf{Z}_{\mathrm{gt}})$ supervision on $\mathbf{Z}_1$ & $\mathbf{Z}_2$ along with the ground truth normal $(\vec{\mathbf{n}}_{\mathrm{gt}})$ supervision on $(\vec{\mathbf{n}})$ . The loss function $(\mathcal{L})$ is defined as follows. + +$$ +\mathcal {L} _ {z} = \left| Z _ {2} - Z _ {g t} \right| _ {\mathbf {H}} + \lambda_ {z} \left| Z _ {1} - Z _ {g t} \right| _ {\mathbf {H}} +$$ + +$$ +\mathcal {L} _ {n} = | \vec {n} - n _ {\vec {g t}} ^ {\rightarrow} | _ {\mathbf {H}} \tag {2} +$$ + +$$ +\mathcal {L} = \mathcal {L} _ {z} + \lambda_ {n} \mathcal {L} _ {n} +$$ + +where $|\cdot |_{\mathbf{H}}$ denotes the Huber norm2. + +# 3.3. Depth Normal Consistency + +In addition to estimating depth and normal jointly from the cost volume, we use a novel consistency loss to enforce consistency between the estimated depth and normal maps. We utilize the camera model to estimate the spatial gradient of the depth map in the pixel coordinate space using the depth map and normal map. We compute two estimates for $\left(\frac{\partial Z}{\partial u}, \frac{\partial Z}{\partial v}\right)$ and enforce them to be consistent. + +A pinhole model of the camera is adopted as shown in Figure 4). + +$$ +\left[ \begin{array}{l} u \\ v \\ 1 \end{array} \right] = \frac {1}{Z} \left[ \begin{array}{c c c} f _ {x} & 0 & u _ {c} \\ 0 & f _ {y} & v _ {c} \\ 0 & 0 & 1 \end{array} \right] \left[ \begin{array}{l} X \\ Y \\ Z \end{array} \right] \tag {3} +$$ + +where $(u,v)$ is the corresponding image pixel coordinate + +![](images/0ebc5d79743b4aefd79800204b98021edb019bab9894f6c77245f871001b6943.jpg) +Figure 4. Camera Model + +of 3D point $(X,Y,Z)$ , $(u_c, v_c)$ is the pixel coordinate of camera optical center, and $f_x, f_y$ are the focal lengths for X-axis and Y-axis, respectively. + +From the camera model, we can yield: + +$$ +\begin{array}{l} X = \frac {Z \left(u - u _ {c}\right)}{f _ {x}} \Rightarrow \frac {\partial X}{\partial u} = \frac {u - u _ {c}}{f _ {x}} \frac {\partial Z}{\partial u} + \frac {Z}{f _ {x}} \tag {4} \\ Y = \frac {Z (v - v _ {c})}{f _ {y}} \Rightarrow \frac {\partial Y}{\partial u} = \frac {v - v _ {c}}{f _ {y}} \frac {\partial Z}{\partial x} \\ \end{array} +$$ + +Estimate 1: + +The spatial gradient of the depth map can first be computed from the depth map by using a Sobel filter: + +$$ +\left(\frac {\partial Z}{\partial u}, \frac {\partial Z}{\partial v}\right) _ {1} = \left(\frac {\Delta Z}{\Delta u}, \frac {\Delta Z}{\Delta v}\right) \tag {5} +$$ + +Estimate 2: + +We assume the underlying scene to be of a smooth surface which can be expressed as an implicit function $F(X,Y,Z) = 0$ . The normal map $\vec{n}$ is an estimate of the gradient of this surface. + +$$ +\begin{array}{l} \vec {n} = \left(n _ {x}, n _ {y}, n _ {z}\right) = \left(\frac {\partial F}{\partial X}, \frac {\partial F}{\partial Y}, \frac {\partial F}{\partial Z}\right) \tag {6} \\ \Rightarrow \frac {\partial Z}{\partial X} = \frac {- n _ {x}}{n _ {z}}, \frac {\partial Z}{\partial Y} = \frac {- n _ {y}}{n _ {z}} \\ \end{array} +$$ + +Therefore, we can derive the second estimate of the depth spatial gradient by: + +$$ +\begin{array}{l} \left(\frac {\partial Z}{\partial u}\right) _ {2} = \frac {\partial Z}{\partial X} \frac {\partial X}{\partial u} + \frac {\partial Z}{\partial Y} \frac {\partial Y}{\partial u} \\ = \frac {\left(\frac {- n _ {x} Z}{n _ {z} f _ {x}}\right)}{1 + \left[ \frac {n _ {x} (u - u _ {c})}{n _ {z} f _ {x}} \right] + \left[ \frac {n _ {y} (v - v _ {c})}{n _ {z} f _ {y}} \right]} \tag {7} \\ \end{array} +$$ + +Similarly, + +$$ +\left(\frac {\partial Z}{\partial v}\right) _ {2} = \frac {\left(\frac {- n _ {y} Z}{n _ {z} f _ {y}}\right)}{1 + \left[ \frac {n _ {x} (u - u _ {c})}{n _ {z} f _ {x}} \right] + \left[ \frac {n _ {y} (v - v _ {c})}{n _ {z} f _ {y}} \right]} \tag {8} +$$ + +The consistency loss $\mathcal{L}_c$ is given as the Huber norm of the deviation between the two estimates $\left(\frac{\partial Z}{\partial u}, \frac{\partial Z}{\partial v}\right)_1$ and $\left(\frac{\partial Z}{\partial u}, \frac{\partial Z}{\partial v}\right)_2$ : + +$$ +\mathcal {L} _ {c} = \left| \left(\frac {\partial Z}{\partial u}, \frac {\partial Z}{\partial v}\right) _ {1} - \left(\frac {\partial Z}{\partial u}, \frac {\partial Z}{\partial v}\right) _ {2} \right| _ {\mathbf {H}} \tag {9} +$$ + +The second estimate of the depth spatial gradient depends only on the absolute depth of the pixel in question and not the depths of the neighboring pixels. We obtain the local surface information from the normal map, which we deem more accurate and easier to estimate. Our consistency formulation not only enforces constraints between the relative depths in a pixel's neighborhood but also the absolute depth. Previous approaches like [34], [58] enforce consistency between depth and normal maps by constraining the local surface tangent obtained from the depth map to be orthogonal to the estimated normal. These approaches typically enforce constraints on the spatial depth gradient in the world coordinate space, where as we enforce them in the pixel coordinate space. We convert the previous approach into a depth gradient consistency formulation and provide a detailed comparison along with experiments on SUN3D dataset in the appendix. + +In our pipeline, we implement this loss in an independent module. We use a UNet [35] with the raw depth and normal estimates as inputs to predict the refined depth and normal estimates. We train the entire pipeline in a modular fashion. We initially train the first module with loss $\mathcal{L}$ and then add the second module to train with the consistency loss $\mathcal{L}_c$ in conjunction with the previous losses. Moreover, our loss function can also be used for any depth refinement/completion method including single-view estimation given an estimate of the normal map. + +# 4. Experiments + +# 4.1. Datasets + +We use SUN3D [42], RGBD [37] and Scenes11 [4] datasets for training our end-to-end pipeline from scratch. The train set contains 166,285 image pairs from 50420 scenes (SUN3D: 29294, RGBD: 3373, Scenes11: 17753). Scenes11 is a synthetic dataset whereas SUN3D and RGBD consist of real word indoor environments. We test on the same split as previous methods and report the common quantitative measures of depth quality: absolute relative error (Abs Rel), absolute relative inverse error (Abs R-Inv), absolute difference error (Abs diff), square relative error (Sq + +![](images/9117d4f904caf84e3e17af31e0da4c534c34cb407162f47b543bf965bf10cb62.jpg) +Figure 5. Visualizing the depths in 3D for SUN3D. Two views for the point cloud from depth prediction. + +![](images/bcbb6a557f4f9838c72ee0e5975eaf67b21800d2163bcedd6cbbb928440b9162.jpg) + +![](images/a00af1c77dbf218f3db36dc1da3874d1227e9cc0992091239d95072929aebabc.jpg) + +Rel), root mean square error and its log scale (RMSE and RMSE log) and inlier ratios $(\delta < 1.25^i$ where $i\in \{1,2,3\}$ + +We also evaluate our method on a different class of datasets used by other state-of-the-art methods. We train and test on the Scene Flow datasets [33] which consist of 35454 training and 4370 test stereo pairs in $960 \times 540$ resolution with both synthetic and natural scenes. The metrics we use on this dataset are the popularly used average End Point Error (EPE) and the 1-pixel threshold error rate. + +Further, we evaluate our task on ScanNet [10]. The dataset consists of 94212 image pairs from 1201 scenes. We use the same test split as in [53]. We follow [45] for neighboring view selection, and generate ground-truth normal map following [13]. We use ScanNet to evaluate the performance of the surface normal estimation task too. We use the mean angle error (mean) and median angle error (median) per pixel. In addition, we also report the fraction of pixels with absolute angle difference with ground truth less than t where $\mathrm{t} \in \{11.25^{\circ}, 22.5^{\circ}, 30^{\circ}\}$ . For all the tables, we represent if a lower value of a metric is better with $(\downarrow)$ and if an upper value of a metric is better with $(\uparrow)$ . + +For all the experiments, to be consistent with other works, we use only two views to train and evaluate. Please refer the supplementary material for View Selection and ground truth normal generation + +# 4.2. Comparison with state-of-the-art + +For comparisons on the DeMoN datasets (SUN3D, RGBD, Scenes11 and MVS), we choose state-of-the-art approaches of a diverse kind. We also evaluate on another dataset MVS [36] containing outdoor scenes of buildings which is not used for training to evaluate generalizability. The complete comparison on all the metrics is presented in Table 1, and some qualitative results are shown in Fig. 5. Our method outperforms existing methods in terms of all the metrics. Also, our method generates more accurate and smooth point cloud with fine details even in textureless regions (eg. bed, wall). + +
DatasetMethodAbs Rel(↓)Abs diff(↓)Sq Rel(↓)RMSE (↓)RMSE log(↓)δ <1.25 (↑)δ <1.252 (↑)δ <1.253 (↑)
MVS (Outdoor)COLMAP [36]0.38410.84301.2571.47950.50010.48190.66330.8401
DeMoN [40]0.31051.329119.9702.60650.24690.64110.90170.9667
DeepMVS [21]0.23050.66280.61511.14880.30190.67370.88670.9414
DPSNet-U [23]0.08130.20060.09710.44190.15950.88530.94540.9735
Ours0.06790.16770.05550.37520.14190.90540.96440.9879
SUN3D (Indoor)COLMAP [36]0.62321.32673.23592.31620.66120.32660.55410.7180
DeMoN [40]0.21372.14771.12022.42120.20600.73320.92190.9626
DeepMVS [21]0.28160.60400.43500.94360.36330.56220.73880.8951
DPSNet-U [23]0.14690.33550.11650.44890.19560.78120.92600.9728
Ours0.12710.28790.08520.37750.17030.82950.94370.9776
RGBD (Indoor)COLMAP [36]0.53890.93981.76081.50510.71510.27490.50010.7241
DeMoN [40]0.15691.35250.52381.77980.20180.80110.90560.9621
DeepMVS [21]0.29380.62070.42970.86840.35060.54930.80520.9217
DPSNet-U [23]0.15080.53120.25140.69520.24210.80410.89480.9268
Ours0.13140.47370.21260.61900.20910.85650.92890.9450
Scenes11 (Synthetic)COLMAP [36]0.62492.24093.71483.65750.86800.38970.56740.6716
DeMoN [40]0.55601.98773.40202.60340.39090.49630.72580.8263
DeepMVS [21]0.21000.59670.37270.89090.26990.68810.89400.9687
DPSNet-U [23]0.05000.15150.11080.46610.11640.96140.98240.9880
Ours0.03800.11300.06660.37100.09460.97540.99000.9947
+ +Table 1. Comparative evaluation of our model on SUN3D, RGBD, Scenes11 and MVS datasets. For all the metrics except the inlier ratios, lower the better. We use the performance of COLMAP, DeMoN, and DeepMVS reported in [23]. + +
MethodEPE(↓)1-pixel error rate(↓)
GCNet1.8015.6
PSMNet1.0912.1
DPSNet0.808.4
GANet-150.849.9
GANet-deep0.788.7
GANet-NNet0.778.0
Ours0.697.0
+ +We compare our performance against similar cost-volume based approaches GCNet [28], PSMNet [5]) and GANet [55] which have different choices of cost aggregation. Since we use the same testing protocol, we use the performance of GCNet, PSMNet and GANet-15 as reported in [55]. We obtain the performance of GANet-deep which uses a deeper network with more 3D convolutions from the authors' website. Further, we append our NNet branch to the existing GANet architecture by passing the cost volume of GANet through our NNet and train this branch simultaneously with the full GANet architecture. We call this GANet-NNet. Finally, we also train DPSNet on scene flow datasets to confirm that the better performance is due to normal supervision rather than + +better cost aggregation or a better architecture. + +Table 2. Comparative evaluation of our model on Scene Flow datasets. For all the metrics, lower the better. + +
DatasetMethodAbs Rel(↓)Abs diff(↓)Sq Rel(↓)RMSE (↓)
ScanNetDPSNet0.12580.21450.06630.3145
Ours0.11500.20680.05770.3009
Ours-Sc0.10700.19460.05080.2807
SUN3DDPSNet0.14700.32340.10710.4269
Ours0.13320.30380.09100.3994
Ours-Sc0.12470.28480.07910.3671
+ +Table 3. Comparative evaluation of our consistency loss. + +We also evaluate the performance of our consistency loss on SUN3D and ScanNet datasets. We train DPSNet only on SUN3D as well as ScanNet independently along with our method and present the results and present them in Table 3. We observe that our pipeline achieves significantly better performance on all the metrics on the MVS, SUN3D, RGBD, Scenes11 & SceneFlow datasets. We find that joint multi-view normal and depth estimation helps improve performance on indoor, outdoor, real and synthetic datasets. We further show that our consistency module significantly improves the performance on top of our existing pipeline. We further evaluate the performance on planar and textureless surfaces and visualise the changes in the cost volume due to the addition of NNet. + +# 4.3. Surface Normal Estimation + +Table 4 compares our cost volume based surface normal estimation with existing RGB-based, depth-based and RGB-D methods. We perform significantly better than the depth completion based method and perform similar to the RGB based method. The RGB-D based method performs the best, because of using the ground truth depth data. + +
MethodMean (↓)Median 11.25° (↓)22.5° (↑)30° (↑)
RGB-D [53]14.67.565.681.2
DC [59]30.620.739.255.3
RGB [59]31.117.237.758.3
Ours23.118.031.161.8
+ +Table 4. Comparison of normal estimation on ScanNet with single view normal estimation. Note that the RGB-D and depth completion (DC) based methods use ground truth depth. The performances of DC & RGB-D are from [53] and RGB from [59]. + +We evaluate the surface normal estimation performance in the wild by comparing our method against RGB based methods [59]. We use models trained on ScanNet and test them on images from the SUN3D dataset. We present the results in Table 5 and visualize a few cases in Fig. 6. We notice that our method generalizes much better in the wild when compared to the single-view RGB based methods. NNet estimates normals accurately not only in regions of low texture but also in regions with high variance in texture (the bed's surface). We attribute this performance to using two views instead of one which reduces the learning complexity of the task and thus generalizes better. + +We also observe that irrespective of the dataset, the normal estimation loss as well as the validation accuracies saturate within 3 epochs, showing that the task of normal estimation from cost volume is much easier than depth estimation. + +![](images/0f02674d27194030167b6310212f34a09de02352b2dc3346607d3c1a82d2c32c.jpg) +Figure 6. Surface Normal Estimation. Test on SUN3D after training on ScanNet. The RGB-based method is from [59] + +
MethodMean (↓)Median (↓)11.25° (↑)22.5° (↑)30° (↑)
RGB - SUN3D31.625.717.945.657.6
Ours - SUN3D22.917.034.563.273.6
RGB - MVS33.327.811.842.455.1
Ours - MVS27.722.423.152.063.9
+ +Table 5. Generalization performance. Both the models were trained on ScanNet (indoor) and tested on SUN3D (indoor) and MVS (outdoor) datasets + +
MethodAbs Rel(↓)Abs diff(↓)Sq Rel(↓)RMSE (↓)
Raw0.13320.30380.09100.3994
UNet0.13070.28630.08780.3720
UNet-Lt0.12880.29800.08420.3820
UNet-Lc0.12470.28480.07910.3671
+ +Table 6. Ablation Study of Consistency Loss on SUN3D + +# 4.4. Consistency Loss + +We perform a few experiments to analyse the performance gains due to our novel consistency loss. We freeze the stereo pipeline and train the UNet that takes the raw estimates of depth and normal maps and refines the depth estimate. We train three configurations of it: (1) Pure network based refinement with just ground truth supervision, (2) Naive consistency loss, $\mathcal{L}_t$ as regularizer3, (3) Our consistency loss $\mathcal{L}_c$ as regularizer. We analyse the performance of the configurations on the SUN3D dataset which consists of indoor environments with a lot of scope for planar, textureless surfaces. Results in Table 6 suggest experimentally that using our consistency loss as regularizer improves the depth estimation accuracy superior to the other approaches. + +# 4.5. Visualizing the Cost Volume + +Regularization Existing stereo methods, both traditional and learning-based ones perform explicit cost aggregation on the cost volume. This is because each pixel has good correspondences only with a few pixels in its neighborhood in the other view. But the cost volume contains many more candidates, to be specific, the number of slices per pixel. Further, in textureless regions, there are no distinctive features and thus all candidates have similar features. This induces a lot of noise in the cost volume also is responsible for to false-positives. We show that normal supervision during training regularizes the cost volume. Fig. 7 visualises the probability volume slices and compares it against those of DPSNet. We consider the un-aggregated probability volume $\mathbf{P}_1$ in both the cases. We visualise + +![](images/fceb153afcb93fbe7a56045f06aed239e77f1fb43b1a1717eb5cc462c9174bc3.jpg) +Figure 7. Cost slice visualization: The first column contains the reference image and the ground truth depth map. The first row contains the cost volume slices from DPSNet. The second row contains the same from our network. The third row contains the estimates of ground truth cost slices. This can be seen as a $\mathcal{N}(0,0.01)$ distribution around the ground truth depth corresponding to each slice. + +![](images/df641b2e42e478114237b27e250953a5230140cd15a1bd633c8035018c50e09b.jpg) +Figure 8. Post-softmax probability distributions on disparity Green lines illustrate the ground truth disparities while the red lines illustrate the predicted disparities. + +the slices at disparities 14, 15, 16 & 17 (corresponding to depths 2.28, 2.13, 2.0, 1.88) which encompass the wall of the building. The slices of dpsnet are very noisy and do not actually produce good outputs in textureless regions like the walls & sky and reflective regions like the windows. + +Planar and Textureless Regions We also visualise the softmax distribution at a few regions in Fig. 8. Challenging regions that are planar or textureless or both are chosen. (a) The chair image consists of very less distinctive textures and the local patches on the chair look the same as those on the floor. But given two views, estimation of normal in the regions with curvature is much easier than estimating depth. This fact allows our model to perform better in the these regions(red & yellow boxes). Cost volume based methods that estimate a probability for each of the candidate depths struggle in textureless regions and usually have long tails in the output distribution. Normal supervision provides additional local constraints on the cost volume and suppresses the tails. This further justifies our understanding (from Section 3.2) that the correspondence probability is related to the slice's contribution to the normal map. + +We quantify these observations by evaluating the + +performance of depths $\mathbf{D}_1$ obtained from $\mathbf{P}_1$ against the performance of DPSNet without cost aggregation in Table 7. It shows that normal supervision helps to regularize the cost volume by constraining the cost volume better both qualitatively in challenging cases and quantitatively across the entire test data. + +
MethodAbs Rel(↓)Abs diff(↓)Sq Rel(↓)RMSE (↓)
DPSNet0.12740.33880.19570.6230
Ours0.11140.32760.14660.5631
+ +Further, we quantify the performance of our methods on planar and textureless surfaces by evaluating on semantic classes on ScanNet test images. Specifically we use the eigen13 classes [9] and report the depth estimation metrics of our methods against DPSNet on the top-2 occurring classes in Table 8. The performance on the remaining classes can be found in the supplementary material. We show that our methods perform well on all semantic categories and quantitatively show the improvement on planar and textureless surfaces which are usually found on walls and floors. + +Table 7. Test performance without cost aggregation on the DeMoN datasets. + +
LabelMethodAbs Rel(↓)Abs diff(↓)Sq Rel(↓)RMSE (↓)
WallDPSNet0.13400.29680.08710.3599
Ours0.12550.28350.07990.3436
Ours- \( \mathcal{L}_c \)0.11730.26900.07210.3215
FloorDPSNet0.11160.24720.07770.2973
Ours0.10920.22420.05090.2642
Ours- \( \mathcal{L}_c \)0.10370.20610.04740.2561
+ +Table 8. Semantic class specific evaluation on ScanNet + +# 5. Conclusion + +In this paper, we proposed to leverage multi-view normal estimation and apply geometry constraints between surface normal and depth at training time to improve stereo depth estimation. We jointly learn to predict the depth and the normal based on the multi-view cost volume. Moreover, we proposed to refine the depths from depth, normal pairs with an independent consistency module which is trained independently using a novel consistency loss. Experimental results showed that joint learning can improve both the prediction of normal and depth, and the accuracy & smoothness can be further improved by enforcing the consistency. We achieved state-of-the-art performance on MVS, SUN3D, RGBD, Scenes11 and Scene Flow datasets. + +# References + +[1] Aayush Bansal, Bryan Russell, and Abhinav Gupta. Marr revisited: 2d-3d alignment via surface normal prediction. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5965–5974, 2016. 2 +[2] 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 +[3] Alexandre Boulch and Renaud Marlet. Deep learning for robust normal estimation in unstructured point clouds. In Computer Graphics Forum, volume 35, pages 281-290. Wiley Online Library, 2016. 2 +[4] 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 +[5] Jia-Ren Chang and Yong-Sheng Chen. Pyramid stereo matching network. CoRR, abs/1803.08669, 2018. 6 +[6] Jia-Ren Chang and Yong-Sheng Chen. Pyramid stereo matching network. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 2 +[7] Rui Chen, Songfang Han, Jing Xu, and Hao Su. Point-based multi-view stereo network. In The IEEE International Conference on Computer Vision (ICCV), 2019. 1, 2, 3 +[8] Ian Cherabier, Johannes L Schonberger, Martin R Oswald, Marc Pollefeys, and Andreas Geiger. Learning priors for semantic 3d reconstruction. In Proceedings of the European conference on computer vision (ECCV), pages 314-330, 2018. 2 +[9] Camille Couprie, Clément Farabet, Laurent Najman, and Yann LeCun. Indoor semantic segmentation using depth information. In 1st International Conference on Learning Representations, ICLR 2013, Scottsdale, Arizona, USA, May 2-4, 2013, Conference Track Proceedings, 2013. 8 +[10] Angela Dai, Angel X. Chang, Manolis Savva, Maciej Halber, Thomas A. Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 2432-2443, 2017. 5 +[11] Thanuja Dharmasiri, Andrew Spek, and Tom Drummond. Joint prediction of depths, normals and surface curvature from rgb images using cnns. In 2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 1505-1512. IEEE, 2017. 2 +[12] David Eigen and Rob Fergus. Predicting depth, surface normals and semantic labels with a common multi-scale convolutional architecture. In The IEEE International Conference on Computer Vision (ICCV), December 2015. 2 +[13] David F Fouhey, Abhinav Gupta, and Martial Hebert. Data-driven 3d primitives for single image understanding. In Proceedings of the IEEE International Conference on Computer Vision, pages 3392-3399, 2013. 5 +[14] David Ford Fouhey, Abhinav Gupta, and Martial Hebert. Unfolding an indoor origami world. In European Conference on Computer Vision, pages 687-702. Springer, 2014. 2 + +[15] Yasutaka Furukawa, Carlos Hernández, et al. Multi-view stereo: A tutorial. Foundations and Trends® in Computer Graphics and Vision, 9(1-2):1-148, 2015. 2 +[16] 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 +[17] David Gallup, Jan-Michael Frahm, Philippines Mordohai, Qingxiong Yang, and Marc Pollefeys. Real-time plane-sweeping stereo with multiple sweeping directions. In 2007 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR 2007), 18-23 June 2007, Minneapolis, Minnesota, USA, 2007. 2 +[18] Christian Hane, Lubor Ladicky, and Marc Pollefeys. Direction matters: Depth estimation with a surface normal classifier. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 381-389, 2015. 2 +[19] Wilfried Hartmann, Silvano Galliani, Michal Havlena, Luc Van Gool, and Konrad Schindler. Learned multipatch similarity. 2017 IEEE International Conference on Computer Vision (ICCV), pages 1595-1603, 2017. 2 +[20] Heiko Hirschmuller. Stereo processing by semiglobal matching and mutual information. IEEE Transactions on pattern analysis and machine intelligence, 30(2):328-341, 2007. 2 +[21] Po-Han Huang, Kevin Matzen, Johannes Kopf, Narendra Ahuja, and Jia-Bin Huang. Deepmvs: Learning multi-view stereopsis. In 2018 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2018, Salt Lake City, UT, USA, June 18-22, 2018, pages 2821-2830, 2018. 6 +[22] Po-Han Huang, Kevin Matzen, Johannes Kopf, Narendra Ahuja, and Jia-Bin Huang. Deepmvs: Learning multi-view stereopsis. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2, 3 +[23] 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, New Orleans, LA, USA, May 6-9, 2019, 2019. 1, 3, 6 +[24] Sunghoon Im, Hae-Gon Jeon, Stephen Lin, and In So Kweon. Dpsnet: end-to-end deep plane sweep stereo. arXiv preprint arXiv:1905.00538, 2019. 2 +[25] 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 Conference on Computer Vision and Pattern Recognition, pages 2307-2315, 2017. 2 +[26] Michael Kazhdan, Matthew Bolitho, and Hugues Hoppe. Poisson surface reconstruction. In Proceedings of the fourth Eurographics symposium on Geometry processing, volume 7, 2006. 2 +[27] 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 + +[28] 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. CoRR, abs/1703.04309, 2017. 3, 6 +[29] Sameh Khamis, Sean Fanello, Christoph Rhemann, Adarsh Kowdle, Julien Valentin, and Shahram Izadi. Stereonet: Guided hierarchical refinement for real-time edge-aware depth prediction. In Proceedings of the European Conference on Computer Vision (ECCV), pages 573-590, 2018. 2 +[30] Zhengfa Liang, Yiliu Feng, Yulan Guo, Hengzhu Liu, Wei Chen, Linbo Qiao, Li Zhou, and Jianfeng Zhang. Learning for disparity estimation through feature constancy. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 2 +[31] David G Lowe et al. Object recognition from local scale-invariant features. 2 +[32] Keyang Luo, Tao Guan, Lili Ju, Haipeng Huang, and Yawei Luo. P-mvsnet: Learning patch-wise matching confidence aggregation for multi-view stereo. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 2 +[33] N. Mayer, E. Ilg, P. Häusser, P. Fischer, D. Cremers, A. Dosovitskiy, and T. Brox. A large dataset to train convolutional networks for disparity, optical flow, and scene flow estimation. In IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2016. arXiv:1512.02134. 5 +[34] Xiaojuan Qi, Renjie Liao, Zhengzhe Liu, Raquel Urtasun, and Jiaya Jia. Geonet: Geometric neural network for joint depth and surface normal estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 283-291, 2018. 2, 5 +[35] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. CoRR, abs/1505.04597, 2015. 5 +[36] Johannes L. Schonberger and Jan-Michael Frahm. Structure-from-motion revisited. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, pages 4104-4113, 2016. 5, 6 +[37] Jürgen Sturm, Nikolas Engelhard, Felix Endres, Wolfram Burgard, and Daniel Cremers. A benchmark for the evaluation of RGB-D SLAM systems. In 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, IROS 2012, Vilamoura, Algarve, Portugal, October 7-12, 2012, pages 573-580, 2012. 5 +[38] Richard Szeliski, Ramin Zabih, Daniel Scharstein, Olga Veksler, Vladimir Kolmogorov, Aseem Agarwala, Marshall Tappen, and Carsten Rother. A comparative study of energy minimization methods for markov random fields. In European conference on computer vision, pages 16-29. Springer, 2006. 2 +[39] Engin Tola, Vincent Lepetit, and Pascal Fua. Daisy: An efficient dense descriptor applied to wide-baseline stereo. IEEE transactions on pattern analysis and machine intelligence, 32(5):815-830, 2009. 2 +[40] 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 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 5622-5631, 2017. 6 +[41] Xiaolong Wang, David Fouhey, and Abhinav Gupta. Designing deep networks for surface normal estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 539-547, 2015. 2 +[42] Jianxiong Xiao, Andrew Owens, and Antonio Torralba. SUN3D: A database of big spaces reconstructed using sfm and object labels. In IEEE International Conference on Computer Vision, ICCV 2013, Sydney, Australia, December 1-8, 2013, pages 1625-1632, 2013. 5 +[43] Guorun Yang, Hengshuang Zhao, Jianping Shi, Zhidong Deng, and Jiaya Jia. Segstereo: Exploiting semantic information for disparity estimation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 636-651, 2018. 2 +[44] Qingxiong Yang, Liang Wang, Ruigang Yang, Henrik Stewénius, and David Nister. Stereo matching with color-weighted correlation, hierarchical belief propagation, and occlusion handling. IEEE Transactions on Pattern Analysis and Machine Intelligence, 31(3):492-504, 2008. 2 +[45] Yao Yao, Zixin Luo, Shiwei Li, Tian Fang, and Long Quan. Mvsnet: Depth inference for unstructured multi-view stereo. European Conference on Computer Vision (ECCV), 2018. 1, 2, 5 +[46] Yao Yao, Zixin Luo, Shiwei Li, Tian Fang, and Long Quan. Mvsnet: Depth inference for unstructured multiview stereo. In Computer Vision - ECCV 2018 - 15th European Conference, Munich, Germany, September 8-14, 2018, Proceedings, Part VIII, pages 785-801, 2018. 3 +[47] Yao Yao, Zixin Luo, Shiwei Li, Tianwei Shen, Tian Fang, and Long Quan. Recurrent mvvsnet for high-resolution multiview stereo depth inference. Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2 +[48] Wei Yin, Yifan Liu, Chunhua Shen, and Youliang Yan. Enforcing geometric constraints of virtual normal for depth prediction. In Proceedings of the IEEE International Conference on Computer Vision, pages 5684-5693, 2019. 2 +[49] Zhichao Yin and Jianping Shi. Geonet: Unsupervised learning of dense depth, optical flow and camera pose. In CVPR, 2018. 1 +[50] Jae-Chern Yoo and Tae Hee Han. Fast normalized cross-correlation. Circuits, systems and signal processing, 28(6):819, 2009. 2 +[51] Jure Zbontar, Yann LeCun, et al. Stereo matching by training a convolutional neural network to compare image patches. Journal of Machine Learning Research, 17(1-32):2, 2016. 2 +[52] Jin Zeng, Yanfeng Tong, Yunmu Huang, Qiong Yan, Wenxiu Sun, Jing Chen, and Yongtian Wang. Deep surface normal estimation with hierarchical rgb-d fusion. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6153-6162, 2019. 2 +[53] Jin Zeng, Yanfeng Tong, Yunmu Huang, Qiong Yan, Wenxiu Sun, Jing Chen, and Yongtian Wang. Deep surface normal estimation with hierarchical RGB-D fusion. In IEEE Conference on Computer Vision and Pattern Recognition, + +CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 6153-6162, 2019. 5, 7 +[54] Huangying Zhan, Chamara Saroj Weerasekera, Ravi Garg, and Ian Reid. Self-supervised learning for single view depth and surface normal estimation. arXiv preprint arXiv:1903.00112, 2019. 2 +[55] Feihu Zhang, Victor Adrian Prisacariu, Ruigang Yang, and Philip H. S. Torr. Ga-net: Guided aggregation net for end-to-end stereo matching. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 185-194, 2019. 6 +[56] Shuangli Zhang, Weijian Xie, Guofeng Zhang, Hujun Bao, and Michael Kaess. Robust stereo matching with surface normal prediction. In 2017 IEEE International Conference on Robotics and Automation (ICRA), pages 2540-2547. IEEE, 2017. 2 +[57] Yinda Zhang and Thomas Funkhouser. Deep depth completion of a single rgb-d image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 175-185, 2018. 2 +[58] Yinda Zhang and Thomas A. Funkhouser. Deep depth completion of a single RGB-D image. In 2018 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2018, Salt Lake City, UT, USA, June 18-22, 2018, pages 175-185, 2018. 5 +[59] Yinda Zhang, Shuran Song, Ersin Yumer, Manolis Savva, Joon-Young Lee, Hailin Jin, and Thomas A. Funkhouser. Physically-based rendering for indoor scene understanding using convolutional neural networks. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 5057-5065, 2017. 1, 7 \ No newline at end of file diff --git a/normalassistedstereodepthestimation/images.zip b/normalassistedstereodepthestimation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f7cda3f87318c67c4c33cd5d0dfed4aaa4bd949e --- /dev/null +++ b/normalassistedstereodepthestimation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9f578ba805a58987face61d86f99992a54357d5b9b50e5d3c22723407e978ea +size 720407 diff --git a/normalassistedstereodepthestimation/layout.json b/normalassistedstereodepthestimation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..39d3516131108a6c6b33a8624c60281e95b53eee --- /dev/null +++ b/normalassistedstereodepthestimation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2788006903d4a176f81ddf79e7fcfb55bea4d1e15e3a6d2cbbfce88b08734caf +size 371132 diff --git a/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/225f3053-d04d-4c3c-bbb4-deb7493fd897_content_list.json b/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/225f3053-d04d-4c3c-bbb4-deb7493fd897_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..7a254b13edbd6f115bbc1bc86b0defb61dd071f1 --- /dev/null +++ b/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/225f3053-d04d-4c3c-bbb4-deb7493fd897_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb3474668485d2c31a5570d4e06e60578cd94e9871698448ed8fe0877f3a58dc +size 82881 diff --git a/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/225f3053-d04d-4c3c-bbb4-deb7493fd897_model.json b/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/225f3053-d04d-4c3c-bbb4-deb7493fd897_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4f741eacb2bf5f36ce6f8d009660e67e6e71e490 --- /dev/null +++ b/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/225f3053-d04d-4c3c-bbb4-deb7493fd897_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23979f20d24afba2932362ae34c33ff33b9dd4b2b584ac095917cd1aa4bc2b89 +size 100464 diff --git a/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/225f3053-d04d-4c3c-bbb4-deb7493fd897_origin.pdf b/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/225f3053-d04d-4c3c-bbb4-deb7493fd897_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b8a891a65216063fa45caff01ee1bf91ef9435c8 --- /dev/null +++ b/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/225f3053-d04d-4c3c-bbb4-deb7493fd897_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b4a1cf52886cd88b04eb2934b1f8dfdb2f1c717e87ae7e36aeb600183200466 +size 423612 diff --git a/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/full.md b/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e02ecb44cca1a1adfc87c45608844c151bb2bb8a --- /dev/null +++ b/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/full.md @@ -0,0 +1,367 @@ +# Normalized and Geometry-Aware Self-Attention Network for Image Captioning + +Longteng Guo $^{1,2}$ Jing Liu $^{1}$ Xinxin Zhu $^{1}$ Peng Yao $^{3}$ Shichen Lu $^{4}$ Hanqing Lu + +$^{1}$ National Laboratory of Pattern Recognition, Institute of Automation, Chinese Academy of Sciences + +$^{2}$ School of Artificial Intelligence, University of Chinese Academy of Sciences + +$^{3}$ University of Science and Technology Beijing $^{4}$ Wuhan University + +{longteng.quo,jliu,xinxin.zhu,luhq}@nlpr.ia.ac.cn,S20180598@xs.ustb.edu.cn,sclu@whu.edu.cn + +# Abstract + +Self-attention (SA) network has shown profound value in image captioning. In this paper, we improve SA from two aspects to promote the performance of image captioning. First, we propose Normalized Self-Attention (NSA), a reparameterization of SA that brings the benefits of normalization inside SA. While normalization is previously only applied outside SA, we introduce a novel normalization method and demonstrate that it is both possible and beneficial to perform it on the hidden activations inside SA. Second, to compensate for the major limit of Transformer that it fails to model the geometry structure of the input objects, we propose a class of Geometry-aware Self-Attention (GSA) that extends SA to explicitly and efficiently consider the relative geometry relations between the objects in the image. To construct our image captioning model, we combine the two modules and apply it to the vanilla self-attention network. We extensively evaluate our proposals on MS-COCO image captioning dataset and superior results are achieved when comparing to state-of-the-art approaches. Further experiments on three challenging tasks, i.e. video captioning, machine translation, and visual question answering, show the generality of our methods. + +# 1. Introduction + +Automatically generating captions for images, namely image captioning [20, 40], has emerged as a prominent research problem at the intersection of computer vision (CV) and natural language processing (NLP). This task is challenging as it requires to first recognize the objects in the image, the relationships between them, and finally properly organize and describe them in natural language. + +Inspired by the sequence-to-sequence model for machine + +translation, most image captioning approaches adopt an encoder-decoder paradigm, which uses a deep convolutional neural network (CNN) to encode the input image as a vectorial representation, and a recurrent neural network (RNN) based caption decoder to generate the output caption. Recently, self-attention (SA) networks, denoted as SANs, have been introduced by [46, 43] to replace conventional RNNs in image captioning. Since its first introduction in Transformer [32], SA and its variants have shown promising empirical results in a wide range of CV [45, 16, 37, 10, 24, 9] and NLP [30, 8, 41] tasks. Although SAN-based framework has achieved state-of-the-art performance in image captioning, it remains two problems to be solved. + +Firstly, SA is susceptible to the internal covariate shift [18] problem. Typically, SA is regarded as a mapping of a set of query and key/value pairs. We observe, from another perspective, that computation of the attention weights in SA could be considered as feeding the queries into a fully-connected layer, whose parameters are dynamically computed according to the inputs. Problem could happen when the distribution of the queries shifts due to the change in network parameters during training. That is, the subsequent layers have to continuously adapt to the new input distribution, and consequently, SA may not be learned effectively. This problem is called "Internal Covariate Shift" in [18] — the tendency that the distribution of activations drifts during training in a feed-forward network. + +To eliminate the internal covariate shift problem inside SA, in this paper, we introduce an effective reparameterization of SA, named Normalized Self-Attention (NSA). NSA performs a novel normalization method on the hidden activations of SA to fix their distributions. By doing so, we can effectively decouple the fully-connected layer's parameters from those of other layers, leading to a better-conditioned optimization of SA. While Layer Normalization (LN) [4] + +is proven to be very critical for enabling the convergence of Transformer, however, LN is only applied outside SA blocks. To our knowledge, there has not been any deep exploration to find a suitable normalization method inside SA. We demonstrate that our NSA can collaborate with LN to bring improved generalization for SA-based networks. + +Another critical issue in SA is its inability to model the geometric relationships among input elements. The vanilla self-attention treats its inputs as "bag-of-features", simply neglecting their structure and the relationships between them. However, the objects in the image, from which the region-based visual features are extracted for image captioning, inherently have geometric structure — 2D spatial layout and variations in scale/aspect ratio. Such inherent geometric relationships between objects play a very complex yet critical role in understanding the image content. One common solution to inject position information into SA is adding representations of absolute positions to each element of the inputs, as is often used in the case of 1D sentences. Nonetheless, this solution does not work well for image captioning because the 2D geometry relations between objects are harder to infer from their absolute positions. + +We present a more efficient approach to the above problem: explicitly incorporating relative geometry relationships between objects into SA. The module is named Geometry-aware Self-Attention (GSA). GSA extends the original attention weight into two components: the original content-based weight, and a new geometric bias, which is efficiently calculated by the relative geometry relations and, importantly, the content of the associated elements, i.e. query or key. + +By combining both NSA and GSA, we obtain an enhanced SA module. We then construct our Normalized and Geometry-aware Self-Attention Network, namely NG-SAN, by replacing the vanilla SA modules in the encoder of the self-attention network with the proposed one. Extensive experiments on MS-COCO validate the effectiveness of our proposals. In particular, our NG-SAN establishes a new state-of-the-art on the MS-COCO evaluation sever, improving the best single-model result in terms of CIDEr from 125.5 to 128.6. To demonstrate the generality of NSA, we further present video captioning, machine translation, and visual question answering experiments on the VATEX, WMT 2014 English-to-German, and VQA-v2 datasets, respectively. On top of the strong Transformer-based baselines, our methods can consistently increase accuracies on all tasks at a negligible extra computational cost. + +To summarize, the main contributions of this paper are three-fold: + +- We presented Normalized Self-Attention, an effective reparameterization of self-attention, which brings the benefits of normalization technique inside SA. + +- We introduce a class of Geometry-aware Self-Attention that explicitly makes use of the relative geometry relationships and the content of objects to aid image understanding. + +- By combining the two modules and apply it on the self-attention network, we establish a new state-of-the-art on the MS-COCO image captioning benchmark. Further experiments on video captioning, machine translation, and visual question answering tasks demonstrate the generality of our methods. + +# 2. Related Work + +# 2.1. Image Captioning + +Existing image captioning approaches typically follow the CNN-RNN architecture [36]. Recently, a variety of improving works have been proposed. [40] introduces soft and hard attention mechanisms to automatically focus on salient objects when generating each word. [13] mimics human polishing process with a ruminant decoder. [2] uses an object detector to propose salient image regions (objects) and extract for each object a feature vector, which are then used as inputs for attention mechanism. [28] introduces reinforcement-learning with a self-critical reward for model training. Recently, [46] and [43] propose to replace conventional RNN with the Transformer architecture, achieving state-of-the-art performance. However, more deep exploration of the self-attention module in Transformer is not conducted on the task of image captioning, which motivates our work in this paper. + +# 2.2. Normalization + +Normalization [18] has become a critical ingredient in constructing a deep neural network. It is proposed by Batch normalization (BN) [18] to control the distributions of the internal activations of feed-forward neural networks, thereby reducing internal covariate shift. Several variants of normalization method such as Layer Normalization (LN) [4], Instance Normalization (IN) [31], and Group Normalization [39] have been developed mainly to reduce the mini-batch dependencies inherent in BN. LN operates along the channel dimension for each individual element in an example. IN performs BN-like computation but only for each sample. Though BN and LN have been adopted in networks that contain the SA module, e.g. Transformer, they are typically used outside the SA module. For the first time, our normalized self-attention brings the benefit of normalization inside the SA module. + +# 2.3. Position encoding in self-attention networks + +To inject sequence ordering into SA module, in Transformer, absolute position encodings based on sinusoids are + +added to the input elements both in the encoder and decoder. Recently, [29] modulates SA by incorporating the relative distances between sequence elements. [16] proposes an SA-like module for object detection, which multiplies a new relation weight on the original self-attention weight, and is used by [15] in Transformer. Its relation weight is computed solely with the relative coordinates and sizes between bounding boxes. Different from these works, our GSA module explores a broader range of geometric biases that involve not only the geometry information but also the content of the associated objects. + +# 3. Preliminaries + +# 3.1. Self-Attention (SA) + +We first review a basic form of self-attention, called "Scaled Dot-Product Attention", which is first proposed as a core component in Transformer. + +The self-attention layer first transforms a set of $N$ $d_{k}$ dimensional vectors, packed into a matrix $X\in \mathbb{R}^{N\times d_k}$ into queries $Q\in \mathbb{R}^{N\times d}$ , keys $K\in \mathbb{R}^{N\times d}$ , and values $V\in \mathbb{R}^{N\times d}$ given by $Q = XW_{Q}$ , $K = XW_{K}$ , $V = XW_{V}$ , where the projections $W_{Q},W_{K}$ , and $W_{V}$ are all $d_{k}\times d$ parameter matrices. The energy scores $E$ between any queries and keys are computed as + +$$ +E = Q K ^ {\top}, \tag {1} +$$ + +where $E$ is an $N \times N$ weight matrix, on which a softmax function is applied to obtain the weights of the values. The output is computed as a weighted sum of the values as + +$$ +Z = \text {A t t e n t i o n} (Q, K, V) = \text {S o f t m a x} (E) V. \tag {2} +$$ + +# 3.2. Self-attention network for image captioning + +Figure 1 shows self-attention network (SAN), which is our baseline architecture for image captioning. Similar to Transformer, the model consists of an image encoder and a caption decoder, both of which are composed of a stack of $L$ layers. Each layer consists of one (for the encoder layer) or two (for the decoder layer) multi-head attention (MHA) sub-layers followed by a feed-forward network (FFN). The MHA sub-layer contains $h$ parallel "heads" with each head corresponding to an independent scaled dot-product attention function. Besides, a residual connection and layer normalization are used between all the sub-layers. + +The inputs to the encoder are the region-based visual features extracted from Faster-RCNN [27] object detector. Each input element corresponds to an object in the image. Before feeding the input vectors into the encoder, they are first passed through a dense layer followed by a ReLU layer to adapt their dimension to be consistent with the encoder. + +![](images/cace88fd86479b2d458d7fc4c589028a6be949e7b64b77c2602ac338a5d333c2.jpg) +Figure 1. Architecture of the self-attention network (SAN) for image captioning. + +The decoder takes the attended visual features and the embeddings of the previous words to predict the next word recursively. Following Transformer, we add sinusoidal "positional encodings" to the inputs at the bottoms of the decoder. Because the regions in the image don't have a natural order like sequences, no position information is added in the encoder side. + +# 4. Approach + +# 4.1. Normalized SA (NSA) + +This section introduces a reparameterization of selfattention that takes advantage of normalization method for improved training. + +We first review the formulation of Batch Normalization (BN). Consider feeding an input mini-batch $x$ into a feedforward layer $y = F(x, \Theta)$ , where $F$ is an arbitrary transformation, and $\Theta$ is the parameter to be learned. The internal covariate shift happens when the distribution of $x$ shifts during training. To reduce internal covariate shift, BN normalizes each channel of $x$ using the mean and variance accumulated over the same channel in the whole mini-batch. + +We then take a closer look at the attention weight in Eqn. 2: + +$$ +\begin{array}{l} S = \operatorname {S o f t m a x} (Q K ^ {\top}) \tag {3} \\ = \operatorname {S o f t m a x} ((X W _ {Q}) \cdot (W _ {K} ^ {\top} X ^ {\top})). \\ \end{array} +$$ + +It can be considered as an input instance $X \in \mathbb{R}^{N \times d_k}$ first goes through a $d_k \times d$ linear layer parameterized by $W_Q$ to obtain $Q = X W_Q \in \mathbb{R}^{N \times d}$ , which is then further fed into a $d \times N$ linear layer parameterized by $K^\top = W_K^\top X^\top$ followed by a Softmax activation to output $N$ probabilities over the keys. Thus, we can re-formulate Eqn. 3 as a fully- + +connected layer $F$ followed by a Softmax activation: + +$$ +\begin{array}{l} S = \operatorname {S o f t m a x} (F (Q, \Theta)), \\ Q = X W ^ {Q}, \quad \Theta = K ^ {\top} = W _ {K} ^ {\top} X ^ {\top}. \tag {4} \\ \end{array} +$$ + +Note that the parameter $\Theta$ is dynamically calculated based on $X$ . From this perspective, SA can be susceptible to the internal covariate shift problem just as in a standard feed-forward network. That is, when the distribution of input $Q$ shifts due to the change in network parameters during training, the layer parameter $\Theta$ needs to continuously adapt to the new input distribution. Consequently, SA may not be learned effectively. + +Therefore, to eliminate the internal covariate shift, it is advantageous for the distribution of $Q$ to remain fixed over time. Then $\Theta$ does not have to readjust to compensate for the change in the distribution of $Q$ . This can be accomplished by performing normalization on $Q$ by + +$$ +\hat {Q} = \operatorname {N o r m} (Q). \tag {5} +$$ + +We now consider the implementation of Norm. BN is not directly suitable for Norm because instead of using a shared layer parameters for all examples in the dataset, the layer parameter $\Theta = W_K^\top X^\top$ is dynamically computed with the instance-specific $X$ . Therefore, it is more desirable to perform normalization, Norm, for every single instance independently. + +Let $x \in \mathbb{R}^{B \times T \times C}$ and $x_{btc}$ denote the $btc$ -th element of $x$ , where $b$ is the sample index, $c$ is the channel index, and $t$ is the index of the additional spatial dimension. We implement Norm as normalizing each instance in the minibatch independently using per-channel feature statistics: + +$$ +\begin{array}{l} \hat {x} _ {b t c} = \frac {x _ {b t c} - \mu_ {b c}}{\sqrt {\sigma_ {b c} ^ {2} + \epsilon}}, \\ \mu_ {b c} = \frac {1}{T} \sum_ {t = 1} ^ {T} x _ {b t c}, \sigma_ {b c} ^ {2} = \frac {1}{T} \sum_ {t = 1} ^ {T} \left(x _ {b t c} - \mu_ {b c}\right) ^ {2}. \tag {6} \\ \end{array} +$$ + +The above normalization method is exactly the Instance Normalization (IN) in the 1D case. Subtracting the mean from the queries could be considered as highlighting the differences among the queries and encourage them to query information from distinctive aspects. + +We represent the normalization operation in Eqn. 6 as $\hat{x} = \mathrm{IN}(x)$ . Finally, we derive our normalized self-attention that reparameterizes the self-attention as + +$$ +\hat {Q} = \operatorname {I N} (Q), \quad Z = \operatorname {S o f t m a x} (\hat {Q} K ^ {\top}) V. \tag {7} +$$ + +Similar to BN and IN, it is optional to further apply the channel-wise affine transformation $\tilde{x}_{btc} = \hat{x}_{btc}\gamma_c + \beta_c$ in Norm, where $\gamma ,\beta \in \mathbb{R}^C$ are learnable scale and shift parameters. But we empirically found it not necessary in + +our experiments. It is also optional to normalize $K$ with $\hat{K} = \mathrm{IN}(K)$ . This is equivalent to normalizing the dynamic parameters $\Theta$ , which, however, may limit the capacity of SA. + +Relation to prior works. Our normalization method differs from Layer Normalization (LN) in that LN normalizes along all channels of each individual element, while our method normalizes along each channel of all input elements in an instance. As for IN, it is typically used in 2D CNNs, e.g. on style transfer task. To our knowledge, IN has not been successfully used for language generation tasks, in particular for SAN. + +# 4.2. Geometry-Aware SA (GSA) + +The inherent geometric structure among the input objects is beneficial for reasoning about the visual information, which, however, is not modeled in the vanilla Transformer. Therefore, we propose GSA that improves the SA module by taking into account the pairwise geometry relationships and the content information of objects. + +Denote the relative geometry features between two objects $i$ and $j$ as $\mathbf{f}_{ij}^{g}$ , which is a 4-dimensional vector of the relative position and size of the bounding boxes: + +$$ +\left(\log \left(\frac {\left| x _ {i} - x _ {j} \right|}{w _ {i}}\right), \log \left(\frac {\left| y _ {i} - y _ {j} \right|}{h _ {i}}\right), \log \left(\frac {w _ {i}}{w _ {j}}\right), \log \left(\frac {h _ {i}}{h _ {j}}\right)\right) ^ {T}, \tag {8} +$$ + +where $(x_{i},y_{i}),w_{i},h_{i}$ are the center coordinate, width, and height of box $i$ , respectively. + +We project $\mathbf{f}_{ij}^{g}$ to a high-dimensional representation $G_{ij}$ with a fully-connected (FC) layer followed by a ReLU activation as + +$$ +G _ {i j} = \operatorname {R e L U} \left(\operatorname {F C} \left(\mathbf {f} _ {i j} ^ {g}\right)\right), \tag {9} +$$ + +where $G\in \mathbb{R}^{N\times N\times d_g}$ + +We then modify the energy score in Eq. 1 to include the effect of $G$ as + +$$ +E = Q K ^ {\top} + \phi \left(Q ^ {\prime}, K ^ {\prime}, G\right), \tag {10} +$$ + +where $\phi$ is the geometric attention function, which outputs a score matrix of shape $N\times N$ , and $Q^{\prime},K^{\prime}\in \mathbb{R}^{N\times d_{g}}$ are geometric queries and keys that are computed in the same way as $Q,K$ , i.e. by projecting the input $X$ . In the above equation, the first term is related to the queries and keys, namely content-based weight. The second term represents the geometric bias, which involves the geometry relations and the contents of $Q^{\prime}$ and $K^{\prime}$ . + +We now discuss three choices of $\phi$ , which can be either used individually or combined. + +Content-independent geometric bias. The geometry relation $G_{ij}$ conveys useful information for understanding the + +relationships between two objects, e.g. object $i$ and $j$ have "comparable sizes" and object $i$ is "next to" object $j$ . Thus, we directly project $G_{ij}$ to a scalar score by + +$$ +\phi_ {i j} ^ {1} = \operatorname {R e L U} \left(w _ {g} ^ {\top} G _ {i j}\right), \tag {11} +$$ + +where $w_{g}$ is the parameter to be learned. The ReLU nonlinearity acts as a zero trimming operation so that only the relations between objects with certain geometric relationships are considered. + +The relation network [16] presented recently for object detection is a special case of the content-independent geometric bias. Different from the above formulation, it fuses the content-independent geometric bias and the original attention weights by multiplication and use sinusoidal embedding of the geometry feature. + +Query-dependent geometric bias. The above "content-independent" variant assumes a static geometric bias, i.e. the same geometric bias is applied to all the query-key pairs in an SA layer. However, the geometric biases are more often different, depending on what the associated query object is. For example, for the queries, "sea" and "ball", their scale difference are often huge in the image, and thus their sensitivities to the same change of a key's distance/position vary widely. Therefore, the geometric biases of the two queries should be adapted to match their content. To this end, we decide to dynamically compute the geometric bias for different queries: + +$$ +\phi_ {i j} ^ {2} = Q _ {i} ^ {\prime} ^ {\top} G _ {i j}. \tag {12} +$$ + +Here we use dot-product to match $Q_{i}^{\prime}$ with $G_{ij}$ since it is more computation and memory efficient than using the Concatenation-FC operation. + +Key-dependent geometric bias. Similar to the query-dependent variant, geometric bias can also be associated with the content of the keys, computed as + +$$ +\phi_ {i j} ^ {3} = K _ {j} ^ {\prime \top} G _ {i j}. \tag {13} +$$ + +# 4.3. Applying NSA and GSA modules to SAN + +We first combine both NSA and GSA by replacing $Q$ in Eqn. 10 with the normalized one, $\hat{Q}$ . We then use this module to replace the vanilla SA modules in the encoder of SAN, which results in our full model, namely Normalized and Geometry-aware Self-Attention Network (NG-SAN). NSA is not applied in the decoder of SAN because the decoder is autoregressive and has variable-length inputs. This is undesirable for IN because the mean and variance statistics are meaningless when the sequence length is 1. + +![](images/5c52bc22d6f38f39fae5192ec7b50efce944f05af83edc4cf57e84314bf050a8.jpg) +Figure 2. Changes of CIDEr scores during training. + +# 5. Experiments on Image Captioning + +# 5.1. Experimental setup + +MS-COCO dataset [22]. It is the most popular benchmark for image captioning. We use the 'Karpathy' splits that have been used extensively for reporting results in prior works. This split contains 113,287 training images with 5 captions each, and 5k images for validation and test splits, respectively. We follow standard practice [35] to preprocess the text, resulting in a final vocabulary of 9,487 words. We use the region-based image features provided by Bottom-Up [2] for training. + +Evaluation metrics. We use the standard automatic evaluation metrics to evaluate the quality of image caption-s, including BLEU-1/2/3/4 [26], METEOR [7], ROUGE-L [21], CIDEr [33], and SPICE [1], which are denoted as B@1/2/3/4, M, R, C and S, respectively. + +Implementation details. We follow Transformer-Base model [32] and [43] to set the model hyper-parameters and train the model. Specifically, the dimensionality of input image features is 2048. The latent dimension in the MHA module is 512, and the number of heads is 8. Inner dimension in the FFN module is 2,048. We apply dropout with a probability of 0.1. We use the same number of layers $L$ for the encoder and decoder. For training, we use the Adam optimizer [19] We use a step decay schedule with warm-up for varying the learning rate. The base learning rate is set to $\min (t\times 10^{-4};3\times 10^{-4})$ , where $t$ is the current epoch number that starts at 1. After 6 epochs, the learning rate is decayed by 1/2 every 3 epochs. All models are first trained for 15 epochs with the cross-entropy loss and then further optimized with CIDEr reward [28] for additional 15 epochs. If not specifically mentioned, by default we set $L = 4$ , only normalize the query and do not apply $\gamma ,\beta$ in NSA, and use the query-dependent variant $(\phi^1)$ of GSA. Beam search with a beam width of 3 is used during testing stage. + +Table 1. Comparisons between N-SAN and SAN using different numbers of self-attention layers $L$ . + +
#LayersModel#paramsB@4MRCS
1SAN18.1M36.828.057.6123.421.8
N-SAN18.1M38.228.658.2127.222.2
2SAN25.5M38.228.558.3127.122.3
N-SAN25.5M38.928.958.6129.722.6
4SAN40.2M38.428.658.4128.622.6
N-SAN40.2M39.329.158.9130.823.0
6SAN54.9M38.628.658.5128.822.5
N-SAN54.9M39.329.259.1131.123.0
+ +Table 2. Comparison of using various normalization methods in NSA. + +
ApproachB@4MRCS
SAN38.428.658.4128.622.6
LN38.528.658.3128.222.5
BN38.828.958.7129.422.8
IN39.429.259.0130.723.0
IN w/o γ,β39.329.158.9130.823.0
+ +# 5.2. Analysis on NSA + +In this section, we examine the effectiveness of NSA module. We replace the SA modules in the encoder of SAN with NSA, resulting in a model named Normalized Self-Attention Network (N-SAN). + +Number of attention layers. In Table 1 we compare the performance of N-SAN and SAN under the same number of SA layers $L \in \{1,2,4,6\}$ . We can see that the model size grows linearly as $L$ increases. Regarding the performance, we have two observations as follows. 1) As $L$ increases, the performance of both SAN and N-SAN gradually improves and reaches the optimal value when $L = 6$ . However, the performance gain of increasing $L$ from 4 to 6 is not very significant. Therefore, we use $L = 4$ for later experiments as a compromise between the model's performance and complexity. 2) N-SAN consistently outperforms SAN on all metrics under different $L$ . In Figure 2, we further plot the CIDEr scores of the one-layer SAN and N-SAN models during training, evaluated on the validation split at each epoch. As we can see, the curve of N-SAN is above that of SAN for most of the time. + +Different normalization methods. Since we introduced IN into the NSA module for normalization, an intuitive question to ask is whether we can replace IN with other normalization methods. In Table 2 we show the results of using different normalization methods including BN, LN, IN and IN without using the affine transformations $(\gamma$ and $\beta)$ . We have the following observations. 1) Using LN slightly decreases the performance. We conjecture that is because LN normalizes activations of all channels with the same nor + +Table 3. Comparison of normalizing query and key in N-SAN. + +
QueryKeyB@4MRCS
XX38.428.658.4128.622.6
✓X39.329.158.9130.823.0
X✓39.229.058.8130.122.8
✓✓39.429.158.8130.723.1
+ +Table 4. Comparison of various variants of GSA. + +
Approach#paramsB@4MRCS
SAN40.2M38.428.658.4128.622.6
absolute40.2M38.328.558.4128.422.6
content-independent40.2M39.229.158.9131.022.9
key-dependent41.5M38.929.058.8129.522.8
query-dependent41.5M39.329.259.0131.423.0
+ +malization terms $(\mu$ and $\sigma)$ , thus limiting the expression capacity of each channel when calculating attention weights. 2) IN and IN $w / o\gamma ,\beta$ significantly outperform SAN and all the other normalization methods. Meanwhile, the extra affine transformations $(\gamma$ and $\beta)$ are not necessary. 3) Applying BN outperforms SAN but is inferior to adopting IN. BN has a similar effect as IN to reduce the internal covariate shift by fixing the distribution of the queries. However, as is described in Sec. 4.1, since the layer parameter $\Theta$ in Eqn. 4 depends on instance-specific input, it is more desirable to perform input normalization also on each instance instead of on the whole mini-batch. + +What if we normalize the keys in addition to the queries? In Table 3, we compare the variants of Eqn. 7, including normalizing Q alone, K alone, and both Q and K. We have the following observations. 1) Normalizing either of Q and K could increase the performance. 2) The performances of normalizing both Q and K and normalizing Q alone are very similar, and are both significantly higher than that of SAN. 3) Normalizing K alone is inferior to normalizing Q alone. The reason is that normalizing $K$ is equivalent to normalizing $\Theta$ in Eqn. 4, which may limit the model capacity of SA. + +# 5.3. Analysis on GSA + +In this section, we examine the effectiveness of GSA module. Similar to N-SAN, we replace the SA modules in the encoder of SAN with GSA to obtain a model named Geometry-aware Self-Attention Network (G-SAN). + +Variants of GSA. In Table 4 we compare various variants of GSA module introduced in Sec. 4.2. “+absolute” denotes adding absolute geometry information of each individual object to their input representations at the bottoms of the encoder. It is obtained by embedding the geometry features, i.e. the center coordinates and the width/height of the box, normalized by the width/height of the image, to a + +Table 5. Leaderboard of the published state-of-the-art, single-model methods on the online MS-COCO test server, where c5 and c40 denote using 5 and 40 references for testing, respectively. CIDEr (C40) is the default sorting metric on the leaderboard. + +
ModelBLEU-1BLEU-2BLEU-3BLEU-4METEORROUGE-LCIDEr-D
c5c40c5c40c5c40c5c40c5c40c5c40c5c40
Up-Down [2]80.295.264.188.849.179.436.968.527.636.757.172.4117.9120.5
CAVP [23]80.194.964.788.850.079.737.969.028.137.058.273.1121.6123.8
SGAE [42]80.695.065.088.950.179.637.868.728.137.058.273.1122.7125.5
VSUA [14]79.994.764.388.649.579.337.468.328.237.157.972.8123.1125.5
NG-SAN (Ours)80.895.065.489.350.880.638.870.229.038.458.774.0126.3128.6
+ +sinusoidal representation using the same method as the "positional encodings" in [32]. We have the following findings. 1) Adding the absolute geometry information ("absolute") is not beneficial to the performance. That is probably because it is too complex for SA to infer the 2D layout of objects from their absolute geometry information. 2) All the proposed variants of GSA can improve the performance of SAN, showing the advantages of using relative geometry information. 3) "query-dependent" brings the best performance and outperforms the content-independent variant, proving that incorporating the content information of the associated query can help infer a better geometric bias. 4) "key-dependent" is inferior to "query-dependent". That is because when using key-dependent geometric bias, the scores $\phi_{ij}^3 = K_j^\top G_{ij}$ condition on different keys $K_j'$ , thus the differences in $G_{ij}$ may be overwhelmed by the differences in $K_j'$ when performing softmax on the keys' dimension. In comparison, when using query-dependent geometric bias, the effect of $G_{ij}$ could be highlighted since the scores condition on a common query $Q_i'$ when performing softmax. We did not observe further improvement when combing these variants into $\phi$ in Eq. 10. + +# 5.4. Analysis on the full model (NG-SAN) + +We now validate the effectiveness of NG-SAN that takes advantage of both NSA and GSA. + +Comparisons with state-of-the-arts. We compare NG-SAN with the state-of-the-art methods, including Up-Down [2], CAVP [23], SGAE [42], VSUA [14], ORT [15], AoANet [17], and MT [43]. All the methods except ORT, AoANet, and MT are based on single- or multi-layer Long Short-Term Memory (LSTM) networks. MT adopts a Transformer-Base architecture, using 6 SA layers for both the encoder and the decoder, and inserts an additional LSTM layer in the decoder. ORT also adopts the Transformer-Base architecture and follows [16] to model the spatial relationship between inputs. AoANet uses SAN as the encoder and LSTM as the decoder. + +Table 6 compares the results of each method. We can see that both G-SAN and N-SAN outperform the SAN baseline across all metrics. Moreover, NG-SAN further outperforms + +Table 6. Comparisons with state-of-the-art single-model approaches on MS-COCO Karpathy test split. + +
Model#paramsB@4MRCS
Up-Down [2]-36.327.756.9120.121.4
CAVP [23]-38.628.358.5126.321.6
SGAE [42]-39.028.458.9129.122.2
VSUA [14]-38.428.558.4128.622.0
ORT [15]-38.628.758.4128.322.6
AoANet [17]-38.929.258.8129.822.4
MT [43]57.0M39.829.159.1130.9-
SAN40.2M38.428.658.4128.622.6
N-SAN40.2M39.329.158.9130.823.0
G-SAN41.5M39.329.259.0131.423.0
NG-SAN41.5M39.929.359.2132.123.3
+ +G-SAN and N-SAN, demonstrating that GSA and NSA are compatible with each other. NG-SAN significantly outperforms all the other methods, including both LSTM-based and SA-based ones, over all metrics. Particularly, we improve the best CIDEr score from 130.9 to 132.1. Table 5 further reports the performance of the top-performing single-model solutions on the official test server. Compared with the published methods, our single model significantly outperforms all the other methods in terms of all evaluation metrics except BLEU-1. In particular, we establish a new state-of-the-art score of 128.6 on CIDEr (C40). + +Complexity. As can be seen in the "#params" column in Table 6, NG-SAN requires very few (about $2\mathrm{k}$ ) additional parameters compared with SAN. For NSA, it does not require any parameters, and the computation overhead of the additional normalization process is almost ignorable. While GSA indeed requires some additional parameters, the amount is ignorable. GSA can be efficiently implemented by matrix multiplication and the einstein summation (einsum) operations provided by mainstream deep learning frameworks. + +# 6. Extension: Experiments on Other Tasks + +We further investigate the effectiveness and generality of our methods on Video Captioning (VC) [34], Machine Translation (MT) [5], and Visual Question Answer + +Table 7. Video captioning results on VATEX dataset. + +
ModelB@4MRC
VATEX [38]28.221.746.945.7
Transformer (Ours)30.622.348.453.4
+NSA31.022.749.057.1
+ +Table 8. Machine translation results on newstest2014 for WMT 2014 En-De dataset. + +
ModelBLEU
Transformer-Base [32]27.30
Transformer-Big [32]28.40
Transformer-Base (Ours)27.56
+NSA27.92
+ +ing (VQA) [3] tasks. Since VC and MT are both sequence-to-sequence problems, we directly use Transformer as the baseline models, and we replace the SA modules in their encoder with the proposed NSA module to construct our methods. As for VQA, we use MCAN [44] as the baseline model, which uses a SAN-based network to simultaneously encode image and question information. To build our method for VQA, we replace all the SA modules in MCAN with our GSA modules. + +# 6.1. Video Captioning + +We use a recently released large-scale video captioning dataset, VATEX [38]. It contains over 41,250 videos and 412,500 English captions. For a fair comparison with VATEX, we directly use the pre-extracted video features provided by the paper. Specifically, each video is sampled at 25fps and 1,000-dimensional features are extracted from these sampled frames using a pretrained I3D [6] model. Because the dataset is relatively small, we found using one layer in both the encoder and decoder is satisfactory. We use a training configuration the same as that of our image captioning model. + +In Table 7, we compare our method with the Transformer baseline and the VATEX model. We see that the performance of Transformer strongly exceeds that of VATEX, which adopts an LSTM-based architecture. Our Transformer+NSA method consistently improves over Transformer on all metrics. Particularly, our method improves the CIDEr score by 3.7 points when compared to Transformer, and significantly improves the CIDEr score by 11.4 points when compared to VATEX baseline. + +# 6.2. Machine Translation + +We also evaluate NSA on MT task, for which the Transformer was originally proposed. We trained on the widely-used WMT 2014 English to German (En-De) dataset, which consists of about 4.56 million sentence pairs. The models were validated on newstest-2013 and tested on newstest + +Table 9. Visual question answering accuracies on the VQA-v2 dataset to compare with the state-of-the-art single-model methods. + +
Modeltest-devtest-standard
MLIN [12]70.1870.28
DFAF [11]70.2270.34
MCAN [44]70.6370.90
MCAN (Ours)70.5470.83
+GSA70.7671.28
+ +2014 with BLEU. We use the well-known Transformer-Base [32] variant of Transformer as the baseline model, which has 6 layers in both the encoder and decoder. Specifically, we follow the implementation of the fairseq-py [25] toolkit. + +As shown in Table 8, Compared to Transformer-Base model, NSA increases the BLEU score by 0.36 points without adding any parameters. + +# 6.3. Visual Question Answering + +We conduct experiments on the most commonly used VQA benchmark, VQA-v2 [3]. It contains human-annotated question-answer pairs relating to the images from the MS-COCO dataset, with 3 questions per image and 10 answers per question. We strictly follow MCAN [44] to implement our models. Specifically, images are represented with region features extracted from Faster R-CNN object detector and the input questions are transformed with GloVe word embeddings and an LSTM network. + +Table 9 shows the overall accuracies of our methods and the current state-of-the-art models on the online test-dev and test-standard splits. GSA boosts the test-standard accuracy of MCAN from 70.83 to 71.28. + +# 7. Conclusion + +We proposed two improvements to the self-attention (SA) mechanism, i.e. a Normalized Self-Attention (NSA) to reduce the internal covariate shift problem inside SA, and a class of Geometry-aware Self-Attention (GSA) that explicitly and dynamically computes the geometric bias between objects to benefit image understanding. We have conducted extensive experiments on MS-COCO image captioning dataset to validate the effectiveness of NSA, GSA, and their combination. We further show the significance and generality of our methods on video captioning, machine translation, and visual question answering tasks. On all tasks, simply replacing the vanilla SA module with our proposed methods provides solid improvements over strong baselines. + +# Acknowledgments + +This work was supported by National Natural Science Foundation of China (No.61922086 and No.61872366) and Beijing Natural Science Foundation (No.4192059). + +# References + +[1] Peter Anderson, Basura Fernando, Mark Johnson, and Stephen Gould. Spice: Semantic propositional image caption evaluation. pages 382-398, 2016. 5 +[2] Peter Anderson, Xiaodong He, Chris Buehler, Damien Teney, Mark Johnson, Stephen Gould, and Lei Zhang. Bottom-up and top-down attention for image captioning and vqa. arXiv preprint arXiv:1707.07998, 2017. 2, 5, 7 +[3] Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. Vqa: Visual question answering. In Proceedings of the IEEE international conference on computer vision, pages 2425-2433, 2015. 8 +[4] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. 1, 2 +[5] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. 7 +[6] 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 +[7] Michael Denkowski and Alon Lavie. Meteor universal: Language specific translation evaluation for any target language. In The Workshop on Statistical Machine Translation, pages 376-380, 2014. 5 +[8] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018. 1 +[9] Jun Fu, Jing Liu, Yong Li, Yongjun Bao, Weipeng Yan, Zhiwei Fang, and Hanqing Lu. Contextual deconvolution network for semantic segmentation. Pattern Recognition, page 107152, 2020. 1 +[10] Jun Fu, Jing Liu, Haijie Tian, Yong Li, Yongjun Bao, Zhiwei Fang, and Hanqing Lu. Dual attention network for scene segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3146-3154, 2019. 1 +[11] Peng Gao, Zhengkai Jiang, Haoxuan You, Pan Lu, Steven C. H. Hoi, Xiaogang Wang, and Hongsheng Li. Dynamic fusion with intra- and inter-modality attention flow for visual question answering. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 8 +[12] Peng Gao, Haoxuan You, Zhanpeng Zhang, Xiaogang Wang, and Hongsheng Li. Multi-modality latent interaction network for visual question answering. In Proceedings of the IEEE International Conference on Computer Vision, pages 5825-5835, 2019. 8 +[13] Longteng Guo, Jing Liu, Shichen Lu, and Hanqing Lu. Show, tell and polish: Ruminant decoding for image captioning. IEEE Transactions on Multimedia, 2019. 2 +[14] Longteng Guo, Jing Liu, Jinhui Tang, Jiangwei Li, Wei Luo, and Lu Hanqing. Aligning linguistic words and visual semantic units for image captioning. In ACM MM, 2019. 7 + +[15] Simao Herdade, Armin Kappeler, Kofi Boakye, and Joao Soares. Image captioning: Transforming objects into words. arXiv preprint arXiv:1906.05963, 2019. 3, 7 +[16] Han Hu, Jiayuan Gu, Zheng Zhang, Jifeng Dai, and Yichen Wei. Relation networks for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3588-3597, 2018. 1, 3, 5, 7 +[17] Lun Huang, Wenmin Wang, Jie Chen, and Xiao-Yong Wei. Attention on attention for image captioning. In Proceedings of the IEEE International Conference on Computer Vision, pages 4634-4643, 2019. 7 +[18] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. Computer Science, 2015. 1, 2 +[19] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.5 +[20] Ryan Kiros, Ruslan Salakhutdinov, and Rich Zemel. Multimodal neural language models. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 595–603, 2014. 1 +[21] Chin-Yew Lin. Rouge: A package for automatic evaluation of summaries. Text Summarization Branches Out, 2004. 5 +[22] Tsungyi Lin, Michael Maire, Serge J Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. *european conference on computer vision*, pages 740-755, 2014. 5 +[23] Daqing Liu, Zheng-Jun Zha, Hanwang Zhang, Yongdong Zhang, and Feng Wu. Context-aware visual policy network for sequence-level image captioning. In 2018 ACM Multimedia Conference on Multimedia Conference, pages 1416-1424. ACM, 2018. 7 +[24] Ziwei Liu, Zhongqi Miao, Xiaohang Zhan, Jiayun Wang, Boqing Gong, and Stella X Yu. Large-scale long-tailed recognition in an open world. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2537-2546, 2019. 1 +[25] Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. fairseq: A fast, extensible toolkit for sequence modeling. In Proceedings of NAACL-HLT 2019: Demonstrations, 2019. 8 +[26] Kishore Papineni, Salim Roukos, Todd Ward, and Wei Jing Zhu. Bleu: a method for automatic evaluation of machine translation. Meeting on Association for Computational Linguistics, pages 311-318, 2002. 5 +[27] 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 +[28] Steven J Rennie, Etienne Marcheret, Youssef Mroueh, Jarret Ross, and Vaibhava Goel. Self-critical sequence training for image captioning. computer vision and pattern recognition, 2017. 2, 5 +[29] Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. Self-attention with relative position representations. arXiv preprint arXiv:1803.02155, 2018. 3 + +[30] Zhixing Tan, Mingxuan Wang, Jun Xie, Yidong Chen, and Xiaodong Shi. Deep semantic role labeling with self-attention. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. 1 +[31] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Instance normalization: The missing ingredient for fast stylization. arXiv preprint arXiv:1607.08022, 2016. 2 +[32] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, pages 6000-6010, 2017. 1, 5, 7, 8 +[33] Ramakrishna Vedantam, C. Lawrence Zitnick, and Devi Parikh. Cider: Consensus-based image description evaluation. Computer Science, pages 4566-4575, 2015. 5 +[34] Subhashini Venugopalan, Marcus Rohrbach, Jeffrey Donahue, Raymond Mooney, Trevor Darrell, and Kate Saenko. Sequence to sequence-video to text. In Proceedings of the IEEE international conference on computer vision, pages 4534-4542, 2015. 7 +[35] Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and tell: A neural image caption generator. In Computer Vision and Pattern Recognition (CVPR), 2015 IEEE Conference on, pages 3156-3164. IEEE, 2015. 5 +[36] Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and tell: Lessons learned from the 2015 mscoco image captioning challenge. IEEE transactions on pattern analysis and machine intelligence, 39(4):652-663, 2017. 2 +[37] 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 +[38] Xin Wang, Jiawei Wu, Junkun Chen, Lei Li, Yuan-Fang Wang, and William Yang Wang. Vatex: A large-scale, high-quality multilingual dataset for video-and-language research. arXiv preprint arXiv:1904.03493, 2019. 8 +[39] Yuxin Wu and Kaiming He. Group normalization. In Proceedings of the European Conference on Computer Vision (ECCV), pages 3-19, 2018. 2 +[40] Kelvin Xu, Jimmy Lei Ba, Ryan Kiros, Kyunghyun Cho, Aaron C Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. international conference on machine learning, pages 2048-2057, 2015. 1, 2 +[41] Baosong Yang, Jian Li, Derek F Wong, Lidia S Chao, Xing Wang, and Zhaopeng Tu. Context-aware self-attention networks. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 387–394, 2019. 1 +[42] Xu Yang, Kaihua Tang, Hanwang Zhang, and Jianfei Cai. Auto-encoding scene graphs for image captioning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 10685–10694, 2019. 7 +[43] Jun Yu, Jing Li, Zhou Yu, and Qingming Huang. Multimodal transformer with multi-view visual representation for image captioning. arXiv preprint arXiv:1905.07841, 2019. 1, 2, 5, 7 + +[44] Zhou Yu, Jun Yu, Yuhao Cui, Dacheng Tao, and Qi Tian. Deep modular co-attention networks for visual question answering. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 8 +[45] Han Zhang, Ian Goodfellow, Dimitris Metaxas, and Augustus Odena. Self-attention generative adversarial networks. arXiv preprint arXiv:1805.08318, 2018. 1 +[46] Xinxin Zhu, Lixiang Li, Jing Liu, Haipeng Peng, and Xinxin Niu. Captioning transformer with stacked attention modules. Applied Sciences, 8(5):739, 2018. 1, 2 \ No newline at end of file diff --git a/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/images.zip b/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..c02219e9a0e228c00f6ef08cde8ecda2652a9467 --- /dev/null +++ b/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91ae612a229e8436aa8c3f97ab27f1201e50d4ef4afda04f5909c87d256f2ccf +size 367393 diff --git a/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/layout.json b/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..31b530aecbf19e937fd7159d3da82a17bbdfb2a4 --- /dev/null +++ b/normalizedandgeometryawareselfattentionnetworkforimagecaptioning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:068e58ffd8c4595a6ce4bcf6affa977455c8430e67fed07359578cc5c3cea67b +size 420306 diff --git a/normalizingflowswithmultiscaleautoregressivepriors/118b64ad-e76a-419a-b9e2-e488eb50930b_content_list.json b/normalizingflowswithmultiscaleautoregressivepriors/118b64ad-e76a-419a-b9e2-e488eb50930b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..fd725f2105bb4d739737e06017dbeec185c81b19 --- /dev/null +++ b/normalizingflowswithmultiscaleautoregressivepriors/118b64ad-e76a-419a-b9e2-e488eb50930b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c496c769fa36b69e8d8e96a17463484133f811177593622f95f92631b4b638d5 +size 75548 diff --git a/normalizingflowswithmultiscaleautoregressivepriors/118b64ad-e76a-419a-b9e2-e488eb50930b_model.json b/normalizingflowswithmultiscaleautoregressivepriors/118b64ad-e76a-419a-b9e2-e488eb50930b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..3ebf143e40bfd0123071d9461b3eafc32a9c5023 --- /dev/null +++ b/normalizingflowswithmultiscaleautoregressivepriors/118b64ad-e76a-419a-b9e2-e488eb50930b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec62afe0feda298429c9e17ff46c8a977907ed908d9b787054a6bd8e10418ebb +size 92120 diff --git a/normalizingflowswithmultiscaleautoregressivepriors/118b64ad-e76a-419a-b9e2-e488eb50930b_origin.pdf b/normalizingflowswithmultiscaleautoregressivepriors/118b64ad-e76a-419a-b9e2-e488eb50930b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a7a6a60b9901101e434f0f6d149ae32636d72c94 --- /dev/null +++ b/normalizingflowswithmultiscaleautoregressivepriors/118b64ad-e76a-419a-b9e2-e488eb50930b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ecbf48d0423a5c30710e7d9a942226af914e0be7052b47d11919ffedcd565366 +size 1146878 diff --git a/normalizingflowswithmultiscaleautoregressivepriors/full.md b/normalizingflowswithmultiscaleautoregressivepriors/full.md new file mode 100644 index 0000000000000000000000000000000000000000..d55e109332793732a32262c7e92218ad92769a55 --- /dev/null +++ b/normalizingflowswithmultiscaleautoregressivepriors/full.md @@ -0,0 +1,307 @@ +# Normalizing Flows with Multi-Scale Autoregressive Priors + +Apratim Bhattacharyya\*1 Shweta Mahajan\*2 Mario Fritz3 Bernt Schiele1 Stefan Roth2 + +1Max Planck Institute for Informatics, Saarland Informatics Campus + +$^{2}$ Department of Computer Science, TU Darmstadt + +$^{3}$ CISPA Helmholtz Center for Information Security, Saarland Informatics Campus + +# Abstract + +Flow-based generative models are an important class of exact inference models that admit efficient inference and sampling for image synthesis. Owing to the efficiency constraints on the design of the flow layers, e.g. split coupling flow layers in which approximately half the pixels do not undergo further transformations, they have limited expressiveness for modeling long-range data dependencies compared to autoregressive models that rely on conditional pixel-wise generation. In this work, we improve the representational power of flow-based models by introducing channel-wise dependencies in their latent space through multi-scale autoregressive priors (mAR). Our mAR prior for models with split coupling flow layers (mAR-SCF) can better capture dependencies in complex multimodal data. The resulting model achieves state-of-the-art density estimation results on MNIST, CIFAR-10, and ImageNet. Furthermore, we show that mAR-SCF allows for improved image generation quality, with gains in FID and Inception scores compared to state-of-the-art flow-based models. + +# 1. Introduction + +Deep generative models aim to learn complex dependencies within very high-dimensional input data, e.g. natural images [3, 28] or audio data [7], and enable generating new samples that are representative of the true data distribution. These generative models find application in various downstream tasks like image synthesis [11, 20, 38] or speech synthesis [7, 39]. Since it is not feasible to learn the exact distribution, generative models generally approximate the underlying true distribution. Popular generative models for capturing complex data distributions are Generative Adversarial Networks (GANs) [11], which model the distribution implicitly and generate (high-dimensional) samples by transforming a noise distribution into the desired space with complex dependencies; however, they may not cover + +![](images/3cc9965d15342e62ccc7c0a619f97f7b0a7902198a51691bf19afd95b00f78c9.jpg) +Figure 1. Our $mAR-SCF$ model combines normalizing flows with autoregressive $(\mathrm{AR})_2$ priors to improve modeling power while ensuring that the computational cost grows linearly with the spatial image resolution $N \times \bar{N}$ . + +all modes of the underlying data distribution. Variational Autoencoders (VAEs) [20] optimize a lower bound on the log-likelihood of the data. This implies that VAEs can only approximately optimize the log-likelihood [30]. + +Autoregressive models [10, 37, 38] and normalizing flow-based generative models [8, 9, 18] are exact inference models that optimize the exact log-likelihood of the data. Autoregressive models can capture complex and long-range dependencies between the dimensions of a distribution, e.g. in case of images, as the value of a pixel is conditioned on a large context of neighboring pixels. The main limitation of this approach is that image synthesis is sequential and thus difficult to parallelize. Recently proposed normalizing flow-based models, such as NICE [8], RealNVP [9], and Glow [18], allow exact inference by mapping the input data to a known base distribution, e.g. a Gaussian, through a series of invertible transformations. These models leverage invertible split coupling flow (SCF) layers in which certain dimensions are left unchanged by the invertible transformation as well as SPLIT operations following which certain dimensions do not undergo subsequent transformations. This allows for considerably easier parallelization of both inference and generation processes. However, these models lag behind autoregressive models for density estimation. + +In this work, we (i) propose multi-scale autoregressive priors for invertible flow models with split coupling flow layers, termed $mAR-SCF$ , to address the limited modeling power of non-autoregressive invertible flow models [9, 14, 18, 28] (Fig. 1); (ii) we apply our multi-scale autoregressive prior after every SPLIT operation such that the computational cost of sampling grows linearly in the spatial dimensions of the image compared to the quadratic cost of traditional autoregressive models (given sufficient parallel resources); (iii) our experiments show that we achieve state-of-the-art density estimation results on MNIST [22], CIFAR10 [21], and ImageNet [31] compared to prior invertible flow-based approaches; and finally (iv) we show that our multi-scale autoregressive prior leads to better sample quality as measured by the FID metric [13] and the Inception score [32], significantly lowering the gap to GAN approaches [27, 40]. + +# 2. Related Work + +In this work, we combine the expressiveness of autoregressive models with the efficiency of non-autoregressive flow-based models for exact inference. + +Autoregressive models [6, 10, 12, 15, 26, 37, 38] are a class of exact inference models that factorize the joint probability distribution over the input space as a product of conditional distributions, where each dimension is conditioned on the previous ones in a pre-defined order. Recent autoregressive models, such as PixelCNN and PixelRNN [37, 38], can generate high-quality images but are difficult to parallelize since synthesis is sequential. It is worth noting that autoregressive image models, such as that of Domke et al. [10], significantly pre-date their recent popularity. Various extensions have been proposed to improve the performance of the PixelCNN model. For example, Multiscale-PixelCNN [29] extends PixelCNN to improve the sampling runtime from linear to logarithmic in the number of pixels, exploiting conditional independence between the pixels. Chen et al. [6] introduce self-attention in PixelCNN models to improve the modeling power. Salimans et al. [33] introduce skip connections and a discrete logistic likelihood model. WaveRNN [17] leverages customized GPU kernels to improve the sampling speed for audio synthesis. Menick et al. [23] synthesize images by sequential conditioning on sub-images within an image. These methods, however, still suffer from slow sampling speed and are difficult to parallelize. + +Flow-based generative models, first introduced in [8], also allow for exact inference. These models are composed of a series of invertible transformations, each with a tractable Jacobian and inverse, which maps the input distribution to a known base density, e.g. a Gaussian. Papamakarios et al. [25] proposed autoregressive invertible transformations using masked decoders. However, these are difficult to parallelize just like PixelCNN-based approaches. Kingma et + +al. [19] propose inverse autoregressive flow (IAF), where the means and variances of pixels depend on random variables and not on previous pixels, making it easier to parallelize. However, the approach offers limited generalization [39]. + +Recent extensions. Recent work [1, 9, 18] extends normalizing flows [8] to multi-scale architectures with split couplings, which allow for efficient inference and sampling. For example, Kingma et al. [18] introduce additional invertible $1 \times 1$ convolutions to capture non-linearities in the data distribution. Hoogeboom et al. [16] extend this to $d \times d$ convolutions, increasing the receptive field. [4] improve the residual blocks of flow layers with memory efficient gradients based on the choice of activation functions. A key advantage of flow-based generative models is that they can be parallelized for inference and synthesis. Ho et al. [14] propose Flow++ with various modifications in the architecture of the flows in [9], including attention and a variational quantization method to improve the data likelihood. The resulting model is computationally expensive as non-linearities are applied along all the dimensions of the data at every step of the flow, i.e., all the dimensions are instantiated with the prior distribution at the last layer of the flow. While comparatively efficient, such flow-based models have limited expressiveness compared to autoregressive models, which is reflected in their lower data log-likelihood. It is thus desirable to develop models that have the expressiveness of autoregressive models and the efficiency of flow-based models. This is our goal here. + +Methods with complex priors. Recent work [5] develops complex priors to improve the data likelihoods. VQ-VAE2 integrates autoregressive models as priors [28] with discrete latent variables [5] for high-quality image synthesis and proposes latent graph-based models in a VAE framework. Tomczak et al. [36] propose mixtures of Gaussians with predefined clusters, and [5] use neural autoregressive model priors in the latent space, which improves results for image synthesis. Ziegler et al. [41] learn a prior based on normalizing flows to capture multimodal discrete distributions of character-level texts in the latent spaces with nonlinear flow layers. However, this invertible layer is difficult to be optimized in both directions. Moreover, these models do not allow for exact inference. In this work, we propose complex autoregressive priors to improve the power of invertible split coupling-based normalizing flows [9, 14, 18]. + +# 3. Overview and Background + +In this work, we propose multi-scale autoregressive priors for split coupling-based flow models, termed mAR-SCF, where we leverage autoregressive models to improve the modeling flexibility of invertible normalizing flow models without sacrificing sampling efficiency. As we build upon normalizing flows and autoregressive models, we first provide an overview of both. + +![](images/13e330c946307bd67e042be92a5eeba572f6278f265be81e868f48f95e3845af.jpg) +(a) Generative model for mAR-SCF. + +![](images/631a24576565f505042723cb3d110001d8a9f1a1769f76515cd176d22fac2016.jpg) +(b) SCF flow with mAR prior. +Figure 2. Flow-based generative models with multi-scale autoregressive priors (mAR-SCF). The generative model (left) shows the multi-scale autoregressive sampling of the channel dimensions of $\mathbf{l}_i$ at each level. The spatial dimensions of each channel are sampled in parallel. $\mathbf{r}_i$ are computed with invertable transformations. The mAR-SCF model (right) shows the complete multi-scale architecture with the mAR prior applied along the channels of $\mathbf{l}_i$ , i.e. at each level $i$ after the SPLIT operation. + +Normalizing flows. Normalizing flows [8] are a class of exact inference generative models. Here, we consider invertible flows, which allow for both efficient exact inference and sampling. Specifically, invertible flows consist of a sequence of $n$ invertible functions $f_{\theta_i}$ , which transform a density on the data $\mathbf{x}$ to a density on latent variables $\mathbf{z}$ , + +$$ +\mathbf {x} \stackrel {f _ {\theta_ {1}}} {\longleftrightarrow} \mathbf {h} _ {1} \stackrel {f _ {\theta_ {2}}} {\longleftrightarrow} \mathbf {h} _ {2} \dots \stackrel {f _ {\theta_ {n}}} {\longleftrightarrow} \mathbf {z}. \tag {1} +$$ + +Given that we can compute the likelihood of $p(\mathbf{z})$ , the likelihood of the data $\mathbf{x}$ under the transformation $f$ can be computed using the change of variables formula, + +$$ +\log p _ {\theta} (\mathbf {x}) = \log p (\mathbf {z}) + \sum_ {i = 1} ^ {n} \log | \det J _ {\theta_ {i}} |, \tag {2} +$$ + +where $J_{\theta_i} = \partial \mathbf{h}_i / \partial \mathbf{h}_{i - 1}$ is the Jacobian of the invertible transformation $f_{\theta_i}$ going from $\mathbf{h}_{i - 1}$ to $\mathbf{h}_i$ with $\mathbf{h}_0\equiv \mathbf{x}$ . Note that most prior work [4, 8, 9, 14, 18] considers i.i.d. Gaussian likelihood models of $\mathbf{z}$ , e.g. $p(\mathbf{z}) = \mathcal{N}(\mathbf{z}|\mu ,\sigma)$ . + +These models, however, have limitations. First, the requirement of invertibility constrains the class of functions $f_{\theta_i}$ to be monotonically increasing (or decreasing), thus limiting expressiveness. Second, of the three possible variants of $f_{\theta_i}$ to date [41], MAF (masked autoregressive flows), IAF (inverse autoregressive flows), and SCF (split coupling flows), MAFs are difficult to parallelize due to sequential dependencies between dimensions and IAFs do not perform well in practice. SCFs strike the right balance with respect to parallelization and modeling power. In detail, SCFs partition the dimensions into two equal halves and transform one of + +the halves $\mathbf{r}_i$ conditioned on $\mathbf{l}_i$ , leaving $\mathbf{l}_i$ unchanged and thus not introducing any sequential dependencies (making parallelization easier). Examples of SCFs include the affine couplings of RealNVP [9] and MixLogCDF couplings of Flow++ [14]. + +In practice, SCFs are organized into blocks [8, 9, 18] to maximize efficiency such that each $f_{\theta_i}$ typically consists of SQUEEZE, STEPOFFLOW, and SPLIT operations. SQUEEZE trades off spatial resolution for channel depth. Suppose an intermediate layer $\mathbf{h}_i$ is of size $[\mathrm{C}_i, \mathrm{N}_i, \mathrm{N}_i]$ , then the SQUEEZE operation transforms it into size $[4\mathrm{C}_i, \mathrm{N}_i / 2, \mathrm{N}_i / 2]$ by reshaping $2 \times 2$ neighborhoods into 4 channels. STEPOFFLOW is a series of SCF (possibly several) coupling layers and invertible $1 \times 1$ convolutions [8, 9, 18]. + +The SPLIT operation (distinct from the split couplings) splits an intermediate layer $\mathbf{h}_i$ into two halves $\{\mathbf{l}_i, \mathbf{r}_i\}$ of size $[2C_i, N_i / 2, N_i / 2]$ each. Subsequent invertible layers $f_{\theta j > i}$ operate only on $\mathbf{r}_i$ , leaving $\mathbf{l}_i$ unchanged. In other words, the SPLIT operation fixes some dimensions of the latent representation $\mathbf{z}$ to $\mathbf{l}_i$ as they are not transformed any further. This leads to a significant reduction in the amount of computation and memory needed. In the following, we denote the spatial resolutions at the $n$ different levels as $\mathrm{N} = \{\mathrm{N}_0, \dots, \mathrm{N}_n\}$ , with $N = \mathrm{N}_0$ being the input resolution. Similarly, $\mathrm{C} = \{\mathrm{C}_0, \dots, \mathrm{C}_n\}$ denotes the number of feature channels, with $C = \mathrm{C}_0$ being the number of input channels. + +In practice, due to limited modeling flexibility, prior SCF-based models [9, 14, 18] require many SCF coupling layers in $f_{\theta_i}$ to model complex distributions, e.g. images. This in turn leads to high memory requirements and also leads to less efficient sampling procedures. + +Autoregressive models. Autoregressive generative models are another class of powerful and highly flexible exact inference models. They factorize complex target distributions by decomposing them into a product of conditional distributions, e.g. images with $N \times N$ spatial resolution as $p(\mathbf{x}) = \prod_{i=1}^{N} \prod_{j=1}^{N} p(\mathbf{x}_{i,j} | \mathbf{x}_{\mathrm{pred}(i,j)})$ [10, 12, 25, 37, 38]. Here, $\mathrm{pred}(i,j)$ denotes the set of predecessors of pixel $(i,j)$ . The functional form of these conditionals can be highly flexible, and allows such models to capture complex multimodal distributions. However, such a dependency structure only allows for image synthesis via ancestral sampling by generating each pixel sequentially, conditioned on the previous pixels [37, 38], making parallelization difficult. This is also inefficient since autoregressive models, including PixelCNN and PixelRNN, require $\mathcal{O}(N^2)$ time steps for sampling. + +# 4. Multi-scale Autoregressive Flow Priors + +We propose to leverage the strengths of autoregressive models to improve invertible normalizing flow models such as [9, 18]. Specifically, we propose novel multi-scale autoregressive priors for split coupling flows (mAR-SCF). Using them allows us to learn complex multimodal latent priors $p(\mathbf{z})$ in multi-scale SCF models, cf. Eq. (2). This is unlike [9, 14, 18, 28], which rely on Gaussian priors in the latent space. Additionally, we also propose a scheme for interpolation in the latent space of our mAR-SCF models. + +The use of our novel autoregressive $mAR$ priors for invertible flow models has two distinct advantages over both vanilla SCF and autoregressive models. First, the powerful autoregressive prior helps mitigate the limited modeling capacity of the vanilla SCF flow models. Second, as only the prior is autoregressive, this makes flow models with our $mAR$ prior an order of magnitude faster with respect to sampling time than fully autoregressive models. Next, we describe our multi-scale autoregressive prior in detail. + +Our $mAR-SCF$ model uses an efficient invertible split coupling flow $f_{\theta_i}(\mathbf{x})$ to map the distribution over the data $\mathbf{x}$ to a latent variable $\mathbf{z}$ and then models an autoregressive $mAR$ prior over $\mathbf{z}$ , parameterized by $\phi$ . The likelihood of a data point $\mathbf{x}$ of dimensionality $[C, N, N]$ can be expressed as + +$$ +\log p _ {\theta , \phi} (\mathbf {x}) = \log p _ {\phi} (\mathbf {z}) + \sum_ {i = 1} ^ {n} \log | \det J _ {\theta_ {i}} |. \tag {3} +$$ + +Here, $J_{\theta_i}$ is the Jacobian of the invertible transformations $f_{\theta_i}$ . Note that, as $f_{\theta_i}(\mathbf{x})$ is an invertible function, $\mathbf{z}$ has the same total dimensionality as the input data point $\mathbf{x}$ . + +Formulation of the $mAR$ prior. We now introduce our $mAR$ prior $p_{\phi}(\mathbf{z})$ along with our $mAR-SCF$ model, which combines the split coupling flows $f_{\theta_i}$ with an $mAR$ prior. As shown in Fig. 2, our $mAR$ prior is applied after every SPLIT operation of the invertible flow layers as well as at the smallest spatial resolution. Let $\mathbf{l}_i = \{\mathbf{l}_i^1, \dots, \mathbf{l}_i^{\mathrm{C}_i}\}$ be the $\mathbf{C}_i$ + +channels of size $\left[\mathbf{C}_i,\mathbf{N}_i,\mathbf{N}_i\right]$ , which do not undergo further transformation $f_{\theta_i}$ after the SPLIT at level $i$ . Following the SPLIT at level $i$ , our $mAR$ prior is modeled as a conditional distribution, $p_{\phi}(\mathbf{l}_i|\mathbf{r}_i)$ ; at the coarsest spatial resolution it is an unconditional distribution, $p_{\phi}(\mathbf{h}_n)$ . Thereby, we assume that our $mAR$ prior at each level $i$ autoregressively factorizes along the channel dimension as + +$$ +p _ {\phi} \left(\mathbf {l} _ {i} \mid \mathbf {r} _ {i}\right) = \prod_ {j = 1} ^ {\mathrm {C} _ {i}} p _ {\phi} \left(\mathbf {l} _ {i} ^ {j} \mid \mathbf {l} _ {i} ^ {1}, \dots , \mathbf {l} _ {i} ^ {j - 1}, \mathbf {r} _ {i}\right). \tag {4} +$$ + +Furthermore, the distribution at each spatial location $(m,n)$ within a channel $\mathbf{l}_i^j$ is modeled as a conditional Gaussian, + +$$ +p _ {\phi} \left(l _ {i (m, n)} ^ {j} \mid \mathbf {l} _ {i} ^ {1}, \dots , \mathbf {l} _ {i} ^ {j - 1}, \mathbf {r} _ {i}\right) = \mathcal {N} \left(\mu_ {i (m, n)} ^ {j}, \sigma_ {i (m, n)} ^ {j}\right). \tag {5} +$$ + +Thus, the mean, $\mu_{i(m,n)}^j$ and variance, $\sigma_{i(m,n)}^j$ at each spatial location are autoregressively modeled along the channels. This allows the distribution at each spatial location to be highly flexible and capture multimodality in the latent space. Moreover from Eq. (4), our $mAR$ prior can model long-range correlations in the latent space as the distribution of each channel is dependent on all previous channels. + +This autoregressive factorization allows us to employ Conv-LSTMs [34] to model the distributions $p_{\phi}(\mathbf{l}_i^j | \mathbf{l}_i^1, \dots, \mathbf{l}_i^{j-1}, \mathbf{r}_i)$ and $p_{\phi}(\mathbf{h}_n)$ . Conv-LSTMs can model long-range dependencies across channels in their internal state. Additionally, long-range spatial dependencies within channels can be modeled by stacking multiple ConvLSTM layers with a wide receptive field. This formulation allows all pixels within a channel to be sampled in parallel, while the channels are sampled in a sequential manner, + +$$ +\hat {\mathbf {l}} _ {i} ^ {j} \sim p _ {\phi} \left(\mathbf {l} _ {i} ^ {j} \mid \mathbf {l} _ {i} ^ {1}, \dots , \mathbf {l} _ {i} ^ {j - 1}, \mathbf {r} _ {i}\right). \tag {6} +$$ + +This is in contrast to PixelCNN/RNN-based models, which sample one pixel at a time. + +The mAR-SCF model. We illustrate our mAR-SCF model architecture in Fig. 2b. Our mAR-SCF model leverages the SQUEEZE and SPLIT operations for invertible flows introduced in [8, 9] for efficient parallelization. Following [8, 9, 18], we use several SQUEEZE and SPLIT operations in a multi-scale setup at $n$ scales (Fig. 2b) until the spatial resolution at $\mathbf{h}_n$ is reasonably small, typically $4 \times 4$ . Note that there is no SPLIT operation at the smallest spatial resolution. Therefore, the latent space is the concatenation of $\mathbf{z} = \{\mathbf{l}_1, \dots, \mathbf{l}_{n-1}, \mathbf{h}_n\}$ . The split coupling flows (SCF) $f_{\theta_i}$ in the mAR-SCF model remain invertible by construction. We consider different SCF couplings for $f_{\theta_i}$ , including the affine couplings of [9, 18] and MixLogCDF couplings [14]. + +Given the parameters $\phi$ of our multimodal $mAR$ prior modeled by the Conv-LSTMs, we can compute $p_{\phi}(\mathbf{z})$ using the formulation in Eqs. (4) and (5). We can thus express + +Algorithm 1: MARPS: Multi-scale Autoregressive Prior Sampling for our mAR-SCF models +1 Sample $\hat{\mathbf{h}}_n\sim p_\phi (\mathbf{h}_n)$ . +2 for $i\gets n - 1$ to 1 do /\*SPLITINVERSE \*/ +3 $\hat{\mathbf{r}}_i\gets \hat{\mathbf{h}}_{i + 1}$ // Assign previous +4 $\hat{\mathbf{l}}_i\sim p_\phi (\mathbf{l}_i|\mathbf{r}_i)$ //Sample mAR prior +5 $\hat{\mathbf{h}}_i\gets \left\{\hat{\mathbf{l}}_i,\hat{\mathbf{r}}_i\right\} ;$ // Concatenate /\*STEPOFFLOWINVERSE \*/ +6 Apply $f_{i}^{-1}(\hat{h}_{i})$ //SCF coupling /\* SQUEEZEINVERSE \*/ +7 Reshape $\hat{\mathbf{h}}_i$ //Depth to Space +8 end +9 x- $\hat{\mathbf{h}}_1$ + +Eq. (3) in closed form and directly maximize the likelihood of the data under the multimodal $mAR$ prior distribution learned by the Conv-LSTMs. + +Next, we show that the computational cost of our mAR-SCF model is $\mathcal{O}(N)$ for sampling an image of size $[C,N,N]$ ; this is in contrast to the standard $\mathcal{O}(N^2)$ computational cost required by purely autoregressive models. + +Analysis of sampling time. We now formally analyze the computational cost in the number of steps $T$ required for sampling with our mAR-SCF model. First, we describe the sampling process in detail in Algorithm 1 (the forward training process follows the sampling process in reverse order). Next, we derive the worst-case number of steps $T$ required by MARPS, given sufficient parallel resources to sample a channel in parallel. Here, the number of steps $T$ can be seen as the length of the critical path while sampling. + +Lemma 4.1. Let the sampled image $\mathbf{x}$ be of resolution $[C, N, N]$ , then the worst-case number of steps $T$ (length of the critical path) required by MARPS is $\mathcal{O}(N)$ . + +Proof. At the first sampling step (Fig. 2a) at layer $f_{\theta_n}$ , our $mAR$ prior is applied to generate $\mathbf{h}_n$ , which is of shape $[2^{n + 1}C,N / 2^n,N / 2^n]$ . Therefore, the number of sequential steps required at the last flow layer $\mathbf{h}_n$ is + +$$ +T _ {n} = C \cdot 2 ^ {n + 1}. \tag {7} +$$ + +Here, we are assuming that each channel can be sampled in parallel in one time-step. + +From $f_{\theta_{n-1}}$ to $f_{\theta_1}$ , $f_{\theta_i}$ always contains a SPLIT operation. Therefore, at each $f_{\theta_i}$ we use our mAR prior to sample $\mathbf{l}_i$ which has shape $[2^i C, N/2^i, N/2^i]$ . Therefore, the number of sequential steps required for sampling at layers $\mathbf{h}_i$ , $1 \leq i < n$ of our mAR-SCF model is + +$$ +T _ {i} = C \cdot 2 ^ {i}. \tag {8} +$$ + +Therefore, the total number of sequential steps (length of the critical path) required for sampling is + +$$ +\begin{array}{l} T = T _ {n} + T _ {n - 1} + \dots + T _ {i} + \dots + T _ {1} \\ = C \cdot \left(2 ^ {n + 1} + 2 ^ {n - 1} + \dots + 2 ^ {i} + \dots + 2 ^ {1}\right) \tag {9} \\ = C \cdot \left(3 \cdot 2 ^ {n} - 2\right). \\ \end{array} +$$ + +Now, the total number of layers in our $mAR-SCF$ model is $n \leq \log(N)$ . This is because each layer reduces the spatial resolution by a factor of two. Therefore, the total number of time-steps required is + +$$ +T \leq 3 \cdot C \cdot N. \tag {10} +$$ + +In practice, $C \ll N$ , with $C = \mathrm{C}_0 = 3$ for RGB images. Therefore, the total number of sequential steps required for sampling in our mAR-SCF model is $T = \mathcal{O}(N)$ . + +It follows that with our multi-scale autoregressive $mAR$ priors in our $mAR-SCF$ model, sampling can be performed in a linear number of time-steps in contrast to fully autoregressive models like PixelCNN, which require a quadratic number of time-steps [38]. + +Interpolation. A major advantage of invertible flow-based models is that they allow for latent spaces, which are useful for downstream tasks like interpolation – smoothly transforming one data point into another. Interpolation is simple in case of typical invertible flow-based models, because the latent space is modeled as a unimodal i.i.d. Gaussian. To allow interpolation in the space of our multimodal $mAR$ priors, we develop a simple method based on [2]. + +Let $\mathbf{x}_{\mathrm{A}}$ and $\mathbf{x}_{\mathrm{B}}$ be the two images (points) to be interpolated and $\mathbf{z}_{\mathrm{A}}$ and $\mathbf{z}_{\mathrm{B}}$ be the corresponding points in the latent space. We begin with an initial linear interpolation between the two latent points, $\{\mathbf{z}_{\mathrm{A}},\mathbf{z}_{\mathrm{A,B}}^{1},\dots ,\mathbf{z}_{\mathrm{A,B}}^{k},\mathbf{z}_{\mathrm{B}}\}$ , such that, $\mathbf{z}_{\mathrm{A,B}}^i = (1 - \alpha^i)\mathbf{z}_{\mathrm{A}} + \alpha^i\mathbf{z}_{\mathrm{B}}$ . The initial linearly interpolated points $\mathbf{z}_{\mathrm{A,B}}^i$ may not lie in a high-density region under our multimodal prior, leading to non-smooth transformations. Therefore, we next project the interpolated points $\mathbf{z}_{\mathrm{A,B}}^i$ to a high-density region, without deviating too much from their initial position. This is possible because our $mAR$ prior allows for exact inference. However, the image corresponding to the projected $\bar{\mathbf{z}}_{\mathrm{A,B}}^i$ must also not deviate too far from either $\mathbf{x}_{\mathrm{A}}$ and $\mathbf{x}_{\mathrm{B}}$ either to allow for smooth transitions. To that end, we define the projection operation as + +$$ +\begin{array}{l} \bar {\mathbf {z}} _ {\mathrm {A}, \mathrm {B}} ^ {i} = \arg \min \left(\left\| \bar {\mathbf {z}} _ {\mathrm {A}, \mathrm {B}} ^ {i} - \mathbf {z} _ {\mathrm {A}, \mathrm {B}} ^ {i} \right\| - \lambda_ {1} \log p _ {\phi} \left(\bar {\mathbf {z}} _ {\mathrm {A}, \mathrm {B}} ^ {i}\right) \right. \tag {11} \\ \left. + \lambda_ {2} \min \left(\left\| f ^ {- 1} \left(\bar {\mathbf {z}} _ {\mathrm {A}, \mathrm {B}} ^ {i}\right) - \mathbf {x} _ {\mathrm {A}} \right\|, \left\| f ^ {- 1} \left(\bar {\mathbf {z}} _ {\mathrm {A}, \mathrm {B}} ^ {i}\right) - \mathbf {x} _ {\mathrm {B}} \right\|\right)\right), \\ \end{array} +$$ + +where $\lambda_1, \lambda_2$ are the regularization parameters. The term controlled by $\lambda_1$ pulls the interpolated $\mathbf{z}_{\mathrm{A,B}}^i$ back to high-density regions, while the term controlled by $\lambda_2$ keeps the result close to the two images $\mathbf{x}_{\mathrm{A}}$ and $\mathbf{x}_{\mathrm{B}}$ . Note that this reduces to linear interpolation when $\lambda_1 = \lambda_2 = 0$ . + +
MethodCouplingMNISTCIFAR10
Levels|SCF|Channelsbits/dim (↓)Levels|SCF|Channelsbits/dim (↓)
PixelCNN [38]Autoregressive-------3.00
PixelCNN++ [37]Autoregressive-------2.92
Glow [18]Affine3325121.053325123.35
Flow++ [14]MixLogCDF----3-963.29
Residual Flow [4]Residual316-0.97316-3.28
mAR-SCF (Ours)Affine3322561.043322563.33
mAR-SCF (Ours)Affine3325121.033325123.31
mAR-SCF (Ours)MixLogCDF34960.8834963.27
mAR-SCF (Ours)MixLogCDF----342563.24
+ +Table 1. Evaluation of our mAR-SCF model on MNIST and CIFAR10 (using uniform dequantization for fair comparison with [4, 18]). + +# 5. Experiments + +We evaluate our approach on the MNIST [22], CIFAR10 [21], and ImageNet [38] datasets. In comparison to datasets like CelebA, CIFAR10 and ImageNet are highly multimodal and the performance of invertible SCF models has lagged behind autoregressive models in density estimation and behind GAN-based generative models regarding image quality. + +# 5.1. MNIST and CIFAR10 + +Architecture details. Our $mAR$ prior at each level $f_{\theta_i}$ consists of three convolutional LSTM layers, each of which uses 32 convolutional filters to compute the input-to-state and state-to-state components. Keeping the $mAR$ prior architecture constant, we experiment with different SCF couplings in $f_{\theta_i}$ to highlight the effectiveness of our $mAR$ prior. We experiment with affine couplings of [9, 18] and MixLogCDF couplings [14]. Affine couplings have limited modeling flexibility. The more expressive MixLogCDF applies the cumulative distribution function of a mixture of logistics. In the following, we include experiments varying the number of channels in the convolutional blocks of the neural networks used to predict the affine/MixLogCDF transformation parameters. + +Hyperparameters. We use Adamax (as in [18]) with a learning rate of $8 \times 10^{-4}$ . We use a batch size of 128 with affine and 64 with MixLogCDF couplings (following [14]). + +Density estimation. We report density estimation results on MNIST and CIFAR10 in Table 1 using the per-pixel log-likelihood metric in bits/dim. We also include the architecture details (# of levels, coupling type, # of channels). We compare to the state-of-the-art Flow++ [14] method with SCF couplings and Residual Flows [4]. Note that in terms of architecture, our mAR-SCF model with affine couplings is closest to that of Glow [18]. Therefore, the comparison with Glow serves as an ideal ablation to assess the effectiveness of our mAR prior. Flow++ [14], on the other hand, uses the more powerful MixLogCDF transformations and their model architecture does not include SPLIT operations. Be + +cause of this, Flow++ has higher computational and memory requirements for a given batch size compared to Glow. Furthermore, for fair comparison with Glow [18] and Residual flows [4], we use uniform dequantization unlike Flow++, which proposes to use variational dequantization. + +In comparison to Glow, we achieve improved density estimation results on both MNIST and CIFAR10. In detail, we outperform Glow (e.g. 1.05 vs. 1.04 bits/dim on MNIST and 3.35 vs. 3.33 bits/dim on CIFAR10) with $|\mathrm{SCF}| = 32$ affine couplings and 3 levels, while using parameter prediction networks with only half (256 vs. 512) the number of channels. We observe that increasing the capacity of our parameter prediction networks to 512 channels boosts the log-likelihood further to 1.03 bits/dim on MNIST and 3.31 bits/dim on CIFAR10. As this setting with 512 channels is identical to setting reported in [18], this shows that our mAR prior boosts the accuracy by $\sim 0.04$ bits/dim in case of CIFAR10. To place this performance gain in context, it is competitive with the $\sim 0.03$ bits/dim boost reported in [18] (cf. Fig. 3 in [18]) with the introduction of the $1\times 1$ convolution. We train our model for $\sim 3000$ epochs, similar to [18]. Also note that we only require a batch size of 128 to achieve state-of-the-art likelihoods, whereas Glow uses batches of size 512. Thus our mAR-SCF model improves density estimates and requires significantly lower computational resources ( $\sim 48$ vs. $\sim 128$ GB memory). Overall, we also observe competitive sampling speed (see also Table 2). This firmly establishes the utility of our mAR-SCF model. + +For fair comparison with Flow++ [14] and Residual Flows [4], we employ the more powerful MixLogCDF couplings. Our mAR-SCF model uses 4 MixLogCDF couplings at each level with 96 channels but includes SPLIT operations unlike Flow++. Here, we outperform Flow++ and Residual Flows (3.27 vs. 3.29 and 3.28 bits/dim on CIFAR10) while being equally fast to sample as Flow++ (Table 2). A baseline model without our mAR prior has performance comparable to Flow++ (3.29 bits/dim). Similarly on MNIST, our mAR-SCF model again outperforms Residual Flows (0.88 vs. 0.97 bits/dim). Finally, we train a more powerful mAR-SCF + +![](images/d161f48b99142a0c62f6cd717e178031adf019de1d1c0b9426c74618a3e16305.jpg) +(a) Residual Flows [4] (3.28 bits/dim, 46.3 FID) + +![](images/85b97b3ee10bae2eef4a4a10cbe061ccdb350b2c1fb1e43cf16ccdb343bf1da8.jpg) +(c) Our mMAR-SCF Affine (3.31 bits/dim, 41.0 FID) + +![](images/9b9908068325f181afca2e8673300734bd56f30128131d117f62c68573e18a92.jpg) +(b) Flow++ with variational dequantization [14] (3.08 bits/dim) + +![](images/aa8f0382bad431bf2fa2d4887fa2346da6a920861365a18e5b7b6f75d9c75554.jpg) +(d) Our mMAR-SCF MixLogCDF (3.24 bits/dim, 41.9 FID) +Figure 3. Comparison of random samples from our $mAR-SCF$ model with state-of-the-art models. + +model with 256 channels with sampling speed competitive with [4], which achieves state-of-the-art 3.24 bits/dim on CIFAR10. This is attained after $\sim 400$ training epochs (comparable to $\sim 350$ epochs required by [4] to achieve 3.28 bits/dim). Next, we compare the sampling speed of our mAR-SCF model with that of Flow++ and Residual Flow. + +Sampling speed. We report the sampling speed of our mAR-SCF model in Table 2 in terms of sampling one image on CIFAR10. We report the average over 1000 runs using a batch size of 32. We performed all tests on a single Nvidia V100 GPU with 32GB of memory. First, note that our mAR-SCF model with affine coupling layers in 3 levels with 512 channels needs 17 ms on average to sample an image. This is comparable with Glow, which requires 13 ms. This shows + +
MethodCouplingLevels|SCF|Ch.Speed (ms, ↓)
Glow [18]Affine33251213
Flow++ [14]MixLogCDF3-9619
Residual Flow [4]Residual316-34
PixelCNN++ [33]Autoregressive---5 × 103
mAR-SCF (Ours)Affine3322566
mAR-SCF (Ours)Affine33251217
mAR-SCF (Ours)MixLogCDF349619
mAR-SCF (Ours)MixLogCDF3425632
+ +Table 2. Evaluation of sampling speed with batches of size 32. + +![](images/40ee257f5fe512631b8ca9f084ecc6415534ae946f1afad659ec5fcfb238e6a4.jpg) +Figure 4. Interpolations of our mAR-SCF model on CIFAR10. + +that our $mAR$ prior causes only a slight increase in sampling time – particularly because our $mAR-SCF$ requires only $\mathcal{O}(N)$ steps to sample and the prior has far fewer parameters compared to the invertible flow network. Moreover, our $mAR-SCF$ model with affine coupling layers with 256 channels is considerably faster (6 vs. 13 ms) with an accuracy advantage. Similarly, our $mAR-SCF$ with MixLogCDF and 96 channels is competitive in speed with [14] with an accuracy advantage and considerably faster than [4] (19 vs. 34 ms). This is because Residual Flows are slower to invert (sample) as there is no closed-form expression of the inverse. Furthermore, our $mAR-SCF$ with MixLogCDF and 256 channels is competitive with respect to [4] in terms of sampling speed while having a large accuracy advantage. Finally, note that these sampling speeds are two orders of magnitude faster than state-of-the-art fully autoregressive approaches, e.g. PixelCNN++ [33]. + +Sample quality. Next, we analyze the sample quality of our mAR-SCF model in Table 3 using the FID metric [13] + +![](images/20f57bdd976d22a601469353753fcc72383783cded12b50343a5386437f28b91.jpg) + +![](images/7b620e0001821f7e401a827b0c7104e132ae1d2abe45fd28fa84fd4d37a5dd44.jpg) +(a) Residual Flows [4] (3.75 bits/dim) +(b) Our mMAR-SCF (Affine, 3.80 bits/dim) +Figure 5. Random samples on ImageNet $(64\times 64)$ + +and Inception scores [32]. The analysis of sample quality is important as it is well-known that visual fidelity and test log-likelihoods are not necessarily indicative of each other [35]. We achieve an FID of 41.0 and an Inception score of 5.7 with our mAR-SCF model with affine couplings, significantly better than Glow with the same specifications and Residual Flows. While our mAR-SCF model with MixLogCDF couplings also performs comparably, empirically we find affine couplings to lead to better image quality as in [4]. We show random samples from our mAR-SCF model with both affine and MixLogCDF couplings in Fig. 3. Here, we compare to the version of Flow++ with MixLogCDF couplings and variational dequantization (which gives even better log-likelihoods) and Residual Flows. Our mAR-SCF model achieves better sample quality with more clearly defined objects. Furthermore, we also obtain improved sample quality over both PixelCNN and PixelIQN and close the gap in comparison to adversarial approaches like DCGAN [27] and WGAN-GP [40]. This highlights that our mAR-SCF model is able to better capture long-range correlations. + +Interpolation. We show interpolations on CIFAR10 in Fig. 4, obtained using Eq. (11). We observe smooth interpolation between images belonging to distinct classes. This shows that the latent space of our $mAR$ prior can be potentially used for downstream tasks similarly to Glow [18]. We include additional analyses in the supplementary material. + +# 5.2. ImageNet + +Finally, we evaluate our mAR-SCF model on ImageNet $(32\times 32$ and $64\times 64)$ against the best performing models on MNIST and CIFAR10 in Table 4, i.e. Glow [18] and Residual Flows [4]. Our model with affine couplings outperforms + +
MethodCouplingFID (↓)Inception Score (↑)
PixelCNN [38]Autoregressive65.94.6
PixelIQN [24]Autoregressive49.4-
Glow [18]Affine46.9-
Residual Flow [4]Residual46.35.2
mAR-SCF (Ours)MixLogCDF41.95.7
mAR-SCF (Ours)Affine41.05.7
DCGAN [27]Adversarial37.16.4
WGAN-GP [40]Adversarial36.46.5
+ +Table 3. Evaluation of sample quality on CIFAR10. Other results are quoted from [4, 24]. + +
MethodCoupling|SCF|Ch.bits/dim (↓)Mem (GB, ↓)
Glow [18]Affine325124.09~ 128
Residual Flow [4]Residual32-4.01-
mAR-SCF (Ours)Affine322564.07~ 48
mAR-SCF (Ours)MixLogCDF44603.99~ 80
+ +Table 4. Evaluation on ImageNet $\left( {{32} \times {32}}\right)$ . + +Glow while using fewer channels (4.07 vs. 4.09 bits/dim). For comparison with the more powerful Residual Flow models, we use four MixLogCDF couplings at each layer $f_{\theta_i}$ with 460 channels. We again outperform Residual Flows [4] (3.99 vs. 4.01 bits/dim). These results are consistent with the findings in Table 1, highlighting the advantage of our mAR prior. Finally, we also evaluate on the ImageNet (64 × 64) dataset. Our mAR-SCF model with affine flows achieves 3.80 vs. 3.81 bits/dim in comparison to Glow [18]. We show qualitative examples in Fig. 5 and compare to Residual Flows. We see that although the powerful Residual Flows obtain better log-likelihoods (3.75 bits/dim), our mAR-SCF model achieves better visual fidelity. This again highlights that our mAR is able to better capture long-range correlations. + +# 6. Conclusion + +We presented $mAR-SCF$ , a flow-based generative model with novel multi-scale autoregressive priors for modeling long-range dependencies in the latent space of flow models. Our $mAR$ prior considerably improves the accuracy of flow-based models with split coupling layers. Our experiments show that not only does our $mAR-SCF$ model improve density estimation (in terms of bits/dim), but also considerably improves the sample quality of the generated images compared to previous state-of-the-art exact inference models. We believe the combination of complex priors with flow-based models, as demonstrated by our $mAR-SCF$ model, provides a path toward efficient models for exact inference that approach the fidelity of GAN-based approaches. + +Acknowledgement. SM and SR acknowledge the support by the German Research Foundation as part of the Research Training Group Adaptive Preparation of Information from Heterogeneous Sources (AIPHES) under grant No. GRK 1994/1. + +# References + +[1] Jens Behrmann, Will Grathwohl, Ricky T. Q. Chen, David Duvenaud, and Jörn-Henrik Jacobsen. Invertible residual networks. In ICML, pages 573-582, 2019. 2 +[2] Christoph Bregler and Stephen M. Omohundro. Nonlinear image interpolation using manifold learning. In NIPS, pages 973-980, 1994. 5 +[3] Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale GAN training for high fidelity natural image synthesis. In ICLR, 2019. 1 +[4] Ricky T. Q. Chen, Jens Behrmann, David Duvenaud, and Jorn-Henrik Jacobsen. Residual flows for invertible generative modeling. In NeurIPS, pages 9913-9923, 2019. 2, 3, 6, 7, 8 +[5] Xi Chen, Diederik P. Kingma, Tim Salimans, Yan Duan, Prafulla Dhariwal, John Schulman, Ilya Sutskever, and Pieter Abbeel. Variational lossy autoencoder. In ICLR, 2017. 2 +[6] Xi Chen, Nikhil Mishra, Mostafa Rohaninejad, and Pieter Abbeel. Pixelsnail: An improved autoregressive generative model. In ICML, pages 864-872, 2018. 2 +[7] Sander Dieleman, Aäron van den Oord, and Karen Simonyan. The challenge of realistic music generation: Modelling raw audio at scale. In NeurIPS, pages 7989-7999, 2018. 1 +[8] Laurent Dinh, David Krueger, and Yoshua Bengio. NICE: Non-linear independent components estimation. In ICLR Workshop, 2015. 1, 2, 3, 4 +[9] Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real NVP. In ICLR, 2017. 1, 2, 3, 4, 6 +[10] Justin Domke, Alap Karapurkar, and Yiannis Aloimonos. Who killed the directed model? In CVPR, 2008. 1, 2, 4 +[11] Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron C. Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, pages 2672–2680, 2014. 1 +[12] Alex Graves. Generating sequences with recurrent neural networks. arXiv:1308.0850, 2013. 2, 4 +[13] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. GANs trained by a two time-scale update rule converge to a local Nash equilibrium. In NeurIPS, pages 6626-6637, 2017. 2, 7 +[14] Jonathan Ho, Xi Chen, Aravind Srinivas, Yan Duan, and Pieter Abbeel. Flow++: Improving flow-based generative models with variational dequantization and architecture design. In ICML, pages 2722-2730, 2019. 2, 3, 4, 6, 7 +[15] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735-1780, 1997. 2 +[16] Emiel Hoogeboom, Rianne van den Berg, and Max Welling. Emerging convolutions for generative normalizing flows. In ICML, pages 2771-2780, 2019. 2 +[17] Nal Kalchbrenner, Erich Elsen, Karen Simonyan, Seb Noury, Norman Casagrande, Edward Lockhart, Florian Stimberg, Aäron van den Oord, Sander Dieleman, and Koray Kavukcuoglu. Efficient neural audio synthesis. In ICML, pages 2410-2419, 2018. 2 +[18] Diederik P. Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible 1x1 convolutions. In NeurIPS, pages 10215-10224, 2018. 1, 2, 3, 4, 6, 7, 8 + +[19] Diederik P. Kingma, Tim Salimans, Rafal Jozefowicz, Xi Chen, Ilya Sutskever, and Max Welling. Improved variational inference with inverse autoregressive flow. In NIPS, pages 4743-4751, 2016. 2 +[20] Diederik P. Kingma and Max Welling. Auto-encoding variational Bayes. In ICLR, 2014. 1 +[21] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. Technical report, U. of Toronto, 2009. 2, 6 +[22] Yann LeCun, Léon Bottou, Yoshua Bengio, Patrick Haffner, et al. Gradient-based learning applied to document recognition. Proc. IEEE, 86(11):2278-2324, 1998. 2, 6 +[23] Jacob Menick and Nal Kalchbrenner. Generating high fidelity images with subscale pixel networks and multidimensional upscaling. In ICLR, 2019. 2 +[24] Georg Ostrovski, Will Dabney, and Rémi Munos. Autoregressive quantile networks for generative modeling. In ICML, pages 3936-3945, 2018. 8 +[25] George Papamakarios, Iain Murray, and Theo Pavlakou. Masked autoregressive flow for density estimation. In NeurIPS, pages 2338-2347, 2017. 2, 4 +[26] Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Lukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. In ICML, pages 4055-4064, 2018. 2 +[27] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In ICLR, 2016. 2, 8 +[28] Ali Razavi, Aïron van den Oord, and Oriol Vinyals. Generating diverse high-fidelity images with VQ-VAE-2. In NeurIPS, pages 14837–14847, 2019. 1, 2, 4 +[29] Scott E. Reed, Aaron van den Oord, Nal Kalchbrenner, Sergio Gomez Colmenarejo, Ziyu Wang, Yutian Chen, Dan Belov, and Nando de Freitas. Parallel multiscale autoregressive density estimation. In ICML, pages 2912-2921, 2017. 2 +[30] Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In ICML, pages 1278-1286, 2014. 1 +[31] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet large scale visual recognition challenge. International Journal of Computer Vision, 115(13):211–252, 2015. 2 +[32] Tim Salimans, Ian J. Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training GANs. In NIPS, pages 2234-2242, 2016. 2, 8 +[33] Tim Salimans, Andrej Karpathy, Xi Chen, and Diederik P. Kingma. PixelCNN++: Improving the PixelCNN with discretized logistic mixture likelihood and other modifications. In ICLR, 2017. 2, 7 +[34] Xingjian Shi, Zhihan Gao, Leonard Lausen, Hao Wang, Dit-Yan Yeung, Wai-Kin Wong, and Wang-chun Woo. Deep learning for precipitation nowcasting: A benchmark and a new model. In NeurIPS, pages 5617-5627, 2017. 4 + +[35] Lucas Theis, Aäron van den Oord, and Matthias Bethge. A note on the evaluation of generative models. In ICLR, 2016. 8 +[36] Jakub M. Tomczak and Max Welling. VAE with a VampPrior. In AISTATS, pages 1214-1223, 2018. 2 +[37] Aäron van den Oord, Nal Kalchbrenner, Lasse Espeholt, Koray Kavukcuoglu, Oriol Vinyals, and Alex Graves. Conditional image generation with PixelCNN decoders. In NIPS, pages 4790-4798, 2016. 1, 2, 4, 6 +[38] Aäron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. In ICML, pages 1747-1756, 2016. 1, 2, 4, 5, 6, 8 +[39] Aäron van den Oord, Yazhe Li, Igor Babuschkin, Karen Si + +monyan, Oriol Vinyals, Koray Kavukcuoglu, George van den Driessche, Edward Lockhart, Luis C. Cobo, Florian Stimberg, Norman Casagrande, Dominik Grewe, Seb Noury, Sander Dieleman, Erich Elsen, Nal Kalchbrenner, Heiga Zen, Alex Graves, Helen King, Tom Walters, Dan Belov, and Demis Hassabis. Parallel WaveNet: Fast high-fidelity speech synthesis. In ICML, pages 3918-3926, 2018. 1, 2 +[40] Xiang Wei, Boqing Gong, Zixia Liu, Wei Lu, and Liqiang Wang. Improving the improved training of Wasserstein GANs: A consistency term and its dual effect. In ICLR, 2018. 2, 8 +[41] Zachary M. Ziegler and Alexander M. Rush. Latent normalizing flows for discrete sequences. In ICML, pages 7673-7682, 2019. 2, 3 \ No newline at end of file diff --git a/normalizingflowswithmultiscaleautoregressivepriors/images.zip b/normalizingflowswithmultiscaleautoregressivepriors/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..bbe638d5abc58fff980a50af15033ccdd180812d --- /dev/null +++ b/normalizingflowswithmultiscaleautoregressivepriors/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f1a5a8e0456a744de37c45c429fb60593a5873e074c2f6d5cc9f375c41dd5b7 +size 519234 diff --git a/normalizingflowswithmultiscaleautoregressivepriors/layout.json b/normalizingflowswithmultiscaleautoregressivepriors/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5774e0d6a3761727af191198705e17376d86247c --- /dev/null +++ b/normalizingflowswithmultiscaleautoregressivepriors/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28c1cf7045a99d6c2d6b93e78c0813d892ab4d218f84063b06892f575c80c275 +size 455290 diff --git a/normawareembeddingforefficientpersonsearch/45391829-b815-44c8-ab09-4c185b32c440_content_list.json b/normawareembeddingforefficientpersonsearch/45391829-b815-44c8-ab09-4c185b32c440_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a816c195e1796b98a86c9c876800ee0674caa633 --- /dev/null +++ b/normawareembeddingforefficientpersonsearch/45391829-b815-44c8-ab09-4c185b32c440_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03021cca011e8981dc0458838b09fe398f7394479739a6712280129dd2a7626f +size 77272 diff --git a/normawareembeddingforefficientpersonsearch/45391829-b815-44c8-ab09-4c185b32c440_model.json b/normawareembeddingforefficientpersonsearch/45391829-b815-44c8-ab09-4c185b32c440_model.json new file mode 100644 index 0000000000000000000000000000000000000000..826f14cfdd0ce1881d84fc3cd3a4877b982d5761 --- /dev/null +++ b/normawareembeddingforefficientpersonsearch/45391829-b815-44c8-ab09-4c185b32c440_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98fdcdbe16934a62c287c724b692497af63dd7022e59aced7a6907dd2000dfb6 +size 99924 diff --git a/normawareembeddingforefficientpersonsearch/45391829-b815-44c8-ab09-4c185b32c440_origin.pdf b/normawareembeddingforefficientpersonsearch/45391829-b815-44c8-ab09-4c185b32c440_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1d0f1a8cda1f2665604cd24813ddd3278fe78980 --- /dev/null +++ b/normawareembeddingforefficientpersonsearch/45391829-b815-44c8-ab09-4c185b32c440_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98a063c2d995f33dbf60d64e364604df3547d6b0515538321f8e013c194eab10 +size 1630154 diff --git a/normawareembeddingforefficientpersonsearch/full.md b/normawareembeddingforefficientpersonsearch/full.md new file mode 100644 index 0000000000000000000000000000000000000000..fc2e2e61af33a0bbb2dc785097fb76de1857e29b --- /dev/null +++ b/normawareembeddingforefficientpersonsearch/full.md @@ -0,0 +1,341 @@ +# Norm-Aware Embedding for Efficient Person Search + +Di Chen $^{1,3}$ , Shanshan Zhang $^{1*}$ , Jian Yang $^{1,2*}$ , Bernt Schiele $^{3}$ + +$^{1}$ PCA Lab, Key Lab of Intelligent Perception and Systems for High-Dimensional Information of Ministry of Education, School of Computer Science and Engineering, Nanjing University of Science and Technology + +$^{2}$ Jiangsu Key Lab of Image and Video Understanding for Social Security + +3 Max Planck Institute for Informatics, Saarland Informatics Campus + +{dichen, shanshan.zhang, csjyang}@njust.edu.cn, {dichen, schiele}@mpi-inf.mpg.de + +# Abstract + +Person Search is a practically relevant task that aims to jointly solve Person Detection and Person Re-identification (re-ID). Specifically, it requires to find and locate all instances with the same identity as the query person in a set of panoramic gallery images. One major challenge comes from the contradictory goals of the two sub-tasks, i.e., person detection focuses on finding the commonness of all persons while person re-ID handles the differences among multiple identities. Therefore, it is crucial to reconcile the relationship between the two sub-tasks in a joint person search model. To this end, we present a novel approach called Norm-Aware Embedding to disentangle the person embedding into norm and angle for detection and re-ID respectively, allowing for both effective and efficient multi-task training. We further extend the proposal-level person embedding to pixel-level, whose discrimination ability is less affected by misalignment. We outperform other one-step methods by a large margin and achieve comparable performance to two-step methods on both CUHK-SYSU and PRW. Also, our method is easy to train and resource-friendlyly, running at 12 fps on a single GPU. + +# 1. Introduction + +In visual surveillance systems, the most fundamental problems are 1) how to locate persons within images, and 2) how to determine, if a query person is present in a particular set of images, typically across different cameras. The above two problems are usually investigated as the two independent tasks of Pedestrian Detection and Person Identification (re-ID). However, in practical applications, it is favorable to solve them in a joint framework, not only for convenience and high efficiency, but also for better performance. The task of Person Search, as introduced in [46], + +![](images/8a63bf0da22c3ab10bdcbf43f5971122ab42e4aa5f4d1e9a0b4f87b61253ab69.jpg) +(a) +Figure 1. Illustration on how person and background representations are scattered in the embedding space. Black arrows denote background while colorful ones denote persons with different identities. Gray surfaces are the decision boundary for person and background. (a) For $L_{2}$ normalized embeddings, the inter-class angle distances for different persons are squeezed by backgrounds. (b) Norm-aware embeddings separate persons and background by norms and discriminate person identities by angles, thus the constrain on inter-class distances is relaxed. + +![](images/2318389b262f584968657f86a4572aca32584ce3852356a848c7e606168eaf65.jpg) +(b) + +has the goal to retrieve a query person from a gallery of uncropped images captured by different cameras. Person search inherits difficulties from both re-ID and detection, e.g. viewpoint and illumination variance, cluttered background, occlusion, changing poses, etc., and is thus more challenging than either of the two tasks alone. + +A standard way to address person search is to use a two-step strategy, i.e., cascading a pedestrian detector and a re-ID feature extractor trained separately (e.g. [61, 3, 21, 16]). All candidate persons are cropped from the gallery images according to the detector, and fed into a standard person re-ID model. In contrast, others propose to share the backbone network between detection and re-ID [44, 42, 26, 2, 30, 47]. Given an uncropped image, these models output bounding box coordinates and the corresponding $L_{2}$ normalized identity embeddings for all the persons within. These works extend e.g. Faster R-CNN [34] by stacking an additional fully + +connected layer to produce $L_{2}$ normalized embeddings and train the whole model jointly with standard detection losses and an identity classification loss. Nonetheless, they suffer from the conflicting objectives of detection and re-ID during training, as pointed out by [3]. An intuitive illustration for $L_{2}$ normalized embeddings is shown in Fig. 1(a). The detection classification objective tends to squeeze the embedding space for all persons regardless of the identities, so as to better separate from background. Therefore, sharing the feature space with background instances limits the angular margin between different identities. As a consequence, due to the inherent trade-off between the two tasks, their detection and re-ID performances are typically both lower than the separately-trained counterparts. + +In this work, our goal is to develop a light-weight yet accurate model for person search. We adopt the one-step strategy, i.e., jointly optimize detection and re-ID in an end-to-end model, and relieve the objective contradictory problem by explicit decomposition. Specifically, we share the representations for detection and re-ID completely but decompose the features in the polar coordinate system, where each embedding vector is decomposed to radial norm $r$ and angle $\theta$ . The radial norm $r$ is used for pedestrian detection and could be interpreted as the detection confidence of a bounding box. The angle term $\theta$ measures the cosine similarity between persons, which is widely used in person re-ID. The principle idea is demonstrated in Fig. 1(b). During training, the embedding norms are optimized with a binary classification loss, and the angles are optimized with an OIM loss [44], which is a multi-class cross-entropy loss with normalized softmax weights. During inference, we fix the norm of the query person to 1 and calculate its similarity (dot product) to an arbitrary proposal, which is determined by both the norm and angle. Therefore, a high value of similarity indicates both high detection confidence and high identity similarity. Since the embedding norm is explicitly utilized, we call our method norm-aware embedding (NAE). + +Another challenge for joint detection and re-ID is the spatial misalignment problem. Typically, when we train a detector, one proposal is sampled as positive when it has a larger Intersection over Union (IoU) than 0.5 to any ground truth box. This relatively loose matching criterion makes sure to sample enough positives in each mini-batch, but has a negative effect as it includes many mis-aligned samples. Those samples with low alignment quality are harmful for re-ID performance [61] as the included background clutter usually plays a negative role on the features' discrimination ability. In order to alleviate this problem, we propose to re-weight features of each local patch according to its confidence of belonging to a person. Specifically, we perform fine-grained person/background classification for each proposal, i.e., we predict for each pixel location the confidence + +of belonging to a person, which is then used as the spatial attention weight for feature aggregation. After re-weighting, the features used for re-ID are expected to focus more on the person area while suppressing the background clutter, and thus become more discriminative for identity classification. Our approach using the above fine-grained classification is compatible with the norm-aware embedding, hence called $\mathrm{NAE + }$ + +In summary, the main contributions of this work are as follows: + +- We propose the norm-aware embedding method (NAE) for person search. NAE mitigates the objective contradictory problem by decomposing the feature embedding into norm and angle for detection and re-ID respectively. +- A pixel-wise extension, denoted as $\mathrm{NAE}+$ , is proposed to deal with the misalignment problem for end-to-end person search. +- Our methods are fast, explainable and achieve competitive performance on standard benchmarks (CUHK-SYSU and PRW). + +# 2. Related Work + +Person Search. Recently, person search has raised a lot of interest to researchers in the computer vision community. Zheng et al. [61] first make a thorough evaluation on a number of combinations of different detectors and re-identifiers. They also propose a cascaded fine-tuning strategy for training and Confidence Weighted Similarity (CWS) for person matching. Lan et al. [21] analyze the resolution diversity problem in person search and solve the multi-scale matching problem by Cross-Level Semantic Alignment (CLSA). Chen et al. [3] raise attention on the contradictory objective problem in person search, and propose to avoid it by separating detection and re-identification. Han et al. [16] point out that the bounding boxes produced by a vanilla detector are not optimal for re-ID. Thus they develop an RoI transform layer that enables gradient flow from the re-identifier to the detector for localization refinement. + +In contrast to the above two-step methods, other works aim to solve the person search problem more efficiently using one-step methods. For example, the Online Instance Matching (OIM) loss [44] and Center Loss [42, 40] are used to address the ill-conditioned training problem and enhance the feature discrimination power. Yan et al. [47] and Munjal et al. [30] propose to enrich the features with surrounding persons or the query person respectively. In [26] and [2], they discard the proposal generation operation and search the query person directly on the uncropped images by sequential decision making or reinforcement learning. + +In this paper, we also adopt the one-step strategy. Based on the OIM model [44], we improve the feature learning with our norm-aware embedding. Additionally, the final + +similarity calculation of our method is similar to CWS. Different from the original form which is used in a post-processing step, CWS in our method is naturally induced from the explicit decomposition in the polar coordinate system. Therefore, it is also useful to guide the training process for better feature learning. + +Person re-ID. Early person re-ID models focus on designing features manually [37, 11, 58, 24] and learning effective distance metrics [20, 23, 50]. Recently, CNNs have become the de facto standard for building a re-ID model. Such models are usually trained as a feature extractor with siamese loss [49, 22, 1, 36, 27, 45], triplet loss [7, 4] or cross-entropy loss [43, 59, 61, 10, 41]. Instead of averaging the convolutional features from all locations, latest methods extract part-level features and join them together as the final person embedding [35, 39, 57, 48]. These methods usually partition the feature maps into horizontal stripes for fine-grained feature learning. Our pixel-wise extension of the norm-aware embedding is also inspired by this approach. Instead of dividing the feature maps into blocks, we use a pixel-wise probability map to re-weight the features at every location, which is further supervised by a segmentation loss with bounding box annotations. + +Pedestrian Detection. Similar to person re-ID, early pedestrian detection methods are also based on hand-crafted features [12, 8, 9, 51, 54]. Deep neural networks, as versatile feature extractors, have dominated this task in recent years [52, 53, 32, 31]. Successful general object detection models are adapted for pedestrians, such as R-CNN [13, 52, 53] and Faster R-CNN [34, 55, 56]. In this work, we also build our model based on the adapted Faster R-CNN, which is extensible for fine-grained feature learning and reaches a sweet spot between speed and accuracy. + +Embedding Norms. It is common practice to normalize the deep embeddings with unit length in face recognition [28, 29, 6], person re-ID [10, 41] and person search [44]. To the best of our knowledge, only two papers discuss the efficacy of embedding norms [15, 38]. Guo et al. [15] find that the norm of the softmax weight vector is related to the sample number of this class. They further propose to promote the norms of underrepresented classes in order to improve the performance of one-shot face recognition. Wang et al. [38] also use normalized embeddings to represent face identities. Additionally, they regress the norm of the embedding to the age of the given person by reducing the mean squared error between these two during training. However, the norm information is then ignored for age-invariant face recognition when matching identities. Different from the above two works, our method makes explicit use of the embedding norms rather than employing them as a regularization term during training. By using the norm for the classification task (person vs. background), we endow the norm with a clear semantic meaning, i.e., the de + +![](images/3b957d442f5bae7d85cd0ed302dfe9a24275bf21c67e54f4b0a731ca8a0a9822.jpg) +Figure 2. Overall architecture for one-step methods based on Faster R-CNN [34]. Black arrows denote the forward pass and colorful ones denote different supervision signals. Region Proposal Net is omitted for simplicity. + +tection confidence, which is essential for person search. + +# 3. Methodology + +A typical one-step person search method based on Faster R-CNN [34] is illustrated in Fig. 2. A multi-task head for localization, detection and re-ID is added on top of the top convolutional features of Faster R-CNN. + +The first and most representative one-step method is OIM [44], where an $L_{2}$ normalized fully connected layer is concatenated to the global average pooled convolutional features. As is shown in Fig. 3(a), the box regression and region classification losses remain the same as in Faster R-CNN, with an identity classification loss supervising the person embeddings produced by the fully connected layer. In contrast, our norm-aware embedding method, illustrated in Fig. 3(b), removes the original region classification branch and uses the embedding norm as the binary person/background classification confidence. + +In this section, we will describe the norm-aware embedding head in detail and present the pixel-wise extension for fine-grained feature learning. + +# 3.1. Norm-Aware Embedding + +On top of the final convolutional features, we first apply global average pooling (GAP) and a fully connected (FC) layer to get the $d$ dimensional feature vector $\mathbf{x}$ , where $d$ is fixed to 256 following [44]. Then $\mathbf{x}$ is decomposed explicitly in the polar coordinate system as: + +$$ +\mathbf {x} = r \cdot \boldsymbol {\theta}, \tag {1} +$$ + +where norm $r \in [0, +\infty)$ and angle $\theta$ is a 256-dimensional vector with unit length. + +To interpret the norm $r$ as the detection confidence, we use a monotonic mapping to squeeze its magnitude to the range of [0, 1]: + +$$ +\tilde {r} = \sigma \left(\frac {r - \mathbb {E} [ r ]}{\sqrt {\operatorname {V a r} [ r ] + \epsilon}} \cdot \gamma + \beta\right), \tag {2} +$$ + +![](images/533cf409c81b9197cbdf3f4228ac2863d18e48535118ee20af5720f175ea26d9.jpg) +(a) OIM + +![](images/1affb9fc2851e204c1eda7044a3eb1301335c7f2797daf71ac4bd0b218bda796.jpg) +(b) NAE + +![](images/7af1508a9996702975272ea1bf7ffb8e004c532be35c0817b8e5f09ec866d3b4.jpg) +(c) NAE+ +Figure 3. Multi-task head architecture for Online Instance Matching (OIM), norm-aware embedding (NAE) and its pixel-wise extension $(\mathrm{NAE}+)$ . Dashed arrows indicate that the procedure is only enabled during inference. + +where $\sigma$ is the sigmoid activation, within which is a batch normalization [19] layer. + +The original embedding $\mathbf{x}$ is then scaled into our norm-aware embedding $\tilde{\mathbf{x}}$ : + +$$ +\tilde {\mathbf {x}} = \tilde {r} \cdot \boldsymbol {\theta} \tag {3} +$$ + +This procedure is represented by the dashed arrows in Fig. 3(b). + +Inference & Matching. For a query person, we first extract its embedding $\tilde{\mathbf{x}}_q$ by removing the RPN module and setting the proposal coordinate with the given bounding box. Since the query bounding box definitely contains a person, we manually set the norm of $\tilde{\mathbf{x}}_q$ to 1. Then, the similarity of the query person and an arbitrary detected person $\mathbf{x}_q$ in the gallery is calculated as follows: + +$$ +\operatorname {s i m} \left(\tilde {\mathbf {x}} _ {q}, \tilde {\mathbf {x}} _ {g}\right) = \tilde {\mathbf {x}} _ {q} ^ {T} \tilde {\mathbf {x}} _ {g} = \tilde {r} _ {g} \cdot \boldsymbol {\theta} _ {q} ^ {T} \boldsymbol {\theta} _ {g} \tag {4} +$$ + +In the above equation, $\pmb{\theta}_q^T\pmb{\theta}_g$ is the cosine similarity between the query and the gallery person. Thus, the final similarity equals the cosine similarity weighted by the detection + +confidence, which is especially useful to suppress false detections. Meanwhile, it also shares the same formation as Class Weighted Similarity (CWS) [61]. However, instead of just using CWS as a post-processing step, we leverage it to explicitly decompose the embedding for the detection and re-ID objectives during training. We further demonstrate the efficacy of CWS in Sec. 4.3. + +Training. As can be seen from Eq. 4, our norm-aware embedding is able to discriminate person identity as well as suppress false detections. Therefore, it can be supervised by re-ID and detection signals simultaneously during training. Specifically, the detection signal is cast on the scaled norm $\tilde{r}$ and formulated as a binary classification: + +$$ +\mathcal {L} _ {\det } = - y \log (\tilde {r}) - (1 - y) \log (1 - \tilde {r}) \tag {5} +$$ + +where $y$ is a $\{0,1\}$ label indicating if this proposal is considered as background or person. Meanwhile, we use an OIM loss [44] $\mathcal{L}_{\mathrm{reid}}$ on the normalized angular vector $\theta$ , which is a multi-class cross-entropy loss that minimizes the angular margin for the same identity and maximizes that of different identities. The bounding box regression loss $\mathcal{L}_{\mathrm{box}}$ remains identical to the form defined by Faster R-CNN. The three loss functions are illustrated by the yellow, green and blue arrows respectively in Fig. 3(b). Together with RPN classification and regression losses, they are jointly optimized by Stochastic Gradient Descent (SGD). + +# 3.2. Pixel-Wise Extension + +In Sec. 3.1, the convolutional features of each proposal are collapsed into a vector by global average pooling, losing spatial information. In this way, the person embeddings would suffer from distracting noise of the misaligned regions (the black region in Fig. 4). To address this problem, we propose $\mathrm{NAE + }$ , which is a pixel-wise extension of NAE. We carefully leverage the spatial information via highlighting the body part and suppressing the misaligned regions. Specifically, we first predict a $256\times k\times k$ tensor from the top feature map with a $1\times 1$ convolutional layer. Then the 256- dimensional vectors at all locations can be normalized and scaled into norm-aware embeddings, while still preserving the spatial structure. An illustration is shown in Fig. 3(c). In this way, the mapped norm $\tilde{r}_i$ at each location acts as a spatial attention, calibrating the per-pixel importance before the tensor is collapsed into the final matching vector. + +The training of $\mathrm{NAE + }$ can be formulated in a semantic segmentation manner, i.e., supervising all the mapped norms with a per-pixel cross-entropy loss. Different from the standard semantic segmentation approach, the ground truth class map is not available in person search datasets, hence we need to generate the coarse ground truth from bounding box annotations. The generation process is shown in Fig. 4. For each RoI, we set its intersection to the ground truth bounding box as 1 and leave the rest as 0. Bilinear + +![](images/078f65b1c0ede662d826f8225ba0e343637f5902c317e46659d88c31d2d0536a.jpg) +Figure 4. Pixel-wise label generation from bounding box annotation. Red box is the ground truth while blue box is the proposal. Black region is marked as 0, white being one and gray being values in between. Bilinear interpolation is used to match the label size to the feature map size. + +interpolation is used to resize the RoI box into $k \times k$ . The loss is then formulated as follows: + +$$ +\mathcal {L} _ {\det +} = - \frac {1}{k ^ {2}} \sum_ {i = 1} ^ {k ^ {2}} y _ {i} \log (\tilde {r} _ {i}) + (1 - y _ {i}) \log (1 - \tilde {r} _ {i}) \tag {6} +$$ + +where $y_{i}$ is the generated per-pixel label with its value lying between [0, 1]. The label generation procedure is illustrated in Fig. 4. + +During inference, even though the per-pixel probability map is trained, a single probability is needed to measure the detection confidence. A direct approach is to use the averaged probability $\mathbb{E}_i[\tilde{r}_i]$ across all spatial locations. However, we find through our experiments that this approach works poorly, i.e., the confidence of a valid bounding box is too low since the mean value would be diluted by the inevitable background regions with low confidence. We address this problem by simply stretching the magnitude of $\mathbb{E}_i[\tilde{r}_i]$ . Specifically, for each image, all the detection confidences are divided by the maximum value among them, such that all of them are expanded and still range between 0 and 1. + +Compared to NAE, $\mathrm{NAE + }$ does not increase the number of parameters. It only adds a small overhead on computation, while improving the person search accuracy as demonstrated by experiments. + +# 4. Experiments + +In this section, we perform a thorough evaluation of our NAE and $\mathrm{NAE + }$ . We begin by introducing the datasets and evaluation protocols, after which we describe the implementation in detail. Comprehensive analysis and visual inspections are conducted to explore the efficacy of our method. We further compare our method with the state-of-the-arts w.r.t. both search performance and running speed. + +# 4.1. Datasets and Settings + +CUHK-SYSU [44] is a hybrid dataset consisting of city scenes shot by a moving camera and screenshots of movies. + +A total of 18,184 uncropped images and 96,143 bounding boxes are collected, among which 11,206 images and 55,272 pedestrians are used for training. The testing set includes 2,900 query persons and 6,978 gallery images. For each query, different gallery sizes are defined by the benchmark to assess the scaling ability of different models. If not specified, we use the gallery size of 100 by default. + +PRW [61] is extracted from video frames recorded by 6 stationary cameras that are installed at different locations in a university campus. There are 11,816 frames with 43,110 bounding boxes, where 34,304 of them are annotated with 932 identities and the rest marked as unknown identities. In the training set, there are 5,704 images with 482 identities. The testing set contains 2,057 query persons and each of them are to be searched in a gallery with 6,112 images. Therefore, the gallery size is significantly larger than the default setting of CUHK-SYSU. + +Evaluation Protocol. Similar to person re-ID [60], Mean Average Precision (mAP) and Cumulative Matching Characteristics (CMC top-K) are standard metrics used to measure person search performance. However, a candidate in the ranking list would only be considered correct if its IoU to the ground truth bounding box is larger than 0.5, which is the main difference from the re-ID approach. + +# 4.2. Implementation Details1 + +Our model consists of three major parts: a stem network for spatial feature extraction, a region proposal network (RPN) for candidate bounding box sampling and a head network for proposal classification and regression. + +We adopt an ImageNet-pretrained [5] ResNet-50 [18] as our backbone network, with the foremost four residual blocks, i.e., 'conv1' to 'conv4', used as the stem network. + +A standard RPN is built on top of the stem network to generate pedestrian candidate bounding boxes. We follow the anchor settings in [25] and sample the positive proposals with a lower bound IoU of 0.5 to the ground truth, and the IoU interval for negative proposals is $[0.1, 0.5)$ . + +Next, the proposals are cropped and reshaped to $14 \times 14$ by an RoIAlign layer [17]. The head network, which is the 'conv5' residual block of ResNet-50, is used to transform the proposals into 2048-dimensional $7 \times 7$ feature maps. Task-specific heads for bounding box regression and norm-aware embedding generation are added on top of the feature maps. We set the spatial size $k$ to 7 for $\mathrm{NAE}+$ , which is depicted in Fig. 3(c). + +During training, we sample 5 images for each batch, which are resized to $900 \times 1,500$ . Our model is trained on a single NVIDIA Tesla P40 GPU for 22 epochs, with an initial learning rate of 0.003 which is progressively warmed up during the first epoch and decreased by 10 at the 16-th epoch. The momentum and weight decay of SGD are set to + +
DetectorRecallAPRe-identifiermAPtop-1
OIM-base89.379.7OIM-base84.486.1
NAE90.091.8
NAE92.686.8OIM-base85.987.6
NAE91.592.4
GT100100OIM-base90.791.2
NAE93.594.0
+ +Table 1. Analytical experiment results on CUHK-SYSU. The upper block uses the detected boxes of OIM-base, while the lower block uses the NAE detection results. + +
MethodmAPtop-1ΔmAPΔtop-1
OIM-base84.486.1
OIM-base w/ CWS87.188.5+2.7+2.4
NAE91.592.4
NAE w/o CWS89.991.3-1.6-1.1
+ +Table 2. Ablation experiments on Class Weighted Similarity. + +0.9 and $5 \times 10^{-4}$ respectively. As for $\mathrm{NAE+}$ , we initialize the weights with a trained NAE model by converting the FC layer weights into $1 \times 1$ convolution weights. It is then finetuned for 11 epochs. The learning rate is set to 0.003 for the first 8 epochs, and then decayed to 0.0003 for the remaining 3 epochs. + +At test time, the number of proposals is set to 300. Nonmaximum Suppression [14] with a threshold of 0.4 is used to filter out redundant boxes. + +# 4.3. Analytical Experiments + +As mentioned in the introduction section, person search accuracy is affected by both the detection quality and the identity recognition accuracy. In order to better understand how well our NAE method handles the above two sub-tasks, we disentangle the person search into detection and re-ID and evaluate their performances individually. + +We implement the analysis on our norm-aware embedding and the OIM baseline model. Four variants are evaluated, namely + +- OIM-base: Our re-implementation of the OIM model [44] which shares the same architecture settings as our NAE model described in Sec. 4.2. Benefiting from large input image size [56], dense anchor setting [25] and RoIAlign [17], our OIM-base is significantly better than the original implementation. +- OIM-base w/ CWS: Using the trained model of OIM-base and apply Class Weighted Similarity [61] when matching gallery persons to the query. +- NAE: Our norm-aware embedding model as described in Sec. 3.1. +- NAE w/o CWS: Identical to NAE but only using the normalized embedding $\theta$ without the scale operation + +![](images/f21d951a5c7abba3a71b133681da5fde48d7226e9f27fcfeac958ad5f18c9d20.jpg) + +![](images/c361519faba7164d26c9e7b8f64adaaa709b35d83abf19d6432874abf431d9c4.jpg) + +![](images/2fd6251501d30eb3d0a3cd5e2524ca9f927677936b2305c7b262156811e8931f.jpg) +Figure 5. Pixel-wise norm predictions of $\mathrm{NAE + }$ on CUHK-SYSU. Warmer color represents larger norm, which indicates a higher probability of this position being a person. The detection performance of $\mathrm{NAE + }$ is $93.0\%$ and $82.1\%$ w.r.t. Recall and AP, remaining similar to that of NAE. + +(the vector marked in green in Fig. 3(b)). + +All models are trained on CUHK-SYSU and tested under a gallery size of 100. + +For pedestrian detection, we use Recall and Average Precision (AP) as the performance metrics. For person re-ID, mAP and top-1 accuracy are adopted. They are the same as in person search, but the embeddings for matching are extracted differently. We remove the RPN of the trained model and set the proposals manually with the boxes to be inspected. Therefore, an end-to-end person search model serves solely as a re-ID feature extractor. + +The evaluation results are collected in Tab. 1 and Tab. 2, from which we make the following conclusions. + +The detection quality of NAE is better. The detection results are recorded in the second column of Tab. 1, from which we can see that our NAE model achieves $92.6\%$ and $86.8\%$ w.r.t. Recall and AP, surpassing OIM-base by 3.3 and 7.1 pp. respectively. The better detection quality indicates that the detection objective in NAE is optimized more smoothly and effectively than in our OIM-base. The final person search performance of NAE is also better than OIM-base, thanks to the high-quality bounding boxes. + +NAE is more discriminative for re-identification. In the lower block of Tab. 1, we can see that NAE achieves $91.5\%$ and $92.4\%$ w.r.t. mAP and top-1, outperforming OIM-base with NAE detected boxes by 5.6 and $4.8~\mathrm{pp}$ . The performance improvement also holds when switching the bounding boxes to the ground truth boxes or OIM-base detections, as is shown in the upper and lower block of Tab. 1. These results suggest that NAE has better re-ID accuracy, which indicates that the discrimination power of NAE is superior to OIM. + +Class Weighted Similarity is helpful. In Tab. 2, we can see that adding CWS to OIM-base yields a gain of $+2.7$ and + +
MethodCUHK-SYSUPRW
mAPtop-1mAPtop-1
one-stepOIM [44]75.578.721.349.9
IAN [42]76.380.123.061.9
NPSM [26]77.981.224.253.1
RCAA [2]79.381.3--
CTXGraph [47]84.186.533.473.6
QEEPS [30]88.989.137.176.7
OIM-base (ours)84.486.134.075.9
NAE (ours)91.592.443.380.9
NAE+ (ours)92.192.944.081.1
two-stepDPM+IDE [61]--20.548.3
CNN+MGTS [3]83.083.732.672.1
CNN+CLSA [21]87.288.538.765.0
FPN+RDLR [16]93.094.242.970.2
+ +Table 3. Comparison with state-of-the-arts. One-step methods are gathered in the upper block while two-step methods are in the lower block. Best results in each block are marked in bold. + ++2.4 pp. for mAP and top-1 respectively. Meanwhile, removing CWS from NAE makes mAP and top-1 drop from 91.5 to 89.9 and 92.4 to 91.3. These results confirm the positive efficacy of CWS. As a naturally induced form of NAE, CWS also contributes to the person search performance of our method. + +In conclusion, our norm-aware embedding successfully alleviates the contradictory objectives of detection and re-ID by decomposing embedding explicitly into norm and angle. The detection and re-ID sub-tasks both achieve better results than the baseline. As a result, the final person search performance of our method is remarkable, which can be attributed to the improvements on the two sub-tasks. + +# 4.4. Visualized Inspections + +To inspect the efficacy of the $\mathrm{NAE + }$ method, we visualize the output probability maps in Fig. 5. Specifically, we remove the RPN and RoIAlign modules from a trained $\mathrm{NAE + }$ model and forward the input image directly through the whole network. The output probability map, composed of the mapped norms $\tilde{r}_i$ at each location, is upsampled with bilinear interpolation to match the input image size. We then represent the probability maps with different colors and overlay them with the corresponding input images. We observe from Fig. 5 that $\mathrm{NAE + }$ successfully highlights the human body region and suppresses background clutters, which makes the embedding more robust to noises. As is shown in Tab. 3, $\mathrm{NAE + }$ outperforms $\mathrm{NAE}$ consistently on CUHK-SYSU and PRW. + +We also show some qualitative search results in Fig. 7. The selected cases are representative hard ones, including crowd overlapping (case a, f), confusing appearance (c, d, f, g), viewpoint change (c, d, f, g) and obstacle occlusion + +![](images/ddaffbdcb48ccbee22e42eca2174816cdc24bb0cab8220762e393f540c9e680f.jpg) +(a) + +![](images/30ccc410c4d1111d5363b77275dab2d03e543369a03fbe12e88d13e68621c8f4.jpg) +(b) +Figure 6. Performance comparison on CUHK-SYSU with varying gallery sizes. Dashed lines represent two-step methods while solid lines denote one-step methods. + +
GPU (TFLOPs)MGTSQEEPSNAENAE+
K80 (4.1)1269-663606
P6000 (12.6)-300--
P40 (11.8)--158161
V100 (14.1)--8398
+ +Table 4. Speed comparison on different GPUs. Running time is measured in milliseconds. + +(e, g). Our NAE method successfully localize and match the query person in most of the hard cases, although there is still room to improve the performance on extreme instances like (f) and (g). Moreover, our NAE+ method is better than NAE as it returns the correct result for all scenarios. + +# 4.5. Comparison to the State-of-the-arts + +In this section, we compare our NAE and $\mathrm{NAE + }$ to state-of-the-art methods on person search in Tab. 3. All the results are gathered according to their search strategies, i.e., one-step methods in the upper block and two-step method in the lower block. 'DPM', 'CNN' and 'FPN' stand for Deformable Part Model [14], ResNet-50-based Faster R-CNN [34] and Feature Pyramid Network [25] respectively. They are individually trained as vanilla pedestrian detectors. Comparison on CUHK-SYSU. As shown in Tab. 3, both NAE and $\mathrm{NAE + }$ outperform all other one-step methods, including the strong counterparts QEEPS [30] and CTX-Graph [47]. Note that their forward pass requires some computationally heavy operations, e.g. siamese attention and additional graph convolutions. In contrast, our method only needs a single forward pass, consuming less computing resources and memory. Our method is also comparable to the top two-step method 'FPN + RDLR' [16], which uses two backbones for detection and re-ID respectively. We believe the performance-boosting components of [16], i.e., feature pyramid network, RoI transform layer and proxy triplet loss, could also bring improvements to our method, which is however beyond the scope of this paper. + +In Fig. 6, we further evaluate the performance under larger search scopes. As is defined in [44], each query per + +![](images/ebda195159f10aa3cc43c4ea288274b6f87b8761d4eaafd3f28a22e7d1933985.jpg) +(a) + +![](images/462d59d3448ab70abfccf481bb57d17c997e306e449d428d65e914c8ca2fd3ed.jpg) +(d) +Figure 7. Top-1 search results for several hard samples. 'Q' stands for the query image, for each we show the top-1 match given by OIM-base, our NAE and $\mathrm{NAE + }$ . Green/red boxes denote the correct/wrong results respectively. (a) $\sim$ (e) are cases where OIM-base fails while NAE and $\mathrm{NAE + }$ succeed. (f) and (g) are failure cases for both OIM-base and NAE, except for $\mathrm{NAE + }$ + +son is matched in galleries with an increasing size. From Fig. 6 we can see that the mAP for all methods decrease monotonically as the gallery size becomes larger. This phenomenon indicates that it is more difficult to match a person in larger scopes, which is a typical challenge in real-world applications. Our method outperforms all the one-step methods by a considerable margin, while achieving similar mAP to the two-step methods at all scopes. + +Comparison on PRW. In the right column of Tab. 3, we summarize the results of our NAE and $\mathrm{NAE + }$ together with other competitive methods. Our NAE method surpasses all previous methods, including both one-step and two-step ones. In particular, our NAE outperforms the second best method by a large margin of around 9 pp. w.r.t. top-1 accuracy. Compared to CUHK-SYSU, PRW consists of less training data and larger gallery size, thus it is more challenging. Our NAE method behaves better on PRW, indicating that our method is more robust with reduced training data. Moreover, the pixel-wise extension $\mathrm{NAE + }$ further improves over NAE by 0.7 and 0.2 pp. w.r.t. mAP and top-1 metrics, setting the new state-of-the-art on PRW. + +Timing. We compare the speed of different methods in Tab. 4. Since different methods are implemented on different GPUs, we show the Tera-Floating Point Operation per-second (TFLOPs) beside each GPU for fair comparison. Our NAE and $\mathrm{NAE + }$ are implemented in PyTorch [33] without bells and whistles. We test the models with an input image size as $900\times 1500$ , which is the same as MGTS and QEEPS [30]. We can see from Tab. 4 that our method is around 2 times faster than the two-step method MGTS [3]. Our method is also 2 times faster than QEEPS, which is the current state-of-the-art one-step method. Finally, our NAE + +and NAE+ methods cost 83 and 98 milliseconds per-frame respectively on a V100 GPU. The fast speed of our method reveals its great potential for real-world applications. + +# 5. Conclusion + +In this paper, we propose an embedding decomposing method to deal with the contradictory objective problem of person search. Person embeddings are disintegrated into norm and angle, which are used to measure the detection confidence and identity similarity accordingly. In this way, the detection and re-ID sub-tasks both get higher performance, which in result improves the person search accuracy. We further extend our method from region-level to pixel-level in order to extract more fine-grained information. Thorough experiments on two standard benchmarks confirm the advantages of our method in terms of both accuracy and speed. + +# Acknowledgement + +The authors would like to thank the AC and the anonymous reviewers for their critical and constructive comments and suggestions. This work was supported by the National Science Fund of China (Grant Nos. U1713208, 61702262), Funds for International Co-operation and Exchange of the National Natural Science Foundation of China (Grant No. 61861136011), "111" Program B13022, Natural Science Foundation of Jiangsu Province, China (Grant No. BK20181299), Young Elite Scientists Sponsorship Program by CAST (2018QNRC001), and Science and Technology on Parallel and Distributed Processing Laboratory (PDL) Open Fund (WDZC20195500106). + +# References + +[1] Ejaz Ahmed, Michael Jones, and Tim K Marks. An improved deep learning architecture for person re-identification. In CVPR, 2015. +[2] Xiaojun Chang, Po-Yao Huang, Yi-Dong Shen, Xiaodan Liang, Yi Yang, and Alexander G. Hauptmann. Rcaa: Relational context-aware agents for person search. In ECCV, 2018. +[3] Di Chen, Shanshan Zhang, Wanli Ouyang, Jian Yang, and Ying Tai. Person search via a mask-guided two-stream cnn model. In ECCV, 2018. +[4] 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, 2016. +[5] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. +[6] Jiankang Deng, Jia Guo, Niannan Xue, and Stefanos Zafeiriou. Arcface: Additive angular margin loss for deep face recognition. arXiv preprint arXiv:1801.07698. +[7] Shengyong Ding, Liang Lin, Guangrun Wang, and Hongyang Chao. Deep feature learning with relative distance comparison for person re-identification. PR, 48(10):2993–3003, Oct 2015. +[8] Piotr Dollar, Ron Appel, Serge Belongie, and Pietro Perona. Fast feature pyramids for object detection. TPAMI, 36(8):1532-1545, Aug 2014. +[9] Piotr Dollar, Zhuowen Tu, Pietro Perona, and Serge Belongie. Integral channel features. In BMVC, 2009. +[10] Xing Fan, Wei Jiang, Hao Luo, and Mengjuan Fei. Spherereid: Deep hypersphere manifold embedding for person re-identification. arXiv preprint arXiv:1807.00537, 2018. +[11] M. Farenzena, L. Bazzani, A. Perina, V. Murino, and M. Cristani. Person re-identification by symmetry-driven accumulation of local features. In CVPR, 2010. +[12] Pedro F Felzenszwalb, Ross B Girshick, David Mcallester, and Deva Ramanan. Object detection with discriminatively trained part based models. TPAMI, 32(9):1627-1645, Sept 2009. +[13] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In CVPR, 2014. +[14] Ross Girshick, Forrest Iandola, Trevor Darrell, and Jitendra Malik. Deformable part models are convolutional neural networks. In CVPR, 2015. +[15] Yandong Guo and Lei Zhang. One-shot face recognition by promoting underrepresented classes. arXiv preprint arXiv:1707.05574, 2017. +[16] Chuchu Han, Jiacheng Ye, Yunshan Zhong, Xin Tan, Chi Zhang, Changxin Gao, and Nong Sang. Re-id driven localization refinement for person search. In ICCV, 2019. +[17] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In ICCV, 2017. +[18] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. + +[19] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. +[20] Martin Kostinger, Martin Hirzer, Paul Wohlhart, Peter M. Roth, and Horst Bischof. Large scale metric learning from equivalence constraints. In CVPR, 2012. +[21] Xu Lan, Xiatian Zhu, and Shaogang Gong. Person search by multi-scale matching. In ECCV, 2018. +[22] Wei Li, Rui Zhao, Tong Xiao, and Xiaogang Wang. DeepReID: Deep filter pairing neural network for person re-identification. In CVPR, 2014. +[23] Xiang Li, Wei Shi Zheng, Xiaojuan Wang, Tao Xiang, and Shaogang Gong. Multi-scale learning for low-resolution person re-identification. In ICCV, 2015. +[24] Shengcai Liao, Yang Hu, Xiangyu Zhu, and Stan Z. Li. Person re-identification by local maximal occurrence representation and metric learning. In CVPR, 2015. +[25] Tsung-Yi Lin, Piotr Dollár, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In CVPR, 2017. +[26] Hao Liu, Jiashi Feng, Zequn Jie, Karlekar Jayashree, Bo Zhao, Meibin Qi, Jianguo Jiang, and Shuicheng Yan. Neural person search machines. In ICCV, 2017. +[27] Hao Liu, Jiashi Feng, Meibin Qi, Jianguo Jiang, and Shuicheng Yan. End-to-end comparative attention networks for person re-identification. TIP, 26(7):3492–3506, July 2017. +[28] Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj, and Le Song. Spherical face: Deep hypersphere embedding for face recognition. In CVPR, 2017. +[29] Weiyang Liu, Yandong Wen, Zhiding Yu, and Meng Yang. Large-margin softmax loss for convolutional neural networks. In ICML, 2016. +[30] Bharti Munjal, Sikandar Amin, Federico Tombari, and Fabio Galasso. Query-guided end-to-end person search. In CVPR, 2019. +[31] W. Ouyang and X. Wang. A discriminative deep model for pedestrian detection with occlusion handling. In CVPR, 2012. +[32] W. Ouyang and X. Wang. Joint deep learning for pedestrian detection. In ICCV, 2013. +[33] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NIPS-W, 2017. +[34] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. TPAMI, 39(6):1137-1149, June 2017. +[35] Yifan Sun, Liang Zheng, Yi Yang, Qi Tian, and Shengjin Wang. Beyond part models: Person retrieval with refined part pooling (and a strong convolutional baseline). In ECCV, 2018. +[36] Rahul Rama Varior, Bing Shuai, Jiwen Lu, Dong Xu, and Gang Wang. A siamese long short-term memory architecture for human re-identification. In ECCV, 2016. + +[37] Xiaogang Wang, Gianfranco Doretto, Thomas Sebastian, Jens Rittscher, and Peter Tu. Shape and appearance context modeling. In ICCV, 2007. +[38] Yitong Wang, Dihong Gong, Zheng Zhou, Xing Ji, Hao Wang, Zhifeng Li, Wei Liu, and Tong Zhang. Orthogonal deep features decomposition for age-invariant face recognition. In ECCV, 2018. +[39] Longhui Wei, Shiliang Zhang, Hantao Yao, Wen Gao, and Qi Tian. Glad: Global-local-alignment descriptor for pedestrian retrieval. In ACM'MM, 2017. +[40] Yandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao. A discriminative feature learning approach for deep face recognition. In ECCV, 2016. +[41] Wangmeng Xiang, Jianqiang Huang, Xianbiao Qi, XianSheng Hua, and Lei Zhang. Homocentric hypersphere feature embedding for person re-identification. arXiv preprint arXiv:1804.08866, 2018. +[42] Jimin Xiao, Yanchun Xie, Tammam Tillo, Kaizhu Huang, Yunchao Wei, and Jiashi Feng. Ian: The individual aggregation network for person search. arXiv preprint arXiv:1705.05552, 2017. +[43] Tong Xiao, Hongsheng Li, Wanli Ouyang, and Xiaogang Wang. Learning deep feature representations with domain guided dropout for person re-identification. In CVPR, 2016. +[44] Tong Xiao, Shuang Li, Bochao Wang, Liang Lin, and Xiaogang Wang. Joint detection and identification feature learning for person search. In CVPR, 2017. +[45] Jing Xu, Rui Zhao, Feng Zhu, Huaming Wang, and Wanli Ouyang. Attention-aware compositional network for person re-identification. In CVPR, 2018. +[46] Yuanlu Xu, Bingpeng Ma, Rui Huang, and Liang Lin. Person search in a scene by jointly modeling people commonness and person uniqueness. In ACM'MM, 2014. +[47] Yichao Yan, Qiang Zhang, Bingbing Ni, Wendong Zhang, Minghao Xu, and Xiaokang Yang. Learning context graph for person search. In CVPR, 2019. +[48] Hantao Yao, Shiliang Zhang, Richang Hong, Yongdong Zhang, Changsheng Xu, and Qi Tian. Deep representation learning with part loss for person re-identification. TIP, 28(6):2860–2871, June 2019. +[49] Dong Yi, Zhen Lei, Shengcai Liao, and Stan Z. Li. Deep metric learning for person re-identification. In ICPR, 2014. +[50] Li Zhang, Tao Xiang, and Shaogang Gong. Learning a discriminative null space for person re-identification. In CVPR, 2016. +[51] Shanshan Zhang, Christian Bauckhage, and Armin B. Cremers. Informed haar-like features improve pedestrian detection. In CVPR, 2014. +[52] S. Zhang, R. Benenson, M. Omran, J. Hosang, and B. Schiele. How far are we from solving pedestrian detection? In CVPR, 2016. +[53] S. Zhang, R. Benenson, M. Omran, J. Hosang, and B. Schiele. Towards reaching human performance in pedestrian detection. TPAMI, 40(4):973-986, April 2018. +[54] S. Zhang, R. Benenson, and B. Schiele. Filtered channel features for pedestrian detection. In CVPR, 2015. + +[55] S. Zhang, R. Benenson, and B. Schiele. Citypersons: A diverse dataset for pedestrian detection. In CVPR, 2017. +[56] Shanshan Zhang, Jian Yang, and Bernt Schiele. Occluded pedestrian detection through guided attention in cnns. In CVPR, 2018. +[57] Liming Zhao, Xi Li, Yueting Zhuang, and Jingdong Wang. Deeply-learned part-aligned representations for person re-identification. In ICCV, 2017. +[58] Rui Zhao, Wanli Ouyang, and Xiaogang Wang. Unsupervised salience learning for person re-identification. In CVPR, 2013. +[59] Liang Zheng, Zhi Bie, Yifan Sun, Jingdong Wang, Chi Su, Shengjin Wang, and Qi Tian. Mars: A video benchmark for large-scale person re-identification. In ECCV, 2016. +[60] Liang Zheng, Liyue Shen, Lu Tian, Shengjin Wang, Jingdong Wang, and Qi Tian. Scalable person re-identification: A benchmark. In ICCV, 2015. +[61] Liang Zheng, Hengheng Zhang, Shaoyan Sun, Manmohan Chandraker, Yi Yang, and Qi Tian. Person re-identification in the wild. In CVPR, 2017. \ No newline at end of file diff --git a/normawareembeddingforefficientpersonsearch/images.zip b/normawareembeddingforefficientpersonsearch/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ec4c9e73cf6f2477e253a7d13037890deb861a2d --- /dev/null +++ b/normawareembeddingforefficientpersonsearch/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78eafdd0d37635de0f6dd0e3cc16c8f09be7c760722119c99d24681300c35d38 +size 512805 diff --git a/normawareembeddingforefficientpersonsearch/layout.json b/normawareembeddingforefficientpersonsearch/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..eb8d428c519eaeed9f5a0a802822e13dc52093a3 --- /dev/null +++ b/normawareembeddingforefficientpersonsearch/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d554f3fd5cd13116ec011285ca8f3adc72840702f878c2c875d3d25e3372e12 +size 409526 diff --git a/novelobjectviewpointestimationthroughreconstructionalignment/29dd8743-31ea-4d1e-a9b5-97da1af42a0a_content_list.json b/novelobjectviewpointestimationthroughreconstructionalignment/29dd8743-31ea-4d1e-a9b5-97da1af42a0a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..02e116062089592a6955ba4335f66420a080b8ea --- /dev/null +++ b/novelobjectviewpointestimationthroughreconstructionalignment/29dd8743-31ea-4d1e-a9b5-97da1af42a0a_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0440448ea7acca8f1be89685e8c5865ff09f8187844db2718a4d3271644507f3 +size 69404 diff --git a/novelobjectviewpointestimationthroughreconstructionalignment/29dd8743-31ea-4d1e-a9b5-97da1af42a0a_model.json b/novelobjectviewpointestimationthroughreconstructionalignment/29dd8743-31ea-4d1e-a9b5-97da1af42a0a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..324159357659f8f4c2aa1467b02c51847cddb4c6 --- /dev/null +++ b/novelobjectviewpointestimationthroughreconstructionalignment/29dd8743-31ea-4d1e-a9b5-97da1af42a0a_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f1adabc5f7bebeb8bec53a2f077f8877480cdd8942d62d54b50a0f1241ea358b +size 85358 diff --git a/novelobjectviewpointestimationthroughreconstructionalignment/29dd8743-31ea-4d1e-a9b5-97da1af42a0a_origin.pdf b/novelobjectviewpointestimationthroughreconstructionalignment/29dd8743-31ea-4d1e-a9b5-97da1af42a0a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..33fa2b65307821f3a9a072ffaca993c024abffcb --- /dev/null +++ b/novelobjectviewpointestimationthroughreconstructionalignment/29dd8743-31ea-4d1e-a9b5-97da1af42a0a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9fec26c177348a9d92c82d60724c46ea97f12d3fe4777edc207905fd7ee23784 +size 1247898 diff --git a/novelobjectviewpointestimationthroughreconstructionalignment/full.md b/novelobjectviewpointestimationthroughreconstructionalignment/full.md new file mode 100644 index 0000000000000000000000000000000000000000..576a1eb3364a745d5bdbda35be693044b0ca29c5 --- /dev/null +++ b/novelobjectviewpointestimationthroughreconstructionalignment/full.md @@ -0,0 +1,251 @@ +# Novel Object Viewpoint Estimation through Reconstruction Alignment + +Mohamed El Banani Jason J. Corso David F. Fouhey University of Michigan + +{mbanani, jjcorso, fouhey}@umich.edu + +# Abstract + +The goal of this paper is to estimate the viewpoint for a novel object. Standard viewpoint estimation approaches generally fail on this task due to their reliance on a 3D model for alignment or large amounts of class-specific training data and their corresponding canonical pose. We overcome those limitations by learning a reconstruct and align approach. Our key insight is that although we do not have an explicit 3D model or a predefined canonical pose, we can still learn to estimate the object's shape in the viewer's frame and then use an image to provide our reference model or canonical pose. In particular, we propose learning two networks: the first maps images to a 3D geometry-aware feature bottleneck and is trained via an image-to-image translation loss; the second learns whether two instances of features are aligned. At test time, our model finds the relative transformation that best aligns the bottleneck features of our test image to a reference image. We evaluate our method on novel object viewpoint estimation by generalizing across different datasets, analyzing the impact of our different modules, and providing a qualitative analysis of the learned features to identify what representations are being learnt for alignment. + +# 1. Introduction + +Consider the two views of the owl in Figure 1. How are they related? As humans, we can easily imagine how to move from view 1 to view 2, even if we have never seen this object before. This problem of understanding object pose and viewpoint has long fascinated researchers in both computer vision (starting with the first PhD thesis on computer vision [21]) and psychology [23, 27]. Within computer vision, many approaches have been proposed to estimate an image's viewpoint with respect to a given, or assumed, oriented 3D model. Despite the success of those approaches on known classes, they struggle with novel objects since both the 3D model and its canonical pose are unknown. In this work, we learn to predict the relative viewpoint for a novel object using a single reference view. + +![](images/e899891f20dbb54798d96fe6f72426abd2e2ce5a9043ea0318eec4409d313dfe.jpg) + +![](images/50223162c6f6bace4803da7a0f993131612724fe4ef6e6236db82c481978b387.jpg) +Figure 1. Humans can not help but see the 3D structure in those two views, which makes aligning their viewpoints very easy. This paper proposes a reconstruct-and-align approach to learning viewpoint estimation for novel objects. + +Historically, there has been two general approaches to viewpoint estimation. First, 3D model alignment approaches find a transformation that aligns an image to a known 3D model [9, 20, 39]. Despite their efficacy, those approaches were limited to objects with available 3D models. Second, end-to-end discriminative approaches learn to directly estimate the image's viewpoint with respect to a canonical pose (e.g., head-on for a car) [24, 29, 30, 33]. While those approaches do not rely on explicit 3D models, their predictions are with respect to an implicitly-defined, canonically-oriented model. Due to their reliance on explicitly- or implicitly-defined 3D models, those approaches struggle with novel objects where neither the model nor its canonical orientation are known. + +How can we estimate the viewpoint of a novel object? Viewpoint is defined with respect to a class-specific coordinate frame or a canonical pose (e.g., head-on for a car) [33]. For small generalization (e.g., from bikes to motorcycles), one can exploit similarity in viewpoint appearance between + +categories [15], but this is rarely the case. Motivated by research on mental rotation [23], we observe that an image, as opposed to a 3D model, can serve as a reference pose. Hence, instead of aligning to a 3D model, we find the relative transformation between two views of the same object. + +In this work, we combine insights from both 3D alignment and end-to-end learning. We do not use a 3D model, but instead learn to map the input image to a 3D feature grid. Our key insight is that, although we do not have an explicit 3D model, we can still learn a deep network that maps each object instance to a 3D reference frame. This is done by combining learned 2D layers with projection layers constrained to follow projective geometry, similar to [13]. We then learn to align these 3D feature grids to identify the relative transformation that would minimize misalignment in the joint 3D feature grid. + +We learn the 3D feature grid via 2D supervision (but not direct 3D supervision via voxels), while incorporating physical constraints inspired by 3D shape carving [14]. We hypothesize that forcing the representation to pass through a geometry-aware bottleneck provides a useful inductive bias. Further, the unlearned projection layers make it far easier for the network to learn an implicit 3D shape representation that can be inspected, where unstructured layers might lead to pure memorization that generalizes worse [28]. We then train an alignment network to estimate whether two views would produce an aligned 3D shape representation by training on randomly misaligned examples similar to [3, 16]. + +We evaluate novelty via generalization across different datasets. For instance, we show that our model can generalize well from ShapeNet [4] to Thingi10K [45] models, despite them looking very different as shown in Figure 1 and the supplementary material. This sidesteps difficulties involved in using object classes as a proxy for novelty [15, 44, 38]: class distinctions can be arbitrary, with some classes like motorcycles and bicycles sharing a lot of view-specific appearances. + +We demonstrate the effectiveness of our proposed approach in Section 5, and show that while standard approaches are challenged by novel objects, our approach generalizes gracefully to new datasets. Specifically, our model achieves a viewpoint estimation accuracy of $40\%$ when generalizing from ShapeNet to Thingi10K, compared to $25\%$ accuracy achieved by standard approaches. We run several analysis experiments to understand the learned representations, and find that our model also shows good across-dataset generalization on view prediction and voxel prediction; achieving an IoU score of 0.43 on ShapeNet airplanes despite being trained on Thingi10K. Overall, our experiments show that a reconstruction and alignment approach generalizes to novel objects better than discriminative approaches, and we hope that our work will spark more interest in this direction. + +# 2. Related Work + +The ability to accurately orient an object in 3D space in one of the oldest problems in computer vision [21]. Early work posed the problem as an alignment problem, specifically that of estimating "the transformation needed to map an object model from its inherent coordinate system into agreement with sensory data" [9]. This formulation was powerful as it was task agnostic as long as one had access to the 3D model. Early approaches focused on finding correspondences between images and specific model instances [2, 10, 17]. More recent approaches focused on generalizing to all instances within an object classes by using class-specific 3D key-points [31, 37, 39, 46] or deformable part models [1, 20]. While we are inspired by alignment approaches, we assume no access to a 3D model and generalize to novel object classes by learning to both reconstruct the 3D model and align images to it. + +Motivated by the success of large-scale image classification, a recent line of work focused on learning pose estimation with little or no supervision beyond image-pose pairs [8, 18, 24, 29, 30, 33, 40]. Those approaches replaced the alignment approach with fully-learned 2D feature-based models like convolutional neural networks (CNNs). Although this approach has been successful at synthetic-to-real generalization [24, 29] and within-class generalization [8, 33], it has remained unclear how successful it would be at generalizing to novel classes. While we also do not assume access to a 3D model; unlike this work, we train our model to be agnostic to object class, learn a 3D object representation, and generalize to novel classes. + +A recent line of work incorporates other losses or tasks with pose estimation such as object classification [15, 19, 20, 24], keypoint detection [31, 33, 46], and object reconstruction [12, 32, 42]. Closest to our approach are [12, 32] who jointly learn 3D reconstruction and pose prediction from unannotated images. While our work stems from the same observation that pose and shape are closely related, our goals are different. While [12, 32] are interested in learning shape and pose for a specific classes from very weak supervision, our focus is to generalize to novel classes of objects by learning from standard viewpoint supervision. + +Independent of this work, there has been a rising interest in learning more structured or meaningful intermediate representations through representational bottlenecks [20, 33, 35, 36, 43, 46]. The representational bottleneck is interpreted as providing a good inductive bias to the learning process. More relevant to us are approaches that force a 3D representational bottleneck in the form of a voxel grid [13, 32, 35, 41, 42]. While some approaches use 3D supervision, others leverage the 3D representation bottleneck to learn 3D reconstruction using only 2D supervision. We would like to emphasize that while we are inspired by this line of work, our goals are different; while those approaches + +![](images/a8775a8d9fdafb385719a409423bae0df9f63935c0026088ad948fce5c0a2371.jpg) +(a) Learning Shape + +![](images/385dcac391fce00fef7f2d9ef7b9c86bb911c598fa8da652afea4bc37e85ef3e.jpg) +(b) Learning Alignment + +![](images/0335cbac98b36bab964c6b9aa94fb7dd27d8e32d7a16fdb1053ba8de83d37f07.jpg) +(c) Inference Time +Figure 2. Approach Overview. Our approach consists of two learning stages and an inference stage. (a) We first learn to predict an object's shape from two views of the object and their relative pose. We train our Shape Network to estimate the object's appearance from a third viewpoint. (b) Using the trained Shape Network, we train a discriminator to predict the degree of misalignment between two views. (c) At inference time, we find the relative pose that would best align the two inputs. Note: Input image backgrounds are removed for clarity. + +Learned Weights + +Frozen Weights + +Projection Layer + +Features + +focused on performing accurate single- or multi-view 3D reconstruction of a known class of objects, our goal is not to reconstruct the object, but rather to use the 3D bottleneck to allow us to estimate the relative viewpoint for novel objects. + +Finally, our goal is to generalize to unseen classes. While this problem has been studied extensively in the scope of image classification (see [38] for a survey), it has not received a lot of attention for 3D tasks such as pose estimation. To the best of our knowledge, there has only been two previous approaches that tackled similar problems. Kuznetsova et al. [15] proposed a metric learning approach that performs joint classification and pose-estimation, and they leverage the learned space for zero-shot pose estimation. However, their approach only works if the novel object is similar to previously seen objects (e.g., cars to buses and bicycles to motorcycles), which limits the generalizability of their method. Tseng et al. [31] proposed a keypoint alignment approach that learns to predict 3D keypoints to align the novel class. However, they expect 3D keypoint annotation for the reference images of the novel object at test time, while we only assume a single, unannotated, reference image. + +# 3. Novel Object Viewpoint Estimation + +Our overarching goal is to build a system that understands the viewpoint of a previously unseen object using as little information about the object as possible, and ideally + +generalizes between completely unrelated objects, such as zebras to forks instead of cars to buses. The difficulty is that viewpoint is defined with respect to a coordinate frame or canonical pose (e.g., head-on for a car): without it, the problem is fundamentally undefined and any viewpoint could be the origin viewpoint. Accordingly, past work has defined the coordinate frame using keypoints [31], or generalized across semantically similar objects [15] (e.g., cars to buses). + +Rather than use a predefined coordinate frame via keypoints or semantic similarity, we propose to instead use a single image as a reference. Our goal then is, given a reference image $\mathbf{I}_1$ with viewpoint $\mathbf{v}_1$ and an image $\mathbf{I}_2$ whose viewpoint $\mathbf{v}_2$ we would like to estimate, we want to predict the relative rotation $\mathbf{R}_{\mathrm{relative}}$ such that $\mathbf{v}_2 = \mathbf{R}_{\mathrm{relative}}\mathbf{v}_1$ . This formulation maintains the essence of viewpoint estimation, while circumventing the limitations posed by requiring a canonical pose. It should be noted given the relative pose between two images and the canonical pose of the object in one image, it is trivial to calculate the canonicalized pose in the second image. + +During training, we assume we have access to image-viewpoint pairs from an arbitrary number of classes. At test time, we are presented with two images from a new class and tasked with predicting the relative viewpoint of the second image with respect to the first image. + +# 4. Approach + +The goal of this work is to build a system that can predict the relative viewpoint between two views of an object that it has never seen before. Our approach, shown in Figure 2, takes inspiration from the early formulation of pose estimation as alignment [9]. However, instead of using a 3D model, we learn to predict a 3D representation from each view that can be aligned. We first present a high-level sketch of our approach before explaining each stage in more detail. Architectural details are presented in Appendix A.1. We analyze the effectiveness of our design choices in Section 5.3. + +Approach Sketch. In the first stage, we learn shape by training our model on a view prediction task. Given two images and the relative viewpoint between them, we train our model to extract 2D features from each image and backproject them into a joint 3D feature tensor. During backprojection, we use the object's depth from each view to carve out the empty space between the viewer and the object. For an arbitrary third view, we project the 3D feature tensor into 2D, and predict either the object mask or depth in that view. In the second stage, we learn alignment by training a discriminator to predict if the extracted 3D feature tensor is well-aligned or not. At test time, we find the relative viewpoint by finding the transformation that minimizes predicted misalignment. + +# 4.1. Learning Shape + +Given two images and a relative pose, $\{I_1,I_2,\mathbf{R}_{\mathrm{relative}}\}$ we train a Shape Network to generate a 3D feature grid, $\mathcal{F}_{\mathrm{object}}\in \mathbb{R}^{F\times N\times N\times N}$ , that captures the object's shape. Since we assume that the viewer is looking straight at the object for the first image, the second viewpoint is $\mathbf{R}_{\mathrm{relative}}$ + +The Shape Network consists of a 2D CNN encoder, a differentiable back-projection layer, and a 3D UNet [22, 5]. We provide the specific architectural details in the supplementary material. The 2D encoder extracts a 2D feature map for each image that is then back-projected into a 3D voxel grid of dimension $N$ ( $N = 32$ ) using a viewpoint and a depth map. The back-projection is based on the differentiable projection layers from Kar et al. [13]. We back-project the features by projecting rays for each pixel location in the 2D feature map into the 3D grid using the appropriate viewpoint, the value for each voxel is then set via bi-linear sampling. + +Inspired by early work on space carving [14], we leverage known or estimated depth from the object to carve away the empty space in-front and around the object by setting the features in those voxels to 0. After space carving, we have two feature grid tensors, $\mathcal{F}_{\mathrm{v}_1}$ , $\mathcal{F}_{\mathrm{v}_2}$ , that capture the appearance and view of each object in the same frame of reference. + +The two feature grid tensors from each view do not see the same parts of the objects and are, essentially, hallu + +cinating the unseen parts. Therefore, we fuse them with the goal of predicting a consistent 3D representation of the object. We accomplish this by concatenating the two feature grids along the feature dimension to produce a tensor, $\mathbb{R}^{2F\times N\times N\times N}$ , and pass it into a 3D UNet. The 3D UNet's goal is to refine this representation by aligning the seen and hallucinating the unseen. + +We train the Shape Network on 2D view prediction of the object's mask or depth from a third view. This is done by projecting the 3D features to 2D using the relative viewpoint of the third view. Since we do not know the object's depth, we sample the features at multiple depth values along each ray. We use a $1 \times 1$ convolution to aggregate features for all sampled depth values for a given pixel location. This is followed by two convolutional layers and a single up-sampling layer in the middle to match the depth or mask output size. We train the network to minimize binary cross entropy from mask prediction, and $L_{1}$ loss for depth prediction. + +# 4.2. Learning Alignment + +Once we have trained a Shape Network to estimate the object's 3D feature representation, our goal for the second stage is to use the 3D representation to predict whether two images of an object are aligned or not. We generate training data by freezing the Shape Network's weights and perturbing its input relative viewpoint by a random rotation. We then train a discriminator to predict the magnitude of that perturbation. Our intuition is that while determining the relative viewpoint between two objects might be difficult, misalignment is much easier to detect as it produces inconsistent object shapes, with the degree of inconsistency being a measure of how misaligned the images were. + +We implement the discriminator as a 3D CNN. Our network architecture consists of two 3D inception modules followed by two fully-connected layers. We adapt the inception module [26] to 3D by expanding the kernels along the depth dimension. We use the inception module as it allows the network to detect features at multiple scales which would be useful when detecting inconsistencies. + +We train the discriminator to predict the perturbation direction (Euler angles) and magnitude (geodesic distance). We randomly perturbed the relative viewpoint of two thirds of our instances by at least 10 degrees. We train the network using an $L_{2}$ loss for all 4 outputs. + +# 4.3. Relative Viewpoint Estimation + +Given a trained Shape Network and a discriminator, the relative viewpoint is the viewpoint that will minimize predicted misalignment. This problem could be solved as an optimization problem or via a greedy search. In this work, we uniformly sample viewpoints and output the viewpoint that minimized the discriminator's predicted perturbation magnitude. + +![](images/1793b2b058dd773c616a2acb4727b5839edd68449d7f4529bedec44a77b8d849.jpg) +Figure 3. Mask Prediction on Thingi10k. Given two images, our models learn to predict the mask for a third view. The first two columns present two input views, while the third column is the view for which the mask is being predicted. The masks shown are predicted by a model which is trained on a different dataset; ShapeNet. We can accurately predict the 3D model's projection from a novel viewpoint despite being trained on a very different set of shapes. + +# 5. Experiments + +We now empirically evaluate our model's performance on relative viewpoint estimation, as well as report additional experiments that analyze the different components of the model. Our experiments aim to answer two questions: (1) how well our proposed approach works, especially in the case of generalization to novel objects; and (2) how the method works and whether it has indeed learned to solve the task by using 3D representations. + +We address the first question by evaluating the model's ability to generalize across datasets for both viewpoint estimation (Section 5.1) and view prediction (Section 5.2). Cross-dataset generalization gives us a good proxy for how the model would perform on novel objects since ShapeNet and Thingi10K models look drastically different. + +We address the second question by evaluating our model's ability to learn shape through view prediction (Section 5.2) and voxel prediction (Section 5.4). We also run several ablations to better understand the significance of different model components (Section 5.3). + +Datasets. We use three datasets: ShapeNet, Pix3D, and Thingi10K. While ShapeNet and Pix3D are fairly uniform in terms of their models' types and appearances, Thingi10K models vary greatly in terms of their size, appearance, and geometric properties. Thingi10K [45] consists of $10K$ models created for 3D printing. The lack of strong patterns or prototypical shapes makes Thingi10K very chal + +lenging for both pose estimation and reconstruction methods, and an excellent test dataset for our task. Alternatively, ShapeNet's large size (55 categories and $\sim 57K$ models) makes it a great training set, while allowing us to evaluate our approach on models from the same class. Finally, Pix3D [25] is a smaller dataset, consisting of 395 3D models of 9 categories of furniture. The smaller number of models and domain-specificity of Pix3D provide an interesting comparison against the larger variance in object categories in ShapeNet and object shapes in Thingi10K. + +Data Sampling. We choose our poses by uniformly sampling around a viewing sphere. With models centered around the origin, the pose transformation is simply the inverse of the viewpoint transformation. This deviates from previous work which sampled according to consumer photos' distributions to promote better synthetic to real generalization [24]. + +After excluding models with missing or corrupted 3D model files, we end up with 55,281 ShapeNet models, 390 Pix3D models, and 9994 Thingi10K models. For ShapeNet and Thingi10K, we sample 20 different poses per object, while we sample 200 views for Pix3D. We do so to mitigate the large difference between the numbers of models in those datasets. We randomly split our datasets by models to ensure that each of the splits has a disjoint set of models. We use $80\% / 10\% / 10\%$ of the data as our training, validation, and test splits. + +Table 1. Relative Viewpoint Estimation Performance. We evaluate our model on its ability to perform within- and across-dataset generalization. The letters represent the initial letter of each dataset: ShapeNet, Pix3D, and Thingi10k. Each column represents different train/test settings $S \rightarrow T$ is training on ShapeNet and testing on Thingi10k. We find that our model is able to generalize across datasets, while previous approaches demonstrate a clear bias towards their training distributions. + +
S → SP → PT → TS → PS → TP → T
Accπ/6MedErrAccπ/6MedErrAccπ/6MedErrAccπ/6MedErrAccπ/6MedErrAccπ/6MedErr
Stat. Prior4.15114.714.13115.014.33114.414.13115.014.33114.414.33114.41
RPNet60.2344.3268.9332.6120.8291.4366.4246.0725.0091.8514.43111.80
ConvAE50.4952.6551.9656.3615.35100.5648.6346.788.65116.113.55129.29
Ours47.5766.0458.0846.0241.2561.9660.6743.4740.1270.0833.0096.82
+ +# 5.1. Viewpoint Estimation + +We first evaluate how well our system performs on viewpoint estimation, our primary task. Our aim here is to evaluate how well the system performs, especially when generalizing from one dataset to another. + +Experimental Setup. We evaluate pose estimation performance based on the geodesic distance between the predicted and ground-truth pose as was done in previous work [24, 33]. Given two rotation matrices, the geodesic distance provides the magnitude of the transformation between those two rotation matrices. Following [11], we calculate geodesic distance as $D(R_{gt}, R_{pr}) = ||\log \mathbf{R}_{gt}\mathbf{R}_{pr}^{\top}||$ . Following [24, 33], we report the median geodesic distance and the percentage of viewpoints under threshold $\pi / 6$ . + +Baselines. We compare our models performance to several baselines. For all our baselines, we use binned Euler angles to represent rotation and train the models using a cross-entropy loss. + +Statistical Prior. We find the mode pose for the validation and use it on testing. Since we uniformly sampled the viewpoints, we find that this baseline is very weak and corresponds to a random baselines. + +RPNet. En et al. [7] proposed a Siamese-network to perform relative camera pose estimation. As reported by the authors, we find that for more difficult datasets, it is better to train each network separately on absolute viewpoint and then calculate the relative viewpoint explicitly. We used binned Euler angles instead of quaternions as we found that they perform better. Furthermore, we provide their network with RGB-D input to provide a fair comparison to our method's use of depth-based space carving. + +Convolutional Autoencoder (ConvAE). Given that our model learns both reconstruction and pose estimation, we trained a convolutional autoencoder on both tasks. We initially used UNets [22] due to their success in image translation tasks, but found that removing the skip connections improved the viewpoint estimation performance. Viewpoint is estimated on the encoded features using a 3-layer CNN. Like RPNet, we found that training on absolute viewpoint improved performance. + +Results. We find that directly estimating viewpoint scales poorly do datasets like Thingi10K. As shown in Figure 3, Thingi10K models exhibit very high variability which makes them challenging for a model that maps 2D patterns directly to a pose as seen by in Table 1. By contrast, our model is able to leverage this high variability in the data as it allows it to learn better reconstruction features. This is evident by the large performance gain that our model on Thingi10K; both when training and testing on it, or when transferring to it from another dataset. + +On the other hand, we find that if there is limited difference between training and testing (e.g., training and testing on ShapeNet), directly estimating viewpoint does well. Interestingly, we find that in this domain, training on more data with higher variance improves performance as seen with training on ShapeNet and evaluating on Pix3D, especially since all of Pix3D's classes exist in ShapeNet. This pattern is shown both for the direct pose models as well as our approach. Another interesting finding is that joint reconstruction and pose estimation do not explain our models performance as shown by the convolutional autoencoder baseline. It appears that the additional reconstruction task burdens the network as opposed to providing it with an additional learning signal. + +We note that RPNet is representative of current end-to-end discriminative viewpoint-estimation models as they generally follow the structure of a CNN backbone and FC layers to predict viewpoint [18, 24, 30, 33, 40]. As a result, the comparison to RPNet represents a more general comparison against problems that frame viewpoint estimation as a discriminative task. + +Furthermore, recent approaches proposed jointly learning reconstruction and pose estimation, where the network learns to predict pose in an emergent coordinate frame [12, 32]. While those models are trained to minimize a reconstruction error, they are still using a CNN to directly estimate the pose with respect to a class-specific, emergent canonical pose. Hence, they face the same challenges as RPNet. Additionally, those approaches can perform better when given ground-truth pose, which we provide to RPNet. + +Table 2. 2D Reconstruction Cross-dataset Generalization Experiment. The rows show the training dataset, while the columns present the test dataset. We find that our model can easily generalize across datasets, with very minor performance drops. This supports our claim that our model is learning a generalizable representation of shape, as opposed to memorizing the shapes available within each dataset. + +
ShapeNetPix3DThingi10k
MaskDepthMaskDepthMaskDepth
IoUF1LogRMSEδ1.25IoUF1LogRMSEδ1.25IoUF1LogRMSEδ1.25
ShapeNet0.830.900.530.660.800.880.630.600.820.900.350.84
Pix3D0.780.870.530.740.790.880.590.740.790.870.340.90
Thingi10k0.760.850.690.700.730.840.810.630.850.910.300.88
+ +# 5.2. 2D Reconstruction + +We now analyze our Shape Network's ability to represent shape, as well as how well that ability generalizes to novel objects. Specifically, we evaluate the Shape Network's ability to predict the object's mask or depth from an unseen viewpoint. Note that our model is trained on either depth or mask prediction. Hence, the depth and mask results are shown for models trained on the respective task. Similar to the previous experiment, we are interested in the model's ability to generalize to unseen classes. We emphasize that we have a disjoint set of training and testing models, hence, the testing performance on the same dataset evaluates class-specific generalization, while testing across datasets evaluates generalization to unseen classes. + +Experimental Setup. We train and test the performance on the 9 pairwise dataset pairs for ShapeNet, Pix3D, and Thingi10K. We evaluate mask reconstructions using IoU at a threshold of 0.5 as well as a pixel-level F1 score. Following [6], we evaluate depth estimation using log root mean-square-error and threshold accuracy, $\delta_{1.25}$ . For a depth prediction, $y$ , threshold accuracy is calculated as the percentage of pixels, $y_i$ , s.t. $\max \left(\frac{y_i}{y_i^{gt}}, \frac{y_i^{gt}}{y_i}\right) < 1.25$ . + +Results. We find that our model achieves high performance for mask prediction across all the datasets as shown in Table 2. More importantly, we find that there is very little variance between the model's performance across datasets. This demonstrates our model's ability to learn to represent 3D shape in a generalizable way. This is in stark contrast to recent findings from reconstruction that find that 3D reconstruction approaches will often memorize some of the training models [28]. We hypothesize that our model is less susceptible to memorization due to (a) the geometry-aware bottleneck and (b) the lack of a shared canonical pose across class instances. The geometry-aware bottle neck forces the model to learn to represent its input in 3D. Furthermore, by removing the canonical pose assumption, the model can no longer rely on specific locations in the tensor having a consistent representation (e.g., airplane wings always being on the side). As a result, the model is forced to represent the specific input, as opposed to just classifying it. + +Table 3. Ablation Study. We ablate our model by removing two key components in the 3D and analyzing the effect on 2D reconstruction and relative viewpoint estimation. + +
S → SS → T
Accπ/6MedErrIoUAccπ/6MedErrIoU
Ours47.5766.040.8340.1270.080.82
- carving6.38134.230.644.21130.140.63
- refine47.5759.760.6342.1654.030.64
+ +Of course, like any learned approach, our model is still affected by the quality of the training data. We observe that, in general, the best performing model on a dataset is the one trained on that dataset with two interesting exceptions. The first exception is that for mask prediction, ShapeNet does very well on Pix3D. This is likely due to the degree of class overlap between ShapeNet and Pix3D, as well as the additional variety of models seen in ShapeNet. The second exception is that Pix3D trained model tends to do better on depth prediction. While it is not clear why this would happen, one potential explanation is that the planarity of most furniture might provide a good scaffolding for the networks to learn better depth, while other datasets provide too much variance for the network to learn good representations. + +# 5.3. Ablations + +We perform an ablation study to better understand the model's performance and failure modes. In particular, we ablate two central elements of our model: 3D refinement and space carving. We train our ablated models on ShapeNet and evaluate them on both ShapeNet and Thingi10K. We follow the same training procedure as before. The results are shown in Table 3. + +Space Carving. We find that removing space carving is extremely detrimental to the model. The model's 2D reconstruction performance suffers, while the viewpoint performance is reducing to random guessing. Space carving appears to greatly boost our performance by providing a class and model agnostic benefit. Given two projected views, space carving provides a high degree of certainty to the model regarding which voxels can be ignored, and hence, greatly improves the alignment. The uncertainty about the object's extent appears to stifle its ability to align views. + +![](images/67e2b94c9efe6962afc45db01e41d6798135c10db3e00d8399305e346c8a90ff.jpg) +Figure 4. Features To Voxels. Our model can accurately predict occupancy without being trained using voxels or for voxel prediction. We present 3 success cases (IoU $>0.7$ ; in blue) and 3 failure cases of our model (IoU $<0.1$ ; in red), with our prediction on the left and the ground-truth on the right. We observe that our failure cases tend to arise from failure to complete an occluded part or registering the part at an incorrect location, which would be expected from a model that has never seen a plane before. + +3D Refinement. We observe that removing the 3D refinement network also greatly deteriorates the reconstruction performance. However, unlike space carving, removing it actually boosts the viewpoint performance. This is likely caused by the network hallucination of features (in order to complete the object), which in turn is mixed with the non-hallucinated features, which may hamper alignment. + +# 5.4. Features to Voxels + +Given that the model learns to project to and from a voxel grid, we expect that the features of this grid can capture occupancy despite never having been trained on 3D information. While we do not ever directly extract an occupancy grid during training, we find that we can adapt one of the layers in the network to generate it. Specifically, while training the Shape Network, we add a multi-view consistency loss [32, 34]. In particular, Tulsiani et al. [32] propose a loss that samples different points along projected rays to detect ray termination events. We extend their formulation to a feature grid by defining a linear layer that maps the ray-sampled features to a permeability score. Since the permeability layer maps each feature vector to a ray termination probability, it correlates with the occupancy likelihood. Hence, we apply it to the feature tensor output from the Shape Network to generate an occupancy grid. We note that removing this loss does not significantly change our viewpoint estimation or 2D reconstruction performance. + +We train our model on Thingi10K and evaluate it on the airplane class of ShapeNet. We would like to emphasize that Thingi10K does not include an airplane class, so we are evaluating on unseen objects. We use the voxel grids + +provided by ShapeNet, but we center and resize them to fit a voxel grid of dimension 32. We evaluate the quality of our rendering by calculating the intersection over union (IoU) of the occupancy grids. We pick the threshold based on the validation set. + +Since our embedding is in a viewer-centric frame of reference, we rotate it back to the canonical frame before computing IoU. Our model achieves a mean IoU of 0.43 with $98\%$ of the samples having an IoU at least 0.25. We note that this is calculated on the direct embedding dimension without performing any registration or scaling to better match ShapeNet 3D models. We visualize several success and failure cases in Figure 4. + +# 6. Conclusion + +In this paper, we present a reconstruction and alignment approach for novel object viewpoint prediction. We observe that previous viewpoint prediction approaches have either relied on large amounts of class-specific, canonically-oriented data or on having a 3D model for alignment. However, those two assumptions do not apply when dealing with a novel object. Our key insight is that while we may not have access to a 3D model, we can learn a deep network that estimates the object's shape in the viewer's frame of reference, and use a reference view to determine the viewpoint with respect to other views of the object. To this end, we propose learning two networks: the first network uses a 3D feature bottleneck to represent objects in 3D; the second network learns whether or not two views are aligned. + +We evaluate our approach on several datasets. We find that our approach significantly outperforms standard viewpoint estimation approaches when there is a large domain shift between the train and test models, or when the training models themselves have high variance. Furthermore, we find that we can extract 3D occupancy grids despite not training using 3D supervision. This provides ample evidence that our models can generalize to unseen objects. + +Our current models greatly rely on the depth input to accurately reconstruct the object. While the 2.5D input might be needed to understand the 3D structure of a novel object, we would like to explore ways of minimizing this reliance in future work. Furthermore, we would like to explore optimization approaches that would allow us to converge to the best viewpoint instead searching over a set of predetermined viewpoints. + +Acknowledgments We would like to thank the reviewers and area chairs for their valuable comments and suggestions, and the members of the UM AI Lab for many helpful discussions. Toyota Research Institute ("TRI") provided funds to assist the authors with their research but this article solely reflects the opinions and conclusions of its authors and not TRI or any other Toyota entity. + +# References + +[1] Alexander C Berg, Tamara L Berg, and Jitendra Malik. Shape matching and object recognition using low distortion correspondences. In CVPR, 2005. +[2] Rodney A Brooks. Symbolic reasoning among 3-d models and 2-d images. Artificial intelligence, 17, 1981. +[3] Joao Carreira, Pulkit Agrawal, Katerina Fragkiadaki, and Jitendra Malik. Human pose estimation with iterative error feedback. In CVPR, 2016. +[4] Angel X. Chang, Thomas Funkhouser, Leonidas Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, Jianxiong Xiao, Li Yi, and Fisher Yu. ShapeNet: An Information-Rich 3D Model Repository. Technical Report arXiv:1512.03012 [cs.GR], Stanford University — Princeton University — Toyota Technological Institute at Chicago, 2015. +[5] Ö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 Proceedings of the International Conference on Medical Image Computing and Computer-Assisted Intervention, 2016. +[6] David Eigen, Christian Puhrsch, and Rob Fergus. Depth map prediction from a single image using a multi-scale deep network. In NeurIPS, 2014. +[7] Sovann En, Alexis Lechery, and Frédéric Jurie. Rpnet: an end-to-end network for relative camera pose estimation. In ECCV, 2018. +[8] Amir Ghodrati, Marco Pedersoli, and Tinne Tuytelaars. Is 2d information enough for viewpoint estimation? In BMVC, 2014. +[9] William Eric Leifur Grimson and Daniel P Huttenlocher. Object recognition by computer: the role of geometric constraints. MIT Press, 1990. +[10] Daniel P Huttenlocher and Shimon Ullman. Recognizing solid objects by alignment with an image. International Journal of Computer Vision, 5(2), 1990. +[11] Du Q Huynh. Metrics for 3d rotations: Comparison and analysis. Journal of Mathematical Imaging and Vision, 35(2):155-164, 2009. +[12] Eldar Insafutdinov and Alexey Dosovitskiy. Unsupervised learning of shape and pose with differentiable point clouds. In NeurIPS, 2018. +[13] Abhishek Kar, Christian Hane, and Jitendra Malik. Learning a multi-view stereo machine. In NeurIPS, 2017. +[14] Kiriakos N Kutulakos and Steven M Seitz. A theory of shape by space carving. International Journal of Computer Vision, 2000. +[15] Alina Kuznetsova, Sung Ju Hwang, Bodo Rosenhahn, and Leonid Sigal. Exploiting view-specific appearance similarities across classes for zero-shot pose prediction: a metric learning approach. In AAAI, 2016. +[16] Ke Li, Bharath Hariharan, and Jitendra Malik. Iterative instance segmentation. In CVPR, 2016. +[17] David G Lowe. Three-dimensional object recognition from single two-dimensional images. Artificial intelligence, 1987. + +[18] Siddharth Mahendran, Haider Ali, and René Vidal. 3d pose regression using convolutional neural networks. In ICCV, 2017. +[19] Xingchao Peng, Baochen Sun, Karim Ali, and Kate Saenko. Learning deep object detectors from 3d models. In ICCV, 2015. +[20] Bojan Pepik, Peter Gehler, Michael Stark, and Bernt Schiele. 3d 2 pm-3d deformable part models. In ECCV, 2012. +[21] Lawrence Roberts. Machine Perception of 3D Solids. PhD thesis, Massachusetts Institute of Technology, 1965. +[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, 2015. +[23] Roger N Shepard and Jacqueline Metzler. Mental rotation of three-dimensional objects. Science, 1971. +[24] Hao Su, Charles R. Qi, Yangyan Li, and Leonidas J. Guibas. Render for cnn: Viewpoint estimation in images using cnns trained with rendered 3d model views. In ICCV, 2015. +[25] Xingyuan Sun, Jiajun Wu, Xiuming Zhang, Zhoutong Zhang, Chengkai Zhang, Tianfan Xue, Joshua B Tenenbaum, and William T Freeman. Pix3d: Dataset and methods for single-image 3d shape modeling. In CVPR, 2018. +[26] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, 2015. +[27] Michael J Tarr and Heinrich H Bülthoff. Image-based object recognition in man, monkey and machine. Cognition, 67, 1998. +[28] Maxim Tatarchenko, Stephan R Richter, René Ranftl, Zhuwen Li, Vladlen Koltun, and Thomas Brox. What do single-view 3d reconstruction networks learn? In CVPR, 2019. +[29] Jonathan Tremblay, Thang To, and Stan Birchfield. Falling things: A synthetic dataset for 3d object detection and pose estimation. In CVPR Workshops, 2018. +[30] Jonathan Tremblay, Thang To, Balakumar Sundaralingam, Yu Xiang, Dieter Fox, and Stan Birchfield. Deep object pose estimation for semantic robotic grasping of household objects. In CoRL, 2018. +[31] Hung-Yu Tseng, Shalini De Mello, Jonathan Tremblay, Sifei Liu, Stan Birchfield, Ming-Hsuan Yang, and Jan Kautz. Few-shot viewpoint estimation. In BMVC, 2019. +[32] Shubham Tulsiani, Alexei A. Efros, and Jitendra Malik. Multi-view consistency as supervisory signal for learning shape and pose prediction. In CVPR, 2018. +[33] Shubham Tulsiani and Jitendra Malik. Viewpoints and keypoints. In CVPR, 2015. +[34] Shubham Tulsiani, Tinghui Zhou, Alexei A. Efros, and Jitendra Malik. Multi-view supervision for single-view reconstruction via differentiable ray consistency. In CVPR, 2017. +[35] Hsiao-Yu Fish Tung, Ricson Cheng, and Katerina Fragkiadaki. Learning spatial common sense with geometry-aware recurrent networks. In CVPR, 2019. +[36] Jiajun Wu, Yifan Wang, Tianfan Xue, Xingyuan Sun, Bill Freeman, and Josh Tenenbaum. Marrnet: 3d shape reconstruction via 2.5d sketches. In NeurIPS, 2017. + +[37] Jiajun Wu, Tianfan Xue, Joseph J Lim, Yuandong Tian, Joshua B Tenenbaum, Antonio Torralba, and William T Freeman. Single image 3d interpreter network. In ECCV, 2016. +[38] Yongqin Xian, Bernt Schiele, and Zeynep Akata. Zero-shot learning-the good, the bad and the ugly. In CVPR, 2017. +[39] Yu Xiang, Roozbeh Mottaghi, and Silvio Savarese. Beyond Pascal: A benchmark for 3d object detection in the wild. In WACV, 2014. +[40] Yu Xiang, Tanner Schmidt, Venkatraman Narayanan, and Dieter Fox. PoseCNN: A convolutional neural network for 6d object pose estimation in cluttered scenes. In RSS, 2018. +[41] Xinchen Yan, Jasmined Hsu, Mohammad Khansari, Yunfei Bai, Arkanath Pathak, Abhinav Gupta, James Davidson, and Honglak Lee. Learning 6-dof grasping interaction via deep geometry-aware 3d representations. In ICRA, 2018. +[42] Xinchen Yan, Jimei Yang, Ersin Yumer, Yijie Guo, and Honglak Lee. Perspective transformer nets: Learning single-view 3d object reconstruction without 3d supervision. In NeurIPS, 2016. +[43] Jimei Yang, Scott E Reed, Ming-Hsuan Yang, and Honglak Lee. Weakly-supervised disentangling with recurrent transformations for 3d view synthesis. In Advances in Neural Information Processing Systems, pages 1099-1107, 2015. +[44] Xiuming Zhang, Zhoutong Zhang, Chengkai Zhang, Joshua B Tenenbaum, William T Freeman, and Jiajun Wu. Learning to Reconstruct Shapes from Unseen Classes. In NeurIPS, 2018. +[45] Qingnan Zhou and Alec Jacobson. Thingi10k: A dataset of 10,000 3d-printing models. arXiv preprint arXiv:1605.04797, 2016. +[46] Xingyi Zhou, Arjun Karpur, Linjie Luo, and Qixing Huang. Starmap for category-agnostic keypoint and viewpoint estimation. In ECCV, 2018. \ No newline at end of file diff --git a/novelobjectviewpointestimationthroughreconstructionalignment/images.zip b/novelobjectviewpointestimationthroughreconstructionalignment/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..fd1caaf26fccf5844ec4ad493849aa9f0d795805 --- /dev/null +++ b/novelobjectviewpointestimationthroughreconstructionalignment/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fd56ee2dec3de8e463ad8355cc428f9b32c94797d5576069f9abed3c31dbd91 +size 375642 diff --git a/novelobjectviewpointestimationthroughreconstructionalignment/layout.json b/novelobjectviewpointestimationthroughreconstructionalignment/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2ee16938d51727acb452052bed32643a01dc0a69 --- /dev/null +++ b/novelobjectviewpointestimationthroughreconstructionalignment/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e9dae5cf69901f7fd4c5dfef910e4d0089b12988c119cfb3a28db5cb7fc9ab7 +size 284491 diff --git a/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/c72ce831-d81b-439a-8dcb-a6520e3b45cb_content_list.json b/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/c72ce831-d81b-439a-8dcb-a6520e3b45cb_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2df3d0a07a575574e19b8fb362c2878ab297661b --- /dev/null +++ b/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/c72ce831-d81b-439a-8dcb-a6520e3b45cb_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63c734ac10db74a3db2fda1f8499c081241cd8cad74abfa57c4bda0774d5fc7b +size 77390 diff --git a/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/c72ce831-d81b-439a-8dcb-a6520e3b45cb_model.json b/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/c72ce831-d81b-439a-8dcb-a6520e3b45cb_model.json new file mode 100644 index 0000000000000000000000000000000000000000..cc839ded127c01ba277413931b2f499227cb20a1 --- /dev/null +++ b/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/c72ce831-d81b-439a-8dcb-a6520e3b45cb_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4b1b1cd0389e250560fb06de4368d8d9f5b2e63b48692c6ff4fc4ed33193d2b +size 98303 diff --git a/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/c72ce831-d81b-439a-8dcb-a6520e3b45cb_origin.pdf b/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/c72ce831-d81b-439a-8dcb-a6520e3b45cb_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..dba6b2c1f54acde4dc1e9c2247b888de3c3a79a7 --- /dev/null +++ b/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/c72ce831-d81b-439a-8dcb-a6520e3b45cb_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1694585d2517503b93ddabc722550924aa8dfa1beda8b6fb3489b5a854c363e7 +size 3472968 diff --git a/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/full.md b/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ff0c663c0ec8bbe42a5f23695aea0544e0341559 --- /dev/null +++ b/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/full.md @@ -0,0 +1,350 @@ +# Novel View Synthesis of Dynamic Scenes with Globally Coherent Depths from a Monocular Camera + +Jae Shin Yoon† + +Kihwan Kim + +Orazio Gallo + +Hyun Soo Park† + +Jan Kautz# + +†University of Minnesota + +NVIDIA + +![](images/1c46f53076e55c58b9df267558c9e9413cbe6a95ec0b87ca5bd396bed70cbb7e.jpg) +Figure 1: Dynamic Scene View Synthesis: (Left) A dynamic scene is captured from a monocular camera from the locations $\mathbf{V}_0$ to $\mathbf{V}_k$ . Each image captures people jumping at each time step ( $\mathbf{t} = 0$ to $\mathbf{t} = k$ ). (Middle) A novel view from an arbitrary location between $\mathbf{V}_0$ and $\mathbf{V}_1$ (denoted as an orange frame) is synthesized with the dynamic contents observed at the time $\mathbf{t} = k$ . The estimated depth at $\mathbf{V}_k$ is shown in the inset. (Right) For the novel view (orange frame), we can also synthesize the dynamic content that appeared across any views in different time (traces of the foreground in each time step are shown). More results are shown in Sec. 5 and the supplementary document and video. + +![](images/ccc90e8e7d74405a2152a92a08f06e200ba44acc8ce50311107283cd9b1ad421.jpg) + +![](images/b10a72ca8250d38c83cce04debc6329729c9a71095913e120ff121917387b34c.jpg) + +# Abstract + +This paper presents a new method to synthesize an image from arbitrary views and times given a collection of images of a dynamic scene. A key challenge for the novel view synthesis arises from dynamic scene reconstruction where epipolar geometry does not apply to the local motion of dynamic contents. To address this challenge, we propose to combine the depth from single view (DSV) and the depth from multi-view stereo (DMV), where DSV is complete, i.e., a depth is assigned to every pixel, yet view-variant in its scale, while DMV is view-invariant yet incomplete. Our insight is that although its scale and quality are inconsistent with other views, the depth estimation from a single view can be used to reason about the globally coherent geometry of dynamic contents. We cast this problem as learning to correct the scale of DSV, and to refine each depth with locally consistent motions between views to form a coherent depth estimation. We integrate these tasks into a depth fusion network in a self-supervised fashion. Given the fused depth maps, we synthesize a photorealistic virtual view in a specific location and time with our deep blending network that completes the scene and renders the virtual view. We evaluate our method of depth estimation and view synthesis on diverse real-world dynamic scenes and show the outstanding performance over existing methods. + +# 1. Introduction + +Novel view synthesis [8] is one of the core tasks in computer vision and graphics, and has been used for many visual effects and content creation applications such as cinematograph [4, 26], video stabilization [28, 21], and bullet time visual effect [60]. In this paper, we focus on view synthesis of dynamic scenes observed from a moving monocular camera as shown in Figure 1. Until now, most of existing view synthesis methods are largely limited to static scenes [8, 60, 9, 11, 56, 59] because they commonly rely on geometric assumptions: in principle, dynamic visual content such as people, pets, and vehicles are considered outliers despite being a major focus in videography on social media and otherwise. + +Our problem shares the challenge of dynamic scene reconstruction: recovering the underlying 3D geometry of dynamic contents from a moving monocular camera is fundamentally ill-posed [33]. We address this challenge by leveraging the following complementary visual and motion cues. (1) Multi-view images can be combined to reconstruct incomplete yet view-invariant static scene geometry1, which enables synthesizing a novel view image of static contents in a geometrically consistent way. +(2) Relative depth predicted from a single image provides view-variant [6] yet complete dynamic scene geometry, which allows enforcing locally consistent 3D scene flow for the foreground dynamic contents. + +![](images/f1055599b9c5a5e63d1e7c12c9ff2947ad64b08c04f3d559fd601befe22cc31e.jpg) +Figure 2: Images of a dynamic scene are used to predict and estimate the depth from single view (DSV) and the depth from multiview stereo (DMV). Our depth fusion network (DFNet) fuses the individual strengths of DSV and DMV (Sec. 3.1) to produce a complete and view-invariant depth by enforcing geometric consistency. The computed depth is used to synthesize a novel view and our DeepBlnder network refines the synthesized image (Sec. 3.2). + +We combine these cues by learning a nonlinear scale correction function that can upgrade a time series of single view geometries to form a coherent 4D reconstruction. To disambiguate the geometry of the foreground dynamic contents, we find their simplest motion description in 3D (i.e., slow and smooth motion [49, 40]), which generates minimal stereoscopic disparity when seen by a novel view [5]. + +We model the scale correction function using a depth fusion network that takes input images, view-variant depth from single view (DSV), and incomplete yet view-invariant depth from a multi-view stereo (DMV) algorithm, and outputs complete and view-invariant depth. The network is self-supervised by three visual signals: (i) the static regions of the DSV must be aligned with a DMV; (ii) the output depth of dynamic regions must be consistent with the relative depth of each DSV; and (iii) the estimated scene flow must be minimal and locally consistent. With the predicted depths that are geometrically consistent across views, we synthesize a novel view using a self-supervised rendering network that produces a photorealistic image in the presence of missing data with adversarial training. An overview of our pipeline is shown in Figure 2. + +We show that the novel view synthesis with our depth prediction method is highly effective in generating an unseen image. Further, the rendering network seamlessly blends foreground and background, which outperforms existing synthesis approaches quantitatively and qualitatively. + +Our key contributions are as follows: + +- A novel depth fusion network that models a scale correction function, which completes the depth maps of view-invariant dynamic scene geometry with locally consistent motions. +- A rendering network that combines foreground and background regions in a photorealistic way using adversarial training. +- A real-world dataset captured by fixed baseline multiview videos and corresponding benchmark examples for dynamic scene view synthesis. + +# 2. Related Work + +For the view synthesis of a dynamic scene from images with baselines, the depth and foreground motion from each view need to be consistent across the views. Here we review view synthesis, depth estimation, and scene reconstruction techniques, and discuss the relations to our method. + +Novel View Synthesis The problem of novel view synthesis is strongly tied to multiview 3D reconstruction as it requires transporting pixels across views through the geometry of scenes. For a static scene, multiview geometry [15] applies, which allows triangulating correspondences given the calibrated cameras. This leads to dense reconstruction (multiview stereo [14]), which allows continuous view synthesis using a finite number of images [13]. In principle, the triangulation requires a correspondence from at least two views. This requirement often cannot be met in particular for occluded regions, which results in an incomplete view synthesis. Such issue escalates as the baseline between images increases. Various scene priors have been used to mitigate this issue. A scene that can be expressed as a set of planar surfaces can be reconstructed even with a single view image [45, 27], and a scene with known object categories can be reconstructed with the shape priors [16]. For dynamic scene view synthesis, synchronized multiple cameras are used where the same geometric principle can be applied [60, 29, 18]. Recently, single view depth prediction that is learned from a large image repository is used to complete the scene geometry [37, 25, 23], and even enables to extrapolate the views beyond the range of camera motion [46, 9]. More recent approach, which predicts the depth from single view with human specific priors, realizes the view synthesis of dynamic scene of moving people from a monocular camera [24]. Our approach is inspired by learning based scene completion [12, 37, 59, 24] while applying to a dynamic scene with geometric consistency without any category-specific priors. + +Monocular Dynamic Scene Reconstruction Dynamic scene reconstruction using a moving monocular camera, without a prior assumption of scenes, is very challenging and ill-posed, similar to reconstructing a scene with a single view image. For a temporal prior, trajectory triangulation extends the concept of point triangulation by representing scene trajectories using a family of algebraic groups, e.g., line/conic [3], homography tensors on the plane [44, 51], polynomials [19], and discrete cosine transform basis [1, 33]. For spatial prior, a shape can be expressed by a linear combination of compact shape basis vectors [7], which is highly effective to describe constrained deformation such as face. A key challenge is learning shape basis vectors for unknown objects, which requires additional spatial priors such as orthogonality of basis vectors [53], temporal smoothness [48, 32, 49], articulation constraint using joint subspace [54], local piecewise rigid- + +![](images/a39df7b644a794cd3be5366552aa1c1eab83e154df2b8c86edea2ab485add5f3.jpg) +Figure 3: Depth Fusion Network (DFNet) predicts a complete and view-invariant depth map by fusing DSV and DMV with the image. DFNet is self-supervised by minimizing the background depth consistency with DMV $(L_{g})$ , the relative depth consistency with DSV $(L_{l})$ , 3D scene flow $(L_{s})$ , and spatial irregularity $(L_{e})$ . + +ity [10], and learning from training data [20]. For completeness, image regions are reconstructed independently using shape basis [41] or local patches [22], which can be stitched together to form complete scene reconstruction. Further, the spatial and temporal priors can be combined to produce dense correspondences, resulting in complete 4D reconstruction [17]. Humans are a special case of spatial constraints, which allow markerless motion capture from a monocular camera [52, 35, 2]. Unlike the explicit spatial priors, our work makes use of general geometric priors and motion constraint to reconstruct a complete and view-invariant geometry of general dynamic scenes, which allows us to generate realistic spatio-temporal view synthesis. + +# 3. Approach + +We cast the novel view synthesis problem as image warping from input source views to a virtual view using underlying 4D reconstruction, i.e., + +$$ +\mathbf {J} ^ {v} \left(W _ {r \rightarrow v} (\mathbf {x})\right) = \mathbf {I} ^ {r} (\mathbf {x}), \tag {1} +$$ + +where $\mathbf{J}^v$ is the synthesized image from an arbitrary virtual view $v$ ( $v$ can be a source viewpoint), $W_{r\rightarrow v}$ is a warping function, and $\mathbf{I}^r$ is the $r^{\mathrm{th}}$ source image. + +For view synthesis of static scene, the warping function can be described as: + +$$ +\mathbf {y} = W _ {r \rightarrow v} (\mathbf {x}; \mathbf {D} ^ {r}, \Pi^ {r}, \Pi^ {v}), \tag {2} +$$ + +where $\Pi^r$ and $\Pi^v$ are the projection matrices at the $r^{\mathrm{th}}$ and $v^{\mathrm{th}}$ viewpoints. The warping function forms the warped coordinates $\mathbf{y}$ by reconstructing the view-invariant 3D geometry using the depth $(\mathbf{D}^r)$ and projection matrix at the + +$r^{\mathrm{th}}$ viewpoint, and projecting onto the $v^{\mathrm{th}}$ viewpoint. For instance, this warping function can generate the $i^{\mathrm{th}}$ source image from the $j^{\mathrm{th}}$ source image, i.e., $\mathbf{I}^i (W_{j\rightarrow i}) = \mathbf{I}^j$ + +For view synthesis of dynamic scene, the warping function can be generalized to include the time-varying geometry using the depth $\mathbf{D}^{r_t}$ , i.e., + +$$ +\mathbf {y} = W _ {r _ {t} \rightarrow v} (\mathbf {x}; \mathbf {D} ^ {r _ {t}}, \Pi^ {r}, \Pi^ {v}), \tag {3} +$$ + +where $r_t$ is the time dependent view index, and $t$ is the time instant. Note that for a moving monocular camera, the view is a function of time. Unlike the static scene warping $W_{r \to v}$ in Eq. (2), we cannot synthesize $i^{\mathrm{th}}$ source image from the $j^{\mathrm{th}}$ source image because of the time-varying geometry $\mathbf{D}^{r_t}$ , i.e., $\mathbf{I}^i(W_{j \to i}) \neq \mathbf{I}^j$ . + +With these two warping functions, the dynamic scene view synthesis can be expressed as: + +$$ +\mathbf {J} = \phi \left(\left\{\mathbf {J} ^ {v} \left(W _ {r \rightarrow v}\right)\right\} _ {r}, \mathbf {J} ^ {v, t} \left(W _ {r _ {t} \rightarrow v}\right); \mathcal {M} ^ {v}\right), \tag {4} +$$ + +where $\{\mathbf{J}^v (W_{r\to v})\}_r$ is a set of static scene warping from all source viewpoints, and $\mathbf{J}^{v,t}(W_{r_t\rightarrow v,t})$ is the warping of dynamic contents from the source image of the $t^{\mathrm{th}}$ time instant. $\mathcal{M}^v$ is the set of the coordinates belonging to dynamic contents. $\phi$ is the rendering function that refines the warped images to complete the view synthesis. + +In Eq. (4), two quantities are unknowns: the depth from each source view $\mathbf{D}^{r_t}$ and the rendering function $\phi$ . We formulate these two quantities in Sec. 3.1 and Sec. 3.2. + +# 3.1. Globally Coherent Depth from Dynamic Scenes + +Our conjecture is that there exists a scale correction function that can upgrade a complete view-variant depth $\mathbf{D}_s^{r_t}$ + +from the single view prediction (DSV) to the depth of the view-invariant 3D geometry $\widehat{\mathbf{D}}^{rt}$ : + +$$ +\widehat {\mathbf {D}} ^ {r _ {t}} = \psi \left(\mathbf {D} _ {s} ^ {r _ {t}}\right), \tag {5} +$$ + +where $\psi$ is the scale correction function. Ideally, when a scene is stationary, the upgraded depth is expected to be identical to the depth $\mathbf{D}_m^r$ from view-invariant geometry, e.g., depth from multiview stereo (DMV), with uniform scaling, i.e., $\mathbf{D}_m^r = \psi (\mathbf{D}_s) = \alpha \mathbf{D}_s + \beta$ where $\alpha$ and $\beta$ are scalar and bias. When a scene is dynamic, the linear regression of such scale and bias is not applicable. We learn a nonlinear scale correction function that possesses the following three properties. + +First, for the static scene, the upgraded depth approximates DMV: + +$$ +\mathbf {D} _ {m} ^ {r} (\mathbf {x}) \approx \psi \left(\mathbf {D} _ {s} ^ {r _ {t}} (\mathbf {x})\right) \quad \text {f o r} \mathbf {x} \notin \mathcal {M} ^ {r _ {t}}, \tag {6} +$$ + +where $\mathbf{x}$ is the coordinate of pixels belonging to the static background. + +Second, for the dynamic contents, the upgraded depth preserves the relative depth from DSV: + +$$ +g \left(\mathbf {D} _ {s} ^ {r _ {t}} (\mathbf {x})\right) \approx g \left(\psi \left(\mathbf {D} _ {s} ^ {r _ {t}} (\mathbf {x})\right)\right) \quad \text {f o r} \mathbf {x} \in \mathcal {M} ^ {r _ {t}}, \tag {7} +$$ + +where $g$ measures the scale invariant relative gradient of depth, i.e., + +$$ +g (\mathbf {D}; \mathbf {x}, \Delta \mathbf {x}) = \frac {\mathbf {D} (\mathbf {x} + \Delta \mathbf {x}) - \mathbf {D} (\mathbf {x})}{| \mathbf {D} (\mathbf {x} + \Delta \mathbf {x}) | + | \mathbf {D} (\mathbf {x}) |}. \tag {8} +$$ + +We use multi-scale neighbors $\mathbf{x} + \Delta \mathbf{x}$ to constrain local and global relative gradients. + +Third, 3D scene motion induced by the upgraded depths is smooth and slow [50], i.e., minimal scene flow: + +$$ +\mathbf {p} (\mathbf {x}; \mathbf {D} ^ {r _ {t}}, \Pi^ {r _ {t}}) \approx \mathbf {p} \left(F _ {r _ {t} \rightarrow n _ {t}} (\mathbf {x}); \mathbf {D} ^ {n _ {t}}, \Pi^ {n _ {t}}\right), \tag {9} +$$ + +where $F_{r_t\to n_t}$ is the optical flow from the $r_t^{\mathrm{th}}$ to $n_t^{\mathrm{th}}$ source images. $\mathbf{p}(\mathbf{x};\mathbf{D})\in \mathbb{R}^3$ is the reconstructed point in the world coordinate using the depth $\mathbf{D}$ : + +$$ +\mathbf {p} (\mathbf {x}; \mathbf {D}, \Pi) = \psi (\mathbf {D} (\mathbf {x})) \mathbf {R} ^ {\top} \mathbf {K} ^ {- 1} \widetilde {\mathbf {x}} + \mathbf {C} \tag {10} +$$ + +where $\widetilde{\mathbf{x}}$ is the homogeneous representation of $\mathbf{x}$ , and $\mathbf{R} \in SO(3)$ , $\mathbf{C} \in \mathbb{R}^3$ , and $\mathbf{K}$ are the camera rotation matrix, camera optical center, and camera intrinsic parameters from the projection matrix $\Pi$ . + +Depth Fusion Network (DFNet) We enable the scale correction function $\psi$ using a depth fusion network that takes as input DSV, DMV, and image $\mathbf{I}^{r_t}$ : + +$$ +\widehat {\mathbf {D}} ^ {r _ {t}} = \psi \left(\mathbf {D} _ {s} ^ {r _ {t}}, \mathbf {D} _ {m} ^ {r _ {t}}, \mathbf {I} ^ {r _ {t}}; \mathbf {w}\right), \tag {11} +$$ + +where the network is parametrized by its weights $\mathbf{w}$ . To learn $\mathbf{w}$ , we minimize the following loss: + +$$ +L (\mathbf {w}) = L _ {g} + \lambda_ {l} L _ {l} + \lambda_ {s} L _ {s} + \lambda_ {e} L _ {e}, \tag {12} +$$ + +![](images/60931e05f61e0a6c76b6c8f1ce284526ea4df41ee695283742a5211175b6e5e9.jpg) +Figure 4: View synthesis pipeline: Given the warped foreground (FG) and background (BG) through the depths and masks, we complete the dynamic scene view synthesis using a rendering network called DeepBlender that predicts the missing region and refines the artifacts. + +where $\lambda$ controls the importance of each loss. $L_{g}$ measures the difference between DMV and the estimated depth in Eq. (6) for static scene: + +$$ +L _ {g} = \left\| \widehat {\mathbf {D}} ^ {r _ {t}} (\mathbf {x}) - \mathbf {D} _ {m} ^ {r _ {t}} (\mathbf {x}) \right\| \quad \text {f o r} \mathbf {x} \notin \mathcal {M} ^ {r _ {t}}, +$$ + +$L_{l}$ compares the scale invariant depth gradient between DSV and the estimated depth in Eq. (7): + +$$ +L _ {l} = \left\| g \left(\widehat {\mathbf {D}} ^ {r _ {t}} (\mathbf {x})\right) - g \left(\mathbf {D} _ {s} ^ {r _ {t}}\right) (\mathbf {x}) \right\| \quad \text {f o r} \quad \mathbf {x} \in \mathcal {M} ^ {r _ {t}}, +$$ + +and $L_{s}$ minimize the induced 3D scene motion for entire pixel coordinates in Eq. (9): + +$$ +L _ {s} = \| \mathbf {p} (\mathbf {x}; \mathbf {D} ^ {r _ {t}}, \Pi^ {r _ {t}}) - \mathbf {p} \left(F _ {r _ {t} \rightarrow n _ {t}} (\mathbf {x}); \mathbf {D} ^ {n _ {t}}, \Pi^ {n _ {t}}\right) \|. +$$ + +In conjunction with self-supervision, we further minimize the Laplacian of the estimated depth as regularization, i.e., + +$$ +L _ {e} = \left\| \nabla^ {2} \widehat {\mathbf {D}} ^ {r _ {t}} (\mathbf {x}) \right\| ^ {2} + \lambda_ {f} \left\| \nabla^ {2} \widehat {\mathbf {D}} ^ {r _ {t}} (\bar {\mathbf {x}}) \right\| ^ {2} \tag {13} +$$ + +where $\mathbf{x} \notin \mathcal{M}^{r_t}$ , $\bar{\mathbf{x}} \in \mathcal{M}^{r_t}$ , and $\lambda_f$ balances the spatial smoothness between the static and dynamic regions. + +The overview of our self-supervision pipeline and the network architecture are described in Figure 3. DFNet extracts the visual features from DSV and DMV using the same encoder in conjunction with the image. With the visual features, DFNet generates a complete and view invariant depth map that is geometrically consistent. To preserve the local visual features, skip connections between the feature extractor and depth generator are used. + +# 3.2. Dynamic Scene View Synthesis + +Given a set of warped static scenes from all source views $\{\mathbf{J}^v\}_r$ , we construct a global background $\mathbf{J}_*^v$ based on the baseline between the virtual and source cameras, i.e., assign the pixel value from the warped source view that has the shortest baseline with virtual camera. With $\mathbf{J}_*^v$ and the warped dynamic contents $\mathbf{J}^{v,t}$ from a single time instant, we model the synthesis function $\phi$ in Eq. (4) as follows: + +$$ +\phi \left(\mathbf {J} _ {*} ^ {v}, \mathbf {J} ^ {v, t}; \mathcal {M} ^ {v}\right) = \mathbf {J} _ {*} ^ {v} (\mathbf {x}) + \mathbf {J} ^ {v, t} (\mathbf {y}) + \widetilde {\phi} _ {\theta} \left(\mathbf {J} _ {*} ^ {v}, \mathbf {J} ^ {v, t}\right), \tag {14} +$$ + +where $\mathbf{x} \notin \mathcal{M}^{v,t}$ and $\mathbf{y} \in \mathcal{M}^{v,t}$ . $\widetilde{\phi}_{\theta}$ is the blending residual that fills the missing regions (unlike a static scene, there exists the regions that are not seen by any source views for a dynamic scene) and refines the synthesized image. We model this blending residual $\widetilde{\phi}_{\theta}$ using our rendering network. + +DeepBlender Network The DeepBlender predicts the blending residual $\widetilde{\phi}_{\theta}$ from the inputs of a warped dynamic scene $\mathbf{J}^{v,t}$ and a globally modeled static scene $\mathbf{J}_*^v$ as shown in Figure 4. It combines visual features extracted from $\mathbf{J}^{v,t}$ and $\mathbf{J}_*^v$ to form a decoder with skip connections. We learn this rendering function using source images with self-supervision. Each image is segmented into background and foreground with the corresponding foreground mask. We synthetically generate the missing regions near the foreground boundary and image border, and random pixel noises across the scenes. From the foreground and background images with missing regions and pixel noises, the DeepBlender is trained to generate the in-painting residuals. We incorporate an adversarial loss to produce photorealistic image synthesis: + +$$ +L \left(\mathbf {w} _ {\theta}\right) = L _ {\text {r e c}} + \lambda_ {\text {a d v}} L _ {\text {a d v}}, \tag {15} +$$ + +where $L_{\mathrm{rec}}$ is the reconstruction loss (difference between the estimated blending residual and ground truth), and $L_{\mathrm{adv}}$ is the adversarial loss [34]. The overview of our view synthesis pipeline is described in Figure 4. + +# 4. Implementation Details + +DFNet is pre-trained on a synthetic dataset [30] (which provides ground-truth optical flow, depth, and foreground mask) for better weight initialization during the self-supervision. To simulate the characteristic of the real data from synthetic, we partially remove the depth around the foreground region and add the depth noise across the scenes with $5\%$ tolerance of the variance at every training iteration. The same self-supervision loss as Eq. 15 is used to pretrain the network. To avoid the network depth scale confusion, we use the normalized inverse depth [23] for both DMV and DSV and recover the scale of the fused depth based on the original scale of DMV. To obtain DSV and DMV, we use existing single view prediction [23] and multiview stereo method [43]. In Eq. (8), we use five multiscale neighbors, i.e., $\Delta \mathbf{x} = \{1,2,4,8,16\}$ to consider both local and global regions. We use PwCNet [47] to compute the optical flow in Eq. (9), where the outliers were handled by forward-backward flow consistency. When enforcing the scene flow loss, we use $\pm 2$ neighboring camera views, i.e., $n_t = r_t \pm 2$ . We extract the foreground mask using interactive segmentation tools [39]. The foreground masks are manually specified for all baselines in the evaluation, while existing foreground segmentation approaches [38] can be used as a complementary tool as shown in Figure 7. + +We also pre-train the DeepBlender using video object segmentation dataset [36]. To create the synthetic residual, we randomly generate the seams and holes around the foreground using mask morphology and superpixel, and remove one side of the image boundary up to 30-pixel thickness. The loss in Eq. 15 is used for pre-training as well. When we warp an image to a virtual view, we check bidirectional warping consistency to prevent the pixel holes. For each image warping, we refine the depth using the bilateral weighted median filters [57]. As shown in Figure 4, we handle the foreground and background separately to prevent the pixel mixing problem around the object boundary. + +# 5. Experiments + +We evaluate our method with various dynamic scenes. + +![](images/765d081857346221de1d9d146be0481751810abfcc7d55fab5e2a3cda45634b0.jpg) +Figure 5: Camera rig. + +Dynamic Scene Dataset We collect dynamic scenes using two methods. (1) Moving monocular camera: short-term dynamic events $(\sim 5s)$ are captured by a hand-held monocular moving camera (Samsung Galaxy Note 10) with $60\mathrm{Hz}$ + +framerate and $1920 \times 1080$ resolution. We sub-sample the sequence if the object motion is not salient, and therefore, the degree of the scene motion is significantly larger than that of the camera egomotion where quasi-static dynamic reconstruction does not apply. Four dynamic scenes are captured, which includes human activity, human-object interaction, and animal movement (see the supplementary video). These scenes are used for the qualitative evaluation, where we use half-resolution inputs. (2) Stationary multiview cameras: 8 scenes are captured by a static camera rig with 12 cameras (GoPro Black Edition), where the ground truth of depth estimation and view synthesis are available for the quantitative evaluation. The cameras are located at two levels, and at each level, 6 cameras are evenly distributed with $0.22\mathrm{m}$ baseline as shown in Figure 5. All cameras are manually synchronized. The dataset is categorized into following: (1) Human: a single or multiple people show their dynamic motion, e.g., dynamic facial expression and body motion. (2) Interaction: a person interacts with objects, e.g., umbrella, balloon, and skate. (3) Vehicle: a truck rigidly move from the right side of the road to the left. (4) Stop motion: a doll is sequentially captured in the different location. When testing, we use a set of images sampled from each camera at different time instant to simulate a moving monocular camera. Given the set of collected images, we calibrate the intrinsic and extrinsic parameters of the moving camera using structure-from-motion [42]. + +Quantitative Evaluation Metric We evaluate the accuracy of depth estimation and view synthesis using the multiview dataset. (1) Depth estimation: given the estimated depth, + +
F+B / F-onlyJumpingSkatingTruckDynaFaceUmbrellaBalloon1Balloon2TeadybearAvg.
MVS [43]0.53 / 2.120.29 / 6.810.52 / 2.940.05 / 0.210.35 / 4.700.13 / 1.720.04 / 0.310.06 / 0.920.24 / 2.46
RMVSNet [55]0.61 / 1.550.76 / 1.560.84 / 2.432.24 / 1.570.67 / 5.240.23 / 1.400.13 / 0.380.58 / 0.890.75 / 1.87
MonoDepth [23]1.79 / 2.551.34 / 2.022.62 / 3.860.39 / 0.742.69 / 4.751.07 / 1.881.06 / 0.990.76 / 0.281.46 / 2.13
Sparse2Dense [31]1.35 / 3.261.35 / 10.662.15 / 7.600.20 / 0.341.35 / 6.400.53 / 3.030.48 / 0.650.32 / 0.900.96 / 4.10
DFNet-Lg1.26 / 1.310.81 / 0.761.60 / 1.240.26 / 0.912.19 / 1.980.93 / 1.360.53 / 0.301.91 / 0.971.18 / 1.10
DFNet-Ll0.46 / 1.580.15 / 1.380.62 / 3.340.09 / 0.260.58 / 3.140.15 / 1.570.08 / 0.300.16 / 0.670.28 / 1.53
DFNet-Le0.38 / 0.930.14 / 0.470.52 / 1.090.07 / 0.120.52 / 2.480.15 / 1.200.06 / 0.240.17 / 0.480.26 / 0.87
DFNet-Ls0.37 / 1.090.14 / 0.510.53 / 1.110.07 / 0.130.59 / 2.540.16 / 1.180.07 / 0.250.16 / 0.520.26 / 0.91
DFNet0.35 / 0.760.12 / 0.400.41 / 0.830.03 / 0.080.37 / 1.900.12 / 1.110.05 / 0.230.17 / 0.320.20 / 0.70
+ +Table 1: Results of quantitative evaluation for the task of depth estimation from dynamic scenes. RMSE in the metric scale is used for evaluation. F and B represent the foreground and background, respectively. The lower is the better. + +![](images/132c913144190e14c02e275224002f8b59fb112f7045cf538d363a62b8d359c7.jpg) +Figure 6: Qualitative comparison of the dynamic scene depth estimation from each method. + +we measure root mean square error (RMSE) by comparing to the ground-truth depth computed by multiview stereo. The error is represented in metric scale (m), i.e., the scale of the estimated depth is upgraded to the metric space using the physical length of the camera baseline. We exclude the region that cannot be reconstructed by multiview stereo. (2) View synthesis: we measure the mean of the optical flow magnitude from the ground-truth image to the synthesized one to validate the view invariant property of the depth map. Ideally, it should be close to 0 with the perfect depth map. Additionally, we measure the perceptual similarity [58] (i.e., the distance of VGG features) with the ground-truth to evaluate the visual plausibility of the synthesized view, where its range is normalized into [0, 1] (the lower is the better). + +Baselines and Ablation Study We compare our depth estimation and view synthesis methods with a set of base + +line approaches. For the depth evaluation, we compare our method with four baselines: 1) Multiview stereo (MVS [43]) assumes that a scene is stationary. For the pixel of which MVS failed to measure the depth, we assign the average of valid depth. 2) RMVSNet [55] is a learning based multiview stereo algorithm. 3) MonoDepth [23] predicts the depth from a single view image. As it produces the normalized depth, we re-scale the predicted depth by using the mean and standard deviation from MVS depth. 4) Sparse2Dense [31] completes the depth given an incomplete depth estimation, where we use MVS depth as an input. As this method requires the metric depth, we upgrade the estimated depth to the metric space using the physical length of the camera baseline. In conjunction with comparative evaluations, we conduct an ablation study to validate the choice of losses. + +For the view synthesis evaluation, we compare our + +view warping method (bi-directional 3D warping) with as-similar-as-possible warping [28] which warps an image by estimating grid-wise affine transforms. The correspondences of the warping are computed by projecting the estimated depth, i.e., transporting pixels in a source image to a novel view through the view-invariant depth. In Table 2, we denote bi-directional warping followed by the DeepBlender refinement as B3W, and as-similar-as-possible warping followed by the DeepBlender as ASAP. Note that the DeepBlender refinement is applied to all methods except for DFNet+B3W-DeepBlender which evaluates the effect of the refinement by eliminating the DeepBlender. On top of the comparison with different warping methods, we also test all possible combination of depth estimation methods with view warping methods as listed in Table 2. It quantifies how the quality of depth maps affect the view synthesis results. + +Dynamic Scene Depth Estimation In Table 1, we summarize the accuracy of dynamic scene depth estimation results evaluated on: 1) the entire scene, and 2) the only dynamic contents. For the entire scene, our method shows the best results on average, followed by MVS with $0.04\mathrm{m}$ accuracy gap. In the sequence of umbrella and teadybear, MVS shows the better accuracy for the entire scene than ours due to the highly occupant background area as shown in Figure 6, i.e., the depth estimation of dynamic contents much less contributes to depth accuracy evaluation than one of the background. From the evaluation on the only dynamic contents, our method (DFNet) also shows the best result with the noticeable accuracy improvement $(1.17\mathrm{m})$ from the second best method (MonoDepth). + +While the relative depth of MonoDepth is well reflective of the ground-truth, its depth range is often biased to a specific range, e.g., the foreground object is located much closer to the background scenes. Sparse2Dense does not fully reconstruct the background depth even with the MVS depth as inputs, and the predicted foreground depth is completely incorrect. It indicates that fusing the individual strength of learning-base and stereo-based geometry is essential to obtain the globally coherent and complete depth map from dynamic scenes. From Figure 6, we can further notice that the learning based multiview stereo (RMVSNet) also fail to model the dynamic foreground geometry. In our experiment, RMVSNet completely fail when the object is too close to the camera. + +From the ablation study described in Table 1, $L_{g}$ is the most critical self-supervision signal as the MVS depth plays the key role to convey the accurate static depth. Those accurate depths play the fiducial point for the other self-supervision signals to predict the depth on the missing area. From DFNet- $L_{l}$ , we can verify that the single view depth estimation can upgrade the depth accuracy around the dynamic contents by guiding it with accurate relative depths. Although the contribution of $L_{e}$ and $L_{s}$ are relatively small + +![](images/ba7a528a45c5754b8ce2b5f3b4c3ed597eedf5604ad30611092053c45650872f.jpg) +Mask input + +![](images/7d3f0f0601b126a6c768f4dcfab1f45576f2310363dc2bb3cdb03aa12ad0fc32.jpg) +Mask input +View synthesis results +Figure 7: The mask detection with small mistakes (left) does not have a significant impact on the view synthesis results. However, if the mask detection is completely failed (right), it produces artifacts such as object fragmentation (yellow box) or afterimage (red box). + +than others, it helps to regularize the object scene motion and the spatial smoothness of the foreground depth which are keys to reduce the artifacts of the novel view synthesis. + +Dynamic Scene Novel View Synthesis Table 2 shows the quantitative evaluation of view synthesis, and the associated qualitative results are shown in Figure 8. From the qualitative results, we can notice that two types of artifacts can be produced depending on the warping methods: B3W produces flying pixel noises, i.e., a pixel is floating due to the warping with incorrect depths, while ASAP produces image distortion. Such artifacts lead to the increase of the perceptual distance with ground-truths as it captures the structural similarity. On average, our method (DFNet+B3W) shows the smallest perceptual distance (0.15), indicating that the geometry from our depth map is highly preservative of scene structure. The comparison of DFNet+B3W with DFNet+ASAPW demonstrates that, given an accurate depth map, pixel-wise warping (B3W) is the better choice over the grid-wise warping (ASAWP) for view synthesis. From the results of DFNet+B3W-Deepblender, we can observe the large improvement of perceptual similarity compared to the results without DeepBlender, indicating that the refinement step (hole filling and noise reduction) is essential for visual plausibility. + +Our method (DFNet+B3W) performs the best even for the flow evaluation (5.3 pixels). MVS+B3W is following our method with the 6.8 pixel errors but it produces a significant pixel noise around the dynamic contents as shown in Figure 8. While MonoDepth+B3W reconstructs visually plausible results in Figure 8, it accompanies with large flow errors (10.8 pixels on average), meaning that this result is not geometrically plausible. Note that, the optical flow error of DFNet+B3W-Deepblender is much higher than DFNet+B3W because the flow estimation algorithm [47] shows significant confusion when there are holes around the image boundary and dynamic contents. + +Limitation It is worth noting a few limitations of our method. The DFNet may not perform well when a viewing angle between neighboring views are larger (e.g., rotating more than $45^{\circ}$ ), which may decrease the amount of overlaps of dynamic contents. If the scene is highly cluttered by + +
Perceptual Sim. / Optical Flow \JumpingSkatingTruckDynaFaceUmbrellaBalloon1Balloon2TeadybearAvg.
MVS [43] + ASAPW [28]0.21 / 7.00.17 / 9.30.10 / 4.00.30 / 19.00.19 / 7.50.23 / 16.00.17 / 6.71.80 / 4.90.19 / 9.3
RMVSNet [55] + ASAP [28]0.22 / 6.40.23 / 13.10.11 / 3.40.98 / 10.20.19 / 7.20.23 / 14.90.16 / 6.30.20 / 10.00.29 / 8.9
MonoDepth [23] + ASAP [28]0.23 / 9.10.18 / 11.80.10 / 5.10.32 / 20.90.20 / 9.80.25 / 17.30.23 / 11.40.17 / 7.80.20 / 11.7
Sparse2Dense [31] + ASAP [28]0.23 / 7.50.19 / 9.40.11 / 4.80.31 / 20.80.19 / 7.00.23 / 13.70.16 / 6.60.19 / 6.40.20 / 9.52
MVS [43] + B3W0.24 / 7.00.20 / 9.20.12 / 3.50.27 / 7.50.19 / 5.70.23 / 14.40.17 / 5.40.13 / 1.50.19 / 6.8
RMVSNet [55] + B3W0.23 / 5.60.23 / 14.80.14 / 3.31.0 / 10.80.19 / 5.60.23 / 12.00.16 / 5.10.19 / 8.90.29 / 8.2
MonoDepth [23] + B3W0.23 / 8.50.18 / 11.40.10 / 5.00.32 / 19.10.19 / 8.50.24 / 17.30.23 / 11.40.15 / 5.20.20 / 10.8
Sparse2Dense [31] + B3W0.24 / 7.30.20 / 9.20.13 / 4.70.31 / 11.70.2 / 6.70.24 / 14.00.18 / 6.60.17 / 4.80.22 / 8.12
DFNet + ASAP [28]0.20 / 5.80.17 / 9.30.09 / 3.00.30 / 18.00.18 / 6.40.20 / 13.30.16 / 6.40.17 / 5.80.18 / 8.5
DFNet + B3W-DeepBlender0.23 / 8.20.21 / 13.10.12 / 4.80.30 / 15.60.22 / 9.00.25 / 15.80.20 / 9.20.18 / 4.70.21 / 10.1
DFNet + B3W (ours)0.16 / 4.20.15 / 8.80.08 / 2.50.22 / 6.20.16 / 3.60.18 / 10.60.14 / 5.10.13 / 2.00.15 / 5.3
+ +Table 2: Quantitative evaluation results on the dynamic scene novel view synthesis task. To measure the accuracy, we compute perceptual similarity and optical flow magnitude between the ground-truth and the synthesized image. + +![](images/c1730056226b19ffaab14a0e5352230916ee621936c4ff63b69e08933f6fddbe.jpg) +Figure 8: Qualitative comparison on the view synthesis task. The pixel error is shown in the inset image (maximum pixel error is set to 50 RGB distance). + +many objects from both background and foreground (e.g., many people, thin poles, and trees), our pipeline could cause noisy warping results due to the significant depth discontinuities from the clutter. Our method will fail in the scenes where the camera calibration does not work, e.g., a scene largely occupied by dynamic contents [30]. Finally, our view synthesis with completely failed foreground mask produces significant artifacts such as afterimages and object fragmentation as shown in Figure 7. + +# 6. Conclusion + +In this paper, we study the problem of monocular view synthesis of a dynamic scene. The main challenge is to reconstruct dynamic contents to produce geometrically coherent view synthesis, which is an ill-posed problem in + +general. To address this challenge, we propose to learn a scale correction function that can upgrade the depth from single view (DSV), which allows matching to the depth of the multi-view solution (DMV) for static contents while producing locally consistent scene motion. Given the computed depth, we synthesize a novel view image using the DeepBlender network that is designed to combine foreground, background, and missing regions. Through the evaluations for depth estimation and novel view synthesis, we demonstrate that the proposed method can apply to the daily scenario captured from a monocular camera. + +Acknowledgement This work was partly supported by the NSF under IIS 1846031 and CNS 1919965. + +# References + +[1] Ijaz Akhter, Yaser Sheikh, Sohaib Khan, and Takeo Kanade. Nonrigid structure from motion in trajectory space. In NIPS, 2008. +[2] T. Alldieck, M. Magnor, B. Bhatnagar, C. Theobalt, and G. Pons-Moll. Learning to reconstruct people in clothing from a single rgb camera. In CVPR, 2019. +[3] Shai Avidan and Amnon Shashua. Trajectory triangulation: 3D reconstruction of moving points from a monocular image sequence. TPAMI, 2000. +[4] Jiamin Bai, Aseem Agarwala, Maneesh Agrawala, and Ravi Ramamoorthi. Automatic cinematograph portraits. In Proceedings of the Eurographics Symposium on Rendering, 2013. +[5] Luca Ballan, Gabriel J. Brostow, Jens Puwein, and Marc Pollefeys. Unstructured video-based rendering: Interactive exploration of casually captured videos. SIGGRAPH, 2010. +[6] Jiawang Bian, Zhichao Li, Naiyan Wang, Huangying Zhan, Chunhua Shen, Ming-Ming Cheng, and Ian Reid. Unsupervised scale-consistent depth and ego-motion learning from monocular video. In NIPS, 2019. +[7] Christoph Bregler, Aaron Hertzmann, and Henning Biermann. Recovering non-rigid 3D shape from image streams. In CVPR, 1999. +[8] Shenchang Eric Chen and Lance Williams. View interpolation for image synthesis. In Conference on Computer Graphics and Interactive Techniques, 1993. +[9] Inchang Choi, Orazio Gallo, Alejandro Troccoli, Min H Kim, and Jan Kautz. Extreme view synthesis. arXiv preprint arXiv:1812.04777, 2018. +[10] J. Fayad, Lourdes Agapito, and Alessio Del Bue. Piecewise quadratic reconstruction of non-rigid surface from monocular sequences. In ECCV, 2010. +[11] John Flynn, Michael Broxton, Paul Debevec, Matthew DuVall, Graham Fyffe, Ryan Overbeck, Noah Snavely, and Richard Tucker. Deepview: View synthesis with learned gradient descent. In CVPR, June 2019. +[12] John Flynn, Ivan Neulander, James Philbin, and Noah Snavely. Deepstereo: Learning to predict new views from the world's imagery. In CVPR, 2016. +[13] Jan-Michael Frahm, Pierre Fite-Georgel, David Gallup, Tim Johnson, Rahul Raguram, Changchang Wu, Yi-Hung Jen, Enrique Dunn, Brian Clipp, Svetlana Lazebnik, et al. Building rome on a cloudless day. In ECCV, 2010. +[14] Yasutaka Furukawa, Brian Curless, Steven M. Seitz, and Richard Szeliski. Manhattan-world stereo. In CVPR, 2010. +[15] R. Hartley and A. Zisserman. Multiple View Geometry in Computer Vision. Cambridge University Press, second edition, 2004. +[16] D. Hoiem, A. A. Efros, and M. Hebert. Automatic photo pop-up. SIGGRAPH, 2005. +[17] Dinghuang Ji, Enrique Dunn, and Jan-Michael Frahm. Spatio-temporally consistent correspondence for dense dynamic scene modeling. In ECCV, 2016. +[18] Hanqing Jiang, Haomin Liu, Ping Tan, Guofeng Zhang, and Hujun Bao. 3d reconstruction of dynamic scenes with multiple handheld cameras. In ECCV, 2012. + +[19] Jeremy Yirmeyahu Kaminski and Mina Teicher. A general framework for trajectory triangulation. JMIV, 2004. +[20] Chen Kong and Simon Lucey. Deep interpretable non-rigid structure from motion, 2019. +[21] Johannes Kopf, Michael F. Cohen, and Richard Szeliski. First-person hyper-lapse videos. SIGGRAPH, 2014. +[22] Suryansh Kumar, Yuchao Dai, and Hongdong Li. Monocular dense 3d reconstruction of a complex dynamic scene from two perspective frames. In ICCV, 2017. +[23] Katrin Lasinger, René Ranftl, Konrad Schindler, and Vladlen Koltun. Towards robust monocular depth estimation: Mixing datasets for zero-shot cross-dataset transfer. arXiv preprint arXiv:1907.01341, 2019. +[24] Zhengqi Li, Tali Dekel, Forrester Cole, Richard Tucker, Noah Snavely, Ce Liu, and William T Freeman. Learning the depths of moving people by watching frozen people. CVPR, 2019. +[25] Zhengqi Li and Noah Snavely. Megadepth: Learning single-view depth prediction from internet photos. In CVPR, 2018. +[26] Zicheng Liao, Neel Joshi, and Hugues Hoppe. Automated video looping with progressive dynamism. SIGGRAPH, 2013. +[27] Chen Liu, Kihwan Kim, Jinwei Gu, Yasutaka Furukawa, and Jan Kautz. Planercnn: 3d plane detection and reconstruction from a single image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4450-4459, 2019. +[28] Shuaicheng Liu, Lu Yuan, Ping Tan, and Jian Sun. Bundled camera paths for video stabilization. SIGGRAPH, 2013. +[29] Stephen Lombardi, Jason Saragih, Tomas Simon, and Yaser Sheikh. Deep appearance models for face rendering. SIGGRAPH, 2018. +[30] Zhaoyang Lv, Kihwan Kim, Alejandro Troccoli, Deqing Sun, James M Rehg, and Jan Kautz. Learning rigidity in dynamic scenes with a moving camera for 3d motion field estimation. In ECCV, 2018. +[31] Fangchang Mal and Sertac Karaman. Sparse-to-dense: Depth prediction from sparse depth samples and a single image. In ICRA, 2018. +[32] S. Olsen and A. Bartoli. Using priors for improving generalization in non-rigid structure-from-motion. In BMVC, 2007. +[33] Hyun Soo Park and Yaser Sheikh. 3d reconstruction of a smooth articulated trajectory from a monocular image sequence. In ICCV, 2011. +[34] Deepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell, and Alexei Efros. Context encoders:feature learning by inpainting. In CVPR, 2016. +[35] 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. +[36] F. Perazzi, J. Pont-Tuset, B. McWilliams, L. Van Gool, M. Gross, and A. Sorkine-Hornung. A benchmark dataset and evaluation methodology for video object segmentation. In CVPR, 2016. +[37] Julien Philip and George Drettakis. Plane-based multi-view inpainting for image-based rendering in large scenes. In SIG- + +GRAPH Symposium on Interactive 3D Graphics and Games, 2018. +[38] Xuebin Qin, Zichen Zhang, Chenyang Huang, Chao Gao, Masood Dehghan, and Martin Jagersand. Basnet: Boundary-aware salient object detection. In CVPR, 2019. +[39] Carsten Rother, Vladimir Kolmogorov, and Andrew Blake. Grabcut: Interactive foreground extraction using iterated graph cuts. SIGGRAPH, 2004. +[40] C. Russell, J. Fayad, and L. Agapito. Energy based multiple model fitting for non-rigid structure from motion. In CVPR, 2011. +[41] Chris Russell, Rui Yu, and Lourdes Agapito. Video pop-up: Monocular 3d reconstruction of dynamic scenes. In ECCV, 2014. +[42] Johannes Lutz Schonberger and Jan-Michael Frahm. Structure-from-motion revisited. In CVPR, 2016. +[43] Johannes L Schonberger, Enliang Zheng, Jan-Michael Frahm, and Marc Pollefeys. Pixelwise view selection for unstructured multi-view stereo. In ECCV, 2016. +[44] A. Shashua and L. Wolf. Homography tensors: On algebraic entities that represent three views of static or moving planar points. In ECCV, 2000. +[45] Sudipta N. Sinha, Drew Steedly, and Rick Szeliski. Piecewise planar stereo for image-based rendering. In ICCV, 2009. +[46] Pratul P. Srinivasan, Richard Tucker, Jonathan T. Barron, Ravi Ramamoorthi, Ren Ng, and Noah Snively. Pushing the boundaries of view extrapolation with multiplane images. CVPR, 2019. +[47] Deqing Sun, Xiaodong Yang, Ming-Yu Liu, and Jan Kautz. PWC-Net: CNNs for optical flow using pyramid, warping, and cost volume. In CVPR, 2018. +[48] Lorenzo Torresani and Christoph Bregler. Space-time tracking. In ECCV, 2002. +[49] Jack Valmadre and Simon Lucey. General trajectory prior for non-rigid reconstruction. In CVPR, 2012. +[50] Jack Valmadre and Simon Lucey. General trajectory prior for non-rigid reconstruction. In CVPR, 2012. +[51] Y. Wexler and A. Shashua. On the synthesis of dynamic scenes from reference views. In CVPR, 2000. +[52] Donglai Xiang, Hanbyul Joo, and Yaser Sheikh. Monocular total capture: Posing face, body and hands in the wild. In CVPR, 2019. +[53] Jing Xiao and Takeo Kanade. Non-rigid shape and motion recovery: Degenerate deformations. In CVPR, 2004. +[54] Jingyu Yan and Marc Pollefeys. A factorization-based approach to articulated motion recovery. In CVPR, 2005. +[55] Yao Yao, Zixin Luo, Shiwei Li, Tianwei Shen, Tian Fang, and Long Quan. Recurrent mvsnet for high-resolution multiview stereo depth inference. In CVPR, 2019. +[56] Guofeng Zhang, Jiaya Jia, Tien-Tsin Wong, and Hujun Bao. Consistent depth maps recovery from a video sequence. TPAMI, year=2009.. +[57] Qi Zhang, Li Xu, and Jiaya Jia. 100+ times faster weighted median filter (wmf). In CVPR, 2014. +[58] 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. + +[59] Tinghui Zhou, Richard Tucker, John Flynn, Graham Fyffe, and Noah Snavely. Stereo magnification: Learning view synthesis using multiplane images. In SIGGRAPH, 2018. +[60] C Lawrence Zitnick, Sing Bing Kang, Matthew Uyttendaele, Simon Winder, and Richard Szeliski. High-quality video view interpolation using a layered representation. SIGGRAPH, 2004. \ No newline at end of file diff --git a/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/images.zip b/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..39213dfb981969525ff01391acfce37188f3c9ba --- /dev/null +++ b/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27a17e87f94c2dba921f4da1b5881e203a800caef9ab015b2c8f2a1c3d179427 +size 905119 diff --git a/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/layout.json b/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..580dba829a1a3a6a669c9bee37444bc28d51b6f7 --- /dev/null +++ b/novelviewsynthesisofdynamicsceneswithgloballycoherentdepthsfromamonocularcamera/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da8eb3b8746dc3bcc92390b15b47852075f20980502df956fe59fef2202b23a4 +size 411851 diff --git a/oasisalargescaledatasetforsingleimage3dinthewild/fca4003b-8403-49bc-9258-e6dc09e92bfa_content_list.json b/oasisalargescaledatasetforsingleimage3dinthewild/fca4003b-8403-49bc-9258-e6dc09e92bfa_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4a8b688fd955518b28e1fa679248e3b0570be804 --- /dev/null +++ b/oasisalargescaledatasetforsingleimage3dinthewild/fca4003b-8403-49bc-9258-e6dc09e92bfa_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da52418d4e1b88a8a7eb1a2496d9f39ea3ea705d3580a0fd5071ae0788c49839 +size 83887 diff --git a/oasisalargescaledatasetforsingleimage3dinthewild/fca4003b-8403-49bc-9258-e6dc09e92bfa_model.json b/oasisalargescaledatasetforsingleimage3dinthewild/fca4003b-8403-49bc-9258-e6dc09e92bfa_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6882dae9d43cf5f57ad0d57d2ec40dd72046decb --- /dev/null +++ b/oasisalargescaledatasetforsingleimage3dinthewild/fca4003b-8403-49bc-9258-e6dc09e92bfa_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7d8b0f08f2a68f3447dc3757b9fa0022cf4f9480ecfe024b2f6974a55e2988f +size 101560 diff --git a/oasisalargescaledatasetforsingleimage3dinthewild/fca4003b-8403-49bc-9258-e6dc09e92bfa_origin.pdf b/oasisalargescaledatasetforsingleimage3dinthewild/fca4003b-8403-49bc-9258-e6dc09e92bfa_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9994f3e372af24d6b8a41ef379d4d43e4cb0c1d3 --- /dev/null +++ b/oasisalargescaledatasetforsingleimage3dinthewild/fca4003b-8403-49bc-9258-e6dc09e92bfa_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b7c54276dd889c37c64cf47ecad3f18378f323441eae02521d82db00906aab5 +size 4243926 diff --git a/oasisalargescaledatasetforsingleimage3dinthewild/full.md b/oasisalargescaledatasetforsingleimage3dinthewild/full.md new file mode 100644 index 0000000000000000000000000000000000000000..30d9d3aaeffe02898c57d3b8984ab884136758e8 --- /dev/null +++ b/oasisalargescaledatasetforsingleimage3dinthewild/full.md @@ -0,0 +1,349 @@ +# OASIS: A Large-Scale Dataset for Single Image 3D in the Wild + +Weifeng Chen $^{1,2}$ Shengyi Qian $^{1}$ David Fan $^{2}$ Noriyuki Kojima $^{1}$ Max Hamilton $^{1}$ Jia Deng $^{2}$ + +1University of Michigan, Ann Arbor + +$^{2}$ Princeton University + +{wfchen, syqian, kojimano, johnmaxh}@umich.edu dfan@alumni.princeton.edu, jiadeng@princeton.edu + +![](images/16fba5f3cac29ab2c434e3f9841e47b2f6d38c5a97e896a174b5fad41c548db4.jpg) +Human Annotations +Figure 1. We introduce Open Annotations of Single-Image Surfaces (OASIS), a large-scale dataset of human annotations of 3D surfaces for 140,000 images in the wild. More examples in the supplementary material. + +![](images/e490f70b27d5b13e4faf5e5129ef86775a2793f3155388bb85fcb387779a6d52.jpg) + +![](images/6c3db4a384e49b0e4f87d717da2bbd0de4fe42a598e07f800951287cb2152314.jpg) +Reconstructed + +![](images/6555ee7faab2dac2bee247a0aa1c83286803fb03cc43fceda4d2bbd561f7655b.jpg) + +![](images/4bd6c86676299c43e0cf05008ba513ba6e772df2851b01cbb6c218ec7117d4cf.jpg) +ixel-wise Depth + +![](images/95700bf8284da632e4fb0f1c4ff0326dd95285763ed89bd396dba0f3f31b9adc.jpg) + +![](images/1a442edd656bcda6c0f2081a7597dd0f7a4691084629ec44504b3f6728ba5b92.jpg) +Human Annotations + +![](images/73d103ba0f5a7d893d2f47affa1c151562ffd13d929a05b43c127a9477979e61.jpg) + +![](images/c07485ed1c4377489508e271aa313cc4d61e303ad3cceed2b5e90f80b5b05a65.jpg) +Reconstructed Pixel-wise Depth + +![](images/f006549a97fe2b955d2b94fa3098221b6fc58fc91eb74cb35386e8f306c04862.jpg) + +![](images/d8732ed097929741f1bc03a6900e352924931a346b699c4a24ea755104e031a2.jpg) + +# Abstract + +Single-view 3D is the task of recovering 3D properties such as depth and surface normals from a single image. We hypothesize that a major obstacle to single-image 3D is data. We address this issue by presenting Open Annotations of Single Image Surfaces (OASIS), a dataset for single-image 3D in the wild consisting of annotations of detailed 3D geometry for 140,000 images. We train and evaluate leading models on a variety of single-image 3D tasks. We expect OASIS to be a useful resource for 3D vision research. Project site: https://pvl.cs.princeton.edu/OASIS. + +# 1. Introduction + +Single-view 3D is the task of recovering 3D properties such as depth and surface normals from a single RGB image. It is a core computer vision problem of critical importance. 3D scene interpretation is a foundation for understanding events and planning actions. 3D shape representation is crucial for making object recognition robust against changes in viewpoint, pose, and illumination. 3D from a single image is especially important due to the ubiquity of monocular images and videos. Even with a stereo camera with which 3D can be reconstructed by triangulating matching pixels from different views, monocular 3D cues are still + +necessary in textureless or specular regions where it is difficult to reliably match pixel values. + +Single-image 3D is challenging. Unlike multiview 3D, it is ill-posed and resists tractable analytical formulation except in the most simplistic settings. As a result, data-driven approaches have shown greater promise, as evidenced by a plethora of works that train deep networks to map an RGB image to depth, surface normals, or 3D models [11, 17, 36, 14, 43, 24]. However, despite substantial progress, the best systems today still struggle with handling scenes "in the wild"—arbitrary scenes that a camera may encounter in the real world. As prior work has shown [5], state-of-art systems often give erroneous results when presented with unfamiliar scenes with novel shapes or layouts. + +We hypothesize that a major obstacle of single-image 3D is data. Unlike object recognition, whose progress has been propelled by datasets like ImageNet [10] covering diverse object categories with high-quality labels, single-image 3D has lacked an ImageNet equivalent that covers diverse scenes with high-quality 3D ground truth. Existing datasets are restricted to either a narrow range of scenes [31, 9] or simplistic annotations such as sparse relative depth pairs or surface normals [5, 7]. + +In this paper we introduce Open Annotations of Single-Image Surfaces (OASIS), a large-scale dataset for single-image 3D in the wild. It consists of human annotations that + +enable pixel-wise reconstruction of 3D surfaces for 140,000 randomly sampled Internet images. Fig. 1 shows the human annotations of example images along with the reconstructed surfaces. + +A key feature of OASIS is its rich annotations of human 3D perception. Six types of 3D properties are annotated for each image: occlusion boundary (depth discontinuity), fold boundary (normal discontinuity), surface normal, relative depth, relative normal (orthogonal, parallel, or neither), and planarity (planar or not). These annotations together enable a reconstruction of pixelwise depth. + +To construct OASIS, we created a UI for interactive 3D annotation. The UI allows a crowd worker to annotate the aforementioned 3D properties. It also provides a live, rotatable rendering of the resulting 3D surface reconstruction to help the crowd worker fine-tune their annotations. + +It is worth noting that 140,000 images may not seem very large compared to millions of images in datasets like ImageNet. But the number of images can be a misleading metric. For OASIS, annotating one image takes 305 seconds on average. In contrast, verifying a single image-level label takes no more than a few seconds. Thus in terms of the total amount of human time, OASIS is already comparable to millions of image-level labels. + +OASIS opens up new research opportunities on a wide range of single-image 3D tasks—depth estimation, surface normal estimation, boundary detection, and instance segmentation of planes—by providing in-the-wild ground truths either for the first time, or at a much larger scale than prior work. For depth estimation and surface normals, pixelwise ground truth is available for images in the wild for the first time—prior data in the wild provide only sparse annotations [5, 6]. For the detection of occlusion boundaries and folds, OASIS provides annotations at a scale 700 times larger than prior work—existing datasets [33, 15] have annotations for only about 200 images. For instance segmentation of planes, ground truth annotation is available for images in the wild for the first time. + +To facilitate future research, we provide extensive statistics of the annotations in OASIS, and train and evaluate leading deep learning models on a variety of single-image tasks. Experiments show that there is a large room for performance improvement, pointing to ample research opportunities for designing new learning algorithms for single-image 3D. We expect OASIS to serve as a useful resource for 3D vision research. + +# 2. Related Work + +3D Ground Truth from Depth-Sensors and Computer Graphics Major 3D datasets are either collected by sensors [31, 12, 29, 30, 9] or synthesized with Computer Graphics [4, 23, 32, 22, 26]. But due to the limitations of depth sensors and the lack of varied 3D assets for render- + +ing, the diversity of scenes is quite limited. For example, sensor-based ground truth is mostly for indoor or driving scenes [31, 9, 23, 32, 12]. + +3D Ground Truth from Multiview Reconstruction Single-image 3D training data can also be obtained by applying classical Structure-from-Motion (SfM) algorithms on Internet images or videos [18, 38, 6]. However, classical SfM algorithms have many well known failure modes including scenes with moving objects and scenes with specular or textureless surfaces. In contrast, humans can annotate all types of scenes. + +3D Ground Truth from Human Annotations Our work is connected to many previous works that crowdsourced 3D annotations of Internet images. For example, prior work has crowdsourced annotations of relative depth [5] and surface normals [7] at sparse locations of an image (a single pair of relative depth and a single normal per image). Prior work has also aligned pre-existing 3D models to images [39, 34]. However, this approach has a drawback that not every shape can be perfectly aligned with available 3D models, whereas our approach can handle arbitrary geometry. + +Our work is related to that of Karsch et al. [15], who reconstruct pixelwise depth from human annotations of boundaries, with the aid of a shape-from-shading algorithm [2]. Our approach is different in that we annotate not only boundaries but also surface normals, planarity, and relative normals, and our reconstruction method does not rely on automatic shape from shading, which is still unsolved and has many failure modes. + +One of our inspirations is LabelMe3D [28], which annotated 3D planes attached to a common ground plane. Another is OpenSurfaces [3], which also annotated 3D planes. We differ from LabelMe3D and OpenSurfaces in that our annotations recover not only planes but also curved surfaces. Our dataset is also much larger, being $600 \times$ the size of LabelMe3D and $5 \times$ of OpenSurfaces in terms of the number of images annotated. It is also more diverse, because LabelMe3D and OpenSurface include only city or indoor scenes. + +# 3. Crowdsourcing Human Annotations + +We use random keywords to query and download Creative Commons Flickr images with a known focal length (extracted from the EXIF data). Each image is presented to a crowd worker for annotation through a custom UI as shown in Fig. 2 (a). The worker is asked to mask out a region that she wishes to work on with a polygon of her choice, with the requirement that the polygon covers a pair of randomly pre-selected locations. She then works on the annotations and iteratively monitors the generated mesh (detailed in Sec 4) from an interactive preview window (Fig. 2 (a)). + +![](images/45d6e111d0d0d19c1eae47a28f97208370cfc70f6396b666b80814a47c2de367.jpg) +Figure 2. (a) Our UI allows a user to annotate rich 3D properties and includes a preview window for interactive 3D visualization. (b) An illustration of the depth scaling procedure in our backend. + +![](images/71f8dfdb577a21e479d2291ad68b93621e52ae8a79e2f3f02ba836d4744632b2.jpg) + +Occlusion Boundary and Fold An occlusion boundary denotes locations of depth discontinuity, where the surface on one side is physically disconnected from the surface on the other side. When it is drawn, the worker also specifies which side of the occlusion is closer to the viewer, i.e. depth order of the surfaces on both sides of the occlusion. Workers need to distinguish between two kinds of occlusion boundaries. Smooth occlusion (green in Fig 2 (a)) is where the closer surface smoothly curves away from the viewer, and the surface normals should be orthogonal to the occlusion line and parallel to the image plane, and pointing toward the further side. Sharp occlusion (red in Fig 2 (a)) has none of these constraints. On the other hand, fold denotes locations of surface normal discontinuity, where the surface geometry changes abruptly, but the surfaces on the two sides of the fold are still physically attached to each other (orange in Fig 2 (a)). + +Occlusion boundaries segment a region into subregions, each of which is a continuous surface whose geometry can change abruptly but remains physically connected in 3D. Folds further segment a continuous surface into smooth surfaces where the geometry varies smoothly without discontinuity of surface normals. + +Surface Normal The worker first specifies if a smooth surface is planar or curved. She annotates one normal at each planar surface which indicates the orientation of the plane. For each curved surface, she annotates normals at as many locations as she sees fit. A normal is visualized as a blue arrow originating from a green grid (see supplementary material), rendered in perspective projection according to the known focal length. Such visualization helps workers perceive the normal in 3D [7]. To rotate and adjust the normal, the worker only needs to drag the mouse. + +Relative Normal Finally, to annotate normals with higher accuracy, the worker specifies the relative normal between each pair of planar surfaces. She chooses between Neither, Parallel and Orthogonal. Surfaces pairs that are parallel or + +orthogonal to each other then have their normals adjusted automatically to reflect the relation. + +Interactive Previewing While annotating, the worker can click a button to see a visualization of the 3D shape constructed from the current annotations (detailed later in Sec. 4). Workers can rotate or zoom to inspect the shape from different angles in a preview window (Fig 2 (a)). She keeps working on it until she is satisfied with the shape. + +Quality Control Completing our 3D annotation task requires knowledge of relevant concepts. To ensure good quality of the dataset, we require each worker to complete a training course to learn concepts such as occlusions, folds and normals, and usage of the UI. She then needs to pass a qualification quiz before being allowed to work on our annotation task. Besides explicitly selecting qualified workers, we also set up a separate quality verification task on each collected mesh. In this task, a worker inspects the mesh to judge if it reflects the image well. Only meshes deemed high quality are accepted. + +To improve our annotation throughput, we collected annotations from two sources: Amazon Mechanical Turk, which accounts for $31\%$ of all annotations, and a data annotation company that employs full-time annotators, who supplied the rest of the annotations. + +# 4. From Human Annotations to Dense Depth + +Because humans do not directly annotate the depth value of each pixel, we need to convert the human annotations to pixelwise depth in order to visualize the 3D surface. + +Generating Dense Surface Normals We first describe how we generate dense surface normals from annotations. We assume the normals to be smoothly varying in the spatial domain, except across folds or occlusion boundaries where the normals change abruptly. Therefore, our system propagates the known normals to the unknown ones by requiring the final normals to be smooth overall, but stops the propa + +![](images/40fdee902a8b0f99a7da5b1a509e3067e2a2311cce089774aad0c96e5e53004d.jpg) +(a) + +![](images/32cfb57c4867eacbd0e9f0ebdc7b2d912514b5d0076e094e4922bcc91c3abfcf.jpg) +(b) + +![](images/7ae412b04391f713660d7a2977c662e5a042734220f9041b4cf791cab01639a0.jpg) +(c) +Figure 3. Statistics of OASIS. (a) The distribution of focal length (unit: relative length to the image width). (b) The distribution of surface normals. (c) Boundary: the ratio of regions containing only occlusion, only fold, and both. Curvature: the distribution of regions containing only planes, only curved surfaces, and both. (d) The frequency distribution of each surface type in a region. + +![](images/8a2f4cfdf9a785fa547c1433ad95768a177577330d69ec2fc3a62dc69cd41daa.jpg) +(d) + +gation at fold and occlusion lines. + +More concretely, let $N_{p}$ denote the normal at pixel $p$ on a normal map $N$ , and $F$ , $O$ denotes the pixels belong to the folds and occlusion boundaries. We have a set of known normals $\tilde{N}$ at locations $P_{known}$ from (1) surface normal annotations by workers, and (2) the pre-computed normals along the smooth occlusion boundaries as mentioned in Sec 3. Each pixel $p$ has four neighbors $\Phi(p)$ . If $p$ is on an occlusion boundary, its neighbors on the closer side of this boundary are $\Gamma_{O}(p)$ . If $p$ is on a fold line, only its neighbors $\Gamma_{F}(p)$ on one fixed random side of this line are considered. + +We solve for the optimal normal $N^{*}$ using LU factorization and then normalize it into unit norm: + +$$ +\begin{array}{l} N^{*} = \operatorname *{argmin}_{N}\sum_{p\notin F\cup O}\sum_{\substack{q\in \Phi (p)\\ q\notin F\cup O}}|N_{p} - N_{q}|^{2} + \\ \sum_ {p \in O} \sum_ {q \in \Gamma_ {O} (p)} | N _ {p} - N _ {q} | ^ {2} + \sum_ {p \in F} \sum_ {q \in \Gamma_ {F} (p)} | N _ {p} - N _ {q} | ^ {2} (1) \\ \mathrm {s . t .} \quad N _ {p} = \tilde {N} _ {p}, \forall p \in P _ {\text {k n o w n}} (2) \\ \end{array} +$$ + +Generating Dense Depth Our depth generation pipeline consists of two stages: First, from surface normals and focal length, we recover the depth of each continuous surface through integration [25]. Next, we adjust the depth order among these surfaces by performing surface-wise depth scaling (Fig. 2 (b)), i.e. each surface has its own scale factor. + +Our design is motivated by this fact: in single-view depth recovery, depth within continuous surface can be recovered only up to an ambiguous scale; thus different surfaces may end up with different scales, leading to incorrect depth ordering between surfaces. But workers already decide which side of an occlusion boundary is closer to the viewer. Based on such knowledge, we correct depth order by scaling the depth of each surface. + +We now describe the details. Let $\mathbf{S}$ denotes the set of all continuous surface. From integration, we obtain the depth + +$Z_{S}$ of each $S \in \mathbf{S}$ . We then solve for a scaling factor $X_{S}$ for each $S$ , which is used in scaling depth $Z_{S}$ . Let $\mathbf{O}$ denote the set of occlusion boundaries. Along $\mathbf{O}$ , we densely sample a set of point pairs $\mathbf{B}$ . Each pair $(p, q) \in \mathbf{B}$ has $p$ lying on the closer side of one of the occlusion boundaries $O_{i} \in \mathbf{O}$ and $q$ the further side. The continuous surface a pixel $p$ lies on is $S(p)$ , and its depth is $Z_{p}$ . The set of optimal scaling factors $\mathbf{X}^{*}$ is solved for as follows: + +$$ +\mathbf {X} ^ {*} = \underset {\mathbf {X}} {\operatorname {a r g m i n}} \sum_ {S \in \mathbf {S}} X _ {S} \tag {3} +$$ + +$$ +\text {s . t .} \quad X _ {S (p)} Z _ {p} + \epsilon \leq X _ {S (q)} Z _ {q}, \forall (p, q) \in \mathbf {B} \tag {4} +$$ + +$$ +X _ {S} \geq \eta , \forall S \in \mathbf {S} \tag {5} +$$ + +where $\epsilon > 0$ is a minimum separation between surfaces, and $\eta > 0$ is a minimum scale factor. Eq.(4) requires the surfaces to meet the depth order constraints specified by point pairs $(p, q) \in \mathbf{B}$ after scaling. Meanwhile, Eq.(3) constrains the value of $\mathbf{X}$ so that they do not increase indefinitely. After correcting the depth order, the final depth for surface $S$ is $X_S^* Z_S$ . We normalize and reproject the final depth to 3D as point clouds, and generate 3D meshes for visualization. + +# 5. Dataset Statistics + +Statistics of Surfaces Fig. 3 plots various statistics of the 3D surfaces. Fig. 3 (a) plots the distribution of focal length. We see that focal lengths in OASIS vary greatly: they range from wide angle to telezoom, and are mostly $1 \times$ to $10 \times$ of the width of the image. Fig. 3 (b) visualizes the distribution of surface normals. We see that a substantial proportion of normals point directly towards the camera, suggesting that parallel-frontal surfaces frequently occur in natural scenes. Fig. 3 (c) presents region-wise statistics. We see that most regions $(90\% +)$ contain occlusion boundaries and close to half have both occlusion boundaries and folds (top). We also see that most regions $(70\% +)$ contain at least one curve surface (bottom). Fig. 3 (d) shows the histogram of + +
NYU Depth [31] (depth mean: 2.471 m, depth std: 0.754 m)Tanks & Temples [16] (depth mean: 4.309m, depth std: 3.059m)
Human-HumanHuman-SensorCNN-SensorHuman-HumanHuman-SensorCNN-Sensor
Depth (EDist)0.078m0.095m0.097m [17]0.194m0.213m0.402m [17]
Normals (MAE)13.13°17.82°14.19° [44]14.33°20.29°29.11° [44]
Post-Rotation Depth (EDist)0.037m0.048m-0.082m0.080m-
Depth Order (WKDR)5.68%8.67%11.90%9.28%10.80%32.13%
+ +Table 1. Depth and normal difference between different humans (Human-Human), between human and depth sensor (Human-Sensor), and between ConvNet and depth sensor (CNN-Sensor). The results are averaged over all human pairs. + +![](images/2da3174b031b476b2e23dd58be648f1420121d5757a85a74adcdccec54620204.jpg) +Figure 4. Humans estimate shape correctly but the absolute orientation can be slightly off, causing large depth error after perspective back-projection into 3D. Depth error drops significantly (from $0.07\mathrm{m}$ to $0.01\mathrm{m}$ ) after a global rotation of normals. + +the number of different kinds of surfaces in an annotated region. We see that most regions consist of multiple disconnected pieces and have non-trivial geometry in terms of continuity and smoothness. + +Annotation Quality We study how accurate and consistent the annotations are. To this end, we randomly sample 50 images from NYU Depth [31] and 70 images from Tanks and Temples [16], and have 20 workers annotate each image. Tab. 1 reports the depth and normal difference between human annotations, between human annotations and sensor ground truth, and between predictions from state-of-the-art ConvNets and sensor ground truth. Depth difference is measured by the mean Euclidean distance (EDist) between corresponding points in two point clouds, after aligning one to the other through a global translation and scaling (surface-wise scaling for human annotations and CNN predictions). Normal difference is measured in Mean Angular Error (MAE). We see in Tab. 1 that human annotations are highly consistent with each other and with sensor ground truth, and are better than ConvNet predictions, especially when the ConvNet is not trained and tested on the same dataset. + +We observe that humans often estimate the shape correctly, but the overall orientation can be slightly off, causing a large depth error against sensor ground truth (Fig. 4). This error can be particularly pronounced for planes close to orthogonal to the image plane. Thus we also compute the error after a rotational alignment with the sensor ground truth—we globally rotate the human annotated normals (up to 30 degrees) before generating the shape. After accounting for this global rotation of normals, human-sensor depth difference is further reduced by $47.96\%$ (relative) for NYU and $62.44\%$ (relative) for Tanks and Temples; a significant + +drop of normal error is also observed in human-human difference. + +We also measure the qualitative aspect of human annotations by evaluating the WKDR metric [5], i.e. the percentage of point pairs with inconsistent depth ordering between query and reference depth. Depth pairs are sampled in the same way as [5]. Tab. 1 again shows that human annotations are qualitatively accurate and highly consistent with each other. + +It is worth noting that metric 3D accuracy is not required for many tasks such as navigation, object manipulation, and semantic scene understanding—humans do well without perfect metric accuracy. Therefore human perception of depth alone can be the gold standard for training and evaluating vision systems, regardless of its metric accuracy. As a result, our dataset would still be valuable even if it were less metrically accurate than it is currently. + +# 6. Experiments + +To facilitate future research, we use OASIS to train and evaluate leading deep learning models on a suite of single-image 3D tasks including depth estimation, normal estimation, boundary detection, plane segmentation. Qualitative results are shown in Fig. 5. A train-val-test split of $110\mathrm{K}$ , $10\mathrm{K}$ , $20\mathrm{K}$ is used for all tasks. + +For each task we estimate human performance to provide an upperbound accounting for the variance of human annotations. We randomly sample 100 images from the test set, and have each image re-annotated by 8 crowd workers. That is, each image now has "predictions" from 8 different humans. We evaluate each prediction and report the mean as the performance expected of an average human. + +![](images/b54d396c9513a6329e4d0170db9fcea2112dd064ec79e1f369568f2dbdf164a2.jpg) +Figure 5. Qualitative outputs of the four tasks from representative models. More details and examples are in the supplementary material. + +# 6.1. Depth Estimation + +We first study single-view depth estimation. OASIS provides pixelwise metric depth in the wild. But as discussed in Sec 4, due to inherent single-image ambiguity, depth in OASIS is independently recovered within each continuous surface, after which the depth undergoes a surface-wise scaling to correct the depth order. The recovered depth is only accurate up to scaling within each continuous surface and ordering between continuous surfaces. + +Given this, in OASIS we provide metric depth ground truths that is surface-wise accurate up to a scaling factor. This new form of depth necessitates new evaluation metrics and training losses. + +Depth Metric The images in OASIS have varied focal lengths. This means that to evaluate depth estimation, we cannot simply use pixelwise difference between a predicted depth map and the ground truth map. This is because the predicted 3D shape depends greatly on the focal length—given the same depth values, decreasing the focal length will flatten the shape along the depth dimension. In practice, the focal length is often unknown for a test image. Thus, we require a depth estimator to predict a focal length along with depth. Because the predicted focal length may differ from the ground truth focal length, pixelwise depth difference is a poor indicator of how close the predicted 3D shape is to the ground truth. + +A more reasonable metric is the Euclidean distance between the predicted and ground-truth 3D point cloud. Concretely, we backproject the predicted depth $Z$ to a 3D point cloud $\mathbf{P} = \{(X_p,Y_p,Z_p)\}$ using $f$ (the predicted focal length), and ground truth depth $Z^{*}$ to $\mathbf{P}^{*} = \{(X_{p}^{*},Y_{p}^{*},Z_{p}^{*})\}$ using $f^{*}$ (the ground truth focal length). We then calculate the distance between $\mathbf{P}$ and $\mathbf{P}^{*}$ . + +The metric also needs to be invariant to surface-wise depth scaling and translation. Therefore we introduce a surface-wise scaling factor $\lambda_{S_i} \in \Lambda$ , and a surface-wise translation $\delta_{S_i} \in \Delta$ , to align each predicted surface $S_i \in \mathbf{S}$ in $\mathbf{P}$ to the ground truth point cloud $\mathbf{P}^*$ in a least square manner. The final metric, which we call Locally Scale-Invariant RMSE (LSIV_RMSE), is defined as: + +$$ +\begin{array}{l} L S I V \_ R M S E (Z, Z ^ {*}) = \min _ {\boldsymbol {\Lambda}, \boldsymbol {\Delta}} \sum_ {p} \left(\frac {\left(X _ {p} ^ {*} , Y _ {p} ^ {*} , Z _ {p} ^ {*}\right)}{\sigma \left(X ^ {*}\right)}\right) \tag {6} \\ - \lambda_ {S (p)} (X _ {p}, Y _ {p}, Z _ {p}) - (0, 0, \delta_ {S (p)})) ^ {2}, \\ \end{array} +$$ + +where $S(p)$ denotes the surface a pixel $p$ is on. The ground truth point cloud $\mathbf{P}^*$ is normalized to a canonical scale by the standard deviation of its X coordinates $\sigma(X^*)$ . Under this metric, as long as $\mathbf{P}$ is accurate up to scaling and translation, it will align perfectly with $\mathbf{P}^*$ , and get 0 error. + +Note that LSIV_RMSE ignore the ordering between two separate surfaces; it allows objects floating in the air to be arbitrarily scaled. This is typically not an issue because in most scenes there are not many objects floating in the air. But we nonetheless also measure the correctness of depth ordering. We report WKDR [5], which is the percentage of point pairs that have incorrect depth order in the predicted depth. We evaluate on depth pairs sampled in the same way as [5], i.e. half are random pairs, half are from the same random horizontal lines. + +Models We train and evaluate two leading depth estimation networks on OASIS: the Hourglass network [5], and ResNetD [38], a dense prediction network based on ResNet50. Each network predicts a metric depth map and a focal length, which are together used to backproject pixels to 3D points, which are compared against the ground truth to compute the LSIV_RMSE metric, which we optimize as the loss function during training. Note that we do not supervise on the predicted focal length. + +We also evaluate leading pre-trained models that estimate single-image depth on OASIS, including FCRN [17] trained on ILSVRC [27] and NYU Depth [31], Hourglass [18] trained on MegaDepth [18], ResNetD [38] trained on a combination of datasets including ILSVRC [27], Depth in the Wild [5], ReDWeb [38] and YouTube3D [6]. For networks that do not produce a focal length, we use the validation set to find the best focal length that leads to the smallest LSIV_RMSE, and use this focal length for each test image. In addition, we also evaluate plane, a naive baseline that predicts a uniform depth map. + +Tab. 2 reports the results. In terms of metric depth, we see that networks trained on OASIS perform the best. This is expected because they are trained to predict a focal length and to directly optimize the LSIV_RMSE metric. It is noteworthy that ImageNet pretraining provides a significant benefit even for this purely geometrical task. Off-the-shelf models do not perform better than the naive baseline, probably because they were not trained on diverse enough scenes or were not trained to optimize metric depth error. In terms of relative depth, it is interesting to see that ResNetD trained + +
MethodTraining DataLSIV_RMSEWKDR
FCRN [17]ImageNet [27] + NYU [31]0.6739.94%
Hourglass [5, 18]MegaDepth [18]0.6738.37%
ResNetD [38, 6]ImageNet [27] + YouTube3D [6] + ReDWeb [38] + DIW [5]0.6634.03%
ResNetD [38]ImageNet [27] + OASIS0.3732.04%
ResNetD [38]OASIS0.4738.79%
Hourglass [5]OASIS0.4739.64%
Plane-0.67100.00%
Human (Approx)-0.2419.33%
+ +on ImageNet and OASIS performs the best, even though the training loss does not enforce depth ordering. We also see that there is still a significant gap between human performance and machine performance. At the same time, the gap is not hopelessly large, indicating the effectiveness of a large training set. + +Table 2. Depth estimation performance of different networks on OASIS (lower is better). For networks that do not produce a focal length, we use the best focal length leading to the smallest error. + +
MethodTraining DataOASIS
Angle MeanDistance Median% Within t°Relative AUCoNormal AUCp
11.25°22.5°30°
Hourglass [7]OASIS23.3418.0831.4459.7972.250.55080.5439
Hourglass [7]SNOW [7]30.7426.6514.3340.8456.730.53290.4714
Hourglass [7]NYU [31]34.6928.7614.6538.4952.060.54150.5061
PBRS [44]NYU [31]38.0933.0011.9432.5845.290.57290.5227
Front_Facing-31.2024.7627.3646.6256.940.50000.5000
Human (Approx)-17.4313.0843.8975.9484.720.88700.6439
+ +Table 3. Surface normal estimation on OASIS. + +
MethodTraining DataDIODE [35]ETH3D [30]
Angle Distance Mean% Within t°Angle Distance Mean% Within t°
11.25°22.5°30°11.25°22.5°30°
Hourglass [7]OASIS34.5713.7135.6949.6534.5123.5252.0462.73
Hourglass [7]SNOW [7]40.108.2927.2040.6745.7110.6931.1643.16
Hourglass [7]NYU [31]42.2310.9729.7641.3541.8421.9444.0553.81
PBRS [44]NYU [31]42.599.9629.0840.7239.9118.6844.7656.08
Front_Facing-47.765.6218.7028.0558.9711.8423.7530.19
+ +Table 4. Cross-dataset generalization. + +# 6.2. Surface Normal Estimation + +We now turn to single-view surface normal estimation. We evaluate on absolute normal, i.e. the pixel-wise predicted normal values, and relative normal, i.e. the parallel and orthogonal relation predicted between planar surfaces. + +Absolute Normal Evaluation We use standard metrics proposed in prior work [37]: the mean and median of angular error measured in degrees, and the percentage of pixels whose angular error is within $\gamma$ degrees. + +We evaluate on OASIS four state-of-the-art networks that are trained to directly predict normals: (1) Hourglass [7] trained on OASIS, (2) Hourglass trained on the Surface Normal in the Wild (SNOW) dataset [7], (3) Hourglass trained on NYU Depth [31], and (4) PBRS, a normal estimation network by Zhang et al. [44] trained on NYU Depth [31]. We also include Front_Facing, a naive baseline predicting all normals to be orthogonal to the image plane. + +Tab. 3 reports the results. As expected, the Hourglass network trained on OASIS performs the best. Although SNOW is also an in-the-wild dataset, the same network trained on it does not perform as well, but is still better + +![](images/7de39f9315638538da15a29d9f5cd6d9faacfee8398a3db29cae7b6eb2154a03.jpg) +RGB Image +Figure 6. Limitations of standard metrics: a deep network gets low mean angle error but important details are wrong. + +![](images/e93f0a503d4e3a3556869e9bb5b58d72a048248ecfe22d5e3b7446892908f3e9.jpg) +Predicted Normals +Ground-truth Normals by Humans + +than training on NYU. Notably, the human-machine gap appears fairly small numerically (17.43 versus 23.34 in mean angle error). However, we observe that the naive baseline can achieve 31.20; thus the dynamic range of this metric is small to start with, due to the natural distribution of normals in the wild. In addition, a close examination of the results suggests that these standard metrics of surface normals do not align well with perceptual quality. In natural images there can be large areas that dominate the metric but have uninteresting geometry, such as a blank wall in the background. For example, in Fig. 6, a neural network gets the background correct, but largely misses the important details in the foreground. This opens up an interesting research question about developing new evaluation metrics. + +Relative Normal Evaluation We also evaluate the predicted normals in terms of relative relations, specifically orthogonality and parallelism. Getting these relations correct is important because it can help find vanishing lines and perform self-calibration. + +We first define a metric to evaluate relative normal. From the human annotations, we first sample an equal number of point pairs from surface pairs that are parallel, orthogonal, and neither. Given a predicted normal map, we look at the two normals at each point pair and measure the angle $\theta$ between them. We consider them orthogonal if $|\cos (\theta - 90^{\circ})| < \cos (\Theta_{o})$ , and parallel if $|\cos (\theta)| > \cos (\Theta_{p})$ , where $\Theta_{o}, \Theta_{p}$ are thresholds. We then plot the Precision-and-Recall curve for orthogonal by varying $\Theta_{o}$ and measure its Area Under Curve $\mathbf{AUC}_{\mathbf{o}}$ , using neither and parallel pairs as negative examples. Varying $\Theta_{p}$ and using neither and orthogonal as negative examples, we obtain $\mathbf{AUC}_{\mathbf{p}}$ for parallel. + +Tab. 3 reports results of relative normal evaluation. Notably, all methods perform similarly, and all perform very poorly compared to humans. This suggests that existing approaches to normal estimation have limitations in capturing orthogonality and parallelism, indicating the need for further research. + +Cross-Dataset Generalization Next we study how networks trained on OASIS generalize to other datasets. Surface normal estimation is ideal for such evaluation because unlike depth, which is tricky to evaluate on a new dataset due to scale ambiguity and varying focal length, a normal estimation network can be directly evaluated on a new dataset without modification. + +We train the same Hourglass network on OASIS, and NYU, and report their performance on two benchmarks not seen in training: DIODE [35] and ETH3D [30]. From Tab. 4 we see that training on NYU underperforms on all benchmarks, showing that networks trained on scene-specific datasets have difficulties generalizing to diverse scenes. Training on OASIS outperforms on all benchmarks, demonstrating the effectiveness of diverse annotations. + +# 6.3. Fold and Occlusion Boundary Detection + +Occlusion and fold are both important 3D cues, as they tell us about physical connectivity and curvature: Occlusion delineates the boundary at which surfaces are physically disconnected to each other, while Fold is where geometry changes abruptly but the surfaces remain connected. + +Task We investigate joint boundary detection and occlusion-versus-fold classification: deciding whether a pixel is a boundary (fold or occlusion) and if so, which kind it is. Prior work has explored similar topics: Hoiem et al. [13] and Stein et al. [33] handcraft edge or motion features to perform occlusion detection, but our task involves folds, not just occlusion lines. + +
Metric\ModelEdge: All FoldEdge: All OccHED [40]Hourglass [5]Human (Approx)
ODS0.1230.5390.5330.5850.810
OIS0.1290.5760.5840.6390.815
AP0.0200.4400.4660.5470.642
+ +Evaluation Metric We adopt metrics similar to standard ones used in edge detection [1, 40]: F-score by optimal threshold per image (OIS), by fixed threshold (ODS) and average precision (AP). For a boundary to be considered correct, it has to be labeled correctly as either occlusion or fold. More details on the metrics can be found in the supplementary material. + +To perform joint detection of fold and occlusion, we adapt and train two networks on OASIS: Hourglass [5], and a state-of-the-art edge detection network HED [40]. The networks take in an image, and output two probabilities per pixel: $p_e$ is the probability of being an boundary pixel (occlusion or fold), and $p_f$ is the probability of being a fold pixel. Given a threshold $\tau$ , pixels whose $p_e < \tau$ are neither fold nor occlusion. Pixels whose $p_e > \tau$ are fold if $p_F > 0.5$ and otherwise occlusion. + +As baselines, we also investigate how a generic edge detector would perform on this task. We use HED network trained on BSDS dataset [1] to detect image edges, and classify the resulting edges to be either all occlusion (Edge: All Occ) or all fold (Edge: All Fold). + +All results are reported on Tab 5. Hourglass outperforms HED when trained on OASIS, and significantly outperforms both the All-Fold and All-Occlusion baselines, but still underperforms humans by a large margin, suggesting that fold + +and occlusion boundary detection remains challenging in the wild. + +# 6.4. Instance Segmentation of Planes + +Our last task focuses on instance segmentation of planes in the wild. This task is important because planes often have special functional roles in a scene (e.g. supporting surfaces, walls). Prior work has explored instance segmentation of planes, but is limited to indoor or driving environments [21, 42, 20, 41]. Thanks to OASIS, we are able to present the first-ever evaluation of this task in the wild. + +We follow the way prior work [21, 20, 42] performs this task: a network takes in an image, and produces instance masks of planes, along with an estimate of planar parameters that define each 3D plane. To measure performance, we report metrics used in instance segmentation literature [19]: the average precision (AP) computed and averaged across a range of overlap thresholds (ranges from $50\%$ to $95\%$ as in [19, 8]). A ground truth plane is considered correctly detected if it overlaps with one of the detected planes by more than the overlap threshold, and we penalize multiple detection as in [8]. We also report the AP at $50\%$ overlap $(\mathrm{AP}^{50\%})$ and $75\%$ overlap $(\mathrm{AP}^{75\%})$ . + +PlanarReconstruction by Yu et al. [42] is a state-of-the-art method for planar instance segmentation. We train PlanarReconstruction on three combinations of data: (1) ScanNet [9] only as done in [42], (2) OASIS only, and (3) ScanNet + OASIS. Tab. 6 compares their performance. + +As expected, training on ScanNet alone performs the worse, because ScanNet only has indoor images. Training on OASIS leads to better performance. Leveraging both ScanNet and OASIS is the best overall. But even the best network significantly underperforms humans, suggesting ample space for improvement. + +Table 5. Boundary detection performance on OASIS. + +
MethodTraining DataAP\( AP^{50\%} \)\( AP^{75\%} \)
PlanarReconstruction [42]ScanNet [9]0.0760.1610.065
OASIS0.1270.2500.112
ScanNet [9] + OASIS0.1390.2640.130
Human (Approx)-0.4610.5420.476
+ +Table 6. Planar instance segmentation performance on OASIS. + +# 7. Conclusion + +We have presented OASIS, a dataset of rich human 3D annotations. We trained and evaluated leading models on a variety of single-image tasks. We expect OASIS to be a useful resource for 3D vision research. + +Acknowledgement This work was partially supported by a National Science Foundation grant (No. 1617767), a Google gift, and a Princeton SEAS innovation grant. + +# References + +[1] Pablo Arbelaez, Michael Maire, Charless Fowlkes, and Jitendra Malik. Contour detection and hierarchical image seg + +mentation. IEEE transactions on pattern analysis and machine intelligence, 33(5):898-916, 2011. +[2] Jonathan T Barron and Jitendra Malik. Color constancy, intrinsic images, and shape estimation. In European Conference on Computer Vision, pages 57-70. Springer, 2012. +[3] Sean Bell, Paul Upchurch, Noah Snavely, and Kavita Bala. OpenSurfaces: A richly annotated catalog of surface appearance. ACM Trans. on Graphics (SIGGRAPH), 32(4), 2013. +[4] D. J. Butler, J. Wulff, G. B. Stanley, and M. J. Black. A naturalistic open source movie for optical flow evaluation. In A. Fitzgibbon et al. (Eds.), editor, European Conf. on Computer Vision (ECCV), Part IV, LNCS 7577, pages 611-625. Springer-Verlag, Oct. 2012. +[5] Weifeng Chen, Zhao Fu, Dawei Yang, and Jia Deng. Single-image depth perception in the wild. In Advances in Neural Information Processing Systems, pages 730-738, 2016. +[6] Weifeng Chen, Shengyi Qian, and Jia Deng. Learning single-image depth from videos using quality assessment networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5604-5613, 2019. +[7] Weifeng Chen, Donglai Xiang, and Jia Deng. Surface normals in the wild. In Proceedings of the 2017 IEEE International Conference on Computer Vision, Venice, Italy, pages 22-29, 2017. +[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 Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3213-3223, 2016. +[9] Angela Dai, Angel X Chang, Manolis Savva, Maciej Halber, Thomas A Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In CVPR, volume 2, page 10, 2017. +[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. +[11] 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, pages 2366-2374, 2014. +[12] Andreas Geiger, Philip Lenz, Christoph Stiller, and Raquel Urtasun. Vision meets robotics: The kitti dataset. International Journal of Robotics Research (IJRR), 2013. +[13] Derek Hoiem, Alexei A Efros, and Martial Hebert. Recovering occlusion boundaries from an image. International Journal of Computer Vision, 91(3):328-346, 2011. +[14] Eddy Ilg, Tonmoy Saikia, Margret Keuper, and Thomas Brox. Occlusions, motion and depth boundaries with a generic network for disparity, optical flow or scene flow estimation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 614-630, 2018. +[15] Kevin Karsch, Zicheng Liao, Jason Rock, Jonathan T. Barron, and Derek Hoiem. Boundary cues for 3d object shape recovery. In CVPR, 2013. + +[16] Arno Knapitsch, Jaesik Park, Qian-Yi Zhou, and Vladlen Koltun. Tanks and temples: Benchmarking large-scale scene reconstruction. ACM Transactions on Graphics, 36(4), 2017. +[17] Iro Laina, Christian Rupprecht, Vasileios Belagiannis, Federico Tombari, and Nassir Navab. Deeper depth prediction with fully convolutional residual networks. In 2016 Fourth international conference on 3D vision (3DV), pages 239-248. IEEE, 2016. +[18] Zhengqi Li and Noah Snavely. Megadepth: Learning single-view depth prediction from internet photos. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2041-2050, 2018. +[19] 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. +[20] Chen Liu, Kihwan Kim, Jinwei Gu, Yasutaka Furukawa, and Jan Kautz. Planercnn: 3d plane detection and reconstruction from a single image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4450-4459, 2019. +[21] Chen Liu, Jimei Yang, Duygu Ceylan, Ersin Yumer, and Yasutaka Furukawa. Planenet: Piece-wise planar reconstruction from a single rgb image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2579-2588, 2018. +[22] N. Mayer, E. Ilg, P. Häusser, P. Fischer, D. Cremers, A. Dosovitskiy, and T. Brox. A large dataset to train convolutional networks for disparity, optical flow, and scene flow estimation. In IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2016. arXiv:1512.02134. +[23] John McCormac, Ankur Handa, Stefan Leutenegger, and Andrew J Davison. Scenenet rgb-d: 5m photorealistic images of synthetic indoor trajectories with ground truth. arXiv preprint arXiv:1612.05079, 2016. +[24] 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. +[25] Yvain Queau, Jean-Denis Durou, and Jean-François Aujol. Normal integration: a survey. Journal of Mathematical Imaging and Vision, 60(4):576-593, 2018. +[26] Stephan R Richter, Vibhav Vineet, Stefan Roth, and Vladlen Koltun. Playing for data: Ground truth from computer games. In European Conference on Computer Vision, pages 102-118. Springer, 2016. +[27] 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. +[28] Bryan C Russell and Antonio Torralba. Building a database of 3d scenes from user annotations. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 2711-2718. IEEE, 2009. + +[29] Ashutosh Saxena, Sung H Chung, and Andrew Y Ng. 3-d depth reconstruction from a single still image. International journal of computer vision, 76(1):53-69, 2008. +[30] Thomas Schöps, Johannes L Schonberger, Silvano Galliani, Torsten Sattler, Konrad Schindler, Marc Pollefeys, and Andreas Geiger. A multi-view stereo benchmark with high-resolution images and multi-camera videos. In Conference on Computer Vision and Pattern Recognition (CVPR), volume 2017, 2017. +[31] Nathan Silberman, Derek Hoiem, Pushmeet Kohli, and Rob Fergus. Indoor segmentation and support inference from rgbd images. In European Conference on Computer Vision, pages 746-760. Springer, 2012. +[32] Shuran Song, Fisher Yu, Andy Zeng, Angel X Chang, Manolis Savva, and Thomas Funkhouser. Semantic scene completion from a single depth image. IEEE Conference on Computer Vision and Pattern Recognition, 2017. +[33] Andrew N Stein and Martial Hebert. Occlusion boundaries from motion: Low-level detection and mid-level reasoning. International journal of computer vision, 82(3):325, 2009. +[34] Xingyuan Sun, Jiajun Wu, Xiuming Zhang, Zhoutong Zhang, Chengkai Zhang, Tianfan Xue, Joshua B Tenenbaum, and William T Freeman. Pix3d: Dataset and methods for single-image 3d shape modeling. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2974-2983, 2018. +[35] Igor Vasiljevic, Nick Kolkin, Shanyi Zhang, Ruotian Luo, Haochen Wang, Falcon Z Dai, Andrea F Daniele, Mohammadreza Mostajabi, Steven Basart, Matthew R Walter, et al. Diode: A dense indoor and outdoor depth dataset. arXiv preprint arXiv:1908.00463, 2019. +[36] Peng Wang, Xiaohui Shen, Bryan Russell, Scott Cohen, Brian Price, and Alan L Yuille. Surge: Surface regularized geometry estimation from a single image. In Advances in Neural Information Processing Systems, pages 172-180, 2016. +[37] Xiaolong Wang, David Fouhey, and Abhinav Gupta. Designing deep networks for surface normal estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 539-547, 2015. +[38] Ke Xian, Chunhua Shen, Zhiguo Cao, Hao Lu, Yang Xiao, Ruibo Li, and Zhenbo Luo. Monocular relative depth perception with web stereo data supervision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 311-320, 2018. +[39] Yu Xiang, Wonhui Kim, Wei Chen, Jingwei Ji, Christopher Choy, Hao Su, Roozbeh Mottaghi, Leonidas Guibas, and Silvio Savarese. Objectnet3d: A large scale database for 3d object recognition. In European Conference on Computer Vision, pages 160-176. Springer, 2016. +[40] Saining Xie and Zhuowen Tu. Holistically-nested edge detection. In Proceedings of the IEEE international conference on computer vision, pages 1395-1403, 2015. +[41] Fengting Yang and Zihan Zhou. Recovering 3d planes from a single image via convolutional neural networks. In Proceedings of the European Conference on Computer Vision (ECCV), pages 85-100, 2018. + +[42] Zehao Yu, Jia Zheng, Dongze Lian, Zihan Zhou, and Shenghua Gao. Single-image piece-wise planar 3d reconstruction via associative embedding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1029-1037, 2019. +[43] Bernhard Zeisl, Marc Pollefeys, et al. Discriminatively trained dense surface normal estimation. In European conference on computer vision, pages 468-484. Springer, 2014. +[44] Yinda Zhang, Shuran Song, Ersin Yumer, Manolis Savva, Joon-Young Lee, Hailin Jin, and Thomas Funkhouser. Physically-based rendering for indoor scene understanding using convolutional neural networks. The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. \ No newline at end of file diff --git a/oasisalargescaledatasetforsingleimage3dinthewild/images.zip b/oasisalargescaledatasetforsingleimage3dinthewild/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..e57d8de5ff6a1aa22b5046c23a165cd2e3c8944f --- /dev/null +++ b/oasisalargescaledatasetforsingleimage3dinthewild/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c182864f7e74592c5348f661a47f9a3a1acf7284574f1da034dbb36420dcaf92 +size 498754 diff --git a/oasisalargescaledatasetforsingleimage3dinthewild/layout.json b/oasisalargescaledatasetforsingleimage3dinthewild/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2bebb5b4c90146cb11fe9412cf16499337cadb68 --- /dev/null +++ b/oasisalargescaledatasetforsingleimage3dinthewild/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d480af9ec9781e4b2a832a8888410a3d0e3d8ed86565b82fd4de7f8130d193ff +size 417159 diff --git a/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/328349c7-2959-4a8c-97e6-38b16a22439c_content_list.json b/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/328349c7-2959-4a8c-97e6-38b16a22439c_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..66c177a7b7dc8dff5d6dd4fe465e0e68e3e3b159 --- /dev/null +++ b/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/328349c7-2959-4a8c-97e6-38b16a22439c_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:500cbef61c13e0931521b237d7b8caa7ba2a768291d12c97a6ae75001cd5c8d4 +size 65711 diff --git a/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/328349c7-2959-4a8c-97e6-38b16a22439c_model.json b/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/328349c7-2959-4a8c-97e6-38b16a22439c_model.json new file mode 100644 index 0000000000000000000000000000000000000000..f17f21fac7a4de68cee41c2edac1c5ac8b317efb --- /dev/null +++ b/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/328349c7-2959-4a8c-97e6-38b16a22439c_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:231f890814785e5f94170fa59d0851cba2384878daf561a496636059d371158a +size 85830 diff --git a/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/328349c7-2959-4a8c-97e6-38b16a22439c_origin.pdf b/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/328349c7-2959-4a8c-97e6-38b16a22439c_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4e6b1b8b6ee0b7a8f21960b933128a9e3eede798 --- /dev/null +++ b/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/328349c7-2959-4a8c-97e6-38b16a22439c_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cbcffbec0b582ba0db53184940f8020abe6277c36db7441317c5102c25f9279a +size 1086089 diff --git a/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/full.md b/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a22f6be5a14b725d96f8db5d317e65fecabd4187 --- /dev/null +++ b/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/full.md @@ -0,0 +1,305 @@ +# Object-Occluded Human Shape and Pose Estimation from a Single Color Image + +Tianshu Zhang* Buzhen Huang* Yangang Wang† + +Southeast University, China + +# Abstract + +Occlusions between human and objects, especially for the activities of human-object interactions, are very common in practical applications. However, most of the existing approaches for 3D human shape and pose estimation require human bodies are well captured without occlusions or with minor self-occlusions. In this paper, we focus on the problem of directly estimating the object-occluded human shape and pose from single color images. Our key idea is to utilize a partial UV map to represent an object-occluded human body, and the full 3D human shape estimation is ultimately converted as an image inpainting problem. We propose a novel two-branch network architecture to train an end-to-end regressor via the latent feature supervision, which also includes a novel saliency map subnet to extract the human information from object-occluded color images. To supervise the network training, we further build a novel dataset named as 3DOH50K. Several experiments are conducted to reveal the effectiveness of the proposed method. Experimental results demonstrate that the proposed method achieves the state-of-the-art comparing with previous methods. The dataset, codes are publicly available at https://www.yangangwang.com. + +# 1. Introduction + +3D human shape and pose estimation from color images attracts lots of research interests in the area of computer vision. It may promote several promising virtual reality applications, such as body shape animation, shape retargeting, motion mimic and etc. Conventionally, the full 3D human body shape estimation has experienced from complex hardware (e.g., multi-view cameras, IMU sensors) to single devices (e.g., color camera, Kinect). In recent years, deep learning based techniques [17, 33, 51] have witnessed the rapid progress of recovering the full body human shape from single color images, though most of the existing approaches are addressed for the scenarios that human bod- + +![](images/1f3d48c8305c340f6fb511f8a7f7ea093d123059a154f2faba43b29444f0d243.jpg) +Figure 1. Our method performs well for the human shape and pose estimation from single object-occluded color images. + +ies are well captured without occlusions or with minor self-occlusions. However, occlusions between human and objects, especially for the activities of human-object interactions, are very common in practical applications. It is hard to achieve good performance for recovering the full 3D human body shape from object-occluded color images when the occlusions are not explicitly taken into account. In this paper, we mainly focus on the problem of estimating the object-occluded full 3D human shape and pose from single color images. + +Historically, 3D human shape and pose estimation from single color images is flourished after the Skinned Multi-Person Linear model (SMPL) [27] has been presented. It goes through several stages, including SMPL parameters optimization via fitting to 2D visual cues [3, 21], directly regressing the SMPL parameters with Convolutional Neural Network (CNN) [33, 30], volumetric representation for 3D human shape [15, 43], and 2D UV map representation for the human body geometry surface [51, 54]. Although deep learning has become the mainstream of full 3D human body estimation due to its accuracy and runtime efficiency, it cannot be directly shifted to handle the object-occluded human body estimation without explicitly considering occlusions. There are two main challenges. The first one is that there is a lack of sufficient data for the network training. Existing datasets are not originally designed for the occluded human shape estimation. The other one is object-occlusions would introduce severe ambiguities into the network training, and + +thus confuse the full 3D human body shape estimation. + +To tackle the obstacles, we investigate different human body representations and take the up-to-date 2D UV map [6, 51] to describe the 3D human shape. Even so, it is still hard to directly regress the full 2D UV map via CNN due to the ambiguities caused by occlusions. Our key idea is to utilize a partial UV map to describe an object-occluded human body and convert the full 3D human shape estimation as a UV map inpainting problem, as shown in Fig.2. We propose a novel two-branch encoder-decoder network architecture, where the first branch is a UV map inpainting and the second branch keeps an input color image to be consistent with its partial UV map in their latent feature spaces. Both of the two branches share the same decoder, and they are trained separately with different datasets. Typically, the UV map inpainting branch, which could be regarded as a prior for body shapes, can be trained without color images. It is also worth noting that the pixels in color images that are not part of bodies may fool the color image encoder, we then introduce a saliency map estimation subnetwork to emphasize the importance of human pixels in color images as shown in Fig.2 (b). Although the proposed network focuses on the object-occluded human shape estimation, it does not affect the performance of non-occluded human shape estimation and also achieves the state-of-the-art, as shown in Sec.5. + +Our network can be run efficiently both for training and inference. At the training stage, a two-step training strategy is adopted to optimize the network parameters. We first train the UV map inpainting branch, and then its parameters are fixed to supervise the training of the color image encoder (Fig.2 (c) and (d)). At the inference stage, a single color image is passed through the saliency map subnetwork, the color image encoder, and the decoder of UV map inpainting branch. However, to train the proposed network, we found that human-object occlusion datasets are far from sufficient. We first added virtual objects into existing datasets (e.g., Human3.6M [13]) to synthesize occlusions. To further facilitate the network training, we build a new dataset named as 3DOH50K. The new dataset contains more than 51600 images, where all images were captured from real scenes with 6 viewpoints, and we used the modified SMPLify-X[32] to fit the SMPL model. Finally, each instance has an accurate 2D pose, a 3D pose, SMPL parameters, and a binary mask. To the best of our knowledge, 3DOH50K is the first real dataset for the problem of human-object occlusion. The proposed dataset could provide a new challenge benchmark for human reconstruction and pose estimation in occlusion scenarios. + +The main contributions of this work are summarized as follows. + +- We take a partial UV map representation for an object-occluded 3D human body, and describe the full 3D hu + +man shape and pose estimation as an image inpainting problem. + +- We propose a novel two-branch network architecture to train an end-to-end human shape regressor for estimating the full 3D human shape and pose from single color images. +- We build a novel object-occluded human dataset, which is named as 3DOH50K, to ease the network training. The dataset, codes are publicly available at https://www.yangangwang.com. + +# 2. Related Work + +Human pose and shape estimation. Traditional human pose and shape estimation methods mostly use the complex hardware to obtain the human body's cues, and estimate the full 3D human body pose and shape through iterative optimization[12, 45, 23] or deep learning[41, 2, 25]. Due to various limitations of hardware, they cannot be easily applied to real-world scenarios. In order to accurately estimate the pose and shape of the human body from single RGB camera, [17, 30, 33, 55] parameterized the mesh in terms of 3D joint angles and a low dimensional linear shape space. Unlike the previous methods[48, 3], they directly infer 3D mesh parameters from image features which avoided two stage training and also avoided throwing away lots of image information. In order to avoid complex nonlinear mapping of parameter prediction methods, Venkat et al. [44] proposed HumanMeshNet that regressed a template mesh's vertices. Some recent works[51, 1, 22] turned a hard 3D inference problem into an image-to-image translation which is amenable to CNNs by encoding appearance and geometry layout on a common SMPL UV-space. + +Occlusion. Huang et al. [11] presented a method capable of recovering 3D human pose when a person is partially or heavily occluded in the scene from monocular images. However, the occlusions are limited to two rectangles. [36] presented a systematic study of various types of synthetic occlusions in 3D human pose estimation from a single RGB image. Since synthetic data can not fully depict the real occlusion, Girshick et al. [8] learned from real data and used grammar models with explicit occluding templates to reason about occluded people. To avoid specific design for occlusion patterns, [7] presented a method for modeling occlusion that was aimed at explicitly learning the appearance and statistics of occlusion patterns. [34] integrated depth information about occluded objects into 3D pose estimation framework. In the scope of face de-occlusion, [42] tried to address the problem of detailed face reconstruction from occluded images. [53] proposed a novel deep face de-occlusion framework, which can handle face images under challenging conditions. In [46], a very effective occluded face recognition algorithm, GD-HASLR, was proposed. It has strong robustness to the shape and the size of + +![](images/3c307954aa9d23726c647b333604c077fc7e715af65e8771cbe2f39b70c15765.jpg) +Figure 2. Overview of the proposed two-branch network. At the training stage, UV map inpainting branch (a) is trained at first. Then, the occluded color image is concatenated with its saliency map (b) and fed to color image encoder (c). The corresponding partial UV map is encoded by fixed inpainting network and used for supervising the color image encoder in latent space (d). At the inference stage, a single color image is passed through the saliency map sub-net (b) and the occluded human reconstruction sub-net (c). The output mesh is directly re-sampled from the UV position map. + +the occlusion object. Due to the fact that a human visual system explicitly ignores occlusions and only focuses on non-occluded areas, [39] proposed an occlusion robust face recognition approach with the pairwise differential siamese network (PDSN) that explicitly build the correspondence between occluded facial blocks and corrupted feature elements. + +Image Inpainting. Pathak et al. [31] proposed Context Encoders – the first work applies deep neural networks for image inpainting. It consists of an encoder capturing the context of an image into a compact latent feature representation and a decoder which uses that representation to produce the missing image content. [40] promoted this task with dividing it into inference and translation as two separate steps and each step with a deep neural network. Xiong et al. [47] learned to predict the foreground contour first, and then inpainted the missing region using the predicted contour as guidance. [52] proposed a new deep generative model-based approach which can not only synthesize novel image structures but also explicitly utilized surrounding image features as references during network training to make better predictions. [50] proposed a multi-scale neural patch synthesis approach based on joint optimization of image content and texture constraints, which preserves contextual structures and produces high-frequency details by matching and adapting patches with the most similar + +mid-layer feature correlations of a deep classification network. [49] proposed Shift-Net, which inherits the advantages of exemplar-based and CNN-based methods, and can produce inpainting result with both plausible semantics and fine detailed textures. + +# 3. Method + +An overview of the proposed method is shown in Fig.2. We use a partial UV map to represent the object-occluded human body, and human shape estimation is finally formulated as a UV map inpainting problem. + +# 3.1. Object-Occluded Human Representation + +We use the representation of 3-channel UV position map [6] to describe a human body for network training. The RGB values in a UV position map record 3D positions of a body mesh, where the map encodes the geometry topology of body surface. Based on the UV position map, we further promote a representation of 3D object-occluded human shapes. In our method, UV coordinates of all mesh vertices are provided by SMPL [27]. + +Fig.3 shows how we generate a partial UV position map from a body mesh and a segmentation mask. We project the body mesh into the image plane by a weak perspective projection. The projected points that are outside the segmentation mask are regarded as occluded vertices. Otherwise, + +![](images/5df5d6504701c37fc680fed9d48090a5c98facdb2f5a4436cba0493a607cb3ba.jpg) +(a) +RGB image +Figure 3. The Representation of Object-Occluded Human. Given an occluded human image (a) and the corresponding occlusion segmentation (b), we render the fitted human body model onto the 2D image plane (c). For the visible part, we store the normalized $x, y, z$ coordinates of the vertices as $r, g, b$ color values in the UV map. For the occlusion part, we set the $r, g, b$ values of the UV map to -0.5 (e). + +![](images/d9c8a3f2f5225cfcd3f55e64531545f158bd3aa511274f6535b16ae0e2f95e36.jpg) +(b) +Occlusion +segmentation + +![](images/3372145a5dd0c099191f081cc3d64bd528495131f1ba8d15c8462ceb4e5ca081.jpg) +(c) +Mesh overlay + +![](images/8a462d4d123179081f3112c9db19b2f72154b041cd3a4104a8eaf077260f4790.jpg) +(d) +Occluded Mesh + +![](images/184bb612afe41d3d92833cce15eba09edee339070765fb3bbd25baeabae4c02a.jpg) +(e) +Partial UV Map + +positions of visible vertices are normalized into a range of $-0.5$ to $0.5$ , and their $x, y, z$ coordinates are stored as 3-channel (RGB) values in the UV map. For occluded parts, we set the values of the UV map as $[-0.5, -0.5, -0.5]$ . Partial UV position map can accurately represent the object-occluded mesh. It should be noted that our partial UV map only considers the object-occlusion. For self-occlusion, [51, 1, 44] have proved that it can be easily estimated through the visible part of the body and the part of self-occlusion is encoded as the supervision in latent space. Notice that the output mesh can be re-sampled from a complete UV position map. + +# 3.2. UV Map Inpainting Sub-Network + +Estimating a full UV map from a partial UV map is an image-to-image translation problem [14]. As shown in Fig.2 (b), the process of partial-to-full is not affected by the background of the occluded color images. Thus, we can synthesize occlusions to train an inpainting network, which is robust to various types of occlusions. We follow the work [36] to perform the synthetic occlusion data synthesis on the Human3.6M dataset. + +We use an encoder-decoder structure to train the UV map inpainting sub-network and our loss function has three terms + +$$ +L = L _ {1} + \lambda L _ {t v} + \mu L _ {p}, \tag {1} +$$ + +which is a little different from [51]. + +The first term $L_{1}$ performs the supervision between predicted UV maps and ground-truth UV maps, which is, + +$$ +L _ {1} = \sum_ {j = 1} ^ {H} \sum_ {i = 1} ^ {W} \beta_ {i, j} \left(\left| P _ {i, j} - P _ {i, j} ^ {g t} \right|\right), \tag {2} +$$ + +where $\beta_{i,j}$ is a weight mask and the weight is inversely proportional to the part area. $W$ and $H$ are the width and height respectively. $P$ is the pixel RGB value. + +The second term $L_{tv}$ ensures the smoothness among + +each body parts, which has the form, + +$$ +L _ {t v} = \sum_ {k} \sum_ {(i, j) \in R _ {k}} \left(| P _ {i + 1, j} - P _ {i, j} | + | P _ {i, j + 1} - P _ {i, j} |\right), \tag {3} +$$ + +where $R_{k}$ is defined as the $k^{th}$ body part. + +Since $L_{tv}$ only guarantees the smoothness in the same part, it cannot guarantee the body connection part smooth. We then propose a third term named as part loss, which is + +$$ +L _ {p} = \sum_ {v _ {i} \in V _ {b}} \left| \bar {P} \left(v _ {i}\right) - p _ {i} ^ {g t} \right|, \tag {4} +$$ + +where $V_{b}$ is a set of vertices that have multiple UV coordinates. $\bar{P}(v_{i})$ means the average RGB value of UV coordinates corresponding to vertex $v_{i}$ . $p_{i}^{gt}$ is the ground truth position of vertex $v_{i}$ . + +# 3.3. Saliency Map Estimation Sub-Network + +To reduce the influences of invalid information such as background and occlusion for human shape and pose recovery, we introduce a sub-network to estimate human saliency map as shown in Fig.4. We use different scales of masks as intermediate supervision. The proposed saliency map, which can be treated as a representation of visual attention, is not an accurate segmentation. Even the state-of-the-art instance segmentation methods[9, 24] are hard to give the correct segmentation in the case of occlusion. However, the imperfect saliency map is good enough to reduce the influence of background and avoid extra cropping operation required by previous methods [17, 19, 20]. In Sec 5, we compare the results with and without saliency map to demonstrate the effectiveness of saliency map. + +# 3.4. Latent Feature Supervision + +For the UV map inpainting task, we assume that high dimensional features in the encoder part have a certain degree of prior knowledge for human body shapes. This drives us to utilize the high dimensional features extracted from the + +![](images/10009705c27872e3ca5d3e43940d14d02d8e53905549260de97cf551d296b609.jpg) +Figure 4. Overview of saliency map estimation Sub-Network. We propose a sub-network to estimate human saliency map which aims to reduce invalid information such as background and occlusion. We use different scales of masks as intermediate supervision. + +![](images/6316cbeb7df4994b5d6cea745c54aa164b83b4c9dc7b0b413c31fafcd8ee56fa.jpg) +Figure 5. Samples of the 3DOH50K. Each image in our dataset includes segmentation, 2D and 3D skeleton keypoints annotation and SMPL parameters. + +UV map inpainting branch to supervise the training of color image encoder (Fig.2 (d)). We found that using UV map high dimensional features as constraint could accelerate the convergence speed of training and is more accurate than directly predicting full UV position maps from color images as shown in the experiment section. + +# 4.3D Occlusion Human Dataset + +Most of existing 3D human datasets e.g., [13, 37] focus on the complexity and diversity of poses. Nevertheless, they often overlook the occlusions generated by the interactions between the human and objects, which are commonplace in the real world. Therefore, human pose and shape estimation methods trained on such datasets are sensitive to occlusions. To solve this challenging problem, we propose our dataset 3D Occlusion Human 50K(3DOH50K). It contains 51600 images, most of which are human activities in occlusion scenarios. Fig.5 shows some examples. All images are captured from real scenes with six views. 3DOH50K is the first real 3D human dataset for the problem of occlusion. Our dataset could provide a new challenge benchmark for human reconstruction and pose estimation in occlusion scenarios. + +# 4.1. Annotations + +Obtaining accurate annotations in occluded scenes is extremely difficult. We tried a variety of the state-of-the-art instance segmentation and pose estimation methods[9, 24, 5, 4]. It turns out that all of them do not achieve the desired results. Therefore, for each image, we first use MaskRCNN[9] and Alphapose[5] to automatically segment the mask and estimate the 2D keypoints. For the inaccurate parts, we manually corrected the mask and keypoints. Then, we fit the SMPL model with annotated keypoints by using SMPLify-X[32] in a multi-view strategy: + +$$ +E (\beta , \theta , T) = E _ {J} + \lambda_ {\theta_ {b}} E _ {\theta_ {b}} + \lambda_ {\alpha} E _ {\alpha} + \lambda_ {\beta} E _ {\beta} \tag {5} +$$ + +where $E_{\theta_b}$ , $E_{\alpha}$ and $E_{\beta}$ are same as [32]. For the data term $E_J$ we use 6-views re-projections to constrain the SMPL model: + +$$ +E _ {J} (\beta , \theta , T; K, J _ {\mathrm {e s t}}) = +$$ + +$$ +\sum_ {\text {v i e w} j} \sum_ {\text {j o i n t} i} w _ {j, i} \rho \left(\Pi_ {K _ {j}} \left(R _ {\theta} (J (\beta) _ {i}) + T\right) - J _ {\text {e s t}, j, i}\right) \tag {6} +$$ + +Finally, 3DOH50K has camera parameters of 6 views. Each image has an accurate 2D pose and 3D pose, SMPL parameters, and a binary mask. + +# 4.2. Dataset Statistics + +We compare different public datasets related to 3D pose estimation in Tab.1. Although existing datasets have high-quality annotations and a large amount of data, they hardly contain examples with occlusions. There are some occlusion sequences in CMU Panoptic[16] and 3DPW[45], but they have a similar pose for the entire occlusion sequence.(e.g., in the subset of Musical Instruments in CMU Panoptic Dataset, the instrument produces a large proportion of occlusion, but the pose and occlusion in the entire sequence are similar.) There is also a small amount of occluded samples in UP-3D dataset. However, since it is fitted through a monocular method [3], the depth information of ground truth is not processed well. [29] provides accurate + +
DatasetOcclusion DataReal Data2D Pose3D PoseOcclusion Seg.MeshCamera Param.
CMU Panoptic[16]++✓✓✓-✓✓
3DPW[45]++✓✓✓-✓✓
Human3.6M[13]-✓✓✓--✓
UP-3D[21]+✓✓✓-✓-
MPI-INF-3DHP[29]+✓✓✓✓-✓
3DOH50K (ours)+++++✓✓✓✓✓✓
+ +Table 1. Comparison among different public datasets related to 3D pose estimation. Occlusion data refers to the object-occluded data and + denotes the amount of occluded samples. + +occlusion segmentation, however it only contains very few types of occlusion. These shortcomings of existing datasets lead to their inability to perform 3D pose and shape estimation in occlusion situations. + +# 5. Experiments + +# 5.1. Datasets + +Human3.6M [13] is one of the most widely used 3D human datasets. It has 11 subjects, 15 kinds of action sequences and 1.5 million training images with accurate 3D annotations. Since Human3.6M dataset has no object occlusion, we adopt the method of [36] to add a synthetic occlusion on the image, an example is shown in Fig. 6 (row 3 right). Similar to [17], we use MoSH[26] to process the marker data in the original dataset, and obtain the ground truth SMPL parameters. For a fair comparison, we use 300K data in S1, S5, S6, S7, S8 for network training, and test in S9, S11. + +3DOH50K is the first 3D human occlusion dataset proposed by us. It contains 50310 training images and 1290 test images. It provides 2D, 3D annotations and SMPL parameters for generating meshes. Detailed information has been provided in Sec 4.2. + +3DPW [45] is captured via IMUs and contains both indoor and outdoor scenes. It provides accurate SMPL parameters and calibrated camera parameters. However, the occluded samples in the dataset are few and not representative. In order to demonstrate the effectiveness of our approach, we selected the occluded sequences from the entire dataset as a new testset. The names of these sequences are provided in the Supplementary Material. + +# 5.2. Implementation Details + +The U-Net structure [35] is adopted for Saliency Map Estimation and the model is supervised using the segmentation of human. In order to reduce the redundant latent features and make it easier to be consistent, a modified ResNet18 [10] and VGG-19 [38] are respectively used as encoder for partial UV maps and color images. The decoder part is simply composed of 6 consequent up-sampling and convolutional layers. The size of UV maps and color images in this work are all scaled to $256 \times 256$ . To generate ground + +truth UV position maps, we transform all meshes into the same normalized camera coordinate frame by weak perspective projection. For testing, SMPL fitting is performed to estimate SMPL parameters for quantitative comparison among different algorithms. Non-optimized L-BFGS algorithm is adopted for fitting, which takes about 30s. Since most of UV maps and saliency maps have zero values regions, we use leaky-ReLu[28] instead of ReLu. We use the Adam optimizer[18] with a batch-size of 10 and the initial learning rate set to 1e-3. Running time of our work with a 2080Ti GPU is 13ms per image, which is effectively real-time. + +# 5.3. Quantitative Evaluation and Comparison + +To demonstrate the effectiveness of our method, we performed quantitative evaluations on Human3.6M, 3DPW and 3DOH50K. Numerous comparisons are conducted with the state-of-the-art methods. It is noted that previous works do not specifically target the object-occluded problem, we retested their released model on the occlusion dataset. Fig.6 and Fig.7 present some results and more detailed comparisons are described in the following. + +We first tested our method on S9 and S11 of the original Human3.6M, verifying that our method can also achieve the state-of-art performance without occlusions. The 3rd column in Tab.2 shows the performance of our approach on the origin Human3.6M dataset. Our method can obtain the very similar results as the recent work [19]. + +Then, we compared our method on those occlusion datasets. On Synthetic Occlusion Human3.6M, we compared ours with the methods generating human meshes (based on SMPL model). Detailed results are shown in the 4th column of Tab.2, and our method outperforms all the other methods. As 3DPW is not designed for occlusions, we selected only the sequences with occlusions for evaluation. For a fair comparison, the evaluation is performed similar as [19]. The 5th column in Tab.2 shows that our method can also obtain better performance than other methods. It is noted that 3DPW contains numerous outdoor scenes, the errors on this dataset are higher than others. We then performed the comparison on the proposed 3DOH50K. The last 3 columns in Tab.2 show the comparison results. From these columns, we can find that our method performs better + +![](images/698f01eb6533bfd989d01502ead61599f93206ffd507222d0ec7e6914a4f9261.jpg) +Figure 6. Qualitative results of our approach. The left 3 columns show the results on our 3DOH50K. The right 3 columns are the examples on 3DPW[45], UP-3D[21] and Synthetic Occlusion Human3.6M[13] respectively. More results without SMPL fitting are shown in the Sup. Mat. + +
MethodRuntimeHuman3.6M [13] +(Protocol#2) +PA-MPJPEHuman3.6M [13] +(Synthetic Occlusion) +PA-MPJPE3DPW [45] +PA-MPJPEOur 3DOH50K
PA-MPJPESurface Error
SMPLify[3]100 sec82.3159.4114.0156.4177.3
SMPLify-X[32]30 sec-145.6151.3117.2132.4
HMR[17]0.420 sec56.882.2103.883.292.9
GraphCMR[20]0.033 sec50.174.4104.876.384.0
SPIN[19]0.016 sec41.164.995.467.573.6
Ours0.013 sec41.756.472.258.563.3
+ +Table 2. Comparisons with the state-of-the-art methods on Human3.6M, 3DPW and our 3DOH50K. Synthetic Occlusion Human3.6M means that we randomly render the synthetic occlusion on images, the minimum is $30\%$ of the bounding-box pixels occluded, details can be found in 5.1. Numbers are 3D joint errors and Surface errors in mm. + +than all previous methods for about $10\mathrm{mm}$ + +Furthermore, we studied the effect of occlusion ratios on the reconstruction accuracy by synthesizing different ratios of occlusion on the Synthetic Occlusion Human3.6M. The results are presented in Fig.8. The curves prove that our method can maintain good performance even with an occlusion ratio of more than $50\%$ . In addition, due to the effectiveness of the proposed UV inpainting branch, our method is relatively insensitive to the increase of occlusion ratios. + +# 5.4. Ablation Study + +Importance of the UV inpainting branch. In Tab.3, we tested different model structures to demonstrate the importance of our UV inpainting branch. Results show that it is difficult to directly predict object-occluded human shape and pose from color images. We also tried to estimate par + +tial UV maps from occluded color images and then inpaint partial maps in a cascade manner. It turns out that latent space supervision performs better in our method. + +Importance of the saliency map estimation. Since color images contain a lot of invalid information, we performed a salient detection on color images to obtain valid human features. In order to verify the importance of saliency map estimation network, we compared the results of occluded color images input and color images combined with saliency map as input. As shown in Tab.3, extra saliency map input improves the performance. Furthermore, it makes our method also have a good performance in outdoor scenes. + +Importance of the proposed part loss. In UV maps, the whole body is divided into several parts which means that resampled meshes may have a coarse connection between + +![](images/8db4d4980f5dba402c0bf0fdb620fd11854661aacca85a3b5038a6527d534c47.jpg) +Figure 7. Comparison with different methods. Our method could obtain more visually appealing results. + +![](images/47cae7a9b949b2a613368e909408773fb4561c63d2506890088fcacb51f949f4.jpg) +Figure 8. Relationship between the reconstruction accuracy and the occlusion ratio. + +![](images/f13b8b6948de46919a7c7144bc5f13015b607b5ae5343ee1d4756eb214d461ec.jpg) +Figure 9. Importance of the part loss. The right sub-figure shows a smoother result with the proposed part loss. + +different parts. Therefore, we put an extra constraint on the connection vertices on UV maps. Fig. 9 shows the result where we can find that part loss is essential to improve smoothness. + +
MethodMPJPEPA-MPJPE
end-to-end73.167.3
Cascade62.961.9
(w/o) saliency map60.857.9
two-branch58.256.4
+ +Table 3. Comparison of different network structures on the testing dataset. end-to-end: without UV map inpainting network. cascade: cascade the UV map inpainting network with the color image encoder. (w/o) saliency map: without saliency map estimation network. two branch: the proposed two-branch network. More details are shown in the Sup. Mat. + +# 6. Conclusion + +In this paper, we propose a novel method for the object-occluded human shape and pose estimation from single color images. Our main contribution is to utilize a partial UV map representation to describe the human body occlusion, and convert the occluded human shape estimation as a UV map inpainting problem. A novel two-branch network architecture is proposed to train an efficient regressor via the latent feature matching. We also introduce a saliency map sub-net to extract the human information from object-occluded color images. For fertilizing the network training, we further build a new dataset named as 3DOH50K. We hope the dataset would promote the future research on object-occluded human shape and pose estimation. + +Acknowledgments. This work was supported in part by the National Natural Science Foundation of China (No. 61806054), in part by the National Key R&D Program of China (No.2018YFB1403900), in part by the Natural Science Foundation of Jiangsu Province (No. BK20180355) and by the "Zhishan Young Scholar" Program of Southeast University. + +# References + +[1] T. Alldieck, G. Pons-Moll, C. Theobalt, and M. Magnor. Tex2shape: Detailed full human body geometry from a single image. In ICCV, 2019. 2, 4 +[2] F. Bogo, M. J. Black, M. Loper, and J. Romero. Detailed full-body reconstructions of moving people from monocular rgb-d sequences. In ICCV, 2015. 2 +[3] 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 ECCV, 2016, 1, 2, 5, 7 +[4] Z. Cao, T. Simon, S.-E. Wei, and Y. Sheikh. Realtime multiperson 2d pose estimation using part affinity fields. In CVPR, 2017. 5 +[5] H.-S. Fang, S. Xie, Y.-W. Tai, and C. Lu. RMPE: Regional multi-person pose estimation. In ICCV, 2017. 5 +[6] Y. Feng, F. Wu, X. Shao, Y. Wang, and X. Zhou. Joint 3d face reconstruction and dense alignment with position map regression network. In ECCV, 2018. 2, 3 +[7] G. Ghiasi, Y. Yang, D. Ramanan, and C. C. Fowlkes. Parsing occluded people. In CVPR, 2014. 2 +[8] R. Girshick, P. Felzenszwalb, and D. Mcallester. Object detection with grammar models. IEEE TPAMI, 33, 11 2010. 2 +[9] K. He, G. Gkioxari, P. Dollar, and R. Girshick. Mask r-cnn. In ICCV, 2017. 4, 5 +[10] K. He, X. Zhang, S. Ren, and S. Jian. Deep residual learning for image recognition. In CVPR, 2016. 6 +[11] J.-B. Huang and M.-H. Yang. Estimating human pose from occluded images. In ACCV, 2009. 2 +[12] Y. Huang, F. Bogo, C. Classner, A. Kanazawa, P. Gehler, I. Akhter, and M. Black. Towards accurate markerless human shape and pose estimation over time. In 3DV, 2017. 2 +[13] C. Ionescu, D. Papava, V. Olaru, and C. Sminchisescu. Human3.6m: Large scale datasets and predictive methods for 3d human sensing in natural environments. IEEE Transactions on Pattern Analysis and Machine Intelligence, 36(7):1325-1339, jul 2014. 2, 5, 6, 7 +[14] P. Isola, J. Zhu, T. Zhou, and A. A. Efros. Image-to-image translation with conditional adversarial networks. In CVPR, 2016. 4 +[15] A. S. Jackson, C. Manafas, and G. Tzimiropoulos. 3d human body reconstruction from a single image via volumetric regression. In ECCV, 2018. 1 +[16] H. Joo, T. Simon, X. Li, H. Liu, L. Tan, L. Gui, S. Banerjee, T. S. Godisart, B. Nabbe, I. Matthews, T. Kanade, S. Nobuhara, and Y. Sheikh. Panoptic studio: A massively multiview system for social interaction capture. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 5, 6 +[17] A. Kanazawa, M. J. Black, D. W. Jacobs, and J. Malik. End-to-end recovery of human shape and pose. In CVPR, 2018, 1, 2, 4, 6, 7 +[18] D. Kingma and J. Ba. Adam: A method for stochastic optimization. International Conference on Learning Representations, 12 2014. 6 + +[19] N. Kolotouros, G. Pavlakos, M. J. Black, and K. Daniilidis. Learning to reconstruct 3d human pose and shape via model-fitting in the loop. In ICCV, 2019. 4, 6, 7 +[20] N. Kolotouros, G. Pavlakos, and K. Daniilidis. Convolutional mesh regression for single-image human shape reconstruction. In CVPR, 2019. 4, 7 +[21] C. Lassner, J. Romero, M. Kiefel, F. Bogo, M. Black, and P. Gehler. Unite the people: Closing the loop between 3d and 2d human representations. In CVPR, 2017. 1, 6, 7 +[22] V. Lazova, E. Insafutdinov, and G. Pons-Moll. 360-degree textures of people in clothing from a single image. In 3DV, 2019. 2 +[23] K. Li, N. Jiao, Y. Liu, Y. Wang, and J. Yang. Shape and Pose Estimation for Closely Interacting Persons Using Multi-view Images. Computer Graphics Forum, 2018. 2 +[24] R. Li, X. Dong, Z. Cai, D. Yang, H. Huang, S. Zhang, P. L. Rosin, and S. Hu. Pose2seg: Human instance segmentation without detection. In CVPR, 2019. 4, 5 +[25] J. Liang and M. C. Lin. Shape-aware human pose and shape reconstruction using multi-view images. In ICCV, 2019. 2 +[26] M. Loper, N. Mahmood, and M. Black. Mosh: Motion and shape capture from sparse markers. volume 33, 12 2014. 6 +[27] 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. 1, 3 +[28] A. L. Maas. Rectifier nonlinearities improve neural network acoustic models. In ICMLW, 2013. 6 +[29] D. Mehta, H. Rhodin, D. Casas, P. Fua, O. Sotnychenko, W. Xu, and C. Theobalt. Monocular 3d human pose estimation in the wild using improved cnn supervision. In 3DV, 2017. 5, 6 +[30] M. Omran, C. Lassner, G. Pons-Moll, P. Gehler, and B. Schiele. Neural body fitting: Unifying deep learning and model based human pose and shape estimation. In 3DV, 2018. 1, 2 +[31] D. Pathak, P. Krahenbuhl, J. Donahue, T. Darrell, and A. Efros. Context encoders: Feature learning by inpainting. In CVPR, 2016. 3 +[32] G. Pavlakos, V. Choutas, N. Ghorbani, T. Bolkart, A. Osman, D. Tzionas, and M. Black. Expressive body capture: 3d hands, face, and body from a single image. In CVPR, 2019. 2, 5, 7 +[33] 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. 1, 2 +[34] U. Rafi, J. Gall, and B. Leibe. A semantic occlusion model for human pose estimation from a single depth image. 2015. 2 +[35] O. Ronneberger, P. Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. In MIC-CAI, 2015. 6 +[36] I. Sárándi, T. Linder, K. O. Arras, and B. Leibe. How robust is 3d human pose estimation to occlusion? CoRR, abs/1808.09316, 2018. 2, 4, 6 +[37] L. Sigal, A. Balan, and M. Black. Humaneva: Synchronized video and motion capture dataset and baseline algorithm for + +evaluation of articulated human motion. International Journal of Computer Vision, 87:4-27, 03 2010. 5 +[38] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. 6 +[39] L. Song, D. Gong, Z. Li, C. Liu, and W. Liu. Occlusion robust face recognition based on mask learning with pairwise-differential siamese network. In ICCV, 2019. 3 +[40] Y. Song, C. Yang, Z. Lin, X. Liu, Q. Huang, H. Li, and C. C. J. Kuo. Contextual-based image inpainting: Infer, match, and translate. In ECCV, 2018. 3 +[41] Y. Tao, Z. Zheng, K. Guo, J. Zhao, and Y. Liu. Doublefusion: Real-time capture of human performances with inner body shapes from a single depth sensor. In CVPR, 2018. 2 +[42] A. Tran, T. Hassner, I. Masi, E. Paz, Y. Nirkin, and G. Medioni. Extreme 3d face reconstruction: Seeing through occlusions. In CVPR, 2018. 2 +[43] 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. 1 +[44] A. Venkat, C. Patel, Y. Agrawal, and A. Sharma. Humanmeshnet: Polygonal mesh recovery of humans. In ICCV, 2019. 2, 4 +[45] T. von Marcard, R. Henschel, M. J. Black, B. Rosenhahn, and G. Pons-Moll. Recovering accurate 3d human pose in the wild using imus and a moving camera. In ECCV, 2018, 2, 5, 6, 7 +[46] C. Wu and J. Ding. Occluded face recognition using low-rank regression with generalized gradient direction. Pattern Recognition, 80, 03 2018. 2 +[47] W. Xiong, J. Yu, Z. Lin, J. Yang, X. Lu, C. Barnes, and J. Luo. Foreground-aware image inpainting. In CVPR, 2019. 3 +[48] 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 Transactions on Graphics, 37, 08 2017. 2 +[49] Z. Yan, X. Li, M. Li, W. Zuo, and S. Shan. Shift-net: Image inpainting via deep feature rearrangement. In ECCV, 2018. 3 +[50] C. Yang, X. Lu, Z. Lin, E. Shechtman, O. Wang, and H. Li. High-resolution image inpainting using multi-scale neural patch synthesis. In CVPR, 2017. 3 +[51] P. Yao, Z. Fang, F. Wu, Y. Feng, and J. Li. Densebody: Directly regressing dense 3d human pose and shape from a single color image. arXiv preprint arXiv:1903.10153, 2019. 1, 2, 4 +[52] J. Yu, Z. Lin, J. Yang, X. Shen, X. Lu, and T. Huang. Generative image inpainting with contextual attention. In CVPR, 01 2018. 3 +[53] X. Yuan and I. Kyu Park. Face de-occlusion using 3d morphable model and generative adversarial network. In ICCV, 2019. 2 +[54] H. Zhang, J. Cao, G. Lu, W. Ouyang, and Z. Sun. Danet: Decompose-and-aggregate network for 3d human shape and pose estimation. In ACM MM, 2019. 1 + +[55] H. Zhu, X. Zuo, S. Wang, X. Cao, and R. Yang. Detailed human shape estimation from a single image by hierarchical mesh deformation. In CVPR, 2019. 2 \ No newline at end of file diff --git a/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/images.zip b/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..c6972007db622ad561ac13078905b08a4d17eb70 --- /dev/null +++ b/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cfe40d8ded2ff86bc23fd650b15ba0e3e51306b5735797708ba453a410b5f2d5 +size 687106 diff --git a/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/layout.json b/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..29ab78d3ed0da017d23a74d292863623f9bbdd64 --- /dev/null +++ b/objectoccludedhumanshapeandposeestimationfromasinglecolorimage/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a14dd289e2e2475862592950a5eab3f41180bd99e24a62b6806c1c9029b2dda +size 320698 diff --git a/objectrelationalgraphwithteacherrecommendedlearningforvideocaptioning/0b748691-8f7f-4527-aa52-99cb9e1e8863_content_list.json b/objectrelationalgraphwithteacherrecommendedlearningforvideocaptioning/0b748691-8f7f-4527-aa52-99cb9e1e8863_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..29a16e489f2a310126c3ce6e9234d2521316842c --- /dev/null +++ b/objectrelationalgraphwithteacherrecommendedlearningforvideocaptioning/0b748691-8f7f-4527-aa52-99cb9e1e8863_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27586d5356971a877636970835fbdd2d059448bab6fdc02b34f18724dc4b7c53 +size 92739 diff --git a/objectrelationalgraphwithteacherrecommendedlearningforvideocaptioning/0b748691-8f7f-4527-aa52-99cb9e1e8863_model.json b/objectrelationalgraphwithteacherrecommendedlearningforvideocaptioning/0b748691-8f7f-4527-aa52-99cb9e1e8863_model.json new file mode 100644 index 0000000000000000000000000000000000000000..24d6870418f188bc95e527134ddaf7ad6a8695c6 --- /dev/null +++ b/objectrelationalgraphwithteacherrecommendedlearningforvideocaptioning/0b748691-8f7f-4527-aa52-99cb9e1e8863_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b6f7d6201ef7fdece826b697012b6f4061e984f5aaa7afe1fbb270dc9375c68 +size 113725 diff --git a/objectrelationalgraphwithteacherrecommendedlearningforvideocaptioning/0b748691-8f7f-4527-aa52-99cb9e1e8863_origin.pdf b/objectrelationalgraphwithteacherrecommendedlearningforvideocaptioning/0b748691-8f7f-4527-aa52-99cb9e1e8863_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8a9e6c75196920daec92f5dffa7916e8cb80ecb9 --- /dev/null +++ b/objectrelationalgraphwithteacherrecommendedlearningforvideocaptioning/0b748691-8f7f-4527-aa52-99cb9e1e8863_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:092ddd64edd925bdfe808069a718fab5b6a42d56d8a793c9f7c406e3e181a9ce +size 835997 diff --git a/objectrelationalgraphwithteacherrecommendedlearningforvideocaptioning/full.md b/objectrelationalgraphwithteacherrecommendedlearningforvideocaptioning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..1d729a2e6a355c300a0f3fe66e13fc5766fe7a81 --- /dev/null +++ b/objectrelationalgraphwithteacherrecommendedlearningforvideocaptioning/full.md @@ -0,0 +1,414 @@ +# Object Relational Graph with Teacher-Recommended Learning for Video Captioning + +Ziqi Zhang $^{1,3*}$ , Yaya Shi $^{2*}$ , Chunfeng Yuan $^{1†}$ , Bing Li $^{1,6,7}$ , Peijin Wang $^{3,5}$ , Weiming Hu $^{1,3,4}$ , Zhengjun Zha $^{2}$ $^{1}$ National Laboratory of Pattern Recognition, CASIA + +$^{2}$ University of Science and Technology of China $^{3}$ University of Chinese Academy of Sciences + +4Center for Excellence in Brain Science and Intelligence Technology, CAS + +$^{5}$ Aerospace Information Research Institute, CAS $^{6}$ PeopleAI, Inc. + +${}^{7}$ State Key Laboratory of Communication Content Cognition,People's Daily Online + +{zhangziqi2017}@ia.ac.cn,{shiyaya,zhazj}@mail.ustc.edu.cn,{cfyuan,bli,wmhu}@nlpr.iacn + +# Abstract + +Taking full advantage of the information from both vision and language is critical for the video captioning task. Existing models lack adequate visual representation due to the neglect of interaction between object, and sufficient training for content-related words due to long-tailed problems. In this paper, we propose a complete video captioning system including both a novel model and an effective training strategy. Specifically, we propose an object relational graph (ORG) based encoder, which captures more detailed interaction features to enrich visual representation. Meanwhile, we design a teacher-recommended learning (TRL) method to make full use of the successful external language model (ELM) to integrate the abundant linguistic knowledge into the caption model. The ELM generates more semantically similar word proposals which extend the ground-truth words used for training to deal with the long-tailed problem. Experimental evaluations on three benchmarks: MSVD, MSR-VTT and VATEX show the proposed ORGTRL system achieves state-of-the-art performance. Extensive ablation studies and visualizations illustrate the effectiveness of our system. + +# 1. Introduction + +Video captioning aims to generate natural language descriptions automatically according to the visual information of given videos. There are many wonderful visions of video captioning such as blind assistance and autopilot assistance. Video captioning needs to consider both spatial appearance and temporal dynamics of video contents, + +![](images/0b4fc0a571fa9eb80dafde799829b0137ca5ece6f101241c4495f678ff52f283.jpg) +Figure 1. Long-tailed problem of the caption corpus. The top-50 words frequency of MSR-VTT are shown. Under the guidance of TRL, more potential content-specific words are exposed to the caption model. Compared with the words frequency before, the words in tail region get an overall boosting. + +which is a promising and challenging task [20, 37, 39, 52]. The key problems in this task are twofold: how to extract discriminative features to represent the contents of videos, and how to leverage the existing visual features to match the corresponding captioning corpus. The ultimate aim is to cross the gap between vision and language. + +For vision representation, previous works [48, 50, 25, 24, 38] always leverage appearance features of keyframes and motion features of segments to represent video contents. These features extract global information and hard to capture the detailed temporal dynamics of objects in the video. The most recent works [53, 13] apply a pretrained object detector to obtain some object proposals in each keyframe and use spatial/temporal attention mechanisms to fuse object features. However, they neglect the relationship between objects in the temporal and spatial domains. Some researches in the field of Visual Question Answering, Image Captioning even Action Recognition demonstrate that the relationship between objects is vital, which also plays an important role in generating a more detailed and diverse description for a video. + +For sentence generation, according to statistics of word + +frequency in caption corpus, it is found that the majority of words are function words and common words e.g. "the" and "man", which are far more than the real content-specific words in number. This is the so-called "long-tailed" problem, as shown in Fig.1. This problem will cause insufficient training for a large number of meaningful words. Although the long-tailed problem can be relieved by giving different weights to different words [9], it can not be solved fundamentally. Furthermore, a caption model should not only comprehend visual information but also grasp linguistic ability using such a small number of samples, which is a so heavy task! Why not employ a ready-made ELM e.g. BERT [8] or GPT [28] as a teacher, to directly impart linguistic knowledge to the caption model, to mitigate the problem caused by insufficient samples. + +In this paper, we propose a novel model with the assistance of an original training strategy to deal with above two issues for video captioning: 1) We construct a learnable ORG to fully explore the spatial and temporal relationships between objects. With the help of graph convolutional networks(GCNs) [17], object representations can be enhanced during the process of relational reasoning. Specifically, we explore two kinds of graphs: the partial object relational graph (P-ORG) connects objects in the same frame, and the complete object relational graph (C-ORG) builds a connection for all the objects in video. Scaled dot-product is utilized to implicitly compute relationships between each object, which is learnable during training. Finally, object features are updated by GCNs to be more informative features. 2) Generally, the caption model is forced to learn the ground-truth word at each training step, so we call this process as the teacher-enforced learning (TEL) and these words as hard target. However, TEL doesn't consider the long-tailed problem. Therefore, we propose a TRL method, which makes full use of external language model (ELM) to generate some word proposals according to the prediction probability of current ground-truth words. These proposals are called soft targets, which are often semantically similar with the ground-truth words and extended them. Specifically, the ELM is off-line well-trained on a large-scale external corpus, and it is employed as an experienced teacher, who has contained a wealth of linguistic knowledge. By contrast, the caption model can be regarded as a student. Under the guidance of TRL, excellent linguistic knowledge from ELM is transformed into the caption model. + +The contributions of this work can be summarized as following: 1) We construct novel ORGs to connect each object in video and utilizes GCNs to achieve relational reasoning, which enrich the representation of detailed objects further. 2) The TRL is proposed as a supplement of the TEL, to integrate linguistic knowledge from an ELM to the caption model. Several times words are trained at each time step more than before. It's effective to relieve long-tailed prob + +lem and improve generalization of the caption model. 3) Our model achieves state-of-the-art performances on three benchmarks: MSVD, MSR-VTT, and newly VATEX. + +# 2. Related Works + +Video Captioning. Recent researches mainly focus on sequence-learning based methods [34, 48, 50, 25, 24, 38, 27], which adopt encoder-decoder structure. Yao et al. [48] propose a temporal attention mechanism to dynamically summarize the visual features. Wang et al. [38] try to enhance the quality of generated captions by reproducing the frame features from decoding hidden states. More recently, there are some researches concerning the object-level information [47, 53, 13]. Zhang et al. [53] use a bidirectional temporal graph to capture detailed temporal dynamics for the salient objects in the video. Hu et al. [13] use two layers stacked LSTM as an encoder to construct the temporal structure at frame-level and object-level successively. + +However, these methods mainly work on the global information or temporal structure of salient objects without considering the interactions between each object in frames. In this work, we propose a graph-based approach, which constructs a temporal-spatial graph on all the objects in a video to enhance object-level representation. + +Visual Relational Reasoning. Some researches have shown that visual relational reasoning is effective for computer vision tasks, such as Image Captioning [49, 46], VQA [23, 22, 18] and Action Recognition [41, 42]. Yao et al. [49] exploit predefined semantic relations learned from the scene graph parsing task [51] and embed the graph structure into vector representations by using a modified GCN. Li et al. [18] use both explicit graph and learnable implicit graph to enrich image representation and apply GAT [33] to update relations in attentive weight. Wang et al. [42] compute both implicit similarity relation and relative positional relation of each object in the video, and then apply GCNs to perform reasoning. There are few efforts utilizing relational reasoning for video captioning. + +External Language Model for Seq2Seq Generation Tasks. ELM has been applied to many natural language generation tasks such as neural machine translation (NMT) and automatic speech recognition (ASR). An early attempt to use ELM for NMT in [10] is also known as shallow fusion and deep fusion. Kannan et al. [14] fully explore the behavior of shallow fusion with different ELMs and test them on a large-scale ASR task. Sriram et al. [30] propose cold fusion to improve ASR performance. + +These above fusion methods illustrate promising performance but also have some limitations. Shallow fusion may bring bias when output logits are used directly because of the difference in the data distribution between language model and task model. Deep fusion also needs ELM during inference and cold fusion relies on additional gating mech + +![](images/0ff4c7aba6cadfc03bcdd31cd6065dd3670123649dcd6a5da3224aca7f9ec579.jpg) +Figure 2. The overview of our proposed ORG-TRL system. It mainly consists of the ORG based object encoder presented in the top-left box, and the hierarchical decoder with temporal/spatial attention in the top-right box. Our model is under the co-guidance of the novel TRL in the bottom-left box and the common TEL in the bottom-right. It also illustrates a virtual example during training: when $t = 3$ , the TEL forces the model to learn "talk", but the TRL recommends the model to learn more words via the knowledge from ELM. + +anisms and networks, which will bring heavy calculations and complexity to the task model. Inspired by [2], our introduced TRL method only calculates the KL divergence between "soft targets" and output distribution of task model during training which can well overcome above-mentioned limitations. + +# 3. Methodology + +Fig.2 illustrates the overview of our system. An encoder-decoder framework is followed. Appearance, motion and detailed objects features are extracted by diverse networks. Specifically, we construct a graph based object encoder whose core is a learnable object relational graph (ORG), which can learn the interaction among different objects dynamically. The description generator generates each word by steps, with attentively aggregating visual features in space and time. For the learning process, not only normal teacher-enforced learning (TEL) but also proposed teacher-recommended learning (TRL) strategy are leveraged to learn task-specific knowledge and external linguistic knowledge separately. + +# 3.1. Object Relational Graph based Visual Encoder + +Formally, given a sequence of video frames, we uniformly extract $T$ frames as keyframes, and collect a short-range video frames around keyframes as segments which reflects the temporal dynamics of a video. The pretrained 2D CNNs and 3D CNNs are employed to extract the appearance features $\mathcal{F} = \{f_i\}$ of each keyframe and motion features $\mathcal{M} = \{m_i\}$ of each segment separately, where $f_{i}$ and $m_{i}$ denote the features of the $i_{th}$ frame and segment respectively; $i = 1,\dots ,L$ ; $L$ denotes the number of keyframes. + +People always describe an object based on its relationships with others in the video. In order to get the detailed object representations, the pretrained object detector is ap + +plied to capture several class-agnostic object proposals in each keyframe and extract their features $\mathcal{R}^i = \left\{r_k^i\right\}, i = 1, \dots, L, k = 1, \dots, N$ , where $r_k^i$ represents the $k_{th}$ object feature in $i_{th}$ keyframe, $L$ is the number of keyframes and $N$ is the number of objects in each frame. These original object features are independent, and they have no interaction with each other in time and space. + +To learn the relation message from surrounding objects, we define a relational graph for a object set and then use it to update the object features. Specifically, given $K$ objects, each object is considered as a node. Let $R \in \mathbb{R}^{K \times d}$ denote $K$ object nodes with $d$ dimensional feature, and $A \in \mathbb{R}^{K \times K}$ denote the relation coefficient matrix between $K$ nodes. We define $A$ as: + +$$ +A = \phi (R) \cdot \psi (R) ^ {T} \tag {1} +$$ + +$$ +\phi (R) = R \cdot W _ {i} + b _ {i}, \psi (R) = R \cdot W _ {j} + b _ {j} \tag {2} +$$ + +where $W_{i}, W_{j} \in \mathbb{R}^{d \times d'}$ and $b_{i} \in \mathbb{R}^{d}, b_{j} \in \mathbb{R}^{d'}$ are learnable parameters. Subsequently, $A$ is normalized to make the sum of edges, connecting to the same node, equals to 1: + +$$ +\hat {A} = \operatorname {s o f t m a x} (A, \dim = 1) \tag {3} +$$ + +where $\hat{A}$ can be seen as how much information the center object gets from the surrounding objects. We apply GCNs to perform relational reasoning, then original objects features $R$ are updated to $\hat{R}$ : + +$$ +\hat {R} = \hat {A} \cdot R \cdot W _ {r} \tag {4} +$$ + +where $\hat{R} \in \mathbb{R}^{K \times d}$ is enhanced object features with interaction message between objects, and $W_{r} \in \mathbb{R}^{d \times d}$ is learnable parameters. + +We explore two kinds of relational graphs as shown in Fig.3, the P-ORG and the C-ORG. Specifically, the P-ORG only build the relationship between $N$ objects in the + +![](images/8cc107dba5a47ecdf32a65744fda628d5842705ab0446f00b393003da2473cd4.jpg) +Figure 3. The diagrams of the proposed P-ORG and C-ORG. Each colored square represents the vector of the object. $A$ is the relational coefficient matrix. + +same frame thus a $A \in \mathbb{R}^{N \times N}$ relational graph is constructed. Note that learnable parameters of relational graph are shared with all $L$ frames. Although object proposals appearing in different frames may belong to the same entity, they are considered as different nodes because of diverse states. Meanwhile, the C-ORG constructs a complete graph $A \in \mathbb{R}^{(N \times L) \times (N \times L)}$ which connects each object with all the other $N \times L$ objects in the video. It's noisy to directly connect center node with all $N \times L$ nodes, thus we select top-k corresponding nodes to connect. + +Finally, the enhanced object features are computed by performing relational reasoning. They are together with appearance and motion features to sufficiently present videos. + +# 3.2. Description Generation + +After getting the sufficient video features, we propose a hierarchical decoder with a temporal-spatial attention module to generate linguistic descriptions by steps. The hierarchical decoder consists of the Attention LSTM and the Language LSTM. + +Firstly, the Attention LSTM is to summarize current semantics $h_t^{attn}$ according to the history hidden state $h_{t-1}^{lang}$ of Language LSTM, concatenated with mean-pooled global video feature $\bar{v} = \frac{1}{L}\sum v_i$ and the previous word $w_{t-1}$ at the decoding step $t$ : + +$$ +h _ {t} ^ {\text {a t t n}} = \mathbf {L S T M} ^ {\text {a t t n}} \left(\left[ \bar {v}, W _ {e} w _ {t - 1}, h _ {t - 1} ^ {\text {l a n g}} \right]; h _ {t - 1} ^ {\text {a t t n}}\right) \tag {5} +$$ + +where $v_{i} = [f_{i},m_{i}]$ , $f_{i}\in \mathcal{F}$ , $m_{i}\in \mathcal{M}$ , is the concatenation of appearance feature and motion feature, $W_{e}$ is the learnable word embedding matrix. + +Following the current semantics $h_t^{att}$ , the temporal attention module dynamically decides when (frames) to attend, and abstracts the global context features $c_t^g$ : + +$$ +c _ {t} ^ {g} = \sum_ {i = 1} ^ {L} \alpha_ {t, i} v _ {i} +$$ + +$$ +\alpha_ {t, i} = \operatorname {s o f t m a x} \left(w _ {a} ^ {T} \tanh \left(W _ {a} v _ {i} + U _ {a} h _ {t} ^ {\text {a t t n}}\right)\right) \tag {6} +$$ + +where $\alpha_{t,i}$ is the weight of the $i_{th}$ global feature at the $t_{th}$ decoding step; $L$ is the number of keyframes; $w_{a}, W_{a}$ and $U_{a}$ are learnable parameters. + +For local object feature, objects in different frames are firstly aligned to merge together, and then the spatial attention module chooses which objects should be focused on. We use a simple but effective method to align objects in different frames. The process is shown on the left pictures in Fig.2, and the dotted line trajectories present the objects alignment. We set objects in the first frame as anchors, and define $\text{sim}_i(j,j')$ as the cosine distance between the $j_{th}$ object in anchor frame and the $j_{th}'$ in $i_{th}$ frame: + +$$ +\operatorname {s i m} _ {i} \left(j, j ^ {\prime}\right) = \cos \left(r _ {j} ^ {1}, r _ {j ^ {\prime}} ^ {i}\right) \tag {7} +$$ + +where $j,j^{\prime} = 1,\ldots ,N;i = 2,\ldots ,L$ . Considering the similarity between two objects themselves, we use original object features $\mathcal{R}$ to calculate similarity rather than enhanced features $\hat{\mathcal{R}}$ . The object in each frame is aligned to the anchors according to the maximum similarity. These aligned objects ideally belong to the same entity. Enhanced features $\hat{\mathcal{R}}$ , following the group of aligned objects, are weighted sum by $\{\alpha_{t,i}\}, i = 1,\dots ,L$ . In this way, objects in different frames are merged into one frame as local aligned features $\tilde{R}$ according to alignment operation and temporal attention. + +Then, the spatial attention module decides where (objects) to attend, and abstracts local context feature $c_t^l$ : + +$$ +c _ {t} ^ {l} = \sum_ {j = 1} ^ {N} \beta_ {t, j} u _ {j} +$$ + +$$ +\beta_ {t, j} = \operatorname {s o f t m a x} \left(w _ {b} ^ {T} \tanh \left(W _ {b} u _ {j} + U _ {b} h _ {t} ^ {\text {a t t n}}\right)\right) \tag {8} +$$ + +where $u_{j} \in \tilde{R}$ denotes one of the $N$ local aligned features; $w_{b}, W_{b}$ and $U_{b}$ are learnable parameters. + +Finally, the Language LSTM summarizes both global and local context features to generate current hidden state $h_t^{lang}$ . The probability distribution of the caption model $P_{t}$ is acquired, followed with a single layer perceptron and the softmax operation at decoding step $t$ : + +$$ +h _ {t} ^ {\text {l a n g}} = \mathbf {L S T M} ^ {\text {l a n g}} \left(\left[ c _ {t} ^ {g}, c _ {t} ^ {l}, h _ {t} ^ {\text {a t t n}} \right]; h _ {t - 1} ^ {\text {l a n g}}\right) \tag {9} +$$ + +$$ +P _ {t} = \operatorname {s o f t m a x} \left(W _ {z} h _ {t} ^ {\text {l a n g}} + b _ {z}\right) \tag {10} +$$ + +where $[\cdot ,\cdot ]$ denotes concatenation; $P_{t}$ is a $D$ -dimensional vector of vocabulary size; $W_{z}$ and $b_{z}$ are learnable parameters. + +# 3.3. Teacher-recommended Learning via External Language Model + +For a sufficient training of content-specific words, the proposed model is jointly trained under the guidance of common TEL and proposed TRL. + +
t=4Awomanwithgreen
soft targetslongblondeshortcurlybrownblackreddarkwhitepink...
probability0.0470.0250.0200.0190.0170.0160.0150.0140.0110.011
t=6Awomanwithgreenhairteaching
soft targetsshowsshowingdemonstratesdemonstratingexplainsexplainingteachesteachingtellsdescribes...
probability0.0860.0660.0650.0330.0230.0150.0140.0140.0130.012
t=13Awomanwithgreenhairteachinghowtotrimflowersinavase
soft targetsvasegardengreenhouseyardroomfieldtreebackyardflowerbouquet...
probability0.0740.0510.0150.0150.0140.0100.00950.00810.00680.0061
+ +Table 1. An example of "soft targets" and "hard target" (colored words) at three positions of the same sentence. Given the words before "hard targets", the ELM generate 10 "soft targets" and their probabilities in descending order. + +As for conventional TEL process, the caption model is forced to generate the ground-truth word at each time step. This word is the so-called "hard target", which are expressed as $\mathcal{X}_{\text {hard }} = \left\{x_{1}^{h}, x_{2}^{h}, \ldots, x_{T_{s}}^{h}\right\}$ , where $x_{t}^{h}$ is one ground-truth word at the $t_{th}$ decoding step; $T_{s}$ denotes training step in total of the given sentence. We refer to our designed caption model as CAP, and the output probability distribution of CAP is $P_{t} = \text{CAP}(w_{< t} | \theta_{CAP})$ , where $w_{< t}$ is history words; $\theta_{CAP}$ stands all the parameters of the CAP. The training criterion is based on Cross-Entropy loss, only the probability corresponding to ground-truth participate in calculation: + +$$ +\mathcal {L} _ {C E} (\theta) = - \sum_ {t = 1} ^ {T} \delta \left(x _ {t} ^ {h}\right) ^ {T} \cdot \log P _ {t} \tag {11} +$$ + +where $\delta (d)\in \mathbb{R}^{D}$ denotes one-hot vector, and the value equals to 1 only at the word $d$ position; $P_{t}\in \mathbb{R}^{D}$ is the output distribution of the CAP; $x_{t}^{h}$ is the "hard targets". + +The TEL is lack of sufficient training for content-related words due to long-tailed problems. Therefore, we propose the TRL to integrate the knowledge from ELM. There are many ready-made models that can be employed as ELM e.g. Bert and GPT. Suppose we got an ELM that has been well trained on a large scale monolingual corpus. When given the previous $t - 1$ words $w_{